Class ASMInterpreter


  • public class ASMInterpreter
    extends java.lang.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<T> 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<meta-model-name>!<element-name> XML!Node MXML!Node;
    Model L
    Sequence(<type>) Q<type> Sequence(String) QS
    Bag(<type>) G<type>
    Collection(<type>) C<type>
    Set(<type>) E<type>
    OrderedSet(<type>) O<type>
    Native type N<name> TransientLink NTransientLink;
    Tuple(name1:<type1>,name2:<type2>) T<type1>name1;<type2>>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
    • Constructor Detail

      • ASMInterpreter

        public ASMInterpreter​(ASM asm,
                              ASMModule asmModule,
                              ASMExecEnv env,
                              java.util.Map params)
    • Method Detail

      • realMain

        public static void realMain​(java.lang.String[] args,
                                    PluginClassLoader pcl)
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getReturnValue

        public ASMOclAny getReturnValue()