Hi,
I am afraid that the documentation about fame (and few other moose things like the moose
algorithms) has vanished with the old Moose website... If someone can make it available
again, it will be nice.
But, to give more usage examples:
- FMMultivalueLink
Used to create 1 to n links between famix elements. Example with inheritance where a
FAMIXInheritance has a link to 1 FAMIXType and where FAMIXType have 1 link to n
FAMIXInheritances:
In FAMIXInheritance (subclass is an instance variable):
FAMIXInheritance >>subclass
<MSEProperty: #subclass type: #FAMIXType opposite: #superInheritances
<MSEComment: 'Subclass linked to in this relationship. from-side of the
association'
^subclass
FAMIXInheritance >> subclass: aType
subclass := FMMultivalueLink on: self
update: #superInheritances
from: self subclass
to: aType
In: FAMIXType (superInheritances is an instance variable)
FAMIXType >>initialize
superInheritances := FMNullMultivalueLink on: self opposite: #subclass:
selector: #superInheritances.
FAMIXType >>superInheritances
<MSEProperty: #superInheritances type: #FAMIXInheritance opposite:
#subclass> <multivalued> <derived
<MSEComment: 'Superinheritance relationships, i.e. known superclasses of
this type.'
^superInheritances
FAMIXType >> superInheritances: anInheritance
superInheritances value: anInheritance
________________________________
- FMMultiMultivalueLink. To create n to n associations. Example:
In FAMIXInvocations (candidates is an instance variable):
FAMIXInvocations >> initialize
candidates := FMMultiMultivalueLink on: self opposite: #incomingInvocations.
FAMIXInvocations >> candidates
<MSEProperty: #candidates type: #FAMIXBehaviouralEntity opposite:
#incomingInvocations> <multivalued
<MSEComment: 'List of candidate behavioural entities for receiving the
invocation'
^candidates
FAMIXInvocations >> candidates: aCollection
candidates value: aCollection
In FAMIXBehaviouralEntity (incomingInvocations is an instance variable):
FAMIXBehaviouralEntity >> initialize
incomingInvocations := FMMultiMultivalueLink on: self opposite: #candidates.
FAMIXBehaviouralEntity >> incomingInvocations
<MSEProperty: #incomingInvocations type: #FAMIXInvocation opposite:
#candidates> <multivalued> <derived
<MSEComment: 'Incoming invocations from other behaviours computed by the
candidate operator.'
^incomingInvocations
FAMIXBehaviouralEntity >> incomingInvocations: anInvocation
incomingInvocations value: anInvocation
________________________________
- FMNullMultivalueLink: used to reduce memory consumption (see other answers)
- <multivalued>: used to describe in the meta model that the return value is a
collection of entities and no only one entity.
- <derived>: as said by Guillaume: "is for things that don't require to be
stored in the .mse for example because you can derive it (compute) from other data"
Example:
numberOfAccesses
<MSEProperty: #numberOfAccesses type: #Number
<derived
<MSEComment: 'The number of accesses from a method'
^ self
lookUpPropertyNamed: #numberOfAccesses
computedAs: [ self accesses size ]
I know that the colors are flashy but it is to better understand the links between the
names.
All these pragmas are mandatory to describe relations in Fame Meta Meta Model and should
be provided accurately.
And you should put something like:
annotation
<MSEClass: #BehaviouralEntity super: #FAMIXContainerEntity
<package: #FAMIX
^self
On class side of your Moose classes to reference them in the meta model.
After a change in the pragmas, do : MooseModel resetMeta It avoid a lots of problems ;)
Don't hesitate if you have more questions,
Cheers,
Vincent
-----Message d'origine-----
De : moose-dev-bounces(a)list.inf.unibe.ch
[mailto:moose-dev-
bounces(a)list.inf.unibe.ch] De la part de Anne Etien
Envoyé : vendredi 1 juillet 2016 17:10
À : Moose-related development
Objet : [Moose-dev] Re: Documentation about Fame?
Hi,
We asked for an engineer to modify it. We do not know
yet if we got it or not.
What I do is that I use the example of Famix for ST to
create my own FAMIX.
<mutivalued> means that the maximal multiplicity
is *. In that case, you need
FMMultiValueLink. But when you want to initiate one
FMMultivalueLink to
null, you create a FMNullMultiValueLink.
I don't really know when there is <derived>
or not.
Anne
Le 1 juil. 2016 à 16:47, Alexandre Bergel
<alexandre.bergel@me.com<mailto:alexandre.bergel@me.com>> a écrit :
> hi
>
> Is there at least a bit of documentation about
Fame?
> I am trying to meta-describes some C elements,
but it is very difficult.
> All these are very mysterious:
> FMNullMultivalueLink,
> FMMultivalueLink
> FMMultiMultivalueLink
> > <multivalued
> > <derived
>
> I feel Fame is very powerful, but very hard to
understand.
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> > Moose-dev@list.inf.unibe.ch<mailto:Moose-dev@list.inf.unibe.ch
_______________________________________________
Moose-dev mailing list
> Moose-dev@list.inf.unibe.ch<mailto:Moose-dev@list.inf.unibe.ch
!!!*************************************************************************************
"Ce message et les pièces jointes sont confidentiels et réservés à l'usage
exclusif de ses destinataires. Il peut également être protégé par le secret professionnel.
Si vous recevez ce message par erreur, merci d'en avertir immédiatement
l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur
Internet, la responsabilité de Worldline ne pourra être recherchée quant au contenu de ce
message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission
exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa
responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus
transmis.
This e-mail and the documents attached are confidential and intended solely for the
addressee; it may also be privileged. If you receive this e-mail in error, please notify
the sender immediately and destroy it. As its integrity cannot be secured on the Internet,
the Worldline liability cannot be triggered for the message content. Although the sender
endeavours to maintain a computer virus-free network, the sender does not warrant that
this transmission is virus-free and will not be liable for any damages resulting from any
virus transmitted.!!!"