Class ASMInterpreter

java.lang.Object
org.eclipse.m2m.atl.engine.vm.ASMInterpreter

public class ASMInterpreter extends Object
This Java class interprets ATL Stack Machine. Command-line Parameters are in the form name=value. In the following descriptions, parameters are typed.
  • Boolean If the string value is "true" then the argument will be true, false otherwise.
  • List&ltT&gt A List of T is a coma-separated list of T.
  • ModelLocation The specification of the location of a model. The path to its serialized form. A ModelLocation can also specify an injector to be used.
  • ModelSpec The specification of a model in the form model-name : metamodel-name. For each model and metamodel specified in a ModelSpec there must be a specification of how to load it (except for MOF). This specification is performed by specifying an additional command-line argument. The name of this argument is the name of the model or metamodel and its value is a ModelLocation.
  • ModelPath model-name=path-name
Command-line parameters:
  • ASM : File('.asm')
  • copy : Boolean
  • source-models : List(ModelSpec)
  • target-models : List(ModelSpec)
  • step : Boolean
  • NetworkDebugger : Boolean
  • testReserialization : Boolean when true, the ASM file is serialized in XML, text and binary
  • reserialize : List(ModelPath) Specifies a list of models to serialize at the end of the execution of the program. This is especially usefull to reserialize source models that have been modified during the execution of the program (in-place transformations).
  • plugins : List(File('.jar'))
  • ModelLoader : Enumeration('EMF', 'MDR')
Operation signature encoding
Type Encoding Sample Type Sample Type encoded
Object J
Void V
Integer I
Boolean B
String S
Double D
EnumLiteral Z
ATL context Module A
ModelElement M&ltmeta-model-name&gt!&ltelement-name> XML!Node MXML!Node;
Model L
Sequence(&lttype&gt) Q&lttype&gt Sequence(String) QS
Bag(&lttype&gt) G&lttype&gt
Collection(&lttype&gt) C&lttype&gt
Set(&lttype&gt) E&lttype&gt
OrderedSet(&lttype&gt) O&lttype&gt
Native type N&ltname&gt TransientLink NTransientLink;
Tuple(name1:&lttype1&gt,name2:&lttype2&gt) T&lttype1>name1;&lttype2&gt>name2;; Tuple(n:String,v:Integer) TSn;Iv;;
Tuple(m:XML!Node,b:Boolean) TMXML!Node;m;Bb;;
Note: in Tuples, attribute order is not relevant: TIa;Ib;; and TIb;Ia;; denote the same TupleType

Sample method signature encodings
Signature Encoding
context XML!Element def: getAttrVal(name : String) : String MXML!Element;.getAttrVal(S):S
context String def: toBoolean() : Boolean S.toBoolean():B
context String def: toIntegerFromRoman() : Integer S.toIntegerFromRoman():I