Home » Archived » M2M (model-to-model transformation) » [ATL][AML] List of heuristics
|
Re: [ATL][AML] List of heuristics [message #524365 is a reply to message #523790] |
Wed, 31 March 2010 16:25 |
Kelly Garces Messages: 39 Registered: July 2009 |
Member |
|
|
Hi Louis,
You can find the list of heuristics in the "AMLBasis.aml" file.
To know what the heuristics do, please take a look to [1][2]. These
references describe most of the heuristics defined in AMLBasis but not
all of them. By sure, you will find the description of heuristics used
in the Metamodel Evolution case. If you are interesting in other
heuristics do not hesitate to ask me.
Cheers
[1] Kelly Garcés, Frédéric Jouault, Pierre Cointe, and Jean Bézivin. A
Domain Specific Language for Expressing Model Matching. In IDM ’09:
Proceedings of the 5ère Journée sur l’Ingénierie Dirigée par les
Modèles, Nancy, France, 2009.
[2] Garces, K., Jouault, F., Cointe, P., Bezivin, J.: Managing Model
Adaptation by Precise Detection of Metamodel Changes. In: In Proc. of
ECMDA 2009, Enschede, The Netherlands, Springer, 2009.
Louis Rose a écrit :
> Hi all,
>
> Is there a definitive list of the heuristics available in AML? I'd like
> to know what heuristics are available, what parameters they take, and
> what they do.
>
> Many thanks,
> Louis.
>
>
--
Kelly Garces - Phd. student
AtlanMod & AsCoLa research teams
École des Mines de Nantes
4, rue Alfred Kastler
44307 Nantes Cedex 3 - France
|
|
| |
Re: [ATL][AML] List of heuristics [message #526562 is a reply to message #524481] |
Mon, 12 April 2010 10:01 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Kelly,
Thanks again for these links, I've read them and done some experimentation, but I'm struggling to find an effective combination of AML heuristics. I wondered if you could advise me a little further.
I'd like to apply AML to two versions of the GMF graph metamodel. For simplicity, I've produced minimal versions of those metamodels. (Download them here.). I'd like to know use AML to generate a migration transformation. I've tried the model flows from your Petri nets and GMF genmodel examples, and several variations on these, but the generated transformation is not quite right.
In particular, AML suggests, for most of the model flows that I've tried, I get a similarity like this:
"referencingElements is moved along the relation figures from the class Figure to the class FigureGallery"
Which I believe leads to the following ATL being generated:
rule FigureGallery_FigureGallery {
from
s : leftminimalGraphBefore!FigureGallery
(
s.oclIsTypeOf(leftminimalGraphBefore!FigureGallery)
)
to
t : rightminimalGraphAfter!FigureGallery (
descriptors <- s.figures->collect(e |
e.referencingElements
)
)
}
In this case, I actually would like AML to generate a transformation that creates a new FigureDescriptor for every Figure in FigureGallery#figures, something like this:
rule FigureGallery_FigureGallery {
from
s : leftminimalGraphBefore!FigureGallery
(
s.oclIsTypeOf(leftminimalGraphBefore!FigureGallery)
)
to
t : rightminimalGraphAfter!FigureGallery (
descriptors <- s.figures->collect(e |
thisModule.createDescriptor(e)
)
)
}
Can AML detect this kind of change? If so, what kind of heuristics should I use?
Many thanks in advance.
Best,
Louis.
|
|
| |
Re: [ATL][AML] List of heuristics [message #526635 is a reply to message #526590] |
Mon, 12 April 2010 13:33 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Kelly,
Thanks for your reply. You're right. My recent experiments had been with variations of the Petri nets algorithm, the GMF algorithm seems not to produce this kind of rule.
I've applied the GMF algorithm (below) to the two metamodels, and AML appears to generate a correct copying transformation.
Yes, the FigureDescriptor class is new. The semantics of the change are (roughly) that a new FigureDescriptor should be created for every existing Figure. Can AML be expected to infer this migration strategy, or is that not feasible?
Thanks again for your help.
Best,
Louis.
The GMF algorithm that I'm using is below. I've also tried some variations of this:
strategy GmfGraph {
uses CreationAddedDeletedThreshold[IN:EqualModel(m1:Metametamodel, m2:Metametamodel)]()
ATLLibraries{
(name='Strings', path='../AMLLibrary/ATL/Helpers')
}
JavaLibraries{
(name='match.SimmetricsSimilarity', path='../AMLLibrary/Jars/simmetrics.jar')
}
models {
map2 : EqualModel(m1:"%EMF", m2:"%EMF")
}
modelsFlow {
c = CreationByFullNameAndType[map2]
filtered = CreationAddedDeletedThreshold[c]
prop = Propagation[filtered]
norm = Normalization[SF[filtered](prop)]
tmpresult = WeightedAverage[0.5 : norm, 0.5:filtered]
both = BothMaxSim[tmpresult]
result = Merge[1.0 : both, 1.0 : c]
diff = Differentiation[result]
td = TypeDifferentiation[diff]
cl = ConceptualLink[td]
rw = Rewriting[cl]
f = FlattenFeatures[rw]
}
}
|
|
| |
Re: [ATL][AML] List of heuristics [message #526846 is a reply to message #526688] |
Tue, 13 April 2010 09:33 |
Louis Rose Messages: 440 Registered: July 2009 Location: York, United Kingdom |
Senior Member |
|
|
Hi Kelly,
Thanks again for your reply.
Kelly Garces wrote on Mon, 12 April 2010 11:18 | Louis,
> The semantics of the change are
> (roughly) that a new FigureDescriptor should be created for every
> existing Figure. Can AML be expected to infer this migration strategy,
> or is that not feasible?
FigureGallery#descriptors currently has a multiplicity equal to 0..*. It
means that a model conforming to MinimalGraphAfter is correct even if
there are not FileDescriptor instances.
That is why AML does not anything with the discovered change.
|
Ok, that makes sense. The model that the transformation produces does conform to MinimalGraphAfter. Just to clarify - would a different heuristic cause AML to generate a transformation rule like this:
rule FigureGallery_FigureGallery {
from
s : leftminimalGraphBefore!FigureGallery
(
s.oclIsTypeOf(leftminimalGraphBefore!FigureGallery)
)
to
t : rightminimalGraphAfter!FigureGallery (
descriptors <- s.figures->collect(e |
thisModule.createDescriptor(e)
)
)
}
Or would I have to alter the generated transformation by hand so that FigureDescriptors are created?
Quote: | Now if the multiplicity becomes 1..*, AML reports a change
"IntroducedRestrictedProperty" which belongs to the "Breaking and
irresolvable" category. As stated in [1], AML lets Users solve this kind
of changes by themselves.
|
That makes sense to me.
Thanks again for your help.
Best,
Louis.
|
|
| |
Goto Forum:
Current Time: Fri Sep 20 20:02:34 GMT 2024
Powered by FUDForum. Page generated in 0.04127 seconds
|