State transition diagram

from Wikipedia, the free encyclopedia
A state diagram for a door that can only be opened and closed.

A state transition diagram is a graphic representation of finite automata , ie states and their transition conditions, in order to visualize the links contained in them as transparently and clearly as possible .

The state transition diagram is used in the context of systems theory in various areas of computer science . A significant standardization was achieved through David Harel's Statechart notation, which is widely seen as the general form of state transition diagrams. For object-oriented software development, it is now standardized as a state diagram (UML) within the framework of the Unified Modeling Language (UML) . There are further variants of the representation, especially in the historical context.

Statecharts

Statechart is a form of representation of a finite automaton in computer science, which was introduced by David Harel. The notation allows the precise specification of state-based systems. David Harel introduced several notation elements to make the complexity of large systems manageable by means of finite automata :

  • Hierarchy with sub-state machines in which another complete state machine is located in a higher-level state. The sub- state machines can either have their own start state , or sub-states can be jumped to directly.
  • Composition for the representation of parallel state machines. AND and OR compositions are possible, which provide for simultaneous or alternating switching of the machines
  • Inter-level transitions , which can also convert a sub-state into a state of another level and vice versa.
  • History connector that saves the last state assumed for a sub-state machine when it is exited, in order to return to this state when it re-enters the sub-state machine. The history connector is noted with a circled H.
  • Condition connector that converts a state transition into different target states depending on a condition. The condition connector is noted with a circled C.
  • Temporal logic can be used in the transitions, for example to specify timeouts.
  • Entry - Exit - Throughout which are executed upon entering, leaving or during the stay in a state -Actions specify states what actions. The number of executions of the throughout action therefore also depends on the timing of the state machine.

Tools

In addition to the UML tools , state transition diagrams are also implemented in a number of other, both open and commercial tools, e.g. B. (list incomplete):

See also

literature

  • David Harel: Statecharts: A Visual Approach to Complex Systems , CS84-05, Department of Applied Mathematics, The Weizmann Institute of Science, 1984
  • David Harel: "Statecharts: A Visual Formalism for Complex Systems". In: Science of Computer Programming . 8/1987, North Holland, pp. 231–274, ( PDF )