Publication Type
Journal Article
Version
acceptedVersion
Publication Date
1-2023
Abstract
Testing multi-threaded programs is challenging due to the enormous space of thread interleavings. Recently, a code coverage criterion for multi-threaded programs called MAP-coverage has been proposed and shown to be effective for testing concurrent programs. Existing approaches for achieving high MAP-coverage are based on random testing with simple heuristics, which is ineffective in systematically triggering rare thread interleavings. In this study, we propose a novel approach called pattern constraint reduction (PCR), which employs optimized constraint solving to generate thread interleavings for high MAP-coverage. The idea is to iteratively encode and solve path conditions to generate thread interleavings which are guaranteed to improve MAP-coverage. Furthermore, we effectively apply interpolation techniques to reduce the efforts of constraint solving by avoiding solving infeasible constraints. The experiment results on 20 benchmark programs show that our approach complements existing random testing based approaches when there are rare failure-inducing interleaving in the whole search space. Specifically, PCR finds concurrency bugs faster in 18 out of 20 programs, with an average speedup of 4.2x and a maximum speedup of 11.4x.
Keywords
Computer bugs, Concurrency bug detection, Concurrent computing, Constraint solving, Coverage criteria, Instruction sets, Message systems, Programming, Sun, Systematics, Thread-safe class
Discipline
Numerical Analysis and Scientific Computing | Software Engineering
Research Areas
Software and Cyber-Physical Systems
Publication
IEEE Transactions on Software Engineering
Volume
49
Issue
1
First Page
99
Last Page
112
ISSN
0098-5589
Identifier
10.1109/TSE.2022.3144480
Publisher
Institute of Electrical and Electronics Engineers
Citation
ZHAO, Yingquan; WANG, Zan; LIU, Shuang; SUN, Jun; CHEN, Junjie; and CHEN, Xiang.
Achieving high MAP-coverage through pattern constraint reduction. (2023). IEEE Transactions on Software Engineering. 49, (1), 99-112.
Available at: https://ink.library.smu.edu.sg/sis_research/6940
Copyright Owner and License
Authors
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-No Derivative Works 4.0 International License.
Additional URL
https://doi.org/10.1109/TSE.2022.3144480