Non-Termination Witnesses
- 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 , a set of initial states , and a transition relation . In that setting, a set is a recurrent set if it is both reachable and self-perpetuating:
- Reachability: .
- Recurrence/existence closure: .
If both conditions hold, there exists an infinite execution starting from some initial state that visits and never leaves it. A strengthened notion, often used for nondeterministic programs, is the closed recurrent set:
- .
This implies forward invariance under the transition relation and eliminates nondeterministic escapes. In loop settings, one further requires that lie within the loop guard, typically by , 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 0, a nonempty set 1 is a recurrence set if
2
A closed recurrence set strengthens this to
3
where 4 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 5 such that 6, then under determinism the loop does not terminate. In the paper’s formulation, a lasso is non-terminating if there exist 7 with 8 and 9; under determinism of 0, 1 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 2, a geometric non-termination argument of size 3 consists of data 4 satisfying a base transition and ray constraints:
5
6
7
When such data exist, there is an infinite execution of the form
8
with 9 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 0 (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 1 such that
2
This yields a trivial infinite execution repeating 3. PaSTTeL also implements geometric non-termination arguments, both in a one-dimensional form 4 satisfying
5
and in a matrix form with 6, 7, 8, and 9 (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 0 and guard 1, the non-termination set is
2
Every 3 witnesses an infinite execution. In the homogeneous two-variable case with a single guard, the set has a complete geometric characterization: it is either 4, 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 5, 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 6 of ground terms such that
7
Any such language is a witness for failure of weak normalization, because every term in 8 rewrites to another term in 9 and no term in 0 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 1, a behaviour universe 2, and a Galois connection 3 satisfying 4, the paper defines two witness types for least-fixpoint reasoning:
- a primal witness 5 such that 6 and 7;
- a dual witness 8 such that 9 and 0.
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 1 with 2. 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
3
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 4 such that, for all schedulers,
5
where 6 is the set of runs that ever violate the predicate map 7. A linear 8-RepSM for a set 9 is a linear expression map 0 that is nonnegative on 1, decreases in expectation by at least 2 outside 3, 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 4-RepSM 5 for 6 supported by a pure invariant 7, with bounded differences and 8, then for every scheduler 9,
0
This makes the RepSM a witness for non-termination with positive probability. Under the same hypotheses with 1, the paper also proves 2 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 3, with the Markov-chain instance given by
- 4 if 5,
- 6 otherwise, so that 7 and, equivalently, 8 (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
9
together with pure divergent sets 0 that are spheres of linear subspaces. Termination of an input under all schedulers is characterized by a disjointness condition:
1
where 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 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).