Abstract
Domain specific languages (DSLs) are mini-languages that are increasingly seen as being a valuable tool for software developers and non-developers alike. DSLs must currently be created in an ad-hoc fashion, often leading to high development costs and implementations of variable quality. In this article, I show how expressive DSLs can be hygienically embedded in the Converge programming language using its compile-time meta-programming facility, the concept of DSL blocks, and specialised error reporting techniques. By making use of pre-existing facilities, and following a simple methodology, DSL implementation costs can be significantly reduced whilst leading to higher quality DSL implementations.
- Abadi, M. and Cardelli, L. 1996. A Theory of Objects. Springer-Verlag, New York. Google Scholar
Digital Library
- Aycock, J. and Horspool, R. N. 2002. Practical Earley parsing. The Computer Journal 45, 6, 620--630.Google Scholar
Cross Ref
- Bachrach, J. and Playford, K. 1999. D-expressions: Lisp power, Dylan style. http://www.ai.mit.edu/people/jrb/Projects/dexprs.pdf Accessed Nov 22 2006.Google Scholar
- Bachrach, J. and Playford, K. 2001. The Java syntactic extender (JSE). In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'99) (Denver, CO). ACM, New York, 31--42. Google Scholar
Digital Library
- Brabrand, C. and Schwartzbach, M. 2000. Growing languages with metamorphic syntax macros. In Proceedings of the Workshop on Partial Evaluation and Semantics-Based Program Manipulation. SIGPLAN. ACM, New York. Google Scholar
Digital Library
- Bravenboer, M. and Visser, E. 2004. Concrete syntax for objects. Domain-specific language embedding and assimilation without restrictions. In Proceedings of the 19th Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'04) (Vancouver, BC, Canada). ACM, New York. Google Scholar
Digital Library
- Cointe, P. 1987. Metaclasses are first class: The ObjVLisp model. In Proceedings of the ACM Conference on Object-Oriented Programming Systems Languages and Applications (OOPSLA'87). ACM, New York, 156--162. Google Scholar
Digital Library
- Cordy, J. R. 2004. TXL—A language for programming language tools and applications. In Proceedings of the ACM 4th International Workshop on Language Descriptions, Tools and Applications. ACM, New York. Google Scholar
Digital Library
- Czarnecki, K., O'Donnell, J., Striegnitz, J., and Taha, W. 2004. DSL implementation in MetaOCaml, Template Haskell, and C++. 3016, 50--71.Google Scholar
- Dybvig, R. K., Hieb, R., and Bruggeman, C. 1992. Syntactic abstraction in scheme. In Lisp and Symb. Comput. 5. 295--326. Google Scholar
Digital Library
- Earley, J. 1970. An efficient context-free parsing algorithm. Commun. ACM 13, 2 (Feb.). Google Scholar
Digital Library
- Fleutot, F. and Tratt, L. 2007. Contrasting compile-time meta-programming in Metalua and Converge. In Proceedings of the Workshop on Dynamic Languages and Applications.Google Scholar
- Goldberg, A. and Robson, D. 1989. Smalltalk-80: The Language. Addison-Wesley, Reading, MA. Google Scholar
Digital Library
- Grimm, R. 2005. Systems need languages need systems! 2nd ECOOP Workshop on Programming Languages and Operating Systems.Google Scholar
- Griswold, R. E. and Griswold, M. T. 1996. The Icon Programming Language, Third ed. Peer-to-Peer Communications. Google Scholar
Digital Library
- Hudak, P. 1998. Modular domain specific languages and tools. In Proceedings of the 5th International Conference on Software Reuse. 134--142. Google Scholar
Digital Library
- Kohlbecker, E., Friedman, D. P., Felleisen, M., and Duba, B. 1986. Hygienic macro expansion. In Proceedings of the Symposium on Lisp and Functional Programming. ACM, New York, 151--161. Google Scholar
Digital Library
- Mernik, M., Heering, J., and Sloane, A. M. 2003. When and how to develop domain-specific languages. Tech. rep., Centrum voor Wiskundeen Informatica. Dec.Google Scholar
- Schröer, F. W. 2005. The ACCENT Grammar Language. http://accent.compilertools.net/language.html Accessed Jan 25 2005.Google Scholar
- Seefried, S., Chakravarty, M., and Keller, G. 2004. Optimising embedded DSLs using template Haskell. In Proceedings of the 3rd International Conference on Generative Programming and Component Engineering (Vancouver, BC Canada). Springer-Verlag, New York, 186--205.Google Scholar
- Sheard, T. 1998. Using MetaML: A staged programming language. Adv. Funct. Prog., 207--239.Google Scholar
- Sheard, T. 2003. Accomplishments and research challenges in meta-programming. Proceedings of the Workshop on Semantics, Applications and Implementation of Program Generation (SAIG '01) 2196, 2--44. Google Scholar
Digital Library
- Sheard, T., el Abidine Benaissa, Z., and Pasalic, E. 1999. DSL implementation using staging and monads. In Proceedings of the 2nd Conference on Domain Specific Languages. SIGPLAN, vol. 35. ACM, New York, 81--94. Google Scholar
Digital Library
- Sheard, T. and Jones, S. P. 2002. Template meta-programming for Haskell. In Proceedings of the Haskell Workshop 2002. ACM, New York. Google Scholar
Digital Library
- Skalski, K., Moskal, M., and Olszta, P. 2004. Meta-programming in Nemerle. http://nemerle.org/metaprogramming.pdf. Accessed Nov 5 2007.Google Scholar
- Steele, Jr, G. L. 1999. Growing a language. Higher-Order and Symbolic Computation 12, 3 (Oct.), 221--236. Google Scholar
Digital Library
- Tratt, L. 2005a. Compile-time meta-programming in a dynamically typed OO language. In Proceedings of the Dynamic Languages Symposium. 49--64. Google Scholar
Digital Library
- Tratt, L. 2005b. The Converge programming language. Tech. Rep. TR-05-01, Department of Computer Science, King's College London.Google Scholar
- Tratt, L. 2005c. The MT model transformation language. Tech. Rep. TR-05-02, Department of Computer Science, King's College London. May.Google Scholar
- Tratt, L. 2007. Converge Reference Manual. http://www.convergepl.org/documentation/Accessed June 3 2008.Google Scholar
- van den Brand, M. G. J., Heering, J., Klint, P., and Olivier, P. A. 2002. Compiling language definitions: the asf+sdf compiler. ACM Trans. Program. Lang. Syst. 24, 4, 334--368. Google Scholar
Digital Library
- van Deursen, A., Klint, P., and Visser, J. 2000. Domain-specific languages: An annotated bibliography. SIGPLAN Notices, 35, 26--36. Google Scholar
Digital Library
- van Rossum, G. 2003. Python 2.3 reference manual. http://www.python.org/doc/2.3/ref/ref.html Accessed June 3 2008.Google Scholar
- Walker, K. 1994. The run-time implementation language for Icon. Tech. Rep. IPD261, University of Arizona.Google Scholar
- Weise, D. and Crew, R. 1993. Programmable syntax macros. In Proceedings of the SIGPLAN. ACM, New York, 156--165. Google Scholar
Digital Library
- Wilson, G. V. 2005. Extensible programming for the 21st century. Queue 2, 9 (Jan.), 48--57. Google Scholar
Digital Library
Index Terms
Domain specific language implementation via compile-time meta-programming
Recommendations
Compile-time meta-programming in a dynamically typed OO language
DLS '05: Proceedings of the 2005 symposium on Dynamic languagesCompile-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 ...
Syntax extension and the IMP72 programming language
The IMP72 language for the DEC PDP-10 computer is the most recent of the IMP family of extensible software implementation languages. Its facility for extending the syntax of the language, the syntax statement, is simple enough to be useful to relatively ...
Bootstrapping domain-specific meta-languages in language workbenches
GPCE 2016: Proceedings of the 2016 ACM SIGPLAN International Conference on Generative Programming: Concepts and ExperiencesIt is common practice to bootstrap compilers of programming languages. By using the compiled language to implement the compiler, compiler developers can code in their own high-level language and gain a large-scale test case. In this paper, we ...






Comments