Model based testing is a derivative of Unified Modeling Language (UML) concepts. Usually state machine diagram, interaction diagram etc are used to represent the behavior of system. ATM, Elevator, Vending machines are popular examples for deriving these diagrams. I think these examples are easy to represent in UML diagrams because they contain states and transition. What about other examples which doesn't have explicit state or transition? Like triangle program, sorting problem or search program etc. How can I represent them with state machine?