# Well-structured transition system

In computer science, specifically in the field of formal verification, well-structured transition systems (WSTSs) are a general class of infinite state systems for which many verification problems are decidable, owing to the existence of a kind of order between the states of the system which is compatible with the transitions of the system. WSTS decidability results can be applied to Petri nets, lossy channel systems, and more.

## Formal definition

Recall that a well-quasi-ordering ${\displaystyle \leq }$ on a set ${\displaystyle X}$ is a quasi-ordering (i.e., a preorder or reflexive, transitive binary relation) such that any infinite sequence of elements ${\displaystyle x_{0},x_{1},x_{2},\ldots }$, from ${\displaystyle X}$ contains an increasing pair ${\displaystyle x_{i}\leq x_{j}}$ with ${\displaystyle i. The set ${\displaystyle X}$ is said to be well-quasi-ordered, or shortly wqo.

For our purposes, a transition system is a structure ${\displaystyle {\mathcal {S}}=\langle S,\rightarrow ,\cdots \rangle }$, where ${\displaystyle S}$ is any set (its elements are called states), and ${\displaystyle \rightarrow \subseteq S\times S}$ (its elements are called transitions). In general a transition system may have additional structure like initial states, labels on transitions, accepting states, etc. (indicated by the dots), but they do not concern us here.

A well-structured transition system consists of a transition system ${\displaystyle \langle S,\to ,\leq \rangle }$, such that

• ${\displaystyle \leq \subseteq S\times S}$ is a well-quasi-ordering on the set of states.
• ${\displaystyle \leq }$ is upward compatible with ${\displaystyle \to }$: that is, for all transitions ${\displaystyle s_{1}\to s_{2}}$ (by this we mean ${\displaystyle (s_{1},s_{2})\in \to }$) and for all ${\displaystyle t_{1}}$ such that ${\displaystyle s_{1}\leq t_{1}}$, there exists ${\displaystyle t_{2}}$ such that ${\displaystyle t_{1}{\xrightarrow {*}}t_{2}}$ (that is, ${\displaystyle t_{2}}$ can be reached from ${\displaystyle t_{1}}$ by a sequence of zero or more transitions) and ${\displaystyle s_{2}\leq t_{2}}$.
The upward compatibility requirement

### Well-structured systems

A well-structured system[1] is a transition system ${\displaystyle (S,\to )}$ with state set ${\displaystyle S=Q\times D}$ made up from a finite control state set ${\displaystyle Q}$, a data values set ${\displaystyle D}$, furnished with a decidable pre-order ${\displaystyle \leq \subseteq D\times D}$ which is extended to states by ${\displaystyle (q,d)\leq (q',d')\Leftrightarrow q=q'\wedge d\leq d'}$, which is well-structured as defined above (${\displaystyle \to }$ is monotonic, i.e. upward compatible, with respect to ${\displaystyle \leq }$) and in addition has a computable set of minima for the set of predecessors of any upward closed subset of ${\displaystyle S}$.

Well-structured systems adapt the theory of well-structured transition systems for modelling certain classes of systems encountered in computer science and provide the basis for decision procedures to analyse such systems, hence the supplementary requirements: the definition of a WSTS itself says nothing about the computability of the relations ${\displaystyle \leq }$, ${\displaystyle \to }$.

## Uses in Computer Science

### Well-structured Systems

Coverability can be decided for any well-structured system, and so can reachability of a given control state, by the backward algorithm of Abdulla et al.[1] or for specific subclasses of well-structured systems (subject to strict monotonicity,[2] e.g. in the case of unbounded Petri nets) by a forward analysis based on a Karp-Miller coverability graph.

#### Backward Algorithm

The backward algorithm allows the following question to be answered: given a well-structured system and a state ${\displaystyle s}$, is there any transition path that leads from a given start state ${\displaystyle s_{0}}$ to a state ${\displaystyle s'\geq s}$ (such a state is said to cover ${\displaystyle s}$)?

An intuitive explanation for this question is: if ${\displaystyle s}$ represents an error state, then any state containing it should also be regarded as an error state. If a well-quasi-order can be found that models this "containment" of states and which also fulfills the requirement of monotonicity with respect to the transition relation, then this question can be answered.

Instead of one minimal error state ${\displaystyle s}$, one typically considers an upward closed set ${\displaystyle S_{e}}$ of error states.

The algorithm is based on the facts that in a well-quasi-order ${\displaystyle (A,\leq )}$, any upward closed set has a finite set of minima, and any sequence ${\displaystyle S_{1}\subseteq S_{2}\subseteq ...}$ of upward-closed subsets of ${\displaystyle A}$ converges after finitely many steps (1).

The algorithm needs to store an upward-closed set ${\displaystyle S_{s}}$ of states in memory, which it can do because an upward-closed set is representable as a finite set of minima. It starts from the upward closure of the set of error states ${\displaystyle S_{e}}$ and computes at each iteration the (by monotonicity also upward-closed) set of immediate predecessors and adding it to the set ${\displaystyle S_{s}}$. This iteration terminates after a finite number of steps, due to the property (1) of well-quasi-orders. If ${\displaystyle s_{0}}$ is in the set finally obtained, then the output is "yes" (a state of ${\displaystyle S_{e}}$ can be reached), otherwise it is "no" (it is not possible to reach such a state).

## References

1. ^ a b Parosh Aziz Abdulla, Kārlis Čerāns, Bengt Jonsson, Yih-Kuen Tsay: Algorithmic Analysis of Programs with Well Quasi-ordered Domains (2000), Information and Computation, Vol. 160 issues 1-2, pp. 109--127
2. ^ Alain Finkel and Philippe Schnoebelen, Well-Structured Transition Systems Everywhere!, Theoretical Computer Science 256(1–2), pages 63–92, 2001.