mCRL2
|
#include <pbes_explorer.h>
Public Types | |
typedef parity_game_generator::operation_type | operation_type |
The expression type of the equation. | |
Public Member Functions | |
explorer (const std::string &filename, const std::string &rewrite_strategy, bool reset_flag, bool always_split_flag) | |
Constructor. | |
explorer (const pbes &p_, const std::string &rewrite_strategy, bool reset_flag, bool always_split_flag) | |
Constructor. | |
~explorer () | |
Destructor. | |
lts_info * | get_info () const |
Returns the PBES_Info object. | |
ltsmin_state | get_initial_state () const |
Returns the initial state. | |
void | initial_state (int *state) |
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 . Type 0 is reserved for the string representations of variable names. The value is added to the store if it is not already present. | |
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 representations of variable names. The value is added to the store if it is not already present. | |
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 . Type 0 is reserved for the string representations of variable names. An exception is thrown if the index does not exist in the store. | |
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 the index does not exist in the store. | |
ltsmin_state | from_state_vector (int *const &src) |
Transforms a state vector src into a PBES_State object object containing the variable and parameter values that are represented by the indices in src . | |
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 pbes_greybox_interface. | |
template<typename callback > | |
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. | |
std::vector< ltsmin_state > | get_successors (const ltsmin_state &state, int group) |
Computes successor states for a state as defined in transition group group . Serves as a wrapper around the get_successors function of the pbes_greybox_interface. | |
template<typename callback > | |
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 function for each successor state. | |
Static Public Member Functions | |
static ltsmin_state | true_state () |
Returns the state representing true . | |
static ltsmin_state | false_state () |
Returns the state representing false . | |
Protected Member Functions | |
ltsmin_state | get_state (const propositional_variable_instantiation &expr) const |
Returns a PBES_State object for expr . | |
std::string | data_to_string (const data::data_expression &e) |
Returns a string representation for the data expression e . | |
data::data_expression | string_to_data (const std::string &s) |
Returns a data expression for the string representation s . | |
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 . The value is added to the store if it is not already present. | |
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 . An exception is thrown if the index does not exist in the store. | |
Protected Attributes | |
detail::pbes_greybox_interface * | pgg |
the PBES greybox interface | |
Private Attributes | |
pbes | p |
lts_info * | info |
std::map< std::string, int > | localmap_string2int |
std::vector< std::string > | localmap_int2string |
std::vector< std::map< data_expression, int > > | localmaps_data2int |
std::vector< std::vector< data_expression > > | localmaps_int2data |
Definition at line 433 of file pbes_explorer.h.
The expression type of the equation.
Definition at line 437 of file pbes_explorer.h.
mcrl2::pbes_system::explorer::explorer | ( | const std::string & | filename, |
const std::string & | rewrite_strategy = "jittyc" , |
||
bool | reset_flag = false , |
||
bool | always_split_flag = false |
||
) |
Constructor.
explorer
filename | the name of a PBES file. |
rewrite_strategy | the name of the data rewrite strategy to use. |
reset_flag | if set, irrelevant parts of the state vector will be reset to a default value |
always_split_flag | if set, equations will always be split into conjuncts or disjuncts to form transition groups, if not set (default) the explorer assumes the pbes to be generated with lps2pbes -p and splits accordingly. |
Definition at line 1289 of file pbes_explorer.cpp.
mcrl2::pbes_system::explorer::explorer | ( | const pbes & | p_, |
const std::string & | rewrite_strategy = "jittyc" , |
||
bool | reset_flag = false , |
||
bool | always_split_flag = false |
||
) |
Constructor.
p_ | a PBES. |
rewrite_strategy | String representing the rewrite strategy to use for the data rewriter. |
reset_flag | if set, irrelevant parts of the state vector will be reset to a default value |
always_split_flag | if set, equations will always be split into conjuncts or disjuncts to form transition groups, if not set (default) the explorer assumes the pbes to be generated with lps2pbes -p and splits accordingly. |
Definition at line 1316 of file pbes_explorer.cpp.
mcrl2::pbes_system::explorer::~explorer | ( | ) |
Destructor.
Definition at line 1332 of file pbes_explorer.cpp.
|
protected |
Returns a string representation for the data expression e
.
e | a PBES expression that may be in internal format. |
|
inlinestatic |
Returns the state representing false
.
Definition at line 1379 of file pbes_explorer.cpp.
ltsmin_state mcrl2::pbes_system::explorer::from_state_vector | ( | int *const & | src | ) |
Transforms a state vector src
into a PBES_State object object containing the variable and parameter values that are represented by the indices in src
.
src | an int array containg the indices of the state values. |
src
. Definition at line 1579 of file pbes_explorer.cpp.
|
protected |
Returns the value at position index
in the local store for the data type with number type_no
. An exception is thrown if the index does not exist in the store.
type_no | the number of the value type. |
index | an index. |
index
in local store type_no
. Definition at line 1567 of file pbes_explorer.cpp.
int mcrl2::pbes_system::explorer::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
. Type 0 is reserved for the string representations of variable names. The value is added to the store if it is not already present.
type_no | The number of the value type. |
s | A string representation of the data value. |
value
in local store type_no
. Definition at line 1392 of file pbes_explorer.cpp.
lts_info * mcrl2::pbes_system::explorer::get_info | ( | ) | const |
Returns the PBES_Info object.
Definition at line 1339 of file pbes_explorer.cpp.
ltsmin_state mcrl2::pbes_system::explorer::get_initial_state | ( | ) | const |
Returns the initial state.
Definition at line 1345 of file pbes_explorer.cpp.
|
protected |
Returns a PBES_State object for expr
.
expr | a propositional variable instantiation expression. |
Definition at line 1360 of file pbes_explorer.cpp.
int mcrl2::pbes_system::explorer::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 representations of variable names. The value is added to the store if it is not already present.
s | The string for which the index needs to be retrieved. |
s
in the local store for string values. Definition at line 1406 of file pbes_explorer.cpp.
const std::string & mcrl2::pbes_system::explorer::get_string_value | ( | int | index | ) |
Returns the string at position index
in the local store for string values. An exception is thrown if the index does not exist in the store.
index | an index. |
index
in the local store for string values. Definition at line 1557 of file pbes_explorer.cpp.
std::vector< ltsmin_state > mcrl2::pbes_system::explorer::get_successors | ( | const ltsmin_state & | state | ) |
Computes successor states for a state. Serves as a wrapper around the get_successors function of the pbes_greybox_interface.
state | the source state. |
Definition at line 1625 of file pbes_explorer.cpp.
std::vector< ltsmin_state > mcrl2::pbes_system::explorer::get_successors | ( | const ltsmin_state & | state, |
int | group | ||
) |
Computes successor states for a state as defined in transition group group
. Serves as a wrapper around the get_successors function of the pbes_greybox_interface.
state | the source state. |
group | the group for which the successor states are computed. |
Definition at line 1669 of file pbes_explorer.cpp.
std::string mcrl2::pbes_system::explorer::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
. Type 0 is reserved for the string representations of variable names. An exception is thrown if the index does not exist in the store.
type_no | the number of the value type. |
index | an index. |
index
in local store type_no
. Definition at line 1537 of file pbes_explorer.cpp.
|
protected |
Returns the index of value
in the local store for the data type with number type_no
. The value is added to the store if it is not already present.
type_no | the number of the value type. |
value | the data value. |
value
in local store type_no
. Definition at line 1423 of file pbes_explorer.cpp.
void mcrl2::pbes_system::explorer::initial_state | ( | int * | state | ) |
Definition at line 1352 of file pbes_explorer.cpp.
|
inline |
Iterates over the successors of a state and invokes a callback function for each successor state.
src | an int array containg the indices of the state values. |
cb | a callback function that must provide the function operator() with the following interface: |
where
Definition at line 580 of file pbes_explorer.h.
|
inline |
Iterates over the successors of a state for a certain transition group and invokes a callback function for each successor state.
src | an int array containg the indices of the state values. |
group | the transition group |
cb | a callback function that must provide the function operator() with the following interface: |
where
Definition at line 616 of file pbes_explorer.h.
|
protected |
Returns a data expression for the string representation s
.
s | a string representation of a data expression. |
Definition at line 1385 of file pbes_explorer.cpp.
void mcrl2::pbes_system::explorer::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.
dst_state | the new PBES state object |
dst | the int array to which the state vector is written |
src_state | the source PBES state object, used to check which fields have been changed. |
src | an array which is used for default values, to prevent unused variables for being reset. the non-resetting behaviour can be turned off by the –reset option. |
Definition at line 1442 of file pbes_explorer.cpp.
|
inlinestatic |
Returns the state representing true
.
Definition at line 1373 of file pbes_explorer.cpp.
|
private |
Definition at line 441 of file pbes_explorer.h.
|
private |
Definition at line 443 of file pbes_explorer.h.
|
private |
Definition at line 442 of file pbes_explorer.h.
|
private |
Definition at line 444 of file pbes_explorer.h.
|
private |
Definition at line 445 of file pbes_explorer.h.
|
private |
Definition at line 440 of file pbes_explorer.h.
|
protected |
the PBES greybox interface
Definition at line 479 of file pbes_explorer.h.