Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL][AML] List of heuristics
[ATL][AML] List of heuristics [message #523790] Mon, 29 March 2010 11:09 Go to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
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.

Re: [ATL][AML] List of heuristics [message #524365 is a reply to message #523790] Wed, 31 March 2010 16:25 Go to previous messageGo to next message
Kelly Garces is currently offline Kelly GarcesFriend
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 #524481 is a reply to message #524365] Thu, 01 April 2010 06:48 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
Messages: 440
Registered: July 2009
Location: York, United Kingdom
Senior Member
Kelly,

Great. Thanks for the information. I'll look at AMLBasics, and the papers you mentioned.

Cheers,
Louis.
Re: [ATL][AML] List of heuristics [message #526562 is a reply to message #524481] Mon, 12 April 2010 10:01 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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 #526590 is a reply to message #526562] Mon, 12 April 2010 11:32 Go to previous messageGo to next message
Kelly Garces is currently offline Kelly GarcesFriend
Messages: 39
Registered: July 2009
Member
Louis,

I have applied a matching algorithm to the pair of metamodels you indicate. The algorithm is the one within the project GMF I sent you before. This algorithm works quite well in the Model Adaptation use case.
So far, the algorithm does not discover the change:

"referencingElements is moved along the relation figures from the class Figure to the class FigureGallery"

What algorithm are you using?

On the other hand, It seems to me the change of matter is the introduction of a new class named 'FigureDescriptor'. Because it is a new class there is not information to migrate. If I am missing something please let me know, what class FigureDescription corresponds to?

Cheers,

Kelly.

Re: [ATL][AML] List of heuristics [message #526635 is a reply to message #526590] Mon, 12 April 2010 13:33 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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 #526688 is a reply to message #526635] Mon, 12 April 2010 15:18 Go to previous messageGo to next message
Kelly Garces is currently offline Kelly GarcesFriend
Messages: 39
Registered: July 2009
Member
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.

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.

> The GMF algorithm that I'm using is below. I've also tried some
> variations of this:
Yes, this algorithm is quite similar to the one I sent you. I suggest
you to use it to adapt (migrate) models.

Cheers,


[1] Inria technical report, Adaptation of Models to Evolving Metamodels

--
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 #526846 is a reply to message #526688] Tue, 13 April 2010 09:33 Go to previous messageGo to next message
Louis Rose is currently offline Louis RoseFriend
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.
Re: [ATL][AML] List of heuristics [message #526894 is a reply to message #526846] Tue, 13 April 2010 12:31 Go to previous message
Kelly Garces is currently offline Kelly GarcesFriend
Messages: 39
Registered: July 2009
Member
This is a multi-part message in MIME format.
--------------030209030806020101090609
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Louis,

To generate a transformation rule like this, the evolution should be
different from the current one. AML generates this kind of rule if the
"ExtractClass" change is detected. This is not the case within the
actual MinimalGraphAfter.

It seems to me the current pair of metamodels describes a new kind of
complex change (with regarding my initial category). If you want AML to
support it, you need clearly to define the change and modify a heuristic .

On the other hand, If you wish to see how AML deals with the
ExtractClass change, you simply need other MinimalGraphAfter (see
attached file).

Cheers,

Kelly.

--------------030209030806020101090609
Content-Type: text/xml;
name="MinimalGraphAfterV2.ecore"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="MinimalGraphAfterV2.ecore"

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="minimalGraphAfter"
nsURI="minimalGraphAfter" nsPrefix="minimalGraphAfter">
<eClassifiers xsi:type="ecore:EClass" name="Canvas">
<eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
eType="#//Node" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="labels" upperBound="-1"
eType="#//DiagramLabel" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="compartments" upperBound="-1"
eType="#//Compartment" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="connections" upperBound="-1"
eType="#//Connection" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FigureGallery">
<eStructuralFeatures xsi:type="ecore:EReference" name="figures" upperBound="-1"
eType="#//RealFigure" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Figure">
<eStructuralFeatures xsi:type="ecore:EReference" name="descriptors" lowerBound="1"
upperBound="-1" eType="#//FigureDescriptor"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RealFigure" eSuperTypes="#//Figure">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
eType="#//Figure" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="FigureDescriptor">
<eStructuralFeatures xsi:type="ecore:EReference" name="actualFigure" lowerBound="1"
eType="#//Figure" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="accessors" upperBound="-1"
eType="#//ChildAccess" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="referencingElement" lowerBound="1"
eType="#//DiagramElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ChildAccess"/>
<eClassifiers xsi:type="ecore:EClass" name="DiagramElement" abstract="true"/>
<eClassifiers xsi:type="ecore:EClass" name="Node" eSuperTypes="#//DiagramElement"/>
<eClassifiers xsi:type="ecore:EClass" name="DiagramLabel" eSuperTypes="#//DiagramElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="accessor" lowerBound="1"
eType="#//ChildAccess"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Compartment" eSuperTypes="#//DiagramElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Connection" eSuperTypes="#//DiagramElement"/>
</ecore:EPackage>

--------------030209030806020101090609--
Previous Topic:[QVTo] Adding new metamodel to mmregistry.MetamodelRegistry
Next Topic:[ATL] wrong transformation with attribute type java.util.Date
Goto Forum:
  


Current Time: Thu Mar 28 20:08:40 GMT 2024

Powered by FUDForum. Page generated in 0.02394 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top