Hi Doru,

I am working on Orion that enables through actions to express evolution operator on model elements.
These actions depend on the language in which the program to evolve is written (even if the actions are performed at model level). I am trying to generate all the required classes, attributes and methods to adapt Orion to a specific language. This part is relatively simple and systematic and dependent to the instance variables of the Famix classes.
Concerning the actions, currently, I am not generating them. But I think I can do some generations, that would certainly need to be manually adapted by the developer.

When you want to add a Class (in Pharo or Java), you have to:
- create the class,
- specify its container property (since this property is mandatory) and add the added class in the collection of the corresponding container.
- specify its name (if you are in Pharo, since once again this property is mandatory).

All the other things, concerning, instance variables, methods, inheritance… are optional; the lower multiplicity is 0, whereas the container and the name properties have 1 as lower multiplicity. 

The idea is then to construct a model conform to the metamodel.

Thanks in advance.
Anne

Le 1 sept. 2013 à 08:06, Tudor Girba a écrit :

Hi Anne,

Fame does not have this support. But, for generation purposes, I think the upper bounds should be pretty much enough: as long as you have * upper bound, you should model it with a collection.

Could you give an example of how the lower bounds would change the generation?

Doru


On Fri, Aug 30, 2013 at 4:15 PM, Anne Etien <anne.etien@univ-lille1.fr> wrote:
Hi,

I can't see how Fame enable to express that a Property in a metamodel is mandatory or not. The isMultivalued property of the FM3PropertyDescription class enables to specify that a property is multivalued or not, but nothing concerning the character mandatory of the property. Saying that in other words, it is possible to specify in a metamodel that the upper multiplicity of a property is '*' but I can't see how to specify the lower multiplicity.

For example considering the metamodel of stateMachine. A State is contained in one and only one StateMachine, whereas a StateMachine can contained 0 or several states. A transition has one and only one State as source and a state can be the source of 0 or several transitions.

Does Fame enable to express this mandatory characteristic?

Expressing such a thing may facilitate some generations. Indeed, when adding a State, we must specify its container but it is not mandatory to specify the transitions for which it is a source.

Thank you in advance for your help.
Anne
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
www.tudorgirba.com

"Every thing has its own flow"
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev