MetaModelica: A Unified Equation-Based Semantical and Mathematical Modeling Language

  • Adrian Pop
  • Peter Fritzson
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4228)


For a long time, one of the major research goals in the computer science research community has been to raise the level of abstraction power of specification languages/programming languages. Many specification languages and formalisms have been invented, but unfortunately very few of those are practically useful, due to limited computer support of these languages and/or inefficient implementations. Thus, one important goal is executable specification languages of high abstraction power and with high performance, good enough for practical usage and comparable in execution speed to hand implementations of applications in low-level languages such as C or C++. In this paper we briefly describe our work in creating efficient executable specification languages for two application domains. The first area is formal specification of programming language semantics, whereas the second is formal specification of complex systems for which we have developed an object-oriented mathematical modeling language called Modelica, including architectural support for components and connectors. Based on these efforts, we are currently working on a unified equation-based mathematical modeling language that can handle modeling of items as diverse as programming languages, computer algebra, event-driven systems, and continuous-time physical systems. The key unifying feature is the notion of equation. In this paper we describe the design and implementation of the unified language. A compiler implementation is already up and running, and used for substantial applications.


Modeling Language Unify Modeling Language Abstract Syntax Tree Natural Semantic Pattern Equation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Borras, P., Clement, D., Despeyroux, T., Incerpi, J., Kahn, G., Lang, B., Pascual, V.: CENTAUR: The System. In: Henderson, P. (ed.) Proceedings of ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, February. SIGPLAN, vol. 24, pp. 14–24 (1988)Google Scholar
  2. 2.
    Carlsson, E.: Translating Natural Semantics to MetaModelica, Department of Computer and Information Science, Linköping University, Linköping, Master’s Thesis (2005)Google Scholar
  3. 3.
    Clément, D., Despeyroux, J., Despeyroux, T., Kahn, G.: A Simple Applicative Language: Mini-ML. In: Proceedings of the ACM Conference on Lisp and Functional Programming (August 1986); also available as research report RR-529, INRIA, Sophia-Antipolis (May 1986)Google Scholar
  4. 4.
    Despeyroux, T.: Executable Specification of Static Semantics. In: Plotkin, G., MacQueen, D.B., Kahn, G. (eds.) Semantics of Data Types 1984. LNCS, vol. 173, pp. 215–233. Springer, Heidelberg (1984)Google Scholar
  5. 5.
    Despeyroux, T.: TYPOL: A Formalism to Implement Natural Semantics, INRIA, Sofia-Antipolis, Report: RR 94 (1988),
  6. 6.
    Dynasim: Dymola (last accessed, 2005),
  7. 7.
    Elmqvist, H., Mattsson, S.E., Otter, M.: Modelica - A Language for Physical System Modeling, Visualization and Interaction. In: Proceedings of IEEE Symposium on Computer-Aided Control System Design, August 22-27, 1999, Hawaii, USA (1999)Google Scholar
  8. 8.
    Fritzson, P.: Efficient Language Implementation by Natural Semantics (1998),
  9. 9.
    Fritzson, P., Engelson, V.: odelica, a general Object-Oriented Language for Continuous and Discrete-Event System Modeling and Simulation. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, Springer, Heidelberg (1998)CrossRefGoogle Scholar
  10. 10.
    Fritzson, P., Aronsson, P., Bunus, P., Engelson, V., Saldamli, L., Johansson, H., Karstöm, A.: The Open Source Modelica Project. In: Proceedings of the 2nd International Modelica Conference, March 18-19, 2002, Munich, Germany (2002)Google Scholar
  11. 11.
    Fritzson, P., Aronsson, P., Bunus, P., Engelson, V., Saldamli, L., Johansson, H., Karstöm, A.: The Open Source Modelica Project. In: Proceedings of the 2nd International Modelica Conference, Munich, Germany, March 18-19, 2002. Modelica Association (2002),, Open Modelica System,
  12. 12.
    Fritzson, P., Bunus, P.: Modelica, a General Object-Oriented Language for Continuous and Discrete-Event System Modeling and Simulation. In: Proceedings of 35th Annual Simulation Symposium, San Diego, California, April 14-18 (2002)Google Scholar
  13. 13.
    Fritzson, P.: Principles of Object-Oriented Modeling and Simulation with Modelica 2.1., 940 pages. Wiley-IEEE Press (2004) ISBN:0-471-471631, Book home page:
  14. 14.
    Glesner, S., Zimmermann, W.: Natural semantics as a static program analysis framework. ACM Transactions on Programming Languages and Systems (TOPLAS) 26(3), 510–577 (2004)CrossRefGoogle Scholar
  15. 15.
    University of Illinois, The Maude System Website (last accessed),
  16. 16.
    Kahn, G.: Natural Semantics. In: Niva, M. (ed.) Programming of Future Generation Computers, pp. 237–258. Elsevier Science Publishers, North Holland (1988)Google Scholar
  17. 17.
    MathCore: MathModelica, MathCore (last accessed, 2005),
  18. 18.
    Modelica-Association, Modelica: A Unified Object-Oriented Language for Physical Systems Modeling, Language Specification 2.2 (last accessed, 2005),
  19. 19.
    Modelica-Association, Modelica - A Unified Object-Oriented Language for Physical Systems Modeling - Tutorial and Design Rationale Version 2.0 (last accessed, 2005),
  20. 20.
    Mosses, P.D.: Modular structural operational semantics. Journal of Functional Programming and Algebraic Programming, Special issue on SOS 60–61, 195–228 (2004)MathSciNetGoogle Scholar
  21. 21.
    PELAB, Relational Meta-Language (RML) Environment, Programming Environments Laboratory (PELAB) (last accessed, 2005),
  22. 22.
    PELAB, Open Modelica System, Programming Environments Laboratory (last accessed, 2005),
  23. 23.
    PELAB, Modelica Development Tooling (MDT), PELAB (last accessed, April 2006),
  24. 24.
    Pettersson, M., Fritzson, P.: DML - A Meta-language and System for the Generation of Practical and Efficient Compilers from Denotational Specifications. In: Proceedings of the 1992 International Conference on Computer Languages, Oakland, California, April 20–23, California (1992)Google Scholar
  25. 25.
    Pettersson, M.: Compiling Natural Semantics, Department of Computer and Information Science, Linköping University, Linköping, Ph.D. Thesis (1995)Google Scholar
  26. 26.
    Pettersson, M.: Compiling Natural Semantics. LNCS, vol. 1549, p. 1999. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  27. 27.
    Plotkin, G.: A structural approach to operational semantics, Århus University, Report: DAIMI FN-19 (1981)Google Scholar
  28. 28.
    Pop, A., Fritzson, P.: Debugging Natural Semantics Specifications. In: Proceedings of Sixth International Symposium on Automated and Analysis-Driven Debugging, Monterey, California, September 19-21 (2005)Google Scholar
  29. 29.
    Ringström, J., Fritzson, P., Pettersson, M.: Generating an Efficient Compiler for a Data Parallel Language from Denotational Specifications. In: Fritzson, P.A. (ed.) CC 1994. LNCS, vol. 786. Springer, Heidelberg (1994)Google Scholar
  30. 30.
    Saldamli, L.: PDEModelica - Towards a High-Level Language for Modeling with Partial Differential Equations, Department of Computer and Information Science, Linköping University, Linköping, Licenciate Thesis (2002)Google Scholar
  31. 31.
    Saldamli, L., Fritzson, P., Bachmann, B.: Extending Modelica for Partial Differential Equations. In: Proceedings of 2nd International Modelica Conference, Munich, Gernany, March 18-29 (2002)Google Scholar
  32. 32.
    Saldamli, L., Bachmann, B., Fritzson, P., Wiesmann, H.: A Framework for Describing and Solving PDE Models in Modelica. In: Schmitz, G. (ed.) Proceedings of 4th International Modelica Conference. Hamburg-Harburg, Modelica Association (2005),
  33. 33.
    SICS - Swedish Institute of Computer Science, SICStus Prolog Website (last accessed, April 2006),
  34. 34.
    SWI-Prolog, SWI-Prolog Website, University of Amsterdam (last accessed, April 2006)
  35. 35.
    Michael, M.: Tiller, Introduction to Physical Modeling with Modelica. Kluwer Academic Publishers, Dordrecht (2001)Google Scholar
  36. 36.
    Viklund, L., Herber, J., Fritzson, P.: The implementation of ObjectMath - a hight-level programming enviornment for scientific computing. In: Pfahler, P., Kastens, U. (eds.) CC 1992. LNCS, vol. 641, pp. 312–318. Springer, Heidelberg (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Adrian Pop
    • 1
  • Peter Fritzson
    • 1
  1. 1.Programming Environment Laboratory, Department of Computer and Information ScienceLinköping UniversityLinköpingSweden

Personalised recommendations