ACM Home Page
Please provide us with feedback. Feedback
A verified staged interpreter is a verified compiler
Full text PdfPdf (210 KB)
Source Generative Programming And Component Engineering archive
Proceedings of the 5th international conference on Generative programming and component engineering table of contents
Portland, Oregon, USA
SESSION: Safety and verification table of contents
Pages: 111 - 120  
Year of Publication: 2006
ISBN:1-59593-237-2
Authors
Edwin Brady  University of St Andrews, St Andrews, Scotland
Kevin Hammond  University of St Andrews, St Andrews, Scotland
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 40,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1173706.1173724
What is a DOI?

ABSTRACT

Dependent types and multi-stage programming have both been used, separately, in programming language design and implementation. Each technique has its own advantages --- with dependent types, we can verify aspects of interpreters and compilers such as type safety and stack invariants. Multi-stage programming, on the other hand, can give the implementor access to underlying compiler technology; a staged interpreter is a translator. In this paper, we investigate the combination of these techniques. We implement an interpreter for a simply typed lambda calculus, using dependent types to guarantee correctness properties by construction. We give explicit proofs of these correctness properties, then add staging annotations to generate a translator from the interpreter. In this way, we have constructed a verified compiler from a verified staged interpreter. We illustrate the application of the technique by considering a simple staged interpreter that provides guarantees for some simple resource bound properties, as might be found in a domain specific language for real-time embedded systems.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
T. Altenkirch. Stop thinking about bottoms when writing programs, 2006. Talk at BCTCS 2006.
 
2
T. Altenkirch, C. McBride, and J. McKinna. Why dependent types matter. http://www.cs.nott.ac.uk/~txa/publ/ydtm.pdf, 2005. Draft.
3
 
4
L. Augustsson and M. Carlsson. An exercise in dependent types: A well-typed interpreter. http://www.cs.chalmers.se/~augustss/cayenne/, 1999.
 
5
U. Berger and H. Schwichtenberg. An inverse of the evaluation functional for typed λ-calculus. In R. Vemuri, editor,Proc. 1991 IEEE Symp. on Logic in Comp. Sci., pages 203--211, 1991.
 
6
E. Brady. Practical Implementation of a Dependently Typed Functional Programming Language. PhD thesis, University of Durham, 2005.
 
7
E. Brady and K. Hammond. A dependently typed framework for static analysis of program execution costs. In Proc. Implementation of Functional Languages (IFL 2005). Springer, 2006.
 
8
L. Cardelli. Phase distinctions in type theory. Manuscript, 1988.
 
9
Coq Development Team. The Coq proof assistant --- reference manual. http://coq.inria.fr/+, 2001.
 
10
H. B. Curry and R. Feys. Combinatory Logic, volume 1. North Holland, 1958.
 
11
K. Czarnecki, J. O'Donnell, J. Striegnitz, and W. Taha. DSL implementation in MetaOCaml, Template Haskell, and C++. InDomain Specific Program Genearation 2004, volume 3016 of LNCS. Springer, 2004.
 
12
P. Dybjer. Inductive families. Formal Aspects of Computing, 6(4):440--465, 1994.
 
13
J. Eckhardt, R. Kaibachev, E. Pašalíc, K. Swadi, and W. Taha. Implicitly heterogeneous multi-stage programming. In Proc. 2005 Conf. on Generative Programming and Component Engineering (GPCE 2005), volume 3676 ofLNCS. Springer, 2005.
 
14
15
 
16
 
17
 
18
W. A. Howard. The formulae-as-types notion of construction. In J. P. Seldin and J. R. Hindley, editors,To H.B.Curry: Essays on combinatory logic, lambda calculus and formalism. Academic Press, 1980. A reprint of an unpublished manuscript from 1969.
 
19
G. Hutton and J. Wright. Compiling exceptions correctly. InMathematics of Program Construction, volume 3125 of LNCS. Springer, 2004.
20
21
 
22
 
23
C. McBride. Dependently Typed Functional Programs and their proofs. PhD thesis, University of Edinburgh, May 2000.
 
24
C. McBride. Epigram: Practical programming with dependent types. Lecture Notes, International Summer School on Advanced Functional Programming, 2004.
 
25
26
 
27
J. McKinna and J. Wright. A type-correct, stack-safe, provably correct expression compiler in Epigram. Journal of Functional Programming, 2006. To appear.
 
28
MetaOCaml: A compiled, type-safe multi-stage programming language. Available online from http://www.cs.rice.edu/~taha/MetaOCaml/, 2001.
 
29
E. Pašalíc. The Role of Type-Equality in Meta-programming. PhD thesis, OGI School of Science and Engineering, 2004.
30
31
 
32
 
33
W. Taha. A gentle introduction to multi-stage programming, 2003. Available from http://www.cs.rice.edu/~taha/publications/journal/dspg04a.pdf.
 
34
W. Taha, S. Ellner, and H. Xi. Generating heap-bounded programs in a functional setting. InThird International Conference on Embedded Software, volume 2855 ofLNCS. Springer, 2003.
35
 
36
T. Uustalu. Partiality is an effect, 2004. Talk at Dagstuhl workshop on Dependently Typed Progamming.

Collaborative Colleagues:
Edwin Brady: colleagues
Kevin Hammond: colleagues