24 #include <unordered_map>
29 #include <spot/misc/optionmap.hh>
30 #include <spot/twa/twagraph.hh>
31 #include <spot/twaalgos/parity.hh>
50 bool first_player =
false,
51 bool complete0 =
true);
107 bool solve_globally =
false);
159 SPOT_DEPRECATED(
"use print_pg() instead")
170 int player0_color = 5,
171 int player1_color = 4);
224 std::vector<std::
string>
Abstract class for states.
Definition: twa.hh:49
void set_state_winner(twa_graph_ptr &arena, unsigned state, bool winner)
Set the winner of a state.
bool get_state_winner(const const_twa_graph_ptr &arena, unsigned state)
Get the winner of a state.
std::vector< bool > region_t
Winning region: false = player 0 (env), true = player 1.
Definition: game.hh:57
const region_t & get_state_players(const const_twa_graph_ptr &arena)
Get the owner of all states.
const strategy_t & get_strategy(const const_twa_graph_ptr &arena)
Get or set the strategy.
std::ostream & print_pg(std::ostream &os, const const_twa_graph_ptr &arena)
Print a parity game using PG-solver syntax.
bool solve_parity_game(const twa_graph_ptr &arena, bool solve_globally=false)
Solve a parity game.
void pg_print(std::ostream &os, const const_twa_graph_ptr &arena)
Print a parity game using PG-solver syntax.
void set_strategy(twa_graph_ptr &arena, const strategy_t &strat)
Get or set the strategy.
std::vector< unsigned > strategy_t
Strategy: maps each state index to the chosen global edge number.
Definition: game.hh:61
void set_state_winners(twa_graph_ptr &arena, const region_t &winners)
Set the winner for all the states.
bool solve_safety_game(const twa_graph_ptr &game)
Solve a safety game.
bdd get_synthesis_outputs(const const_twa_graph_ptr &arena)
Get all synthesis outputs as a conjunction.
bool solve_game(const twa_graph_ptr &arena)
Generic interface for game solving.
twa_graph_ptr highlight_strategy(twa_graph_ptr &arena, int player0_color=5, int player1_color=4)
Highlight the edges of a strategy on an automaton.
const region_t & get_state_winners(const const_twa_graph_ptr &arena)
Get the winner of all states.
void set_synthesis_outputs(const twa_graph_ptr &arena, const bdd &outs)
Set all synthesis outputs as a conjunction.
bool get_state_player(const const_twa_graph_ptr &arena, unsigned state)
Get the owner of a state.
void set_state_player(twa_graph_ptr &arena, unsigned state, bool owner)
Set the owner of a state.
void alternate_players(spot::twa_graph_ptr &arena, bool first_player=false, bool complete0=true)
Transform an automaton into a parity game by propagating players.
void set_state_players(twa_graph_ptr &arena, const region_t &owners)
Set the owner for all the states.
std::shared_ptr< twa_graph > twa_graph_ptr
Shared pointer to a mutable twa_graph.
Definition: fwd.hh:44
std::shared_ptr< const twa_graph > const_twa_graph_ptr
Shared pointer to a const twa_graph.
Definition: fwd.hh:38
Definition: automata.hh:26
std::vector< std::string > get_synthesis_output_aps(const const_twa_graph_ptr &arena)
Get the vector with the names of the output propositions.