StateMachine Generator