Compiler verification meets cross-language linking via data abstraction

Abstract

Many real programs are written in multiple different programming languages, and supporting this pattern creates challenges for formal compiler verification. We describe our Coq verification of a compiler for a high-level language, such that the compiler correctness theorem allows us to derive partial-correctness Hoare-logic theorems for programs built by linking the assembly code output by our compiler and assembly code produced by other means. Our compiler supports such tricky features as storable cross-language function pointers, without giving up the usual benefits of being able to verify different compiler phases (including, in our case, two classic optimizations) independently. The key technical innovation is a mixed operational and axiomatic semantics for the source language, with a built-in notion of abstract data types , such that compiled code interfaces with other languages only through axiomatically specified methods that mutate encapsulated private data, represented in whatever formats are most natural for those languages.

Document Details

Document Type
Pub Defense Publication
Publication Date
Oct 15, 2014
Source ID
10.1145/2714064.2660201

Entities

People

  • Adam Chlipala
  • Peng Wang
  • Santiago Cuellar

Organizations

  • Defense Advanced Research Projects Agency
  • Division of Computing and Communication Foundations
  • Massachusetts Institute of Technology
  • Office of Advanced Scientific Computing Research
  • Princeton University

Tags

Fields of Study

  • Computer science

Readers

  • Computational Linguistics
  • Database Systems and Applications
  • Mathematical Modeling and Probability Theory.