|
ABSTRACT
Compile-time meta-programming allows programs to be constructed by the user at compile-time. Although LISP derived languages have long had such facilities, few modern languages are capable of compile-time meta-programming, and of those that do many of the most powerful are statically typed functional languages. In this paper I present the dynamically typed object orientated language Converge which allows compile-time meta-programming in the spirit of Template Haskell. Converge demonstrates that integrating powerful, safe compile-time meta-programming features into a dynamic language requires few restrictions to the flexible development style facilitated by the paradigm. In this paper I detail Converge's compile-time meta-programming facilities, much of which is adapted from Template Haskell, contain several features new to the paradigm. Finally I explain how such a facility might be integrated into similar languages.
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 and L. Cardelli. A Theory of Objects. Springer, 1996.
|
| |
2
|
J. Bachrach and K. Playford. D-expressions: Lisp power, Dylan style, 1999. http://www.ai.mit.edu/people/jrb/Projects/dexprs.pdf Accessed Sep 22 2004.
|
| |
3
|
J. Bachrach and K. Playford. The Java syntactic extender (JSE). In Proc. OOPSLA, pages 31--42, November 2001.
|
| |
4
|
J. Baker and W. C. Hsieh. Maya: multiple-dispatch syntax extension in Java. In Proc. ACM SIGPLAN Conference on Programming language design and implementation, pages 270--281, 2002.
|
| |
5
|
A. Bawden. Quasiquotation in LISP. Workshop on Partial Evaluation and Semantics-Based Program Manipulation, January 1999.
|
| |
6
|
C. Brabrand and M. Schwartzbach. Growing languages with metamorphic syntax macros. In Workshop on Partial Evaluation and Semantics-Based Program Manipulation, SIGPLAN. ACM, 2000.
|
| |
7
|
M. Bravenboer and E. Visser. Concrete syntax for objects. Domain-specific language embedding and assimilation without restrictions. In D. C. Schmidt, editor, Proc. OOPSLA'04, Vancouver, Canada, October 2004. ACM SIGPLAN.
|
| |
8
|
J.-P. Briot and P. Cointe. Programming with explicit metaclasses in Smalltalk-80. In Proc. OOPSLA '89, October 1989.
|
| |
9
|
L. Cardelli, F. Matthes, and M. Abadi. Extensible grammars for language specialization. In Proc. Fourth International Workshop on Database Programming Languages - Object Models and Languages, pages 11--31, August 1993.
|
| |
10
|
P. Cointe. Metaclasses are first class: the ObjVLisp model. In Object Oriented Programming Systems Languages and Applications, pages 156--162, October 1987.
|
| |
11
|
K. Czarnecki, J. O'Donnell, J. Striegnitz, and W. Taha. DSL implementation in MetaOCaml, Template Haskell, and C++. 3016:50--71, 2004.
|
| |
12
|
D. de Rauglaudre. Camlp4 - Reference Manual, September 2003. http://caml.inria.fr/camlp4/manual/ Accessed Sep 22 2004.
|
| |
13
|
F.-N. Demers and J. Malenfant. Reflection in logic, functional and object-oriented programming: a short comparative study. In Proc. IJCAI'95 Workshop on Reflection and Metalevel Architectures and Their Applications in AI, pages 29--38, August 1995.
|
| |
14
|
R. K. Dybvig, R. Hieb, and C. Bruggeman. Syntactic abstraction in scheme. In Lisp and Symbolic Computation, volume 5, pages 295--326, December 1992.
|
| |
15
|
M. D. Ernst, G. J. Badros, and D. Notkin. An empirical analysis of C preprocessor use. IEEE Transactions on Software Engineering, 2002.
|
| |
16
|
S. E. Ganz, A. Sabry, and W. Taha. Macros as multi-stage computations: Type-safe, generative, binding macros in macroml. In Proc. International Conference on Functional Programming (ICFP), volume 36 of SIGPLAN. ACM, September 2001.
|
| |
17
|
R. Glück and J. Jrgensen. Multi-level specialization. volume 1706 of LNCS, pages 326 -- 337, 1998.
|
| |
18
|
A. Goldberg and D. Robson. Smalltalk-80: The Language. Addison-Wesley, January 1989.
|
| |
19
|
R. E. Griswold and M. T. Griswold. The Icon Programming Language. Peer-to-Peer Communications, third edition, 1996.
|
| |
20
|
R. Kelsey, W. Clinger, and J. Rees. Revised(5) report on the algorithmic language Scheme. Higher-Order and Symbolic Computation, 11(1):7--105, 1998.
|
| |
21
|
G. Kiczales, J. des Rivieres, and D. G. Bobrow. The Art of the Metaobject Protocol. MIT Press, 1991.
|
| |
22
|
E. Kohlbecker, D. P. Friedman, M. Felleisen, and B. Duba. Hygienic macro expansion. In Symposium on Lisp and Functional Programming, pages 151--161. ACM, 1986.
|
| |
23
|
J. K. Ousterhout. Scripting: Higher-level programming for the 21st century. Computer, 31(3):23--30, 1998.
|
| |
24
|
L. Prechelt. An empirical comparison of seven programming languages. Computer, 33(10):23--29, 2000.
|
| |
25
|
C. Queinnec. Macroexpansion reflective tower. In Proc. Reflection'96, pages 93--104, April 1996.
|
| |
26
|
S. Seefried, M. M. T. Chakravarty, and G. Keller. Optimising embedded DSLs using Template Haskell. In Draft Proc. Implementation of Functional Languages, 2003.
|
| |
27
|
T. Sheard, Z. el Abidine Benaissa, and E. Pasalic. DSL implementation using staging and monads. In Proc. 2nd conference on Domain Specific Languages, volume 35 of SIGPLAN, pages 81--94. ACM, October 1999.
|
| |
28
|
T. Sheard and S. P. Jones. Template meta-programming for Haskell. In Proceedings of the Haskell workshop 2002. ACM, 2002.
|
| |
29
|
K. Skalski, M. Moskal, and P. Olszta. Meta-programming in Nemerle, 2004. http://nemerle.org/metaprogramming.pdf Accessed Oct 1 2004.
|
| |
30
|
G. L. Steele, Jr. Growing a language. Higher-Order and Symbolic Computation, 12(3):221 -- 236, October 1999.
|
| |
31
|
W. Taha. Multi-Stage Programming: Its Theory and Applications. PhD thesis, Oregon Graduate Institute of Science and Technology, October 1999.
|
| |
32
|
D. Thomas and A. Hunt. Programming Ruby: A Pragmatic Programmer's Guide. Addison-Wesley, 2000.
|
| |
33
|
L. Tratt. Converge Reference Manual, September 2004. http://www.convergepl.org/documentation/refmanual/ Accessed Sep 23 2004.
|
| |
34
|
L. Tratt. Model transformations and tool integration. Journal of Software and Systems Modelling, 4(2):112--122, May 2005.
|
| |
35
|
G. van Rossum. Python 2.3 reference manual, 2003. http://www.python.org/doc/2.3/ref/ref.html Accessed Aug 31 2005.
|
| |
36
|
T. Veldhuizen. Using C++ template metaprograms. C++ Report, 7(4):36--43, May 1995.
|
| |
37
|
D. Weise and R. Crew. Programmable syntax macros. In Proc. SIGPLAN, pages 156--165, 1993.
|
|