import sc; extension sc; context StateMachine ERROR this.getName() + ": A StateMachine can be neither referenced nor contained." : (this.incoming.isEmpty) && (this.outgoing.isEmpty) && (this.eContainer == null); context InitialState ERROR this.incoming.get(0).getName() + ": An initial state cannot be the destination for a transition." : this.incoming.isEmpty; context FinalState ERROR this.outgoing.get(0).getName() + ": A final state cannot be the source for a transition." : this.outgoing.isEmpty; context Transition ERROR this.getName() + ": A transition must connect a source and a destination state (possibly the same.)" : this.from != null && this.to != null; context Transition ERROR this.getName() + ": A transition should be contained my the most common container of source and target (here " + this.from.pgcd(this.to).name + ")" : this.eContainer == this.from.pgcd(this.to); context CompositeState ERROR this.getName() + ": A composite state which is targeted by a transition (here " + this.incoming.get(0).getName() + ") requires an initial state." : this.incoming.isEmpty ? true : (! this.states.typeSelect(InitialState).isEmpty); context CompositeState ERROR this.getName() + ": A composite state from which outcomes a transition (here " + this.outgoing.get(0).getName() + ") certainly needs a final state." : this.outgoing.isEmpty ? true : (! this.states.typeSelect(FinalState).isEmpty);