EnEff-BIM / EnEffBIM-Framework

translating from BIM to BEPS
MIT License
8 stars 0 forks source link

Versioning of the Modelica libraries #77

Closed ReinhardWimmer closed 8 years ago

ReinhardWimmer commented 9 years ago

Once a connection via the mapping rules and the transformation algorithms is created, the interface is only stable for the specific version of the Modelica library. I have talked to @mwetter about the versioning of the libraries and I think we have a suitable solution for our framework. We could use the conversion scripts to cover the ongoing changes of a new version of a library.

I checked the Buildings Library Conversion Script (version 1.6 to version 2.0) and if we are able to use the information of the script, the update of the interface could be handled automaticly. Here you can see a spreadsheet, which hopefully explains the conversion scritps and how we could use them: Information for the libraries versioning update.xlsx You can also find this sheet on the Dropbox: Dropbox\EnEff-BIM_E3D_RWTH\Modelica\Versioning A general description of the Conversion Scripts for Dymola can be found in the Dymola User Manual Volume 2, p. 415.

One weak point is still existing: New parameters or objects are not covered by the conversion scripts. For that we need to parse the new version of the Modelica library to extract this information and to define the new mapping rules and transformation algorithms. I looked up some papers about this topic and found a paper about an existing parser by Tiller (2003) and found also a lot of different parser for Modelica/ Dymola. Most of them are open source and maybe we can implement and use them for this purpose, but I am not an expert for this.

thorade commented 9 years ago

This is the paper you mentioned by Michael Tiller from the 2003 Modelica conference: https://www.modelica.org/events/Conference2003/papers/h31_parser_Tiller.pdf He used ANTLR to parse the Modelica files, maybe we could ask for a grammar file: https://www.google.com/search?q=antlr+modelica The ANTLR repo does contain a Modelica grammar: https://github.com/antlr/grammars-v4/tree/master/modelica

All Modelica compilers like Dymola, OpenModelica and JModelica must have a parser and all three also have a Python interface. If I understand correctly, the complete OpenModelica scripting interface is available from Python. There might be a way to create a detailed changelog using Python scripts. At the Modelica conference I talked to one of the Dymola developers and he said he has a tool he could show me. I will contact him and ask for details. That was right after the impact/semver presentation by Michael Tiller: http://dx.doi.org/10.3384/ecp15118725

Some time ago I asked a slighlty related question about UML diagrams: http://stackoverflow.com/q/20607206/874701

Another parser (parsing only, no compilation/simulation) is here: https://hackage.haskell.org/package/modelicaparser Writing a parser is a lot of work so we should definetely use an existing one.

The Modelica Association is working on standardizing the conversion scripts. Currently, only Dymola seems to support them and they are not part of the language stadard. This was discussed at the Modelica Design Meeting, the related discussion is unfortunately hidden: https://trac.modelica.org/Modelica/browser/MCP-Ideas/MAinternal/MCPI-0014_Conversion?rev=7968 Also, there is related discussion about semantic versioning for Modelica libraries: https://trac.modelica.org/Modelica/ticket/1728

For an introduction, please read: http://heise.de/-1859566 http://semver.org/

PRemmen commented 9 years ago

Is this an issue we want to adress in the Aachen meeting?

thorade commented 9 years ago

Is this an issue we want to address in this project at all? If yes, we should address it at the Aachen meeting.

PRemmen commented 9 years ago

I see this more as a concept we could develop "on paper" for the report (Limitations -> Outlook), but not implement it.

So from my point of view: No, we won't address this issue technically in this project.

thorade commented 8 years ago

This is an important topic, but I think we are not going to work on it within this project.