Abstract 1 Introduction 2 Preliminaries 3 Branching VASS 4 Reachability Set Computation for 𝟐-BVASS 5 Soundness and Completeness of Algorithmic Explorations 6 Core Witnesses of Infinity for Spannable Graphs 7 Termination 8 Conclusion References

On the Reachability Problem for Two-Dimensional Branching VASS

Clotilde Bizière ORCID LaBRI, Univ. Bordeaux, CNRS, Bordeaux INP, Talence, France Thibault Hilaire ORCID LaBRI, Univ. Bordeaux, CNRS, Bordeaux INP, Talence, France Jérôme Leroux ORCID LaBRI, Univ. Bordeaux, CNRS, Bordeaux INP, Talence, France Grégoire Sutre ORCID LaBRI, Univ. Bordeaux, CNRS, Bordeaux INP, Talence, France
Abstract

Vectors addition systems with states (VASS), or equivalently Petri nets, are arguably one of the most studied formalisms for the modeling and analysis of concurrent systems. A central decision problem for VASS is reachability: whether there exists a run from an initial configuration to a final one. This problem has been known to be decidable for over forty years, and its complexity has recently been precisely characterized. Our work concerns the reachability problem for BVASS, a branching generalization of VASS. In dimension one, the exact complexity of this problem is known. In this paper, we prove that the reachability problem for 2-dimensional BVASS is decidable. In fact, we even show that the reachability set admits a computable semilinear presentation. The decidability status of the reachability problem for BVASS remains open in higher dimensions.

Keywords and phrases:
Vector addition systems, Reachability problem, Semilinear sets, Verification
Copyright and License:
[Uncaptioned image] © Clotilde Bizière, Thibault Hilaire, Jérôme Leroux, and Grégoire Sutre; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Logic and verification
Related Version:
Full Version: https://arxiv.org/abs/2506.22561 [2]
Editors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał Skrzypczak

1 Introduction

Vectors addition systems with states (VASS), or equivalently Petri nets, are arguably one of the most studied formalisms for the modeling and analysis of concurrent systems. A central decision problem for VASS is reachability: whether there exists a run from an initial configuration to a final one. This problem was shown decidable more than forty years ago [26] but its precise complexity was only established a few years ago [23, 9, 22]. Several VASS extensions have been introduced and studied, most notably unordered data nets [20], pushdown VASS [1, 19], and branching VASS [10, 31]. But so far, the reachability problem is still open for these models.

One of the first subclasses of VASS for which reachability was shown to be decidable is the class of 2-dimensional VASS. For this class, Hopcroft and Pansiot devised an algorithm that computes a finite description (more precisely, a semilinear presentation) of the reachability set [16]. As an immediate consequence, they obtained that reachability is decidable for this class. In fact, the algorithm of Hopcroft and Pansiot can be viewed as a refinement of the classical Karp-Miller algorithm [18] where the abstract pumping of cycles (putting ω in some components) is replaced by an exact acceleration of cycles (adding new vectors to the current set of periods).

In this paper, we investigate the reachability problem for branching VASS (shortly called BVASS in the sequel), a branching generalization of VASS. More precisely, BVASS extend VASS with special branching transitions that merge configurations (by summing their vectors). This model has gained a lot of interest recently due to strong links with several fields in computer science such as cryptographic protocols [31], linear logic [10, 21], recursively parallel programs [5], timed pushdown systems [7], computational linguistic [29, 30], game semantics [8], equational tree automata [28, 25] and data logics [17, 4]. For instance, provability in the multiplicative exponential fragment of linear logic (MELL) is inter-reducible with the reachability problem in BVASS [10]. As mentioned before, the reachability problem is still open in arbitrary dimension for BVASS. In dimension one, the reachability problem is decidable and the exact complexity is known [15, 12]. The objective of our work was to investigate the decidability of the reachability problem for 2-dimensional BVASS.

Contributions.

In this paper, we prove that the reachability problem for 2-dimensional BVASS is decidable. In fact, we even show that the reachability set admits a computable semilinear presentation. We propose an algorithm that essentially performs a forward symbolic exploration of a 2-dimensional BVASS given as input. Our algorithm is inspired from Hopcroft and Pansiot’s algorithm for classical 2-dimensional VASS [16]. The latter computes a symbolic reachability tree, but in our case we need an acyclic graph, that we call exploration, because of branching transition rules.

Compared to Hopcroft and Pansiot’s algorithm where pumped cycles are computed statically, in our case pumped cycles are computed dynamically since they exploit configurations that are discovered during the exploration. This feature complicates the proof of soundness of our algorithm. But the main challenge is the proof of termination. As usual, we proceed by contradiction and assume that the algorithm constructs an infinite exploration. A first source of difficulty in order to obtain a contradiction is that the set of pumped cycles is potentially infinite. A second source is the fact that we cannot consider any infinite path of the exploration. In fact, there are mutual dependencies between paths since the exploration is not necessarily a tree. We need to consider an infinite path that ultimately does not depend on the other paths, and we show that such a path always exist. We believe that our proof techniques could be applied to other algorithms that construct potentially infinite acyclic graphs.

Related Work.

In general dimension, the coverability problem (a weak version of the reachability problem) and the boundedness problem are decidable for BVASS [31], and their precise complexity is known [11, 21]. The complexity of the reachability problem for bounded BVASS was established in [27]. The reachability problem for BVASS and pushdown VASS is still open. For pushdown VASS the problem is known to be decidable in the bidirected case [14]. In small dimensions, the above-mentioned idea of pumping cycles was successfully applied to the analysis of several VASS generalizations, and in particular to solve reachability for 2-dimensional VASS and extensions [3, 6, 13], coverability for 1-dimensional pushdown VASS [24], and reachability for 1-dimensional BVASS [15, 12].

Outline.

Some preliminary background and notations are provided in Section 2. We define in Section 3 the model of BVASS and their semantics. Section 4 introduces a class of acyclic graphs, called explorations, where nodes are labeled by sets of configurations, and presents our reachability algorithm for 2-BVASS. We show in Section 5 that the explorations constructed by our algorithm, called algorithmic explorations, are sound and complete (for the reachability set). This shows the partial correctness of our algorithm, and we then focus on its termination. We prove in Section 6 that any infinite graph that admits a finitely-branching spanning forest contains a “core” witness of infinity defined as a so-called directed and primary graph. Section 7 provides the proof of termination of our algorithm, and is decomposed into four subsections. First, we study the stabilization of cones, a form of acceleration for cones through the so-called notion of modes. Second, we show how to decompose the effect of paths in an exploration into a sum of so-called elementary vectors corresponding to previously mentioned pumped cycles, and consecutive vectors. Third, we prove that the periodic set associated to a primary infinite set of nodes in an algorithmic exploration is finitely-generated. Fourth, we assemble the results from the previous sections to deduce the termination of our algorithm. Section 8 concludes the paper. Due to space limitations, detailed proofs are deferred to the full version [2] of the paper.

2 Preliminaries

We denote by the set of integers, the set of natural numbers, by the set of rational numbers, and by 0 the set of non-negative rational numbers. We also introduce >0 and >0 defined as {0} and 0{0}, respectively. The powerset of a set S is written (S).

Vectors.

Vectors are typeset in bold face. Given 𝐜d, we let (𝐜(1),,𝐜(d)) denote the vector of rational numbers defining 𝐜. We write 𝐱𝐲 for two vectors 𝐱,𝐲d if 𝐱(i)𝐲(i) for every i{1,,d}. The sum of two vectors 𝐱+𝐲 is defined component-wise. The sum operator over vectors is extended over sets 𝐗,𝐘d by 𝐗+𝐘={𝐱+𝐲𝐱𝐗𝐲𝐘}. Given 𝐗d and 𝐱d, we define 𝐱+𝐗 as {𝐱}+𝐗. The set 𝐗+𝐱 is defined similarly. We also write 0𝐗 the set {λ𝐱λ0𝐱𝐗}.

Periodic sets and semilinear sets.

A set 𝐏d is said to be periodic if 𝟎𝐏 and 𝐏+𝐏𝐏. Given a set 𝐀d, we denote by Per(𝐀) the set of finite sums 𝐚1++𝐚k where k, and 𝐚1,,𝐚k𝐀. This periodic set is called the periodic set spanned by 𝐀. A periodic set 𝐏 is said to be finitely-generated if 𝐏=Per(𝐀) for some finite set 𝐀d. The sum of two periodic sets is a periodic set. Given a sequence (𝐏i)iI of periodic sets indexed by a finite or infinite set I, we denote by iI𝐏i the periodic set Per(iI𝐏i). Notice that that if I is finite, this definition of sum coincides with the previously introduced finite sum of subsets of d. A set 𝐋d is said to be linear if 𝐋=𝐛+𝐏 where 𝐛d and 𝐏d is a finitely-generated periodic set. A set 𝐒d is semilinear if 𝐒 is a finite union of linear subsets of d.

Cones.

A cone 𝐂 of d is a periodic subset of d such that 0𝐂𝐂. The cone spanned by a set 𝐀d is the cone denoted by Con(𝐀) and defined as 0Per(𝐀). A cone 𝐂d is said to be finitely-generated if 𝐂=Con(𝐀) for some finite set 𝐀d.

Lemma 2.1 ([16, Lemma 1.2]).

Let 𝐏d be a periodic set. Then 𝐏 is a finitely-generated periodic set if, and only if, Con(𝐏) is a finitely-generated cone.

Graphs.

A graph is a pair 𝒢=(N,) where N is a set of nodes, and is a binary relation on N called the edge relation. The graph is said to be empty (resp. finite, infinite) when its set of nodes is empty (resp. finite, infinite). We denote by + the transitive closure of , and by the reflexive closure of +. The graph is called acyclic when + is irreflexive. We associate with a node nN the set of ancestors Anc𝒢(n)={mNmn}, and the set of descendants Des𝒢(n)={mNnm}. Ancestors and descendant are extended over sets of nodes XN as expected, by Anc𝒢(X)=nXAnc𝒢(n) and Des𝒢(X)=nXDes𝒢(n). A set of nodes XN verifying X=Anc𝒢(X) is said to be ancestor-closed. A node nN is called a leaf if there does not exist a node mM satisfying nm. A node n is called a source if there is no node m such that mn. The restriction of a graph 𝒢=(N,) to a set of nodes XN is the graph (X,(X×X)). A node-labeled graph is a triple (N,,λ) where (N,) is a graph and λ is a function with domain N. The notions defined above for graphs naturally carry over to node-labeled graphs.

3 Branching VASS

A d-dimensional branching vector addition system with states (d-BVASS for short) is a pair =(Q,Δ) where Q is a finite non-empty set of states and Δ((Q)×d×Q) is a finite set of transition rules. A transition rule δ=(S,𝐚,q) in Δ consists in a set SQ of input states, a displacement 𝐚d, and a single output state qQ. Intuitively, assuming that S={q1,,qk}, this transition rule can be seen as the rewriting rule q1(𝚡1),,qk(𝚡k)q(𝐚+𝚡1++𝚡k) with formal parameters 𝚡1,,𝚡k. Note that our definition forbids a state from occurring twice on the left-hand side of a transition rule (as this left-hand side is given by a set of states). This restriction is only a matter of technical convenience. A transition rule δ=(S,𝐚,q) is called initial when S=, unary when |S|=1, and branching when |S|2. A d-dimensional vector addition system with states (d-VASS for short) is a d-BVASS 𝒱=(Q,Δ) such that |S|1 for every transition rule (S,𝐚,q) in Δ.

We formulate the semantics of a d-BVASS =(Q,Δ) in terms of a configuration-set transformer Post. A configuration of is a pair (q,𝐱) in Q×d, also written as q(𝐱) in the sequel. By extension, given a set 𝐗d, we let q(𝐗) denote the set of configurations {q}×𝐗. The set of initial configurations of is {q(𝐚)(,𝐚,q)Δ and 𝐚𝟎}. For each transition rule δ=(S,𝐚,q) in Δ, we define the function Postδ:(Q×d)(Q×d) by111We use double braces {{}} to denote multisets. Here, the condition S={{rr(𝐳)D}} means that, firstly, the set S is equal to the set {rr(𝐳)D}, and, secondly, r1r2 for every two distinct configurations r1(𝐳1),r2(𝐳2) in D.

Postδ(C)=q({𝐲dDC:S={{rr(𝐳)D}} and 𝐲=𝐚+r(𝐳)D𝐳})

for every set CQ×d. We also introduce Post:(Q×d)(Q×d), defined by Post(C)=δΔPostδ(C). Note that Post is -nondecreasing and that Post() coincides with the set of initial configurations of . The reachability set of , written , is the -least set CQ×d such that Post(C)C.

Figure 1: The 2-BVASS from Example 3.1 (left) and an execution of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎() (right).
Example 3.1.

Consider the 2-BVASS depicted in Figure 1. It has four states p,q,r,s and seven transition rules, namely (,(4,4),p), ({p,q},(0,0),r) and five unary transition rules (see Figure 1). We have p(4,4) since (,(4,4),p)Δ. From ({p},(1,0),q)Δ and p(4,4) we get that q(3,4). From ({p,q},(0,0),r)Δ and p(4,4),q(3,4) we get that r(7,8).  

A set of configurations CQ×d is said to be semilinear if C is a finite union of sets of the form q(𝐋) where qQ and 𝐋d is linear, i.e. a set of the form 𝐛+Per(𝐀) for some 𝐛d and some finite subset 𝐀 of d. A presentation of a semilinear set of configurations CQ×d is a finite set {(q1,𝐛1,𝐀1),,(qk,𝐛k,𝐀k)}, where qjQ, 𝐛jd, and 𝐀j is a finite subset of d, such that C=j=1kqj(𝐛j+Per(𝐀j)). The main contribution of this paper is the generalization to 2-BVASS of the following theorem.

Theorem 3.2 ([16]).

For every 2-VASS 𝒱, the reachability set 𝒱 of 𝒱 is semilinear and a presentation of 𝒱 is computable from 𝒱.

In order to generalize Theorem 3.2 to 2-BVASS, we will extend to BVASS some techniques developed for classical VASS. A linear (i.e., non-branching) view of BVASS behaviors is required to do so. Intuitively, this view is obtained by instantiating transition rules δ=(S,𝐚,q) with |S|2 into unary transition rules. This instantiation can be performed at the semantic level or at the syntactic level. Let us make these ideas more concrete. We assume that =(Q,Δ) is a d-BVASS for the remainder of this section.

For each transition rule δ=(S,𝐚,q) in Δ, we introduce the binary relation 𝛿 on Q×d defined as the set of pairs (p(𝐱),q(𝐲))(Q×d)2 such that pS and there exists a set D verifying (S{p})={{rr(𝐳)D}} and 𝐲=𝐚+𝐱+r(𝐳)D𝐳. The binary relation 𝛿 instantiates the transition rule δ at the semantic level as it relies on the reachability set of . We also introduce the binary step relation on Q×d defined as the union δΔ𝛿. The reflexive-transitive closure of is denoted by . It is readily seen that and are diagonal.222 A binary relation on Q×d is called diagonal if p(𝐱)q(𝐲) implies p(𝐱+𝐮)q(𝐲+𝐮), for every configurations p(𝐱),q(𝐲)Q×d and vector 𝐮d. Using square brackets to denote relational images333Given a binary relation on a set S and a subset X of S, we let [X] denote the relational image of X under , defined by [X]={ySxX:xy}. , we have Post(C)[C][C] for every set of configurations C.

Let us now instantiate transition rules at the syntactic level. Given a finite set FQ×d, the instantiation of with F, written F, is the d-VASS F=(Q,Δ) where Δ is the set of triples ({p},𝐚,q) such that there exist a transition rule (S,𝐚,q)Δ with pS and a set DF verifying (S{p})={{rr(𝐳)D}} and 𝐚=𝐚+r(𝐳)D𝐳. We observe that if F then the step relation of F is contained in the step relation of .

 Remark 3.3.

In the definition of the instantiation F, we require F to be finite solely to ensure that Δ is finite. We could drop this requirement and obtain an “infinite d-VASS”, meaning that its set of transition rules is potentially infinite. The step relations of and of the resulting “infinite d-VASS” coincide.

We conclude this section with notions that are specific to classical VASS. Consider a d-VASS 𝒱=(Q,Δ). From now on, unary transition rules ({p},𝐚,q)Δ will be written (p,𝐚,q) for short. A path of 𝒱 is a non-empty sequence θ=(p1,𝐚1,q1)(pk,𝐚k,qk) of unary transition rules (pi,𝐚i,qi)Δ such that qi=pi+1 for all i{1,,k1}. Such a path θ is also shortly written θ=p1𝐚1q1𝐚kqk. We call p1 and qk the start and the end of θ, respectively. The displacement of θ is i=1k𝐚i. We say that θ is a cycle if p1=qk. It is an elementary cycle if p1=qk and p1,,pk are pairwise distinct.

 Fact 3.4.

Consider a d-BVASS =(Q,Δ) and finite set F. Let qQ, 𝐱d and let θ be an elementary cycle of F with displacement 𝐯 and with start (and end) q. If 𝐱(c,,c) where c=|Q|maxi{1,,d}max(S,𝐚,q)Δ𝐚(i) then q(𝐱)q(𝐱+𝐯).

4 Reachability Set Computation for 𝟐-BVASS

We present in this section an algorithm to compute the reachability set for 2-BVASS. More precisely, given a 2-BVASS , our algorithm returns a finite exploration of that is both sound and complete. We start by defining what we mean by sound and complete exploration.

Definition 4.1.

An exploration of a 2-BVASS =(Q,Δ) is a node-labeled acyclic graph 𝒢=(N,,λ) such that

  1. 1.

    the edge relation is well-founded, i.e., there is no infinite sequence n0,n1, of nodes in N such that ni+1ni for all i, and

  2. 2.

    each node nN is labeled with λ(n)=(𝐚n,qn,𝐳n,𝐏n) where 𝐚n2, qnQ, 𝐳n2, and 𝐏n is a periodic subset of 2.

Intuitively, the label λ(n)=(𝐚n,qn,𝐳n,𝐏n) of a node n provides, firstly, the displacement 𝐚n of the transition rule used to create n (this will be made clear later on and can be ignored for now), and, secondly, the set of configurations qn(𝐳n+𝐏n) associated with the node n. Recall that denotes the reachability set of a 2-BVASS . Similarly, we associate to an exploration 𝒢=(N,,λ) of the set of configurations 𝒢=nNqn(𝐳n+𝐏n). We say that 𝒢 is sound when 𝒢 and that it is complete when 𝒢. A node nN is called redundant if there exists sN verifying s+n and qn(𝐳n+𝐏n)qs(𝐳s+𝐏s). We say that 𝒢 is non-redundant when every redundant node is a leaf.

Example 4.2.

The node-labeled acyclic graph depicted on the right-hand side of Figure 1 is an exploration of the 2-BVASS depicted on the left-hand side (see also Example 3.1). For instance, the set of configurations associated with the node n4 is {q(2+2k,4+5k)k}. The first component 𝐚n of λ(n) is omitted in the figure to reduce clutter. As mentioned above, the vectors 𝐚n can be ignored for now, see Example 5.2 for actual values.  

As in Hopcroft and Pansiot’s algorithm for classical 2-VASS [16], a crucial ingredient of our algorithm is the acceleration of cycles. The purpose of cycle acceleration is to make the periodic sets 𝐏n grow. We will utilize three kinds of cycles. Consider an exploration 𝒢=(N,,λ) of a 2-BVASS =(Q,Δ). We associate to each node nN the 2-VASS 𝒱n defined as the instantiation F of with the finite set of configurations F={qs(𝐳s)sN,s+n}. In particular, if n is a source then 𝒱n==(Q,Δ) where Δ={(S,𝐚,q)Δ|S|=1} is the set of unary transition rules in Δ. We introduce three finite subsets of 2, namely 𝐄n, 𝐂n and 𝐂¯n, that correspond to the three kinds of cycles mentioned above. Let us define c=|Q|maxi{1,2}max(S,𝐚,q)Δ𝐚(i). We call c the constant of iteration of . Observe that c is the same constant as the one in ˜3.4.

  • 𝐄n is the set of vectors 𝐯2 such that there exist an elementary cycle θ of 𝒱n with displacement 𝐯 and a node sAnc(n) verifying qs is the start of θ, 𝐳s(c,c) and sn implies 𝐯(0,0).

  • 𝐂n is the set of vectors 𝐯2 such that there exists a node sAnc(n) verifying qs=qn, 𝐯=𝐳n𝐳s, 𝐳n(c,c) and 𝐳s(c,c).

  • 𝐂¯n is the set of vectors 𝐯2 such that there exists a node sAnc(n) verifying qs=qn and 𝐯=𝐳n𝐳s.

Note that 𝐂n𝐂¯n. We also introduce the finite set 𝐈n defined by 𝐈n=𝐄n𝐂¯n if mn𝐏m={(0,0)} and 𝐈n=𝐄n𝐂n otherwise. Vectors in 𝐄n, 𝐂n, and 𝐈n are respectively called n-elementary, n-consecutive and n-iterable.

Example 4.3.

Let us continue Example 4.2. The constant of iteration of is c=4. By definition, 𝐈ni=𝐄ni𝐂¯ni for i{0,1,2,6}, and 𝐈ni=𝐄ni𝐂ni for i{3,4,5}. We first discuss n-consecutive vectors. We have 𝐂n0=𝐂¯n0={(0,0)} since n0 has no ancestor except itself. The set 𝐂n1 is empty because the first component of 𝐳n1=(3,4) is strictly below c, hence, 𝐳n1(c,c). Similarly, 𝐂n2=𝐂n3=. It is readily seen that 𝐂¯n1=𝐂¯n2={(0,0)} and that 𝐂¯n3={(0,0),(1,0)}. We now discuss n-elementary vectors. The 2-VASS 𝒱n0= contains exactly one elementary cycle (up to rotation), namely θ0=p(1,0)q(0,0)s(0,0)p. It follows that 𝐄n0={(1,0)}. In addition to the cycle θ0, the 2-VASS 𝒱n1={p(4,4)} also contains the elementary cycle θ1=q(4,4)r(1,1)q. Still, the set 𝐄n1 is empty, because none of these two cycles contributes to 𝐄n1. Indeed, even though the elementary cycle θ0 contains the states qn0 and qn1, its displacement 𝐯0=(1,0) is not in 𝐄n1 because 𝐳n1(c,c) and 𝐯0(0,0). Analogously, the displacement of θ1 is not in 𝐄n1 because 𝐳n1(c,c). The elementary cycles of 𝒱n2 are θ0, θ1 and θ2, where θ2=p(3,4)r(1,1)q(0,0)s(0,0)p. The displacement 𝐯2=(2,5) of θ2 is in 𝐄n2 since θ2 contains the state qn0, 𝐳n0(c,c) and 𝐯2(0,0). We get that 𝐄n2={(2,5)}. Last, we observe that 𝒱n2=𝒱n3 since the state qn2 is not part of any branching transition. So 𝒱n3 has the same elementary cycles as 𝒱n2, and we get that 𝐄n3=𝐄n2={(2,5)}. Indeed, even though the elementary cycle θ0 contains the state qn3, its displacement 𝐯0=(1,0) is not in 𝐄n3 because 𝐳n3(c,c) and 𝐯0(0,0).  

Given a set 𝐈2 and a periodic set 𝐏2, we introduce the periodic set Add𝐈(𝐏) defined as the set of vectors 𝐩+𝐯1++𝐯k where 𝐩𝐏, k, and 𝐯1,,𝐯k are vectors in 𝐈 such that 𝐩+𝐯1++𝐯(0,0) for every {1,,k}.

Lemma 4.4.

For every finite sets 𝐆2 and 𝐈2, we can effectively compute a finite set 𝐇2 such that Add𝐈(Per(𝐆))=Per(𝐇).

Proof sketch..

First of all, notice that Theorem 3.2 is not sufficient for proving that result since there exist semilinear periodic sets, like {(0,0)}((1,1)+2) that are not finitely-generated. From Lemma 2.1, we deduce that Add𝐈(Per(𝐆)) is finitely-generated periodic set if Con(Add𝐈(Per(𝐆))) is a finitely-generated cone. We observe that this cone is spanned by 𝐆(𝐈2)𝐔 where 𝐔 is a set of axis, i.e. a subset of {(1,0),(0,1)}. It follows that there exists a finite set 𝐇2 such that Add𝐈(Per(𝐆))=Per(𝐇). Finally, with a step-by-step algorithm computing increasing finite subsets of Add𝐈(Per(𝐆)) we eventually reach a set 𝐇 satisfying the lemma.

Algorithm 1 𝙴𝚡𝚙𝚕𝚘𝚛𝚎().

Our algorithm, dubbed 𝙴𝚡𝚙𝚕𝚘𝚛𝚎, is defined in Algorithm 1. We use an abstract pseudocode to simplify the presentation. This raises implementability issues that are addressed in Remark 4.5. Given a 2-BVASS =(Q,Δ) as input, 𝙴𝚡𝚙𝚕𝚘𝚛𝚎() iteratively computes an exploration of and then returns it. This exploration is maintained in the variables N, and λ, and is initially empty (see line 1). As in Definition 4.1, we let qn, 𝐳n and 𝐏n denote the second, third and fourth components of λ(n). The set of redundant nodes of the exploration is tracked in the variable R. The set of unprocessed nodes, called the worklist, is maintained in the variable W. Both variables R and W remain disjoint subsets of N during the execution of the algorithm. For each initial configuration q(𝐚) of , a new node is created and put in the worklist (see lines 26). After this initialization phase, 𝙴𝚡𝚙𝚕𝚘𝚛𝚎() repeatedly selects a node from the worklist and processes it, as long as the worklist is non-empty (see lines 722). The processing of a node n consists in four steps. First, the node n is removed from the worklist (so n is considered processed afterwards). Second, the periodic set 𝐏n is enlarged using the set 𝐈n of n-iterable vectors (see line 10). This is the cycle acceleration step. Note that the set 𝐈n is finite and implicitly depends on the constant of iteration of and on the current exploration (N,,λ) of . The assignment at line 10 actually means that the label λ(n) of the node n is modified (in fact, only the fourth component of the label is modified). Third, the algorithm tests whether the node n is “covered” by one of its ancestors (see line 11). If that is the case then n is added to the set R of redundant nodes and the processing of n stops. Otherwise, as a fourth step, the node n is expanded (see lines 1422), meaning that for each set of processed and non-redundant nodes M containing n and for each transition rule (S,𝐚,q) that applies to M, finitely many children of n are created and put in the worklist. At first glance, one might want to create a single child labeled with (𝐚,q,𝐚+𝐳,𝐏). This would be fine if 𝐚+𝐳(0,0), however that is not the case in general. This is the reason why we need the finite set 𝐁 at line 17 and the foreach-loop at lines 1822. The existence of such a finite set is explained in Remark 4.5. The observant reader will notice that the modification of the variables N and W at lines 20 and 22 has no impact on the foreach-loop iteration at line 14, since NW remains constant. When the worklist becomes empty, the constructed exploration is returned at line 23. The reachability set of is then easily obtained from this exploration, provided that it is sound and complete.

 Remark 4.5.

The abstract pseudocode used in Algorithm 1 raises some implementability issues. The first issue is that we liberally use periodic sets in the pseudocode, but these periodic sets need to admit a finite and computable representation. To address this issue, we observe that each periodic set defined in Algorithm 1 is finitely-generated and admits a computable finite spanning set. The only line where this property is non-trivial is line 10, but Lemma 4.4 provides the result. The second issue is the existence and computation of the finite set 𝐁 at line 17. To address this issue, we recall the following well-known fact (see for instance [16, Lemma 1.1]). Given a vector 𝐯d and a finite subset 𝐀={𝐚1,,𝐚k} of d, the set (𝐯+Per(𝐀))d is equal to (𝐁+Per(𝐀)) where 𝐁d is the finite set of vectors 𝐯+α1𝐚1++αk𝐚k such that (α1,,αk) is a minimal vector in k satisfying 𝐯+α1𝐚1++αk𝐚k𝟎.

Example 4.6.

To illustrate Algorithm 1, we apply it on the 2-BVASS from Example 3.1. The resulting exploration is depicted in Figure 1. There is only one initial configuration, so the exploration has only one source n0. The nodes are added to (+) and removed from () the worklist in the order +n0, n0, +n1, n1, +n2, +n6, n2, +n3, n3, +n4, +n5. So the nodes n4,n5 and n6 are still in the worklist. The labels qn and 𝐳n are straightforward. For the periodic sets 𝐏n, we first recall from Example 4.3 that 𝐈n0={(0,0),(1,0)}, 𝐈n1={(0,0)}, 𝐈n2={(0,0),(2,5)} and 𝐈n3={(2,5)}. The periodic set 𝐏n0 is Add𝐈n0({(0,0)})={(0,0)}. The node n1 also has {(0,0)} as periodic set since 𝐈n1={(0,0)}. The periodic set 𝐏n2 is Add𝐈n2({(0,0)})=Per({(2,5)}). Similarly, 𝐏n3=Add𝐈n3(Per({(2,5)}))=Per({(2,5)}).  

5 Soundness and Completeness of Algorithmic Explorations

This section is devoted to the partial correctness of our algorithm 𝙴𝚡𝚙𝚕𝚘𝚛𝚎 (see Algorithm 1). Its termination is much more involved and will be the subject of the next sections. We first refine the notion of exploration to account for the behavior of our algorithm.

Definition 5.1.

An exploration 𝒢=(N,,λ) of a 2-BVASS =(Q,Δ) is algorithmic if it satisfies, for every node nN, the three following conditions:

  1. 1.

    the multiset S={{qmmn}} is a set and verifies (S,𝐚n,qn)Δ,

  2. 2.

    the vector 𝐳n is in 𝐚n+mn(𝐳m+𝐏m), and

  3. 3.

    the periodic set 𝐏n verifies 𝐏n=Add𝐈n(mn𝐏m).

Intuitively, Conditions 1 and 2 ensure that the exploration conforms to the semantics of 2-BVASS. As hinted before, the vector 𝐚n is the displacement of the transition rule leading to n (see Condition 1). Notice these two conditions entail in particular that qn(𝐳n) is an initial configuration for every source n. Condition 3 corresponds to the previously-mentioned cycle acceleration step (see line 10 of Algorithm 1).

Example 5.2.

Let us get back to the exploration of Example 4.2 and give the actual values of the vectors 𝐚n. We take 𝐚n0=(4,4), 𝐚n1=𝐚n4=(1,0) and 𝐚n2=𝐚n3=𝐚n5=𝐚n6=(0,0). The restriction to {n0,n1,n2,n3} of the resulting exploration is algorithmic.  

 Remark 5.3.

For every algorithmic exploration 𝒢=(N,,λ) and every node nN, the set Anc(n) is finite. Indeed, by Condition 1, every node nN has finite in-degree (i.e., the set of nodes mN such that mn is finite). As is well-founded by Condition 1 of Definition 4.1, it follows from König’s Lemma that Anc(n) is finite for every nN.

In the rest of this section, we show, firstly, that every algorithmic exploration is sound, and secondly, that our algorithm constructs explorations that are algorithmic and complete.

5.1 Soundness of algorithmic explorations

The main difficulty to establish the partial correctness of our algorithm 𝙴𝚡𝚙𝚕𝚘𝚛𝚎 comes from the cycle acceleration step (see line 10 of Algorithm 1), which translates to Condition 3 of Definition 5.1. Contrary to usual cycle acceleration techniques, our cycle acceleration step is “retroactive” since the set 𝐈n used to accelerate a node n accounts for elementary cycles of 𝒱n that apply to an ancestor s+n. Thus, to show that a given algorithmic exploration 𝒢 is sound, we transform 𝒢 into an alternative exploration whose periodic sets 𝐐n are closed in the sense that each 𝐐n already accounts for all potential cycles applicable to n, and we show that is sound. Let us make these ideas more precise.

Consider a 2-BVASS =(Q,Δ). For every configuration q(𝐱) of , we define the function Cloq,𝐱:(2)(2) by Cloq,𝐱(𝐏)={𝐰2𝐮𝐏:q(𝐱+𝐮)q(𝐱+𝐰)}. Observe that Cloq,𝐱 is an upper closure operator444An upper closure operator on a partially-ordered set (S,) is any function f:SS that is -nondecreasing (xy implies f(x)f(y)), extensive (xf(x)), and idempotent (ff=f). on the partially-ordered set ((2),). In fact, for every subset 𝐏2, the set Cloq,𝐱(𝐏) is the -greatest subset 𝐐2 such that q(𝐱+𝐐)[q(𝐱+𝐏)]. Note also that Cloq,𝐱 preserves periodicity, meaning that Cloq,𝐱(𝐏) is periodic for every periodic subset 𝐏2. The following technical lemma will allow us to relate Add𝐈n and Cloqn,𝐳n.

Lemma 5.4.

For every configuration q(𝐱) of and periodic subset 𝐏 of 2, it holds that Add𝐉(𝐏)=Cloq,𝐱(𝐏) where 𝐉 is the set of vectors 𝐯2 such that there exists 𝐲2 and 𝐮𝐏 verifying (𝐯=𝐲𝐱 and q(𝐱+𝐮)q(𝐲)) or (𝐯=𝐱𝐲 and q(𝐲+𝐮)q(𝐱)).

Lemma 5.5.

Every algorithmic exploration of a 2-BVASS is sound.

Proof sketch..

Let 𝒢=(N,,λ) be an algorithmic exploration of 2-BVASS . We introduce the family (𝐐n)nN of subsets of 2 defined, by well-founded recursion over , by 𝐐n=Cloqn,𝐳n(mn𝐐m) for every node nN. Observe that each 𝐐n is periodic and that mn implies 𝐐m𝐐n. We show by well-founded induction over that, for all nN, we have 𝐏n𝐐n and qn(𝐳n+𝐐n). Let nN and assume that 𝐏s𝐐s and qs(𝐳s+𝐐s) for all sN with s+n. We derive from Conditions 1 and 2 of Definition 5.1 that qn(𝐳n+mn𝐐m). It follows that qn(𝐳n+𝐐n). It remains to show that 𝐏n𝐐n. Let 𝐉n denote the set 𝐉 defined in Lemma 5.4 with q(𝐱):=qn(𝐳n) and 𝐏:=𝐐n. The crucial observation now is that 𝐄n and 𝐂¯n are both contained in 𝐉n, hence, 𝐈n𝐉n. We obtain from Lemma 5.4 that Add𝐈n(𝐐n)Cloqn,𝐳n(𝐐n)=𝐐n since Cloqn,𝐳n is idempotent. Recall that 𝐏m𝐐m𝐐n for every mN with mn. We derive from Condition 3 of Definition 5.1 that 𝐏n=Add𝐈n(mn𝐏m)Add𝐈n(𝐐n)𝐐n.

5.2 Partial correctness of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎

Consider an execution σ of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎(), where is a 2-BVASS. We let (Nj,j,λj,Rj,Wj)jJ denote the successive values of the variables N, , λ, R and W at line 7 of Algorithm 1, just before the evaluation of the while-loop condition. The index set J is if the execution σ does not terminate (i.e., Wj for all j). Otherwise, J={0,,κ} where κ is the number of iterations of the while-loop (i.e., Wκ= and Wj for all j{0,,κ1}). It is understood that, in both cases, the values of the variables after the foreach-loop at lines 26 are N0, 0, λ0, R0 and W0. Moreover, if σ terminates then it returns (Nκ,κ,λκ) at line 23. For every jJ, we let 𝒢j denote the labeled graph (Nj,j,λj), and we let 𝒢^j denote the restriction of 𝒢j to the set of processed nodes N^j=NjWj. The following lemma is easily derived from Algorithm 1 (the detailed proof is tedious but straightforward).

Lemma 5.6.

Both 𝒢j and 𝒢^j are non-redundant explorations of , for every jJ. Moreover, 𝒢^j is algorithmic and it holds that Post(𝒢^j)𝒢j.

Notice that NjNj+1, N^jN^j+1 and jj+1, for every jJ with (j+1)J. We introduce the “limit” values Nσ, N^σ and σ of the corresponding sequences, defined naturally by Nσ=jJNj, N^σ=jJN^j and σ=jJj. We also define λσ as the function with domain Nσ that maps each nNσ to the ultimate value of the sequence (λj(n))jJ,nNj. The latter sequence is non-empty and ultimately constant. We let 𝒢σ denote the labeled graph (Nσ,σ,λσ), and we let 𝒢^σ denote the restriction of 𝒢σ to N^σ.

Lemma 5.7.

For every 2-BVASS and every execution σ of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎(), 𝒢^σ is a non-redundant and algorithmic exploration of . If σ terminates then 𝒢^σ is finite and complete, and σ returns 𝒢^σ. Otherwise, 𝒢^σ is infinite.

Proof sketch..

Let σ be an execution of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎(), where is a 2-BVASS. It is routinely checked that, for every jJ,

  1. 1.

    for every m,nNσ, if nNj and mσn then mNj and mjn, and

  2. 2.

    the restriction of 𝒢^σ to N^j coincides with 𝒢^j.

The first observation entails that the edge relation σ of 𝒢σ is well-founded, hence, both 𝒢σ and 𝒢^σ are explorations of . The second observation, combined with Lemma 5.6, entails that 𝒢^σ is a non-redundant and algorithmic exploration of . If σ terminates then it returns 𝒢κ. Moreover, we have 𝒢κ=𝒢^κ=𝒢^σ in that case, hence, 𝒢^σ is finite and complete by Lemma 5.6. If σ does not terminate then N^σ is infinite since N^jN^j+1 for all j.

Partial correctness of our algorithm 𝙴𝚡𝚙𝚕𝚘𝚛𝚎 follows from Lemma 5.7. To prove termination, we will show in the next sections that every non-redundant and algorithmic exploration of a 2-BVASS is finite, under an additional technical condition called spannability and discussed in next section. Termination of our algorithm will then be ensured by Lemma 5.7.

6 Core Witnesses of Infinity for Spannable Graphs

A graph (N,) is called a forest if the edge relation is well-founded (hence acyclic) and the set {mNmn} contains at most one node for every node nN. A forest is said to be finitely-branching if the set of source nodes is finite and the set {nNmn} is finite for every node mN. We say that a graph 𝒢=(N,) is spannable if there exists a subrelation of such that =(N,) is a finitely-branching forest. In that case, is called a spanning forest of 𝒢. Explorations 𝒢^σ built by algorithm 𝙴𝚡𝚙𝚕𝚘𝚛𝚎() are spannable. This property is obtained by observing that along the execution of the algorithm, new created nodes are connected, thanks to an edge that we call special, to a node that is removed from the worklist at that step. The spanning forest is then obtained by restricting the exploration to the special edges.

A branch β of a forest (N,) is an infinite sequence β=(βn)n of nodes such that β0 is a source node of and such that βiβi+1 for every i0. Thanks to the Koenig’s lemma, we know that any infinite finitely-branching forest admits a branch. Such a branch can be seen as a witness of infinity of . We extend this notion of witnesses to infinite spannable graphs in a non-trivial way. Naturally, denoting by a spanning forest of 𝒢, any branch of is a kind of witness of infinity of 𝒢. However such a witness depends somehow on the choice of and does not take into account the structure of 𝒢.

Our “core” witness of infinity of an infinite spannable graph is defined thanks to the notion of primary and directed graphs. A graph 𝒢=(N,) is said to be primary if NDes(n) is finite for every node nN. A graph 𝒢=(N,) is said to be directed if for every n,mN, there exists sN such that ns and ms. The following lemma will be useful to extract from an infinite spannable graph a “core” subset of nodes that explain its infinity.

Lemma 6.1.

For every infinite spannable graph 𝒢=(N,), there exists an infinite ancestor-closed set XN such that the restriction of 𝒢 to X is primary and directed.

Proof sketch..

Let be a spanning forest of 𝒢. We associate to each branch β=(βn)n of , the set Anc(β)=nAnc(βn) of ancestors of β with respect to the graph 𝒢. We introduce the preorder (reflexive and transitive) over the branches defined by αβ if Anc(α)Anc(β). A branch β is said to be minimal (for the relation ) if for every branch α such that αβ, we have βα. Notice that a branch β is minimal for if, and only if, Anc(β) is minimal for the inclusion relation. We prove that a minimal branch exists by contradiction. Intuitively, if there does not exist a minimal branch then any branch admits a strictly smaller one (we can even select an eagerly smaller one). Since the number of sources of is finite, and the set {nNmn} is finite for every node mN, we can extract from this infinite sequence of branches, a subsequence that “converges” to another branch. We prove that this branch is necessarily minimal providing a contradiction. It follows that there exists a minimal branch β. Then, we show that X=Anc(β) satisfies the lemma.

 Remark 6.2.

If (N,) is a primary graph then is a well-quasi-order (wqo). In fact, let us consider an infinite sequence (ni)i of nodes niN. Since 𝒢 is primary, the set N0=NDes(n0) is finite. If niN0 for every i1 then there exists i<j such that ni=nj and in particular ninj. Otherwise there exists j1 such that njN0 and in that case n0nj. So, in any case, we have proved that there exists i<j such that ninj. Therefore is a wqo.

7 Termination

The termination of Algorithm 1 is obtained by contradiction. We assume that the algorithm is not terminating and from an infinite execution we derive an infinite exploration. Such an exploration is spannable, algorithmic and infinite. Thanks to Lemma 6.1 we can extract a sub-exploration (N,,λ) that is also directed and primary. We prove that the sequence of periodic sets 𝐏n for this exploration stabilizes. From Lemma 2.1 it is sufficient to prove that the sequence of cones Con(𝐏n) eventually stabilizes. Since the exploration is directed, it is sufficient to prove that the cone spanned by 𝐏N=nN𝐏n is finitely-generated.

This result is obtained by interpreting geometrically the acceleration step 𝐏n:=Add𝐈n(𝐏n) performed at line 10, as the so-called 𝐯-stabilization of Con(𝐏n) by vectors 𝐯𝐈n. More formally, the 𝐯-stabilization of a cone 𝐂02 for some vector 𝐯2 is the cone (𝐂+0𝐯)02. A cone 𝐂02 is said to be 𝐯-stable when it is equal to its 𝐯-stabilization.

Example 7.1.

The cone 𝐂=Con({(1,2),(2,1)}) is (1,1)-stable. It is not (3,1)-stable since its (3,1)-stabilization is 𝐂+0(0,1).  

The 𝐯-stabilization of a cone 𝐂02 spanned by a finite set of vectors 𝐆2 is the cone spanned by 𝐆{𝐯} when 𝐯(0,0), and the cone spanned by 𝐆𝐔 where 𝐔 is a subset of the set of axis {(1,0),(0,1)} when 𝐯(0,0). Since at some step of the algorithm, no new axis are added, it follows that the cone Con(𝐏n) is 𝐯-stable for every vector 𝐯𝐈n02. In fact a stronger stabilization property occurs: there exists a node n0 such that for every n,mDes(n0), the cone Con(𝐏n) is 𝐯-stable for every 𝐯𝐈m02. In order to capture this special node n0, we introduce in Section 7.1 the notion of modes of a cone and prove that modes of non-decreasing sequence of cones eventually stabilizes.

Thanks to the notion of modes, it will be clear that Con(𝐏n) is 𝐯-stable for every vector 𝐯𝐈n02 but also for every vector 𝐯𝐈m02 where mDes(n0). This 𝐯-stabilization with respect to vectors that can be discovered later by the algorithm will be useful with the decomposition of elementary vectors of 𝐄n introduced in Section 7.2 as finite sums of elementary vectors 𝐄m where m ranges over a finite set independent of n.

Thanks to the notion of modes and the decomposition of elementary cycles, we prove in Section 7.3 that the cones Con(𝐏N) is finitely-generated. We conclude our proof by contradiction in Section 7.4.

7.1 Modes

The 𝐯-stabilization of a cone 𝐂02 does not change the cone when 𝐯 satisfies some conditions depending on the set of axis of 𝐂 and a natural number h that provides a lower-bound on some negative components of 𝐯. By axis of a cone 𝐂02 we mean a vector in 𝐂{(1,0),(0,1)}. The h-mode of 𝐂 is the set of vectors 𝐯22 such that 𝐂 is 𝐯-stable, and such that the following two conditions hold:

  • 𝐯(1)h if (1,0) is not an axis of 𝐂.

  • 𝐯(2)h if (0,1) is not an axis of 𝐂.

Lemma 7.2.

The h-mode of any non-decreasing sequence of cones 𝐂0𝐂102 eventually stabilizes.

Proof sketch..

By considering a suffix of the sequence, by discarding the trivial cases, and by symmetry (on the set of axis), we can assume that (1,0)𝐂n0(1,0) for every n. We observe that the h-mode 𝐌n of 𝐂n can be decomposed into 𝐐n(×{h,,1}) where 𝐐n={𝐯𝐌n𝐯(1)<0𝐯(2){h,,0}}. By observing that (𝐐n)n is a non-increasing sequence of finite sets, we deduce that it eventually stabilizes.

7.2 Cycle Decomposition

In this section, we prove that vectors in 𝐄n can be decomposed as finite sums of vectors in 𝐄m, vectors in 𝐏s and some consecutive vectors where m and s ranges over finite sets independent of n. The finiteness of those sets follows from the co-finiteness of Des(n0) and Des(n1) since the exploration is primary.

Lemma 7.3.

For every primary and directed algorithmic exploration (N,,λ) and for every node n0N such that sn0𝐏s{(0,0)}, there exists a node n1Des(n0) such that for every node nDes(n0), we have:

𝐄nmDes(n0)(Des(n1){n1})Per(𝐄m)+sDes(n0)𝐏s+mn0m+nPer(𝐂m)

We define a node n1 satisfying the previous lemma as follows. We fix a primary and directed exploration (N,,λ) and a node n0N such that sn0𝐏s{(0,0)}. We introduce an abstraction function α:2{0,,c}2 defined by α(𝐱)(i)=𝐱(i) if 𝐱(i)<c and α(𝐱)(i)=c if 𝐱(i)c, for every 𝐱2 and every i{1,2}, where c is the constant of iteration of . We introduce a partial order on the set of nodes Des(n0) defined by sn if sn and qs(α(𝐳s))=qn(α(𝐳n)). Since is a well-quasi-order on the set of nodes, and the equality is a well-quasi-order on the finite set Q×{0,,c}2, the partial order is also a well-quasi-order as the intersection of two well-quasi-orders. In particular the set Nmin defined as the set of minimal nodes nDes(n0) for is finite and for every nDes(n0), there exists sNmin such that sn. Since the exploration is primary, the set NDes(n0) is finite. Moreover, as the exploration is directed and Nmin(NDes(n0)) is finite, there exists a node n0N such that nn0 for every nNmin(NDes(n0)). Let Qc be the set of states qQ such that there exists a node nDes(n0) satisfying 𝐳n(c,c) and qn=q. For each qQc, we pick such a node nq. Since the set {nqqQc} is finite and the exploration is directed, there exists n1Des(n0) such that nqn1 for every qQc. This node n1 satisfies Lemma 7.3. Intuitively, this property is obtained by decomposing recursively either paths in the algorithmic exploration from a node nDes(n0) to a node m such that qn=qm following intermediate nodes n satisfying 𝐳n(c,c) into elementary and consecutive cycles, and by replacing any elementary cycle using a transition coming from an instantiated node nDes(n0) by the elementary cycle obtained by using a node sNmin satisfying sn rather than n for the instantiation. Since the effect of the original cycle is equal to the sum of the effect of the new one with the effect of a path from s to n, by recursively decomposing that path we prove that n1 satisfies Lemma 7.3. Such a decomposition and the proof that n1 satisfies Lemma 7.3 are fully detailed in [2].

7.3 Finitely-generated Cone

In this section, we prove the following lemma.

Lemma 7.4.

For every primary and directed algorithmic exploration, the cone spanned by 𝐏N=nN𝐏n is finitely-generated.

Let 𝒢 be a primary and directed algorithmic exploration and let 𝐏N be the periodic set nN𝐏n. We introduce the set of axis 𝐔=Con(𝐏N){(1,0),(0,1)}, the constant of iteration c, and the set 𝐙={𝐳nnN𝐳n(c,c)}. If 𝐔={(1,0),(0,1)} we are done since in that case Con(𝐏N)=02. So, we can assume that 𝐔 contains at most one vector.

Lemma 7.5.

There exists h such that 𝐙{0,,h}2+𝐔.

Proof.

Recall from Section 6 that is a wqo. Given qQ, d{0,,c1}, and i{1,2}, we introduce the set Nq,i,d of nodes nN such that qn=q and 𝐳n(i)=d. Since is a wqo, the set Mq,i,d of minimal elements of Nq,d,i for this partial order is finite, and for every nNq,i,d, there exists mMq,i,d such that mn. We pick h satisfying h𝐳m(i¯) for every qQ, i{1,2}, d{0,,c1} and mMq,i,d.

Observe that for every 𝐳𝐙, there exists nN such that 𝐳=𝐳n(c,c). It follows that there exists i{1,2} such that d=𝐳n(i) is in {0,,c1}. Let q=qn and notice that nNq,i,d. It follows that there exists mMq,i,d such that mn. Observe that 𝐳m(i)=d=𝐳n(i) and qm=q=qn. Moreover 𝐳m(i¯)h. If 𝐳n(i¯)h then 𝐳{0,,h}2. If 𝐳n(i¯)>h, then 𝐳n𝐳m0𝐮 for some 𝐮{(1,0),(0,1)}. It follows that 𝐮 is in Con(𝐏n) since 𝐳n𝐳m is a consecutive vector in 𝐂n. Hence it is also in 𝐔. As 𝐳m{0,,h}2 we deduce that 𝐳{0,,h}2+𝐔. We have proved the lemma.

In the sequel, h denotes a fix natural number satisfying the previous lemma and hc. We put 𝐏n=sn𝐏s for every node nN. If 𝐏n={(0,0)} for every nN then Con(𝐏N)={(0,0)} and we are done also in that case. So, we can assume that there exists a node nN such that 𝐏n{(0,0)}.

Let us prove that there exists a node n0 such that 𝐔 is the set of axis of Con(𝐏n0) and 𝐏n0{(0,0)}. If 𝐔=, it is sufficient to consider a node n0N such that 𝐏n0{(0,0)}. If 𝐔, it is sufficient to consider a node n0 such that the unique vector of 𝐔 is in Con(𝐏n0). By replacing n0 by a descendant of n0, thanks to Lemma 7.2, we can assume that the h-mode of Con(𝐏n) is equal to the h-mode of Con(𝐏n0) for every nDes(n0).

In the sequel, given a set 𝐗2, we introduce 𝐗+=𝐗02 and 𝐗=𝐗02.

Lemma 7.6.

The set Con(𝐔)+mDes(n0)Con(𝐂m+) is a finitely-generated cone.

Proof sketch..

We just observe that 𝐂m𝐙𝐙 and 𝐙{0,,h}2+𝐔.

Now, let n1Des(n0) satisfying Lemma 7.3.

Lemma 7.7.

The set Con(𝐏N) can be decomposed as follows:

mDes(n0)(Des(n1){n1})Con(𝐄m+)+sDes(n0)Con(𝐏s)+Con(𝐔)+mDes(n0)Con(𝐂m+)

Proof sketch..

Let 𝐊 be the cone given above. Clearly 𝐄m+ where mDes(n0)(Des(n1){n1}), 𝐏s where sDes(n0), 𝐔 and 𝐂m+ where mDes(n0) are included in Con(𝐏N). It follows that 𝐊Con(𝐏N). We prove the converse inclusion by induction on the well-foundedness of the relation , showing that 𝐏n𝐊 for every nN. The crucial observation is the fact that even if in the right-hand side we discard vectors in 𝐄m and 𝐂m, since the h-mode of Con(𝐏n) does not depend on the node nDes(n0), we can apply the decomposition of 𝐄n given by Lemma 7.3 to prove the inclusion 𝐏n𝐊.

Lemma 7.6 and Lemma 7.7 show that Con(𝐏N) is a finitely-generated cone.

7.4 Wrap-Up

In this section, we prove the termination of our algorithm by assembling the results from the previous sections. We start with the following observation.

Lemma 7.8.

Let 𝒢=(N,,λ) be an algorithmic exploration of a 2-BVASS and let s,nN. If sn, qs=qn and 𝐏s=𝐏n then Con(𝐏n) is (𝐳n𝐳s)-stable.

Proof sketch..

The decomposition mentioned in Section 7.2 provides a way to decompose a path from s to n in the algorithmic exploration into elementary cycles and consecutive cycles, with cutting points from intermediate nodes m satisfying 𝐳m(c,c). With such a decomposition, we deduce that 𝐳n𝐳s is a sum of vectors in 𝐏n and vectors 𝐯𝐈m where m ranges over the intermediate nodes of the considered path. Since Con(𝐏m) is 𝐯-stable for each 𝐯𝐈m and Con(𝐏m)=Con(𝐏n), we deduce that Con(𝐏n) is 𝐯-stable for all those vectors 𝐯𝐈m. We deduce that Con(𝐏n) is (𝐳n𝐳s)-stable.

Lemma 7.9.

Every non-redundant, algorithmic, primary and directed exploration of a 2-BVASS is finite.

Proof.

Let 𝒢=(N,,λ) be a non-redundant, algorithmic, primary and directed exploration of a 2-BVASS =(Q,Δ). By Lemma 7.4, the set 𝐏=nN𝐏n is a finitely-generated periodic set. This entails that 𝐏=nN𝐏n for some finite set NN. As 𝒢 is directed, there exists a node n0N such that nn0 for every nN. This entails that 𝐏n=𝐏 for all nDes(n0). Assume, by contradiction, that N is infinite. Since 𝒢 is primary, the set Des(n0) is infinite and the binary relation is a wqo on N. By Dickson’s Lemma, the binary relation on N defined by by mn if qm=qn and 𝐳m𝐳n, is also a wqo on N. We derive that there exists an infinite sequence n1,n2,n3, of nodes in Des(n0) such that n1+n2+n3+, qn1=qn2=qn3=, and 𝐳n1𝐳n2𝐳n3. Note that 𝐏ni=𝐏 for all i1. We deduce from Lemma 7.8 that Con(𝐏) is (𝐳ni𝐳n1)-stable for all i1. Since the vector 𝐳ni𝐳n1 is in 2, we get that it is in Con(𝐏). It follows that 𝐳ni𝐳n1+Con(𝐏) for all i1. So the set 𝐁={𝐳nii1} is contained in 𝐳n1+Con(𝐏). We obtain from [16, Lemma 1.2] that 𝐁+𝐏=𝐁+𝐏 for some finite subset 𝐁𝐁. This entails that 𝐳nj(𝐳ni+𝐏) for some i<j. Observe that qnj(𝐳nj+𝐏nj)qni(𝐳ni+𝐏ni). Moreover, we have ni+nj since i<j. So the node nj is redundant, but nj is not a leaf since nj+nj+1. This contradicts our assumption that 𝒢 is non-redundant.

Corollary 7.10.

Every non-redundant, algorithmic and spannable exploration of a 2-BVASS is finite.

Proof.

This corollary follows from Lemma 6.1, Lemma 7.9 and the following observation. Given an exploration 𝒢=(N,,λ) of a 2-BVASS and an ancestor-closed subset X of N, the restriction of 𝒢 to X is also an exploration of . Moreover, if 𝒢 is non-redundant (resp., algorithmic) then the restriction of 𝒢 to X is also non-redundant (resp., algorithmic).

As indicated in Section 6, for every 2-BVASS and every execution σ of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎(), the constructed exploration 𝒢^σ is spannable. We derive from Lemmas 5.5, 5.7, and 7.10 that every execution of 𝙴𝚡𝚙𝚕𝚘𝚛𝚎() terminates and returns a sound and complete finite exploration of . The reachability set of is then easily obtained from this exploration. We obtain the following theorem.

Theorem 7.11.

For every 2-BVASS , the reachability set of is semilinear and a presentation of is computable from .

8 Conclusion

In this paper, we have shown that the reachability set of a 2-BVASS admits a computable semilinear presentation. This entails that the reachability problem for 2-BVASS is decidable. Our approach, which is inspired from Hopcroft and Pansiot’s algorithm for classical 2-VASS [16], does not provide any upper bound on the complexity of this problem. The decidability status of the reachability problem for d-BVASS remains open in arbitrary dimension.

References

  • [1] Mohamed Faouzi Atig and Pierre Ganty. Approximating petri net reachability along context-free traces. In Supratik Chakraborty and Amit Kumar, editors, IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2011, December 12-14, 2011, Mumbai, India, volume 13 of LIPIcs, pages 152–163. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2011. doi:10.4230/LIPICS.FSTTCS.2011.152.
  • [2] Clotilde Bizière, Thibault Hilaire, Jérôme Leroux, and Grégoire Sutre. On the reachability problem for two-dimensional branching VASS, 2025. arXiv:2506.22561.
  • [3] Michael Blondin, Matthias Englert, Alain Finkel, Stefan Göller, Christoph Haase, Ranko Lazic, Pierre McKenzie, and Patrick Totzke. The reachability problem for two-dimensional vector addition systems with states. J. ACM, 68(5):34:1–34:43, 2021. doi:10.1145/3464794.
  • [4] Mikolaj Bojanczyk, Claire David, Anca Muscholl, Thomas Schwentick, and Luc Segoufin. Two-variable logic on data trees and XML reasoning. In Stijn Vansummeren, editor, Proceedings of the Twenty-Fifth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, June 26-28, 2006, Chicago, Illinois, USA, pages 10–19. ACM, 2006. doi:10.1145/1142351.1142354.
  • [5] Ahmed Bouajjani and Michael Emmi. Analysis of recursively parallel programs. ACM Trans. Program. Lang. Syst., 35(3):10:1–10:49, 2013. doi:10.1145/2518188.
  • [6] Dmitry Chistikov, Wojciech Czerwinski, Filip Mazowiecki, Lukasz Orlikowski, Henry Sinclair-Banks, and Karol Wegrzycki. The tractability border of reachability in simple vector addition systems with states. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, Chicago, IL, USA, October 27-30, 2024, pages 1332–1354. IEEE, 2024. doi:10.1109/FOCS61266.2024.00086.
  • [7] Lorenzo Clemente, Slawomir Lasota, Ranko Lazic, and Filip Mazowiecki. Timed pushdown automata and branching vector addition systems. In 32nd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2017, Reykjavik, Iceland, June 20-23, 2017, pages 1–12. IEEE Computer Society, 2017. doi:10.1109/LICS.2017.8005083.
  • [8] Conrad Cotton-Barratt, Andrzej S. Murawski, and C.-H. Luke Ong. ML and extended branching VASS. In Hongseok Yang, editor, Programming Languages and Systems - 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, volume 10201 of Lecture Notes in Computer Science, pages 314–340. Springer, 2017. doi:10.1007/978-3-662-54434-1_12.
  • [9] Wojciech Czerwinski, Slawomir Lasota, Ranko Lazic, Jérôme Leroux, and Filip Mazowiecki. The reachability problem for Petri nets is not elementary. J. ACM, 68(1):7:1–7:28, 2021. doi:10.1145/3422822.
  • [10] Philippe de Groote, Bruno Guillaume, and Sylvain Salvati. Vector addition tree automata. In 19th IEEE Symposium on Logic in Computer Science (LICS 2004), 14-17 July 2004, Turku, Finland, Proceedings, pages 64–73. IEEE Computer Society, 2004. doi:10.1109/LICS.2004.1319601.
  • [11] Stéphane Demri, Marcin Jurdzinski, Oded Lachish, and Ranko Lazic. The covering and boundedness problems for branching vector addition systems. J. Comput. Syst. Sci., 79(1):23–38, 2013. doi:10.1016/J.JCSS.2012.04.002.
  • [12] Diego Figueira, Ranko Lazic, Jérôme Leroux, Filip Mazowiecki, and Grégoire Sutre. Polynomial-space completeness of reachability for succinct branching VASS in dimension one. In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, volume 80 of LIPIcs, pages 119:1–119:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPICS.ICALP.2017.119.
  • [13] Alain Finkel, Jérôme Leroux, and Grégoire Sutre. Reachability for two-counter machines with one test and one reset. In Sumit Ganguly and Paritosh K. Pandya, editors, 38th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2018, December 11-13, 2018, Ahmedabad, India, volume 122 of LIPIcs, pages 31:1–31:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2018. doi:10.4230/LIPICS.FSTTCS.2018.31.
  • [14] Moses Ganardi, Rupak Majumdar, Andreas Pavlogiannis, Lia Schütze, and Georg Zetzsche. Reachability in bidirected pushdown VASS. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 124:1–124:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPICS.ICALP.2022.124.
  • [15] Stefan Göller, Christoph Haase, Ranko Lazić, and Patrick Totzke. A polynomial-time algorithm for reachability in branching VASS in dimension one. In ICALP, volume 55 of LIPIcs, pages 105:1–105:13. Schloss Dagstuhl, 2016. doi:10.4230/LIPIcs.ICALP.2016.105.
  • [16] John E. Hopcroft and Jean-Jacques Pansiot. On the reachability problem for 5-dimensional vector addition systems. Theor. Comput. Sci., 8:135–159, 1979. doi:10.1016/0304-3975(79)90041-0.
  • [17] Florent Jacquemard, Luc Segoufin, and Jerémie Dimino. Fo2(<, +1, ~) on data trees, data tree automata and branching vector addition systems. Log. Methods Comput. Sci., 12(2), 2016. doi:10.2168/LMCS-12(2:3)2016.
  • [18] Richard M. Karp and Raymond E. Miller. Parallel Program Schemata. J. Comput. Syst. Sci., 3(2):147–195, 1969. doi:10.1016/S0022-0000(69)80011-5.
  • [19] Ranko Lazic. The reachability problem for vector addition systems with a stack is not elementary. CoRR, abs/1310.1767, 2013. doi:10.48550/arXiv.1310.1767.
  • [20] Ranko Lazic, Thomas Christopher Newcomb, Joël Ouaknine, A. W. Roscoe, and James Worrell. Nets with tokens which carry data. Fundam. Informaticae, 88(3):251–274, 2008. URL: http://content.iospress.com/articles/fundamenta-informaticae/fi88-3-03.
  • [21] Ranko Lazić and Sylvain Schmitz. Nonelementary complexities for branching VASS, MELL, and extensions. ACM Trans. Comput. Log., 16(3):20:1–20:30, 2015. doi:10.1145/2733375.
  • [22] Jérôme Leroux. The reachability problem for Petri nets is not primitive recursive. In 62nd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2021, Denver, CO, USA, February 7-10, 2022, pages 1241–1252. IEEE, 2021. doi:10.1109/FOCS52979.2021.00121.
  • [23] Jérôme Leroux and Sylvain Schmitz. Reachability in vector addition systems is primitive-recursive in fixed dimension. In 34th Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2019, Vancouver, BC, Canada, June 24-27, 2019, pages 1–13. IEEE, 2019. doi:10.1109/LICS.2019.8785796.
  • [24] Jérôme Leroux, Grégoire Sutre, and Patrick Totzke. On the coverability problem for pushdown vector addition systems in one dimension. In Magnús M. Halldórsson, Kazuo Iwama, Naoki Kobayashi, and Bettina Speckmann, editors, Automata, Languages, and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, 2015, Proceedings, Part II, volume 9135 of Lecture Notes in Computer Science, pages 324–336. Springer, 2015. doi:10.1007/978-3-662-47666-6_26.
  • [25] Denis Lugiez. Counting and equality constraints for multitree automata. In Andrew D. Gordon, editor, Foundations of Software Science and Computational Structures, 6th International Conference, FOSSACS 2003 Held as Part of the Joint European Conference on Theory and Practice of Software, ETAPS 2003, Warsaw, Poland, April 7-11, 2003, Proceedings, volume 2620 of Lecture Notes in Computer Science, pages 328–342. Springer, 2003. doi:10.1007/3-540-36576-1_21.
  • [26] Ernst W. Mayr. An algorithm for the general petri net reachability problem. SIAM J. Comput., 13(3):441–460, 1984. doi:10.1137/0213029.
  • [27] Filip Mazowiecki and Michal Pilipczuk. Reachability for bounded branching VASS. In Wan J. Fokkink and Rob van Glabbeek, editors, 30th International Conference on Concurrency Theory, CONCUR 2019, August 27-30, 2019, Amsterdam, the Netherlands, volume 140 of LIPIcs, pages 28:1–28:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPICS.CONCUR.2019.28.
  • [28] Hitoshi Ohsaki. Beyond regularity: Equational tree automata for associative and commutative theories. In Laurent Fribourg, editor, Computer Science Logic, 15th International Workshop, CSL 2001. 10th Annual Conference of the EACSL, Paris, France, September 10-13, 2001, Proceedings, volume 2142 of Lecture Notes in Computer Science, pages 539–553. Springer, 2001. doi:10.1007/3-540-44802-0_38.
  • [29] Owen Rambow. Multiset-valued linear index grammars: Imposing dominance constraints on derivations. In James Pustejovsky, editor, 32nd Annual Meeting of the Association for Computational Linguistics, 27-30 June 1994, New Mexico State University, Las Cruces, New Mexico, USA, Proceedings, pages 263–270. Morgan Kaufmann Publishers / ACL, 1994. doi:10.3115/981732.981768.
  • [30] Sylvain Schmitz. On the computational complexity of dominance links in grammatical formalisms. In Jan Hajic, Sandra Carberry, and Stephen Clark, editors, ACL 2010, Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, July 11-16, 2010, Uppsala, Sweden, pages 514–524. The Association for Computer Linguistics, 2010. URL: https://aclanthology.org/P10-1053/.
  • [31] Kumar Neeraj Verma and Jean Goubault-Larrecq. Karp-miller trees for a branching extension of VASS. Discret. Math. Theor. Comput. Sci., 7(1):217–230, 2005. doi:10.46298/DMTCS.350.