Modified Condition/Decision Coverage in the GNU Compiler Collection
J{\o}rgen Kvalsvik

TL;DR
This paper details the implementation of masking MC/DC coverage support in GCC 14, enabling efficient, language-agnostic measurement of decision coverage for safety-critical software using Boolean decision diagrams.
Contribution
It introduces a novel approach to implement MC/DC in GCC using BDD analysis, supporting multiple languages with a single implementation.
Findings
Efficient MC/DC measurement via bitwise instructions.
Language-agnostic implementation covering C, C++, D, Rust.
Supports safety-critical software testing and verification.
Abstract
We describe the implementation of the masking Modified Condition/Decision Coverage (MC/DC) support in GCC 14, a powerful structural coverage metric with wide industry adoption for safety critical applications. By analyzing the structure of Boolean expressions with Binary Decision Diagrams we can observe the key property of MC/DC, the power to independently affect the outcome, and map to the edges of the Control Flow Graph. This mapping can be translated to a few bitwise instructions and enables GCC to instrument programs to efficiently observe and record when conditions have been taken and have an independent effect on the outcome of a decision. By analyzing the BDD rather than the program syntax, GCC can measure MC/DC for almost all of its languages with a single language-agnostic implementation, including support for C, C++, D, and Rust.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsParallel Computing and Optimization Techniques · Embedded Systems Design Techniques · Model-Driven Software Engineering Techniques
