arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1809.03097v1 [cs.LO] 10 Sep 2018

A Comparison of BDD-Based Parity Game Solvers

Lisette Sanchez Affiliation: Eindhoven University of Technology, The Netherlands    Wieger Wesselink and Tim A.C. Willemse
Abstract

Parity games are two player games with omega-winning conditions, played on finite graphs. Such games play an important role in verification, satisfiability and synthesis. It is therefore important to identify algorithms that can efficiently deal with large games that arise from such applications. In this paper, we describe our experiments with BDD-based implementations of four parity game solving algorithms, viz. Zielonka’s recursive algorithm, the more recent Priority Promotion algorithm, the Fixpoint-Iteration algorithm and the automata based APT algorithm. We compare their performance on several types of random games and on a number of cases taken from the Keiren benchmark set.

1 Introduction

Parity games [17, 27, 31] are infinite duration games played by two players on a finite directed graph. Each vertex in the game graph is owned by one of the two players and vertices are assigned a colour, or priority. The game is played by pushing a token along the edges in the graph; the choice to which vertex the token is to move next is decided by the player owning the vertex currently holding the token. A parity condition determines the winner of this infinite play. A vertex in the game is won by the player that has a strategy for which, no matter how the opponent plays, every play from that vertex is won by her; the winner of each vertex is uniquely determined [27].

The parity game solving problem is to compute the set of vertices won by each player. This problem is known to be in UPcoUP\text{UP}\cap\text{coUP}, a class that indicates that the problem is unlikely to be hard for NP. While subexponential solving algorithms have been devised, despite the (deceptive) simplicity of the game and a continuous research effort, no polynomial time algorithm for solving parity games has been found. However, only recently the problem was shown to be solvable in quasi-polynomial time [11, 23, 18].

From a practical viewpoint, parity games are interesting since they underlie typical verification, satisfiability and synthesis problems, see [13, 17, 3] and the references therein. For instance, in the mCRL2 toolset [14], parity games, derived from parameterised Boolean equation systems [21], are used to solve modal μ\mu-calculus model checking problems for reactive systems. Games originating from such model checking problems often contain a large number of vertices (typically exceeding 10610^{6}), whereas the number of distinct priorities in the games is typically very small (often at most 3). Consequently, these applications require algorithms and techniques that can efficiently deal with such magnitudes.

Most parity game solving algorithms fall in one of two categories: ‘strategy identification’ (SI) algorithms and ‘dominion identification’ (DI) algorithms. Algorithms from the SI category directly compute the winning strategies for both players; e.g., by means of policy iteration or by maintaining some statistics about the plays that can emerge from a vertex. The recent quasi-polynomial algorithms [11, 23, 18] all fall in this category, but also classical algorithms such as Jurdziński’s small progress measures algorithm [22], and, to some extent, the Fixpoint-Iteration (FI) algorithm [9], which is closely related to the small progress measures algorithm, see ibid. The DI category of algorithms proceed by (recursively) decomposing the game graph in dominions: small subgraphs that are won by a single player and from which the opponent cannot escape. A classical exponent of the latter category is Zielonka’s recursive algorithm [31] but also the recently introduced Priority Promotion (PP) algorithm [7]. While DI algorithms typically have a worst-case running time complexity that is theoretically less attractive than that of SI algorithms, in practice, the SI are significantly outperformed by DI algorithms [15].

Since parity games that originate from practical verification problems can become quite large, it is natural to study whether existing algorithms can be implemented efficiently using symbolic representations of the game graph, i.e., using Binary Decision Diagrams (BDDs). While the size of BDDs may depend very much on the BDD variable ordering, when the compression ratio (the number of BDD nodes versus the number of satisfying assignments) is favourable, BDDs can be used to concisely represent large graphs. DI algorithms typically exploit set-based operations, which can be implemented straightforwardly and efficiently using BDDs. The same applies to SI algorithms such as the FI algorithm [9] and the automata-based APT algorithm [29].

In this paper, we describe and study four set-based algorithms, viz. Zielonka’s algorithm, the PP algorithm, the FI implementation and the APT algorithm. In particular, we reassess the conclusions from [15] in which Zielonka’s algorithm and the PP algorithm are shown to have similar performance when computing with explicit representations of the game graph. Moreover, we revisit the observation of [29] that for games in which the number of vertices is exponentially larger (given a sufficiently large enough base) than the number of distinct priorities in the game, the APT algorithm significantly outperforms Zielonka’s algorithm. Like the aforementioned works, we base our observations on random games, which we convert to BDDs using a binary encoding. Such an encoding typically yields BDDs with a poor compression ratio. While this does not reflect scenarios in which BDDs excel, this does yield important insights into which symbolic algorithms are more sensitive to BDDs with poor compression ratios. Finally, we compare the performance of all four algorithms on several of the larger cases taken from the Keiren benchmark set [25] of parity games and demonstrate that our symbolic algorithms can solve games that cannot be solved using explicit techniques.

We find that the symbolic Zielonka and PP algorithms perform mostly similarly; the observations of [15] thus seem to largely carry over to the symbolic setting. However, in our setting we cannot faithfully reproduce the observations of [29] regarding the superior performance of the APT algorithm for favourable vertex/priority ratios. While APT’s performance improves with more favourable ratios, it (and also the FI algorithm) suffers more than Zielonka and PP when handling graphs represented by BDDs with a poor compression ratio. Yet, when the BDDs remain small, both APT and FI often outperform Zielonka and PP, as witnessed by the cases taken from the Keiren benchmark set.

Related Work. BDD-based implementations for parity game solving have been studied in the past. In [4], an algorithm that is inspired by Zielonka’s algorithm is used to solve planning problems, whereas in [24], a symbolic version of Zielonka’s algorithm is implemented in an effort to solve model checking problems represented by parameterised Boolean equation systems [21]. We note that the focus of the latter work is to extract symbolic parity games, represented by List Decision Diagrams (LDDs) underlying parameterised Boolean equation systems using a reachability analysis and solving the thus constructed parity games. Since our primary aim is to compare the performance of various symbolic parity game solving algorithms, we have followed a slightly different and less general route in our experiments on model checking, converting all finite data types occurring in such equation systems to Booleans. This allows us to avoid a costly reachability analysis. Obviously, our insights into which algorithms can be used best to solve a given parity game can be combined with the technique of [24] to obtain faster end-to-end verification tooling. Another line of research has concentrated on giving set-based versions of classical algorithms such as the small progress measures algorithm, the bigstep algorithm and the subexponential dominion decomposition algorithm, see e.g. [10, 12]. Symbolic algorithms studied for more restricted types of games include [2, 8].

Outline. In Section 2, we introduce parity games and the relevant concepts. The four algorithms that we compare are then introduced and discussed in Section 3 and we describe how these can be implemented using BDD techniques in Section 4. In Section 5, we describe our experimental evaluation of our implementations and we finish with conclusions in Section 6.

2 Parity Games

A parity game is an infinite duration game, played by players odd, denoted by 11 and even, denoted by 00, on a directed, finite graph. This game graph is formally defined as follows.

Definition 2.1.

A parity game is a tuple (V,E,p,(V0,V1))(V,E,p,(V_{0},V_{1})), where:

  • VV is a finite set of vertices, partitioned in a set V0V_{0} of vertices owned by player 00, and a set of vertices V1V_{1} owned by player 11,

  • EV×VE\subseteq V\times V is the edge relation; we assume that EE is left-total, i.e., for all vVv\in V, there is some wVw\in V such that (v,w)E(v,w)\in E,

  • p:Vp{:}V\to\mathbb{N} is a priority function that assigns priorities to vertices.

We depict parity games as graphs in which diamond-shaped vertices represent vertices owned by player 00 and box-shaped vertices represent vertices owned by player 11. Priorities, associated with vertices, are typically written inside vertices, see Figure 1.

5u1u_{1}6u2u_{2}4u3u_{3}1u5u_{5}2u6u_{6}3u7u_{7}2u4u_{4}3u8u_{8}
Figure 1: A game with 6 different priorities, 3 vertices owned by player 00 and 5 owned by player 11.

Plays, Strategies and Winning.

We write vwv\to w whenever (v,w)E(v,w)\in E; vEvE denotes the set {wVvw}\{w\in V\mid v\to w\} and EwEw denotes the set {vVvw}\{v\in V\mid v\to w\}. Henceforth, α{0,1}\alpha\in\{0,1\} denotes an arbitrary player. We write α¯\bar{\alpha} for α\alpha’s opponent; i.e., 0¯=1\bar{0}=1 and 1¯=0\bar{1}=0. A sequence of vertices v1,,vnv_{1},\ldots,v_{n} is a path if vmvm+1v_{m}\to v_{m+1} for all 1m<n1\leq m<n. Infinite paths are defined in a similar manner. The nthn^{\textrm{th}} vertex of a path π\pi is denoted πn\pi_{n}.

A game starts by placing a token on vertex vVv\in V. Players move the token indefinitely according to a single simple rule: if the token is on some vertex vVαv\in V_{\alpha}, player α\alpha gets to move the token to an adjacent vertex. We refer to the infinite path through the graph, obtained this way, as a play. A play is won by player 00 iff the maximal priority that occurs infinitely often along that play is even.

The moves of players 00 and 11 are determined by their respective strategies. A strategy for a player α\alpha determines, for a vertex πiVα\pi_{i}\in V_{\alpha} the next vertex πi+1\pi_{i+1} that will be visited if the token visits πi\pi_{i}. In general, a strategy is a partial function σ:V×VαV\sigma{:}V^{*}\times V_{\alpha}\to V which, given a history of vertices visited by the token and a vertex on which the token currently resides, determines the next vertex. However, due to the positional determinacy theorem for parity games [17] it suffices to consider positional strategies: partial functions of the form σ:VαV\sigma{:}V_{\alpha}\to V that are compatible with EE, i.e., for all vVαv\in V_{\alpha} for which σ\sigma is defined, it is the case that σ(v)vE\sigma(v)\in vE. An infinite path π\pi is compatible with a given strategy σ\sigma if for all vertices πi\pi_{i} for which σ\sigma is defined, we have πi+1=σ(πi)\pi_{i+1}=\sigma(\pi_{i}). A strategy σ\sigma is closed on a set of vertices UU iff every play compatible with σ\sigma remains within UU. We say that a set of vertices UU is α\alpha-closed iff α\alpha has a strategy that is closed on UU.

A strategy σ\sigma for player α\alpha is winning from a vertex vv if and only if α\alpha is the winner of every play starting in vv that is compatible with σ\sigma. A set of vertices WαW_{\alpha} is won by α\alpha if for each vertex vWαv\in W_{\alpha}, player α\alpha has some winning strategy from vv. Another consequence of the aforementioned positional determinacy theorem is that the set of vertices W0W_{0} won by player 00 and the set of vertices W1W_{1}, won by player 11, forms a partition of the set VV: every vertex is won by exactly one player.

Example 2.2.

Consider the parity game depicted in Fig. 1. The vertices u1,u2,u3,u5,u6u_{1},u_{2},u_{3},u_{5},u_{6} are won by player 00 whereas vertices u4,u7u_{4},u_{7} and u8u_{8} are won by player 11. To see why vertices u4u_{4} and u8u_{8} are won by player 11, consider her strategy σ\sigma (that is closed on {u4,u8}\{u_{4},u_{8}\}) defined by σ(u4)=u8\sigma(u_{4})=u_{8} and σ(u8)=u4\sigma(u_{8})=u_{4}. Any play that is compatible with σ\sigma infinitely often visits a dominating odd priority and is thus won by player 11.∎

Subgames, Attractors and Dominions.

For a game G=(V,E,p,(V0,V1))G=(V,E,p,(V_{0},V_{1})) and a set UVU\subseteq V, we define the subgame of GG, denoted GUG\cap U, as the maximal substructure (V,E,p,(V0,V1))(V^{\prime},E^{\prime},p^{\prime},(V^{\prime}_{0},V^{\prime}_{1})) that is obtained by restricting the graph (V,E)(V,E) to UU and imposing the restriction on the other elements of GG, i.e., V=UV^{\prime}=U, E=E(U×U)E^{\prime}=E\cap(U\times U), p(v)=p(v)p^{\prime}(v)=p(v) for all vUv\in U, and V0=V0UV^{\prime}_{0}=V_{0}\cap U and V1=V1UV^{\prime}_{1}=V_{1}\cap U. If the edge relation EE^{\prime} of GUG\cap U is again left-total, then the subgame is again a parity game. We furthermore use the abbreviation GAG\setminus A to denote the subgame G(VA)G\cap(V\setminus A).

Parity game solving can essentially be reduced to identifying or computing appropriate subgraphs that are entirely won by a single player and from which the opponent cannot escape. A subgame that has this property for a player α\alpha is called an α\alpha-dominion. Technically, an α\alpha-dominion is a non-empty set of vertices DαVD_{\alpha}\subseteq V such that player α\alpha has a winning strategy, closed on DαD_{\alpha}, from all vertices in the set DαD_{\alpha}.

The pre-image Phys.Rev.EαU{\rm Phys.~Rev.~E}{\alpha}{U} (or single-step force [29]) for a given non-empty set UVU\subseteq V and player α\alpha is defined as Phys.Rev.EαU={vVαvEU}{vVα¯vEU}{\rm Phys.~Rev.~E}{\alpha}{U}=\{v\in V_{\alpha}\mid vE\cap U\neq\emptyset\}\cup\{v\in V_{\bar{\alpha}}\mid vE\subseteq U\}. The α\alpha-attractor into UU, denoted Attrα(U)\textit{Attr}_{\alpha}(U), is the set of vertices for which player α\alpha can force play into UU. Formally, Attrα(U)\textit{Attr}_{\alpha}(U) is the least set AUA\supseteq U to which α\alpha can force play: Attrα(U)=μA.(UPhys.Rev.EαA)\textit{Attr}_{\alpha}(U)=\mu A.(U\cup{\rm Phys.~Rev.~E}{\alpha}{A}). The confined α\alpha-attractor, denoted Attrα(T,U)\textit{Attr}_{\alpha}(T,U), is defined analogously by limiting the set of vertices to those from TT. That is, it represents the subset of vertices TTT^{\prime}\subseteq T from which α\alpha can force play to UU while remaining in TT. We note that for arbitrary set UVU\subseteq V, the subgame GAttrα(U)G\setminus\textit{Attr}_{\alpha}(U) is again a parity game; that is, the edge relation of the subgame is again total. Furthermore, the α\alpha-attractor into an α\alpha-dominion DαD_{\alpha} is again an α\alpha-dominion. Finally, observe that the set VAttrα(U)V\setminus\textit{Attr}_{\alpha}(U) is α¯\bar{\alpha}-closed.

Example 2.3.

Reconsider the parity game from Fig. 1. We already identified a closed strategy that is winning for player 11 on the set of vertices {u4,u8}\{u_{4},u_{8}\}. So this set is a 11-dominion. It is not a maximal 11-dominion: we can add u7u_{7} to extend it. The 00-attractor into the set {u2}\{u_{2}\} contains the vertices u1u_{1} (which is owned by 11 but trivially attracted to u2u_{2} since it has but one successor vertex), u3,u5u_{3},u_{5} and u6u_{6}. Vertex u4u_{4} does not belong to the 00-attractor into {u2}\{u_{2}\} as player 11 can choose to move to u7u_{7}. For similar reasons, vertices u7u_{7} and u8u_{8} do not belong to the 00-attractor into {u2}\{u_{2}\}. ∎

3 Parity Game Solving Algorithms

We consider four set-based algorithms for solving parity games. These algorithms will be introduced in some detail in the next subsections.

3.1 Zielonka’s Recursive Algorithm

The algorithm by Zielonka is a divide and conquer algorithm that searches for dominions in subgames. This algorithm is essentially distilled from a constructive proof of the positional determinacy of parity games by, among others, Zielonka [31]. Despite the fact that the algorithm has a relatively bad theoretical worst-case complexity (it runs in 𝒪(mnd)\mathcal{O}(mn^{d}) where nn is the number of vertices, mm the number of edges and dd is the number of different priorities in the game) and exponential worst-case examples are known for various classes of special games [20], the algorithm remains among the most successful solvers for parity games in practice, see [19] and the recent exploration [15].

Zielonka’s algorithm (see Algorithm 1) constructs winning regions for both players out of the solution of subgames with fewer different priorities and vertices. For this, the algorithm relies on the fact that higher priorities in the game dominate lower priorities, and that any forced revisit of these higher priorities is beneficial to the player associated with the parity of the priority. For non-trivial games, the algorithm relies on attractor set computations (see lines 8 and 10) to identify those vertices that can be forced to visit the maximal priority; the remaining vertices are then solved recursively (see line 9).

Assuming that the maximal priority is of parity α\alpha, the outcome of the first recursion yields a dominion for α¯\bar{\alpha} in the subgame. In case this dominion is α¯\bar{\alpha}-maximal in the entire game, α\alpha wins all vertices outside the dominion of player α¯\bar{\alpha} (lines 11-12). This can be seen as follows: since the game restricted to VBV\setminus B (where BB is computed in line 10) is α¯\bar{\alpha}-closed, the opponent can choose to stay within the subgame WαW_{\alpha}; choosing to do so means she will lose. So the only option she has is to escape. But the only escape she has leads, via AA, to the maximal priority which has the parity of α\alpha. Note that if α\alpha is forced to leave this maximal priority she will again end up in the same subgame; any play that does so ad infinitum visits the maximal priority infinitely often and is therefore won by α\alpha. In case α¯\bar{\alpha}’s dominion is not maximal, we can remove its α¯\bar{\alpha}-attractor BB from the game and recursively solve the remaining subgame and use its solution to construct the solution of the entire game (lines 14 and 15).

Algorithm 1 Zielonka’s Algorithm
1: function Zielonka(GG)
2:    if V=V=\emptyset then
3:     (W0,W1)(,)(W_{0},W_{1})\leftarrow(\emptyset,\emptyset)
4:    else
5:     mmax{p(v)|vV}m\leftarrow\max\{p(v)~|~v\in V\}
6:     αmmod2\alpha\leftarrow m\mod 2
7:     U{vV|p(v)=m}U\leftarrow\{v\in V~|~p(v)=m\}
8:     AAttrα(U)A\leftarrow\textit{Attr}_{\alpha}(U)
9:     (W0,W1)Zielonka(GA)(W^{\prime}_{0},W^{\prime}_{1})\leftarrow\textsc{Zielonka}(G\setminus A)
10:     BAttrα¯(Wα¯)B\leftarrow\textit{Attr}_{\bar{\alpha}}(W^{\prime}_{\bar{\alpha}})
11:     if B=Wα¯B=W^{\prime}_{\bar{\alpha}} then
12:       (Wα,Wα¯)(AWα,B)(W_{\alpha},W_{\bar{\alpha}})\leftarrow(A\cup W^{\prime}_{\alpha},B)
13:     else
14:       (W0,W1)Zielonka(GB)(W^{\prime}_{0},W^{\prime}_{1})\leftarrow\textsc{Zielonka}(G\setminus B)
15:       (Wα,Wα¯)(Wα,Wα¯B)(W_{\alpha},W_{\bar{\alpha}})\leftarrow(W^{\prime}_{\alpha},W^{\prime}_{\bar{\alpha}}\cup B)
16:     end if
17:    end if
18:    return (W0,W1)(W_{0},W_{1})
19: end function

Note that rather than solving the entire game at once, one can first decompose a game into its strongly connected components (SCCs) and first solve the bottom SCCs. The SCC decomposition can be integrated tightly in the algorithm so that in each recursive call first an SCC decomposition is performed. While this may sound expensive, in [20] it is shown that this actually allows the algorithm to run in polynomial time on many practically relevant classes of special games such as solitaire and dull games for which the original algorithm might require exponential time otherwise.

3.2 Priority Promotion

The recent Priority Promotion (PP) algorithm [7] starts, like Zielonka’s recursive algorithm, with a game decomposition that aims at identifying dominions for a given player. In contrast to Zielonka’s algorithm, however, the PP algorithm does not explicitly solve subgames. Instead, within a fixed game, it uses a dominion searcher that maintains a set of vertices, along with an updated (promoted) priority mapping and zooms in on a dominion within that set of vertices. Once an α\alpha-dominion is returned by the dominion searcher, the search for another dominion continues until the entire game is solved, see Algorithm 2.

Algorithm 2 Priority Promotion Solver
1: function SolvePP(GG)
2:    (W0,W1)(,)(W_{0},W_{1})\leftarrow(\emptyset,\emptyset)
3:    UVU\leftarrow V
4:    while UU\neq\emptyset do
5:     mmax{p(v)vU}m\leftarrow\max\{p(v)\mid v\in U\}
6:     (W0,W1)SearchDominion(GU,U,p,m)(W^{\prime}_{0},W^{\prime}_{1})\leftarrow\textsc{SearchDominion}(G\cap U,U,p,m)
7:     (W0,W1)(W0W0,W1W1)(W_{0},W_{1})\leftarrow(W_{0}\cup W^{\prime}_{0},W_{1}\cup W^{\prime}_{1})
8:     UU(W0W1)U\leftarrow U\setminus(W^{\prime}_{0}\cup W^{\prime}_{1})
9:    end while
10:    return (W0,W1)(W_{0},W_{1})
11: end function

The main complexity and novelty of the PP algorithm lies in the way it identifies a dominion. To this end, it relaxes the notion of a dominion to a quasi α\alpha-dominion. A quasi α\alpha-dominion is a set UU of vertices for which α\alpha has a strategy that guarantees that every play that remains within UU is won by α\alpha, or that exits UU via the α¯\bar{\alpha}-escape of UU. The α\alpha-escape of a set UU, denoted escGα(U)\textit{esc}^{\alpha}_{G}(U) is the set of vertices from which α\alpha can force play out of UU in a single move; i.e., escGα(U)=Phys.Rev.EαVUU\textit{esc}^{\alpha}_{G}(U)={\rm Phys.~Rev.~E}{\alpha}{V\setminus U}\cap U. A quasi α\alpha-dominion UU in a game GG is said to be α\alpha-closed iff escGα¯(U)=\textit{esc}^{\bar{\alpha}}_{G}(U)=\emptyset; otherwise it is said to be α\alpha-open. Note that an α\alpha-closed quasi α\alpha-dominion is an α\alpha-dominion. When the α¯\bar{\alpha}-escape set of a quasi α\alpha-dominion only contains vertices with the highest priority in the game, the α\alpha quasi-dominion is called an α\alpha-region.

By searching for quasi-dominions, the algorithm avoids the ‘hard’ problem of identifying the (set of) priorities that lead to a player winning its dominion. Under certain conditions, these quasi-dominions offer just enough guarantees that when composed, the result is a dominion. Regions meet these conditions. The dominion searcher, see Algorithm 3, essentially traverses a partial order of states which contain information about the open regions the searcher has computed up to that point. Once the searcher finds a closed region it terminates and returns this dominion to the solver. Conceptually the searcher assigns to each α\alpha-region it finds a priority that under-approximates the best value the opponent α¯\bar{\alpha} must visit when escaping from the α\alpha-region. A higher α\alpha-region U1U_{1} can then be merged with a lower region U2U_{2}, yielding a new α\alpha-region and improving the under-approximation of U2U_{2} by promoting its best escape value.

Algorithm 3 Priority Promotion Dominion Searcher
1: function SearchDominion(G,Vg,pg,mgG,V_{g},p_{g},m_{g})
2:    αmgmod2\alpha\leftarrow m_{g}\mod 2
3:    U{vVgpg(v)=mg}U\leftarrow\{v\in V_{g}\mid p_{g}(v)=m_{g}\}
4:    AAttrα(Vg,U)A\leftarrow\textit{Attr}_{\alpha}(V_{g},U)
5:    XescGα¯(A)X\leftarrow\textit{esc}^{\bar{\alpha}}_{G}(A)
6:    if X=X=\emptyset then
7:     (Wα,Wα¯)(Attrα(A),)(W^{\prime}_{\alpha},W^{\prime}_{\bar{\alpha}})\leftarrow(\textit{Attr}_{\alpha}(A),\emptyset)
8:     return (W0,W1)(W^{\prime}_{0},W^{\prime}_{1})
9:    else
10:     XescGVgα¯(A)X\leftarrow\textit{esc}^{\bar{\alpha}}_{G\cap V_{g}}(A)
11:     if XX\neq\emptyset then
12:       pgpg[Amg]p_{g}^{*}\leftarrow p_{g}[A\mapsto m_{g}]
13:       mgmax{pg(v)vVgpg(v)<mg}m_{g}^{*}\leftarrow\max\{p_{g}^{*}(v)\mid v\in V_{g}\wedge p_{g}^{*}(v)<m_{g}\}
14:       VgVgAV_{g}^{*}\leftarrow V_{g}\setminus A
15:     else
16:       mgbeppgα¯(A)m_{g}^{*}\leftarrow\textit{bep}^{\bar{\alpha}}_{p_{g}}(A)
17:       pg(ppgmg)[Amg]p_{g}^{*}\leftarrow(p\uplus p_{g}^{\geq m_{g}^{*}})[A\mapsto m_{g}^{*}]
18:       Vg{vVpg(v)mg}V_{g}^{*}\leftarrow\{v\in V\mid p_{g}^{*}(v)\leq m_{g}^{*}\}
19:     end if
20:     return SearchDominion(G,Vg,pg,mg)\textsc{SearchDominion}(G,V_{g}^{*},p_{g}^{*},m_{g}^{*})
21:    end if
22: end function

The searcher first checks whether the set of vertices UU that dominate the current state induces a closed region AA within the entire game; if so, the region is returned and the search is finished (lines 2-8). If the region is open, the opponent α¯\bar{\alpha} may escape. When the region is open in the current state, she may try to escape to some inferior priority within the subgraph; if the region is closed in the current state, she can only escape to some region in the larger game and end up in a priority that dominates mgm_{g}.

In case the region is open in the current state (line 11-14), the priority function of the current state is updated to set all vertices in AA to the currently dominating priority mgm_{g}. This is achieved by the update pgpg[Umg]p_{g}^{*}\leftarrow p_{g}[U\mapsto m_{g}] which is defined as pg(v)=mgp_{g}^{*}(v)=m_{g} in case vUv\in U and pg(v)=pg(v)p_{g}^{*}(v)=p_{g}(v) otherwise. The new priority for the subgraph that will be explored is set to the next largest priority in the graph (line 13) and AA is removed from the subgraph (line 14). This new state is then explored recursively (see line 20). In case the region is closed in the current state (line 16-18), the opponent must escape (if she wants to) to vertices in the larger game. The best escape priority she can force is the minimal priority among the set of vertices that she can force to reach in a single step. This is given by the function beppgα(A)\textit{bep}^{\alpha}_{p_{g}}(A) which yields the minimum priority (according to pgp_{g}) of the set {wVAvAVα:wvE}\{w\in V\setminus A\mid\exists v\in A\cap V_{\alpha}:w\in vE\}. The dominating priority mgm_{g} is updated to mgm_{g}^{*} to reflect this best escape priority (see line 16) after which pgp_{g} is updated to pgp_{g}^{*}. In this update, all vertices in AA are set to priority mgm_{g}^{*} while all vertices with priorities exceeding mgm_{g}^{*} remain unchanged. All vertices with priorities dominated by mgm_{g}^{*} are reset to their original value. This is achieved by the update in line 17. Here, pgmp_{g}^{\geq m} yields the partial function that coincides with pgp_{g} on the (maximal) domain VVV^{\prime}\subseteq V for which pg(v)mp_{g}(v)\geq m for all vVv\in V^{\prime}, and is undefined elsewhere. The update ppgp\uplus p_{g}, for a partial function pgp_{g} is then defined as (ppg)(v)=p(v)(p\uplus p_{g})(v)=p(v) in case vdom(pg)v\notin\textsf{dom}(p_{g}) and pg(v)p_{g}(v) otherwise. The subgraph of GG that is explored next is set to all vertices with (promoted) priority no larger than mgm_{g}^{*}. This newly constructed state is then again recursively explored (see line 20).

The PP algorithm resets all information in lower regions when promoting vertices. As observed in [5, 6], this can be improved by only resetting regions of the opponent, or even a subset of that. While this affects the performance for some artificial worst-case examples, these improvements do not lead to improvements on games stemming from practical applications, nor on random games [15].

3.3 The Fixpoint-Iteration Algorithm

The third algorithm we consider is the so-called Fixpoint-Iteration (FI) algorithm. It is essentially based on the reduction of the parity game solving problem to the modal μ\mu-calculus model checking problem. This transformation views a parity game as a graph with state labels indicating the owner (by associating a proposition Even or Odd to a state) and priority of a vertex (by associating a proposition prioi\textsf{prio}_{i} to a state representing a vertex with priority ii), while the winning regions W0W_{0} and W1W_{1} of the game are characterised by a so-called Walukiewicz μ\mu-calculus formula.

Rather than using a general-purpose modal μ\mu-calculus model checker for model checking a parity game, we here recall the algorithm given by Bruse et al. [9], see Algorithm 4. This algorithm works directly on a (pre-processed) parity game, essentially checking the following formula11 1 Here, μ\mu and ν\nu are the least and greatest fixpoint, respectively, \diamond is the may modality, \Box is the must modality, Even, Odd and prioi\textsf{prio}_{i} are propositions and prio¯i\overline{\textsf{prio}}_{i} is the negation of prioi\textsf{prio}_{i}. for games with least priority 00, and a similar formula for games with least priority 11:

σXd1μX1.νX0.((Eveni=0d1(prioiXi))(Oddi=0d1(prio¯iXi))\sigma X_{d-1}\dots\mu X_{1}.\nu X_{0}.((\textsf{Even}\wedge\bigvee\limits_{i=0}^{d-1}\diamond(\textsf{prio}_{i}\wedge X_{i}))\vee(\textsf{Odd}\wedge\bigwedge\limits_{i=0}^{d-1}\Box(\overline{\textsf{prio}}_{i}\vee X_{i}))

The pre-processing guarantees that the parity game is compressed: i.e., it ensures that the set of priorities occurring in the game constitute an integer interval with least priority 00 or 11. Note that converting a parity game to a compressed parity game can be done without changing the solution to the game.

Algorithm 4 Fixpoint-Iteration algorithm for compressed parity games with least priority 00 and maximal priority d1d-1. The algorithm for compressed parity games with least priority 11 is analogous.
1: function FI(GG)
2:    function Diamond_Box
3:     U0{vV0wvE:wXp(w)}U_{0}\leftarrow\{v\in V_{0}\mid\exists w\in vE:w\in X_{p(w)}\}
4:     U1{vV1wvE:wXp(w)}U_{1}\leftarrow\{v\in V_{1}\mid\forall w\in vE:~w\in X_{p(w)}\}
5:     return U0U1U_{0}\cup U_{1}
6:    end function
7:    for id1,,0i\leftarrow d-1,\dots,0 do
8:     Xiif i is even then V else X_{i}\leftarrow\textbf{if}\text{ $i$ is even}\textbf{ then }V\textbf{ else }\emptyset
9:    end for
10:    repeat
11:     X0,X0X0,Diamond_Box()X^{\prime}_{0},X_{0}\leftarrow X_{0},\textsc{Diamond\_Box}(\,)
12:     i0i\leftarrow 0
13:     while Xi=XiX_{i}=X_{i}^{\prime} and i<d1i<d-1 do
14:       ii+1i\leftarrow i+1
15:       Xi,XiXi,Xi1X_{i}^{\prime},X_{i}\leftarrow X_{i},X_{i-1}
16:       Xi1if i is odd then V else X_{i-1}\leftarrow\textbf{if}\text{ $i$ is odd}\textbf{ then }V\textbf{ else }\emptyset
17:     end while
18:    until i=d1i=d-1 and Xd1=Xd1X_{d-1}=X^{\prime}_{d-1}
19:    return (Xd1,VXd1)(X_{d-1},V\setminus X_{d-1})
20: end function

The main loop of the algorithm evaluates the fixpoint-free part of the Walukiewicz formula using the current values for the variables X0Xd1X_{0}\dots X_{d-1}. The evaluation gives rise to new values for these variables until a fixpoint is reached for all variables; at that moment, variable Xd1X_{d-1} contains all vertices that satisfy the formula, and, by construction, are won by player 00.

Note that the re-initialisation of all variables X0Xd1X_{0}\dots X_{d-1} can be optimised by exploiting monotonicity of the formula, reducing the overall complexity from exponential in dd to exponential in d/2\lceil d/2\rceil, see e.g. [28]. This can be done by first computing the smallest index ii for which XiX_{i} is not yet stable, and only resetting Xi1,Xi3,X_{i-1},X_{i-3},\dots afterwards, thus yielding an algorithm that is closely related to the small progress measures algorithm, see [9]. We have included this optimisation in our implementation.

3.4 The APT Algorithm

The APT22 2 The description of the algorithm in [29] seems to contain several small mistakes and implementing it that way yields incorrect solutions; our exposition is based on their actual OCaml implementation in PGSolver. algorithm, introduced by Kupferman and Vardi [26], is studied and implemented in [29]. This algorithm solves parity games by solving the emptiness problem of a corresponding alternating parity word automaton, which, in turn, is solved by checking the emptiness of an equivalent weak alternating word automaton. Rather than explicitly constructing this weak alternating word automaton, the APT algorithm, see Algorithm 5, constructs this automaton implicitly, checking emptiness on-the-fly.

APT uses two disjoint sets of vertices VVV_{V} (Visiting vertices) and VAV_{A} (Avoiding vertices) for solving a parity game. It declares a vertex Visiting for a player just whenever by reaching that vertex she can force a winning play; dually, a vertex is Avoiding for a player whenever by reaching that vertex she cannot force any winning play. These sets derive their meaning from a generalisation of the parity game winning condition, in which player 00 wins a play as soon as VVV_{V} is visited, player 11 wins as soon as VAV_{A} is visited, and the traditional parity game condition applies if neither VVV_{V} nor VAV_{A} are ever visited. Furthermore, the algorithm keeps track of an index ii, representing the most significant priority in the game for which the winners of the vertices with that priority have not yet been decided for the given sets VVV_{V} and VAV_{A}.

Algorithm 5 The APT algorithm for compressed parity games with minimal priority mm and maximal priority dd.
1: function APT(GG)
2:    function Win(α,i,VV,VA\alpha,i,V_{V},V_{A})
3:     return VFP(α¯,i,VV,VA) if im else Phys.Rev.EαVVV\setminus\textsc{FP}(\bar{\alpha},i,V_{V},V_{A})\textbf{ if }i\geq m\textbf{ else }{\rm Phys.~Rev.~E}{\alpha}{V_{V}}
4:    end function
5:    function FP(α,i,VV,VA\alpha,i,V_{V},V_{A})
6:     X,F,{vVp(v)=i}X,F\leftarrow\emptyset,\{v\in V\mid p(v)=i\}
7:     YWin(α,i1,VA(FX),VV(FX))Y\leftarrow\textsc{Win}(\alpha,i-1,V_{A}\cup(F\setminus X),V_{V}\cup(F\cap X))
8:     while YXY\neq X do
9:       XYX\leftarrow Y
10:       YWin(α,i1,VA(FX),VV(FX))Y\leftarrow\textsc{Win}(\alpha,i-1,V_{A}\cup(F\cap X),V_{V}\cup(F\setminus X))
11:     end while
12:    end function
13:    α(d+1)mod2\alpha\leftarrow(d+1)\mod 2
14:    XWin(α,d,,)X\leftarrow\textsc{Win}(\alpha,d,\emptyset,\emptyset)
15:    return (X,VX) if α=0 else (VX,X)(X,V\setminus X)\textbf{ if }\alpha=0\textbf{ else }(V\setminus X,X)
16: end function

4 Implementing Parity Game Solvers Using BDDs

Using an efficient data structure to explicitly represent a graph, one may be able to represent parity games up to 2252^{25} vertices on a 16Gb main memory machine. Parity games encoding verification problems of (software or hardware) systems easily require more memory. A symbolic representation of the game graph may then help to sidestep this problem. Binary Decision Diagrams (BDDs) provide just such a representation. We assume that the reader is familiar with BDDs and the algorithms manipulating these; for a comprehensive treatment we refer to [30, 16].

BDDs can be used to canonically (and often concisely) represent propositional formulae, which in turn can be used to characterise sets. In our setting we have to represent the following sets: the set of vertices VV of a game, the edges EE, the partition (V0,V1)(V_{0},V_{1}) of VV and the priority function pp. For most parity games stemming from practical verification problems, the number of distinct priorities in the game is small. For that reason, it suffices to represent pp as a mapping from priorities to sets of vertices. For the computations involved in the parity game solving algorithms of the previous section we provide the key ingredients below; each operation is described using an expression for the BDD-based implementation.

Henceforward we assume that x\vec{x} is the vector of Boolean variables used to span the set of vertices VV of a given parity game; we assume ι\iota is a total injective mapping from VV to truth-assignments for x\vec{x}. The ii-th Boolean variable of x\vec{x} is denoted xi\vec{x}_{i}; this notation extends to other vectors of Boolean variables. We represent a set UVU\subseteq V by a propositional formula encoded as a BDD 𝒰(x)\mathcal{U}{(\vec{x})} that ranges over x\vec{x}; as is standard, for a truth-assignment u\vec{u} for x\vec{x} we have 𝒰(u)=1\mathcal{U}{(\vec{u})}=1 iff ι(v)=u\iota(v)=\vec{u} for some vUv\in U. This way, we can represent, e.g., the sets V0V_{0} and V1V_{1} by BDDs 𝒱0(x)\mathcal{V}_{0}{(\vec{x})} and 𝒱1(x)\mathcal{V}_{1}{(\vec{x})}. The set of edges is given by a BDD (x,x)\mathcal{E}{(\vec{x},\vec{x}^{\prime})} that ranges over x\vec{x} and x\vec{x}^{\prime}, where x\vec{x}^{\prime} is the vector of Boolean variables used to represent a successor vertex. Finally, the collection of BDDs 𝒫i(x)\mathcal{P}_{i}{(\vec{x})} represents the set of vertices with priority ii.

Set comparison, intersection, union and complement are easily expressed as BDD operations using equivalence, conjunction, disjunction and negation. The pre-image Phys.Rev.EαU{\rm Phys.~Rev.~E}{\alpha}{U}, which is the basis for the APT algorithm, can then be encoded using existential quantification and the above operations:

Phys.Rev.Eα𝒰(x)=(𝒱α(x)x.((x,x)𝒰(x)))(𝒱α¯(x)¬x.((x,x)¬𝒰(x))){\rm Phys.~Rev.~E}{\alpha}{\mathcal{U}{(\vec{x})}}\\ =(\mathcal{V}_{\alpha}{(\vec{x})}\wedge\exists\vec{x}^{\prime}.(\mathcal{E}{(\vec{x},\vec{x}^{\prime})}\wedge\mathcal{U}{(\vec{x}^{\prime})}))\vee(\mathcal{V}_{\bar{\alpha}}{(\vec{x})}\wedge\neg\exists\vec{x}^{\prime}.(\mathcal{E}{(\vec{x},\vec{x}^{\prime})}\wedge\neg\mathcal{U}{(\vec{x}^{\prime})}))

Using the pre-image, the α\alpha-attractor Attrα(𝒰(x))\textit{Attr}_{\alpha}(\mathcal{U}{(\vec{x})}) and the confined α\alpha-attractor Attrα(𝒯(x),𝒰(x))\textit{Attr}_{\alpha}(\mathcal{T}{(\vec{x})},\mathcal{U}{(\vec{x})}) can then be implemented effectively as a least fixpoint computation. Note also that the operation escGα(A)\textit{esc}^{\alpha}_{G}(A), used in lines 5 and 10 of the PP algorithm, can be implemented using the pre-image operation. The DiamondBox()\textsc{DiamondBox}(\,) function of the FI algorithm can be implemented in a similar manner:

(𝒱0(x)i(x.((x,x)𝒫i(x)𝒳i(x))))(𝒱1(x)¬i(x.((x,x)𝒫i(x)¬𝒳i(x))))(\mathcal{V}_{0}{(\vec{x})}\wedge\bigvee_{i}(\exists\vec{x}^{\prime}.(\mathcal{E}{(\vec{x},\vec{x}^{\prime})}\wedge\mathcal{P}_{i}{(\vec{x}^{\prime})}\wedge\mathcal{X}_{i}{(\vec{x}^{\prime})})))\vee(\mathcal{V}_{1}{(\vec{x})}\wedge\neg\bigvee_{i}(\exists\vec{x}^{\prime}.(\mathcal{E}{(\vec{x},\vec{x}^{\prime})}\wedge\mathcal{P}_{i}{(\vec{x}^{\prime})}\wedge\neg\mathcal{X}_{i}{(\vec{x}^{\prime})})))

where, for each ii, 𝒳i(x)\mathcal{X}_{i}{(\vec{x})} is the set of vertices represented by approximation XiX_{i} in Algorithm 4.

The operations in the PP algorithm that remain to be encoded involve the computation of the best escape priority and the computation of new priority mappings. For the best escape priority we are required to compute the minimal priority among a set of successor vertices of a given set of vertices UU. We split this computation in two parts. First we identify the set of successor vertices using the operation post(U)\textit{post}(U) defined as the union of uEuE, for all uUu\in U; its BDD encoding is standard: post(𝒰(x))=(x.(x,x)𝒰(x))[xx]\textit{post}(\mathcal{U}{(\vec{x})})=(\exists\vec{x}.\mathcal{E}{(\vec{x},\vec{x}^{\prime})}\wedge\mathcal{U}{(\vec{x})})[\vec{x}^{\prime}\mapsto\vec{x}], where [xx][\vec{x}^{\prime}\mapsto\vec{x}] denotes a variable renaming. Computing beppgα(A)\textit{bep}^{\alpha}_{p_{g}}(A), done in line 16 of Alg. 3, then can be implemented by searching for the least value mm in the domain of mapping pgp_{g} (assuming that we have BDDs 𝒫g,i(x)\mathcal{P}_{g,i}{(\vec{x})} representing the set of vertices {vVpg=i}\{v\in V\mid p_{g}=i\}) for which the BDD ¬𝒜(x)𝒫g,m(x)post(𝒜(x)𝒱α(x))\neg\mathcal{A}{(\vec{x})}\wedge\mathcal{P}_{g,m}{(\vec{x})}\wedge\textit{post}(\mathcal{A}{(\vec{x})}\wedge\mathcal{V}_{\alpha}{(\vec{x})}) is satisfiable. This can be done using a simple iteration.

Finally, the computations of pgp_{g}^{*} in lines 12 and 17 of Alg. 3 are simple updates of the function pgp_{g} which can be done by iterating over the domain of the mapping pp (resp. pgp_{g}) and computing new BDDs using conjunction and disjunction of the BDDs given by pp and pgp_{g}. More specifically, for updates of the form (ppgm)[Am](p\uplus p_{g}^{\geq m})[A\mapsto m], we first compute the set of vertices in the domain of pgp_{g} that are above mm:

𝒜​bovem(x)={𝒫g,i(x)im}\mathcal{A\textit{\!bove}}_{\geq m}{(\vec{x})}=\bigvee\{\mathcal{P}_{g,i}{(\vec{x})}\mid i\geq m\}

The updated priority function pgp_{g}^{*} coinciding with (ppgm)[Am](p\uplus p_{g}^{\geq m})[A\mapsto m], where AA is encoded by BDD 𝒜(x)\mathcal{A}{(\vec{x})} and the set of vertices {vVp(v)=i}\{v\in V\mid p(v)=i\} is encoded by 𝒫i(x)\mathcal{P}_{i}{(\vec{x})} is then given by:

𝒫g,i(x)={¬𝒜(x)((𝒫i(x)¬𝒜​bovem(x))(𝒫g,i(x)𝒜​bovem(x)))if im𝒜(x)(𝒫i(x)¬𝒜​bovem(x))(𝒫g,i(x)𝒜​bovem(x))else\mathcal{P^{*}}_{\!\!\!\!\!\!g,i}{(\vec{x})}=\left\{\begin{array}[]{ll}\neg\mathcal{A}{(\vec{x})}\wedge((\mathcal{P}_{i}{(\vec{x})}\wedge\neg\mathcal{A\textit{\!bove}}_{\geq m}{(\vec{x})})\vee(\mathcal{P}_{g,i}{(\vec{x})}\wedge\mathcal{A\textit{\!bove}}_{\geq m}{(\vec{x})}))&\text{if $i\neq m$}\\ \mathcal{A}{(\vec{x})}\vee(\mathcal{P}_{i}{(\vec{x})}\wedge\neg\mathcal{A\textit{\!bove}}_{\geq m}{(\vec{x})})\vee(\mathcal{P}_{g,i}{(\vec{x})}\wedge\mathcal{A\textit{\!bove}}_{\geq m}{(\vec{x})})&\text{else}\end{array}\right.

5 Experimental Evaluation

We have implemented all four algorithms in Python, utilising the BDD package dd33 3 See https://github.com/johnyf/dd, version 0.5.4, by Ioannis Filippidis which, next to a native Python BDD implementation, offers wrappers to C-based BDD implementations such as CUDD, Sylvan and BuDDy. For the timings we report on for our experiments we rely on the native Python implementation as our independent experiments suggest that its performance is comparable to that of CUDD. Note that the choice of programming language is secondary given that all essential time-consuming computations involve BDD creation and manipulation. We conducted all experiments on a Macbook Pro, 3.5 GHz Intel Core i7 (13-inch, 2017 model, i.e., dual core), with 16 Gb 2133 MHz LPDDR3 main memory, running macOS 10.13.4.

We compare the performance of the implementation of all four algorithms as described in Section 4, and, for reference, we also compare these to explicit-state state-of-the-art C++ implementations of both the Zielonka and priority promotion algorithms offered by the pbespgsolve tool of the mCRL2 toolset [14]. First, we assess their performance on random games with different characteristic. Such games, however, may be poor predictors for the performance of the algorithms on practical problems. Second, since one of our aims is to assess the scalability and the speed at which BDD-based solvers can solve parity games that encode practical verification problems, we also compare their performance on some of the larger cases of the Keiren benchmark set [25].

5.1 Random Parity Games

PGSolver [19] is a collection of parity game solving algorithms programmed in OCaml, which includes a tool randomgame to generate (possibly self-loop-free) random parity games with a fixed number of vertices. Running randomgame N P L H x generates a game with N vertices; each vertex vv is assigned a priority that is chosen uniformly from the interval [0,P1][0,\texttt{P}-1], and ownership 00 with probability 12\frac{1}{2} and ownership 11 with probability 12\frac{1}{2}. Each vertex is connected to dd distinct neighbours, where dd is chosen uniformly from the interval [L,H][\texttt{L},\texttt{H}]. Since the tool generates explicit graphs in the PGSolver format, we automatically converted these games to BDDs using a binary encoding for the vertices.

For our first batch of experiments, we considered both dense and low out-degree, self-loop-free random games with a high number of distinct priorities, varying N{250,500,1 000,2 000,4 000}\texttt{N}\in\{250,500,1\,000,2\,000,4\,000\}:

  • low out-degree random games generated using randomgame N N 1 2 x;

  • dense random games generated using randomgame N N 1 N x;

For each class of random games and each value of N we generated 20 parity games. Table 1 lists the cumulative runtime (in seconds) for solving these parity games. We set a timeout of 12 000 (cumulative) seconds for each experiment; a timeout is denoted by 𝐓\mathbf{\dagger_{T}}. Experiments requiring over 15Gb memory are aborted; we indicate this by 𝐌\mathbf{\dagger_{M}}.

low out-degree games dense games
Solver 250 500 1 000 2 000 4 000 250 500 1 000 2 000 4 000
Zielonka 9 53 302 1 130 3 463 43 228 1 004 𝐌\mathbf{\dagger_{M}} 𝐌\mathbf{\dagger_{M}}
PP 10 63 316 815 3 048 50 227 1 039 𝐌\mathbf{\dagger_{M}} 𝐌\mathbf{\dagger_{M}}
FI 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐌\mathbf{\dagger_{M}} 𝐌\mathbf{\dagger_{M}}
APT 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐌\mathbf{\dagger_{M}} 𝐌\mathbf{\dagger_{M}}
Zielonka (explicit) 0 0 0 0 1 0 0 0 0 5
PP (explicit) 0 0 0 0 0 0 0 0 0 3
Table 1: Cumulative time (in seconds) to solve the random games for a given value of N. We set a timeout of 12 000 seconds (indicated by 𝐓\mathbf{\dagger_{T}}) for the cumulative solving time; 𝐌\mathbf{\dagger_{M}} indicates out-of-memory.

We observe that for both types of games, the explicit Zielonka and PP solvers substantially outperform the symbolic solvers, see Table 1. Of note is that both APT and FI fail on all accounts, which we believe is due to the large number of distinct priorities in the random games, causing both algorithms to require an excessively large number of iterations. The symbolic PP implementation outperforms the symbolic Zielonka implementation for low out-degree games that have large number of vertices and different priorities, but for smaller number of vertices and small number of different priorities, Zielonka performs better, but only marginally so. For games that consist of more than 2 000 vertices, the BDD approach fails dramatically, especially in the case of dense games.

We can trace the poor performance of the symbolic solvers to the overly complex and unstructured BDDs underlying the random graphs. These unwieldy BDD representations are caused by the lack of structure provided by the binary encoding of vertices and edges, leading to a poor compression ratio: typically, BDDs remain concise if two adjacent vertices (i.e., vertices related by EE) only differ in their representation by a relatively small number of bits. The binary encoding, however, does not guarantee this. Variable-reordering heuristics may help in some cases but are not guaranteed to do so. As a result, the BDDs themselves require an excessive amount of memory (as witnessed by the out-of-memory issues in modest-sized dense random graphs), and operations on these BDDs lead to excessive running times. As such, these experiments may not be good predictors for running times of the symbolic algorithms on games encoding practical verification problems. However, they do suggest that FI and APT both suffer significantly from a poor compression ratio. Zielonka and PP, on the other hand, are (relatively) less susceptible to a poor compression ratio.

For our next batch of random experiments, we repeat the experiments conducted in [29]. In that work, the authors observe that the APT algorithm outperforms Zielonka’s algorithm for games in which the number of vertices is exponential in the number of priorities in a game, as long as the base is sufficiently large: they show that APT outperforms Zielonka for NcP\texttt{N}\approx c^{\texttt{P}}, for c=ec=e or c=10c=10, but for c=2c=2, Zielonka outperforms APT. Games in which the number of vertices is exponential in the number of distinct priorities are typical of games encoding practical verification and synthesis problems. We generate dense random games with a priority/vertex ratio given by the relation NcP\texttt{N}\approx c^{\texttt{P}}, for c{2,e,10,13}c\in\{2,e,10,13\}, using randomgame N P 1 N x; i.e., we extend the experiments of [29] by also considering c=13c=13. We again generate 20 random games per experiment, and set a timeout at 12 000 seconds (cumulative), see Table 2.

N=2P\texttt{N}=2^{\texttt{P}} games NeP\texttt{N}\approx e^{\texttt{P}} games N=10P\texttt{N}=10^{\texttt{P}} games N=13P\texttt{N}=13^{\texttt{P}} games
Solver 128 256 512 1 024 2 048 21 55 149 404 1 097 10 100 1 000 13 169 2197
Zielonka 9 33 127 559 2 203 1 2 14 88 646 0 7 514 0 18 3099
PP 10 37 132 543 2 355 1 2 15 91 717 0 8 544 0 19 4299
FI 348 2 212 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 1 6 89 955 10 695 0 6 530 0 12 2912
APT 173 1 092 8 195 𝐓\mathbf{\dagger_{T}} 𝐓\mathbf{\dagger_{T}} 1 4 61 659 7 526 0 5 545 0 13 3982
Zielonka (explicit) 0 0 0 0 1 0 0 0 1 4 0 0 3 0 0 17
PP (explicit) 0 0 0 0 1 0 0 0 1 4 0 0 3 0 0 17
Table 2: Cumulative time (in seconds) to solve the random games for a given value of N. A timeout (a cumulative time of 12 000 seconds or more) is indicated by 𝐓\mathbf{\dagger_{T}}.

Table 2 illustrates that Zielonka has a slight edge over PP. Comparing the results in Table 2 to the experimental outcomes in [29], we find some interesting differences. First, whereas in [29], the APT algorithm is found to significantly outperform Zielonka’s algorithm for c=ec=e and c=10c=10, our results do not provide such clear indications. We do see that for c=10c=10 and c=13c=13, the running times of the APT algorithm becomes more in line with that of Zielonka and PP. The behaviour of FI illustrates a more pronounced correlation between the number of vertices and the number of priorities in a game, suggesting that in a symbolic setting, the FI algorithm may actually perform quite well on games that encode verification problems that typically result in only a few distinct priorities. We test this hypothesis by comparing the performance on a number of (large) parity games originating from model checking problems, mostly taken from the Keiren Benchmark set.

5.2 The Keiren Parity Game Solving Benchmark Set

In [25], Keiren describes and provides a set of parity games that originate from over 300 model checking problems, originating from 21 specifications. The main obstacle in reusing the data set is that the games are encoded as explicit graphs in the PGSolver format. This means that most of the structure that a BDD solver can typically exploit for compactly representing the game graph is lost. As we concluded from the random games generated by PGSolver, a binary encoding of the sets involved leads to severe performance degradation of the solvers, and given the size of the graphs, there is little hope the running times of our algorithms on such encoded BDDs provide meaningful information. We have coped with this by generating BDDs from the original specifications for several of the model checking games included in the Keiren benchmark set.44 4 To this end, we developed a special-purpose pbes2bdd tool for converting (a fragment of) parameterised Boolean equation systems in Standard Recursive Form, containing only Boolean data parameters, to BDDs. The tool currently does not guarantee totality of the generated parity game; instead, it relies on the user to guarantee that this is the case. Note that the conversion of the original specifications to BDDs is not straightforward: most games stem from model checking problems for system models that employ (unbounded) lists, natural numbers, etcetera, for which no trivial bounds can be established. The results can be found in Table 3; here, 𝐌\mathbf{\dagger_{M}} indicates that the computation was aborted because it needed more than 15Gb of memory.

Model Property #\#prio Zielonka (sym/exp) PP (sym/exp) FI APT #x\#\vec{x}
Chatbox Absence of Deadlock 2 0.04/0.02 0.05/0.01 0.00 0.01 18
It is possible to JOIN infinitely often 2 0.02/0.02 0.02/0.01 0.00 0.01 18
Invariantly LEAVE can follow JOIN 3 0.04/0.07 0.05/0.02 0.01 0.02 18
Onebit2 Infinitely often send and receive 3 0.59/0.14 0.58/0.04 0.64 0.69 26
Absence of Deadlock 2 0.16/0.11 0.19/0.03 0.04 0.09 26
Onebit8 Infinitely often send and receive 3 3.30/24.17 3.28/4.49 3.36 3.19 38
Absence of Deadlock 2 0.86/22.70 1.02/6.82 0.19 0.47 38
Onebit32 Infinitely often send and receive 3 10.93/𝐌\mathbf{\dagger_{M}} 10.68/𝐌\mathbf{\dagger_{M}} 10.22 9.81 50
Absence of Deadlock 2 2.42/𝐌\mathbf{\dagger_{M}} 3.16/𝐌\mathbf{\dagger_{M}} 0.52 1.65 50
Hesselink4 Absence of Deadlock 2 1.97/𝐌\mathbf{\dagger_{M}} 1.87/𝐌\mathbf{\dagger_{M}} 1.21 1.31 60
Cache consistency 2 3.47/𝐌\mathbf{\dagger_{M}} 3.55/𝐌\mathbf{\dagger_{M}} 1.55 1.93 61
Dining13 Absence of Deadlock 2 1.45/8.40 1.46/7.68 0.20 0.19 89
Aristotle can eat infinitely often 2 7.58/3.44 8.00/1.18 4.24 4.03 89
Aristotle can, and thus will eat infinitely often 3 1.69/10.35 1.56/4.74 0.43 0.37 90
Cumulative: 34.52/𝐌\mathbf{\dagger_{M}} 35.47/𝐌\mathbf{\dagger_{M}} 22.61 23.77
Table 3: Running times (in seconds) for selected model checking problems; 𝐌\mathbf{\dagger_{M}} indicates an out-of-memory error; #x\#\vec{x} indicates the number of Boolean variables needed to encode the set of vertices.

We again compared our BDD-based implementations of the four parity game solving algorithms to the explicit Zielonka and PP solvers of the pbespgsolve tool55 5 Of note is the fact that for our explicit solvers, we only compute the solution to the vertices reachable from a designated vertex (typically the vertex that indicates whether the modal μ\mu-calculus formula holds for the initial state of a system); we have excluded the (typically significant) time required for constructing this reachable subgame and only list the time required to solve the resulting (sub)game. The game that is solved by the explicit solvers can thus be orders of magnitude smaller than the games solved by our symbolic solvers, as these do not conduct a reachability analysis. (indicated by the ‘exp’ fields in Table 3).

First, observe that all four symbolic solvers perform quite well on all games, sometimes significantly outperforming the two explicit solvers. In particular, none of the symbolic solvers run out-of-memory; in fact, memory usage for all games stays well below 500Mb. This sharply contrasts the explicit solvers, which, for the larger games that can be solved consume 8Gb or more. We furthermore note that the runtime performance of the symbolic solvers appears to be more robust than that of the explicit solvers.

Second, we observe that both FI and APT clearly outperform Zielonka and PP. The PP and Zielonka algorithms perform comparably on these games, with Zielonka having an insignificant edge over PP; in this regard, the outcomes of these experiments are largely similar to the collective outcome of our experiments using random games.

6 Discussion and Conclusions

We studied four algorithms for solving parity games, viz. Zielonka’s recursive algorithm, the recently introduced Priority Promotion (PP) algorithm, the Fixpoint-Iteration (FI) algorithm and the APT algorithm, and compared the performance of their symbolic implementations.

Our results indicate that, overall, the symbolic implementations of Zielonka’s algorithm and the PP algorithm have very similar performance characteristics. The experiments using random games indicate that Zielonka’s algorithm performs slightly better than PP for games with a small number of priorities, and for games in which the number of vertices is exponentially larger than the number of distinct priorities, but the differences are not significant in most cases. The same observation applies to the cases taken from Keiren’s benchmark set.

The symbolic implementations of the APT and FI algorithms both perform poorly on most of our random games. There are indications that also in the symbolic case, these algorithms are more suited for games in which the number of vertices is exponentially larger than the number of distinct priorities, but the results are not as pronounced as reported in [29] for the explicit case. We believe that part of this difference is due to the susceptibility both algorithms demonstrate on the size of the BDDs. This is further supported by the cases taken from Keiren’s benchmark set, in which the BDDs remain rather small and both FI and APT outperform Zielonka and PP, but further research is needed to confirm this hypothesis and to see if there are ways to sidestep such issues.

While our experimental results on the Keiren benchmark set show that both FI and APT beat Zielonka and PP on games stemming from verification problems, their unpredictability in the presence of large BDDs makes them less reliable for solving such problems as one cannot upfront predict the size of BDDs in practice. Given that all solvers require at most seconds for even the largest models, containing up to 2902^{90} vertices, any of the four algorithms would work in practice, and one may therefore favour the more robust PP or Zielonka algorithms in practice.

Finally, comparing the performance of our symbolic Zielonka and PP solvers to the explicit solvers, we find that there are only few cases in which the explicit solvers have an edge over the symbolic solvers. More importantly, the explicit solvers are unable to solve games which are readily solved by the symbolic solvers, indicating the practical significance of BDD-based solvers.

References

  • [1]
  • [2] L. de Alfaro & M. Faella (2007): An Accelerated Algorithm for 3-Color Parity Games with an Application to Timed Games. In: CAV, LNCS 4590, Springer, pp. 108–120, 10.1007/978-3-540-73368-3_13.
  • [3] A. Arnold, A. Vincent & I. Walukiewicz (2003): Games for Synthesis of Controllers with Partial Observation. TCS 303(1), pp. 7–34, 10.1016/S0304-3975(02)00442-5.
  • [4] M. Bakera, S. Edelkamp, P. Kissmann & C.D. Renner (2008): Solving μ\mathrm{\mu}-Calculus Parity Games by Symbolic Planning. In: MoChArt, LNCS 5348, Springer, pp. 15–33, 10.1007/978-3-642-00431-5_2.
  • [5] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): A Delayed Promotion Policy for Parity Games. In: GandALF, EPTCS 226, pp. 30–45, 10.4204/EPTCS.226.3.
  • [6] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): Improving Priority Promotion for Parity Games. In: Haifa Verification Conference, LNCS 10028, pp. 117–133, 10.1007/978-3-319-49052-6_8.
  • [7] M. Benerecetti, D. Dell’Erba & F. Mogavero (2016): Solving Parity Games via Priority Promotion. In: CAV (2), LNCS 9780, Springer, pp. 270–290, 10.1007/978-3-319-41540-6_15.
  • [8] D. Berwanger, K. Chatterjee, M. De Wulf, L. Doyen & T.A. Henzinger (2009): Alpaga: A Tool for Solving Parity Games with Imperfect Information. In: TACAS, LNCS 5505, Springer, pp. 58–61, 10.1007/978-3-642-00768-2_7.
  • [9] F. Bruse, M. Falk & M. Lange (2014): The Fixpoint-Iteration Algorithm for Parity Games. In: GandALF, EPTCS 161, pp. 116–130. Available at https://doi.org/10.4204/EPTCS.161.12.
  • [10] D. Bustan, O. Kupferman & M.Y. Vardi (2004): A Measured Collapse of the Modal μ\mathrm{\mu}-Calculus Alternation Hierarchy. In: STACS, LNCS 2996, Springer, pp. 522–533, 10.1007/978-3-540-24749-4_46.
  • [11] C.S. Calude, S. Jain, B. Khoussainov, W. Li & F. Stephan (2017): Deciding Parity Games in Quasipolynomial Time. In: STOC, ACM, pp. 252–263, 10.1145/3055399.3055409.
  • [12] K. Chatterjee, W. Dvorák, M. Henzinger & V. Loitzenbauer (2017): Improved Set-Based Symbolic Algorithms for Parity Games. In: CSL, LIPIcs 82, Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, pp. 18:1–18:21, 10.4230/LIPIcs.CSL.2017.18.
  • [13] T. Chen, B. Ploeger, J. van de Pol & T.A.C. Willemse (2007): Equivalence Checking for Infinite Systems Using Parameterized Boolean Equation Systems. In: CONCUR’07, pp. 120–135, 10.1007/978-3-540-74407-8_9.
  • [14] S. Cranen, J.F. Groote, J.J.A. Keiren, F. Stappers, E.P. de Vink, W. Wesselink & T.A.C. Willemse (2013): An Overview of the mCRL2 Toolset and Its Recent Advances. In: TACAS, LNCS 7795, Springer, pp. 199–213, 10.1007/978-3-642-36742-7_15.
  • [15] T. van Dijk (2018): Oink: An Implementation and Evaluation of Modern Parity Game Solvers. In: TACAS (1), LNCS 10805, Springer, pp. 291–308, 10.1007/978-3-319-89960-2_16.
  • [16] R. Drechsler & B. Becker (1998): Binary Decision Diagrams - Theory and Implementation. Springer, 10.1007/978-1-4757-2892-7.
  • [17] E.A. Emerson & C.S. Jutla (1991): Tree automata, Mu-Calculus and determinacy. In: FOCS’91, IEEE Computer Society, Washington, DC, USA, pp. 368–377, 10.1109/SFCS.1991.185392.
  • [18] J. Fearnley, S. Jain, S. Schewe, F. Stephan & D. Wojtczak (2017): An Ordered Approach to Solving Parity Games in Quasi Polynomial Time and Quasi Linear Space. In: SPIN, ACM, pp. 112–121, 10.1145/3092282.3092286.
  • [19] O. Friedmann & M. Lange (2009): Solving Parity Games in Practice. In: ATVA, LNCS 5799, Springer, pp. 182–196, 10.1007/978-3-642-04761-9_15.
  • [20] M. Gazda & T.A.C. Willemse (2013): Zielonka’s Recursive Algorithm: dull, weak and solitaire games and tighter bounds. In: GandALF, EPTCS 119, pp. 7–20, 10.4204/EPTCS.119.4.
  • [21] J.F. Groote & T.A.C. Willemse (2005): Parameterised Boolean Equation Systems. Theor. Comput. Sci. 343(3), pp. 332–369, 10.1016/j.tcs.2005.06.016.
  • [22] M. Jurdziński (2000): Small Progress Measures for Solving Parity Games. In: STACS’00, LNCS 1770, Springer, pp. 290–301, 10.1007/3-540-46541-3_24.
  • [23] M. Jurdziński & R. Lazic (2017): Succinct Progress Measures for Solving Parity Games. In: LICS, IEEE Computer Society, pp. 1–9, 10.1109/LICS.2017.8005092.
  • [24] G. Kant & J. van de Pol (2014): Generating and Solving Symbolic Parity Games. In: GRAPHITE, EPTCS 159, pp. 2–14, 10.4204/EPTCS.159.2.
  • [25] J.J.A. Keiren (2015): Benchmarks for Parity Games. In: FSEN, LNCS 9392, Springer, pp. 127–142, 10.1007/978-3-319-24644-4_9.
  • [26] O. Kupferman & M.Y. Vardi (1998): Weak Alternating Automata and Tree Automata Emptiness. In: STOC, ACM, pp. 224–233, 10.1145/276698.276748.
  • [27] R. McNaughton (1993): Infinite Games Played on Finite Graphs. APAL 65(2), pp. 149–184, 10.1016/0168-0072(93)90036-D.
  • [28] H. Seidl (1996): Fast and Simple Nested Fixpoints. Inf. Process. Lett. 59(6), pp. 303–308, 10.1016/0020-0190(96)00130-5.
  • [29] A. Di Stasio, A. Murano, G. Perelli & M.Y. Vardi (2016): Solving Parity Games Using an Automata-Based Algorithm. In: CIAA, LNCS 9705, Springer, pp. 64–76, 10.1007/978-3-319-40946-7_6.
  • [30] I. Wegener (2000): Branching programs and binary decision diagrams. SIAM, 10.1137/1.9780898719789.
  • [31] W. Zielonka (1998): Infinite Games on Finitely Coloured Graphs with Applications to Automata on Infinite Trees. TCS 200(1-2), pp. 135 – 183, 10.1016/S0304-3975(98)00009-7.