arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1701.08114cs.PL
收藏

C程序可变性重写的有效性分析

Effective Analysis of C Programs by Rewriting Variability

Alexandru Florin Iosif-Lazar, Jean Melo, Aleksandar S. Dimovski, Claus Brabrand, Andrzej Wasowski

摘要:

上下文可变性密集型程序(程序族)出现在许多应用领域中,原因有很多。不同的家族成员,称为变体,通过打开和关闭静态可配置选项(功能)来派生,同时最大限度地重用公共代码。查询程序族的验证是具有挑战性的,因为变体的数量是特征数量的指数。现有的单程序分析和验证工具不能直接应用于程序族,并且设计和实现相应的可变性感知版本是繁琐和费力的。Approach.在这项工作中,我们提出了一系列的可变性相关的转换转换为单个程序的程序族,取代编译时的变化与运行时的变化(非确定性)。所获得的转换后的程序可以随后使用常规的现成的单程序分析工具(例如类型检查器、符号执行器、模型检查器和静态分析器)来分析。知识我们的可变性相关的转换是结果保持的,这意味着转换后的单个程序的结果与来自原始程序族的所有变量的结果的并集之间的关系是相等的。接地。我们展示了我们的转换规则和它们的正确性,相对于一个最小的核心命令式语言IMP。然后,我们讨论了我们的经验,实现和使用转换的效率和有效的分析和验证现实世界的C程序族。重要性我们报告了一些有趣的与可变性相关的错误,这些错误是我们使用各种最先进的单程序C验证工具发现的,例如Frama-C,Clang,LLBMC。

英文摘要:

Context. Variability-intensive programs (program families) appear in many application areas and for many reasons today. Different family members, called variants, are derived by switching statically configurable options (features) on and off, while reuse of the common code is maximized. Inquiry. Verification of program families is challenging since the number of variants is exponential in the number of features. Existing single-program analysis and verification tools cannot be applied directly to program families, and designing and implementing the corresponding variability-aware versions is tedious and laborious. Approach. In this work, we propose a range of variability-related transformations for translating program families into single programs by replacing compile-time variability with run-time variability (non-determinism). The obtained transformed programs can be subsequently analyzed using the conventional off- the-shelf single-program analysis tools such as type checkers, symbolic executors, model checkers, and static analyzers. Knowledge. Our variability-related transformations are outcome-preserving, which means that the relation between the outcomes in the transformed single program and the union of outcomes of all variants derived from the original program family is equality. Grounding. We show our transformation rules and their correctness with respect to a minimal core imperative language IMP. Then, we discuss our experience of implementing and using the transformations for efficient and effective analysis and verification of real-world C program families. Importance. We report some interesting variability-related bugs that we discovered using various state-of-the-art single-program C verification tools, such as Frama-C, Clang, LLBMC.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑