The Right Kind of Non-Determinism: Using Concurrency to Verify C Programs with Underspecified Semantics

Eduard Kamburjan, Nathan Wasser
{"title":"The Right Kind of Non-Determinism: Using Concurrency to Verify C Programs with Underspecified Semantics","authors":"Eduard Kamburjan, Nathan Wasser","doi":"10.4204/EPTCS.365.1","DOIUrl":null,"url":null,"abstract":"We present a novel and well automatable approach to formal verification of C programs with underspecified semantics, i.e., a language semantics that leaves open the order of certain evaluations. First, we reduce this problem to non-determinism of concurrent systems, automatically extracting a distributed Active Object model from underspecified, sequential C code. This translation process provides a fully formal semantics for the considered C subset. In the extracted model every non-deterministic choice corresponds to one possible evaluation order. This step also automatically translates specifications in the ANSI/ISO C Specification Language (ACSL) into method contracts and object invariants for Active Objects. We then perform verification on the specified Active Objects model, using the Crowbar theorem prover, which verifies the extracted model with respect to the translated specification and ensures the original property of the C code for all possible evaluation orders. By using model extraction, we can use standard tools, without designing a new complex program logic to deal with underspecification. The case study used is highly underspecified and cannot be handled correctly by existing tools for C.","PeriodicalId":147821,"journal":{"name":"International Conference on Information and Computation Economies","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-08-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Conference on Information and Computation Economies","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.365.1","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1

Abstract

We present a novel and well automatable approach to formal verification of C programs with underspecified semantics, i.e., a language semantics that leaves open the order of certain evaluations. First, we reduce this problem to non-determinism of concurrent systems, automatically extracting a distributed Active Object model from underspecified, sequential C code. This translation process provides a fully formal semantics for the considered C subset. In the extracted model every non-deterministic choice corresponds to one possible evaluation order. This step also automatically translates specifications in the ANSI/ISO C Specification Language (ACSL) into method contracts and object invariants for Active Objects. We then perform verification on the specified Active Objects model, using the Crowbar theorem prover, which verifies the extracted model with respect to the translated specification and ensures the original property of the C code for all possible evaluation orders. By using model extraction, we can use standard tools, without designing a new complex program logic to deal with underspecification. The case study used is highly underspecified and cannot be handled correctly by existing tools for C.
正确的非确定性:使用并发性来验证具有未指定语义的C程序
我们提出了一种新颖的、自动化程度很高的方法来对具有未指定语义的C程序进行形式化验证,即,一种语言语义留下了某些求值的开放顺序。首先,我们将此问题简化为并发系统的非确定性,从未指定的顺序C代码中自动提取分布式活动对象模型。这个转换过程为所考虑的C子集提供了完全形式化的语义。在提取的模型中,每个非确定性选择对应于一个可能的评估顺序。此步骤还自动将ANSI/ISO C规范语言(ACSL)中的规范转换为活动对象的方法契约和对象不变量。然后,我们使用Crowbar定理证明器对指定的Active Objects模型执行验证,它根据翻译的规范验证提取的模型,并确保所有可能的求值顺序的C代码的原始属性。通过模型提取,我们可以使用标准的工具,而不需要设计一个新的复杂的程序逻辑来处理规范不足。所使用的案例研究高度不明确,现有的C语言工具无法正确处理。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信