Batching Non-Conflicting Mutations for Efficient, Safe, Parallel Mutation Analysis in Rust

Rust is a relatively young, memory safe systems programming language which is increasingly being adopted by projects requiring both performance, and safety. While automated testing is built into the language, tool support for mutation analysis is almost non-existent, having not been the subject of p...

Full description

Saved in:
Bibliographic Details
Published in2023 IEEE Conference on Software Testing, Verification and Validation (ICST) pp. 49 - 59
Main Authors Levai, Zalan, McMinn, Phil
Format Conference Proceeding
LanguageEnglish
Published IEEE 01.04.2023
Subjects
Online AccessGet full text
DOI10.1109/ICST57152.2023.00014

Cover

Loading…
More Information
Summary:Rust is a relatively young, memory safe systems programming language which is increasingly being adopted by projects requiring both performance, and safety. While automated testing is built into the language, tool support for mutation analysis is almost non-existent, having not been the subject of past research. This leaves Rust developers without a way to determine test thoroughness. To address this problem, we design a mutation analysis process for Rust that overcomes challenges related to generating viable mutations due to the strictness of the language in terms of its type system, memory restrictions, and the potential to introduce undefined behavior in unsafe code blocks. Our technique efficiently evaluates mutations simultaneously through a process we refer to as "batching" - the use of static analysis to determine mutations that are non-conflicting, and therefore are able to be evaluated together. Batching enables our technique to maximize thread usage, executing more tests in parallel, and further reducing the time required to evaluate mutations. We implemented these techniques into a tool, mutest-rs, which we empirically evaluated on a diverse set of common subject libraries and Rust programs, and found that our batching method for increasing parallelism is able to reduce the overall runtime of mutation analysis by up to 66.4%, compared to not applying batching.
DOI:10.1109/ICST57152.2023.00014