|
mCRL2
|
#include <parity_game_output.h>
Public Member Functions | |
| parity_game_output (pbes &p, bool min_parity_game=true) | |
| std::string | python_graph () |
| Returns a representation of the parity game in python format. This code is used as input for a python parity game solver. | |
| std::string | pgsolver_graph () |
| Returns a representation of the parity game in Alpaga format. | |
| void | run () |
| Generates the parity game graph. | |
Public Member Functions inherited from mcrl2::pbes_system::parity_game_generator | |
| parity_game_generator (pbes &p, bool true_false_dependencies=false, bool is_min_parity=true, data::rewriter::strategy rewrite_strategy=data::rewrite_strategy::jitty) | |
| Constructor. | |
| virtual | ~parity_game_generator ()=default |
| virtual propositional_variable_instantiation | get_initial_state () |
| Returns the (rewritten) initial state. | |
| virtual operation_type | get_operation (std::size_t index) |
| Returns the vertex type. | |
| virtual operation_type | get_expression_operation (const pbes_expression &phi) |
| Returns the vertex type. | |
| virtual std::size_t | get_priority (std::size_t index) |
| Returns the priority of a vertex. The priority of the first equation is 0 if it is a maximal fixpoint, and 1 if it is a minimal fixpoint. | |
| virtual std::set< std::size_t > | get_initial_values () |
| Returns the vertices for which a solution is requested. By default a set containing the values 0, 1 and 2 is returned, corresponding to the expressions true, false and the initial state of the PBES. | |
| virtual std::set< std::size_t > | get_dependencies (std::size_t index) |
| Returns the successors of a vertex in the graph. | |
| virtual void | print_variable_mapping () |
| Prints the mapping from BES variables to the corresponding PBES expressions. | |
Protected Member Functions | |
| std::string | vertex (std::size_t i) const |
| Returns the quoted name of the vertex, for example "X1". | |
| std::string | edge (std::pair< std::size_t, std::size_t > e) const |
| Returns a tuple representing an edge, for example ("X1", "X2") | |
| std::string | priority (std::pair< std::size_t, std::size_t > p) const |
| Returns a string representing a priority, for example "X1":0. | |
| template<typename Container , typename Function > | |
| std::vector< std::string > | apply (const Container &c, const Function &f) const |
| Applies a function to the elements of a container. | |
| template<typename Container > | |
| std::string | join (const Container &c, const std::string &sep) const |
| Prints the elements of a container with a separator between them. | |
| std::string | python_set (const std::vector< std::string > &elements) const |
| Wraps a sequence of strings in a Python set. | |
| void | print_set (const std::string &name, const std::set< std::size_t > &todo) const |
| Prints the todo list. | |
Protected Member Functions inherited from mcrl2::pbes_system::parity_game_generator | |
| std::size_t | add_bes_equation (pbes_expression t, std::size_t priority) |
| Adds a BES equation for a given PBES expression, if it not already exists. | |
| void | make_substitution (const data::variable_list &v, const data::data_expression_list &e, substitution_function &sigma) const |
| Generates a substitution function for the pbesinst rewriter. | |
| pbes_expression | expand_rhs (const pbes_expression &psi) |
| void | compute_equation_index_map () |
| Compute equation index map. | |
| void | compute_priorities (const std::vector< pbes_equation > &equations) |
| Compute priorities of PBES propositional variables. | |
| virtual std::string | print_bes_equation (std::size_t index, const std::set< std::size_t > &rhs) |
| std::string | print_equation_count (std::size_t size, std::size_t step=1000) const |
| Prints a log message for every step-th equation. | |
| virtual void | initialize_generation () |
Protected Attributes | |
| std::set< std::size_t > | V |
| The vertices of the parity game graph. | |
| std::set< std::pair< std::size_t, std::size_t > > | E |
| The edges of the parity game graph. | |
| std::map< std::size_t, std::size_t > | priorities |
| The vertex priorities of the parity game graph. | |
| std::set< std::size_t > | even_vertices |
| The even vertices of the parity game graph. | |
| std::set< std::size_t > | odd_vertices |
| The odd vertices of the parity game graph. | |
Protected Attributes inherited from mcrl2::pbes_system::parity_game_generator | |
| bool | m_initialized = false |
| Mark whether initialization has been initialized. Needed to properly cope with virtual inheritance! | |
| pbes & | m_pbes |
| The PBES that is being solved. | |
| data::rewriter | datar |
| Data rewriter. | |
| pbes_system::enumerate_quantifiers_rewriter | R |
| PBES rewriter. | |
| std::map< core::identifier_string, std::vector< pbes_equation >::const_iterator > | m_pbes_equation_index |
| Maps propositional variables to corresponding PBES equations. | |
| std::map< core::identifier_string, std::size_t > | m_priorities |
| Maps propositional variables to corresponding priorities. | |
| std::map< pbes_expression, std::size_t > | m_pbes_expression_index |
| Maps PBES closed expressions to corresponding BES variables. | |
| std::vector< std::pair< pbes_expression, std::size_t > > | m_bes |
| Contains intermediate results of the BES that is being generated. m_bes[i] represents a BES equation corresponding to BES variable i. m_bes[i].first is the right hand side of the BES equation m_bes[i].second is the block nesting depth of the corresponding PBES variable. | |
| bool | m_true_false_dependencies |
| Determines what kind of BES equations are generated for true and false. | |
| bool | m_is_min_parity_game |
| True if it is a min-parity game. | |
| std::size_t | m_max_priority = 0 |
| The maximum priority value of the game. | |
Additional Inherited Members | |
Public Types inherited from mcrl2::pbes_system::parity_game_generator | |
| enum class | operation_type { PGAME_OR , PGAME_AND } |
| The operation type of the vertices. More... | |
Protected Types inherited from mcrl2::pbes_system::parity_game_generator | |
| using | substitution_function = data::rewriter::substitution_type |
| Substitution function type used by the PBES rewriter. | |
A class that generates python code for a parity game, such that it can be solved with a parity game solver written in python.
Definition at line 28 of file parity_game_output.h.
|
inlineexplicit |
Definition at line 122 of file parity_game_output.h.
|
inlineprotected |
Applies a function to the elements of a container.
| c | A container |
| f | A function |
Definition at line 75 of file parity_game_output.h.
|
inlineprotected |
Returns a tuple representing an edge, for example ("X1", "X2")
| e | An edge |
Definition at line 57 of file parity_game_output.h.
|
inlineprotected |
Prints the elements of a container with a separator between them.
| c | A container |
| sep | A string |
Definition at line 90 of file parity_game_output.h.
|
inline |
Returns a representation of the parity game in Alpaga format.
Definition at line 154 of file parity_game_output.h.
|
inlineprotected |
Prints the todo list.
| name | A string |
| todo | A todo list |
Definition at line 111 of file parity_game_output.h.
|
inlineprotected |
Returns a string representing a priority, for example "X1":0.
| p | A pair of integers |
Definition at line 65 of file parity_game_output.h.
|
inline |
Returns a representation of the parity game in python format. This code is used as input for a python parity game solver.
Definition at line 141 of file parity_game_output.h.
|
inlineprotected |
Wraps a sequence of strings in a Python set.
| elements | A vector of strings |
Definition at line 103 of file parity_game_output.h.
|
inline |
Generates the parity game graph.
Definition at line 172 of file parity_game_output.h.
|
inlineprotected |
Returns the quoted name of the vertex, for example "X1".
| i | A positive integer |
Definition at line 49 of file parity_game_output.h.
|
protected |
The edges of the parity game graph.
Definition at line 35 of file parity_game_output.h.
|
protected |
The even vertices of the parity game graph.
Definition at line 41 of file parity_game_output.h.
|
protected |
The odd vertices of the parity game graph.
Definition at line 44 of file parity_game_output.h.
|
protected |
The vertex priorities of the parity game graph.
Definition at line 38 of file parity_game_output.h.
|
protected |
The vertices of the parity game graph.
Definition at line 32 of file parity_game_output.h.