Martin Sjölund
Programming Environment Lab, Dept. Computer Science, Linköping University, Sweden
Peter Fritzson
Programming Environment Lab, Dept. Computer Science, Linköping University, Sweden
Adrian Pop
Programming Environment Lab, Dept. Computer Science, Linköping University, Sweden
Ladda ner artikel
http://dx.doi.org/10.3384/ecp11063510Ingår i: Proceedings of the 8th International Modelica Conference; March 20th-22nd; Technical Univeristy; Dresden; Germany
Linköping Electronic Conference Proceedings 63:58, s. 510-521
Publicerad: 2011-06-30
ISBN: 978-91-7393-096-3
ISSN: 1650-3686 (tryckt), 1650-3740 (online)
What does it mean to bootstrap a compiler; and why do it? This paper reports on the first bootstrapping (i.e.; a compiler can compile itself) of a full-scale EOO (Equation-based Object-Oriented) modeling language such as Modelica. The Modelica language has been modeled/implemented in the OpenModelica compiler (OMC) using an extended version of Modelica called MetaModelica. OMC models the MetaModelica language and is now compiling itself with good performance. Benefits include a more extensible maintainable compiler; also making it easier to add functionality such as debugging support.
This work is in line with the recently started Modelica 4 design effort which includes moving implementation of language features from the compiler to a Modelica Core library; allowing compilers to become smaller while increasing correctness and portability.
A number of language constructs discussed for Modelica 4 are already supported in some form by the bootstrapped compiler. Future work includes adapting language constructs according to the Modelica 4 design effort and extracting and restructuring parts of the Modelica implementation from the OMC compiler to instead reside in a Modelica Core library; making the compiler smaller and more extensible.
Compilation; Modelica; MetaModelica; meta-programming; metamodeling; modeling; simulation
Inga referenser tillgängliga