11#ifndef MCRL2_PBES_PBES_EXPLORER_H
12#define MCRL2_PBES_PBES_EXPLORER_H
14#define PBES_EXPLORER_VERSION 1
31 template <
typename MapContainer>
32 typename MapContainer::mapped_type
map_at(
const MapContainer& m,
typename MapContainer::key_type key);
99 void add_state(
const std::string& name,
const std::string& type);
104 void add_state_label(
const std::string& name,
const std::string& type);
109 void add_edge_label(
const std::string& name,
const std::string& type);
204 std::map<std::string, propositional_variable>
variables;
249 const std::map<std::string, propositional_variable>&
get_variables()
const;
387 int get_index(
const std::string& signature);
426 static inline std::string
get_param_signature(
const std::string& paramname,
const std::string& paramtype);
488 explorer(
const std::string& filename,
const std::string& rewrite_strategy,
bool reset_flag,
bool always_split_flag);
496 explorer(
const pbes& p_,
const std::string& rewrite_strategy,
bool reset_flag,
bool always_split_flag);
522 int get_index(
int type_no,
const std::string& s);
546 std::string
get_value(
int type_no,
int index);
579 template <
typename callback>
585 std::vector<ltsmin_state> successors = this->
get_successors(state);
587 int* dst = MCRL2_SPECIFIC_STACK_ALLOCATOR(
int, state_length);
588 for (
auto & successor : successors) {
615 template <
typename callback>
621 if (varname==group_varname)
624 std::vector<ltsmin_state> successors = this->
get_successors(state, group);
626 int* dst = MCRL2_SPECIFIC_STACK_ALLOCATOR(
int, state_length);
627 for (
auto & successor : successors) {
static ltsmin_state false_state()
Returns the state representing false.
ltsmin_state get_state(const propositional_variable_instantiation &expr) const
Returns a PBES_State object for expr.
std::vector< std::vector< data_expression > > localmaps_int2data
std::string data_to_string(const data::data_expression &e)
Returns a string representation for the data expression e.
int get_index(int type_no, const std::string &s)
Returns the index of value in the local store for the data type with number type_no....
std::vector< std::string > localmap_int2string
ltsmin_state get_initial_state() const
Returns the initial state.
static ltsmin_state true_state()
Returns the state representing true.
void to_state_vector(const ltsmin_state &dst_state, int *dst, const ltsmin_state &src_state, int *const &src)
Transforms a PBES state to a state vector, represented by an array of integers.
std::string get_value(int type_no, int index)
Returns the value at position index in the local store for the data type with number type_no....
int get_value_index(int type_no, const data_expression &value)
Returns the index of value in the local store for the data type with number type_no....
std::map< std::string, int > localmap_string2int
void next_state_long(int *const &src, int group, callback &cb)
Iterates over the successors of a state for a certain transition group and invokes a callback functio...
parity_game_generator::operation_type operation_type
The expression type of the equation.
std::vector< std::map< data_expression, int > > localmaps_data2int
ltsmin_state from_state_vector(int *const &src)
Transforms a state vector src into a PBES_State object object containing the variable and parameter v...
int get_string_index(const std::string &s)
Returns the index of s in the local store for string values. This store is reserved for the string re...
const std::string & get_string_value(int index)
Returns the string at position index in the local store for string values. An exception is thrown if ...
std::vector< ltsmin_state > get_successors(const ltsmin_state &state)
Computes successor states for a state. Serves as a wrapper around the get_successors function of the ...
data::data_expression string_to_data(const std::string &s)
Returns a data expression for the string representation s.
lts_info * get_info() const
Returns the PBES_Info object.
const data_expression & get_data_value(int type_no, int index)
Returns the value at position index in the local store for the data type with number type_no....
void next_state_all(int *const &src, callback &cb)
Iterates over the successors of a state and invokes a callback function for each successor state.
detail::pbes_greybox_interface * pgg
the PBES greybox interface
void initial_state(int *state)
bool is_write_dependent_propvar(int group)
Determines if group is write dependent on the propositional variable. Returns true if propositional v...
const std::map< std::string, std::map< int, int > > & get_variable_parameter_index_positions() const
Returns the map from variable names to the map from indices of parameter signatures for the variable ...
std::map< std::string, int > variable_priority
const std::map< int, std::vector< bool > > & get_read_matrix() const
Returns the read dependency matrix.
const std::map< int, std::vector< bool > > & get_write_matrix() const
Returns the write dependency matrix.
static std::vector< std::string > get_param_sequence(const data::variable_list ¶ms)
Converts a variable_sequence_type into a sequence of parameter signatures.
bool is_read_dependent_parameter(int group, int part)
Determines if group is read dependent on part part of the state vector. Returns true if the parameter...
std::vector< int > get_param_indices(const data::variable_list ¶ms)
Converts a variable_sequence_type into a sequence of indices of parameter signatures in the list of p...
std::vector< std::string > transition_variable_name
bool is_pass_through_state(const propositional_variable_instantiation &propvar)
Determines if the propositional variable instantiation is one that only copies parameters from the cu...
const std::map< std::string, fixpoint_symbol > & get_variable_symbols() const
Returns the map from variable names to the fixpoint operator of the equation for the variable.
static std::map< variable, std::string > variable_signatures
std::map< std::string, fixpoint_symbol > variable_symbol
const std::map< std::string, data::variable_list > & get_variable_parameters() const
Returns the map from variable names to the sequence of parameters for the variable.
const std::map< std::string, std::vector< std::string > > & get_variable_parameter_signatures() const
Returns the map from variable names to the list of parameters signatures for the variable.
const std::map< std::string, propositional_variable > & get_variables() const
Returns the map from variable names to the variable object for the variable.
int get_index(const std::string &signature)
Returns the index for a parameter signature in the list of parameter signatures for the system.
const lts_type & get_lts_type() const
Returns the LTS Type.
std::map< std::string, int > param_index
bool get_reset_option() const
Returns if the reset option is set.
std::map< std::string, std::vector< std::string > > variable_parameter_signatures
const std::vector< pbes_expression > & get_transition_expressions() const
Returns the map from transition group number to the expression of the transition group.
std::set< std::string > copied(const pbes_expression &expr)
Computes the free variables which are copied/passed through (to a recursive variable) in an expressio...
std::map< int, std::vector< bool > > read_matrix
std::vector< data_expression > param_default_values
detail::pbes_greybox_interface * pgg
bool is_read_dependent_propvar(int group)
Determines if group is read dependent on the propositional variable. Returns true,...
std::vector< pbes_expression > transition_expression
const std::map< int, std::vector< bool > > & get_dependency_matrix() const
Returns the dependency matrix.
const std::vector< operation_type > & get_transition_types() const
Returns the map from transition group number to the type of the right hand side of the equation to wh...
std::set< std::string > used(const pbes_expression &expr)
Computes the free variables actually used, not only passed through, in an expression.
std::map< std::string, std::map< int, int > > variable_parameter_index_positions
static std::string get_param_signature(const variable ¶m)
Returns a signature for parameter param.
const std::map< std::string, operation_type > & get_variable_types() const
Returns the map from variable names to the type of the right hand side of the equation for the variab...
void compute_dependency_matrix()
Computes dependency matrix from PBES.
static bool tf(const pbes_expression &phi)
Determines if the term phi contains a branch that directly results in true or false (not a variable).
std::vector< pbes_expression > split_expression_and_substitute_variables(const pbes_expression &e, int current_priority, operation_type current_type, std::set< std::string > vars_stack)
Splits the expression into parts (disjuncts or conjuncts) and recursively tries to substitute the pro...
std::map< std::string, propositional_variable > variables
int get_number_of_groups() const
Returns the number of transition groups.
static std::set< std::string > get_param_set(const data::variable_list ¶ms)
Converts a variable_sequence_type into a set of parameter signatures.
std::map< int, int > get_param_index_positions(const data::variable_list ¶ms)
Converts a variable_sequence_type into a map from indices of parameter signatures (in the list of par...
static std::set< std::string > occ(const pbes_expression &expr)
Computes the propositional variables used in an expression.
std::map< std::string, operation_type > variable_type
int count_variables(const pbes_expression &e)
Counts the number of propositional variables in an expression.
void compute_lts_type()
Computes LTS Type from PBES.
std::vector< operation_type > transition_type
std::string state_to_string(const ltsmin_state &state)
Returns a string representation for state state.
const std::map< std::string, int > & get_variable_priorities() const
Returns the map from variable names to the priority of the equation for the variable.
parity_game_generator::operation_type operation_type
The variable sequence type.
std::map< std::string, data::variable_list > variable_parameters
const data_expression & get_default_value(int index)
Returns a default value for the sort of a parameter signature.
const std::vector< std::string > & get_transition_variable_names() const
Returns the map from transition group number to the variable name of the equation to which the transi...
std::map< int, std::vector< bool > > matrix
std::set< std::string > reset(const pbes_expression &phi, const std::set< std::string > &d)
Computes the set of parameters reset in the expression.
static std::set< std::string > free(const pbes_expression &expr)
Computes the free variables read in an expression.
std::vector< pbes_expression > transition_expression_plain
std::map< int, std::vector< bool > > write_matrix
bool is_write_dependent_parameter(int group, int part)
Determines if group is read dependent on part part of the state vector. Returns true if the parameter...
std::map< std::string, pbes_expression > variable_expression
std::set< std::string > changed(const pbes_expression &phi)
Computes the set of parameters changed in the expression.
std::map< std::string, std::vector< int > > variable_parameter_indices
void compute_transition_groups()
Computes transition groups from PBES.
const std::map< std::string, std::vector< int > > & get_variable_parameter_indices() const
Returns the map from variable names to the list of indices of the parameters signatures for the varia...
const std::vector< std::string > & get_edge_label_types() const
Returns the sequence of edge label types.
std::size_t get_number_of_state_types() const
Returns the number of state types.
const std::vector< std::string > & get_edge_labels() const
Returns the sequence of edge labels.
int get_state_type_no(int part) const
Returns the state type index for the state part part.
std::vector< std::string > state_type_list
std::vector< std::string > state_label_types
std::vector< std::string > state_names
std::vector< int > state_type_no
void add_state(const std::string &name, const std::string &type)
Adds a state part of type type with name name.
void add_state_label(const std::string &name, const std::string &type)
Adds a state label of type type with name name.
std::string get_state_type_name(int type_no) const
Returns the name of the state type with number type_no.
int get_state_length() const
Returns the state length.
std::map< std::string, int > state_type_index
std::vector< std::string > edge_label_names
const std::vector< std::string > & get_state_label_types() const
Returns the sequence of state label types.
std::vector< std::string > edge_label_types
std::vector< std::string > state_types
std::size_t get_number_of_edge_labels() const
Returns the number of edge labels.
std::vector< std::string > state_label_names
const std::vector< std::string > & get_state_types() const
Returns the sequence of state part types.
void add_edge_label(const std::string &name, const std::string &type)
Adds an edge label of type type with name name.
const std::vector< std::string > & get_state_labels() const
Returns the sequence of state labels.
const std::vector< std::string > & get_state_names() const
Returns the sequence of state part names.
std::size_t get_number_of_state_labels() const
Returns the number of state labels.
void add_parameter_value(const data_expression &)
Adds a parameter value to the list of parameter values.
pbes_expression to_pbes_expression() const
Returns a PBES expression representing the state.
std::vector< data_expression > param_values
std::string state_to_string() const
Returns the player or type of the state (And/Or, Abelard/Eloise, Odd/Even).
bool operator<(const ltsmin_state &other) const
Compares two PBES_State objects. Uses lexicographical ordering on priority, type, variable and parame...
parity_game_generator::operation_type operation_type
bool operator==(const ltsmin_state &other) const
Checks if two PBES_State objects are equal.
std::string get_variable() const
Returns the priority for the state, which depends on the fixpoint operator of the equation of the pro...
const std::vector< data_expression > & get_parameter_values() const
Returns the list of parameter values.
operation_type
The operation type of the vertices.
parameterized boolean equation system
\brief A propositional variable instantiation
MapContainer::mapped_type map_at(const MapContainer &m, typename MapContainer::key_type key)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
The pbes_greybox_interface class provides a wrapper for the parity_game_generator classes,...
Traverser class for Parameterised Parity Games (PPG), PBES expressions of the form: PPG :== /_{i: I} ...