Simulation and formal verification of x86 machine-code programs that make system calls

Shilpi Goel, W. Hunt, Matt Kaufmann, Soumava Ghosh
{"title":"Simulation and formal verification of x86 machine-code programs that make system calls","authors":"Shilpi Goel, W. Hunt, Matt Kaufmann, Soumava Ghosh","doi":"10.1109/FMCAD.2014.6987600","DOIUrl":null,"url":null,"abstract":"We present an approach to modeling and verifying machine-code programs that exhibit non-determinism. Specifically, we add support for system calls to our formal, executable model of the user-level x86 instruction-set architecture (ISA). The resulting model, implemented in the ACL2 theorem-proving system, allows both formal analysis and efficient simulation of x86 machine-code programs; the logical mode characterizes an external environment to support reasoning about programs that interact with an operating system, and the execution mode directly queries the underlying operating system to support simulation. The execution mode of our x86 model is validated against both its logical mode and the real machine, providing test-based assurance that our model faithfully represents the semantics of an actual x86 processor. Our framework is the first that enables mechanical proofs of functional correctness of user-level x86 machine-code programs that make system calls. We demonstrate the capabilities of our model with the mechanical verification of a machine-code program, produced by the GCC compiler, that computes the number of characters, lines, and words in an input stream. Such reasoning is facilitated by our libraries of ACL2 lemmas that allow automated proofs of a program's memory-related properties.","PeriodicalId":363683,"journal":{"name":"2014 Formal Methods in Computer-Aided Design (FMCAD)","volume":"76 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-10-21","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"44","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2014 Formal Methods in Computer-Aided Design (FMCAD)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/FMCAD.2014.6987600","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 44

Abstract

We present an approach to modeling and verifying machine-code programs that exhibit non-determinism. Specifically, we add support for system calls to our formal, executable model of the user-level x86 instruction-set architecture (ISA). The resulting model, implemented in the ACL2 theorem-proving system, allows both formal analysis and efficient simulation of x86 machine-code programs; the logical mode characterizes an external environment to support reasoning about programs that interact with an operating system, and the execution mode directly queries the underlying operating system to support simulation. The execution mode of our x86 model is validated against both its logical mode and the real machine, providing test-based assurance that our model faithfully represents the semantics of an actual x86 processor. Our framework is the first that enables mechanical proofs of functional correctness of user-level x86 machine-code programs that make system calls. We demonstrate the capabilities of our model with the mechanical verification of a machine-code program, produced by the GCC compiler, that computes the number of characters, lines, and words in an input stream. Such reasoning is facilitated by our libraries of ACL2 lemmas that allow automated proofs of a program's memory-related properties.
进行系统调用的x86机器码程序的仿真和形式化验证
我们提出了一种方法来建模和验证表现出非确定性的机器码程序。具体来说,我们将对系统调用的支持添加到正式的、可执行的用户级x86指令集体系结构(ISA)模型中。在ACL2定理证明系统中实现的结果模型允许对x86机器码程序进行形式化分析和高效仿真;逻辑模式表征外部环境,以支持对与操作系统交互的程序进行推理;执行模式直接查询底层操作系统,以支持仿真。我们的x86模型的执行模式根据其逻辑模式和实际机器进行验证,从而提供基于测试的保证,我们的模型忠实地表示实际x86处理器的语义。我们的框架是第一个能够对进行系统调用的用户级x86机器码程序的功能正确性进行机械证明的框架。我们通过GCC编译器生成的机器代码程序的机械验证来演示模型的功能,该程序计算输入流中的字符、行和单词的数量。我们的ACL2引理库促进了这种推理,它允许自动证明程序的内存相关属性。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信