SEMIRING PROVENANCE FOR B ¨UCHI GAMES: STRATEGY ANALYSIS WITH ABSORPTIVE POLYNOMIALS

. This paper presents a case study for the application of semiring semantics for fixed-point formulae to the analysis of strategies in B¨uchi games. Semiring semantics generalizes the classical Boolean semantics by permitting multiple truth values from certain semirings. Evaluating the fixed-point formula that defines the winning region in a given game in an appropriate semiring of polynomials provides not only the Boolean information on who wins, but also tells us how they win and which strategies they might use. This is well-understood for reachability games, where the winning region is definable as a least fixed point. The case of B¨uchi games is of special interest, not only due to their practical importance, but also because it is the simplest case where the fixed-point definition involves a genuine alternation of a greatest and a least fixed point. We show that, in a precise sense, semiring semantics provide information about all absorption-dominant strategies – strategies that win with minimal effort, and we discuss how these relate to positional and the more general persistent strategies. This information enables applications such as game synthesis or determining minimal modifications to the game needed to change its outcome. Lastly, we discuss limitations of our approach and present questions that cannot be immediately answered by semiring semantics.


Introduction
Two-player games on finite graphs which admit infinite plays are of fundamental importance in many areas of logic and computer science, especially in the formal analysis of reactive systems, where they model the non-terminating interaction between a system and its environment.In such a game, the objective or winning condition of the player who represents the system specifies the desired set of behaviours of the system.The most basic classes of such objectives are reachability and safety objectives defined by a set of states (positions) that the player should reach, or avoid.We can assume, without loss of generality, that even though infinite plays are possible in a game with reachability or safety objectives, they are all won by the same player.
Games with genuine and non-trivial winning conditions for infinite plays are harder to analyse; they include games with arbitrary ω-regular objectives, such as liveness, Muller, Streett-Rabin, or parity objectives, and many others.The goal of this paper is to provide a case study of a recent method for strategy analysis, based on semiring semantics, and we would like to explore its potential for providing detailed information about strategies in genuinely infinite games.One of the simplest class of games with a non-trivial winning condition for the infinite plays are games with Büchi objectives, which require that a specific target set F of states is reached infinitely often during the play (see e.g.[17] for background).Büchi games, as well as some of their straightforward generalisations, have many applications in formal methods, and efficient algorithms for solving them have been studied thoroughly (see e.g.[4,5,6]).They are also of interest from the points of view of topology and logic, because they are among the simplest games where the set of winning plays is neither open nor closed, and where logical definition of the winning region requires a genuine alternation of a greatest and a least fixed point (see Sect. 5).
Strategies in infinite games can be very complicated because, in principle, they may depend on the entire history of a play.Thus, there exist uncountably many different strategies, even on a finite game graph.Fortunately, in many cases and in particular for Büchi games, simple strategies are sufficient to win.A fundamental result in this context is the positional determinacy of parity games (of which Büchi games are a special case), saying that from each position, one of the two players has a positional winning strategy, i.e. a winning strategy that only depends on the current position and not on the history of the play.A positional strategy can be viewed as a subgraph of the game graph, and can therefore be represented in a compact way.As a consequence, the algorithmic analysis of Büchi games has concentrated almost exclusively on the positional strategies.Here we extend this point of view somewhat and take also other kinds of simple strategies into account.Specifically, we are interested in absorption-dominant winning strategies [16] which are strategies without redundant moves; this means that taking away anything, in the sense of demanding that some specific move is played less often, makes the strategy non-winning.Another way to distinguish positional strategies from absorption-dominant ones concerns their minimisation properties: while positional strategies minimize the set of moves that they use, absorption-dominant strategies take multiplicities into account and minimize the multiset of moves.A further interesting class are the persistent strategies [20], which are positional in each individual play but not necessarily across distinct plays.We shall study the relationship between these different classes of simple strategies, and prove that every positional strategy is absorption-dominant and every absorption-dominant strategy is persistent, and that these inclusions are strict.
The specific method for strategy analysis that we want to apply to Büchi games in this paper is based on the logical definability of the winning positions by a formula in the fixed-point logic LFP, and on the semiring semantics for LFP developed in [9].In the classical Boolean semantics, a model A of a formula ϕ assigns to each (instantiated) literal a Boolean value.K-interpretations π, for a suitable semiring K, generalize this by assigning to each such literal a semiring value from K. We then interpret 0 as false and all other semiring values as nuances of true that provide additional information, depending on the semiring: For example, the Boolean semiring B = ({0, 1}, ∨, ∧, 0, 1) corresponds to Boolean semantics, the Viterbi-semiring V = ([0, 1], max, •, 0, 1) can model confidence scores, the tropical semiring T = (R ∞ + , min, +, ∞, 0) is used for cost analysis, and min-max-semirings (A, max, min, a, b) for a totally ordered set (A, <) can model different access levels.Most importantly, semirings of polynomials, such as N[X], allow us to track certain literals by mapping them to different indeterminates.The overall value of the formula is then a polynomial that describes precisely what combinations of literals prove the truth of the formula.Semiring semantics has been studied for various logics [1,7,8,9,15], following the successful development of semiring provenance in database theory and related fields (see e.g.[10,12,18,19,23,24,25]).While semiring provenance analysis for database queries had largely been confined to positive query languages such as conjunctive queries, positive relational algebra, and Datalog, the generalisation to logics such as first-order logic FO and least fixed-point logic LFP -featuring full negation and unrestricted interaction between least and greatest fixed points -poses non-trivial mathematical challenges and requires new algebraic constructions.Specifically, it has turned out that appropriate semirings for LFP should be absorptive and fully continuous.Fortunately, this is the case for most of the important application semirings such as V, T or min-max-semirings, but not for the natural semiring N, or the general provenance semirings of polynomials or formal power series, N[X] and N ∞ [[X]].Instead, we rely on semirings S ∞ [X] of generalized absorptive polynomials, which we explain in Sect.4.1, and which are the universal absorptive, fully-continuous semirings, in the sense that every mapping h : X → K into an absorptive, fully-continuous semiring K uniquely extends to a fully-continuous semiring homomorphism h : S ∞ [X] → K, see Theorem 17.From valuations of fixed-point formulae in such semirings we thus can derive detailed insights into why the formula holds -and by applying this to the fixed-point definition of winning positions in Büchi games we obtain compact descriptions of winning strategies, in particular of all positional strategies and all absorption-dominant ones.
After an analysis of simple winning strategies in Büchi games, and a short introduction to semiring semantics for fixed-point logic, we shall study the semiring valuations of the particular LFP-formula win 0 (x) that defines the winning region for Player 0 in Büchi games.Given that the objective of Player 0 is to ensure that the play hits the target set F infinitely often, we may informally describe their winning region as the largest set Y of positions from which they can enforce a (further) visit to Y ∩ F after k ≥ 1 moves.On the other side the set of positions from which Player 0 can enforce a visit to a target set is the smallest set of positions that either are already in the target set, or from which Player 0 can enforce the play to come closer to it.Thus, the winning region of Player 0 can be described as a greatest fixed point inside of which there is a least fixed point, and it is well-known that this fixed-point alternation in the treatment of Büchi objectives cannot be avoided, see e.g.[2].
The theoretical underpinning of our method is a Sum-of-Strategies-Theorem, saying that for any position v in a Büchi game, the valuation of the LFP-formula win 0 (v) in an absorptive, fully-continuous semiring coincides with the sum of the valuations of all absorption-dominant winning strategies from v. The proof is somewhat involved and requires non-trivial machinery; details are given in the full version of this paper [14].Besides being of theoretical interest, this result allows to study a number of interesting questions concerning the available winning strategies in a given Büchi game: Strategy tracking.Introducing indeterminates for all edges in a fixed Büchi game G, the semiring value π strat [[win 0 (v)]] for a position v is a polynomial whose monomials are concise descriptions of all absorption-dominant strategies.From these monomials we can derive whether Player 0 wins from v (if there are any monomials) and which edges are used by each absorption-dominant strategy, and how often they appear in the strategy tree.In particular, we can immediately identify and count positional strategies from the polynomial.Going further, we can answer questions such as: can Player 0 still win if we remove edge e, or several edges at once? Can they still win if edge e may only be used finitely often in each play?
Repairing a game.Instead of analysing strategies in a fixed game, we may also reason about modifications or synthesis of (parts of) the game.For example, assuming Player 0 loses from v, what are minimal modifications to the game that would let Player 0 win from v? To answer such questions we have to take into account also negative information (i.e., absent edges in the graph), so as to find a minimal repair consisting of both moves to delete and moves to add.Algebraically, this requires to extend our semirings by dual-indeterminates, which leads to quotient semirings S ∞ [X, X] by a construction that has been used before in [15,27,9] to deal with semiring semantics for negation.We illustrate with the example of minimal repairs that we can indeed derive the desired information from valuations in such semirings.

B üchi Games and Strategies
A Büchi game is given by a tuple G = (V,V 0 ,V 1 , E, F) where V is a set of positions (here assumed to be finite), with a disjoint decomposition V = V 0 ∪V 1 into positions of Player 0 and positions of Player 1.The relation E ⊆ V ×V specifies the possible moves, and the target set F ⊆ V describes the winning condition.We denote the set of immediate successors of a position v by vE := {w | vw ∈ E} and require that vE = ∅ for all v.A play from an initial position v 0 is an infinite path v 0 v 1 v 2 . . .through G where the successor . . is won by Player 0 if v i ∈ F for infinitely many i < ω, otherwise it is won by Player 1.The winning region of Player σ is the set of those positions v ∈ V such that Player σ has a winning strategy from v, i.e. a strategy that guarantees them a win, no matter what the opponent does.
A strategy for Player σ in G = (V,V 0 ,V 1 , E, F) can be represented in different ways, for instance as a function f : V * V σ → V that assigns a next position to each partial play ending in a position of Player σ , or simply f : V σ → V if the strategy is positional.Here we follow an alternative approach and represent strategies as trees, comprised of all plays that are consistent with the strategy (see, e.g., [16]).For simplicity, we only consider strategies of Player 0, so unless mentioned otherwise, "strategy" always refers to a strategy for Player 0. Definition 1.Given a Büchi game G = (V,V 0 ,V 1 , E, F), the tree unraveling from v 0 is the tree T(G, v 0 ) whose nodes are all finite paths ρ from v 0 in G and whose edges are ρ → ρv for v ∈ V .We often write a node of T(G, v 0 ) as ρv to indicate a finite path ending in v ∈ V .The length of ρ is denoted by |ρ| and we write ρ ρ if ρ is a (not necessarily strict) prefix of ρ .
Strategies can then be defined as subtrees of the tree unraveling, which allows for a more visual way to reason about strategies.An important detail is that the strategy tree only contains positions (and thus choices for these positions) that are reachable when following the strategy.Moreover, we only consider finite Büchi games and hence the tree unraveling and all strategies are finitely branching.Definition 2. A strategy S (of Player 0) from v 0 in G is a subtree of T(G, v 0 ) induced by a node set W satisfying the following conditions: -If ρv ∈ W , then also ρ ∈ W (prefix closure).
-If ρv ∈ W and v ∈ V 0 , then there is a unique v ∈ vE with ρvv ∈ W (unique choice).
-If ρv ∈ W and v ∈ V 1 , then ρvv ∈ W for all v ∈ vE (all moves of the opponent).The strategy is winning if all plays contained in S are winning.
We commonly write ρ ∈ S instead of ρ ∈ W , and we often refer to paths of the form ρv ∈ S as occurrences of v in S. When we depict strategies graphically, we represent finite paths ρv just by their last position v to ease readability (notice that in the tree unravelling ρ can be reconstructed from v by following the path to the root).See Figure 1b for an example.For v ∈ V 0 , we further write S(ρv) = w if ρvw is the (unique) successor of ρv in S. If S is positional, we may also write S(v) to denote the unique successor of v chosen by S. We write Strat G (v) and WinStrat G (v) to denote the set of all (winning) strategies of Player 0 from position v ∈ G, and we drop G if the game is clear from the context.Notice that for the first strategy, we did not specify moves for all positions in V 0 as these positions cannot be reached when edge d is played; this is the main reason why we represent strategies as trees.Figure 1b depicts such a tree representation of a strategy.This strategy is a typical example of a winning strategy that is not positional, but still minimal if we take edge multiplicities into account.

Strategies with Minimal Effort
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away -ANTOINE DE SAINT-EXUP ÉRY As a measure for the complexity or effort of a strategy, we consider the set of edges a strategy S uses and how often each of these edges appears in the strategy tree.Under this measure, the simplest strategies are the ones that do not play redundant edges -hence no moves are left to take away.Player 0 wins by first looping n times at position v (for any fixed n ∈ N) and then moving to w, corresponding to the edge profile (n, 1, ∞).Clearly, looping at v is a redundant move, so we consider the strategy with n = 0 as the simplest strategy (that wins with the least effort).
To formalize the intuition of redundant moves, we define an order on strategies called absorption.This is defined in such a way that the -maximal strategies are the simplest ones that avoid redundant moves whenever possible.
) for all edges e ∈ E. If additionally # e (S 1 ) < # e (S 2 ) for some e ∈ E, we say that S 1 strictly absorbs S 2 , denoted S 1 S 2 .They are absorption-equivalent, denoted S 1 ≡ S 2 , if both S 1 S 2 and S 2 S 1 .A strategy S ∈ Strat(v) is absorption-dominant from position v, if there is no strategy S ∈ Strat(v) with S S. It is further strictly absorption-dominant, if there is no other strategy S ∈ Strat(v) with S S, so no other strategy is absorption-equivalent to S.
Notice that absorption is simply the inverse pointwise order on the edge profiles.In particular, S 1 ≡ S 2 if, and only if, # E (S 1 ) = # E (S 2 ).We next aim at understanding the relation between (strictly) absorption-dominant strategies and the standard notion of positional strategies.As a starter, we show that absorption-dominant strategies are not necessarily positional (cf.[16] for a similar example).
Example 7. Consider the strategy S as depicted in Figure 1b.It is not positional, as the choice for position v is not unique (both e and f occur in S).It is, however, absorption-dominant.As there are two paths to v , every strategy must either use e or f twice, or use both edges.If e (or f ) is used twice, then the strategy cannot absorb S, and one can verify that S absorbs all strategies using both e and f .It is not strictly absorption-dominant, as we obtain an absorption-equivalent strategy by switching the two branches in the depiction of S, so that e is used after c, and f after b.Strategies such as the one in Figure 1b are not positional, but satisfy the weaker property that within each play, the strategy makes a unique decision for each position v ∈ V 0 .This notion of strategies has been introduced as persistent strategies in [20] in the context of LTL on game graphs and has been further studied in [11].Persistent strategies have also been called weakly positional in [16].
We say that a strategy plays positionally from a position v ∈ V 0 if the strategy makes a unique choice at position v.A strategy that plays positionally from all positions in V 0 is positional.With this notation, we now clarify the relation between the different notions of strategies; a summary is shown in Figure 2. We first observe that if a strategy S does not play positionally from v, we can always obtain a strategy S with S S by swapping the choices at v.This leads to the first result (see [14] for details): Proposition 8. Strictly absorption-dominant strategies coincide with positional strategies.
Towards persistent strategies, we observe, by applying a simple combinatorial fact known as Dickson's Lemma to edge profiles, that there are only finitely many absorption-dominant strategies from v up to absorption-equivalence.This leads to the following result: Proposition 9. Let S ∈ WinStrat G (v) be absorption-dominant from v, and let w ∈ V 0 be a position.If w occurs infinitely often in S, then S plays positionally from w.
Proof sketch.Consider the infinitely many substrategies at occurrences of w in S. By Dickson's Lemma, there is one such substrategy S w such that infinitely many of the substrategies are absorption-equivalent to S w .In particular, S w only uses edges that occur infinitely often in S. By positional determinacy, there is thus a positional winning strategy S pos from w with the same property.If S would not be positional, then modifying S to always play S pos from w would result in a strategy S S, a contradiction.
With this important insight, we can deduce that the absorption-dominant winning strategies (from some position v) are a (strict) subset of the persistent strategies: An absorption-dominant strategy must play positionally from positions that occur infinitely often by Proposition 9; positions that occur finitely often cannot be visited twice in one play (this would be a redundant repetition).
Corollary 10.Every absorption-dominant winning strategy in G is persistent.
Example 11.For strictness, consider the following game (a modified part of Figure 1a): Due to the self-loop b, only the positional strategies S 1 (always take a) and S 2 (always take b) are absorption-dominant from v. The strategy S 3 that, depending on Player 1's choice, either takes edge a or loops indefinitely using edge b is persistent, but not absorption-dominant: it is strictly absorbed by S 2 .
As a consequence of Corollary 10, all moves after the first repeated position are determined by persistence and we can thus represent absorption-dominant strategies in a compact way.Corollary 12. Let G be a game with n = |V | positions.Every winning strategy S ∈ WinStrat G (v) that is absorption-dominant from v can be uniquely represented by a subtree of the tree unraveling of height at most n.In particular, the number of absorption-dominant winning strategies is finite.

A Whirlwind Tour of Semiring Semantics
This section gives an overview on semiring semantics for fixed-point logics, with a focus on the semirings relevant for the case study.For a complete account, we refer to [9].

Semirings
Semirings are algebraic structures with two binary operations, usually denoted + and •, which we use to interpret the logical connectives ∨ and ∧.While semirings are very general structures, we make additional assumptions to ensure well-defined and meaningful semiring semantics for logics with fixedpoint operators, following the definitions in [9].Definition 13.A commutative semiring is an algebraic structure (K, +, •, 0, 1), with 0 = 1, such that (K, +, 0) and (K, •, 1) are commutative monoids, • distributes over +, and 0 All semirings we consider are commutative, so we omit commutative in the following.Towards fixed-point logic, we compute least and greatest fixed points with respect to the natural order ≤ K (see below) and to ensure that they exist, we require ≤ K to be a complete lattice (in fact, suprema and infima of chains would suffice, but in idempotent semirings this is equivalent).We additionally impose a natural continuity requirement which is crucial to our proofs, but does not seem to be a strong restriction in practice (we are not aware of any natural complete-lattice semirings that are not continuous).Regarding notation, a chain is a totally ordered set C ⊆ K and we write a •C = {a • c | c ∈ C} for a ∈ K. Definition 14.In an idempotent semiring (K, +, •, 0, 1), the natural order ≤ K is the partial order defined by a ≤ K b ⇔ a + b = b.We say that K is fully continuous if ≤ K is a complete lattice (with supremum and infimum ) and for all non-empty chains C ⊆ K, elements a ∈ K and • ∈ {+, •}, A semiring homomorphism h : By the Knaster-Tarski theorem, every ≤ K -monotone function f : K → K on a fully-continuous semiring has a least fixed point lfp( f ) and a greatest fixed point gfp( f ) in K, and this suffices to guarantee well-defined semantics of fixed-point logics.However, from a provenance perspective we further want this semantics to be meaningful in the sense that the value of a formula provides insights into why the formula holds.It turns out that this is the case if we additionally require the semiring to be absorptive [9].Definition 15.A semiring K is absorptive if a + ab = a for all a, b ∈ K.
We remark that absorption is equivalent to K being 0-closed or bounded [21], that is, 1 + a = 1.If K is idempotent, then absorption is further equivalent to multiplication being decreasing, that is, a • b ≤ K a, b.Clearly, every absorptive semiring is idempotent and thus partially ordered by ≤ K , with 1 as top element.If we additionally assume full continuity, we can extend any absorptive semiring by an infinitary power operation a ∞ = n∈N a n with natural properties such as a Example 16.Examples of semirings used in provenance analysis of databases and logics [18,19,16] are: • The Boolean semiring B = ({0, 1}, ∨, ∧, 0, 1) is the standard habitat of logical truth.It is absorptive and (trivially) fully continuous.
• N = (N, +, •, 0, 1) is used for counting evaluation strategies for a logical statement.It is not absorptive and hence not well suited for fixed-point logics.
• The Viterbi semiring V = ([0, 1], max, •, 0, 1) is used to compute confidence scores for logical statements.It is isomorphic to the tropical semiring T = (R ∞ + , min, +, ∞, 0) which is used for measuring the cost of evaluation strategies.Both are absorptive and fully continuous.
• The min-max semiring (A, max, min, a, b) on a totally ordered set (A, ≤) with least and greatest elements a and b can be used to model access privileges.It is absorptive and fully continuous.
From now on, all semirings we consider are commutative, absorptive and fully continuous.Besides the application semirings listed above, we are particularly interested in universal semirings of polynomials to represent abstract information.We can then use fully-continuous homomorphisms to specialize the computed information to application semirings as needed, as these homomorphisms preserve fixed points.
The common examples of semirings of polynomials N[X] and formal power series N ∞ [[X]], as used for provenance analysis of FO and Datalog in [18,15], are not absorptive and hence not well-suited for fixed-point logic.Instead, we rely on semirings of (generalized1 ) absorptive polynomials.We summarize the definition and main properties given in [9].Essentially, an absorptive polynomial such as ab 3 + c ∞ is a sum of monomials over a finite set of variables X, but without coefficients and with exponents from N ∪ {∞} (where n < ∞ for n ∈ N).Monomial multiplication is defined as usual (with n + ∞ = ∞).
The key ingredient is absorption among monomials.We say that a monomial m 1 absorbs m 2 , if all its exponents are smaller (or equal).Formally, m 1 m 2 if m 1 (x) ≤ m 2 (x) for all x ∈ X, where m 1 (x) denotes the exponent of x in m 1 .For example, ab 2 a ∞ b 2 and a ab, but a 2 b and ab 2 are incomparable.In an absorptive polynomial, we omit all monomials that would be absorbed, so absorptive polynomials are -antichains of monomials.Consequently, addition and multiplication are defined as usual, but afterwards we only keep the -maximal monomials.For example, (ab We write S ∞ [X] for the semiring of absorptive polynomials over the finite variable set X.The 0 and 1-elements are the empty polynomial and the single monomial 1 (with all zero exponents).This defines an absorptive, fully-continuous semiring [9].In fact, S ∞ [X] is the most general such semiring: Theorem 17 (Universal Property, [9]).Every mapping h : X → K into an absorptive, fully-continuous semiring K uniquely extends to a fully-continuous semiring homomorphism h : S ∞ [X] → K.

Logic
We consider here the fixed-point logic LFP that extends first-order logic FO by least and greatest fixedpoint formulae of the form ψ(y) = [lfp Rx. ϕ(R, x)](y) and ψ(y) = [gfp Rx. ϕ(R, x)](y).Here, R is a relation symbol occurring only positively in ϕ and x, y are variable tuples of matching arity.Given a (Boolean) model A and a tuple a of elements of A, the formula ψ(a) holds in A, denoted A |= ψ(a), if a is contained in the least (or greatest) fixed point of the operator F ϕ : R → {a | A |= ϕ(R, a)} that maps a relation R to the relation consisting of those tuples for which ϕ holds.For more background and a precise definition, we refer to [13].
In order to generalize Boolean semantics to semiring semantics, we first adapt the notion of a model A. Instead of determining for each literal whether it is true or false in A, we assign to each literal a semiring value, interpreting 0 as false and all other values as nuances of true.Special care is required to ensure that the assignment is consistent with respect to opposing literals (this is not always necessary, but often desirable).In the following, let K be a semiring, A a finite universe and τ a relational signature (we drop A and τ if clear from the context).We denote the set of (instantiated) literals as Given a literal L, we write ¬L for the opposing literal (identifying ¬¬L and L).The role of the Boolean model A is then replaced by a semiring interpretation π that assigns semiring values to all literals.Definition 18.Let K be a semiring.A K-interpretation (over finite A and τ) is an assignment π : Lit A,τ → K that maps true (in)equalities to 1 and false (in)equalities to 0. We say that K is model-defining, if for each literal L, exactly one of π(L) and π(¬L) is 0.
We lift π to LFP-formulae in negation normal form, resulting in a semiring value π[[ψ]], by interpreting ∧ and ∨ as semiring operations • and +, and similarly quantifiers as products or sums over the (finite) universe.For fixed-point formulae, we consider the induced operator F ϕ analogous to the Boolean case (but acting on mappings A k → K instead of relations R ⊆ A k ) and compute its fixed point in the semiring K.We refer to [9] for a formal definition; the details are not relevant for this paper, as we will only consider a fixed formula ψ (see Section 5).An important property of the resulting semantics is that they are preserved by fully-continuous semiring homomorphisms, in particular by polynomial evaluation in S ∞ [X] due to Theorem 17 (but not by polynomial evaluation of N[X] or formal power series!).

Case Study: Computing Strategies with Semiring Semantics
This section connects the previous sections on semiring semantics and absorption-dominant strategies.We focus on the formula for the winning region in a Büchi game and show that its value under semiring semantics can be understood in terms of (absorption-dominant) winning strategies.

The Semiring Interpretation
We want to use semiring semantics to analyze moves in winning strategies.For this reason, we label edges with indeterminates X (cf. Figure 1a) and use an S ∞ [X]-interpretation π strat to track moves (i.e., edge literals Euv) via their indeterminates.We assume the game graph to be fixed and do not wish to track information about the winning set F or the active player at a certain node, hence we simply map all other literals over τ = {E, F,V 0 ,V 1 } (e.g., Fv, V 0 v, ¬Euv) to 0 or 1, depending on whether they are true or false in the game.The resulting interpretation is almost Boolean and hence behaves very similar to the original game, except that we remember which edges are used in the evaluation of a formula.E, F) be a Büchi game and let X = {X vw | vw ∈ E} be a set of indeterminates for all edges.We define the S ∞ [X]-interpretation π strat as follows (depending on G): for all other literals L ∈ Lit V,τ .

The Formula
It is well known that the winning region (of Player 0) in a Büchi game is definable in fixed-point logic.
Intuitively, the winning region is the largest set Y such that from each position in Y , Player 0 can enforce a visit to Y ∩ F (after at least one move).In LFP, we can express the winning region by the following formula (see, e.g., [3,26]): Given a K-interpretation π for a Büchi game G = (V,V 0 ,V 1 , E, F), semiring semantics of the above formula induce2 the following fixed-point computation.To simplify the presentation, we introduce two families of variables, Y = (Y v ) v∈V and Z = (Z v ) v∈V that take values in K.We can then express the semiring semantics as π[[win 0 v∈V is the greatest solution to the equation system where, in turn, Z * (Y) is the least solution, given values Y = (Y v ) v∈V , to the equation system consisting of the following equation for all v ∈ V : For most of this paper, we use the interpretation π strat to track only moves of winning strategies.As π strat maps most of the literals to 0 or 1, we can simplify the equations depending on v: A good way to think about (and compute) the least and greatest solutions is the fixed-point iteration.The idea is to start with each Z v set to the least element of the semiring, then apply the above equations (i.e., the induced operator F ϕ ) to compute a next, larger semiring value and repeat this process until a fixed-point is reached (notice that the iteration can also be infinite, we then continue with the supremum/infimum).Using the interpretation π strat corresponding to the edge labels, we obtain the following fixed-point iteration.We write the tuples Y and Z as vectors We obtain the overall result π strat [[win 0 (v)]] = Y * v = n bc n = bc ∞ corresponding to the unique absorption-dominant strategy using edge b once and c infinitely often (cf.Example 5).

Connection to Strategies
By mapping edges to semiring values, we can track edges through the fixed-point computation.In Example 20, the resulting semiring value revealed how often each edge is used in the unique absorptiondominant winning strategy.We now generalize this observation.For simplicity, we only consider K-interpretations π that are edge tracking for a given game G.That is, they may assign arbitrary values to positive edge literals Evw, but all other literals are mapped to 0 or 1 in accordance with G. To make the connection to strategies explicit, we first define semiring values for strategies based on their edges.Definition 21.Let S be a strategy in a Büchi game G = (V,V 0 ,V 1 , E, F).Let K be an absorptive, fullycontinuous semiring and π an edge-tracking K-interpretation on G.The K-value of S is the product of the values for all edges appearing in S. Formally, The semiring value of win 0 can then be expressed as the sum over the values of all winning strategies.The proof of this result (see [14]) is based on a similar result for LFP model-checking games in [9] which is rather involved due to both infinite strategy trees and infinite fixed-point iterations.
Theorem 22 (Sum of Strategies).Let G be a Büchi game and v a position in G. Let K be an absorptive, fully-continuous semiring and π an edge-tracking K-interpretation.Then, It is in fact this central result that motivated the notion of absorption-dominant strategies.However, as we have already discussed, these may also be interesting in their own right if one is interested in minimal winning strategies.
Example 23.For the edge-tracking interpretation π strat induced by the edge labels in Figure 1a, we obtain There are four monomials, corresponding to four equivalence classes of absorption-dominant strategies.Each monomial reveals the edges that appear in the corresponding strategies, so we see that the first three monomials belong to positional (and hence uniquely defined) strategies.The last monomial belongs to the non-positional strategy shown in Figure 1b (and its switched version, see Example 7).The values of all other strategies are strictly absorbed by one of these monomials.

Strategy Analysis
For the general case, we fix a Büchi game G and focus on the ] are monomials and we can read off the number of occurrences of each edge in S from the exponents, i.e., the monomial is a representation of the edge profile # E (S).In particular, ] if, and only if, S 1 S 2 .The fact that absorptive polynomials are always finite [9] is thus another way to see that the number of absorption-dominant strategies is finite.
What can we learn from the polynomial π strat [[win 0 (v)]]?First, π strat [[win 0 (v)]] = 0 holds if, and only if, Player 0 has a winning strategy from v. By Theorem 22, we can further derive information about all absorption-dominant strategies.More precisely, we learn which edges each absorption-dominant strategy uses and how often they appear in the strategy tree.Knowing the edge profile immediately reveals whether the strategy is positional and what the positional choices are.By counting monomials, we can thus count the positional strategies, as well as the absorption-dominant strategies up to absorption-equivalence.
We can further answer questions such as: can Player 0 still win if we remove edge e?This is the case if, and only if, the polynomial π strat [[win 0 (v)]] contains a monomial without the variable X e (if there is a winning strategy without e, then there is also an absorption-dominant strategy and hence a monomial without X e ).Going further, a more interesting question is: can Player 0 still win if edge e may only be used finitely often in each play?The answer is not immediately obvious.Consider for example the strategy S in Figure 1b.The edge k occurs infinitely often in the strategy tree and we get π strat [[S]] = abce f hg ∞ k ∞ m ∞ .However, k is clearly played only once in each play consistent with S, whereas edge m is played infinitely often.We cannot distinguish edges k and m just from π strat [[S]], but we can do so if we compute π strat [[win 0 (w)]] for all positions w ∈ V , by the following criterion.If, on the other hand, we consider edge m (which also leads to position w), we see that m occurs in S w and we can thus conclude that S contains a play visiting m infinitely often.
Summarizing the results of this section, we see that semiring semantics in S ∞ [X] is very informative and allows us to derive important information about the winning strategies.Corollary 26.From the polynomial π strat [[win 0 (v)]], we can efficiently (in the size of the polynomial) derive the following information: -whether Player 0 wins from v, -the edge profiles of all absorption-dominant winning strategies from v, -the number and precise shape of all positional winning strategies from v, -whether Player 0 can still win from v if only a subset of the edges is allowed.From the polynomials π strat [[win 0 (v)]], for all positions v, we can further derive for each absorptiondominant strategy and each edge, how often the edge can occur in a play consistent with the strategy.
Regarding the complexity, we remark that it is not obvious how to compute π strat [[win 0 (v)]], as depending on the semiring, the fixed-point iteration may be infinite (even if the game is finite).However, it has been shown in [22] that in absorptive, fully-continuous semirings, fixed points of polynomial systems, such as the ones induced by win 0 (v), can be computed using a number of semiring operations (including the infinitary power operation) that is polynomial in the size of the game.
Notice, however, that for π strat [[win 0 (v)]], the number of monomials and hence the cost to compute semiring operations can become exponentially large.This is not avoidable, as the number of (positional) winning strategies can be exponential.More efficient algorithms can be obtained by modifying π strat to track only some of the edges (mapping the rest to 1).The resulting interpretation remains edge-tracking, so the Sum-of-Strategies Theorem still applies and we can see which sets of tracked edges (if any) are required for a winning strategy.Even then, some of the questions in Corollary 26 can also be solved by direct methods which may be more efficient.Thus, the main benefit of semiring semantics in S ∞ [X] does not lie in a more efficient method to compute some specific winning strategy, but rather in providing a general and compact description of all important strategies at once, from which we can directly derive the answers to many different questions concerning the strategy analysis of a Büchi game.

Reverse Analysis
Instead of tracking strategies in a fixed game, we may also ask questions such as: assuming Player 1 wins from v, what are minimal modification to G such that instead Player 0 wins?The generality of semiring semantics enables us to answer such questions by choosing appropriate semirings and interpretations.
More precisely, let G = (V,V 0 ,V 1 , E, F) be a Büchi game and v ∈ G a position from which Player 1 wins.Let E − ⊆ E and E + ⊆ V 2 \ E be sets of edges we are allowed to delete or add, respectively.We call a set of edges in E ± := E − ∪ E + a repair if Player 0 wins when these edges are deleted or added.Our goal is to determine all (preferably minimal) repairs.We achieve this by evaluating win 0 (v) in a modified polynomial semiring, similar to the computation of repairs for database queries in [27], except that here we need absorptive polynomials to deal with fixed points.
Dual-Indeterminates. To track negative information, such as the absence of an edge, we follow the approach in [15,27,9] and extend our semiring by dual-indeterminates X = {x | x ∈ X}.The idea is to label a literal and its negation by corresponding indeterminates x and x.We must then avoid monomials such as xx, as they represent contradictory information.To this end, we consider the quotient of S ∞ [X ∪ X] with respect to the congruence generated by x • x = 0 for x ∈ X and refer to the resulting quotient semiring as dual-indeterminate absorptive polynomials S ∞ [X, X].This semiring inherits most of the properties of S ∞ [X].Most importantly, any assignment h : X ∪ X that respects dual-indeterminates, i.e., h(x) • h(x) = 0, lifts to a fully-continuous homomorphism analogous to Theorem 17.
We then replace π strat with an S Proposition 27.In the above setting, the following holds: Before proving Proposition 27, we illustrate the computation of minimal repairs in a small example.
Example 28.In the following game, Player 1 wins from v. We are interested in the minimal repairs with Evaluating win 0 (v) in the S ∞ [X, X]-interpretation π ± rep described above results in two monomials.The first yields the repair {a, c}, the second yields the minimal repair {a} (notice that X b / ∈ X ± , as edge b is already present).The reason why we get two monomials is that we track also positive usage of edge b by X b , but are only interested in the negative indeterminate X b for the repairs.
Proof of Proposition 27.We prove both statements by considering homomorphisms into the Boolean semiring B. For the first statement, let m ∈ π ± rep [[win 0 (v)]] be a monomial and let h : X ∪ X → B be the unique function that respects dual-indeterminates and satisfies • h(x) = 1, for all x ∈ var(m) • h(X e ) = 0, if X e , X e / ∈ var(m) and e ∈ E + (do not add e without reason), • h(X e ) = 1, if X e , X e / ∈ var(m) and e ∈ E − (do not remove e without reason).
Then, h lifts to a fully-continuous semiring homomorphism h rep is a Boolean interpretation which corresponds to a Boolean model G .Since semiring semantics are preserved by fully-continuous homomorphisms, we have h . By the choice of h, the model G is equal to G except that we add all edges e ∈ X + with X e ∈ var(m), and remove all e ∈ X − with X e ∈ var(m).Hence G results from G by adding or deleting the edges E(var(m) ∩ X ± ), and since G |= win 0 (v), this set is a repair as claimed.
For the second statement, let R ⊆ E ± be a repair and consider the repaired game G |= win 0 (v).As G differs from G only by edges in E ± , there is a unique assignment h : X ∪ X → B such that h • π ± rep corresponds to G .Again, h lifts to a fully-continuous homomorphisms and we thus get Consider the set var(m) ∩ X ± .If X e ∈ var(m) ∩ X ± , then h(X e ) = 1 and hence e ∈ R by construction of h.Further, X e ∈ var(m) ∩ X ± implies h(X e ) = 1 and thus again e ∈ R by construction of h.This proves E(var(m) ∩ X ± ) ⊆ R. If R is minimal, we have equality: otherwise E(var(m) ∩ X ± ) would be a smaller repair by the first statement, contradicting minimality.
We remark that these results ignore the exponents of the monomials, so we could drop exponents from S ∞ [X, X] and work in the resulting, simpler semiring PosBool[X, X] (but again, the number of minimal repairs can be exponential in the size of the game).Further, the reverse analysis approach is not limited to questions about edges.We can also work with interpretations that track the target set F and thus answer questions such as how to choose or modify the target set so that Player 0 wins?

Conclusion
Based on a recent line of research on semiring provenance analysis that lead from database theory to semiring semantics for LFP, we reported here on a case study that puts semiring semantics to use for a strategy analysis in Büchi games.The choice of Büchi games has been motivated on one side by their relevance for applications in the synthesis and verification of reactive systems, on the other side because they provide one of the simplest non-trivial cases of infinite games for which the definability of winning positions requires an alternation between least and greatest fixed points -and can thus not be treated by simpler classes of semirings such as the ω-continuous ones used for Datalog and reachability games.
The aim of the case study was to illustrate how semiring semantics can be applied to more complex games, featuring infinite plays and complicated winning conditions, and what kind of insights it provides (or fails to provide) about the winning strategies in the game.This is captured in the central Sum-of-Strategies Theorem and its applications.This non-trivial result can be seen as a simpler version of the general Sum-of-Strategies characterization in terms of model-checking games in [9] and it essentially identifies the value of the statement that Player 0 wins with the sum of the valuations of all (absorptiondominant) winning strategies.While this applies to the class of all absorptive, fully-continuous semirings, the most important semirings for our analysis are generalized absorptive polynomials S ∞ [X].Due to their universal property, these provide the most general information, allowing us to read off the edge profiles of all absorption-dominant strategies.
With this information, we can count positional strategies, we can determine whether a particular move is needed (once or even infinitely often) for winning the game, and we can compute minimal "repairs" for a game.The method of semiring valuations is rather flexible; we can use different semirings than S ∞ [X], and we can tailor the set of moves that we track to make the resulting polynomial smaller and its computation more efficient.We remark that, of course, there are also limitations to this method and not all relevant questions about strategies can be answered directly by semiring valuations.As an example we show in the full version of this paper [14] that minimal cost computations provide serious obstacles to a semiring treatment.
The Sum-of-Strategies result motivates the general notion of absorption-dominant strategies which captures strategies that are minimal with respect to the multiplicities of the edges they use.To understand these strategies, we discussed how they relate to other classes of simple strategies, namely to positional and persistent strategies, and we have shown that these form a strict hierarchy.
Finally, we remark that although Büchi games have been chosen as the topic of our case study, the method of semiring valuations in absorptive semirings is not confined to this case.In principle, it can be applied to different formulae and generalizes in particular to other games such as parity games, as long as the winning positions are definable in fixed-point logic.The win-formula for parity games is more complicated, and is parametrised by the number of priorities, and so the Sum-of-Strategies Theorem requires different technical details, but can be established along the same lines.
Rectangular nodes belong to Player 1, round nodes to Player 0, dashed nodes are in F. Depiction of an infinite strategy tree of a winning strategy for Player 0 from position v.

Figure 1 :Example 3 .
Figure 1: Running example of a Büchi game and a winning strategy.

Definition 4 .Example 5 .
Given an edge e = vw ∈ E in a Büchi game G and a strategy S in G, we denote by # e (S) = |{ρv ∈ S | ρv → ρvw is an edge in S}| ∈ N ∪ {∞} the number of times (possibly infinite) the edge e occurs in S. With each strategy S we associate its edge profile, the vector # E (S) = (# e (S)) e∈E .Consider the following Büchi game:

Figure 2 :
Figure 2: Venn diagram depicting the relation of various classes of winning strategies.

Example 20 .
Recall the simple game from Example 5

Proposition 24 .
Let S ∈ WinStrat G (v) be absorption-dominant from v, and let e = uw ∈ E be an edge with # e (S) = ∞.Then there is a unique positional strategy S w ∈ WinStrat G (w) such that π strat [[S w ]] π strat [[S]].Moreover, S admits a play in which e occurs infinitely often if, and only if, e occurs in S w .Example 25.Consider the strategy S in Figure 1b with π strat [[S]] = abce f hg ∞ k ∞ m ∞ and the edge k from u to w.Since edge n does not occur in π strat [[S]], the only winning strategy S w from w we need to consider is the strategy that always stays at w, with π strat [[S w ]] = m ∞ π strat [[S]].As k does not occur in S w , we conclude that it occurs only finitely often (and hence at most once) in each play consistent with S.
all other literals are mapped to 0 or 1 according to G. Notice that π ± rep is not model-defining, but still satisfiesπ ± rep (L) • π ± rep (¬L) = 0 for all literals L.Back and Forth between Monomials and Models.LetX ± = {X e | e ∈ E + } ∪ {X e | e ∈ E − }.Given Y ⊆ X ± ,we further write E(Y ) = {e | X e ∈ Y or X e ∈ Y } for the set of edges mentioned in Y .We denote the set of all (dual-)indeterminates occurring in a monomial m by var(m) = {x ∈ X ∪ X | m(x) > 0}.By examining what combination of indeterminates from X ± occur in the monomials of π ± rep [[win 0 (v)]], we can read off all minimal repairs as follows.