On the Reachability Problem for Two-Dimensional Branching VASS
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, VerificationCopyright and License:
2012 ACM Subject Classification:
Theory of computation Logic and verificationEditors:
Paweł Gawrychowski, Filip Mazowiecki, and Michał SkrzypczakSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
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 -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 -dimensional BVASS.
Contributions.
In this paper, we prove that the reachability problem for -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 -dimensional BVASS given as input. Our algorithm is inspired from Hopcroft and Pansiot’s algorithm for classical -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 -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 -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 the set of non-negative rational numbers. We also introduce and defined as and , respectively. The powerset of a set is written .
Vectors.
Vectors are typeset in bold face. Given , we let denote the vector of rational numbers defining . We write for two vectors if for every . The sum of two vectors is defined component-wise. The sum operator over vectors is extended over sets by . Given and , we define as . The set is defined similarly. We also write the set .
Periodic sets and semilinear sets.
A set is said to be periodic if and . Given a set , we denote by the set of finite sums where , and . This periodic set is called the periodic set spanned by . A periodic set is said to be finitely-generated if for some finite set . The sum of two periodic sets is a periodic set. Given a sequence of periodic sets indexed by a finite or infinite set , we denote by the periodic set . Notice that that if is finite, this definition of sum coincides with the previously introduced finite sum of subsets of . A set is said to be linear if where and is a finitely-generated periodic set. A set is semilinear if is a finite union of linear subsets of .
Cones.
A cone of is a periodic subset of such that . The cone spanned by a set is the cone denoted by and defined as . A cone is said to be finitely-generated if for some finite set .
Lemma 2.1 ([16, Lemma 1.2]).
Let be a periodic set. Then is a finitely-generated periodic set if, and only if, is a finitely-generated cone.
Graphs.
A graph is a pair where is a set of nodes, and is a binary relation on 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 the set of ancestors , and the set of descendants . Ancestors and descendant are extended over sets of nodes as expected, by and . A set of nodes verifying is said to be ancestor-closed. A node is called a leaf if there does not exist a node satisfying . A node is called a source if there is no node such that . The restriction of a graph to a set of nodes is the graph . A node-labeled graph is a triple where is a graph and is a function with domain . The notions defined above for graphs naturally carry over to node-labeled graphs.
3 Branching VASS
A -dimensional branching vector addition system with states (-BVASS for short) is a pair where is a finite non-empty set of states and is a finite set of transition rules. A transition rule in consists in a set of input states, a displacement , and a single output state . Intuitively, assuming that , this transition rule can be seen as the rewriting rule with formal parameters . 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 is called initial when , unary when , and branching when . A -dimensional vector addition system with states (-VASS for short) is a -BVASS such that for every transition rule in .
We formulate the semantics of a -BVASS in terms of a configuration-set transformer . A configuration of is a pair in , also written as in the sequel. By extension, given a set , we let denote the set of configurations . The set of initial configurations of is . For each transition rule in , we define the function by111We use double braces to denote multisets. Here, the condition means that, firstly, the set is equal to the set , and, secondly, for every two distinct configurations in .
for every set . We also introduce , defined by . Note that is -nondecreasing and that coincides with the set of initial configurations of . The reachability set of , written , is the -least set such that .
Example 3.1.
A set of configurations is said to be semilinear if is a finite union of sets of the form where and is linear, i.e. a set of the form for some and some finite subset of . A presentation of a semilinear set of configurations is a finite set , where , , and is a finite subset of , such that . The main contribution of this paper is the generalization to -BVASS of the following theorem.
Theorem 3.2 ([16]).
For every -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 with 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 is a -BVASS for the remainder of this section.
For each transition rule in , we introduce the binary relation on defined as the set of pairs such that and there exists a set verifying and . 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 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 is called diagonal if implies , for every configurations and vector . Using square brackets to denote relational images333Given a binary relation on a set and a subset of , we let denote the relational image of under , defined by . , we have for every set of configurations .
Let us now instantiate transition rules at the syntactic level. Given a finite set , the instantiation of with , written , is the -VASS where is the set of triples such that there exist a transition rule with and a set verifying and . We observe that if then the step relation of is contained in the step relation of .
Remark 3.3.
In the definition of the instantiation , we require to be finite solely to ensure that is finite. We could drop this requirement and obtain an “infinite -VASS”, meaning that its set of transition rules is potentially infinite. The step relations of and of the resulting “infinite -VASS” coincide.
We conclude this section with notions that are specific to classical VASS. Consider a -VASS . From now on, unary transition rules will be written for short. A path of is a non-empty sequence of unary transition rules such that for all . Such a path is also shortly written . We call and the start and the end of , respectively. The displacement of is . We say that is a cycle if . It is an elementary cycle if and are pairwise distinct.
Fact 3.4.
Consider a -BVASS and finite set . Let , and let be an elementary cycle of with displacement and with start (and end) . If where then .
4 Reachability Set Computation for -BVASS
We present in this section an algorithm to compute the reachability set for -BVASS. More precisely, given a -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 -BVASS is a node-labeled acyclic graph such that
-
1.
the edge relation is well-founded, i.e., there is no infinite sequence of nodes in such that for all , and
-
2.
each node is labeled with where , , , and is a periodic subset of .
Intuitively, the label of a node provides, firstly, the displacement of the transition rule used to create (this will be made clear later on and can be ignored for now), and, secondly, the set of configurations associated with the node . Recall that denotes the reachability set of a -BVASS . Similarly, we associate to an exploration of the set of configurations . We say that is sound when and that it is complete when . A node is called redundant if there exists verifying and . 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 -BVASS depicted on the left-hand side (see also Example 3.1). For instance, the set of configurations associated with the node is . The first component of is omitted in the figure to reduce clutter. As mentioned above, the vectors can be ignored for now, see Example 5.2 for actual values.
As in Hopcroft and Pansiot’s algorithm for classical -VASS [16], a crucial ingredient of our algorithm is the acceleration of cycles. The purpose of cycle acceleration is to make the periodic sets grow. We will utilize three kinds of cycles. Consider an exploration of a -BVASS . We associate to each node the -VASS defined as the instantiation of with the finite set of configurations . In particular, if is a source then where is the set of unary transition rules in . We introduce three finite subsets of , namely , and , that correspond to the three kinds of cycles mentioned above. Let us define . We call the constant of iteration of . Observe that is the same constant as the one in ˜3.4.
-
is the set of vectors such that there exist an elementary cycle of with displacement and a node verifying is the start of , and implies .
-
is the set of vectors such that there exists a node verifying , , and .
-
is the set of vectors such that there exists a node verifying and .
Note that . We also introduce the finite set defined by if and otherwise. Vectors in , , and are respectively called -elementary, -consecutive and -iterable.
Example 4.3.
Let us continue Example 4.2. The constant of iteration of is . By definition, for , and for . We first discuss -consecutive vectors. We have since has no ancestor except itself. The set is empty because the first component of is strictly below , hence, . Similarly, . It is readily seen that and that . We now discuss -elementary vectors. The -VASS contains exactly one elementary cycle (up to rotation), namely . It follows that . In addition to the cycle , the -VASS also contains the elementary cycle . Still, the set is empty, because none of these two cycles contributes to . Indeed, even though the elementary cycle contains the states and , its displacement is not in because and . Analogously, the displacement of is not in because . The elementary cycles of are , and , where . The displacement of is in since contains the state , and . We get that . Last, we observe that since the state is not part of any branching transition. So has the same elementary cycles as , and we get that . Indeed, even though the elementary cycle contains the state , its displacement is not in because and .
Given a set and a periodic set , we introduce the periodic set defined as the set of vectors where , , and are vectors in such that for every .
Lemma 4.4.
For every finite sets and , we can effectively compute a finite set such that .
Proof sketch..
First of all, notice that Theorem 3.2 is not sufficient for proving that result since there exist semilinear periodic sets, like that are not finitely-generated. From Lemma 2.1, we deduce that is finitely-generated periodic set if is a finitely-generated cone. We observe that this cone is spanned by where is a set of axis, i.e. a subset of . It follows that there exists a finite set such that . Finally, with a step-by-step algorithm computing increasing finite subsets of we eventually reach a set satisfying the lemma.
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 -BVASS as input, iteratively computes an exploration of and then returns it. This exploration is maintained in the variables , and , and is initially empty (see line 1). As in Definition 4.1, we let , and denote the second, third and fourth components of . The set of redundant nodes of the exploration is tracked in the variable . The set of unprocessed nodes, called the worklist, is maintained in the variable . Both variables and remain disjoint subsets of during the execution of the algorithm. For each initial configuration of , a new node is created and put in the worklist (see lines 2–6). After this initialization phase, repeatedly selects a node from the worklist and processes it, as long as the worklist is non-empty (see lines 7–22). The processing of a node consists in four steps. First, the node is removed from the worklist (so is considered processed afterwards). Second, the periodic set is enlarged using the set of -iterable vectors (see line 10). This is the cycle acceleration step. Note that the set is finite and implicitly depends on the constant of iteration of and on the current exploration of . The assignment at line 10 actually means that the label of the node is modified (in fact, only the fourth component of the label is modified). Third, the algorithm tests whether the node is “covered” by one of its ancestors (see line 11). If that is the case then is added to the set of redundant nodes and the processing of stops. Otherwise, as a fourth step, the node is expanded (see lines 14–22), meaning that for each set of processed and non-redundant nodes containing and for each transition rule that applies to , finitely many children of are created and put in the worklist. At first glance, one might want to create a single child labeled with . This would be fine if , 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 18–22. The existence of such a finite set is explained in Remark 4.5. The observant reader will notice that the modification of the variables and at lines 20 and 22 has no impact on the foreach-loop iteration at line 14, since 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 and a finite subset of , the set is equal to where is the finite set of vectors such that is a minimal vector in satisfying .
Example 4.6.
To illustrate Algorithm 1, we apply it on the -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 . The nodes are added to () and removed from () the worklist in the order , , , , , , , , , , . So the nodes and are still in the worklist. The labels and are straightforward. For the periodic sets , we first recall from Example 4.3 that , , and . The periodic set is . The node also has as periodic set since . The periodic set is . Similarly, .
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 of a -BVASS is algorithmic if it satisfies, for every node , the three following conditions:
-
1.
the multiset is a set and verifies ,
-
2.
the vector is in , and
-
3.
the periodic set verifies .
Intuitively, Conditions 1 and 2 ensure that the exploration conforms to the semantics of -BVASS. As hinted before, the vector is the displacement of the transition rule leading to (see Condition 1). Notice these two conditions entail in particular that is an initial configuration for every source . 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 . We take , and . The restriction to of the resulting exploration is algorithmic.
Remark 5.3.
For every algorithmic exploration and every node , the set is finite. Indeed, by Condition 1, every node has finite in-degree (i.e., the set of nodes such that is finite). As is well-founded by Condition 1 of Definition 4.1, it follows from König’s Lemma that is finite for every .
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 used to accelerate a node accounts for elementary cycles of that apply to an ancestor . Thus, to show that a given algorithmic exploration is sound, we transform into an alternative exploration whose periodic sets are closed in the sense that each already accounts for all potential cycles applicable to , and we show that is sound. Let us make these ideas more precise.
Consider a -BVASS . For every configuration of , we define the function by . Observe that is an upper closure operator444An upper closure operator on a partially-ordered set is any function that is -nondecreasing ( implies ), extensive (), and idempotent (). on the partially-ordered set . In fact, for every subset , the set is the -greatest subset such that . Note also that preserves periodicity, meaning that is periodic for every periodic subset . The following technical lemma will allow us to relate and .
Lemma 5.4.
For every configuration of and periodic subset of , it holds that where is the set of vectors such that there exists and verifying or .
Lemma 5.5.
Every algorithmic exploration of a -BVASS is sound.
Proof sketch..
Let be an algorithmic exploration of -BVASS . We introduce the family of subsets of defined, by well-founded recursion over , by for every node . Observe that each is periodic and that implies . We show by well-founded induction over that, for all , we have and . Let and assume that and for all with . We derive from Conditions 1 and 2 of Definition 5.1 that . It follows that . It remains to show that . Let denote the set defined in Lemma 5.4 with and . The crucial observation now is that and are both contained in , hence, . We obtain from Lemma 5.4 that since is idempotent. Recall that for every with . We derive from Condition 3 of Definition 5.1 that .
5.2 Partial correctness of
Consider an execution of , where is a -BVASS. We let denote the successive values of the variables , , , and at line 7 of Algorithm 1, just before the evaluation of the while-loop condition. The index set is if the execution does not terminate (i.e., for all ). Otherwise, where is the number of iterations of the while-loop (i.e., and for all ). It is understood that, in both cases, the values of the variables after the foreach-loop at lines 2–6 are , , , and . Moreover, if terminates then it returns at line 23. For every , we let denote the labeled graph , and we let denote the restriction of to the set of processed nodes . The following lemma is easily derived from Algorithm 1 (the detailed proof is tedious but straightforward).
Lemma 5.6.
Both and are non-redundant explorations of , for every . Moreover, is algorithmic and it holds that .
Notice that , and , for every with . We introduce the “limit” values , and of the corresponding sequences, defined naturally by , and . We also define as the function with domain that maps each to the ultimate value of the sequence . The latter sequence is non-empty and ultimately constant. We let denote the labeled graph , and we let denote the restriction of to .
Lemma 5.7.
For every -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 -BVASS. It is routinely checked that, for every ,
-
1.
for every , if and then and , and
-
2.
the restriction of to coincides with .
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 is infinite since for all .
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 -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 is called a forest if the edge relation is well-founded (hence acyclic) and the set contains at most one node for every node . A forest is said to be finitely-branching if the set of source nodes is finite and the set is finite for every node . We say that a graph is spannable if there exists a subrelation of such that 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 is an infinite sequence of nodes such that is a source node of and such that for every . 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 is said to be primary if is finite for every node . A graph is said to be directed if for every , there exists such that and . 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 , there exists an infinite ancestor-closed set such that the restriction of to is primary and directed.
Proof sketch..
Let be a spanning forest of . We associate to each branch of , the set of ancestors of with respect to the graph . We introduce the preorder (reflexive and transitive) over the branches defined by if . 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, 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 is finite for every node , 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 satisfies the lemma.
Remark 6.2.
If is a primary graph then is a well-quasi-order (wqo). In fact, let us consider an infinite sequence of nodes . Since is primary, the set is finite. If for every then there exists such that and in particular . Otherwise there exists such that and in that case . So, in any case, we have proved that there exists such that . 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 that is also directed and primary. We prove that the sequence of periodic sets for this exploration stabilizes. From Lemma 2.1 it is sufficient to prove that the sequence of cones eventually stabilizes. Since the exploration is directed, it is sufficient to prove that the cone spanned by is finitely-generated.
This result is obtained by interpreting geometrically the acceleration step performed at line 10, as the so-called -stabilization of by vectors . More formally, the -stabilization of a cone for some vector is the cone . A cone is said to be -stable when it is equal to its -stabilization.
Example 7.1.
The cone is -stable. It is not -stable since its -stabilization is .
The -stabilization of a cone spanned by a finite set of vectors is the cone spanned by when , and the cone spanned by where is a subset of the set of axis when . Since at some step of the algorithm, no new axis are added, it follows that the cone is -stable for every vector . In fact a stronger stabilization property occurs: there exists a node such that for every , the cone is -stable for every . In order to capture this special node , 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 is -stable for every vector but also for every vector where . This -stabilization with respect to vectors that can be discovered later by the algorithm will be useful with the decomposition of elementary vectors of introduced in Section 7.2 as finite sums of elementary vectors where ranges over a finite set independent of .
Thanks to the notion of modes and the decomposition of elementary cycles, we prove in Section 7.3 that the cones is finitely-generated. We conclude our proof by contradiction in Section 7.4.
7.1 Modes
The -stabilization of a cone does not change the cone when satisfies some conditions depending on the set of axis of and a natural number that provides a lower-bound on some negative components of . By axis of a cone we mean a vector in . The -mode of is the set of vectors such that is -stable, and such that the following two conditions hold:
-
if is not an axis of .
-
if is not an axis of .
Lemma 7.2.
The -mode of any non-decreasing sequence of cones 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 for every . We observe that the -mode of can be decomposed into where . By observing that 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 can be decomposed as finite sums of vectors in , vectors in and some consecutive vectors where and ranges over finite sets independent of . The finiteness of those sets follows from the co-finiteness of and since the exploration is primary.
Lemma 7.3.
For every primary and directed algorithmic exploration and for every node such that , there exists a node such that for every node , we have:
We define a node satisfying the previous lemma as follows. We fix a primary and directed exploration and a node such that . We introduce an abstraction function defined by if and if , for every and every , where is the constant of iteration of . We introduce a partial order on the set of nodes defined by if and . Since is a well-quasi-order on the set of nodes, and the equality is a well-quasi-order on the finite set , the partial order is also a well-quasi-order as the intersection of two well-quasi-orders. In particular the set defined as the set of minimal nodes for is finite and for every , there exists such that . Since the exploration is primary, the set is finite. Moreover, as the exploration is directed and is finite, there exists a node such that for every . Let be the set of states such that there exists a node satisfying and . For each , we pick such a node . Since the set is finite and the exploration is directed, there exists such that for every . This node satisfies Lemma 7.3. Intuitively, this property is obtained by decomposing recursively either paths in the algorithmic exploration from a node to a node such that following intermediate nodes satisfying into elementary and consecutive cycles, and by replacing any elementary cycle using a transition coming from an instantiated node by the elementary cycle obtained by using a node satisfying rather than 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 to , by recursively decomposing that path we prove that satisfies Lemma 7.3. Such a decomposition and the proof that 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 is finitely-generated.
Let be a primary and directed algorithmic exploration and let be the periodic set . We introduce the set of axis , the constant of iteration , and the set . If we are done since in that case . So, we can assume that contains at most one vector.
Lemma 7.5.
There exists such that .
Proof.
Recall from Section 6 that is a wqo. Given , , and , we introduce the set of nodes such that and . Since is a wqo, the set of minimal elements of for this partial order is finite, and for every , there exists such that . We pick satisfying for every , , and .
Observe that for every , there exists such that . It follows that there exists such that is in . Let and notice that . It follows that there exists such that . Observe that and . Moreover . If then . If , then for some . It follows that is in since is a consecutive vector in . Hence it is also in . As we deduce that . We have proved the lemma.
In the sequel, denotes a fix natural number satisfying the previous lemma and . We put for every node . If for every then and we are done also in that case. So, we can assume that there exists a node such that .
Let us prove that there exists a node such that is the set of axis of and . If , it is sufficient to consider a node such that . If , it is sufficient to consider a node such that the unique vector of is in . By replacing by a descendant of , thanks to Lemma 7.2, we can assume that the -mode of is equal to the -mode of for every .
In the sequel, given a set , we introduce and .
Lemma 7.6.
The set is a finitely-generated cone.
Proof sketch..
We just observe that and .
Now, let satisfying Lemma 7.3.
Lemma 7.7.
The set can be decomposed as follows:
Proof sketch..
Let be the cone given above. Clearly where , where , and where are included in . It follows that . We prove the converse inclusion by induction on the well-foundedness of the relation , showing that for every . The crucial observation is the fact that even if in the right-hand side we discard vectors in and , since the -mode of does not depend on the node , we can apply the decomposition of given by Lemma 7.3 to prove the inclusion .
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 be an algorithmic exploration of a -BVASS and let . If , and then is -stable.
Proof sketch..
The decomposition mentioned in Section 7.2 provides a way to decompose a path from to in the algorithmic exploration into elementary cycles and consecutive cycles, with cutting points from intermediate nodes satisfying . With such a decomposition, we deduce that is a sum of vectors in and vectors where ranges over the intermediate nodes of the considered path. Since is -stable for each and , we deduce that is -stable for all those vectors . We deduce that is -stable.
Lemma 7.9.
Every non-redundant, algorithmic, primary and directed exploration of a -BVASS is finite.
Proof.
Let be a non-redundant, algorithmic, primary and directed exploration of a -BVASS . By Lemma 7.4, the set is a finitely-generated periodic set. This entails that for some finite set . As is directed, there exists a node such that for every . This entails that for all . Assume, by contradiction, that is infinite. Since is primary, the set is infinite and the binary relation is a wqo on . By Dickson’s Lemma, the binary relation on defined by by if and , is also a wqo on . We derive that there exists an infinite sequence of nodes in such that , , and . Note that for all . We deduce from Lemma 7.8 that is -stable for all . Since the vector is in , we get that it is in . It follows that for all . So the set is contained in . We obtain from [16, Lemma 1.2] that for some finite subset . This entails that for some . Observe that . Moreover, we have since . So the node is redundant, but is not a leaf since . This contradicts our assumption that is non-redundant.
Corollary 7.10.
Every non-redundant, algorithmic and spannable exploration of a -BVASS is finite.
Proof.
This corollary follows from Lemma 6.1, Lemma 7.9 and the following observation. Given an exploration of a -BVASS and an ancestor-closed subset of , the restriction of to is also an exploration of . Moreover, if is non-redundant (resp., algorithmic) then the restriction of to is also non-redundant (resp., algorithmic).
As indicated in Section 6, for every -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 -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 -BVASS admits a computable semilinear presentation. This entails that the reachability problem for -BVASS is decidable. Our approach, which is inspired from Hopcroft and Pansiot’s algorithm for classical -VASS [16], does not provide any upper bound on the complexity of this problem. The decidability status of the reachability problem for -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.
