ACM Home Page
Please provide us with feedback. Feedback
Implementing typeful program transformations
Full text PdfPdf (207 KB)
Source ACM/SIGPLAN Workshop Partial Evaluation and Semantics-Based Program Manipulation archive
Proceedings of the 2003 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation table of contents
San Diego, California, USA
Pages: 20 - 28  
Year of Publication: 2003
ISBN:1-58113-667-6
Also published in ...
Authors
Chiyan Chen  Boston University
Hongwei Xi  Boston University
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 1,   Downloads (12 Months): 15,   Citation Count: 8
Additional Information:

abstract   references   cited by   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/777388.777392
What is a DOI?

ABSTRACT

The notion of program transformation is ubiquitous in programming language studies on interpreters, compilers, partial evaluators, etc. In order to implement a program transformation, we need to choose a representation in the meta language, that is, the programming language in which we construct programs, for representing object programs, that is, the programs in the object language on which the program transformation is to be performed. In practice, most representations chosen for typed object programs are typeless in the sense that the type of an object program cannot be reflected in the type of its representation. This is unsatisfactory as such typeless representations make it impossible to capture in the type system of the meta language various invariants in a program transformation that are related to the types of object programs. In this paper, we propose an approach to implementing program transformations that makes use of a first-order typeful program representation formed in Dependent ML (DML), where the type of an object program as well as the types of the free variables in the object program can be reflected in the type of the representation of the object program. We introduce some programming techniques needed to handle this typeful program representation, and then present an implementation of a CPS transform function where the relation between the type of an object program and that of its CPS transform is captured in the type system of DML. In a broader context, we claim to have taken a solid step along the line of research on constructing certifying compilers.


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
M. Abadi, L. Cardelli, Curien, P.-L., and Lévy, J.-J. Explicit substitutions. Journal of Functional Programming, 1(4):375--416, 1991.
2
 
3
L. Augustsson and M. Carlsson. An excercise in dependent types: A well-typed interpreter, 1999. Available as http://www.cs.chalmers.se/˜augustss/cayenne/interp.ps
4
 
5
 
6
N. G. de Bruijn. Lambda calculus notation with nameless dummies. Indagationes mathematicae, 34:381--392, 1972.
7
8
 
9
 
10
11
12
13
 
14
S. Peyton Jones et al. Haskell 98 -- A non-strict, purely functional language. Available at http://www.haskell.org/onlinereport/, Feb. 1999.
15
 
16
G. D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1(2):125--159, December 1975.
 
17
18
 
19
 
20
H. Xi. Dependent ML. Available at http://www.cs.bu.edu/˜hwxi/DML/DML.html, 2001.
21

CITED BY  9