Home » Archived » M2M (model-to-model transformation) » [ATL] AADL Model Transformation
| |
Re: [ATL] AADL Model Transformation [message #76339 is a reply to message #76310] |
Wed, 12 March 2008 12:29 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hello,
Yes, it's strange, but the error message is 'ystemType', not 'systemType'.
This is a minimal input instance:
<?xml version="1.0" encoding="UTF-8"?>
<core:AadlSpec xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
name="aadlClient">
<systemType name="a_temperature_client">
<comment> Client</comment>
<features>
<eventPort name="request" direction="out"/>
<eventDataPort name="response"/>
</features>
</systemType>
<systemImpl name="a_temperature_client.a_impl"
compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
</core:AadlSpec>
Is there anything wrong with it? The validate is successful.
Thanks
Yue
Frédéric Jouault a écrit :
> Hello,
>
> Apparently EMF cannot load your XML document.
>
> According to the error message I would say that you have a typo in your
> document: 'ystemType' instead of 'systemType', but I may be wrong.
>
>
> If you cannot solve this information to solve your problem, could you
> please post here a minimal example exhibiting the problematic behavior?
>
>
> Regards,
>
> Frédéric Jouault
>
>
>
>
> yue a écrit :
>> Hi,
>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>> I have an AADL metamodel with seven .ecore files, and try a very
>> simple transfor rule for systemType and systemImpl.
>>
>> Here is the code I use:
>> module test; -- Module Template
>> create OUT : sme from IN : core;
>>
>> rule RsysImpl{
>> from
>> s : core!SystemImpl
>> to
>> t : sme!ModelDeclaration(
>> name <- 'IMPL_' + s.name
>> )
>> }
>>
>> rule RsysType{
>> from
>> s : core!SystemType
>> to
>> t : sme!ModelDeclaration(
>> name <- 'TYPE_' + s.name
>> )
>> }
>>
>>
>> When the sample model includes only systemType instance, it works; but
>> when systemImpl instance is added, following exception occurs:
>>
>> severe:The feature 'ystemType' is not a valid reference
>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>> valid reference
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>> Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> severe: null
>> java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>
>> The input aaxl in validate successful. I don't understand why this
>> exception occurs.
>> Can someone help me?
>> Thanks in advance.
>>
>> Yue
|
|
|
Re: [ATL] AADL Model Transformation [message #76372 is a reply to message #76339] |
Wed, 12 March 2008 12:49 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------080207080808000401080303
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Yue,
It looks like the @ in front of system is missing in this path:
/aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
This doesn't look like an EMF fragment path either. EMF won't be able
to interpret it without someone writing some code for it...
Something like this is more likely to work correctly:
//@systemType[name='a_temperature_client']
yue wrote:
> Hello,
> Yes, it's strange, but the error message is 'ystemType', not
> 'systemType'.
>
> This is a minimal input instance:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <core:AadlSpec xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
> name="aadlClient">
> <systemType name="a_temperature_client">
> <comment> Client</comment>
> <features>
> <eventPort name="request" direction="out"/>
> <eventDataPort name="response"/>
> </features>
> </systemType>
> <systemImpl name="a_temperature_client.a_impl"
> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>
> </core:AadlSpec>
>
> Is there anything wrong with it? The validate is successful.
> Thanks
>
> Yue
>
>
>
>
>
>
>
> Fr
|
|
|
Re: [ATL] AADL Model Transformation [message #76391 is a reply to message #76372] |
Wed, 12 March 2008 13:02 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi, Ed Merks
Thank you so much, that's the problem, it works now.
Ed Merks a écrit :
> Yue,
>
> It looks like the @ in front of system is missing in this path:
>
> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>
> This doesn't look like an EMF fragment path either. EMF won't be able
> to interpret it without someone writing some code for it...
>
> Something like this is more likely to work correctly:
>
> //@systemType[name='a_temperature_client']
>
>
> yue wrote:
>> Hello,
>> Yes, it's strange, but the error message is 'ystemType', not
>> 'systemType'.
>>
>> This is a minimal input instance:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <core:AadlSpec xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
>> name="aadlClient">
>> <systemType name="a_temperature_client">
>> <comment> Client</comment>
>> <features>
>> <eventPort name="request" direction="out"/>
>> <eventDataPort name="response"/>
>> </features>
>> </systemType>
>> <systemImpl name="a_temperature_client.a_impl"
>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>
>> </core:AadlSpec>
>>
>> Is there anything wrong with it? The validate is successful.
>> Thanks
>>
>> Yue
>>
>>
>>
>>
>>
>>
>>
>> Frédéric Jouault a écrit :
>>> Hello,
>>>
>>> Apparently EMF cannot load your XML document.
>>>
>>> According to the error message I would say that you have a typo in
>>> your document: 'ystemType' instead of 'systemType', but I may be wrong.
>>>
>>>
>>> If you cannot solve this information to solve your problem, could you
>>> please post here a minimal example exhibiting the problematic behavior?
>>>
>>>
>>> Regards,
>>>
>>> Frédéric Jouault
>>>
>>>
>>>
>>>
>>> yue a écrit :
>>>> Hi,
>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>> simple transfor rule for systemType and systemImpl.
>>>>
>>>> Here is the code I use:
>>>> module test; -- Module Template
>>>> create OUT : sme from IN : core;
>>>>
>>>> rule RsysImpl{
>>>> from
>>>> s : core!SystemImpl
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'IMPL_' + s.name
>>>> )
>>>> }
>>>>
>>>> rule RsysType{
>>>> from
>>>> s : core!SystemType
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'TYPE_' + s.name
>>>> )
>>>> }
>>>>
>>>>
>>>> When the sample model includes only systemType instance, it works;
>>>> but when systemImpl instance is added, following exception occurs:
>>>>
>>>> severe:The feature 'ystemType' is not a valid reference
>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>>>> valid reference
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> severe: null
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>
>>>>
>>>> The input aaxl in validate successful. I don't understand why this
>>>> exception occurs.
>>>> Can someone help me?
>>>> Thanks in advance.
>>>>
>>>> Yue
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76407 is a reply to message #76391] |
Wed, 12 March 2008 14:15 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------050504020704050403090802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Hi Yue,
May I ask you how got got this model ?
Quentin
yue a
|
|
|
Re: [ATL] AADL Model Transformation [message #76426 is a reply to message #76407] |
Wed, 12 March 2008 14:41 |
Ivano Messages: 35 Registered: July 2009 |
Member |
|
|
Hi Quentin,
the format used by Yue is the .aaxl files one, it is obtained
simply by creating an AADL diagram in OSATE.
If you want to have an EMF compliant model (i.e. with the references
a la EMF) you have to enable it in the OSATE preferences.
I hope I have answered to your question,
Ivano
Quentin Glineur ha scritto:
> Hi Yue,
>
> May I ask you how got got this model ?
>
> Quentin
>
> yue a écrit :
>> Hi, Ed Merks
>>
>> Thank you so much, that's the problem, it works now.
>>
>>
>>
>>
>> Ed Merks a écrit :
>>> Yue,
>>>
>>> It looks like the @ in front of system is missing in this path:
>>>
>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>
>>> This doesn't look like an EMF fragment path either. EMF won't be
>>> able to interpret it without someone writing some code for it...
>>>
>>> Something like this is more likely to work correctly:
>>>
>>> //@systemType[name='a_temperature_client']
>>>
>>>
>>> yue wrote:
>>>> Hello,
>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>> 'systemType'.
>>>>
>>>> This is a minimal input instance:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <core:AadlSpec xmi:version="2.0"
>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>> <systemType name="a_temperature_client">
>>>> <comment> Client</comment>
>>>> <features>
>>>> <eventPort name="request" direction="out"/>
>>>> <eventDataPort name="response"/>
>>>> </features>
>>>> </systemType>
>>>> <systemImpl name="a_temperature_client.a_impl"
>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>
>>>> </core:AadlSpec>
>>>>
>>>> Is there anything wrong with it? The validate is successful.
>>>> Thanks
>>>>
>>>> Yue
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Frédéric Jouault a écrit :
>>>>> Hello,
>>>>>
>>>>> Apparently EMF cannot load your XML document.
>>>>>
>>>>> According to the error message I would say that you have a typo in
>>>>> your document: 'ystemType' instead of 'systemType', but I may be
>>>>> wrong.
>>>>>
>>>>>
>>>>> If you cannot solve this information to solve your problem, could
>>>>> you please post here a minimal example exhibiting the problematic
>>>>> behavior?
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Frédéric Jouault
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> yue a écrit :
>>>>>> Hi,
>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>>> simple transfor rule for systemType and systemImpl.
>>>>>>
>>>>>> Here is the code I use:
>>>>>> module test; -- Module Template
>>>>>> create OUT : sme from IN : core;
>>>>>>
>>>>>> rule RsysImpl{
>>>>>> from
>>>>>> s : core!SystemImpl
>>>>>> to
>>>>>> t : sme!ModelDeclaration(
>>>>>> name <- 'IMPL_' + s.name
>>>>>> )
>>>>>> }
>>>>>>
>>>>>> rule RsysType{
>>>>>> from
>>>>>> s : core!SystemType
>>>>>> to
>>>>>> t : sme!ModelDeclaration(
>>>>>> name <- 'TYPE_' + s.name
>>>>>> )
>>>>>> }
>>>>>>
>>>>>>
>>>>>> When the sample model includes only systemType instance, it works;
>>>>>> but when systemImpl instance is added, following exception occurs:
>>>>>>
>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not
>>>>>> a valid reference
>>>>>> at
>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>
>>>>>> at
>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>> Source)
>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>
>>>>>> at
>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>
>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>> severe: null
>>>>>> java.lang.NullPointerException
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>
>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>
>>>>>>
>>>>>> The input aaxl in validate successful. I don't understand why this
>>>>>> exception occurs.
>>>>>> Can someone help me?
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Yue
>>>
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76441 is a reply to message #76426] |
Wed, 12 March 2008 14:49 |
Eclipse User |
|
|
|
Originally posted by: quentin.glineur.obeo.fr
This is a multi-part message in MIME format.
--------------090907040000030902020403
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Thank you very much for the informations!
Quentin
Ivano a
|
|
|
Re: [ATL] AADL Model Transformation [message #76456 is a reply to message #76372] |
Wed, 12 March 2008 15:21 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hello Ed Merks,
I still have one question.
This is the instance model following your advice:
<?xml version="1.0" encoding="UTF-8"?>
<core:AadlSpec xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
name="aadlClient">
<systemType name="a_temperature_client">
<comment> Client</comment>
<features>
<eventPort name="request" direction="out"/>
<eventDataPort name="response"/>
</features>
</systemType>
<systemImpl name="a_temperature_client.a_impl"
compType="//@systemType[name='a_temperature_client']"/>
</core:AadlSpec>
There is a model validation problem: "the required feature 'compType' of
'System Impl a_temperature_clienta_impl' must be set"
Am I set the right path?
Yue
Ed Merks a écrit :
> Yue,
>
> It looks like the @ in front of system is missing in this path:
>
> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>
> This doesn't look like an EMF fragment path either. EMF won't be able
> to interpret it without someone writing some code for it...
>
> Something like this is more likely to work correctly:
>
> //@systemType[name='a_temperature_client']
>
>
> yue wrote:
>> Hello,
>> Yes, it's strange, but the error message is 'ystemType', not
>> 'systemType'.
>>
>> This is a minimal input instance:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <core:AadlSpec xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
>> name="aadlClient">
>> <systemType name="a_temperature_client">
>> <comment> Client</comment>
>> <features>
>> <eventPort name="request" direction="out"/>
>> <eventDataPort name="response"/>
>> </features>
>> </systemType>
>> <systemImpl name="a_temperature_client.a_impl"
>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>
>> </core:AadlSpec>
>>
>> Is there anything wrong with it? The validate is successful.
>> Thanks
>>
>> Yue
>>
>>
>>
>>
>>
>>
>>
>> Frédéric Jouault a écrit :
>>> Hello,
>>>
>>> Apparently EMF cannot load your XML document.
>>>
>>> According to the error message I would say that you have a typo in
>>> your document: 'ystemType' instead of 'systemType', but I may be wrong.
>>>
>>>
>>> If you cannot solve this information to solve your problem, could you
>>> please post here a minimal example exhibiting the problematic behavior?
>>>
>>>
>>> Regards,
>>>
>>> Frédéric Jouault
>>>
>>>
>>>
>>>
>>> yue a écrit :
>>>> Hi,
>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>> simple transfor rule for systemType and systemImpl.
>>>>
>>>> Here is the code I use:
>>>> module test; -- Module Template
>>>> create OUT : sme from IN : core;
>>>>
>>>> rule RsysImpl{
>>>> from
>>>> s : core!SystemImpl
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'IMPL_' + s.name
>>>> )
>>>> }
>>>>
>>>> rule RsysType{
>>>> from
>>>> s : core!SystemType
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'TYPE_' + s.name
>>>> )
>>>> }
>>>>
>>>>
>>>> When the sample model includes only systemType instance, it works;
>>>> but when systemImpl instance is added, following exception occurs:
>>>>
>>>> severe:The feature 'ystemType' is not a valid reference
>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>>>> valid reference
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> severe: null
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>
>>>>
>>>> The input aaxl in validate successful. I don't understand why this
>>>> exception occurs.
>>>> Can someone help me?
>>>> Thanks in advance.
>>>>
>>>> Yue
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76473 is a reply to message #76456] |
Wed, 12 March 2008 15:27 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Yue,
An IDREF should normally be resolved as the document is processed and
should produce an error if it fails. But it does sound like it's not
been set. You might set a breakpoint on ResourceImpl.getEObject to
monitor what happens when it's called for the string below and verify
that it's behaving correctly.
yue wrote:
> Hello Ed Merks,
> I still have one question.
>
> This is the instance model following your advice:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <core:AadlSpec xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
> name="aadlClient">
> <systemType name="a_temperature_client">
> <comment> Client</comment>
> <features>
> <eventPort name="request" direction="out"/>
> <eventDataPort name="response"/>
> </features>
> </systemType>
> <systemImpl name="a_temperature_client.a_impl"
> compType="//@systemType[name='a_temperature_client']"/>
> </core:AadlSpec>
>
> There is a model validation problem: "the required feature 'compType'
> of 'System Impl a_temperature_clienta_impl' must be set"
>
> Am I set the right path?
>
> Yue
>
>
>
> Ed Merks a écrit :
>> Yue,
>>
>> It looks like the @ in front of system is missing in this path:
>>
>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>
>> This doesn't look like an EMF fragment path either. EMF won't be
>> able to interpret it without someone writing some code for it...
>>
>> Something like this is more likely to work correctly:
>>
>> //@systemType[name='a_temperature_client']
>>
>>
>> yue wrote:
>>> Hello,
>>> Yes, it's strange, but the error message is 'ystemType', not
>>> 'systemType'.
>>>
>>> This is a minimal input instance:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <core:AadlSpec xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>> <systemType name="a_temperature_client">
>>> <comment> Client</comment>
>>> <features>
>>> <eventPort name="request" direction="out"/>
>>> <eventDataPort name="response"/>
>>> </features>
>>> </systemType>
>>> <systemImpl name="a_temperature_client.a_impl"
>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>
>>> </core:AadlSpec>
>>>
>>> Is there anything wrong with it? The validate is successful.
>>> Thanks
>>>
>>> Yue
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Frédéric Jouault a écrit :
>>>> Hello,
>>>>
>>>> Apparently EMF cannot load your XML document.
>>>>
>>>> According to the error message I would say that you have a typo in
>>>> your document: 'ystemType' instead of 'systemType', but I may be
>>>> wrong.
>>>>
>>>>
>>>> If you cannot solve this information to solve your problem, could
>>>> you please post here a minimal example exhibiting the problematic
>>>> behavior?
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Frédéric Jouault
>>>>
>>>>
>>>>
>>>>
>>>> yue a écrit :
>>>>> Hi,
>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>> simple transfor rule for systemType and systemImpl.
>>>>>
>>>>> Here is the code I use:
>>>>> module test; -- Module Template
>>>>> create OUT : sme from IN : core;
>>>>>
>>>>> rule RsysImpl{
>>>>> from
>>>>> s : core!SystemImpl
>>>>> to
>>>>> t : sme!ModelDeclaration(
>>>>> name <- 'IMPL_' + s.name
>>>>> )
>>>>> }
>>>>>
>>>>> rule RsysType{
>>>>> from
>>>>> s : core!SystemType
>>>>> to
>>>>> t : sme!ModelDeclaration(
>>>>> name <- 'TYPE_' + s.name
>>>>> )
>>>>> }
>>>>>
>>>>>
>>>>> When the sample model includes only systemType instance, it works;
>>>>> but when systemImpl instance is added, following exception occurs:
>>>>>
>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not
>>>>> a valid reference
>>>>> at
>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>
>>>>> at
>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>
>>>>> at
>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>
>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>> severe: null
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>
>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>
>>>>>
>>>>> The input aaxl in validate successful. I don't understand why this
>>>>> exception occurs.
>>>>> Can someone help me?
>>>>> Thanks in advance.
>>>>>
>>>>> Yue
>>
|
|
|
Re: [ATL] AADL Model Transformation [message #76506 is a reply to message #76473] |
Wed, 12 March 2008 17:08 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi,
In which plug-in can I find the ResourceImpl.getEObject ?
Is it this class org.eclipse.emf.ecore.resource.impl.ResourceImpl ?
Because, when I load the file, the execution stops on a lot of elements
that does not appear in my aadl example file...
Regards
Yue
Ed Merks a écrit :
> Yue,
>
> An IDREF should normally be resolved as the document is processed and
> should produce an error if it fails. But it does sound like it's not
> been set. You might set a breakpoint on ResourceImpl.getEObject to
> monitor what happens when it's called for the string below and verify
> that it's behaving correctly.
>
>
> yue wrote:
>> Hello Ed Merks,
>> I still have one question.
>>
>> This is the instance model following your advice:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <core:AadlSpec xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
>> name="aadlClient">
>> <systemType name="a_temperature_client">
>> <comment> Client</comment>
>> <features>
>> <eventPort name="request" direction="out"/>
>> <eventDataPort name="response"/>
>> </features>
>> </systemType>
>> <systemImpl name="a_temperature_client.a_impl"
>> compType="//@systemType[name='a_temperature_client']"/>
>> </core:AadlSpec>
>>
>> There is a model validation problem: "the required feature 'compType'
>> of 'System Impl a_temperature_clienta_impl' must be set"
>>
>> Am I set the right path?
>>
>> Yue
>>
>>
>>
>> Ed Merks a écrit :
>>> Yue,
>>>
>>> It looks like the @ in front of system is missing in this path:
>>>
>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>
>>> This doesn't look like an EMF fragment path either. EMF won't be
>>> able to interpret it without someone writing some code for it...
>>>
>>> Something like this is more likely to work correctly:
>>>
>>> //@systemType[name='a_temperature_client']
>>>
>>>
>>> yue wrote:
>>>> Hello,
>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>> 'systemType'.
>>>>
>>>> This is a minimal input instance:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <core:AadlSpec xmi:version="2.0"
>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>> <systemType name="a_temperature_client">
>>>> <comment> Client</comment>
>>>> <features>
>>>> <eventPort name="request" direction="out"/>
>>>> <eventDataPort name="response"/>
>>>> </features>
>>>> </systemType>
>>>> <systemImpl name="a_temperature_client.a_impl"
>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>
>>>> </core:AadlSpec>
>>>>
>>>> Is there anything wrong with it? The validate is successful.
>>>> Thanks
>>>>
>>>> Yue
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Frédéric Jouault a écrit :
>>>>> Hello,
>>>>>
>>>>> Apparently EMF cannot load your XML document.
>>>>>
>>>>> According to the error message I would say that you have a typo in
>>>>> your document: 'ystemType' instead of 'systemType', but I may be
>>>>> wrong.
>>>>>
>>>>>
>>>>> If you cannot solve this information to solve your problem, could
>>>>> you please post here a minimal example exhibiting the problematic
>>>>> behavior?
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Frédéric Jouault
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> yue a écrit :
>>>>>> Hi,
>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>>> simple transfor rule for systemType and systemImpl.
>>>>>>
>>>>>> Here is the code I use:
>>>>>> module test; -- Module Template
>>>>>> create OUT : sme from IN : core;
>>>>>>
>>>>>> rule RsysImpl{
>>>>>> from
>>>>>> s : core!SystemImpl
>>>>>> to
>>>>>> t : sme!ModelDeclaration(
>>>>>> name <- 'IMPL_' + s.name
>>>>>> )
>>>>>> }
>>>>>>
>>>>>> rule RsysType{
>>>>>> from
>>>>>> s : core!SystemType
>>>>>> to
>>>>>> t : sme!ModelDeclaration(
>>>>>> name <- 'TYPE_' + s.name
>>>>>> )
>>>>>> }
>>>>>>
>>>>>>
>>>>>> When the sample model includes only systemType instance, it works;
>>>>>> but when systemImpl instance is added, following exception occurs:
>>>>>>
>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not
>>>>>> a valid reference
>>>>>> at
>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>
>>>>>> at
>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>> Source)
>>>>>> at
>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>> Source)
>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>> at
>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>
>>>>>> at
>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>
>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>> severe: null
>>>>>> java.lang.NullPointerException
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>
>>>>>> at
>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>
>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>
>>>>>>
>>>>>> The input aaxl in validate successful. I don't understand why this
>>>>>> exception occurs.
>>>>>> Can someone help me?
>>>>>> Thanks in advance.
>>>>>>
>>>>>> Yue
>>>
|
|
|
Re: [ATL] AADL Model Transformation [message #76519 is a reply to message #76506] |
Wed, 12 March 2008 17:23 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Yue,
Yep. That's the one. That method will indeed be used a lot. Eclipse
has really cool support for conditional breakpoints if you right click
and edit the properties of the breakpoint. So you might set the
condition to
uri.toString().contains("<something-unique-in-your-instance's-URI >") or
perhaps uriFragment.contains("@system")...
yue wrote:
> Hi,
>
> In which plug-in can I find the ResourceImpl.getEObject ?
> Is it this class org.eclipse.emf.ecore.resource.impl.ResourceImpl ?
> Because, when I load the file, the execution stops on a lot of
> elements that does not appear in my aadl example file...
>
>
> Regards
> Yue
>
>
>
>
> Ed Merks a écrit :
>> Yue,
>>
>> An IDREF should normally be resolved as the document is processed and
>> should produce an error if it fails. But it does sound like it's not
>> been set. You might set a breakpoint on ResourceImpl.getEObject to
>> monitor what happens when it's called for the string below and verify
>> that it's behaving correctly.
>>
>>
>> yue wrote:
>>> Hello Ed Merks,
>>> I still have one question.
>>>
>>> This is the instance model following your advice:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <core:AadlSpec xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>> <systemType name="a_temperature_client">
>>> <comment> Client</comment>
>>> <features>
>>> <eventPort name="request" direction="out"/>
>>> <eventDataPort name="response"/>
>>> </features>
>>> </systemType>
>>> <systemImpl name="a_temperature_client.a_impl"
>>> compType="//@systemType[name='a_temperature_client']"/>
>>> </core:AadlSpec>
>>>
>>> There is a model validation problem: "the required feature
>>> 'compType' of 'System Impl a_temperature_clienta_impl' must be set"
>>>
>>> Am I set the right path?
>>>
>>> Yue
>>>
>>>
>>>
>>> Ed Merks a écrit :
>>>> Yue,
>>>>
>>>> It looks like the @ in front of system is missing in this path:
>>>>
>>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>>
>>>> This doesn't look like an EMF fragment path either. EMF won't be
>>>> able to interpret it without someone writing some code for it...
>>>>
>>>> Something like this is more likely to work correctly:
>>>>
>>>> //@systemType[name='a_temperature_client']
>>>>
>>>>
>>>> yue wrote:
>>>>> Hello,
>>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>>> 'systemType'.
>>>>>
>>>>> This is a minimal input instance:
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <core:AadlSpec xmi:version="2.0"
>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>> <systemType name="a_temperature_client">
>>>>> <comment> Client</comment>
>>>>> <features>
>>>>> <eventPort name="request" direction="out"/>
>>>>> <eventDataPort name="response"/>
>>>>> </features>
>>>>> </systemType>
>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>>
>>>>> </core:AadlSpec>
>>>>>
>>>>> Is there anything wrong with it? The validate is successful.
>>>>> Thanks
>>>>>
>>>>> Yue
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Frédéric Jouault a écrit :
>>>>>> Hello,
>>>>>>
>>>>>> Apparently EMF cannot load your XML document.
>>>>>>
>>>>>> According to the error message I would say that you have a typo
>>>>>> in your document: 'ystemType' instead of 'systemType', but I may
>>>>>> be wrong.
>>>>>>
>>>>>>
>>>>>> If you cannot solve this information to solve your problem, could
>>>>>> you please post here a minimal example exhibiting the problematic
>>>>>> behavior?
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Frédéric Jouault
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> yue a écrit :
>>>>>>> Hi,
>>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>>>> simple transfor rule for systemType and systemImpl.
>>>>>>>
>>>>>>> Here is the code I use:
>>>>>>> module test; -- Module Template
>>>>>>> create OUT : sme from IN : core;
>>>>>>>
>>>>>>> rule RsysImpl{
>>>>>>> from
>>>>>>> s : core!SystemImpl
>>>>>>> to
>>>>>>> t : sme!ModelDeclaration(
>>>>>>> name <- 'IMPL_' + s.name
>>>>>>> )
>>>>>>> }
>>>>>>>
>>>>>>> rule RsysType{
>>>>>>> from
>>>>>>> s : core!SystemType
>>>>>>> to
>>>>>>> t : sme!ModelDeclaration(
>>>>>>> name <- 'TYPE_' + s.name
>>>>>>> )
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> When the sample model includes only systemType instance, it
>>>>>>> works; but when systemImpl instance is added, following
>>>>>>> exception occurs:
>>>>>>>
>>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is
>>>>>>> not a valid reference
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>>
>>>>>>> at
>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>>
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>> Source)
>>>>>>> at
>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>> Source)
>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>
>>>>>>> at
>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>
>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>> severe: null
>>>>>>> java.lang.NullPointerException
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>
>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>
>>>>>>>
>>>>>>> The input aaxl in validate successful. I don't understand why
>>>>>>> this exception occurs.
>>>>>>> Can someone help me?
>>>>>>> Thanks in advance.
>>>>>>>
>>>>>>> Yue
>>>>
|
|
|
Re: [ATL] AADL Model Transformation [message #76599 is a reply to message #76519] |
Thu, 13 March 2008 10:01 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Ed,
I traced the getEObject method.
the input:
uriFragment= "//@systemType[name=/a_temperature_client']"
and the output:
uriFragmentPath[0]=""
uriFragmentPath[1]="@systemType[name=/a_temperature_client'] "
uriFragmentPath[2]=null
uriFragmentPath[3]=null
Is this behaving correctly?
Yue
Ed Merks a écrit :
> Yue,
>
> Yep. That's the one. That method will indeed be used a lot. Eclipse
> has really cool support for conditional breakpoints if you right click
> and edit the properties of the breakpoint. So you might set the
> condition to
> uri.toString().contains("<something-unique-in-your-instance's-URI >") or
> perhaps uriFragment.contains("@system")...
>
>
> yue wrote:
>> Hi,
>>
>> In which plug-in can I find the ResourceImpl.getEObject ?
>> Is it this class org.eclipse.emf.ecore.resource.impl.ResourceImpl ?
>> Because, when I load the file, the execution stops on a lot of
>> elements that does not appear in my aadl example file...
>>
>>
>> Regards
>> Yue
>>
>>
>>
>>
>> Ed Merks a écrit :
>>> Yue,
>>>
>>> An IDREF should normally be resolved as the document is processed and
>>> should produce an error if it fails. But it does sound like it's not
>>> been set. You might set a breakpoint on ResourceImpl.getEObject to
>>> monitor what happens when it's called for the string below and verify
>>> that it's behaving correctly.
>>>
>>>
>>> yue wrote:
>>>> Hello Ed Merks,
>>>> I still have one question.
>>>>
>>>> This is the instance model following your advice:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <core:AadlSpec xmi:version="2.0"
>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>> <systemType name="a_temperature_client">
>>>> <comment> Client</comment>
>>>> <features>
>>>> <eventPort name="request" direction="out"/>
>>>> <eventDataPort name="response"/>
>>>> </features>
>>>> </systemType>
>>>> <systemImpl name="a_temperature_client.a_impl"
>>>> compType="//@systemType[name='a_temperature_client']"/>
>>>> </core:AadlSpec>
>>>>
>>>> There is a model validation problem: "the required feature
>>>> 'compType' of 'System Impl a_temperature_clienta_impl' must be set"
>>>>
>>>> Am I set the right path?
>>>>
>>>> Yue
>>>>
>>>>
>>>>
>>>> Ed Merks a écrit :
>>>>> Yue,
>>>>>
>>>>> It looks like the @ in front of system is missing in this path:
>>>>>
>>>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>>>
>>>>> This doesn't look like an EMF fragment path either. EMF won't be
>>>>> able to interpret it without someone writing some code for it...
>>>>>
>>>>> Something like this is more likely to work correctly:
>>>>>
>>>>> //@systemType[name='a_temperature_client']
>>>>>
>>>>>
>>>>> yue wrote:
>>>>>> Hello,
>>>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>>>> 'systemType'.
>>>>>>
>>>>>> This is a minimal input instance:
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <core:AadlSpec xmi:version="2.0"
>>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>>> <systemType name="a_temperature_client">
>>>>>> <comment> Client</comment>
>>>>>> <features>
>>>>>> <eventPort name="request" direction="out"/>
>>>>>> <eventDataPort name="response"/>
>>>>>> </features>
>>>>>> </systemType>
>>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>>>
>>>>>> </core:AadlSpec>
>>>>>>
>>>>>> Is there anything wrong with it? The validate is successful.
>>>>>> Thanks
>>>>>>
>>>>>> Yue
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Frédéric Jouault a écrit :
>>>>>>> Hello,
>>>>>>>
>>>>>>> Apparently EMF cannot load your XML document.
>>>>>>>
>>>>>>> According to the error message I would say that you have a typo
>>>>>>> in your document: 'ystemType' instead of 'systemType', but I may
>>>>>>> be wrong.
>>>>>>>
>>>>>>>
>>>>>>> If you cannot solve this information to solve your problem, could
>>>>>>> you please post here a minimal example exhibiting the problematic
>>>>>>> behavior?
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Frédéric Jouault
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> yue a écrit :
>>>>>>>> Hi,
>>>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>>>>> simple transfor rule for systemType and systemImpl.
>>>>>>>>
>>>>>>>> Here is the code I use:
>>>>>>>> module test; -- Module Template
>>>>>>>> create OUT : sme from IN : core;
>>>>>>>>
>>>>>>>> rule RsysImpl{
>>>>>>>> from
>>>>>>>> s : core!SystemImpl
>>>>>>>> to
>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>> name <- 'IMPL_' + s.name
>>>>>>>> )
>>>>>>>> }
>>>>>>>>
>>>>>>>> rule RsysType{
>>>>>>>> from
>>>>>>>> s : core!SystemType
>>>>>>>> to
>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>> name <- 'TYPE_' + s.name
>>>>>>>> )
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> When the sample model includes only systemType instance, it
>>>>>>>> works; but when systemImpl instance is added, following
>>>>>>>> exception occurs:
>>>>>>>>
>>>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is
>>>>>>>> not a valid reference
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>>>
>>>>>>>> at
>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>>>
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>>> Source)
>>>>>>>> at
>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>>> Source)
>>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>>
>>>>>>>> at
>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>
>>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>> severe: null
>>>>>>>> java.lang.NullPointerException
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>
>>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>>
>>>>>>>>
>>>>>>>> The input aaxl in validate successful. I don't understand why
>>>>>>>> this exception occurs.
>>>>>>>> Can someone help me?
>>>>>>>> Thanks in advance.
>>>>>>>>
>>>>>>>> Yue
>>>>>
|
|
|
Re: [ATL] AADL Model Transformation [message #76615 is a reply to message #76372] |
Thu, 13 March 2008 10:47 |
Cyril Faucher Messages: 63 Registered: July 2009 |
Member |
|
|
Hi Ed and Yue,
This topic was discussing on the Kermeta list some months
(kermeta-users@lists.gforge.inria.fr - 2007-04-13 and 2007-12-17) ago.
It seems there is a workaround to use the EMF way for the serialization:
Go in the Eclipse preferences, item "OSATE Preferences" and check the
box: "Use EMF reference format [...]".
Best regards,
Cyril.
Ed Merks a écrit :
> Yue,
>
> It looks like the @ in front of system is missing in this path:
>
> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>
> This doesn't look like an EMF fragment path either. EMF won't be able
> to interpret it without someone writing some code for it...
>
> Something like this is more likely to work correctly:
>
> //@systemType[name='a_temperature_client']
>
>
> yue wrote:
>> Hello,
>> Yes, it's strange, but the error message is 'ystemType', not
>> 'systemType'.
>>
>> This is a minimal input instance:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <core:AadlSpec xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
>> name="aadlClient">
>> <systemType name="a_temperature_client">
>> <comment> Client</comment>
>> <features>
>> <eventPort name="request" direction="out"/>
>> <eventDataPort name="response"/>
>> </features>
>> </systemType>
>> <systemImpl name="a_temperature_client.a_impl"
>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>
>> </core:AadlSpec>
>>
>> Is there anything wrong with it? The validate is successful.
>> Thanks
>>
>> Yue
>>
>>
>>
>>
>>
>>
>>
>> Frédéric Jouault a écrit :
>>> Hello,
>>>
>>> Apparently EMF cannot load your XML document.
>>>
>>> According to the error message I would say that you have a typo in
>>> your document: 'ystemType' instead of 'systemType', but I may be wrong.
>>>
>>>
>>> If you cannot solve this information to solve your problem, could you
>>> please post here a minimal example exhibiting the problematic behavior?
>>>
>>>
>>> Regards,
>>>
>>> Frédéric Jouault
>>>
>>>
>>>
>>>
>>> yue a écrit :
>>>> Hi,
>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>> simple transfor rule for systemType and systemImpl.
>>>>
>>>> Here is the code I use:
>>>> module test; -- Module Template
>>>> create OUT : sme from IN : core;
>>>>
>>>> rule RsysImpl{
>>>> from
>>>> s : core!SystemImpl
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'IMPL_' + s.name
>>>> )
>>>> }
>>>>
>>>> rule RsysType{
>>>> from
>>>> s : core!SystemType
>>>> to
>>>> t : sme!ModelDeclaration(
>>>> name <- 'TYPE_' + s.name
>>>> )
>>>> }
>>>>
>>>>
>>>> When the sample model includes only systemType instance, it works;
>>>> but when systemImpl instance is added, following exception occurs:
>>>>
>>>> severe:The feature 'ystemType' is not a valid reference
>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>>>> valid reference
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>> Source)
>>>> at
>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>> Source)
>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>> at
>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>
>>>> at
>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>> severe: null
>>>> java.lang.NullPointerException
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>
>>>> at
>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>
>>>> at
>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>
>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>
>>>>
>>>> The input aaxl in validate successful. I don't understand why this
>>>> exception occurs.
>>>> Can someone help me?
>>>> Thanks in advance.
>>>>
>>>> Yue
>
--
Cyril Faucher
IRISA-INRIA - Rennes, France
[Breathe life into your metamodels www.kermeta.org]
|
|
|
Re: [ATL] AADL Model Transformation [message #76632 is a reply to message #76615] |
Thu, 13 March 2008 11:07 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi Cyril,
Thank you so much
Yue
Cyril Faucher a écrit :
> Hi Ed and Yue,
>
> This topic was discussing on the Kermeta list some months
> (kermeta-users@lists.gforge.inria.fr - 2007-04-13 and 2007-12-17) ago.
>
> It seems there is a workaround to use the EMF way for the serialization:
> Go in the Eclipse preferences, item "OSATE Preferences" and check the
> box: "Use EMF reference format [...]".
>
> Best regards,
> Cyril.
>
> Ed Merks a écrit :
>> Yue,
>>
>> It looks like the @ in front of system is missing in this path:
>>
>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>
>> This doesn't look like an EMF fragment path either. EMF won't be
>> able to interpret it without someone writing some code for it...
>>
>> Something like this is more likely to work correctly:
>>
>> //@systemType[name='a_temperature_client']
>>
>>
>> yue wrote:
>>> Hello,
>>> Yes, it's strange, but the error message is 'ystemType', not
>>> 'systemType'.
>>>
>>> This is a minimal input instance:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <core:AadlSpec xmi:version="2.0"
>>> xmlns:xmi="http://www.omg.org/XMI" xmlns:core="http:///AADL/core"
>>> name="aadlClient">
>>> <systemType name="a_temperature_client">
>>> <comment> Client</comment>
>>> <features>
>>> <eventPort name="request" direction="out"/>
>>> <eventDataPort name="response"/>
>>> </features>
>>> </systemType>
>>> <systemImpl name="a_temperature_client.a_impl"
>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>
>>> </core:AadlSpec>
>>>
>>> Is there anything wrong with it? The validate is successful.
>>> Thanks
>>>
>>> Yue
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Frédéric Jouault a écrit :
>>>> Hello,
>>>>
>>>> Apparently EMF cannot load your XML document.
>>>>
>>>> According to the error message I would say that you have a typo in
>>>> your document: 'ystemType' instead of 'systemType', but I may be wrong.
>>>>
>>>>
>>>> If you cannot solve this information to solve your problem, could
>>>> you please post here a minimal example exhibiting the problematic
>>>> behavior?
>>>>
>>>>
>>>> Regards,
>>>>
>>>> Frédéric Jouault
>>>>
>>>>
>>>>
>>>>
>>>> yue a écrit :
>>>>> Hi,
>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>> I have an AADL metamodel with seven .ecore files, and try a very
>>>>> simple transfor rule for systemType and systemImpl.
>>>>>
>>>>> Here is the code I use:
>>>>> module test; -- Module Template
>>>>> create OUT : sme from IN : core;
>>>>>
>>>>> rule RsysImpl{
>>>>> from
>>>>> s : core!SystemImpl
>>>>> to
>>>>> t : sme!ModelDeclaration(
>>>>> name <- 'IMPL_' + s.name
>>>>> )
>>>>> }
>>>>>
>>>>> rule RsysType{
>>>>> from
>>>>> s : core!SystemType
>>>>> to
>>>>> t : sme!ModelDeclaration(
>>>>> name <- 'TYPE_' + s.name
>>>>> )
>>>>> }
>>>>>
>>>>>
>>>>> When the sample model includes only systemType instance, it works;
>>>>> but when systemImpl instance is added, following exception occurs:
>>>>>
>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is not
>>>>> a valid reference
>>>>> at
>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>
>>>>> at
>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>> Source)
>>>>> at
>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>> Source)
>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>> at
>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>
>>>>> at
>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>
>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>> severe: null
>>>>> java.lang.NullPointerException
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>
>>>>> at
>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>
>>>>> at
>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>
>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>
>>>>>
>>>>> The input aaxl in validate successful. I don't understand why this
>>>>> exception occurs.
>>>>> Can someone help me?
>>>>> Thanks in advance.
>>>>>
>>>>> Yue
>>
>
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76652 is a reply to message #76599] |
Thu, 13 March 2008 13:08 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------060900000901040703070402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
Yue,
I gather the other mechanism is x-path based and is supported by
kermeta. In any case, the string you show below is not the same as what
I suggested earlier:
//@systemType[name='a_temperature_client']
Note the ' instead of the / in front of a_temperature_client.
yue wrote:
> Ed,
>
> I traced the getEObject method.
>
> the input:
> uriFragment= "//@systemType[name=/a_temperature_client']"
>
> and the output:
> uriFragmentPath[0]=""
> uriFragmentPath[1]="@systemType[name=/a_temperature_client'] "
> uriFragmentPath[2]=null
> uriFragmentPath[3]=null
>
> Is this behaving correctly?
>
> Yue
>
>
>
>
>
>
> Ed Merks a
|
|
|
Re: [ATL] AADL Model Transformation [message #76669 is a reply to message #76652] |
Thu, 13 March 2008 14:26 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Sorry, a typo. :-)
As Cyril suggested, 'Use EMF reference format' like
compType="#//@systemType.0".
That will resolve this problem.
Yue
Ed Merks a écrit :
> Yue,
>
> I gather the other mechanism is x-path based and is supported by
> kermeta. In any case, the string you show below is not the same as what
> I suggested earlier:
>
> //@systemType[name='a_temperature_client']
>
> Note the ' instead of the / in front of a_temperature_client.
>
> yue wrote:
>> Ed,
>>
>> I traced the getEObject method.
>>
>> the input:
>> uriFragment= "//@systemType[name=/a_temperature_client']"
>>
>> and the output:
>> uriFragmentPath[0]=""
>> uriFragmentPath[1]="@systemType[name=/a_temperature_client'] "
>> uriFragmentPath[2]=null
>> uriFragmentPath[3]=null
>>
>> Is this behaving correctly?
>>
>> Yue
>>
>>
>>
>>
>>
>>
>> Ed Merks a écrit :
>>> Yue,
>>>
>>> Yep. That's the one. That method will indeed be used a lot.
>>> Eclipse has really cool support for conditional breakpoints if you
>>> right click and edit the properties of the breakpoint. So you might
>>> set the condition to
>>> uri.toString().contains("<something-unique-in-your-instance's-URI >")
>>> or perhaps uriFragment.contains("@system")...
>>>
>>>
>>> yue wrote:
>>>> Hi,
>>>>
>>>> In which plug-in can I find the ResourceImpl.getEObject ?
>>>> Is it this class org.eclipse.emf.ecore.resource.impl.ResourceImpl ?
>>>> Because, when I load the file, the execution stops on a lot of
>>>> elements that does not appear in my aadl example file...
>>>>
>>>>
>>>> Regards
>>>> Yue
>>>>
>>>>
>>>>
>>>>
>>>> Ed Merks a écrit :
>>>>> Yue,
>>>>>
>>>>> An IDREF should normally be resolved as the document is processed
>>>>> and should produce an error if it fails. But it does sound like
>>>>> it's not been set. You might set a breakpoint on
>>>>> ResourceImpl.getEObject to monitor what happens when it's called
>>>>> for the string below and verify that it's behaving correctly.
>>>>>
>>>>>
>>>>> yue wrote:
>>>>>> Hello Ed Merks,
>>>>>> I still have one question.
>>>>>>
>>>>>> This is the instance model following your advice:
>>>>>>
>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>> <core:AadlSpec xmi:version="2.0"
>>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>>> <systemType name="a_temperature_client">
>>>>>> <comment> Client</comment>
>>>>>> <features>
>>>>>> <eventPort name="request" direction="out"/>
>>>>>> <eventDataPort name="response"/>
>>>>>> </features>
>>>>>> </systemType>
>>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>>> compType="//@systemType[name='a_temperature_client']"/>
>>>>>> </core:AadlSpec>
>>>>>>
>>>>>> There is a model validation problem: "the required feature
>>>>>> 'compType' of 'System Impl a_temperature_clienta_impl' must be set"
>>>>>>
>>>>>> Am I set the right path?
>>>>>>
>>>>>> Yue
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ed Merks a écrit :
>>>>>>> Yue,
>>>>>>>
>>>>>>> It looks like the @ in front of system is missing in this path:
>>>>>>>
>>>>>>>
>>>>>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>>>>>
>>>>>>> This doesn't look like an EMF fragment path either. EMF won't
>>>>>>> be able to interpret it without someone writing some code for it...
>>>>>>>
>>>>>>> Something like this is more likely to work correctly:
>>>>>>>
>>>>>>> //@systemType[name='a_temperature_client']
>>>>>>>
>>>>>>>
>>>>>>> yue wrote:
>>>>>>>> Hello,
>>>>>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>>>>>> 'systemType'.
>>>>>>>>
>>>>>>>> This is a minimal input instance:
>>>>>>>>
>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>> <core:AadlSpec xmi:version="2.0"
>>>>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>>>>> <systemType name="a_temperature_client">
>>>>>>>> <comment> Client</comment>
>>>>>>>> <features>
>>>>>>>> <eventPort name="request" direction="out"/>
>>>>>>>> <eventDataPort name="response"/>
>>>>>>>> </features>
>>>>>>>> </systemType>
>>>>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>>>>>
>>>>>>>> </core:AadlSpec>
>>>>>>>>
>>>>>>>> Is there anything wrong with it? The validate is successful.
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Yue
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Frédéric Jouault a écrit :
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> Apparently EMF cannot load your XML document.
>>>>>>>>>
>>>>>>>>> According to the error message I would say that you have a typo
>>>>>>>>> in your document: 'ystemType' instead of 'systemType', but I
>>>>>>>>> may be wrong.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> If you cannot solve this information to solve your problem,
>>>>>>>>> could you please post here a minimal example exhibiting the
>>>>>>>>> problematic behavior?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Frédéric Jouault
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> yue a écrit :
>>>>>>>>>> Hi,
>>>>>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>>>>>>>>>> I have an AADL metamodel with seven .ecore files, and try a
>>>>>>>>>> very simple transfor rule for systemType and systemImpl.
>>>>>>>>>>
>>>>>>>>>> Here is the code I use:
>>>>>>>>>> module test; -- Module Template
>>>>>>>>>> create OUT : sme from IN : core;
>>>>>>>>>>
>>>>>>>>>> rule RsysImpl{
>>>>>>>>>> from
>>>>>>>>>> s : core!SystemImpl
>>>>>>>>>> to
>>>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>>>> name <- 'IMPL_' + s.name
>>>>>>>>>> )
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> rule RsysType{
>>>>>>>>>> from
>>>>>>>>>> s : core!SystemType
>>>>>>>>>> to
>>>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>>>> name <- 'TYPE_' + s.name
>>>>>>>>>> )
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> When the sample model includes only systemType instance, it
>>>>>>>>>> works; but when systemImpl instance is added, following
>>>>>>>>>> exception occurs:
>>>>>>>>>>
>>>>>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType' is
>>>>>>>>>> not a valid reference
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>>>>> Source)
>>>>>>>>>> at
>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>>>>> Source)
>>>>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>>>
>>>>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>>>> severe: null
>>>>>>>>>> java.lang.NullPointerException
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>>>
>>>>>>>>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> The input aaxl in validate successful. I don't understand why
>>>>>>>>>> this exception occurs.
>>>>>>>>>> Can someone help me?
>>>>>>>>>> Thanks in advance.
>>>>>>>>>>
>>>>>>>>>> Yue
>>>>>>>
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76686 is a reply to message #76669] |
Thu, 13 March 2008 14:31 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Yue,
Indeed, that would be the default notation you'd get serializing with
EMF. The [name='a_temperature_client'] notation (in place of .0)
you'd only get if you used EReference.eKeys to specify that the name
feature is a key...
yue wrote:
> Sorry, a typo. :-)
>
> As Cyril suggested, 'Use EMF reference format' like
> compType="#//@systemType.0".
> That will resolve this problem.
>
> Yue
>
>
>
> Ed Merks a écrit :
>> Yue,
>>
>> I gather the other mechanism is x-path based and is supported by
>> kermeta. In any case, the string you show below is not the same as
>> what I suggested earlier:
>>
>> //@systemType[name='a_temperature_client']
>>
>> Note the ' instead of the / in front of a_temperature_client.
>>
>> yue wrote:
>>> Ed,
>>>
>>> I traced the getEObject method.
>>>
>>> the input:
>>> uriFragment= "//@systemType[name=/a_temperature_client']"
>>>
>>> and the output:
>>> uriFragmentPath[0]=""
>>> uriFragmentPath[1]="@systemType[name=/a_temperature_client'] "
>>> uriFragmentPath[2]=null
>>> uriFragmentPath[3]=null
>>>
>>> Is this behaving correctly?
>>>
>>> Yue
>>>
>>>
>>>
>>>
>>>
>>>
>>> Ed Merks a écrit :
>>>> Yue,
>>>>
>>>> Yep. That's the one. That method will indeed be used a lot.
>>>> Eclipse has really cool support for conditional breakpoints if you
>>>> right click and edit the properties of the breakpoint. So you
>>>> might set the condition to
>>>> uri.toString().contains("<something-unique-in-your-instance's-URI >")
>>>> or perhaps uriFragment.contains("@system")...
>>>>
>>>>
>>>> yue wrote:
>>>>> Hi,
>>>>>
>>>>> In which plug-in can I find the ResourceImpl.getEObject ?
>>>>> Is it this class org.eclipse.emf.ecore.resource.impl.ResourceImpl ?
>>>>> Because, when I load the file, the execution stops on a lot of
>>>>> elements that does not appear in my aadl example file...
>>>>>
>>>>>
>>>>> Regards
>>>>> Yue
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Ed Merks a écrit :
>>>>>> Yue,
>>>>>>
>>>>>> An IDREF should normally be resolved as the document is processed
>>>>>> and should produce an error if it fails. But it does sound like
>>>>>> it's not been set. You might set a breakpoint on
>>>>>> ResourceImpl.getEObject to monitor what happens when it's called
>>>>>> for the string below and verify that it's behaving correctly.
>>>>>>
>>>>>>
>>>>>> yue wrote:
>>>>>>> Hello Ed Merks,
>>>>>>> I still have one question.
>>>>>>>
>>>>>>> This is the instance model following your advice:
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>> <core:AadlSpec xmi:version="2.0"
>>>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>>>> <systemType name="a_temperature_client">
>>>>>>> <comment> Client</comment>
>>>>>>> <features>
>>>>>>> <eventPort name="request" direction="out"/>
>>>>>>> <eventDataPort name="response"/>
>>>>>>> </features>
>>>>>>> </systemType>
>>>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>>>> compType="//@systemType[name='a_temperature_client']"/>
>>>>>>> </core:AadlSpec>
>>>>>>>
>>>>>>> There is a model validation problem: "the required feature
>>>>>>> 'compType' of 'System Impl a_temperature_clienta_impl' must be set"
>>>>>>>
>>>>>>> Am I set the right path?
>>>>>>>
>>>>>>> Yue
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Ed Merks a écrit :
>>>>>>>> Yue,
>>>>>>>>
>>>>>>>> It looks like the @ in front of system is missing in this path:
>>>>>>>>
>>>>>>>>
>>>>>>>> /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient]
>>>>>>>>
>>>>>>>> This doesn't look like an EMF fragment path either. EMF won't
>>>>>>>> be able to interpret it without someone writing some code for
>>>>>>>> it...
>>>>>>>>
>>>>>>>> Something like this is more likely to work correctly:
>>>>>>>>
>>>>>>>> //@systemType[name='a_temperature_client']
>>>>>>>>
>>>>>>>>
>>>>>>>> yue wrote:
>>>>>>>>> Hello,
>>>>>>>>> Yes, it's strange, but the error message is 'ystemType', not
>>>>>>>>> 'systemType'.
>>>>>>>>>
>>>>>>>>> This is a minimal input instance:
>>>>>>>>>
>>>>>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>>>>>> <core:AadlSpec xmi:version="2.0"
>>>>>>>>> xmlns:xmi="http://www.omg.org/XMI"
>>>>>>>>> xmlns:core="http:///AADL/core" name="aadlClient">
>>>>>>>>> <systemType name="a_temperature_client">
>>>>>>>>> <comment> Client</comment>
>>>>>>>>> <features>
>>>>>>>>> <eventPort name="request" direction="out"/>
>>>>>>>>> <eventDataPort name="response"/>
>>>>>>>>> </features>
>>>>>>>>> </systemType>
>>>>>>>>> <systemImpl name="a_temperature_client.a_impl"
>>>>>>>>> compType=" /aadlSpec[@name=aadlClient]/systemType[@name=a_temperature_c lient] "/>
>>>>>>>>>
>>>>>>>>> </core:AadlSpec>
>>>>>>>>>
>>>>>>>>> Is there anything wrong with it? The validate is successful.
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Yue
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Frédéric Jouault a écrit :
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> Apparently EMF cannot load your XML document.
>>>>>>>>>>
>>>>>>>>>> According to the error message I would say that you have a
>>>>>>>>>> typo in your document: 'ystemType' instead of 'systemType',
>>>>>>>>>> but I may be wrong.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> If you cannot solve this information to solve your problem,
>>>>>>>>>> could you please post here a minimal example exhibiting the
>>>>>>>>>> problematic behavior?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>>> Frédéric Jouault
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> yue a écrit :
>>>>>>>>>>> Hi,
>>>>>>>>>>> I'm new to ATL and trying to transfor AADL model to SIGNAL
>>>>>>>>>>> model.
>>>>>>>>>>> I have an AADL metamodel with seven .ecore files, and try a
>>>>>>>>>>> very simple transfor rule for systemType and systemImpl.
>>>>>>>>>>>
>>>>>>>>>>> Here is the code I use:
>>>>>>>>>>> module test; -- Module Template
>>>>>>>>>>> create OUT : sme from IN : core;
>>>>>>>>>>>
>>>>>>>>>>> rule RsysImpl{
>>>>>>>>>>> from
>>>>>>>>>>> s : core!SystemImpl
>>>>>>>>>>> to
>>>>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>>>>> name <- 'IMPL_' + s.name
>>>>>>>>>>> )
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>> rule RsysType{
>>>>>>>>>>> from
>>>>>>>>>>> s : core!SystemType
>>>>>>>>>>> to
>>>>>>>>>>> t : sme!ModelDeclaration(
>>>>>>>>>>> name <- 'TYPE_' + s.name
>>>>>>>>>>> )
>>>>>>>>>>> }
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> When the sample model includes only systemType instance, it
>>>>>>>>>>> works; but when systemImpl instance is added, following
>>>>>>>>>>> exception occurs:
>>>>>>>>>>>
>>>>>>>>>>> severe:The feature 'ystemType' is not a valid reference
>>>>>>>>>>> java.lang.IllegalArgumentException: The feature 'ystemType'
>>>>>>>>>>> is not a valid reference
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at
>>>>>>>>>>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>>>>>>>>>>> Source)
>>>>>>>>>>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>>>>> severe: null
>>>>>>>>>>> java.lang.NullPointerException
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>>>>>>>>>>
>>>>>>>>>>> at
>>>>>>>>>>> org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> The input aaxl in validate successful. I don't understand
>>>>>>>>>>> why this exception occurs.
>>>>>>>>>>> Can someone help me?
>>>>>>>>>>> Thanks in advance.
>>>>>>>>>>>
>>>>>>>>>>> Yue
>>>>>>>>
>>
|
|
|
Re: [ATL] AADL Model Transformation [message #76751 is a reply to message #76652] |
Fri, 14 March 2008 12:23 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Ed,
> I gather the other mechanism is x-path based and is supported by
> kermeta. In any case, the string you show below is not the same as what
> I suggested earlier:
>
> //@systemType[name='a_temperature_client']
>
> Note the ' instead of the / in front of a_temperature_client.
I believe you slightly misunderstood Cyril.
The code generated by EMF for OSATE has been manually modified (in
compliance with EMF, IIUC) in order to implement a different reference
serialization mechanism.
Cyril stated that OSATE itself provides an option to switch its
serialization to "standard" references; an information that he read on
the mailing list he mentioned.
(Cyril, please correct me if I am wrong.)
However, I believe the modified format should be directly usable with
EMF (and therefore with ATL) if the corresponding plugin (with the code
modification) is installed, and if the proper factory is used.
Also, I believe that files saved by EMF, but not in standard EMF format
(i.e., that cannot be read without additional specific Java code) should
be somehow marked as "tainted" (e.g., in the xmi:version attribute).
Otherwise, developers are tempted to "beautify" their "XMI" output
(making it one more non-"interchangeable" version of XM"I"), and users
get confused.
Best regards,
Frédéric Jouault
|
|
|
Re: [ATL] AADL Model Transformation [message #76767 is a reply to message #76751] |
Fri, 14 March 2008 15:08 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Frédéric,
Comments below.
Frédéric Jouault wrote:
> Ed,
>
>> I gather the other mechanism is x-path based and is supported by
>> kermeta. In any case, the string you show below is not the same as
>> what I suggested earlier:
>>
>> //@systemType[name='a_temperature_client']
>>
>> Note the ' instead of the / in front of a_temperature_client.
>
> I believe you slightly misunderstood Cyril.
>
> The code generated by EMF for OSATE has been manually modified (in
> compliance with EMF, IIUC) in order to implement a different reference
> serialization mechanism.
>
> Cyril stated that OSATE itself provides an option to switch its
> serialization to "standard" references; an information that he read on
> the mailing list he mentioned.
>
> (Cyril, please correct me if I am wrong.)
>
>
> However, I believe the modified format should be directly usable with
> EMF (and therefore with ATL) if the corresponding plugin (with the
> code modification) is installed, and if the proper factory is used.
The more XPath-like notation is quite nice.
>
>
> Also, I believe that files saved by EMF, but not in standard EMF format
> (i.e., that cannot be read without additional specific Java code) should
> be somehow marked as "tainted" (e.g., in the xmi:version attribute).
> Otherwise, developers are tempted to "beautify" their "XMI" output
> (making it one more non-"interchangeable" version of XM"I"), and users
> get confused.
Some of the things used by EMF, like attributes with QName URI pairs
instead of elements with xmi:type and hrefs, are not part of the current
XMI specification but are working their way into the latest
specification (or so I've heard). The XMI specification seems to
require xmi:id, and while that's a very robust serialization mechanism,
it also fills up instances with a lot of additional information. It may
well be necessary to be able to reference instances in resources that
are not an XMI serialization and do not support the notion of a unique
identifier, so having a structural way of specifying how to locate an
instance seems to be a gap. In any case, EMF generally provides many
choices, e.g., use XMLResourceImpl instead of XMIResourceImpl if you
don't want to produce an XMI serialization that doesn't have a
conforming xmi:id based referencing mechanism. XMI serializations
aren't generally all that readable, and the UUID-based referencing
mechanism is significant factor in that lack of readability...
>
>
> Best regards,
>
> Frédéric Jouault
>
|
|
|
Re: [ATL] AADL Model Transformation [message #76783 is a reply to message #76289] |
Fri, 14 March 2008 15:31 |
Eclipse User |
|
|
|
Originally posted by: lwrage.sei.cmu.edu
Yue,
to confirm what has been written before:
You have two options to process aaxl files with ATL. The first is to
write references as standard EMF references using the OSATE preference
setting. The second id to install ATL and OSATE in the same eclipse
instance. You can then use metamodel by uri (http://AADL/core)in the ATL
launch configuration. I've used the second approach myself.
- Lutz
yue wrote, on 3/12/2008 6:32 AM:
> Hi,
> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
> I have an AADL metamodel with seven .ecore files, and try a very simple
> transfor rule for systemType and systemImpl.
>
> Here is the code I use:
> module test; -- Module Template
> create OUT : sme from IN : core;
>
> rule RsysImpl{
> from
> s : core!SystemImpl
> to
> t : sme!ModelDeclaration(
> name <- 'IMPL_' + s.name
> )
> }
>
> rule RsysType{
> from
> s : core!SystemType
> to
> t : sme!ModelDeclaration(
> name <- 'TYPE_' + s.name
> )
> }
>
>
> When the sample model includes only systemType instance, it works; but
> when systemImpl instance is added, following exception occurs:
>
> severe:The feature 'ystemType' is not a valid reference
> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
> valid reference
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>
> at
> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>
> at
> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
> at
> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown Source)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>
> at
> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>
> at
> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>
> at
> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> severe: null
> java.lang.NullPointerException
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>
> at
> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>
> at
> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
> The input aaxl in validate successful. I don't understand why this
> exception occurs.
> Can someone help me?
> Thanks in advance.
>
> Yue
|
|
|
Re: [ATL] AADL Model Transformation [message #90281 is a reply to message #76783] |
Mon, 22 September 2008 14:08 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi Lutz ,
I use ATL and OSATE in the same eclipse instance as you advised.
But I have another problem.
When I add the Allowed_Processor_Binding property in the system
implementation, the model is not accpeted and there is an error:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@137854f (eClass:
org.eclipse.emf.ecore.impl.EClassImpl@470524 (name:
ProcessorSubcomponent) (instanceClassName: null) (abstract: false,
interface: false))' is not legal.
(platform:/resource/AADL2SIGNAL/model/ClientTest.aaxl, 110, 1)
When I remove the property, the model can be accepted.
The aaxl file is like this:
.........
<systemImpl name="client.impl" compType="#//@systemType.0">
<properties>
<propertyAssociation noMode="false"
propertyDefinition=" ../../../plugin/edu.cmu.sei.osate.workspace/resources/proper ties/AADL_Properties.aaxl#//@propertySet.0/@propertyDefiniti on.22 "
constant="false" access="false" append="false"
appliesTo="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
derived="false">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement="#//@systemImpl.0/@subcomponents/@processorSubcomponent.0 "/>
</propertyAssociation>
</properties>
<connections>
<dataConnection noMode="false" srcContext="#//@systemImpl.0"
dstContext="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
src="#//@systemType.0/@features/@dataPort.0"
dst="#//@processType.0/@features/@dataPort.0"
timing="Immediate"/>
<dataConnection noMode="false"
srcContext="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
dstContext="#//@systemImpl.0"
src="#//@processType.0/@features/@dataPort.1"
dst="#//@systemType.0/@features/@dataPort.1" timing="Immediate"/>
</connections>
<subcomponents>
<processorSubcomponent name="T1" noMode="false"
classifier="#//@processorType.0"/>
<processSubcomponent name="the_process" noMode="false"
classifier="#//@processImpl.0"/>
<deviceSubcomponent name="the_device" noMode="false"
classifier="#//@deviceType.0"/>
<busSubcomponent name="the_bus" noMode="false"
classifier="#//@busType.0"/>
</subcomponents>
</systemImpl>
.......
Is there anything that I missed when I generated the code?
Thank you so much.
Yue
Lutz Wrage a écrit :
> Yue,
>
> to confirm what has been written before:
>
> You have two options to process aaxl files with ATL. The first is to
> write references as standard EMF references using the OSATE preference
> setting. The second id to install ATL and OSATE in the same eclipse
> instance. You can then use metamodel by uri (http://AADL/core)in the ATL
> launch configuration. I've used the second approach myself.
>
> - Lutz
>
> yue wrote, on 3/12/2008 6:32 AM:
>> Hi,
>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>> I have an AADL metamodel with seven .ecore files, and try a very
>> simple transfor rule for systemType and systemImpl.
>>
>> Here is the code I use:
>> module test; -- Module Template
>> create OUT : sme from IN : core;
>>
>> rule RsysImpl{
>> from
>> s : core!SystemImpl
>> to
>> t : sme!ModelDeclaration(
>> name <- 'IMPL_' + s.name
>> )
>> }
>>
>> rule RsysType{
>> from
>> s : core!SystemType
>> to
>> t : sme!ModelDeclaration(
>> name <- 'TYPE_' + s.name
>> )
>> }
>>
>>
>> When the sample model includes only systemType instance, it works; but
>> when systemImpl instance is added, following exception occurs:
>>
>> severe:The feature 'ystemType' is not a valid reference
>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>> valid reference
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>> Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> severe: null
>> java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>
>> The input aaxl in validate successful. I don't understand why this
>> exception occurs.
>> Can someone help me?
>> Thanks in advance.
>>
>> Yue
|
|
|
Re: [ATL] AADL Model Transformation [message #90533 is a reply to message #76783] |
Thu, 25 September 2008 15:31 |
yue ma Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hi ,
I use AADL model as an source model during my ATL transformation.
I have such a problem.
When I add some property in the system or process or any component
implementation, the model is not accpeted and there is an error:
org.eclipse.emf.ecore.xmi.IllegalValueException: Value
'org.eclipse.emf.ecore.impl.DynamicEObjectImpl@137854f (eClass:
org.eclipse.emf.ecore.impl.EClassImpl@470524 (name:
ProcessorSubcomponent) (instanceClassName: null) (abstract: false,
interface: false))' is not legal.
(platform:/resource/AADL2SIGNAL/model/ClientTest.aaxl, 110, 1)
But if I remove the property, the model can be accepted.
The aaxl file is like this:
.........
<systemImpl name="client.impl" compType="#//@systemType.0">
<properties>
<propertyAssociation noMode="false"
propertyDefinition=" ../../../plugin/edu.cmu.sei.osate.workspace/resources/proper ties/AADL_Properties.aaxl#//@propertySet.0/@propertyDefiniti on.22 "
constant="false" access="false" append="false"
appliesTo="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
derived="false">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement="#//@systemImpl.0/@subcomponents/@processorSubcomponent.0 "/>
</propertyAssociation>
</properties>
<connections>
<dataConnection noMode="false" srcContext="#//@systemImpl.0"
dstContext="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
src="#//@systemType.0/@features/@dataPort.0"
dst="#//@processType.0/@features/@dataPort.0"
timing="Immediate"/>
<dataConnection noMode="false"
srcContext="#//@systemImpl.0/@subcomponents/@processSubcomponent.0 "
dstContext="#//@systemImpl.0"
src="#//@processType.0/@features/@dataPort.1"
dst="#//@systemType.0/@features/@dataPort.1" timing="Immediate"/>
</connections>
<subcomponents>
<processorSubcomponent name="T1" noMode="false"
classifier="#//@processorType.0"/>
<processSubcomponent name="the_process" noMode="false"
classifier="#//@processImpl.0"/>
<deviceSubcomponent name="the_device" noMode="false"
classifier="#//@deviceType.0"/>
<busSubcomponent name="the_bus" noMode="false"
classifier="#//@busType.0"/>
</subcomponents>
</systemImpl>
.......
Is there anything that I missed when I generated the code?
Thank you so much.
Yue
Lutz Wrage a écrit :
> Yue,
>
> to confirm what has been written before:
>
> You have two options to process aaxl files with ATL. The first is to
> write references as standard EMF references using the OSATE preference
> setting. The second id to install ATL and OSATE in the same eclipse
> instance. You can then use metamodel by uri (http://AADL/core)in the ATL
> launch configuration. I've used the second approach myself.
>
> - Lutz
>
> yue wrote, on 3/12/2008 6:32 AM:
>> Hi,
>> I'm new to ATL and trying to transfor AADL model to SIGNAL model.
>> I have an AADL metamodel with seven .ecore files, and try a very
>> simple transfor rule for systemType and systemImpl.
>>
>> Here is the code I use:
>> module test; -- Module Template
>> create OUT : sme from IN : core;
>>
>> rule RsysImpl{
>> from
>> s : core!SystemImpl
>> to
>> t : sme!ModelDeclaration(
>> name <- 'IMPL_' + s.name
>> )
>> }
>>
>> rule RsysType{
>> from
>> s : core!SystemType
>> to
>> t : sme!ModelDeclaration(
>> name <- 'TYPE_' + s.name
>> )
>> }
>>
>>
>> When the sample model includes only systemType instance, it works; but
>> when systemImpl instance is added, following exception occurs:
>>
>> severe:The feature 'ystemType' is not a valid reference
>> java.lang.IllegalArgumentException: The feature 'ystemType' is not a
>> valid reference
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eReference(Basic EObjectImpl.java:742)
>>
>> at
>> org.eclipse.emf.ecore.impl.BasicEObjectImpl.eObjectForURIFra gmentSegment(BasicEObjectImpl.java:511)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:758)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.getEObject (CoreResourceImpl.java:374)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.getEObject( ResourceImpl.java:734)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleForwardRefer ences(XMLHandler.java:1077)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.endDocument(XMLHan dler.java:1168)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.SAXWrapper.endDocument(SAXWra pper.java:79)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .endDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.endEntity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityManager.end Entity(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.loa d(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.ski pSpaces(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$TrailingMiscDispatcher.dispatch(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(Unknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(U nknown
>> Source)
>> at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
>> Source)
>> at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:179)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1155)
>>
>> at
>> edu.cmu.sei.aadl.model.core.util.CoreResourceImpl.load(CoreR esourceImpl.java:276)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>
>> at
>> org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel.loadASMEMFMo del(ASMEMFModel.java:312)
>>
>> at
>> org.eclipse.m2m.atl.engine.AtlEMFModelHandler.loadModel(AtlE MFModelHandler.java:219)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.loadModel(Atl RegularVM.java:220)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:138)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>> severe: null
>> java.lang.NullPointerException
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.getSourceMode ls(AtlRegularVM.java:140)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:326)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:453)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.launch(AtlReg ularVM.java:425)
>>
>> at
>> org.eclipse.m2m.atl.adt.launching.AtlLaunchConfigurationDele gate.launch(AtlLaunchConfigurationDelegate.java:35)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:766)
>>
>> at
>> org.eclipse.debug.internal.core.LaunchConfiguration.launch(L aunchConfiguration.java:608)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(D ebugUIPlugin.java:899)
>>
>> at
>> org.eclipse.debug.internal.ui.DebugUIPlugin$7.run(DebugUIPlu gin.java:1102)
>>
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>
>> The input aaxl in validate successful. I don't understand why this
>> exception occurs.
>> Can someone help me?
>> Thanks in advance.
>>
>> Yue
|
|
|
Goto Forum:
Current Time: Mon Oct 07 05:21:46 GMT 2024
Powered by FUDForum. Page generated in 0.08222 seconds
|