Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
M-to-N model transformations
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
RFR  
View profile  
 More options Sep 11 2007, 7:45 am
From: RFR <rene.fre...@student.hpi.uni-potsdam.de>
Date: Tue, 11 Sep 2007 04:45:04 -0700
Local: Tues, Sep 11 2007 7:45 am
Subject: M-to-N model transformations
Hello,

When specifying more than one input model, only the first one will be
considered for pattern matching (if the extends are not referenced via
@extend directly). For some use cases I have a large number of small
input models which share the same metamodel. Is there a possibility to
consider them all for pattern matching without addressing each one
directly?

Sometimes it would be even useful to put various models (with the same
metamodel) in one single extend. For my scenario I would like to put
all physical separated models in this logical extend. This way I could
deal easier with a dynamic number of input models (which is the case
for my scenario).

Best regards
René


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael lawley  
View profile  
 More options Sep 11 2007, 9:10 am
From: "michael lawley" <mich...@lawley.id.au>
Date: Tue, 11 Sep 2007 23:10:50 +1000
Local: Tues, Sep 11 2007 9:10 am
Subject: Re: M-to-N model transformations
On 11/09/2007, RFR <rene.fre...@student.hpi.uni-potsdam.de> wrote:

> When specifying more than one input model, only the first one will be
> considered for pattern matching (if the extends are not referenced via
> @extend directly). For some use cases I have a large number of small
> input models which share the same metamodel. Is there a possibility to
> consider them all for pattern matching without addressing each one
> directly?

> Sometimes it would be even useful to put various models (with the same
> metamodel) in one single extend. For my scenario I would like to put
> all physical separated models in this logical extend. This way I could
> deal easier with a dynamic number of input models (which is the case
> for my scenario).

> Best regards
> René

Hi again René,

More interesting questions.  In theory, the single-extent solution is
possible and the foundation to support it does exist, however...

At the moment you can only do this if you invoke Tefkat
programmatically -- you create an instance of
tefkat.model.impl.RefereceExtentImpl and add your
org.eclipse.emf.ecore.resource.Resource objects to its multi-valued
resources attribute, then you invoke transform(Resource
transformation, Extent[] srcs, Extent[] tgts, Extent trackingExtent,
boolean force) on an instance of tefkat.engine.Tefkat.  The problem
then is that this is not a public method :-(

Fixing this is something we can do in the short term.

To answer your first question, if you want a single rule to match
across some number of input models, then you should be able to write
something like:

TRANSFORMATION t: s1, s2, s3, s4, s5 -> t

// s1, s2, and s3 share the same metamodel and we
// want to consider them together.
//
PATTERN sourceGroup(s)
  WHERE s = s1 OR s = s2 OR s = s3;

RULE rule
  FORALL Foo@s f
  WHERE sourceGroup(s) AND f.attr = "value"
  MAKE Bar b
;

This is because extent variables are just ordinary variables that
happen to be bound to Extent objects (if they aren't then using them
in @extent will fail).

I hope this helps,

michael


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RFR  
View profile  
 More options Sep 11 2007, 9:43 am
From: RFR <rene.fre...@student.hpi.uni-potsdam.de>
Date: Tue, 11 Sep 2007 06:43:24 -0700
Local: Tues, Sep 11 2007 9:43 am
Subject: Re: M-to-N model transformations
Hi Michael,

Thanks a lot again.

The idea with the PATTERN for a source group helps indeed. The only
problem which remains is that the number of input models is still
static. Since I would prefer programmatical invokation of a
transformation run anyway, access to the yet private method would
solve this, too.

Is a transformation run involving two extends with different
metamodels and multiple resources for each extend also possible this
way?

Regards
René

On 11 Sep., 15:10, "michael lawley" <mich...@lawley.id.au> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RFR  
View profile  
 More options Sep 17 2007, 8:58 am
From: RFR <rene.fre...@student.hpi.uni-potsdam.de>
Date: Mon, 17 Sep 2007 05:58:13 -0700
Local: Mon, Sep 17 2007 8:58 am
Subject: Re: M-to-N model transformations

> At the moment you can only do this if you invoke Tefkat
> programmatically -- you create an instance of
> tefkat.model.impl.RefereceExtentImpl and add your
> org.eclipse.emf.ecore.resource.Resource objects to its multi-valued
> resources attribute, then you invoke transform(Resource
> transformation, Extent[] srcs, Extent[] tgts, Extent trackingExtent,
> boolean force) on an instance of tefkat.engine.Tefkat.  The problem
> then is that this is not a public method :-(

> Fixing this is something we can do in the short term.

Hi Michael,

Will this be fixed for a new release or do I have to fix it on the
basis of the CVS version?
Is the CVS version as stable as the release?

Regards
René


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael lawley  
View profile  
 More options Sep 17 2007, 10:10 am
From: "michael lawley" <mich...@lawley.id.au>
Date: Tue, 18 Sep 2007 00:10:35 +1000
Local: Mon, Sep 17 2007 10:10 am
Subject: Re: M-to-N model transformations
Hi,

I have a new version in the works.  Stay tuned!

michael

On 17/09/2007, RFR <rene.fre...@student.hpi.uni-potsdam.de> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael lawley  
View profile  
 More options Sep 18 2007, 7:16 pm
From: "michael lawley" <mich...@lawley.id.au>
Date: Wed, 19 Sep 2007 09:16:16 +1000
Local: Tues, Sep 18 2007 7:16 pm
Subject: Re: M-to-N model transformations
Hi René,

There is a new release available (build 2.1.0.lawley235) that supports
multiple Resources per (source) Extent.

Quoting the FAQ <http://tefkat.sourceforge.net/FAQ.html>

"...specify the name of the source extent variable as the Var Group
property in the tefkat config file. For example, if there are two
source models, file:foo.xmi and file:bar.xmi and the transformation is
specified as TRANSFORMATION example: src -> tgt then you would add two
SourceModels to the TransformationTask, one with Location Uri =
file:foo.xmi and one with file:bar.xmi but set the Var Group of both
to src."

michael


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
RFR  
View profile  
 More options Sep 19 2007, 8:10 am
From: RFR <rene.fre...@student.hpi.uni-potsdam.de>
Date: Wed, 19 Sep 2007 05:10:39 -0700
Local: Wed, Sep 19 2007 8:10 am
Subject: Re: M-to-N model transformations
Great,

nice to have that integrated into the UI launching method.

Anyway, is there also a solution for the situation, when the numper of
models is dynamic. Best solution would be to generate a tefkat.xml
dynamically and launch the engine programatically. Is such an
interface available (run (TKConfiguration))?

Regards René

On 19 Sep., 01:16, "michael lawley" <mich...@lawley.id.au> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael lawley  
View profile  
 More options Sep 19 2007, 9:21 am
From: "michael lawley" <mich...@lawley.id.au>
Date: Wed, 19 Sep 2007 23:21:11 +1000
Local: Wed, Sep 19 2007 9:21 am
Subject: Re: M-to-N model transformations
Yes, you can create a tefkat.config.TefkatConfig.TransformationTask
programmatically (no need to serialise it to tefkat.xmi) and call new
Tefkat().transform(transformationTask, true, false)  The other
parameters mean yes, please save the resulting models and no, don't
continue after an error.

Alternatively, you can call tefkat.engine.Main.main(String[] args)
with appropriate arguments:

  [-quiet] [-debug] [-force] [-fixpoint] [-statistics] [-save]
[-layout] [-vis mtsT] [-mapURI from to]
  [-conf configURI |
   -transformation mappingURI
    [-source srcURI | -sourceVar var=srcURI]*
    [-target targetURI]*
    [-trace traceURI]
  ]

For example,

  String[] args = {
    "-save",
    "-transformation", "file:transform.qvt",
    "-sourceVar", "src=file:foo.xmi",
    "-sourceVar", "src=file:bar.xmi",
    "-target", "file:result.xmi"
  };

michael

On 19/09/2007, RFR <rene.fre...@student.hpi.uni-potsdam.de> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google