13#ifndef MCRL2_DATA_SORT_SPECIFICATION_H
14#define MCRL2_DATA_SORT_SPECIFICATION_H
28 template <
typename Container,
typename T >
30 void remove(Container& container,
const T& t)
32 typename Container::iterator i = std::find(container.begin(), container.end(), t);
33 if(i != container.end())
42class sort_specification;
43sort_expression
normalize_sorts(
const sort_expression& x,
const data::sort_specification& sortspec);
99 for(
const alias& a: aliases)
146 template <
typename Container>
149 for(
typename Container::const_iterator i=c.begin(); i!=c.end(); ++i)
180 const std::set<sort_expression>&
sorts()
const
292 template <
class CONTAINER>
321 std::set<sort_expression> sorts_already_seen,
322 const bool toplevel=
true)
const;
const basic_sort & name() const
const sort_expression & reference() const
std::map< sort_expression, sort_expression > m_normalised_aliases
Table containing how sorts should be mapped to normalised sorts.
const std::set< sort_expression > & context_sorts() const
Return the user defined context sorts of the current specification.
void remove_sort(const sort_expression &s)
Removes sort from the user defined sorts in the specification. Note that this does not remove aliases...
void add_system_defined_sort(const sort_expression &s)
Adds a sort to this specification, and marks it as system defined.
basic_sort_vector m_user_defined_sorts
The basic sorts and structured sorts in the specification.
bool operator==(const sort_specification &other) const
std::set< sort_expression > m_sorts_in_context
The sorts that occur are needed in this sort specification but are not explicitly defined as user def...
const std::map< sort_expression, sort_expression > & sort_alias_map() const
Gets a normalisation mapping that maps each sort to its unique normalised sort.
const std::set< sort_expression > & sorts() const
Gets the normalised sort declarations including those that are system defined. This is the set with a...
void add_context_sorts(const Container &c, typename atermpp::enable_if_container< Container >::type *=nullptr)
Adds the sorts in c to the context sorts.
const basic_sort_vector & user_defined_sorts() const
Gets all sorts defined by a user (excluding the system defined sorts).
bool m_normalised_data_is_up_to_date
The variable below indicates whether a surrounding data specification is up to data with respect to s...
alias_vector m_user_defined_aliases
The basic sorts and structured sorts in the specification.
void add_predefined_basic_sorts()
sort_specification()
Default constructor.
void sorts_are_not_necessarily_normalised_anymore() const
void data_is_not_necessarily_normalised_anymore() const
void add_alias(const alias &a)
Adds an alias (new name for a sort) to this specification.
void add_sort(const basic_sort &s)
Adds a sort to this specification.
void reconstruct_m_normalised_aliases() const
sort_specification(const basic_sort_vector &sorts, const alias_vector &aliases)
std::set< sort_expression > m_normalised_sorts
Set containing all the sorts, including the system defined ones.
void remove_alias(const alias &a)
Removes a user defined //alias from specification.
void add_context_sort(const sort_expression &s)
Adds the sort s to the context sorts.
void normalise_sort_specification_if_required() const
void check_for_alias_loop(const sort_expression &s, std::set< sort_expression > sorts_already_seen, const bool toplevel=true) const
void import_system_defined_sorts(const CONTAINER &sorts)
const alias_vector & user_defined_aliases() const
Gets the user defined aliases.
bool m_normalised_sorts_are_up_to_date
This boolean indicates whether the variables m_normalised_constructors, m_mappings,...
void import_system_defined_sort(const sort_expression &sort)
Adds the system defined sorts in a sequence. The second argument is used to check which sorts are add...
std::vector< alias > alias_vector
\brief vector of aliass
data_expression normalize_sorts(const data_expression &x, const data::sort_specification &sortspec)
std::vector< basic_sort > basic_sort_vector
vector of basic sorts
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
The class structured_sort.