---
title: Non-looping Non-termination in Abstract Systems
url: https://www.emergentmind.com/topics/non-looping-non-termination
type: topic
---

# Non-looping Non-termination in Abstract Systems

Searching arXiv for the cited papers and closely related work on non-looping non-termination.
Non-looping non-termination denotes the existence of an infinite computation in which no finite loop can be isolated and pumped forever. In contrast to periodic non-termination, where a fixed finite pattern of rule applications repeats indefinitely, non-looping behavior proceeds through structurally changing states, growing arguments, or descending configurations that never return to an earlier phase. In the cited literature, this phenomenon is formalized in abstract reduction systems, term rewriting, and logic programming, and it also appears in geometric refinement and higher-order calculi with references [2312.13949] [2507.09390].

## 1. Formal definitions and conceptual boundaries

In the abstract framework of Payet, an abstract reduction system is a pair $(A,\to_{\Pi})$ with $\to_{\Pi}=\bigcup\{\to_{\pi}\mid \pi\in\Pi\}$, where each $\to_{\pi}\subseteq A\times A$. Term rewriting and logic programming are presented as concrete instances: in the former, $A=T(\Sigma)$ and $\Pi$ is a term rewrite system; in the latter, $A=\mathrm{Goals}$ and $\Pi$ is the set of program clauses under Prolog’s leftmost rule [2312.13949]. Non-termination is the existence of an infinite $\to_{\Pi}$-chain.

The same work distinguishes loops from binary chains. A loop is defined through a compatibility relation $\phi$ and a finite label sequence $w\in\Pi^*$: if $(a,a')$ is a $(w,\phi)$-loop, then compatibility yields an infinite chain
$$
a \to_w a' \to_w a_2 \to_w a_3 \to_w \cdots.
$$
By contrast, a binary chain is an infinite $\left(\to^*_{w_1}\circ \to_{w_2}\right)$-chain for two fixed sequences $w_1,w_2\in\Pi^*$. Every loop is therefore a trivial binary chain, but binary chains permit a broader two-phase alternation and need not arise from a single repeatable finite loop [2312.13949].

For logic programming, Payet gives a more direct characterization. Let
$$
Q_0 \xrightarrow{r_1}_P Q_1 \xrightarrow{r_2}_P Q_2 \cdots
$$
be a leftmost rewrite sequence. A program loops if there is a finite period of rules and queries that may be repeated forever. It is non-terminating without looping if there is an infinite chain
$$
Q_0 \to_P Q_1 \to_P Q_2 \to_P \cdots
$$
but no finite subchain ever re-occurs as a period. Equivalently, for every finite segment, there is no later identical segment of rule labels and queries. The contrast drawn in that formulation is between “periodic” looping behavior and non-periodic growth in which successive steps use new rule instances or increasing arguments [2507.09390].

These definitions delimit a common misconception: non-termination is not exhausted by loop detection. The cited work treats looping non-termination as an important special case, but not as the general one.

## 2. Proof principles in term rewriting

Three proof styles recur in the term-rewriting literature cited here: syntactic recurrent-pair criteria, regular-language recurrence sets, and finite-automata encodings.

The recurrent-pair criterion of Payet isolates two finite chains
$$
(u_1 \to_{w_1} v_1,\; u_2 \to_{w_2} v_2)
$$
together with contexts $c_1,c_2$ and parameters satisfying a specific schema. Intuitively, phase $w_1$ “adds a context” in one position while phase $w_2$ “removes” or redistributes it. Lemma 3.2 and Lemma 3.3 then show that one can drain a tower of unary context applications down to a threshold and re-inflate it, and Corollary 3.5 concludes that any term of the form
$$
a_{m,n}=c_1[c_2^m[s],c_2^n[s]]
$$
with $n\ge n_2$ starts an infinite $\left(\to^*_{w_1}\circ \to_{w_2}\right)$-chain [2312.13949]. The method is explicitly syntactic and depends on closure under substitution.

A different line, developed by Endrullis and Zantema, uses a recurrence set $L\subseteq T(\Sigma)$ of ground terms such that $L$ is non-empty, every term in $L$ has a redex, and $L$ is weakly closed under rewriting. Theorem 2.2 then yields non-termination without any looping assumption. In this approach, $L$ is represented by a nondeterministic finite tree automaton $A$, and closure is enforced by requiring $A$ to be a quasi-model of the rewrite system. For left-linear systems, the set $\mathrm{Redex}(R)$ is a regular tree language, so the condition that every accepted term has a redex reduces to an inclusion test $L(A)\subseteq \mathrm{Redex}(R)$ [1405.5662].

The later SAT-based formulation fixes the number of automaton states in advance and encodes three requirements: non-emptiness, absence of normal forms, and weak closure. Boolean variables represent accepting states and transitions, while additional variables encode whether a term instance reaches a given state. Satisfiability of the resulting formula yields a certificate of non-termination. The method is complete with respect to regular witness languages for non-termination, modulo the stated transformation handling collapsing rules, and it succeeds on examples such as the S-rule where previous loop-search techniques fail [1505.00478].

These approaches are complementary rather than redundant. Recurrent pairs exploit a highly structured two-phase growth pattern; automata methods search for a regular closed language of reducible terms. The pattern-based approach later adapted to logic programming originates in term rewriting and likewise aims at non-looping cases that do not admit a finite repeatable loop [2507.09390].

## 3. Pattern-based non-looping non-termination in logic programs

Payet’s 2025 contribution adapts a term-rewriting approach based on patterns to logic programming by introducing a one-shot pattern unfolding operator
$$
T_{P,B}^{\pi}(U),
$$
which mirrors the ordinary binary unfolding $T_P^{\beta}$ of Codish and Taboch but operates on pattern rules [2507.09390]. Pattern substitutions are pairs $\theta=(\sigma,\mu)$, with $\theta(n)=\sigma^n\mu$; a pattern term $p=(s,\theta)$ describes the infinite set $\{s\theta(n)\mid n\in\mathbb{N}\}$, and a pattern rule $(p\to q)$ describes the infinite set of concrete rules $\{p(n)\to q(n)\mid n\in\mathbb{N}\}$.

Given an initial set $B$ of pattern rules, the operator $T_{P,B}^{\pi}$ closes $B$ under renaming and unfolds program clauses by choosing a prefix of body atoms, matching them with pattern rules from $U\cup \mathrm{Id}$, computing an $\mathrm{mgu}$ of their left-patterns with the selected atoms, and propagating the resulting pattern substitution to a new pair $(u\sigma,v\sigma)$. The least fixed point
$$
\pi(P,B)=(T_{P,B}^{\pi})^*(\varnothing)
$$
is then computed. Soundness, stated as Theorem 4, shows that every concrete rule in $\pi(P,B)$ lies in the ordinary binary unfolding $\beta(P)$, so any infinite chain observed at the pattern level is a valid chain in the original program [2507.09390].

A worked example exhibits the characteristically non-periodic nature of the construction. For the program with rules $r_1,\dots,r_5$ and an identity rule $r_6$, one obtains an infinite chain
$$
(^{n+1}0,\;{}^n0)\ \xrightarrow{r_1\, r_3^n\, r_2\, r_5^n\, r_4}\ (^{n+n+1}0,\;{}^{n+1}0)\ \to \cdots,
$$
where each round increases the number of nested calls to $r_3$ and $r_5$. No finite loop repeats. From the initial set $B$ extracted from $(r_2,r_3)$ and $(r_4,r_5)$, unfolding yields a single pattern rule with
$$
p=((x,y),\sigma,\mu),\qquad \sigma=\{x\mapsto (x),\, y\mapsto (y)\},\qquad \mu=\{x\mapsto (x),\, y\mapsto 0\},
$$
and
$$
q=((x,y)\sigma^2,\sigma\cdot \sigma',\mu),\qquad \sigma'=\{x\mapsto (x)\}.
$$
Hence
$$
p(n)=({}^{n+1}x,\;{}^n0), \qquad q(n)=({}^{2n+3}x,\;{}^{n+2}0).
$$
This pattern rule is “special” in the sense of Definition 11, with threshold $\alpha(r)=1$, and Theorem 12 states that every query of the form $p(n)$ with $n\ge 1$ generates an infinite non-looping chain [2507.09390].

The associated implementation in NTI has three phases. Initialization extracts a small set $B$ of starter pattern rules via Proposition 3. Pattern unfolding then iterates
$$
U_{k+1}\leftarrow T_{P,B}^{\pi}(U_k)
$$
until a fixpoint is reached. Finally, NTI scans $\pi(P,B)$ for a “special” pattern rule, computes $\alpha(r)$, extracts an initial query $p(\alpha(r))$, and reports that query as non-terminating. The tool restricts to “simple patterns” with unary symbols only, so pattern unification reduces to first-order unification plus a trivial check; because simple patterns use only countably many unary symbols $c^{a,b}$, the fixpoint process always terminates in finitely many steps [2507.09390].

## 4. Representative constructions beyond simple loops

The cited literature emphasizes that non-looping non-termination is not confined to first-order rewriting and logic programming.

In computational geometry, Pav shows that Ruppert’s algorithm can fail to terminate on a planar straight-line graph whose smallest input angle is about $74.51^\circ$, for any refinement threshold $\alpha>29.51^\circ$ [1101.1071]. The initial mesh contains a Delaunay triangle $\Delta ABC$ with smallest angle at $B$ equal to about $29.51^\circ$. Its circumcenter encroaches the longest side $BC$, so Ruppert’s rule inserts the midpoint of $BC$ instead. Re-triangulation then creates a new triangle $\Delta A'B'C'$ of the same combinatorial type and the same smallest angle, but scaled by a factor $r<1$, with $r=a\approx 0.985$. Because each iteration produces a strictly smaller similar bad triangle, edge lengths form a strictly descending sequence, no vertex position recurs, and no triangulation is revisited. The process is therefore infinite but non-looping.

In typed higher-order calculi, Birkedal and collaborators analyze Landin’s Knot in a simply typed $\lambda$-calculus with references and, after closure conversion, existential types [2507.21317]. The source term
$$
\mathit{knot}\equiv \text{let } r=\text{new }(\lambda x.x)\text{ in let } f=\lambda x.(!r)\,x \text{ in } r:=f;\, f\,0
$$
diverges. In the closure-converted target, the crucial point is not merely that references store functions, but that the function’s environment type is hidden by impredicative quantification. At runtime, the reference is first initialized with a trivial closure and then overwritten by a closure whose code refers back to that reference, producing “an infinite descending chain of environments.” There is no decrementing counter or explicit loop, yet no normal form is ever reached [2507.21317].

That same work states a converse observation: higher-order references alone are not sufficient for non-termination. If existential hiding of the environment type is disallowed, so that closure environments have known monomorphic type, then cyclic backpatching is not well typed. A predicative, level-annotated restriction is proposed under which “Theorem (Conjectured Strong Normalization)” asserts termination of all well-typed terms; the status is explicitly conjectural rather than proved [2507.21317].

## 5. Automation and empirical record

Automation is a central theme of the cited work. NTI implements loop detection via guided unfoldings and binary-chain detection via recurrent pairs for term rewriting and logic programming [2312.13949]. In the Termination Competition 2023, on “TRS Standard” with $1523$ benchmarks, NTI proved $263$ non-termination claims, second only to AProVE’s $278$; it was the only tool to detect $10$ instances in the Payet_23 suite, and in the Zantema_15 suite it detected $3$ cases via recurrent pairs. In “Logic Programming” with $315$ benchmarks, NTI was the only tool to find non-termination, namely $58$ logic programs, $13$ of them via binary-chain detection [2312.13949].

The 2025 logic-programming extension evaluates NTI on $41$ logic programs derived from the TPDB’s non-looping non-terminating TRSs [2507.09390]. On the $7$ AProVE_10 programs, NTI proved non-termination of $7/7$, generating between $4$ and $10$ pattern rules in less than $0.1$ seconds each. On the $34$ EEG_IJCAR_12 cases, it found non-looping non-termination in $29$, with $\#\mathrm{unf}$ ranging from $6$ to $140$ and running times from $0.09$ to $0.27$ seconds; four of those $29$ were marked “hard,” meaning that no other TRS tool had previously proved them. The remaining $5$ benchmarks timed out at the $10$-second limit because of more complex context-variable interactions [2507.09390].

The automata-based line is likewise explicitly mechanized. Endrullis and Zantema formulate certificate search as a finite-state or SAT problem: build or guess a small tree automaton $A$, check that $L(A)\neq\varnothing$, verify closure under rewriting by quasi-model or related constraints, and enforce inclusion in the regular language of reducible terms via a product construction with a deterministic redex automaton [1405.5662] [1505.00478]. These methods are designed precisely for non-looping cases where a direct loop witness is unavailable.

The empirical record therefore supports a division of labor. Loop-detection remains important, but the cited data show that recurrent pairs, pattern rules, and automata certificates extend the set of tractable non-termination proofs beyond what loop search alone can establish.

## 6. Misconceptions, limitations, and significance

A recurrent misconception is that non-termination must manifest as repetition of a prior state. The examples above contradict that view in several ways. Binary chains require only repeated alternation of two phases, not recurrence of an entire configuration [2312.13949]. Pattern rules can describe an infinite family of finite unfoldings whose parameters grow monotonically [2507.09390]. Ruppert’s algorithm diverges through a strictly descending sequence of edge lengths rather than revisiting a triangulation [1101.1071]. Landin’s Knot diverges through cyclic environment backpatching with “no explicit looping construct” [2507.21317].

Another misconception is that a single proof technology subsumes the others. The automata literature states an explicit limitation: some non-terminating term rewrite systems admit only context-free patterns of non-termination, such as
$$
b^d c d^d e \to \cdots \to b^{d+1} c d^{d+1} e,
$$
for which no regular witness language exists, so the regular-language method cannot prove them [1505.00478]. Conversely, the pattern-based logic-programming method currently restricts itself to simple patterns with unary symbols, a restriction used to make unification reduce to first-order unification plus a trivial check and to ensure finite fixpoint saturation [2507.09390].

The cited work also draws a sharp boundary around what causes higher-order non-looping recursion. In the Landin’s Knot analysis, the key enabler is impredicative quantification over a closure environment, not higher-order references by themselves [2507.21317]. This corrects a broader but inaccurate intuition that references storing functions are already enough to destroy normalization.

The significance claimed in Payet’s 2025 logic-programming paper is correspondingly specific. By lifting term-rewriting pattern grammars into logic programming via a compact unfolding operator and simple unification of simple patterns, the work provides “the first practical, automatic detector of non-looping non-termination in Prolog-style rewrite systems,” and its experiments are presented as “the first fully automatic tool to handle this class of logic programs” [2507.09390]. More generally, the cited literature establishes non-looping non-termination as a distinct technical object: it requires proof methods that can certify infinite evolution without periodicity, finite pumping, or return to a prior state.

Source: https://www.emergentmind.com/topics/non-looping-non-termination