Meta Programming and Function Overloading in OpenModelica

The OpenModelica framework is an Open Source effort for building a complete compiler for Modelica started at the programming environments laboratory at Link¨ oping university. It is written in a language called RML [10], Relational Meta Language, based on natural semantics. Natural semantics is a popular formalism for describing the semantics (i.e. the meaning of language constructs) for compilers. By using the RML language this formalism is combined with efficient compilation into optimized C code. The OpenModelica framework is used to experiment with new language features and language design for the ongoing development of the Modelica language. The design of the Modelica language is performed in the Modelica Design Group (by the Modelica Association) - an open group of Modelica users, resarchers, vendors, etc., where the the Modelica language is evolved through intensive discussions in threedays workshops, three or four times a year. Recently, support for Meta-programming and function overloading (including an external interface to LAPACK) have been implemented in the OpenModelica compiler. This paper present the design and implementation of these language constructs in the OpenModelica framework and illustrates how to utilize this framework for research in e.g. language design, metaprogramming and modeling and simulation methodology.