A comparison of metacompilation approaches to implementing

Operational semantics and attribute grammars are examples of formalisms that can be used for generating compilers. We are interested in finding similarities and differences in how these approaches are applied to complex languages, and for generating compilers of such maturity that they have users in industry. As a specific case, we present a comparative analysis of two compilers for Modelica, a language for physical modeling, and which contains numerous compilation challenges. The two compilers are OpenModelica, which is based on big-step operational semantics, and JModelica.org, which is based on reference attribute grammars.

[1]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[2]  S. Doaitse Swierstra,et al.  Higher order attribute grammars , 1989, PLDI '89.

[3]  Jukka Paakki,et al.  Attribute grammar paradigms—a high-level methodology in language implementation , 1995, CSUR.

[4]  Paul Hudak,et al.  Building domain-specific embedded languages , 1996, CSUR.

[5]  Peter Fritzson,et al.  GENERATING A MODELICA COMPILER FROM NATURAL SEMANTICS SPECIFICATIONS , 1998 .

[6]  Mikael Pettersson,et al.  Compiling Natural Semantics , 1999, Lecture Notes in Computer Science.

[7]  Görel Hedin,et al.  Reference Attributed Grammars , 2000, Informatica.

[8]  David S. Wile,et al.  Supporting the DSL Spectrum , 2001 .

[9]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

[10]  Görel Hedin,et al.  JastAdd--an aspect-oriented compiler construction system , 2003, Sci. Comput. Program..

[11]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[12]  Donald E. Knuth,et al.  Semantics of context-free languages , 1968, Mathematical systems theory.

[13]  M Mernik,et al.  When and how to develop domain-specific languages , 2005, CSUR.

[14]  Adrian Pop,et al.  MetaModelica: A Unified Equation-Based Semantical and Mathematical Modeling Language , 2006, JMLC.

[15]  Alberto Verdejo,et al.  Executable structural operational semantics in Maude , 2006, J. Log. Algebraic Methods Program..

[16]  Peter Fritzson,et al.  Types in the Modelica Language , 2006 .

[17]  Torbjörn Ekman,et al.  The jastadd extensible java compiler , 2007, OOPSLA.

[18]  Torbjörn Ekman,et al.  Modularity first: a case for mixing AOP and attribute grammars , 2008, AOSD.

[19]  Eric Van Wyk,et al.  Silver: An extensible attribute grammar system , 2008, Sci. Comput. Program..

[20]  Torbjörn Ekman,et al.  Implementation of a Modelica compiler using JastAdd attribute grammars , 2010, Sci. Comput. Program..

[21]  Anthony M. Sloane,et al.  A Pure Object-Oriented Embedding of Attribute Grammars , 2010, LDTA.