ALE

Action Language for EMF

Action Language for EMF

ALE is a language to make Ecore metamodels executable. Concretely, ALE allows to “re-open” the EClasses from Ecore metamodels to implement existing EOperations and weave new features or new operations. The main advantage is to split abstract syntax and semantics concerns by weaving new features and implementations on EClasses. The original Ecore files remain unmodified but thanks to the ALE interpreter new elements can be used in the execution of the implemented operations.

Main features of ALE include:

Breathe life into your metamodels!

ALE makes it easy to address a wide range of activities related to model elements manipulation. This includes activities such as:

Open-class mechanism

behavior fsm.dummy.implementation;

open class FSM {

    State currentState;
    String currentEvent;

    override void execute(EList<String> events) {
        'Start'.log();
        self.currentState := self.initialState;
        for(event in events) {
            self.currentState.execute();
            self.currentState :=
                self.currentState.transitions
                    ->select(t | t.event = self.currentEvent)
                    ->first();
        }
        'End'.log();
    }

}