TRAPping Modelica with Python

  • Thilo Ernst
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1575)


This short paper introduces TRAP, a small but powerful compiler development system based on the object-oriented, dynamic language Python. Employing a very high level language as a compiler tool’s base language reduces the need for additional tool support and importing library functionality to a minimum. Python in particular has the additional advantage of being a powerful and already quite popular general-purpose component integration framework, which can be utilized both for incorporating subcomponents and for embedding the compiler developed into a larger system. Exploiting these strengths, TRAP enables rapid prototyping and development of compilers – in particular, translators for medium-complexity special purpose languages – on a very high level of abstraction.


  1. 1.
    The Modelica Design Group: Modelica - A Unified Object-Oriented Language for Physical Systems Modeling (1997),
  2. 2.
    Ernst, T., Jähnichen, S., Klose, M.: The Architecture of the SMILE/M Simulation Environment. In: Proc. 15th IMACS World Congress on Sci. Comp., Berlin (1997)Google Scholar
  3. 3.
    van Rossum, G.: Python Reference Manuals.,
  4. 4.
    Schröer, F.W.: The Gentle Compiler Construction System. GMD Bericht 290 (1997)Google Scholar
  5. 5.
    Alt, M., Assmann, U., van Someren, H.: CoSy Compiler Phase Embedding with the CoSy Compiler Model. In: Fritzson, P.A. (ed.) CC 1994. LNCS, vol. 786. Springer, Heidelberg (1994)Google Scholar
  6. 6.
    Schröer, F.W.: Smart Reference Manual (Draft). Internal report, GMD (1993)Google Scholar
  7. 7.
    Grosch, J.: A Tool Box for Compiler Construction. In: Hammer, D. (ed.) CC 1990. LNCS, vol. 477. Springer, Heidelberg (1991)Google Scholar
  8. 8.
    Lampe, J.: An Extensible Translator-Generator for Use in Branch Software Construction. J. Comp. Inf. 2(1), 1057–1067 (1996)Google Scholar
  9. 9.
    Parr, T.J.: Language Translation Using PCCTS and C++. Automata (1997)Google Scholar
  10. 10.
    Gil, J.: JAMOOS Page (1997),

Copyright information

© Springer-Verlag Berlin Heidelberg 1999

Authors and Affiliations

  • Thilo Ernst
    • 1
  1. 1.GMD FIRST Research Institute for Computer Architecture and Software TechnologyBerlinGermany

Personalised recommendations