ABSTRACT
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.
- J. Åkesson, T. Ekman, and G. Hedin. Implementation of a Modelica compiler using JastAdd attribute grammars. Science of Computer Programming, 75(1--2): 21--38, Jan. 2010. Google ScholarDigital Library
- D. Broman, P. Fritzson, and S. Furic. Types in the Modelica Language. In Proceedings of the Fifth International Modelica Conference, pages 303--315, Vienna, Austria, 2006.Google Scholar
- D. Broman, P. Fritzson, G. Hedin, and J. Åkesson. A comparison of metacompilation approaches to implementing Modelica. Technical Report 1404-1200 Report 97, Dept. of Computer Science, Lund University, Sweden, 2011.Google Scholar
- G. Hedin. Reference Attributed Grammars. In Informatica (Slovenia), 24(3), pages 301--317, 2000.Google Scholar
- G. Hedin and E. Magnusson. JastAdd: an aspect-oriented compiler construction system. Science of Computer Programming, 47(1): 37--58, 2003. Google ScholarDigital Library
- D. Kågedal and P. Fritzson. Generating a Modelica compiler from natural semantics specifications. In Summer Computer Simulation Conference (SCSC'98), pages 299--307, Reno, Nevada, 1998.Google Scholar
- G. Kahn. Natural semantics. In 4th Annupal Symposium on Theoretical Aspects of Computer Sciences on STACS 87, volume 247 of LNCS, pages 22--39, Passau, Germany, 1987. Springer. Google ScholarDigital Library
- M. Mernik, J. Heering, and A. M. Sloane. When and how to develop domain-specific languages. ACM Comput. Surv., 37(4): 316--344, 2005. Google ScholarDigital Library
- M. Pettersson. Compiling Natural Semantics, volume 1549 of LNCS. Springer, 1999. Google ScholarDigital Library
- H. Vogt, S. D. Swierstra, and M. F. Kuiper. Higher-order attribute grammars. In PLDI, pages 131--145, 1989. Google ScholarDigital Library
Index Terms
- A comparison of two metacompilation approaches to implementing a complex domain-specific language
Recommendations
Prototyping domain-specific language semantics
OOPSLA Companion '08: Companion to the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsDomain-specific languages (DSLs) need semantics. For an external, executable, metamodel-based DSL, this can be done in an operational or a translational way. In my dissertation, I develop a framework that allows both. It provides flexibility for ...
Adding domain-specific and general purpose language features to Java with the Java language extender
OOPSLA '06: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applicationsThe Java Language Extender is a compiler-generator tool that allows programmers to create new domain-adapted languages by importing a set of domain-specific language extensions into an extensible specification of Java 1.4. Language extensions define the ...
Formalisation of C Language Interfaces
In practical computing, implementations of programming languages provide an interface that allow programs written in a language to call code written in another programming language, most often C. Usually, those language interfaces are left out of the ...
Comments