Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Transformation from TA to UPPAAL(Problem with the output model)
Transformation from TA to UPPAAL [message #1502683] Sun, 07 December 2014 22:23 Go to next message
walma gharbi is currently offline walma gharbiFriend
Messages: 14
Registered: April 2014
Junior Member
I have two metamodel the first one is timed automata , the second on is UPPAAL metamodel which was generated automatically using an XSD file , so I have written an ATL file to transform a TA model to UPPAAL .
The out put file wasn't as I expected .
Let me explain more throught an example
I should get this :
<location id="id2">
<name>task 2</name>
</location>
<transition>
<source ref="id1"/>
<target ref="id2"/>
<label kind="assignment">t=0</label>
</transition>

Instead I got
<location id="id2">
<name value="task 2"/>
</location>
<transition>
<source ref="id1"/>
<target ref="id2"/>
<label kind="assignment" value="t=0"/>
</transition>


When I generate the model conforming to the metamodel using emf generator model I obtain the structure that I want but unfortunately with the transformation I don't get the same result .

I just want an idea on how to allocate the problem.
Thank u Smile
Re: Transformation from TA to UPPAAL [message #1505071 is a reply to message #1502683] Tue, 09 December 2014 20:30 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

Can you post your ATL launch configuration XML? You can obtain the launch config XML as follows:


  1. Open your launch configuration using "Run -> Run Configurations..."
  2. Go to the Common tab, and under "Save as" select "Shared file:"
  3. Fill out a folder name, and click "Apply", then "Close".


A .launch file should now be saved in the folder you specified earlier.


Cheers,
Dennis
Re: Transformation from TA to UPPAAL [message #1578516 is a reply to message #1505071] Thu, 22 January 2015 12:52 Go to previous messageGo to next message
walma gharbi is currently offline walma gharbiFriend
Messages: 14
Registered: April 2014
Junior Member
Thank for your response here is the content of the file

Quote:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.m2m.atl.adt.launching.atlTransformation">
<stringAttribute key="ATL File Name" value="/org.eclipse.atlTransformation22/atlTransformation22.atl"/>
<stringAttribute key="ATL VM" value="EMF-specific VM"/>
<stringAttribute key="ATL_COMPILER" value="atl2006"/>
<booleanAttribute key="IS_REFINING" value="false"/>
<mapAttribute key="Input">
<mapEntry key="IN" value="TA"/>
</mapAttribute>
<mapAttribute key="Libs"/>
<mapAttribute key="Model Handler">
<mapEntry key="TA" value="EMF"/>
<mapEntry key="UPPAAL" value="EMF"/>
</mapAttribute>
<mapAttribute key="ModelType">
<mapEntry key="IN" value="MODELINPUT"/>
<mapEntry key="OUT" value="MODELOUTPUT"/>
<mapEntry key="TA" value="METAMODELINPUT"/>
<mapEntry key="UPPAAL" value="METAMODELOUTPUT"/>
</mapAttribute>
<mapAttribute key="Options">
<mapEntry key="OPTION_CLEAR" value="false"/>
<mapEntry key="OPTION_CONTENT_TYPE" value="true"/>
<mapEntry key="OPTION_DERIVED" value="true"/>
<mapEntry key="allowInterModelReferences" value="true"/>
<mapEntry key="printExecutionTime" value="false"/>
<mapEntry key="step" value="false"/>
<mapEntry key="supportUML2Stereotypes" value="false"/>
</mapAttribute>
<listAttribute key="OrderedInput">
<listEntry value="IN"/>
</listAttribute>
<listAttribute key="OrderedOutput">
<listEntry value="OUT"/>
</listAttribute>
<mapAttribute key="Output">
<mapEntry key="OUT" value="UPPAAL"/>
</mapAttribute>
<mapAttribute key="Path">
<mapEntry key="IN" value="/org.eclipse.atlTransformation22/Shipment_model(TA12).xmi"/>
<mapEntry key="OUT" value="/org.eclipse.atlTransformation22/Shipment_model(UP19).xmi"/>
<mapEntry key="TA" value="/org.eclipse.atlTransformation22/Timed-automta.ecore"/>
<mapEntry key="UPPAAL" value="/org.eclipse.atlTransformation22/UPPAAL.ecore"/>
</mapAttribute>
<listAttribute key="Superimpose">
<listEntry value="/org.eclipse.atlTransformation22/atlTransformation22.asm"/>
</listAttribute>
</launchConfiguration>
Re: Transformation from TA to UPPAAL [message #1580596 is a reply to message #1578516] Fri, 23 January 2015 15:48 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

<mapEntry key="UPPAAL" value="/org.eclipse.atlTransformation22/UPPAAL.ecore"/>


EMF models generated from XSD should be referred to by their namespace URI, not the physical location of the .ecore file. You also need to have the generated UPPAAL EMF plugin installed in your Eclipse. This is because only the generated EMF code knows it should use the XSD to load/save models, instead of the generic XMI that is used normally.


Cheers,
Dennis
Re: Transformation from TA to UPPAAL [message #1759683 is a reply to message #1580596] Sat, 15 April 2017 04:09 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
Hi Dennis,
I have the same problem that Walma had.
please can you explain me more : "You need to have the generated UPPAAL EMF plugin installed in your Eclipse.", because i don't find this plugin on the internet.
and, as i understand I have to put also the emf generator model (uppaal.emf) in my project, but can you please explain how to use it to obtain the output file that i want.
Tahnks a lot

[Updated on: Sat, 15 April 2017 04:10]

Report message to a moderator

Re: Transformation from TA to UPPAAL [message #1759700 is a reply to message #1759683] Sun, 16 April 2017 17:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

You can likely find the entire Eclipse plug-in where you found the UPPAAL metamodel, because they go together. The UPPAAL metamodel was generated from an XSD file in this case. You're likely using this metamodel, right?

If this is the case, the top-level project page has some more information on installing. I don't see any generated code for the UPPAAL metamodel, however. Please ask the author how to use the UPPAAL metamodel first.


Cheers,
Dennis
Re: Transformation from TA to UPPAAL [message #1759715 is a reply to message #1759700] Mon, 17 April 2017 12:08 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
hi,
I note that i work on a simplified uppaal.ecore that i created, because, i tried to work with the uppaal meta model that you proposed but it seemed complicated.
so should i create an xsd file that the generated uppal.xmi file should be conform to? can this be a good solution?
well, i tried to create this xsd file, but, the generated file doesn't seem to be conform to that xsd file. the question is, how to make a generated uppaal.xml file conform to a created xsd file.

regards
Re: Transformation from TA to UPPAAL [message #1759735 is a reply to message #1759715] Mon, 17 April 2017 13:13 Go to previous messageGo to next message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

There's an EMF tutorial on using XSD with EMF: http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.emf.doc%2Ftutorials%2Fxlibmod%2Fxlibmod.html

Cheers,
Dennis
Re: Transformation from TA to UPPAAL [message #1759875 is a reply to message #1759735] Wed, 19 April 2017 12:25 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
hi Dennis, thank you a lot.
So i tried this tutorial, and i worked on the library.ecore generated example as my target metamodel as a test, i run the emf project as eclipse application, in the new eclipse instance i created my ATL poject, and as a target MetaModel i chose from EMF registry (as the generated library EMF plugin is installed in my Eclipse) and i did an ATL file for a simple transformation, but i don't get this format:
<books>
<title>Fellowship of the Ring</title>
i always get this instead:
<library:Book title="Fellowship of the Ring"/>
is anything wrong in the steps that i followed?

regards
Re: Transformation from TA to UPPAAL [message #1759895 is a reply to message #1759875] Wed, 19 April 2017 15:35 Go to previous messageGo to next message
im hello world is currently offline im hello worldFriend
Messages: 44
Registered: February 2017
Member
Hi,
So i got the format that i want when i changed the extension of the target file to " .library" , so is it the only solution?
also i had an other solution that i posted here : https://www.eclipse.org/forums/index.php/t/1085662/ but i can't manage it.
Can you please help me.
thanks a lot

[Updated on: Wed, 19 April 2017 15:36]

Report message to a moderator

Re: Transformation from TA to UPPAAL [message #1759980 is a reply to message #1759895] Thu, 20 April 2017 19:00 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 372
Registered: September 2012
Location: Belgium
Senior Member

You indeed have to use the file extension specified in the genmodel file of the metamodel, e.g. ".uppaal".

Cheers,
Dennis
Previous Topic:BPMN to UPPAAL: problem with the target generated model
Next Topic:Sysml Metamodel
Goto Forum:
  


Current Time: Tue Sep 18 17:04:47 GMT 2018

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

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

Back to the top