Generating graphical applications from state-transition visual specifications