Papers
Topics
Authors
Recent
Search
2000 character limit reached

Non-Termination Witnesses

Updated 10 July 2026
  • Non-termination witnesses are formal certificates that verify the existence of infinite executions by ensuring reachable and self-perpetuating states in transition systems.
  • They encompass various forms including recurrence sets, closed recurrence sets, geometric non-termination arguments, lasso-shaped witnesses, and invariant subspaces, each tailored to specific computational models.
  • Dynamic and quantitative approaches such as testing-based methods and repulsing supermartingales integrate static and dynamic reasoning to practically certify non-termination.

Searching arXiv for recent and foundational papers on non-termination witnesses, recurrent sets, GNTA, dynamic and practical detection. I’m retrieving arXiv records relevant to non-termination witnesses and related proof techniques. Non-termination witnesses are constructive certificates that establish the existence of an infinite execution. In the literature they appear in multiple mathematically distinct but conceptually related forms: recurrence sets and closed recurrence sets for transition systems, geometric non-termination arguments for affine loops, lasso-shaped recurrent-state witnesses for bounded exploration, regular languages closed under rewriting for term rewriting systems, repulsing-supermartingale certificates for probabilistic programs, and invariant subspaces or fixpoint-game witnesses in quantum and lattice-theoretic settings (Ben-Amram et al., 8 Sep 2025). For non-linear programs, dynamic analysis has been proposed to learn recurrent sets from executions and to integrate non-termination search with ranking-function synthesis, bringing static and dynamic reasoning closer together (Le et al., 2020).

1. Formal meaning of a non-termination witness

At the most general level, a non-termination witness is an object that certifies the existence of an infinite computation in a transition system. A standard state-based formalization models a loop or program by a state space XX, a set of initial states IXI \subseteq X, and a transition relation TX×XT \subseteq X \times X. In that setting, a set RXR \subseteq X is a recurrent set if it is both reachable and self-perpetuating:

  • Reachability: IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset.
  • Recurrence/existence closure: xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R.

If both conditions hold, there exists an infinite execution starting from some initial state that visits RR and never leaves it. A strengthened notion, often used for nondeterministic programs, is the closed recurrent set:

  • xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R.

This implies forward invariance under the transition relation and eliminates nondeterministic escapes. In loop settings, one further requires that RR lie within the loop guard, typically by xR. G(x)\forall x \in R.\ G(x), so that control remains in the loop (Le et al., 2020).

The survey on linear-constraint programs presents the same core idea in polyhedral form. For a transition relation IXI \subseteq X0, a nonempty set IXI \subseteq X1 is a recurrence set if

IXI \subseteq X2

A closed recurrence set strengthens this to

IXI \subseteq X3

where IXI \subseteq X4 denotes enabled states. The distinction is operationally significant: basic recurrence sets require an existential successor, whereas closed recurrence sets require all successors to remain in the witness region (Ben-Amram et al., 8 Sep 2025).

A different but equivalent witness shape is the lasso. In practical loop analysis, a lasso consists of a finite stem followed by a cycle that can be repeated indefinitely. EndWatch states this as a revisit condition at the same program location: if there exist IXI \subseteq X5 such that IXI \subseteq X6, then under determinism the loop does not terminate. In the paper’s formulation, a lasso is non-terminating if there exist IXI \subseteq X7 with IXI \subseteq X8 and IXI \subseteq X9; under determinism of TX×XT \subseteq X \times X0, TX×XT \subseteq X \times X1 is a reachable recurrent set (Zhang et al., 2023). This identifies a singleton recurrent set as a degenerate but highly practical witness.

2. Canonical witness forms for numerical programs

For linear-constraint programs, the survey identifies three central witness families: recurrence sets, closed recurrence sets, and geometric non-termination arguments (Ben-Amram et al., 8 Sep 2025). Recurrence sets are the broadest state-space certificates; closed recurrence sets are their nondeterminism-robust specialization; geometric non-termination arguments provide a structured symbolic description of an infinite run for affine loops.

For affine single-path loops of the form TX×XT \subseteq X \times X2, a geometric non-termination argument of size TX×XT \subseteq X \times X3 consists of data TX×XT \subseteq X \times X4 satisfying a base transition and ray constraints:

TX×XT \subseteq X \times X5

TX×XT \subseteq X \times X6

TX×XT \subseteq X \times X7

When such data exist, there is an infinite execution of the form

TX×XT \subseteq X \times X8

with TX×XT \subseteq X \times X9 upper-bidiagonal. The survey states that, for affine loops whose update matrix has only nonnegative real eigenvalues, non-termination implies existence of a geometric non-termination argument of size at most RXR \subseteq X0 (Ben-Amram et al., 8 Sep 2025).

The lasso-program literature operationalizes two additional witness schemes. PaSTTeL implements direct fixpoint witnesses, defined by the existence of a loop state RXR \subseteq X1 such that

RXR \subseteq X2

This yields a trivial infinite execution repeating RXR \subseteq X3. PaSTTeL also implements geometric non-termination arguments, both in a one-dimensional form RXR \subseteq X4 satisfying

RXR \subseteq X5

and in a matrix form with RXR \subseteq X6, RXR \subseteq X7, RXR \subseteq X8, and RXR \subseteq X9 (Kheireddine et al., 17 Jun 2026). These witnesses are synthesized by SMT and returned as proof certificates.

A more global witness notion is the non-termination set of a loop. For a simple linear loop with update IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset0 and guard IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset1, the non-termination set is

IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset2

Every IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset3 witnesses an infinite execution. In the homogeneous two-variable case with a single guard, the set has a complete geometric characterization: it is either IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset4, a ray from the origin, or a sector bounded by two rays (Dai et al., 2012). That result is exact in dimension two, but it does not generalize algebraically: for IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset5, the paper shows that the non-termination set cannot be described by Tarski formulae in general (Dai et al., 2012).

3. Constructive witnesses beyond standard transition systems

In term rewriting, non-termination witnesses are not state sets but languages. The finite-automata approach constructs a non-empty regular language IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset6 of ground terms such that

IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset7

Any such language is a witness for failure of weak normalization, because every term in IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset8 rewrites to another term in IPre(R)I \cap \mathrm{Pre}^*(R) \neq \emptyset9 and no term in xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R0 is a normal form. The language is represented by a finite tree automaton, and the required properties are encoded as a SAT formula over transition variables and accepting-state variables (Endrullis et al., 2015). This witness form is notable because it handles both looping and non-looping non-termination; it does not require an ultimately periodic reduction.

In Constraint Handling Rules, the witness can be an executable adversarial program fragment. A “devil’s rule” is automatically generated from a self-recursive simplification rule by overlapping the recursive body with a disjoint variant of the rule head. The resulting malicious rule reintroduces exactly the CHR constraints needed to trigger the recursion again. The paper proves a “maximally vicious” property: for any program containing the self-recursive rule and for any infinite computation through that rule, there is a corresponding infinite computation with the recursive rule and the devil’s rules alone. In that sense, the devil’s rules form a finite witness for non-termination (Fruehwirth, 2017).

Fixpoint-game witnesses provide another abstraction layer. In a complete lattice with a logic universe xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R1, a behaviour universe xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R2, and a Galois connection xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R3 satisfying xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R4, the paper defines two witness types for least-fixpoint reasoning:

  • a primal witness xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R5 such that xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R6 and xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R7;
  • a dual witness xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R8 such that xR. xX. T(x,x)xR\forall x \in R.\ \exists x' \in X.\ T(x,x') \land x' \in R9 and RR0.

The paper then emphasizes that non-termination arises by dualization as a greatest-fixpoint property, so witnesses can certify strict lower bounds on greatest fixpoints such as non-termination probabilities or the existence of infinite behaviour (König et al., 12 Mar 2026). This shifts witness construction from concrete execution structure to order-theoretic proof objects.

4. Dynamic, testing-based, and bounded-model witnesses

Dynamic and testing-based work treats non-termination witnesses as concrete artifacts: inputs plus traces that exhibit cyclic behaviour. DynamiTe proposes to exploit dynamic analysis so that termination and non-termination, and static and dynamic strategies, can inform one another. According to the abstract, termination is handled by inferring ranking functions from concrete transitive closures, while non-termination is handled by iteratively collecting executions and dynamically learning conditions to refine recurrent sets (Le et al., 2020). The available technical material does not provide the paper’s full internal definitions, but it clearly places recurrent-set learning at the center of dynamic non-termination reasoning.

EndWatch turns revisit detection into a practical oracle for large programs. For linear loops, it symbolically infers State Revisit Conditions and instruments them at loop headers; for non-linear loops, it checks concrete state revisits during execution. A revisit is defined by the existence of RR1 with RR2. The method is sound under explicit assumptions: the loop body’s transition relation is deterministic, no external nondeterminism affects loop variables in the revisit slice, and no hidden side-effects alter semantics across iterations without being captured in the sliced state (Zhang et al., 2023). Under those assumptions, a repeated state at the same location is a non-termination witness.

The same witness style is encoded statically in bounded model checking for C. Bounty instruments each loop with a recurrent-state assertion and uses two helper variables, pStored and flag, to store one loop-head state and later assert inequality against future loop-head states. Negating the assertion yields the lasso constraint

RR3

A counterexample to the assertion is therefore a concrete stem-plus-cycle witness. The paper stresses that the method is sound under CBMC’s bit-precise machine semantics and does not assume absence of overflows (Metta et al., 2024).

Portfolio systems use these witness schemes as interchangeable back ends. PaSTTeL runs registered non-termination strategies concurrently, notably fixpoint checking and GNTA synthesis, and returns as soon as one strategy produces a conclusive non-termination proof certificate (Kheireddine et al., 17 Jun 2026). A key practical point, emphasized both there and in testing-based work, is that failure to find a witness yields UNKNOWN, not a proof of termination (Kheireddine et al., 17 Jun 2026).

5. Quantitative and probabilistic witness schemes

In probabilistic programs, non-termination witnesses often certify positive probability of divergence rather than existence of a single infinite path. The central objects in the stochastic-invariants framework are stochastic invariants and repulsing supermartingales. A stochastic invariant is a pair RR4 such that, for all schedulers,

RR5

where RR6 is the set of runs that ever violate the predicate map RR7. A linear RR8-RepSM for a set RR9 is a linear expression map xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R0 that is nonnegative on xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R1, decreases in expectation by at least xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R2 outside xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R3, and has bounded differences (Chatterjee et al., 2016).

These objects serve two witness roles. First, repulsing supermartingales give quantitative bounds on the probability of reaching an undesirable set. Second, they directly refute almost-sure termination. The paper proves: if there is a linear xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R4-RepSM xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R5 for xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R6 supported by a pure invariant xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R7, with bounded differences and xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R8, then for every scheduler xR. xX. T(x,x)xR\forall x \in R.\ \forall x' \in X.\ T(x,x') \Rightarrow x' \in R9,

RR0

This makes the RepSM a witness for non-termination with positive probability. Under the same hypotheses with RR1, the paper also proves RR2 for all schedulers (Chatterjee et al., 2016).

Greatest-fixpoint perspectives subsume these quantitative witnesses. The lattice/game paper explicitly treats non-termination as a greatest fixpoint RR3, with the Markov-chain instance given by

  • RR4 if RR5,
  • RR6 otherwise, so that RR7 and, equivalently, RR8 (König et al., 12 Mar 2026). Witnesses in the logic universe then certify lower bounds on non-termination probabilities, or dually refute upper bounds on them.

Quantum programs require yet another quantitative generalization. For nondeterministic quantum programs, the paper defines the divergent set

RR9

together with pure divergent sets xR. G(x)\forall x \in R.\ G(x)0 that are spheres of linear subspaces. Termination of an input under all schedulers is characterized by a disjointness condition:

xR. G(x)\forall x \in R.\ G(x)1

where xR. G(x)\forall x \in R.\ G(x)2 is the reachable subspace. If the intersection is non-empty, the paper synthesizes a scheduler witnessing non-termination; for universal non-termination, it uses a nonzero invariant subspace obtained from a stationary equation xR. G(x)\forall x \in R.\ G(x)3 (Fu et al., 2024). Here the witness is neither a numeric set nor a lasso, but an algebraic subspace of a Hilbert space.

6. Scope, limitations, and recurring misconceptions

A persistent misconception is that inability to synthesize a witness implies termination. The portfolio and dynamic literature explicitly rejects that implication: PaSTTeL returns UNKNOWN when neither fixpoint nor GNTA synthesis succeeds (Kheireddine et al., 17 Jun 2026), and bounded or testing-based revisit methods are incomplete because the relevant cycle may lie beyond the explored bound or outside the observed traces (Metta et al., 2024). This suggests that witness search is fundamentally semi-decisive: it is highly effective when a certificate exists in the chosen witness class, but silence is not a proof.

A second misconception is that non-termination witnesses are always algebraically simple. The exact opposite is documented for linear loops. In dimension two, the non-termination set of a simple homogeneous linear loop with one guard has an exact conic description (Dai et al., 2012). For more than two variables, however, the same paper proves that the non-termination set is not semi-algebraic in general, which marks a sharp expressive boundary for exact witness synthesis (Dai et al., 2012).

A third misconception is that revisit-based witnesses are semantics-free. EndWatch states explicit assumptions under which state revisit implies non-termination, notably determinism of the loop body and absence of external nondeterminism in the revisit slice (Zhang et al., 2023). Bounty correspondingly grounds its soundness in bit-precise machine semantics rather than in idealized arithmetic (Metta et al., 2024). These methods are practical precisely because they restrict the witness relation to a well-specified semantic model.

Across the literature, the main methodological divide is not between termination and non-termination, but between witness classes. Recurrence sets and closed recurrence sets are invariant-style certificates; geometric non-termination arguments are spectral certificates; revisit traces are concrete execution certificates; regular languages and devil’s rules are syntactic certificates; repulsing supermartingales and greatest-fixpoint witnesses are quantitative certificates; invariant subspaces are algebraic certificates. DynamiTe’s integrated perspective suggests that these forms need not be isolated: counterexamples from failed termination proofs can seed non-termination search, and failed non-termination validation can feed back into ranking-function inference (Le et al., 2020).

The most stable conclusion across these works is therefore structural rather than algorithmic. Non-termination witnesses are not a single formalism but a family of certificates adapted to the semantics of the underlying system. What unifies them is the same proof obligation: to exhibit a reachable object that can perpetuate computation indefinitely, whether that object is a set, a cycle, a language, a martingale, a fixpoint witness, or an invariant subspace (Ben-Amram et al., 8 Sep 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Non-Termination Witnesses.