Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarchy
[QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarchy [message #500325] Wed, 25 November 2009 16:19 Go to next message
Tassilo Horn is currently offline Tassilo HornFriend
Messages: 93
Registered: July 2009
Member
Hi!

In my target metamodel, there's an abstract class

Person {fullName : EString, ageGroup : <<enum>> AgeGroup,
parents : Person[2], children : Person[0..*]}

and two concrete subclasses

Female extends Person { husband : Male }
Male extends Person { wife : Female }

My question is: how do I specify an abstract mapping where I can set all
attributes/references that are common in both subclasses, because they
are inherited from Person?

What I currently have is this:

--8<---------------cut here---------------start------------->8---
abstract mapping Families::Member::member2Person() : Persons::Person
disjuncts Member::member2Female, Member::member2Male {}

mapping Families::Member::member2Female() : Persons::Female
inherits Member::member2Person
when {self.isFemale();}
{
fullName := self.firstName + ' ' + self.family().lastName;
ageGroup := self.ageGroup();
parents := self.parents() -> map member2Person();

husband := self.spouse().map member2Male();
}

mapping Families::Member::member2Male() : Persons::Male
inherits Member::member2Person
when {not self.isFemale();}
{
fullName := self.firstName + ' ' + self.family().lastName;
ageGroup := self.ageGroup();
parents := self.parents() -> map member2Person();

wife := self.spouse().map member2Female();
}
--8<---------------cut here---------------end--------------->8---

This works and gives this result model:

--8<---------------cut here---------------start------------->8---
<?xml version="1.0" encoding="UTF-8"?>
<persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:persons="http://persons/1.0" xsi:schemaLocation="http://persons/1.0 ../Persons/metamodel/Genealogy.ecore">
<persons xsi:type="persons:Female" fullName="Stella Smith" ageGroup="ADULT"/>
<persons xsi:type="persons:Male" fullName="Steve Smith" children="//@persons.3 //@persons.4 //@persons.5" ageGroup="ADULT" wife="//@persons.2"/>
<persons xsi:type="persons:Female" fullName="Stephanie Smith" children="//@persons.3 //@persons.4 //@persons.5" ageGroup="ADULT" husband="//@persons.1"/>
<persons xsi:type="persons:Male" fullName="Stu Smith" parents="//@persons.2 //@persons.1" ageGroup="ADULT"/>
<persons xsi:type="persons:Male" fullName="Sven Smith" parents="//@persons.2 //@persons.1" ageGroup="ADULT"/>
<persons xsi:type="persons:Male" fullName="Dennis Smith" parents="//@persons.2 //@persons.1" children="//@persons.7" ageGroup="ADULT" wife="//@persons.8"/>
<persons xsi:type="persons:Female" fullName="Diana Smith" ageGroup="CHILD"/>
<persons xsi:type="persons:Male" fullName="Doug Smith" parents="//@persons.5 //@persons.8" ageGroup="CHILD"/>
<persons xsi:type="persons:Female" fullName="Debby Smith" children="//@persons.7" ageGroup="ADULT" husband="//@persons.5"/>
<persons xsi:type="persons:Male" fullName="Chris Carter" ageGroup="ADULT" wife="//@persons.10"/>
<persons xsi:type="persons:Female" fullName="Christy Carter" ageGroup="ADULT" husband="//@persons.9"/>
<persons xsi:type="persons:Female" fullName="Carol Carter" ageGroup="ADULT"/>
<persons xsi:type="persons:Female" fullName="Conzuela Carter" ageGroup="CHILD"/>
</persons:Genealogy>
--8<---------------cut here---------------end--------------->8---

But as you can see, the setting of fullName, ageGroup and
parents is duplicated in both member2Female and member2Male.

What I would like to have is something like this:

--8<---------------cut here---------------start------------->8---
abstract mapping Families::Member::member2Person() : Persons::Person
disjuncts Member::member2Female, Member::member2Male
{
fullName := self.firstName + ' ' + self.family().lastName;
ageGroup := self.ageGroup();
parents := self.parents() -> map member2Person();
}

mapping Families::Member::member2Female() : Persons::Female
inherits Member::member2Person
when {self.isFemale();}
{
husband := self.spouse().map member2Male();
}

mapping Families::Member::member2Male() : Persons::Male
inherits Member::member2Person
when {not self.isFemale();}
{
wife := self.spouse().map member2Female();
}
--8<---------------cut here---------------end--------------->8---

But this does not give the desired result. What I get with this
version, is this:

--8<---------------cut here---------------start------------->8---
<?xml version="1.0" encoding="UTF-8"?>
<persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:persons="http://persons/1.0" xsi:schemaLocation="http://persons/1.0 ../Persons/metamodel/Genealogy.ecore">
<persons xsi:type="persons:Female"/>
<persons xsi:type="persons:Male" wife="//@persons.2"/>
<persons xsi:type="persons:Female" husband="//@persons.1"/>
<persons xsi:type="persons:Male"/>
<persons xsi:type="persons:Male"/>
<persons xsi:type="persons:Male" wife="//@persons.8"/>
<persons xsi:type="persons:Female"/>
<persons xsi:type="persons:Male"/>
<persons xsi:type="persons:Female" husband="//@persons.5"/>
<persons xsi:type="persons:Male" wife="//@persons.10"/>
<persons xsi:type="persons:Female" husband="//@persons.9"/>
<persons xsi:type="persons:Female"/>
<persons xsi:type="persons:Female"/>
</persons:Genealogy>
--8<---------------cut here---------------end--------------->8---

So the attributes and references set in the abstract rule are not there.

What's really curious, is that in the qvtotrace for each member2Male or
member2Female mapping, the mapping's result is shown fully initialized,
e.g. the fullName and ageGroup are set correctly.

So what am I doing wrong?

Bye,
Tassilo
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@uni-koblenz.de
Universitätsstr. 1, 56070 Koblenz, Germany |
Re: [QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarch [message #500337 is a reply to message #500325] Wed, 25 November 2009 16:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Tassilo,

You might want to look at the Ecore2UML example,
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org .eclipse.m2m.qvt.oml/examples/org.eclipse.m2m.qvt.oml.econ20 09.tutorial/projects/qvto.ecore2uml/transforms/Ecore2UML.qvt o?root=Modeling_Project&sortdir=down&view=markup

See the mapping below,
abstract mapping ENamedElement::toNamedElement() : NamedElement
it does similar job.

Regars,
/Radek

On Wed, 25 Nov 2009 17:19:33 +0100, Tassilo Horn <horn@uni-koblenz.de>
wrote:

> Hi!
>
> In my target metamodel, there's an abstract class
>
> Person {fullName : EString, ageGroup : <<enum>> AgeGroup,
> parents : Person[2], children : Person[0..*]}
>
> and two concrete subclasses
>
> Female extends Person { husband : Male }
> Male extends Person { wife : Female }
>
> My question is: how do I specify an abstract mapping where I can set all
> attributes/references that are common in both subclasses, because they
> are inherited from Person?
>
> What I currently have is this:
>
> --8<---------------cut here---------------start------------->8---
> abstract mapping Families::Member::member2Person() : Persons::Person
> disjuncts Member::member2Female, Member::member2Male {}
>
> mapping Families::Member::member2Female() : Persons::Female
> inherits Member::member2Person
> when {self.isFemale();}
> {
> fullName := self.firstName + ' ' + self.family().lastName;
> ageGroup := self.ageGroup();
> parents := self.parents() -> map member2Person();
> husband := self.spouse().map member2Male();
> }
>
> mapping Families::Member::member2Male() : Persons::Male
> inherits Member::member2Person
> when {not self.isFemale();}
> {
> fullName := self.firstName + ' ' + self.family().lastName;
> ageGroup := self.ageGroup();
> parents := self.parents() -> map member2Person();
> wife := self.spouse().map member2Female();
> }
> --8<---------------cut here---------------end--------------->8---
>
> This works and gives this result model:
>
> --8<---------------cut here---------------start------------->8---
> <?xml version="1.0" encoding="UTF-8"?>
> <persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:persons="http://persons/1.0"
> xsi:schemaLocation="http://persons/1.0
> ../Persons/metamodel/Genealogy.ecore">
> <persons xsi:type="persons:Female" fullName="Stella Smith"
> ageGroup="ADULT"/>
> <persons xsi:type="persons:Male" fullName="Steve Smith"
> children="//@persons.3 //@persons.4 //@persons.5" ageGroup="ADULT"
> wife="//@persons.2"/>
> <persons xsi:type="persons:Female" fullName="Stephanie Smith"
> children="//@persons.3 //@persons.4 //@persons.5" ageGroup="ADULT"
> husband="//@persons.1"/>
> <persons xsi:type="persons:Male" fullName="Stu Smith"
> parents="//@persons.2 //@persons.1" ageGroup="ADULT"/>
> <persons xsi:type="persons:Male" fullName="Sven Smith"
> parents="//@persons.2 //@persons.1" ageGroup="ADULT"/>
> <persons xsi:type="persons:Male" fullName="Dennis Smith"
> parents="//@persons.2 //@persons.1" children="//@persons.7"
> ageGroup="ADULT" wife="//@persons.8"/>
> <persons xsi:type="persons:Female" fullName="Diana Smith"
> ageGroup="CHILD"/>
> <persons xsi:type="persons:Male" fullName="Doug Smith"
> parents="//@persons.5 //@persons.8" ageGroup="CHILD"/>
> <persons xsi:type="persons:Female" fullName="Debby Smith"
> children="//@persons.7" ageGroup="ADULT" husband="//@persons.5"/>
> <persons xsi:type="persons:Male" fullName="Chris Carter"
> ageGroup="ADULT" wife="//@persons.10"/>
> <persons xsi:type="persons:Female" fullName="Christy Carter"
> ageGroup="ADULT" husband="//@persons.9"/>
> <persons xsi:type="persons:Female" fullName="Carol Carter"
> ageGroup="ADULT"/>
> <persons xsi:type="persons:Female" fullName="Conzuela Carter"
> ageGroup="CHILD"/>
> </persons:Genealogy>
> --8<---------------cut here---------------end--------------->8---
>
> But as you can see, the setting of fullName, ageGroup and
> parents is duplicated in both member2Female and member2Male.
>
> What I would like to have is something like this:
>
> --8<---------------cut here---------------start------------->8---
> abstract mapping Families::Member::member2Person() : Persons::Person
> disjuncts Member::member2Female, Member::member2Male
> {
> fullName := self.firstName + ' ' + self.family().lastName;
> ageGroup := self.ageGroup();
> parents := self.parents() -> map member2Person();
> }
>
> mapping Families::Member::member2Female() : Persons::Female
> inherits Member::member2Person
> when {self.isFemale();}
> {
> husband := self.spouse().map member2Male();
> }
>
> mapping Families::Member::member2Male() : Persons::Male
> inherits Member::member2Person
> when {not self.isFemale();}
> {
> wife := self.spouse().map member2Female();
> }
> --8<---------------cut here---------------end--------------->8---
>
> But this does not give the desired result. What I get with this
> version, is this:
>
> --8<---------------cut here---------------start------------->8---
> <?xml version="1.0" encoding="UTF-8"?>
> <persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:persons="http://persons/1.0"
> xsi:schemaLocation="http://persons/1.0
> ../Persons/metamodel/Genealogy.ecore">
> <persons xsi:type="persons:Female"/>
> <persons xsi:type="persons:Male" wife="//@persons.2"/>
> <persons xsi:type="persons:Female" husband="//@persons.1"/>
> <persons xsi:type="persons:Male"/>
> <persons xsi:type="persons:Male"/>
> <persons xsi:type="persons:Male" wife="//@persons.8"/>
> <persons xsi:type="persons:Female"/>
> <persons xsi:type="persons:Male"/>
> <persons xsi:type="persons:Female" husband="//@persons.5"/>
> <persons xsi:type="persons:Male" wife="//@persons.10"/>
> <persons xsi:type="persons:Female" husband="//@persons.9"/>
> <persons xsi:type="persons:Female"/>
> <persons xsi:type="persons:Female"/>
> </persons:Genealogy>
> --8<---------------cut here---------------end--------------->8---
>
> So the attributes and references set in the abstract rule are not there.
>
> What's really curious, is that in the qvtotrace for each member2Male or
> member2Female mapping, the mapping's result is shown fully initialized,
> e.g. the fullName and ageGroup are set correctly.
>
> So what am I doing wrong?
>
> Bye,
> Tassilo
Re: [QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarch [message #500478 is a reply to message #500337] Thu, 26 November 2009 09:42 Go to previous messageGo to next message
Tassilo Horn is currently offline Tassilo HornFriend
Messages: 93
Registered: July 2009
Member
"radek dvorak" <dvorak.radek@gmail.com> writes:

Hi Radek,

> You might want to look at the Ecore2UML example,
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org .eclipse.m2m.qvt.oml/examples/org.eclipse.m2m.qvt.oml.econ20 09.tutorial/projects/qvto.ecore2uml/transforms/Ecore2UML.qvt o?root=Modeling_Project&sortdir=down&view=markup
>
> See the mapping below,
> abstract mapping ENamedElement::toNamedElement() : NamedElement
> it does similar job.

I had a look, but I think what makes the difference between my
transformation and this example is that I call the abstract
member2Person mapping recursively.

When I remove the disjuncts keyword, QVTO will complain with

Can not call abstract mapping 'families::Member::member2Person' with
abstract out/result parameter type directly. Use with inherits,
disjuncts, merges in other mappings Families2Persons.qvto
/Families2PersonsQVTo/transforms Unknown QVT Operational Problem

But with the disjuncts keyword, is seems the assignments in the abstract
member2Person mapping are not applied.

I also tried adding an init section in member2Person:

init { result := if (self.isFemale()) then self.map member2Female()
else self.map member2Male() endif; }

But the result is similar. Adding a log() into it shows that I never
reach it.

Bye,
Tassilo

>> --8<---------------cut here---------------start------------->8---
>> abstract mapping Families::Member::member2Person() : Persons::Person
>> disjuncts Member::member2Female, Member::member2Male
>> {
>> fullName := self.firstName + ' ' + self.family().lastName;
>> ageGroup := self.ageGroup();
>> parents := self.parents() -> map member2Person();
>> }
>>
>> mapping Families::Member::member2Female() : Persons::Female
>> inherits Member::member2Person
>> when {self.isFemale();}
>> {
>> husband := self.spouse().map member2Male();
>> }
>>
>> mapping Families::Member::member2Male() : Persons::Male
>> inherits Member::member2Person
>> when {not self.isFemale();}
>> {
>> wife := self.spouse().map member2Female();
>> }
>> --8<---------------cut here---------------end--------------->8---
>>
>> But this does not give the desired result. What I get with this
>> version, is this:
>>
>> --8<---------------cut here---------------start------------->8---
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:persons="http://persons/1.0" xsi:schemaLocation="http://persons/1.0
>> ../Persons/metamodel/Genealogy.ecore">
>> <persons xsi:type="persons:Female"/>
>> <persons xsi:type="persons:Male" wife="//@persons.2"/>
>> <persons xsi:type="persons:Female" husband="//@persons.1"/>
>> <persons xsi:type="persons:Male"/>
>> <persons xsi:type="persons:Male"/>
>> <persons xsi:type="persons:Male" wife="//@persons.8"/>
>> <persons xsi:type="persons:Female"/>
>> <persons xsi:type="persons:Male"/>
>> <persons xsi:type="persons:Female" husband="//@persons.5"/>
>> <persons xsi:type="persons:Male" wife="//@persons.10"/>
>> <persons xsi:type="persons:Female" husband="//@persons.9"/>
>> <persons xsi:type="persons:Female"/>
>> <persons xsi:type="persons:Female"/>
>> </persons:Genealogy>
>> --8<---------------cut here---------------end--------------->8---
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@uni-koblenz.de
Universitätsstr. 1, 56070 Koblenz, Germany |
Re: [QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarch [message #500488 is a reply to message #500478] Thu, 26 November 2009 10:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Tassilo,

Seem like I have overlooked the core idea of your story ;).

The disjunction should not define any new mapping as
when called, it's dispatched to one of those already defined,
all represented by a common compatible signature.
This allows to use common super types (typically abstract) unifying
various concrete types in the concrete disjuncted mappings.

A mapping disjuncts is always sort of abstract implicitly.

Sorry, our fault. We used to have a compiler warning, "Disjunct body never
gets executed.." but
looks like it has disappeared. To defend ourselves, the OMG spec is
typically silent in that area. I would personally prohibit the body
definition
in disjunct mappings as there is no chance for execution.
The spec says operations without bodies = blackbox ->
bodies defined externally, which is not true in this case. Disjunct
mappings
are defined with empty bodies in a couple of examples instead.


A mapping marked as 'abstract' is designed for extension, not for direct
calling as it
typically needs to deal with abstract target types. When called standalone,
it might not be able to instantiate the target type, failing at
runtime.
If inherited, it's executed in the context of the inheriting mapping,
ensuring
that a concrete self instance is available.

So, you need to split the disjunct mapping and the common super mapping
doing the shared initialization.


Regards,
/Radek


On Thu, 26 Nov 2009 10:42:17 +0100, Tassilo Horn <horn@uni-koblenz.de>
wrote:

> "radek dvorak" <dvorak.radek@gmail.com> writes:
>
> Hi Radek,
>
>> You might want to look at the Ecore2UML example,
>> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.m2m/org .eclipse.m2m.qvt.oml/examples/org.eclipse.m2m.qvt.oml.econ20 09.tutorial/projects/qvto.ecore2uml/transforms/Ecore2UML.qvt o?root=Modeling_Project&sortdir=down&view=markup
>>
>> See the mapping below,
>> abstract mapping ENamedElement::toNamedElement() : NamedElement
>> it does similar job.
>
> I had a look, but I think what makes the difference between my
> transformation and this example is that I call the abstract
> member2Person mapping recursively.
>
> When I remove the disjuncts keyword, QVTO will complain with
>
> Can not call abstract mapping 'families::Member::member2Person' with
> abstract out/result parameter type directly. Use with inherits,
> disjuncts, merges in other mappings Families2Persons.qvto
> /Families2PersonsQVTo/transforms Unknown QVT Operational Problem
>
> But with the disjuncts keyword, is seems the assignments in the abstract
> member2Person mapping are not applied.
>
> I also tried adding an init section in member2Person:
>
> init { result := if (self.isFemale()) then self.map member2Female()
> else self.map member2Male() endif; }
>
> But the result is similar. Adding a log() into it shows that I never
> reach it.
>
> Bye,
> Tassilo
>
>>> --8<---------------cut here---------------start------------->8---
>>> abstract mapping Families::Member::member2Person() : Persons::Person
>>> disjuncts Member::member2Female, Member::member2Male
>>> {
>>> fullName := self.firstName + ' ' + self.family().lastName;
>>> ageGroup := self.ageGroup();
>>> parents := self.parents() -> map member2Person();
>>> }
>>>
>>> mapping Families::Member::member2Female() : Persons::Female
>>> inherits Member::member2Person
>>> when {self.isFemale();}
>>> {
>>> husband := self.spouse().map member2Male();
>>> }
>>>
>>> mapping Families::Member::member2Male() : Persons::Male
>>> inherits Member::member2Person
>>> when {not self.isFemale();}
>>> {
>>> wife := self.spouse().map member2Female();
>>> }
>>> --8<---------------cut here---------------end--------------->8---
>>>
>>> But this does not give the desired result. What I get with this
>>> version, is this:
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <persons:Genealogy xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> xmlns:persons="http://persons/1.0"
>>> xsi:schemaLocation="http://persons/1.0
>>> ../Persons/metamodel/Genealogy.ecore">
>>> <persons xsi:type="persons:Female"/>
>>> <persons xsi:type="persons:Male" wife="//@persons.2"/>
>>> <persons xsi:type="persons:Female" husband="//@persons.1"/>
>>> <persons xsi:type="persons:Male"/>
>>> <persons xsi:type="persons:Male"/>
>>> <persons xsi:type="persons:Male" wife="//@persons.8"/>
>>> <persons xsi:type="persons:Female"/>
>>> <persons xsi:type="persons:Male"/>
>>> <persons xsi:type="persons:Female" husband="//@persons.5"/>
>>> <persons xsi:type="persons:Male" wife="//@persons.10"/>
>>> <persons xsi:type="persons:Female" husband="//@persons.9"/>
>>> <persons xsi:type="persons:Female"/>
>>> <persons xsi:type="persons:Female"/>
>>> </persons:Genealogy>
>>> --8<---------------cut here---------------end--------------->8---
Re: [QVTO] What's the canonical way to set inherited attributes/references in a inheritance hierarch [message #500555 is a reply to message #500488] Thu, 26 November 2009 16:15 Go to previous message
Tassilo Horn is currently offline Tassilo HornFriend
Messages: 93
Registered: July 2009
Member
"radek dvorak" <dvorak.radek@gmail.com> writes:

Hi Radek,

> So, you need to split the disjunct mapping and the common super
> mapping doing the shared initialization.

Ok, I think I have solved that issue. IMO, the main problem was that
the mappings called each other recursively, because my abstract Person
class has references to other Persons, which might not be there at that
time. First I tried only to remove calls to abstract mappings by
dispatching the right concrete one on myself, but that didn't work, too.
I think there were some circular dependencies in the mappings.

So I've thought about it a bit further and came to the conclusion, that
the overall approach was wrong. Mainly, I've rewritten my *declarative*
ATL transformation to *operational* QVT, and this had to lead to a
failure.

Then I looked very deep into the QVT Eclipse presentation and the spec,
and learned more about resolve and friends, and especially at "late"
resolving. So here's the final outcome which seems to do the trick
(helpers not included).

--8<---------------cut here---------------start------------->8---
mapping Families::FamilyModel::familyModel2Genealogy() : Persons::Genealogy {
persons := self.members -> collect(m |
if (m.isFemale()) then
m.map member2Female()
else
m.map member2Male()
endif);
}

abstract mapping Families::Member::member2Person() : Persons::Person {
fullName := self.firstName + ' ' + self.family().lastName;
ageGroup := self.ageGroup();
parents := self.parents().late resolve(Person);
}


mapping Families::Member::member2Female() : Persons::Female
inherits Member::member2Person {
husband := self.spouse().late resolveone(Male);
}

mapping Families::Member::member2Male() : Persons::Male
inherits Member::member2Person {
wife := self.spouse().late resolveone(Female);
}
--8<---------------cut here---------------end--------------->8---

First the top-level familyModel2Genealogy() mapping creates the Persons
and does the dispatching on its own. The references to other Persons
are set later using "late resolve[one]".

It seems to work fine, and to me it looks logically valid. But still,
I'd like to hear from you experts if that's the idiomatic QVTO way of
doing things.

And another question: Is there some other reference-mixed-with-examples
QVTO documentation except the Eclipse QVTO presentation and the QVT
spec? Or do you guys all ask Radek if something fails? ;-)

Bye,
Tassilo
--
Dipl.-Inform. Tassilo Horn | Room: B015
University of Koblenz-Landau, Campus Koblenz | Phone: +49 (261) 287-2745
Institute for Software Technology | Mail: horn@uni-koblenz.de
Universitätsstr. 1, 56070 Koblenz, Germany |
Previous Topic:[ATL] Calling Java within an ATL transformation
Next Topic:[QVTO] creating recursive instances
Goto Forum:
  


Current Time: Tue Oct 15 21:39:06 GMT 2019

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

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

Back to the top