计算机科学 > 软件工程
[提交于 2025年1月7日]
标题:Modified Condition/Decision Coverage in the GNU Compiler Collection
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Jørgen Kvalsvik[v1] 2025年1月7日 星期二 00:00:00 UTC