Modular, compositional, and executable formal semantics for LLVM IR

Author:

Zakowski Yannick1ORCID,Beck Calvin2ORCID,Yoon Irene2ORCID,Zaichuk Ilia3ORCID,Zaliva Vadim4ORCID,Zdancewic Steve2ORCID

Affiliation:

1. Inria, France

2. University of Pennsylvania, USA

3. Taras Shevchenko National University of Kyiv, Ukraine

4. Carnegie Mellon University, USA / Digamma.ai, USA

Abstract

This paper presents a novel formal semantics, mechanized in Coq, for a large, sequential subset of the LLVM IR. In contrast to previous approaches, which use relationally-specified operational semantics, this new semantics is based on monadic interpretation of interaction trees, a structure that provides a more compositional approach to defining language semantics while retaining the ability to extract an executable interpreter. Our semantics handles many of the LLVM IR's non-trivial language features and is constructed modularly in terms of event handlers, including those that deal with nondeterminism in the specification. We show how this semantics admits compositional reasoning principles derived from the interaction trees equational theory of weak bisimulation, which we extend here to better deal with nondeterminism, and we use them to prove that the extracted reference interpreter faithfully refines the semantic model. We validate the correctness of the semantics by evaluating it on unit tests and LLVM IR programs generated by HELIX.

Funder

ONR

NSF

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Cited by 15 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. A Two-Phase Infinite/Finite Low-Level Memory Model: Reconciling Integer–Pointer Casts, Finite Space, and undef at the LLVM IR Level of Abstraction;Proceedings of the ACM on Programming Languages;2024-08-15

2. Securing Verified IO Programs Against Unverified Code in F*;Proceedings of the ACM on Programming Languages;2024-01-05

3. Modular Denotational Semantics for Effects with Guarded Interaction Trees;Proceedings of the ACM on Programming Languages;2024-01-05

4. First Steps towards Deductive Verification of LLVM IR;Lecture Notes in Computer Science;2024

5. Q# as a Quantum Algorithmic Language;Electronic Proceedings in Theoretical Computer Science;2023-11-16

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3