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

C语言分析工具的形式规格说明上下文生成

Context Generation from Formal Specifications for C Analysis Tools

Michele Alberti, Julien Signoles

摘要:

分析工具,如抽象解释器,符号执行工具和测试工具,在分析特定函数时通常需要适当的上下文才能给出有用的结果。这样的上下文会使函数参数和全局变量符合函数要求。但是,手写可能容易出错:手写的上下文可能包含错误或与预期的规范不匹配。一种更健壮的方法是用专用的规约语言来指定上下文,并保持分析工具来正确地支持它。这可能意味着要投入大量的开发工作来增强这些工具,而这往往是不可行的。本文提出了一种方法,系统地产生这样的上下文从一个正式规格的C函数。这被应用于ACSL规约语言的子集,以便为Frama-C的基于抽象解释的值分析插件生成合适的上下文,Frama-C是一个用于分析用C编写的代码的框架。这里提出的想法已经在一个新的框架-C插件,这是目前正在使用的操作工业设置中实现。

英文摘要:

Analysis tools like abstract interpreters, symbolic execution tools and testing tools usually require a proper context to give useful results when analyzing a particular function. Such a context initializes the function parameters and global variables to comply with function requirements. However it may be error-prone to write it by hand: the handwritten context might contain bugs or not match the intended specification. A more robust approach is to specify the context in a dedicated specification language, and hold the analysis tools to support it properly. This may mean to put significant development efforts for enhancing the tools, something that is often not feasible if ever possible. This paper presents a way to systematically generate such a context from a formal specification of a C function. This is applied to a subset of the ACSL specification language in order to generate suitable contexts for the abstract interpretation-based value analysis plug-ins of Frama-C, a framework for analysis of code written in C. The idea here presented has been implemented in a new Frama-C plug-in which is currently in use in an operational industrial setting.

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

↑