Skip to main navigation Skip to search Skip to main content

Formalizing the LLVM intermediate representation for verified program transformations

Research output: Contribution to journal › Article › peer-review

Abstract

This paper presents Vellvm (verified LLVM), a framework for reasoning about programs expressed in LLVM's intermediate representation and transformations that operate on it. Vellvm provides a mechanized formal semantics of LLVM's intermediate representation, its type system, and properties of its SSA form. The framework is built using the Coq interactive theorem prover. It includes multiple operational semantics and proves relations among them to facilitate different reasoning styles and proof techniques. To validate Vellvm's design, we extract an interpreter from the Coq formal semantics that can execute programs from LLVM test suite and thus be compared against LLVM reference implementations. To demonstrate Vellvm's practicality, we formalize and verify a previously proposed transformation that hardens C programs against spatial memory safety violations. Vellvm's tools allow us to extract a new, verified implementation of the transformation pass that plugs into the real LLVM infrastructure; its performance is competitive with the non-verified, ad-hoc original.

Original languageEnglish (US)
Pages (from-to)427-439
Number of pages13
JournalACM SIGPLAN Notices
Volume47
Issue number1
DOIs
StatePublished - Jan 2012

ASJC Scopus subject areas

  • General Computer Science

Keywords

  • Coq
  • LLVM
  • Memory safety

Fingerprint

Dive into the research topics of 'Formalizing the LLVM intermediate representation for verified program transformations'. Together they form a unique fingerprint.

Cite this