Hi everybody!
Currently, I am working on a Java library to process Modelica models. An important part in this is creating instances. Jakob Mauss presented an excellent article on this during the Modelica Conference 2005 (see http://www.modelica.org/events/Conference2...Session6c1.pdf). I ran into a problem implementing his approach however. If anyone of you guys can help me on this I'll be happy to hear from you.
In his paper, Mauss presents the procedure qualify() on page 514. It is meant to take an unqualified Modification and return a qualified one. For that, each Reference has to be replaced "by either a qualified reference QRef or a Class". My question is the following: Which field and what class is best suited to store them?
In the UML diagram he shows on the first page, ElementModification has a field ref of type Reference. A simple approach is to make this field an Object, which then allows to carry along the original Reference, but also QRef or Class.
Another approach is to create new classes such as qualified modification, QMod, and qualified element modification, QElementMod, with additional fields.
Does anyone have some remarks on this? My major is not computer science but engineering, so perhaps a solution is not so far away...
For now, I started implementing the first approach (using a field "Object ref" in ElementModification), but right now I am busy debugging the code as I run into unwanted infinite recursive loops...
Thanks,
Michael