What's wrong with my transformation (and the tutorial transformation)?

12 views
Skip to first unread message

Tassilo Horn

unread,
Dec 20, 2010, 8:10:30 AM12/20/10
to tef...@googlegroups.com
Hi all,

I'm trying to do my first Tefkat transformation from instances of the
metamodel

http://www.uni-koblenz.de/~horn/EMFFamilies.png

to instances of

http://www.uni-koblenz.de/~horn/EMFPersons.png.

I tried to lean on the tutorial uml2rel transformation, and till now
I've come up with this:

--8<---------------cut here---------------start------------->8---
TRANSFORMATION families2persons : fams -> pers

NAMESPACE http://families
NAMESPACE http://persons

PATTERN isFemale(member)
FORALL Member member
WHERE UNDEF member.familySon
AND UNDEF member.familyFather
;

RULE FamilyModel2Genealogy(fm, g)
FORALL FamilyModel fm
MAKE Genealogy g
;

RULE Member2Male(member, male, fm, g)
EXTENDS FamilyModel2Genealogy(fm, g)
FORALL Member member
WHERE NOT isFemale(member) AND member.model = fm
MAKE Male male
SET male.genealogy = g
;

RULE Member2Female(member, female, fm, g)
EXTENDS FamilyModel2Genealogy(fm, g)
FORALL Member member
WHERE isFemale(member) AND member.model = fm
MAKE Female female
SET female.genealogy = g
;
--8<---------------cut here---------------end--------------->8---

The problem is that neither Member2Male nor Member2Female match anything
("WARN: TRule: Member2Female matched nothing." in console, the same for
the other rule).

The only thing my output model contains is a single Genealogy object.
If I omit the EXTENDS and the fm and g parameters, Members are
transformed to Males/Females, but then, how do I assign them to the
Genealogy?

When looking at the uml2rel tutorial at the Tefkat homepage, Attr2Column
also EXTENDS Class2Table to make the assignment happen. But this seems
to have the exact same problem: When I execute that transformation, I
get the warning "WARN: TRule: Attr2Column matched nothing." and the
output model contains Tables with Keys, but no single Column...

I'm using Eclipse 3.6 with all recent updates and Tefkat from the update
site (2.1.0.lawley266).

What am I doing wrong?

Thanks a ton in advance!
Tassilo

Reply all
Reply to author
Forward
0 new messages