Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Parameter type checking in extended rules in ETL
Parameter type checking in extended rules in ETL [message #699821] Fri, 22 July 2011 11:34 Go to next message
Eclipse UserFriend
Originally posted by: Andrey Skorikov

Hello,

I have a question regarding the type of parameters in the transformation
rules in ETL. If I understand the semantics of rule extension correctly,
then a rule which extends another rule should have both left and right
parameter types which have a subtype relationship with the the parameter
types defined in the extended rule (covariance). For example consider
following rules:

@abstract
rule BasicElements
transform src : Source!Node
to dest : Target!Element {
dest.name := src.name;
}

rule States2Places
transform src : Source!State
to dest : Target!Place
extends Elements {
dest.foo := src.bar;
}

where State is a subtype of Node and Place is a subtype of Element. Now,
if I change the types of the BasicElements rule, following happens:

rule BasicElements
transform src : Source!Event
to dest : Target!Element

In this case, since State is not a subtype of Event, the transformation
of states simply does not happen at all: the engine just skips the
execution of the States rule. This is strange because the rule
definitions are inconsistent (the extension does not make sense).

Otherwise, if I change the rule to:

rule BasicElements
transform src : Source!Node
to dest : Target!Transition

the States rule is executed without complaints, which is also strange,
because Place is not a subtype of Transition.

In both cases I would expect some kind of error raised, but in the
implementation it is not the case. Why?
(I am using version 0.8.8)

Regards,

Andrey Skorikov
Re: Parameter type checking in extended rules in ETL [message #701576 is a reply to message #699821] Mon, 25 July 2011 09:06 Go to previous message
Dimitris Kolovos is currently offline Dimitris KolovosFriend
Messages: 2154
Registered: July 2009
Location: York, UK
Senior Member

Hi Andrey,

It seems that type conformance is not checked in this case. Could you please file a bug report about this using the link below?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=GMT&component=Epsilon

Cheers,
Dimitris
Previous Topic:Replacing table row in XML file with EVL
Next Topic:EVL: more do's in one fix?
Goto Forum:
  


Current Time: Fri Mar 29 14:32:58 GMT 2024

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

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

Back to the top