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 07:34 Go to next message
Eclipse User
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 05:06 Go to previous message
Dimitris Kolovos is currently offline Dimitris Kolovos
Messages: 794
Registered: July 2009
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: Thu Jul 24 13:51:19 EDT 2014

Powered by FUDForum. Page generated in 0.01486 seconds