|Re: does lazy rules from clause works? [message #988754 is a reply to message #988129]
||Sun, 02 December 2012 19:05
|| Dennis Wagelaar
Registered: September 2012
Op 28-11-12 18:03, Hugo Bruneliere schreef:|
> The initial philosophy of lazy rules is to be able to specify explicitly on
> which elements you call them.
> Thus a lazy rule should not have a guard and the filtering should be made on
> the call, e.g.:
> packagedElement <- if s.hasStereotype('lanprofile::Router') then
> OclUndefined -- or somethin else...
The new EMFTVM research VM *does* evaluate guards on lazy rules, as well as
the input element types. EMFTVM also allows rule inheritance on lazy rules. In
EMFTVM, a lazy rule that does not match will return OclUndefined.
This opens the door for experimentation with virtual rule invocation, where
matching sub-rules of a lazy rule are automatically invoked. Note that this is
currently *not* (yet) implemented in EMFTVM, and invocation of a lazy rule
just invokes that rule and its super-rules.