Concrete syntax for objects
- 1 October 2004
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 39 (10), 365-383
- https://doi.org/10.1145/1028976.1029007
Abstract
Application programmer's interfaces give access to domain knowledge encapsulated in class libraries without providing the appropriate notation for expressing domain composition. Since object-oriented languages are designed for extensibility and reuse, the language constructs are often sufficient for expressing domain abstractions at the semantic level. However, they do not provide the right abstractions at the syntactic level. In this paper we describe MetaBorg, a method for providing concrete syntax for domain abstractions to application programmers. The method consists of embedding domain-specific languages in a general purpose host language and assimilating the embedded domain code into the surrounding host code. Instead of extending the implementation of the host language, the assimilation phase implements domain abstractions in terms of existing APIs leaving the host language undisturbed. Indeed, MetaBorg can be considered a method for promoting APIs to the language level. The method is supported by proven and available technology, i.e. the syntax definition formalism SDF and the program transformation language and toolset Stratego/XT. We illustrate the method with applications in three domains: code generation, XML generation, and user-interface construction.Keywords
This publication has 18 references indexed in Scilit:
- When and how to develop domain-specific languagesACM Computing Surveys, 2005
- Generation of abstract programming interfaces from syntax definitionsThe Journal of Logic and Algebraic Programming, 2004
- Retrofitting the AutoBayes Program Synthesis System with Concrete SyntaxLecture Notes in Computer Science, 2004
- Program Transformation with Stratego/XTLecture Notes in Computer Science, 2004
- Object-oriented Tree Traversal with JJForesterElectronic Notes in Theoretical Computer Science, 2001
- Building domain-specific embedded languagesACM Computing Surveys, 1996
- The syntax definition formalism SDF—reference manual—ACM SIGPLAN Notices, 1989
- Scannerless NSLR(1) parsing of programming languagesACM SIGPLAN Notices, 1989
- An efficient context-free parsing algorithmCommunications of the ACM, 1970
- Syntax macros and extended translationCommunications of the ACM, 1966