Stateflow

Stateflow® is an environment for modeling and simulating
combinatorial and sequential decision logic based on state machines
and flow charts. Stateflow lets you combine graphical and tabular
representations, including state transition diagrams, flow charts,
state transition tables, and truth tables, to model how your system
reacts to events, time-based conditions, and external input signals.

With Stateflow you can design logic for supervisory control,
task scheduling, and fault management applications. Stateflow includes
state machines animation and static and run-time checks for testing
design consistency and completeness before implementation.