mCRL2
|
#include <lpsparunfoldlib.h>
Public Member Functions | |
unfold_data_manager (std::map< mcrl2::data::sort_expression, unfold_cache_element > &cache, data::data_specification &dataspec, bool possibly_inconsistent) | |
const data::data_specification & | dataspec () const |
void | add_used_identifier (const core::identifier_string &id) |
void | add_used_identifiers (const std::set< core::identifier_string > &ids) |
data::set_identifier_generator & | id_gen () |
unfold_cache_element & | get_cache_element (const data::sort_expression &sort) |
bool | is_cached (const data::sort_expression &sort) const |
bool | is_constructor (const data::function_symbol &f) const |
const std::vector< data::function_symbol > & | get_constructors (const data::sort_expression &sort) |
data::data_expression | create_cases (const data::data_expression &target, const data::data_expression_vector &rhss) |
const data::function_symbol_vector & | get_projection_funcs (const data::function_symbol &f) |
mcrl2::data::basic_sort | generate_fresh_basic_sort (const data::sort_expression &sort) |
Generates a fresh basic sort given a sort expression. | |
mcrl2::core::identifier_string | generate_fresh_function_symbol_name (const std::string &str) |
Generates a fresh name for a constructor or mapping. | |
mcrl2::data::variable | generate_fresh_variable (std::string str, const data::sort_expression &sort) |
Generates variable of type sort based on a given string str. | |
void | create_determine_function (const data::sort_expression &sort) |
Creates the determine function. | |
void | create_projection_functions (const data::sort_expression &sort) |
Creates projection functions for the unfolded process parameter. | |
void | determine_affected_constructors (const data::sort_expression &sort) |
Determines the constructors that are affected with the unfold process parameter. | |
void | create_new_constructors (const data::sort_expression &sort) |
Creates a set of constructors for the fresh basic sort. | |
data::function_symbol | create_case_function (const data::sort_expression &det_sort, const data::sort_expression &output_sort) |
Creates the case function with number of arguments determined by the number of affected constructors, the sort of the arguments and result are determined by sort.. | |
void | create_distribution_law_over_case (const data::sort_expression &sort, const data::function_symbol &function_for_distribution, const data::function_symbol case_function) |
Create distribution rules for distribution_functions over case_functions. | |
void | generate_case_function_equations (const data::sort_expression &sort, const data::function_symbol &case_function) |
Create the data equations for case functions. | |
void | generate_determine_function_equations (const data::sort_expression &sort) |
Create the data equations for the determine function. | |
void | generate_projection_function_equations (const data::sort_expression &sort) |
Create the data equations for the projection functions. | |
std::string | filter_illegal_characters (std::string in) const |
Static Public Member Functions | |
static bool | char_filter (char c) |
Private Attributes | |
std::map< mcrl2::data::sort_expression, unfold_cache_element > & | m_cache |
cache for previously unfolded sorts. facilitates reuse of previously introduced sorts and function symbols. | |
data::data_specification & | m_dataspec |
mcrl2::data::set_identifier_generator | m_identifier_generator |
set of identifiers to use during fresh variable generation | |
detail::data_equation_argument_generator | m_data_equation_argument_generator |
generator for arguments in left hand side of data equations | |
mcrl2::data::representative_generator | m_representative_generator |
a generator for default data expressions of a given sort; | |
bool | m_possibly_inconsistent |
Boolean indicating whether rewrite rules may be added that could make the data specification inconsistent. | |
Definition at line 90 of file lpsparunfoldlib.h.
|
inline |
Definition at line 113 of file lpsparunfoldlib.h.
|
inline |
Definition at line 124 of file lpsparunfoldlib.h.
|
inline |
Definition at line 129 of file lpsparunfoldlib.h.
|
inlinestatic |
Definition at line 256 of file lpsparunfoldlib.h.
data::function_symbol mcrl2::lps::detail::unfold_data_manager::create_case_function | ( | const data::sort_expression & | det_sort, |
const data::sort_expression & | output_sort | ||
) |
Creates the case function with number of arguments determined by the number of affected constructors, the sort of the arguments and result are determined by sort..
det_sort | The sort whose constructor is determined in the first argument |
output_sort | The sort of the arguments and return sort of the case function |
Definition at line 142 of file lpsparunfoldlib.cpp.
|
inline |
Definition at line 156 of file lpsparunfoldlib.h.
void mcrl2::lps::detail::unfold_data_manager::create_determine_function | ( | const data::sort_expression & | sort | ) |
Creates the determine function.
sort | The sort on which this function operates |
Definition at line 181 of file lpsparunfoldlib.cpp.
void mcrl2::lps::detail::unfold_data_manager::create_distribution_law_over_case | ( | const data::sort_expression & | sort, |
const data::function_symbol & | function_for_distribution, | ||
const data::function_symbol | case_function | ||
) |
Create distribution rules for distribution_functions over case_functions.
Definition at line 294 of file lpsparunfoldlib.cpp.
void mcrl2::lps::detail::unfold_data_manager::create_new_constructors | ( | const data::sort_expression & | sort | ) |
Creates a set of constructors for the fresh basic sort.
sort | The sort for which to create analogous constructors |
Definition at line 124 of file lpsparunfoldlib.cpp.
void mcrl2::lps::detail::unfold_data_manager::create_projection_functions | ( | const data::sort_expression & | sort | ) |
Creates projection functions for the unfolded process parameter.
sort | The sort on which these functions operate |
Definition at line 196 of file lpsparunfoldlib.cpp.
|
inline |
Definition at line 122 of file lpsparunfoldlib.h.
void mcrl2::lps::detail::unfold_data_manager::determine_affected_constructors | ( | const data::sort_expression & | sort | ) |
Determines the constructors that are affected with the unfold process parameter.
sort | The sort for which to find constructors |
Definition at line 105 of file lpsparunfoldlib.cpp.
|
inline |
Definition at line 267 of file lpsparunfoldlib.h.
void mcrl2::lps::detail::unfold_data_manager::generate_case_function_equations | ( | const data::sort_expression & | sort, |
const data::function_symbol & | case_function | ||
) |
Create the data equations for case functions.
Definition at line 338 of file lpsparunfoldlib.cpp.
void mcrl2::lps::detail::unfold_data_manager::generate_determine_function_equations | ( | const data::sort_expression & | sort | ) |
Create the data equations for the determine function.
Definition at line 423 of file lpsparunfoldlib.cpp.
data::basic_sort mcrl2::lps::detail::unfold_data_manager::generate_fresh_basic_sort | ( | const data::sort_expression & | sort | ) |
Generates a fresh basic sort given a sort expression.
sort | This sort's name will be used to derive a name for the new sort |
Definition at line 74 of file lpsparunfoldlib.cpp.
core::identifier_string mcrl2::lps::detail::unfold_data_manager::generate_fresh_function_symbol_name | ( | const std::string & | str | ) |
Generates a fresh name for a constructor or mapping.
str | a string value. The value is used to generate a fresh name for a constructor or mapping. |
Definition at line 92 of file lpsparunfoldlib.cpp.
data::variable mcrl2::lps::detail::unfold_data_manager::generate_fresh_variable | ( | std::string | str, |
const data::sort_expression & | sort | ||
) |
Generates variable of type sort based on a given string str.
str | a string value. The value is used to generate a fresh variable name. |
sort | The sort of the variable to generate. |
Definition at line 100 of file lpsparunfoldlib.cpp.
void mcrl2::lps::detail::unfold_data_manager::generate_projection_function_equations | ( | const data::sort_expression & | sort | ) |
Create the data equations for the projection functions.
Definition at line 229 of file lpsparunfoldlib.cpp.
unfold_cache_element & mcrl2::lps::detail::unfold_data_manager::get_cache_element | ( | const data::sort_expression & | sort | ) |
Definition at line 35 of file lpsparunfoldlib.cpp.
|
inline |
Definition at line 151 of file lpsparunfoldlib.h.
|
inline |
Definition at line 171 of file lpsparunfoldlib.h.
|
inline |
Definition at line 134 of file lpsparunfoldlib.h.
|
inline |
Definition at line 141 of file lpsparunfoldlib.h.
|
inline |
Definition at line 146 of file lpsparunfoldlib.h.
|
private |
cache for previously unfolded sorts. facilitates reuse of previously introduced sorts and function symbols.
Definition at line 95 of file lpsparunfoldlib.h.
|
private |
generator for arguments in left hand side of data equations
Definition at line 103 of file lpsparunfoldlib.h.
|
private |
Definition at line 97 of file lpsparunfoldlib.h.
|
private |
set of identifiers to use during fresh variable generation
Definition at line 100 of file lpsparunfoldlib.h.
|
private |
Boolean indicating whether rewrite rules may be added that could make the data specification inconsistent.
Definition at line 110 of file lpsparunfoldlib.h.
|
private |
a generator for default data expressions of a given sort;
Definition at line 106 of file lpsparunfoldlib.h.