Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » M2 to M1 transformation (demotion?)
M2 to M1 transformation (demotion?) [message #68085] Tue, 04 December 2007 08:24 Go to next message
Eclipse UserFriend
Originally posted by: jhanss22.volvocars.com

Hi all,

I am a member of a standardization organization called AUTOSAR
(www.autosar.org). In my particular work-group we develop models for
describing a standardized automotive software architecture. We are just
about to define a mapping between two models and have to decide upon what
technology to use to describe this mapping/transformation. I have spent
some time reviewing ATL and have a short question that I would like to ask
anyone with more knowledge.

An extract of our models looks something like the following:

// MetaModel
package Generic {

class Identifiable {
attribute shortName : String;
attribute UUID : String;
}
}

// MetaModel
package System {

class IPdu extends Generic::Identifiable {
attribute length : Integer;
}
}

// MetaModel
package Configuration {

class ParamConfContainerDef exends Generic::Identifiable {
attribute parameter : ConfigParameter;
}

class ConfigParameter exends Generic::Identifiable {
}

class IntegerParamDef exends ConfigParameter {
attribute defaultValue : Integer
attribute max : Integer
attribute min : Integer
}
}

// Model
<PARAM-CONF-CONTAINER-DEF UUID="DCE:87fca427-919f-4d90-82f0-88a1d85028ed">
<SHORT-NAME>ComIPdu</SHORT-NAME>
<INTEGER-PARAM-DEF UUID="DCE:96e52a0f-7cc6-4d43-934e-080fb46c9e8a">
<SHORT-NAME>ComIPduSize</SHORT-NAME>
<MAX>1</MAX>
<MIN>1</MIN>
</INTEGER-PARAM-DEF>
</PARAM-CONF-CONTAINER-DEF>


What I wan't to do is to describe a transformation (demotion) from the
MetaModel "System" into the Model "Configuration", i.e. the transformation
goes between different meta levels. From what I have understood, this
should be possible to do using ATL, but I have not understood how.

Example of wanted transformation/mapping:
AUTOSAR_System::IPdu::length ==>
<PARAM-CONF-CONTAINER-DEF><INTEGER-PARAM-DEF><MAX>

Is this mapping possible to do using ATL?

Kind regards,
Jonas Hansson
Re: M2 to M1 transformation (demotion?) [message #68152 is a reply to message #68085] Tue, 04 December 2007 12:32 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020506050501070709070508
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Jonas Hansson a
Re: M2 to M1 transformation (demotion?) [message #68235 is a reply to message #68152] Wed, 05 December 2007 09:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jhanss22.volvocars.com

William,

Thanks for your reply! What I really want is to consider entities in the
Configuration model (such as the ComIPduSize) to be available as MetaModel
entities in the transformation. I will try to elaborate a little bit more:

In the current release of the AUTOSAR standard, some information which
ended up in the Configuration model such as ComIPduSize is actually fixed
and would probably have better been defined as MetaModel entities. At this
point in time, it is not possible to change this in the standard.

What I want to achieve is a description of a mapping between entities in
MetaModels such as the System::IPdu::length to specific entities in Models
such as the <PARAM-CONF-CONTAINER-DEF><INTEGER-PARAM-DEF> where the
shortName is "ComIPduSize".

In a standard transformation both IPdu::length AND ComIPduSize would have
been described as entities in MetaModels. However, in AUTOSAR this is not
the case and I still need to come up with a transformation description.

Kind regards,
Jonas
Re: M2 to M1 transformation (demotion?) [message #68247 is a reply to message #68235] Wed, 05 December 2007 13:18 Go to previous message
William Piers is currently offline William PiersFriend
Messages: 297
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------060903010501040700090106
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

Ok, so the transformation you describe seems to be simplier than what I
purposed :-).

example :
=========

rule sampleMapping {
from
input : System!IPdu
to
output : Configuration!ParamConfContainerDef (
UUID <- input.UUID,
shortName <- input.name,
parameter <- lengthParam
),
lengthParam: Configuration!IntegerParamDef (
UUID <- --NOTE : here you need to generate a new UUID
shortName <- input.name+'Size',
max <- input.length,
min <- input.length
)
}

Perhaps am I missing something again... but what you need to consider is
that as long as you provide input and output metamodels, corresponding
to source and target models, you will be able to describe all kind of
mappings in ATL.
I advise you to try, and to report here your eventual difficulties.

Best regards,
William

Jonas Hansson a
Previous Topic:[ATL] Superimposition, Delete elements
Next Topic:[ATL] problem with UML2 and profile application
Goto Forum:
  


Current Time: Wed Apr 14 18:21:13 GMT 2021

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

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

Back to the top