Modular domain-specific language components in scala

  • Authors:
  • Christian Hofer;Klaus Ostermann

  • Affiliations:
  • Aarhus University, Aarhus, Denmark;University of Marburg, Marburg, Germany

  • Venue:
  • GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Programs in domain-­specific embedded languages (DSELs) can be represented in the host language in different ways, for instance implicitly as libraries, or explicitly in the form of abstract syntax trees. Each of these representations has its own strengths and weaknesses. The implicit approach has good composability properties, whereas the explicit approach allows more freedom in making syntactic program transformations. Traditional designs for DSELs fix the form of representation, which means that it is not possible to choose the best representation for a particular interpretation or transformation. We propose a new design for implementing DSELs in Scala which makes it easy to use different program representations at the same time. It enables the DSL implementor to define modular language components and to compose transformations and interpretations for them.