//purpose: Show an interface with a livelock interface BlindLoop { in void start(); behaviour { enum States { InitialState, Started, InBusiness }; States state = States.InitialState; [state.InitialState] { // first step on start: state = States.Started; } [state.Started] { // change of state caused by an internal (i.e. externally not visible) action. // the components which use this interface are not informed about this state change. on inevitable: state = States.InBusiness; on start: illegal; } [state.InBusiness] { // change of state caused by an internal (i.e. externally not visible) action. // the components which use this interface are not informed about this state change. // in fact this is a return to a previous state (see State Diagram). on inevitable: state = States.Started; on start: illegal; } } } // this is a simple component which implements the BlindLoop interface component InterfaceLivelock { provides BlindLoop LoopingInterface; behaviour { on LoopingInterface.start(): { } } }