Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » Bug (?) in Inheritance-hierarchy of matched rules
Bug (?) in Inheritance-hierarchy of matched rules [message #1690215] Wed, 25 March 2015 17:27 Go to next message
Alexander R is currently offline Alexander RFriend
Messages: 211
Registered: July 2013
Senior Member

I just found a strange behaviour while creating an inheritance hierarchy of matched rules.

Here some code:

abstract rule SuperProp2Field {
		prop : IN!Prop
		field : OUT!Field (	)

rule SuperRuleMiddle extends SuperProp2Field  {
		prop : IN!Prop (prop.upper > 0)
	--to //BUG will appears here, if the"to" keyword is missing

rule Prop2SpecialSetterForUpperBigger1 extends SuperRuleMiddle {
		prop : IN!Prop (prop.getOwnerClass.allOperations->select(op| = 'getter' +>isEmpty())
		target : OUT!Method (
			name<-'getter' + //NOT POSSIBLE TO SET, if the 'to' keyword in SuperRuleMiddle is not set

The bug appears only if the to-keyword is missing in one of the super-rules in the hierarchy.
Normaly the output-pattern of sub and super-rules are joined (see here:, but if the super-rule doesn't have an output patter, it is not possible to
set the bindings in the sub-rule.

Is this a normal behavior?
Re: Bug (?) in Inheritance-hierarchy of matched rules [message #1690289 is a reply to message #1690215] Thu, 26 March 2015 11:14 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 378
Registered: September 2012
Location: Belgium
Senior Member

Seems to be a bug in the regular ATL VMs indeed. Note that you generally don't want to change the default output element in sub-rules, as this changes the implicit source-to-target element tracing. Therefore, you would normally repeat the "field" output element in each sub-rule as the first element (without any bindings).

Also note this bug does not occur in ATL/EMFTVM.

Previous Topic:simple rules transformation problem
Next Topic:Generation of elements and refereces between them
Goto Forum:

Current Time: Sat Oct 20 02:33:26 GMT 2018

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

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

Back to the top