Community
Participate
Working Groups
The ETL engine does not check the parameter types of the extended rules in ETL. I have two classes State and Event, which have a superclass Node. Now I try to map them to the corresponding classes Place and Transition, which have a superclass Element. I consider the mapping of States to Places only. I defined two ETL rules: @abstract rule Elements 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; } However, if I change the types of the Elements rule following happens: @abstract rule Elements 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 States2Places rule. This is strange because the rule definitions are inconsistent (the extension does not make sense). Otherwise, if I change the rule to: @abstract rule lements transform src : Source!Node to dest : Target!Transition the States2Places 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.
There's a new strand of work on static analysis of Epsilon programs which will address this class of problems at design time. Changing severity to enhancement and will revisit when we start integrating the results of this work to the main Epsilon development branch.