an empty icon image Protocol State Machine Diagram
   

Protocol state machine diagrams are particularly well suited to express the legal transitions that are allowed, in each state and under what conditions, for an abstract classifier such as an interface or a port.

Interfaces and ports are access points to features of a classifier so a protocol state machine diagram focuses on the rules for using the features; these rules provide guidelines of how classifiers interact.

This supports component-based architectures by providing well defined interfaces and the rules for the communication.

The concept of programming by contract, what we can now call modeling by contract, is used to visualize how and in what order, the classifier instance progresses from state to state and how it may behave while in each state.

While the notation is very similar, there is a distinction between a state machine that models the behavior of a classifier's life cycle and a state machine that models the valid use of the classifier.