Extending Languages by Leveraging Compilers: From Modelica to Optimica

  • Authors:
  • Gorel Hedin;Johan Akesson;Torbjorn Ekman

  • Affiliations:
  • Lund University, Sweden;Lund University, Sweden;Semmle

  • Venue:
  • IEEE Software
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Combining attribute grammars with object-oriented programming supports a new kind of declarative programming, letting developers build compilers in a highly extensible manner. By leveraging a base compiler, extended languages can be supported at a relatively low cost. Recent work shows the applicability of the technique to general-purpose programming languages such as Java. In this article, the authors illustrate the approach using a case study for domain-specific languages. They built an extensible compiler for the physical systems modeling language Modelica and leveraged it to support a new extended language, Optimica.