State-and-transition modeling