Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMT (Generative Modeling Technologies) » [Epsilon] Problem with ECL
[Epsilon] Problem with ECL [message #617618] Tue, 13 May 2008 18:17
Eclipse UserFriend
Originally posted by:


I'm trying to use ECL to help with some model merging. Unfortunately I'm

My left model consits of a single class A, and the right a single class B.
I'm using the follow code (class.ecl) to compare them and print out the
match trace:

rule ClassA
match l : Left!Class with r : Right!Class {
compare : = 'A' }

rule ClassB
match l : Left!Class with r : Right!Class {
compare : = 'B' }

post {
-- Print name of matching elements and of the rule that matched them.
for (m in|m.isMatching)) {
( + ' <' + m.getRule().name + '> ' +;

I think that the four element pairings should cause each rule to fire
once, so the output is a surprise to me:

A <ClassA> A
A <ClassA> B

Where are the B to A, B to B pairings? Why did rule ClassA match A with B?
And why does the second rule never fire?

I can't help put think that I'm missing something really basic here, but I
have spent a bit of time trying to unravel this. Thanks for taking a look.


P.S. I couldn't get "m.rules.first().name" as given in the Complete OO to
DB comparison to work, which is why I'm using "m.getRule().name" Could
this be a source of trouble?
Previous Topic:[Epsilon] NoSuchMethodError running EOL from Java
Next Topic:[Epsilon] Problem with ECL
Goto Forum:

Current Time: Sun Nov 29 07:03:51 GMT 2015

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

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