通过超级块支配图来分析软件测试探针的合理插装位置,可有效地减少插装探针数量,降低代码插装对程序的影响。基于超级块支配图的代码插装原理,设计一种针对C语言的软件自动测试工具(SAT),介绍了该工具中词法语法分析器、静态分析器、代码插装器等主要功能模块的具体实现方案,同时对SAT的插装性能进行了分析。
This paper described the design and implementation of a coverage testing tool (SAT). It emphasized on the realization of main modules: lexer and parser, static analyzer, and code instrumenter. Compared to other tools that instruments each basic block, SAT used super block dominator graph to check which basic block should be instrumented so that both the number of instrumentation probes and runtime overhead of instrumentation are reduced effectively. Finally, used an example to show the functionalities of the tool as well as the discussed performance of SAT.