Source: http://www.csl.sri.com/users/tiwari/papers/stateflow.pdf