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

在C++验证中使用现成的异常支持组件

Using Off-the-Shelf Exception Support Components in C++ Verification

Vladimír Štill, Petr Ročkai, Jiří Barnat

摘要:

在软件开发中采用形式化方法的重要一步是支持主流程序设计语言。不幸的是,这些语言通常相当复杂,并且带有大量的标准库。然而,通过选择合适的中间语言,大部分复杂性可以委托给现有的面向执行(而不是面向验证)的编译器前端和标准库实现。在本文中,我们描述了如何支持C++异常可以利用相同的原则。我们的工作是基于DiVM,LLVM派生的,验证友好的中间语言。我们的实现包括两个部分:一个是libunwind平台API的实现,它链接到被测程序,由9个C函数组成。另一部分是LLVM位代码的预处理器,它准备与异常相关的元数据并替换相关的专用LLVM指令。

英文摘要:

An important step toward adoption of formal methods in software development is support for mainstream programming languages. Unfortunately, these languages are often rather complex and come with substantial standard libraries. However, by choosing a suitable intermediate language, most of the complexity can be delegated to existing execution-oriented (as opposed to verification-oriented) compiler frontends and standard library implementations. In this paper, we describe how support for C++ exceptions can take advantage of the same principle. Our work is based on DiVM, an LLVM-derived, verification-friendly intermediate language. Our implementation consists of 2 parts: an implementation of the `libunwind` platform API which is linked to the program under test and consists of 9 C functions. The other part is a preprocessor for LLVM bitcode which prepares exception-related metadata and replaces associated special-purpose LLVM instructions.

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

↑