I added a check at the end of the meta meta model generation on the opposites. It should throw an Assertion failure is your model is not well designed:
Name: Fame-SmalltalkBinding-VincentBlondeau.14
Author: VincentBlondeau
Time: 19 January 2017, 5:16:16.582209 pm
UUID: 814148a9-f22d-7244-97e9-e147e6cfdace
Ancestors: Fame-SmalltalkBinding-PavelKrivanek.13
Vincent
De : Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch]
De la part de Pavel Krivanek
Envoyé : jeudi 19 janvier 2017 14:43
À : Moose-related development
Cc : Moose-dev Moose Dev
Objet : [Moose-dev] Re: BUG - MooseModel resetMeta
Solved, there were more than one opposite references in the metamodel. Because the pragma processor was processing a dictionary of references, the order was random and it caused such undeterministic behavior.
-- Pavel
2017-01-19 12:23 GMT+01:00 Anne Etien <anne.etien@univ-lille1.fr>:
Hi,
I am developing a tool based on Fame pragma.
Considering the following methods:
FAMIXSQLExpression >>referencedRequests
<MSEProperty: #referencedRequests type: #FAMIXRequest opposite: #usedInExpression> <multivalued>
<MSEComment: 'List of requests referenced by the expression.'>
^ referencedRequests
FAMIXRequest >>usedInExpression
<MSEProperty: #usedInExpression type: #FAMIXSQLExpression opposite: #referencedRequests>
<MSEComment: 'Expression in which the request is used.'>
^ usedInExpression
(FAMIXSQLExpression mooseDescription at: 'referencedRequests') hasOpposite should return true.
However, I don’t have always the same behavior after each resetMeta.
(1 to: 100) do: [ : e | MooseModel resetMeta. (FAMIXSQLExpression mooseDescription at: 'referencedRequests') hasOpposite ifFalse: [ 1halt ] ].
always halts, at some unpredictable iteration (usually less than 10)
Does someone has any idea what is the problem and how to solve it?
By the way, MooseSQL is available here https://ci.inria.fr/moose/job/MooseSQL/
Thanks in advance for your help.
Anne
_______________________________________________
Moose-dev mailing list
Moose-dev@list.inf.unibe.ch
https://www.list.inf.unibe.ch/listinfo/moose-dev