|
ABSTRACT
This paper proposes and develops the basic theory for a new approach to typing multi-stage languages based a notion of environment classifiers. This approach involves explicit but lightweight tracking -- at type-checking time -- of the origination environment for future-stage computations. Classification is less restrictive than the previously proposed notions of closedness, and allows for both a more expressive typing of the "run" construct and for a unifying account of typed multi-stage programmin.The proposed approach to typing requires making cross-stage persistence (CSP) explicit in the language. At the same time, it offers concrete new insights into the notion of levels and in turn into CSP itself. Type safety is established in the simply-typed setting. As a first step toward introducing classifiers to the Hindley-Milner setting, we propose an approach to integrating the two, and prove type preservation in this setting.
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
|
|
 |
2
|
Joel Auslander , Matthai Philipose , Craig Chambers , Susan J. Eggers , Brian N. Bershad, Fast, effective dynamic compilation, Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, p.149-159, May 21-24, 1996, Philadelphia, Pennsylvania, United States
|
| |
3
|
|
| |
4
|
Zine-El-Abidine Benaissa, Daniel Briaud, Pierre Lescanne, and Jocelyne Rouyer-Degli. λv, a calculus of explicit substitutions which preserves strong normalisation. Journal of Functional Programming, 6(5):699--722, 1996.
|
| |
5
|
Zine El-Abidine Benaissa, Eugenio Moggi, Walid Taha, and Tim Sheard. Logical modalities and multi-stage programming. In Federated Logic Conference (FLoC) Satellite Workshop on Intuitionistic Modal Logics and Applications (IMLA), 1999.
|
| |
6
|
|
| |
7
|
|
| |
8
|
|
 |
9
|
|
 |
10
|
|
 |
11
|
Charles Consel , Calton Pu , Jonathan Walpole, Incremental partial evaluation: the key to high performance, modularity and portability in operating systems, Proceedings of the 1993 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, p.44-46, June 14-16, 1993, Copenhagen, Denmark
[doi> 10.1145/154630.154635]
|
 |
12
|
|
| |
13
|
Olivier Danvy, Karoline Malmkjaer, and Jens Palsberg. Eta-expansion does the trick. Technical Report RS-95-41, University of Aarhus, Aarhus, 1995.
|
| |
14
|
|
 |
15
|
|
 |
16
|
|
 |
17
|
Dawson R. Engler, VCODE: a retargetable, extensible, very fast dynamic code generation system, Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, p.160-170, May 21-24, 1996, Philadelphia, Pennsylvania, United States
|
 |
18
|
Dawson R. Engler , Wilson C. Hsieh , M. Frans Kaashoek, C: a language for high-level, efficient, and machine-independent dynamic code generation, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.131-144, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237765]
|
| |
19
|
|
| |
20
|
Yoshihiko Futamura. Partial evaluation of computation process -- an approach to a compiler-compiler. Systems, Computers and Control, 2(5):45--50, 1971. {Via {33}}.
|
 |
21
|
Steven E. Ganz , Amr Sabry , Walid Taha, Macros as multi-stage computations: type-safe, generative, binding macros in MacroML, Proceedings of the sixth ACM SIGPLAN international conference on Functional programming, September 03-05, 2001, Florence, Italy
|
| |
22
|
|
| |
23
|
|
| |
24
|
|
| |
25
|
|
 |
26
|
|
| |
27
|
Carsten K. Gomard and Neil D. Jones. A partial evaluator for untyped lambda calculus. Journal of Functional Programming, 1(1):21--69, 1991.
|
 |
28
|
Brian Grant , Markus Mock , Matthai Philipose , Craig Chambers , Susan J. Eggers, Annotation-directed run-time specialization in C, Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, p.163-178, June 12-13, 1997, Amsterdam, The Netherlands
|
 |
29
|
Brian Grant , Matthai Philipose , Markus Mock , Craig Chambers , Susan J. Eggers, An evaluation of staged run-time optimizations in DyC, Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation, p.293-304, May 01-04, 1999, Atlanta, Georgia, United States
|
| |
30
|
|
| |
31
|
|
| |
32
|
|
 |
33
|
|
| |
34
|
|
| |
35
|
|
| |
36
|
|
| |
37
|
|
 |
38
|
Jeffrey R. Lewis , John Launchbury , Erik Meijer , Mark B. Shields, Implicit parameters: dynamic scoping with static types, Proceedings of the 27th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.108-118, January 19-21, 2000, Boston, MA, USA
[doi> 10.1145/325694.325708]
|
| |
39
|
MetaOCaml: A compiled, type-safe multi-stage programming language. Available online from http://cs-www.cs.yale.edu/homes/taha/MetaOCaml/, 2001.
|
| |
40
|
|
| |
41
|
|
| |
42
|
|
 |
43
|
|
 |
44
|
|
| |
45
|
|
| |
46
|
Flemming Nielson. A formal type system for comparing partial evaluators. In D Bjírner, Ershov, and Jones, editors, Proceedings of the workshop on Partial Evaluation and Mixed Computation (1987), pages 349--384. North-Holland, 1988.
|
| |
47
|
|
| |
48
|
|
| |
49
|
|
 |
50
|
|
 |
51
|
|
| |
52
|
|
| |
53
|
Oregon Graduate Institute Technical Reports. P.O. Box 91000, Portland, OR 97291-1000,USA. Available online from ftp://cse.ogi.edu/pub/tech-reports/README.html. Last viewed August 1999.
|
 |
54
|
Emir PašaliΕ , Walid Taha , Tim Sheard, Tagless staged interpreters for typed languages, Proceedings of the seventh ACM SIGPLAN international conference on Functional programming, p.218-229, October 04-06, 2002, Pittsburgh, PA, USA
|
| |
55
|
|
| |
56
|
|
| |
57
|
Claudio Russo. Types for Modules. PhD thesis, Edinburgh University, 1998.
|
 |
58
|
Mark Shields , Tim Sheard , Simon Peyton Jones, Dynamic typing as staged type inference, Proceedings of the 25th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.289-302, January 19-21, 1998, San Diego, California, United States
[doi> 10.1145/268946.268970]
|
| |
59
|
Yannis Smaragdakis and Don Batory. DiSTiL: A transformation library for data structures. In USENIX Conference on Domain-Specific Languages, 1997.
|
| |
60
|
|
| |
61
|
|
 |
62
|
|
| |
63
|
|
 |
64
|
|
 |
65
|
|
| |
66
|
Mitchell Wand. Complete type inference for simple objects. In Second Annual IEEE Symp. on Logic in Computer Science, 1987.
|
| |
67
|
|
CITED BY 21
|
|
Cristiano Calcagno , Walid Taha , Liwen Huang , Xavier Leroy, Implementing multi-stage languages using ASTs, Gensym, and reflection, Proceedings of the second international conference on Generative programming and component engineering, p.57-76, September 22-25, 2003, Erfurt, Germany
|
|
|
|
|
|
|
|
|
Miguel Guerrero , Edward Pizzi , Robert Rosenbaum , Kedar Swadi , Walid Taha, Implementing DSLs in metaOCaml, Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 24-28, 2004, Vancouver, BC, CANADA
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Albert Cohen , Sébastien Donadio , Maria-Jesus Garzaran , Christoph Herrmann , Oleg Kiselyov , David Padua, In search of a program generator to implement generic transformations for high-performance computing, Science of Computer Programming, v.62 n.1, p.25-46, September 2006
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|