arXiv:2610.25197cs.LOOct 2026

Manuscript Offprint

arXiv:2610.25197

Taming Cyclic Dependencies in Stabilization-Based String Constraint Solving

Siyi Wu, Bican Xia

Siyi Wu and Bican Xia

School of Mathematical Sciences, Peking University, Beijing, China

{wsyzh@stu.pku.edu.cn, xbc@math.pku.edu.cn}

Abstract. Word equations with cyclic variable dependencies pose a challenge to SMT string solvers. In stabilization-based procedures, such dependencies can trigger repeated refinement of regular-language assignments without reaching stability. We present Z3-Noodler C_{C}, an extension of Z3-Noodler, combining equality-aware stabilization with dedicated loop reasoning. We introduce equality predicates to retain relevant equations as single stability obligations, and extend stabilization with equality-aware substitution and adapted concatenation-eliminating refinement to expose cyclic dependencies as overlapping variable bindings. Dedicated loop reasoning rules then exploit the periodic structure of these bindings, avoiding certain infinite derivations. We evaluate Z3-Noodler C_{C} against Z3-Noodler, cvc5 and OSTRICH2. On 64 systematically generated, syntactically simple instances involving cyclic dependencies and regular constraints, our solver solves all instances, compared with only 20 solved for the best baseline. On equation-oriented instances from SMT-LIB'25, Z3-Noodler C_{C} achieves the highest coverage, solving 20 more instances than Z3-Noodler while maintaining competitive aggregate CPU time.

1 Introduction

String constraint solving is a key technology in program analysis and software verification. It has been used to verify string-manipulating programs, especially web applications [1,6,8,16,21,24,29,33,35,36][1, 6, 8, 16, 21, 24, 29, 33, 35, 36], and analyze cloud-access policies [3,28][3, 28]. Its practical importance has led both to the integration of string reasoning into general-purpose SMT solvers such as Z3 [14,32,34][14, 32, 34] and cvc5 [4,22,23][4, 22, 23], and to the development of specialized solvers such as OSTRICH [8,17][8, 17].

Stabilization [7] has emerged as an effective basis for practical string constraint solving. It reduces satisfiability of word equations with regular constraints to finding a stable regular assignment over the variables: the solver repeatedly refines the assigned regular languages until all language inclusions induced by the equations become stable. Dependencies among these inclusions are represented by a directed graph called the inclusion graph, whose vertices are the inclusions and whose edges capture how a refinement for one predicate may affect another. Stabilization forms the basis of the core decision procedure of Z3-Noodler [9, 10, 12, 13, 18], in which it is combined with length reasoning and support for a broader constraint language. Z3-Noodler has achieved leading performance in the QF_Strings division at SMT-COMP 2024 and 2025 [30,31].

Despite this strong empirical performance, stabilization still can fail to terminate for instances beyond the chain-free [2] setting. An underlying problem is that successive refinement steps may propagate constraints through a cycle in the inclusion graph and eventually affect a predicate that has already been stabilized, forcing its stability to be checked again. Repeated propagation around the cycle can therefore produce an unbounded sequence of increasingly precise regular assignments without reaching stability.

This challenge cannot be addressed simply by falling back on a general decision procedure. Although complete algorithms for word equations are known [19, 26], no implementation of these general algorithms is known to be efficient in practice. Moreover, the decidability of word equations with linear length constraints, a combination central to practical SMT solving, has remained open for years. Therefore, existing solvers typically provide completeness guarantees for restricted fragments while relying on specialized mechanisms to handle harder instances. However, even syntactically small instances can remain challenging when cyclic dependencies are present, as our evaluation demonstrates.

Our approach. We present Z3-Noodler C_{C}, an SMT solver that extends Z3-Noodler's stabilization-based decision procedure with equality-aware stabilization and native loop reasoning for cyclic variable dependencies. Two key observations motivate our work. First, the word-combinatorial relationships imposed by certain equations involved in cyclic dependencies can yield substantially stronger constraints on the candidate solution space than generic inclusion-based refinement, while still being expressible using ordinary word equations and regular constraints. Second, the concatenation-elimination stabilization [9], initially proposed to isolate variables relevant to length reasoning, can be reused to keep shared variable occurrences explicit during refinement.

Based on these observations, Z3-Noodler C_{C} extends stabilization with equality predicates to retain each equation involved in cyclic dependencies as a single stability obligation rather than as two inclusion predicates. This provides a richer reasoning context than inclusion-level refinement, enabling equation-level reduction and specialized reasoning that can derive stronger constraints. At the same time, no equality predicates are introduced for chain-free inputs by construction. Since the extensions take effect only in the presence of equality predicates, the procedure coincides with the original stabilization procedure on the chain-free fragment, preserving its termination and completeness guarantees. Building on equality predicates, we develop equality-aware stabilization, which extends the original procedure with equality-specific reduction, substitution, and refinement. In particular, we adapt concatenation-eliminating stabilization to preserve the boundaries of shared variable occurrences and expose alignment equations for subsequent substitution.

Results. We implement Z3-Noodler C_{C} on top of Z3-Noodler 1.6.1 and evaluate it against Z3-Noodler, cvc5, and OSTRICH2. On a systematically generated diagnostic benchmark of 64 syntactically small non-chain-free instances combining cyclic dependencies with regular constraints, Z3-Noodler C_{C} solves all 64 instances, compared with 12 for Z3-Noodler, 20 for cvc5, and 12 for OSTRICH2. Disabling the loop reasoning rules in Z3-Noodler C_{C} reduces coverage from 64 to 32 instances, providing direct evidence of their contribution. On 25,657 equation-oriented benchmarks from SMT-LIB'25, Z3-Noodler C_{C} achieves the highest coverage while remaining competitive in solving time.

References (33)