12#ifndef MCRL2_DATA_REPRESENTATIVE_GENERATOR_H
13#define MCRL2_DATA_REPRESENTATIVE_GENERATOR_H
70 assert(sort==representative.
sort());
83 std::set < sort_expression >& visited_sorts,
95 arguments.push_back(representative);
111 const std::vector<function_symbol>& function_symbols)
113 bool function_symbol_found=
false;
118 if (function_symbol_found)
120 if (
static_cast<const std::string&
>(f.name())<
static_cast<const std::string&
>(f_result.
name()))
128 function_symbol_found=
true;
132 return function_symbol_found;
143 std::set < sort_expression >& visited_sorts,
146 if (visited_sorts.count(sort)>0)
157 assert(i->second.sort()==sort);
167 const function_sort& fs=atermpp::down_cast<function_sort>(sort);
187 std::size_t variable_index=0;
190 bound_variables.emplace_back(
"x" + std::to_string(variable_index), s);
210 visited_sorts.insert(sort);
224 visited_sorts.erase(sort);
236 visited_sorts.erase(sort);
247 visited_sorts.erase(sort);
252 visited_sorts.erase(sort);
279 std::set<sort_expression> visited_sorts;
An abstraction expression.
An application of a data expression to a number of arguments.
sort_expression sort() const
Returns the sort of the data expression.
const function_symbol_vector & constructors() const
Gets all constructors including those that are system defined.
const function_symbol_vector & mappings() const
Gets all mappings in this specification including those that are system defined.
const sort_expression & codomain() const
const sort_expression_list & domain() const
const core::identifier_string & name() const
const sort_expression & sort() const
\brief Binder for lambda abstraction
Components for generating an arbitrary element of a sort.
bool find_representative(const function_symbol &symbol, std::set< sort_expression > &visited_sorts, data_expression &result)
Finds a representative of the form f(t1,...,tn) where f is the function symbol.
std::map< sort_expression, data_expression > m_representatives_cache
Serves as a cache for later find operations.
const data_specification & m_specification
Data specification context.
bool search_for_lexicographically_minimal_symbol(function_symbol &f_result, const sort_expression &sort, const std::vector< function_symbol > &function_symbols)
bool find_representative(const sort_expression &sort, std::set< sort_expression > &visited_sorts, data_expression &result)
Finds a representative element for an arbitrary sort expression.
data_expression operator()(const sort_expression &sort)
Returns a representative of a sort.
representative_generator(const data_specification &specification)
Constructor with data specification as context.
void set_representative(const sort_expression &sort, const data_expression &representative)
Sets a data expression as representative of the sort.
Standard exception class for reporting runtime errors.
The class data_specification.
std::vector< variable > variable_vector
\brief vector of variables
std::vector< data_expression > data_expression_vector
\brief vector of data_expressions
std::string pp(const abstraction &x)
atermpp::term_list< variable > variable_list
\brief list of variables
bool is_function_sort(const atermpp::aterm &x)
Returns true if the term t is a function sort.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...