Projekt per år
Sammanfattning
We have implemented a compiler for key parts of Modelica, an object-oriented language supporting equation-based modeling and simulation of complex physical systems. The compiler is extensible, to support experiments with emerging tools for physical models. To achieve extensibility, the implementation is done declaratively in JastAdd, a metacompilation system supporting modern attribute grammar mechanisms such as reference attributes and nonterminal attributes. This paper reports on experiences from this implementation. For name and type analyses, we illustrate how declarative design strategies, originally developed for a Java compiler, could be reused to support Modelica's advanced features of multiple inheritance and structural subtyping. Furthermore, we present new general design strategies for declarative generation of target ASTs from source ASTs. We illustrate how these strategies are used to resolve a generics-like feature of Modelica called modifications, and to support flattening, a fundamental part of Modelica compilation. To validate that the approach is practical, we have compared the execution speed of our compiler to two existing Modelica compilers.
Originalspråk | engelska |
---|---|
Sidor (från-till) | 21-38 |
Tidskrift | Science of Computer Programming |
Volym | 75 |
Nummer | 1-2 |
DOI | |
Status | Published - 2010 |
Ämnesklassifikation (UKÄ)
- Datavetenskap (datalogi)
- Reglerteknik
Fingeravtryck
Utforska forskningsämnen för ”Implementation of a Modelica compiler using JastAdd attribute grammars”. Tillsammans bildar de ett unikt fingeravtryck.Projekt
- 1 Avslutade
-
EASE: EASE – Embedded Applications Software Engineering FACULTY OF ENGINEERING, LTH
Åkesson, J., Magnusson, B., Svensson Fors, D., Magnusson, E., Hedin, G., Kuchcinski, K., Andersson, P., Nugues, P., Robertz, S., Ekman, T., Loconsole, A., Orucevic-Alagic, A., Johnsson, B. A., Pfahl, D., Bjarnason, E., Söderberg, E., Sabaliauskaité, G., Jonsson, H., Janneck, J., Wnuk, K., Borg, M., Skoglund, M., Sulaman, S. M., Minör, S., Sandholm, T., Alce, G., Wallergård, M., Zhang, C., Barney, S., Martinsen, J. K., Grahn, H., Jalali, S., Ardö, A., Engström, E., Berntsson Svensson, R., Regnell, B., Runeson, P., Wohlin, C., Höst, M. & Wisbrant, J.
2008/09/30 → 2018/12/31
Projekt: Forskning