MetaBorg in action: Examples of domain-specific language embedding and assimilation using stratego/XT

25Citations
Citations of this article
22Readers
Mendeley users who have this article in their library.
Get full text

Abstract

General-purpose programming languages provide limited facilities for expressing domain-specific concepts in a natural manner. All domain concepts need to be captured using the same generic syntactic and semantic constructs. Generative programming methods and program transformation techniques can be used to overcome this lack of abstraction in general-purpose languages. In this tutorial we describe the METABORG method for embedding domainspecific languages, tailored syntactically and semantically to the application domain at hand, in a general-purpose language. METABORG is based on Stratego/XT, a language and toolset for the implementation of program transformation systems, which is used for the definition of syntactic embeddings and assimilation of the embedded constructs into the surrounding code. We illustrate METABORG with three examples. JavaSwul is a custom designed language for implementing graphical user-interfaces, which provides high-level abstractions for component composition and event-handling. JavaRegex is a new embedding of regular expression matching and string rewriting. JavaJava is an embedding of Java in Java for generating Java code. For these cases we show how Java programs in these domains become dramatically more readable, and we give an impression of the implementation of the language embeddings. © Springer-Verlag Berlin Heidelberg 2006.

Cite

CITATION STYLE

APA

Bravenboer, M., De Groot, R., & Visser, E. (2006). MetaBorg in action: Examples of domain-specific language embedding and assimilation using stratego/XT. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 4143 LNCS, pp. 297–311). Springer Verlag. https://doi.org/10.1007/11877028_10

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free