Certifying Compilation and Run-Time Code Generation

  • Authors:
  • Luke Hornof;Trevor Jim

  • Affiliations:
  • Computer and Information Science Department, University of Pennsylvania, Philadelphia, PA 19104, USA. hornof@cis.upenn.edu;Computer and Information Science Department, University of Pennsylvania, Philadelphia, PA 19104, USA. tjim@cis.upenn.edu

  • Venue:
  • Higher-Order and Symbolic Computation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

A certifying compiler takes a source language program and producesobject code, as well as a “certificate” that can be used to verifythat the object code satisfies desirable properties, such as typesafety and memory safety. Certifying compilation helps to increaseboth compiler robustness and program safety. Compiler robustness isimproved since some compiler errors can be caught by checking theobject code against the certificate immediately after compilation.Program safety is improved because the object code and certificatealone are sufficient to establish safety: even if the object code andcertificate are produced on an unknown machine by an unknown compilerand sent over an untrusted network, safe execution is guaranteed aslong as the code and certificate pass the verifier.Existing work in certifying compilation has addressed staticallygenerated code. In this paper, we extend this to code generated atrun time. Our goal is to combine certifying compilation with run-timecode generation to produce programs that are both fast and verifiablysafe. To achieve this goal, we present two new languages withexplicit run-time code generation constructs: Cyclone, a type safedialect of C, and TAL/T, a type safe assembly language. We havedesigned and implemented a system that translates a safe C programinto Cyclone, which is then compiled to TAL/T, and finally assembledinto executable object code. This paper focuses on our overallapproach and the front end of our system; details about TAL/T willappear in a subsequent paper.