Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "ATL Language Troubleshooter"

m (added backlink to ATL)
(added category ATL)
Line 29: Line 29:
  
 
This can create problems with ATL, since ATL rules are intended to be confluent (i.e. execution order of rules does not matter). A Profile application basically changes the meta-model at run-time. Any Stereotype application can only happen after the Profile has been applied. Things become even more complex when unapplying Profiles/Stereotypes.
 
This can create problems with ATL, since ATL rules are intended to be confluent (i.e. execution order of rules does not matter). A Profile application basically changes the meta-model at run-time. Any Stereotype application can only happen after the Profile has been applied. Things become even more complex when unapplying Profiles/Stereotypes.
 +
 +
[[Category:ATL]]

Revision as of 05:11, 20 September 2006

< To: ATL

Trouble Cause Solution(s)

ATL Virtual Machine Troubles

  • Trouble: NativeOperation public static org.atl.engine.vm.nativelib.ASMNumber org.atl.engine.vm.nativelib.ASMInteger.operatorMinus(org.atl.engine.vm.StackFrame,org.atl.engine.vm.nativelib.ASMInteger,org.atl.engine.vm.nativelib.ASMNumber)
    Cause: You use negative integer to compare
    e.g. if self.upper = -1 ...
    Solutions: Use (0-x) operation
    e.g. if self.upper = (0-1) ... or change your comparaison if it is possible: e.g. if self.upper < 0 ...


ATL Called Rules Troubles

  • Trouble: ERROR: could not find operation including on Module having supertypes: [OclAny]) on a called rule
    Cause: Your called rule doesn't return the good type (problably any)
    Solution: Add a return type on your called rule by adding the do clause
    e.g.
rule myCalledRule() {
 to
   out : XML!Element -- ...
 do {
   out;
 }
}


UML2 Profiles

Eclipse UML2 Profiles and Stereotypes cannot be applied directly via ATL, but must use the native Java methods of the UML2 plug-in. See also atl_discussion message 1202.

The reason is that UML2 Profiles contain a small Ecore meta-model, with an EClass for each Stereotype defined. When a Profile is applied, this small meta-model is added to the set of available meta-models. Whenever a Stereotype is applied, an EAnnotation "appliedStereotypes" is created (or modified) and an instance of the EClass for that stereotype is added to the contents of the EAnnotation.

This can create problems with ATL, since ATL rules are intended to be confluent (i.e. execution order of rules does not matter). A Profile application basically changes the meta-model at run-time. Any Stereotype application can only happen after the Profile has been applied. Things become even more complex when unapplying Profiles/Stereotypes.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.