Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Helpers not acting as expected in my lazy rule
[ATL] Helpers not acting as expected in my lazy rule [message #99166] Mon, 09 February 2009 00:46 Go to next message
Eclipse UserFriend
Hi eclipse.modeling.m2m. I am having some difficulty getting one of my
rules to work. Within my main matched rule on FM!Feature (acting on a
subset of all FM!Feature, using helpers to select) I call as Lazy rule as
follows:

GroundFacts <- FM!Feature.allInstances()->collect(e | thisModule.FM2(e))

hoping to send all instances of features to this lazy rule for processing
and this lazy rule needs to only act on a different subset of these
FM!Feature from the main rule (unfortunately, almost everything in my
input model are FM!Feature), using helpers, as follows:

lazy rule FM2 {
from
b : FM!Feature (b.isNotUndecided() and b.isConfiguration() and
b.isNotTreeRoot() and b.isNotMeta() and b.isSelected())
to
p : WSMO!GroundFacts(
iri <- attr
),
attr : WSMO!Basic_IRI (
link <- b.name
)
}

However, it doesn't appear that any of my helpers in lazy rule FM2 are
being utilized to select out the desired input features - the rule has the
effect of acting on all FM!Feature, regardless of the helpers - not what I
need. Some of these helpers should be evaluating to false on some of the
input. These helpers work fine in other situations but here this lazy rule
acts on all FM!Features and not the ones left after the helpers. Am I
missing something in calling this lazy rule above?

Any assistance or ideas is appreciated - I am new to ATL. I can provide
more information if this description isn't clear.

Jeff
Re: [ATL] Helpers not acting as expected in my lazy rule [message #99374 is a reply to message #99166] Wed, 11 February 2009 04:46 Go to previous message
Eclipse UserFriend
Hello,

This is a knew bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=252414).
In your case a workaround could be to filter elements before calling the
rule, e.g.:
GroundFacts <- FM!Feature.allInstances()
-> select(b | b.isNotUndecided() and <other_conditions_on_b>)
-> collect(e | thisModule.FM2(e))

Best regards,

William

J Rusk a écrit :
> Hi eclipse.modeling.m2m. I am having some difficulty getting one of my
> rules to work. Within my main matched rule on FM!Feature (acting on a
> subset of all FM!Feature, using helpers to select) I call as Lazy rule
> as follows:
>
> GroundFacts <- FM!Feature.allInstances()->collect(e | thisModule.FM2(e))
>
> hoping to send all instances of features to this lazy rule for
> processing and this lazy rule needs to only act on a different subset
> of these FM!Feature from the main rule (unfortunately, almost everything
> in my input model are FM!Feature), using helpers, as follows:
>
> lazy rule FM2 {
> from
> b : FM!Feature (b.isNotUndecided() and b.isConfiguration() and
> b.isNotTreeRoot() and b.isNotMeta() and b.isSelected())
> to
> p : WSMO!GroundFacts(
> iri <- attr ),
> attr : WSMO!Basic_IRI (
> link <- b.name
> )
> }
>
> However, it doesn't appear that any of my helpers in lazy rule FM2 are
> being utilized to select out the desired input features - the rule has
> the effect of acting on all FM!Feature, regardless of the helpers - not
> what I need. Some of these helpers should be evaluating to false on
> some of the input. These helpers work fine in other situations but here
> this lazy rule acts on all FM!Features and not the ones left after the
> helpers. Am I missing something in calling this lazy rule above?
>
> Any assistance or ideas is appreciated - I am new to ATL. I can provide
> more information if this description isn't clear.
>
> Jeff
>
Previous Topic:[ATL] Documentation on ATL Metamodel.
Next Topic:[ATL] MARTE profile
Goto Forum:
  


Current Time: Thu Jul 17 19:58:23 EDT 2025

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

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

Back to the top