Published August 22, 2021 | Version v2
Software Open

Modular, Compositional, and Executable Formal Semantics for LLVM IR

  • 1. Inria
  • 2. University of Pennsylvania
  • 3. Taras Shevchenko National University of Kyiv, Digamma.ai
  • 4. Digamma.ai

Description

This is the software artifact of "Modular, Compositional, and Executable Formal Semantics for LLVM IR".

The 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 deal 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 \ir programs
  generated by HELIX.

Files

README.md

Files (2.0 GB)

Name Size Download all
md5:ceeb641b65f5e36190bd302e4b79387d
10.3 kB Preview Download
md5:b5ba29f144fc5b4103af8c6e8594312a
2.0 GB Download
md5:8c5d7a5c053b84622df5909e54d48a02
911.1 kB Download