Affiliation:
1. Portland State University, Portland, OR, USA
Abstract
We describe the design, implementation, and use of a machine-certified framework for correct compilation and execution of programs in garbage-collected languages. Our framework extends Leroy's Coq-certified Compcert compiler and Cminor intermediate language. We add: (i) a new intermediate language, GCminor, that includes primitives for allocating memory in a garbage-collected heap and for specifying GC roots; (ii) a precise, low-level specification for a Cminor library for garbage collection; and (iii) a proven semantics-preserving translation from GCminor to Cminor plus the GC library. GCminor neatly encapsulates the interface between mutator and collector code, while remaining simple and flexible enough to be used with a wide variety of source languages and collector styles. Front ends targeting GCminor can be implemented using any compiler technology and any desired degree of verification, including full semantics preservation, type preservation, or informal trust.
As an example application of our framework, we describe a compiler for Haskell that translates the Glasgow Haskell Compiler's Core intermediate language to GCminor. To support a simple but useful memory safety argument for this compiler, the front end uses a novel combination of type preservation and runtime checks, which is of independent interest.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Reference37 articles.
1. }}H. Abelson and G. J. Sussman. Structure and Interpretation of Computer Programs. The MIT Press FIrst edition 1985. }}H. Abelson and G. J. Sussman. Structure and Interpretation of Computer Programs. The MIT Press FIrst edition 1985.
2. }}ADT Coq. The Coq proof assistant. http://coq.inria.fr. }}ADT Coq. The Coq proof assistant. http://coq.inria.fr.
3. LNCS;Appel A. W.,2007
4. Continuation-passing, closure-passing style
5. Code optimizations for lazy evaluation
Cited by
6 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献