Papers
Topics
Authors
Recent
Search
2000 character limit reached

Solvable Tuple Patterns (STPs)

Updated 9 July 2026
  • Solvable Tuple Patterns (STPs) are tuple-pattern languages defined by a reduction system that captures relational invariants, such as concatenation and reversal, in list-like structures.
  • They employ positive-only inference via rewriting rules that factor common prefixes, constants, and structure from sample data matrices.
  • STPs integrate seamlessly with SMT solvers for CHC-based program verification, demonstrating practical efficiency on list-based invariant problems.

Searching arXiv for papers on Solvable Tuple Patterns and closely related tuple-pattern formalisms. arXiv search query: "Solvable Tuple Patterns program verification" Solvable Tuple Patterns (STPs) are a class of tuple-pattern languages introduced to express relational invariants over list-like recursive data structures, especially invariants involving concatenation, overlap, prefix/postfix structure, and reversal. Their defining feature is that candidate invariants can be inferred efficiently from only a small number of positive samples, without negative samples, and then checked for inductiveness using an SMT solver that supports sequence theory. In the form introduced for automated program verification, STPs serve as an inference-and-checking formalism for CHC-based verification of programs manipulating lists and similar recursive data; a CHC solver incorporating STP inference won the ADT-LIN category of CHC-COMP 2025 by a big margin (Kobayashi et al., 28 Aug 2025).

1. Formal language and solvability criterion

The basic syntax of STPs is tuple-based. Let Σ\Sigma be a set of letters and VV a countably infinite set of variables. A tuple pattern has the form

t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.

Each component pip_i is a word over constants and variables, and the tuple pattern denotes a kk-ary relation on sequences by substitution of sequence values for its variables: L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\}, where x1,,xnx_1,\ldots,x_n are the variables occurring in tt (Kobayashi et al., 28 Aug 2025).

This semantics makes STPs a language of structural equalities between multiple sequences. For example, (x,y,xy)(x,y,xy) denotes all triples (s1,s2,s1s2)(s_1,s_2,s_1s_2); VV0 denotes triples in which the first component is a prefix of the third, the second is a postfix of the third, and the overlap is represented by VV1; and VV2 captures reverse-plus-append structure (Kobayashi et al., 28 Aug 2025).

A tuple pattern is called solvable when it can be reduced to a tuple of distinct variables by a prefix-elimination system. Formally, the class VV3 of solvable tuple patterns of arity VV4 is defined by

VV5

The reduction relation VV6 is generated by three rules: removing a component prefix from another component, removing a leading constant, and deleting an empty component. The name “solvable tuple patterns” comes from the fact that if VV7, then the solution for a system of equations VV8 can be expressed using VV9, t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.0, constants t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.1, and the partial operation t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.2, defined as the t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.3 such that t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.4 when t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.5 is a prefix of t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.6 (Kobayashi et al., 28 Aug 2025).

The following representative patterns illustrate the intended expressiveness.

Pattern Expressed relation Status
t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.7 concatenation solvable
t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.8 overlap, prefix, postfix solvable
t::=(p1,,pk),p(ΣV).t ::= (p_1,\ldots,p_k), \qquad p \in (\Sigma \cup V)^*.9 reverse-plus-append solvable
pip_i0 cyclic swap not solvable

The boundary is substantive. The pattern pip_i1 is not in pip_i2, but pip_i3, because the additional component makes the system reducible. Solvability is therefore sensitive not only to the local shape of components but also to whether the tuple contains enough information to solve for the latent sequence variables (Kobayashi et al., 28 Aug 2025).

2. Expressive scope, extensions, and limitations

STPs were introduced to capture structural invariants among list-like recursive data structures. The examples emphasized in the verification setting include append-like relations, overlap relations, prefix/postfix relations, reverse-plus-append invariants, and similar equalities that naturally arise as inductive invariants for recursive list programs (Kobayashi et al., 28 Aug 2025).

A canonical example is the accumulator-based reverse relation

pip_i4

which is naturally expressed by

pip_i5

Another recurring pattern is

pip_i6

used to express that one component is a prefix of the third, another is a postfix, and the shared overlap is explicit (Kobayashi et al., 28 Aug 2025).

The basic formalism is extended in two directions. First, postfix rules are added to infer patterns such as pip_i7. Second, reverse is incorporated by extending the pattern language with

pip_i8

together with

pip_i9

The inference system is correspondingly enriched with reverse-prefix and reverse-postfix rules. The paper states that these extensions preserve the main properties of the basic framework (Kobayashi et al., 28 Aug 2025).

The scope of the formalism is deliberately restricted. The implemented verification pipeline is currently limited to list-like recursive ADTs rather than general trees. The paper also notes that functions such as sort, filter, map, and fold often induce relations not expressible by current STPs, and that Boolean combinations of STPs are outside the core system. This is not merely an implementation issue: the paper explicitly observes that adding a sorting operator loses minimality, and not all tuple patterns are solvable even within the basic sequence language (Kobayashi et al., 28 Aug 2025).

A common misconception is to treat STPs as a generic name for arbitrary tuple templates. In the verification literature, the term denotes a specific reducibility-based fragment of tuple patterns over sequences. Its strength lies in capturing many practically important list equalities while retaining learnability, minimality, and polynomial-time decision properties within that fragment (Kobayashi et al., 28 Aug 2025).

3. Inference from positive samples

The inference procedure takes as input an kk0 matrix kk1 of positive samples, where rows are sample tuples and columns are tuple components. The objective is to infer a tuple pattern kk2 such that kk3. The algorithm starts from the most general pattern

kk4

and repeatedly rewrites it by exploiting whole-column prefix structure, common leading constants, and all-empty columns (Kobayashi et al., 28 Aug 2025).

The rewriting rules are operationally simple. If one whole column is a prefix of another, the residual suffix is factored out with a fresh variable; if every entry in a column starts with the same constant, that constant is factored out; if a column is always empty, the corresponding variable is replaced by kk5 and removed. The algorithm terminates because each rewrite strictly decreases the total size of the data matrix, and the paper proves that the overall runtime is polynomial in kk6 (Kobayashi et al., 28 Aug 2025).

Several metatheoretic guarantees are established. The inference algorithm is sound: if the rewriting process yields kk7, then the data indeed matches kk8. It outputs only solvable patterns: if the algorithm outputs kk9, then L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},0. It is complete for solvable patterns under the stronger relation L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},1, introduced to rule out ambiguity from variables that are always instantiated by L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},2. Most notably, it enjoys a minimality guarantee: if the algorithm infers L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},3 from L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},4, and L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},5 with L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},6, then

L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},7

This minimality is critical because the framework uses only positive data; a non-minimal undergeneralization would not be refutable by positive samples alone (Kobayashi et al., 28 Aug 2025).

The paper also proves a compact characteristic-sample property. If L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},8 is a solvable tuple pattern and L(t)={[s1/x1,,sn/xn]ts1,,snΣ},L(t)=\{[s_1/x_1,\ldots,s_n/x_n]t \mid s_1,\ldots,s_n\in \Sigma^*\},9, then there exists a learning dataset x1,,xnx_1,\ldots,x_n0 such that: x1,,xnx_1,\ldots,x_n1 the algorithm derives x1,,xnx_1,\ldots,x_n2 from x1,,xnx_1,\ldots,x_n3, and any pattern derived from x1,,xnx_1,\ldots,x_n4 has the same language as x1,,xnx_1,\ldots,x_n5. This establishes that STPs are not merely learnable in principle; they admit polynomial-size characteristic data (Kobayashi et al., 28 Aug 2025).

A flagship example is the reverse-accumulator invariant x1,,xnx_1,\ldots,x_n6, which the paper states can be inferred from only two samples: x1,,xnx_1,\ldots,x_n7 This illustrates both the positive-only regime and the structural bias of the language toward relational equalities over sequences (Kobayashi et al., 28 Aug 2025).

4. SMT encoding and integration with CHC solving

Once an STP candidate has been inferred, it is checked as a candidate inductive invariant using an SMT solver with sequence theory. For a tuple pattern x1,,xnx_1,\ldots,x_n8 with pattern variables x1,,xnx_1,\ldots,x_n9, the corresponding formula is

tt0

with tt1. The paper states that

tt2

This gives a direct embedding of STPs into first-order sequence formulas over concatenation and, in the extended setting, reverse (Kobayashi et al., 28 Aug 2025).

The verification target is CHC solving for list-like data structures. A CHC has the form

tt3

or

tt4

The STP-based workflow alternates between sample collection, STP inference, and SMT-based checking of definite and goal clauses. In simplified form, it maintains a set tt5 of inferred STPs, collects positive samples from the definite clauses, infers a new STP tt6, checks whether tt7, and then checks whether tt8. Multiple inferred STPs are combined by intersecting their denotations (Kobayashi et al., 28 Aug 2025).

The reva benchmark is the paper’s main running example. The process first infers

tt9

corresponding to (x,y,xy)(x,y,xy)0, then

(x,y,xy)(x,y,xy)1

and finally

(x,y,xy)(x,y,xy)2

which is inductive and sufficient for the goal. The corresponding verification conditions reduce to sequence-theoretic formulas such as

(x,y,xy)(x,y,xy)3

and the paper reports that CVC5 can solve such checks quickly (Kobayashi et al., 28 Aug 2025).

A relative completeness theorem is given for the abstract solve procedure. If STP inference is fair over reducible STPs, sample collection eventually returns every sample in the least model, and there exists an STP (x,y,xy)(x,y,xy)4 such that the least model satisfies (x,y,xy)(x,y,xy)5 and (x,y,xy)(x,y,xy)6 itself is a model of the CHCs, then the procedure eventually returns SAT. This is completeness within the STP fragment rather than full completeness for arbitrary list invariants (Kobayashi et al., 28 Aug 2025).

5. Applications, empirical results, and practical profile

The empirical evaluation uses 445 instances from the CHC-COMP 2025 ADT-LIN category, restricted to those whose ADTs are only list-like data structures. The reported environment is an AMD Ryzen 9 5900X with 32GB RAM, 3-minute CPU and wall-clock limits, 8GB memory, and 4 CPU cores. Two tools are central: TupInf, the STP inference engine, and CHoCoL, the CHC solver using STPs (Kobayashi et al., 28 Aug 2025).

The main solver comparison reported in the paper is as follows.

Solver Solved (SAT) Solved (UNSAT) Solved (all)
CHoCoL 167 (84) 80 (0) 247 (84)
RInGen 64 (23) 37 (4) 101 (27)
Spacer 20 (2) 90 (0) 110 (2)
Eldarica 20 (0) 84 (0) 104 (0)
HoIce 24 (6) 43 (0) 67 (6)
Catalia 87 (12) 87 (0) 174 (12)
CHoCoL+Catalia 188 84 272

The numbers in parentheses are uniquely solved instances. CHoCoL solves the most total instances among individual solvers, and its main advantage is on satisfiable problems: it solves 167 SAT instances and uniquely solves 84 satisfiable instances. The paper emphasizes these uniquely solved SAT cases as evidence that STPs capture list equalities that size-based or finite abstractions miss (Kobayashi et al., 28 Aug 2025).

The mode breakdown further clarifies the practical role of STPs. CHoCoL’s list mode solves 89 SAT instances with 50 uniquely solved; set/multiset mode solves 9 with 5 uniquely solved; list-len mode solves 65 with 29 uniquely solved; and the refutation mode solves 4. This supports a modular picture in which raw STP reasoning is already strong on list equalities, while length reasoning and multiset extensions add complementary power (Kobayashi et al., 28 Aug 2025).

The strengths and limitations are sharply delineated. The strengths are positive-only inference, small sample requirements, polynomial-time inference and decision procedures within the fragment, and direct expression of append/prefix/postfix/reverse equalities. The limitations are equally explicit: the implementation is restricted to list-like ADTs, not general trees; Boolean combinations of STPs are absent; the refutation procedure is currently naive and does not exploit STPs deeply; and the solver is substantially stronger on SAT than on UNSAT instances (Kobayashi et al., 28 Aug 2025).

The term Solvable Tuple Patterns is specific to the program-verification setting just described, but several earlier research lines study structurally related notions of tuple patterns, tuple solvability, or tuple-based tractability. These works do not use the term in the same sense, yet they clarify the broader conceptual landscape.

In pattern mining, interval tuple patterns were studied in the FCA/pattern-structure framework, where the main problem is efficient search under nonmonotonic constraints such as stability and (x,y,xy)(x,y,xy)7. The paper introduces projection-antimonotonicity and the (x,y,xy)(x,y,xy)8-Sofia algorithm, showing how closed interval tuple patterns can be searched efficiently along a chain of projections rather than by standard anti-monotone specialization order. This suggests a different notion of “solvable tuple patterns”: a tuple-pattern class is practically searchable when its refinement structure supports pruning by projection-based monotonicity (Buzmakov et al., 2015).

In aspect-based sentiment analysis, tuple prediction is recast as a two-step element-to-tuple completion problem: first predict elements, then generate schema-valid tuples anchored at those elements. The paper does not use STP terminology, but it operationalizes tuple solving as anchored completion under typed schema and decoding constraints. A plausible implication is that “solvability” in that setting refers to whether a partial assignment can be completed into a valid sentiment tuple under prompt-induced structure, rather than to reducibility of sequence equations (Mohammadkhani et al., 2024).

In the pattern lambda-calculus with pair patterns, solvability is characterized by typability plus inhabitation. There the basic tuple-pattern fragment is binary pair patterns, and a term is solvable when some head context makes it reduce to a pair. The result is closely related in spirit—both frameworks isolate a restricted tuple-pattern fragment with a precise solvability criterion—but the objects are lambda terms with explicit matching rather than relational invariants over sequences (Bucciarelli et al., 2018).

Other adjacent literatures examine tuple solvability from still different angles. Shattering bounds for tuple systems study when all (x,y,xy)(x,y,xy)9-ary assignments on a coordinate subset can be realized by tuples from a system, giving an expressiveness bound for full realizability rather than an invariant language (Hegedüs, 2015). The TP/TN completion literature studies patterns of specified and unspecified matrix entries, where a pattern is “solvable” when all admissible partial data admit a totally positive or totally nonnegative completion, using catalysis, inhibition, and atomic determinant inequalities as the decision framework (Carter et al., 2022). Tuple interpretations for higher-order rewriting map base-type terms to tuples such as (s1,s2,s1s2)(s_1,s_2,s_1s_2)0 or (s1,s2,s1s2)(s_1,s_2,s_1s_2)1, making tuple structure a semantic device for proving finite derivation height and runtime bounds rather than a pattern language for invariants (Vale et al., 2021). Earlier still, Tuplix Calculus provides a formal calculus of attribute–quantity tuples with tests, existential summation, and encapsulation, offering a constraint-based tuple formalism that is conceptually adjacent but semantically distinct (0712.3423).

Taken together, these works show that “tuple patterns” are a recurrent formal theme across data mining, NLP, rewriting, constraint systems, and verification. In the specific technical sense of STPs, however, the term denotes the 2025 verification formalism: a reducibility-based class of tuple patterns over sequences, learnable from positive data and checkable as inductive invariants for list-like recursive programs (Kobayashi et al., 28 Aug 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 Solvable Tuple Patterns (STPs).