arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv cs/0703116cs.PLcs.LO
收藏

现代命令式语言通用静态分析器的设计

On the Design of Generic Static Analyzers for Modern Imperative Languages

Roberto Bagnara, Patricia M. Hill, Andrea Pescetti, Enea Zaffanella

摘要:

为现代命令式语言(如C、C++、Java和Python)的重要片段设计和实现精确的静态分析器是一个具有挑战性的问题。在本文中,我们考虑一个核心的命令式语言,有几个功能,如包括递归函数,运行时系统和用户定义的异常,以及一个现实的数据和内存模型中发现的主流语言。对于这种语言,我们提供了一个具体的语义-表征有限和无限的计算-和一个通用的抽象语义,我们证明声音相对于具体的。我们说抽象语义是通用的,因为它被设计为在分析域上完全参数化:特别地,它提供了对\emph{relational}域的支持(即,可以捕获不同数据对象之间的关系的抽象域)。我们还勾画了如何提出的方法可以扩展到适应一个更大的语言,包括指针,复合数据对象和非结构化的控制流机制。该方法基于结构化的大步骤$\mathrm{G}^\infty\mathrm{SOS}$操作语义和抽象解释,是模块化的,因为整个静态分析器被自然地划分为具有明确标识的职责和接口的组件,这大大简化了正确性证明和实现。

英文摘要:

The design and implementation of precise static analyzers for significant fragments of modern imperative languages like C, C++, Java and Python is a challenging problem. In this paper, we consider a core imperative language that has several features found in mainstream languages such as those including recursive functions, run-time system and user-defined exceptions, and a realistic data and memory model. For this language we provide a concrete semantics --characterizing both finite and infinite computations-- and a generic abstract semantics that we prove sound with respect to the concrete one. We say the abstract semantics is generic since it is designed to be completely parametric on the analysis domains: in particular, it provides support for \emph{relational} domains (i.e., abstract domains that can capture the relationships between different data objects). We also sketch how the proposed methodology can be extended to accommodate a larger language that includes pointers, compound data objects and non-structured control flow mechanisms. The approach, which is based on structured, big-step $\mathrm{G}^\infty\mathrm{SOS}$ operational semantics and on abstract interpretation, is modular in that the overall static analyzer is naturally partitioned into components with clearly identified responsibilities and interfaces, something that greatly simplifies both the proof of correctness and the implementation.

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

↑