12#ifndef MCRL2_DATA_DETAIL_IO_H
13#define MCRL2_DATA_DETAIL_IO_H
15#include "mcrl2/atermpp/algorithm.h"
16#include "mcrl2/atermpp/aterm_io.h"
18#include "mcrl2/data/index_traits.h"
25 if (x.function() == core::detail::function_symbol_OpId())
27 return atermpp::aterm(core::detail::function_symbol_OpIdNoIndex(), x.begin(), --x.end());
35 if (x.function() == core::detail::function_symbol_OpIdNoIndex())
A unordered_map class in which aterms can be stored.
basic_sort(const atermpp::aterm &term)
const container_type & container_name() const
const sort_expression & element_sort() const
container_sort(const atermpp::aterm &term)
data_specification(const basic_sort_vector &sorts, const alias_vector &aliases, const function_symbol_vector &constructors, const function_symbol_vector &user_defined_mappings, const data_equation_vector &user_defined_equations)
Constructor from its members.
bool is_well_typed() const
Returns true if.
bool is_certainly_finite(const sort_expression &s) const
Checks whether a sort is certainly finite.
bool is_finite(const container_sort &s)
bool is_finite(const basic_sort &s)
bool is_finite_aux(const sort_expression &s)
bool is_finite(const sort_expression &s)
std::set< sort_expression > m_visiting
bool is_finite(const alias &)
bool is_finite(const function_sort &s)
const data_specification & m_specification
finiteness_helper(const data_specification &specification)
bool is_finite(const structured_sort &s)
\brief Container type for finite sets
fset_container()
\brief Default constructor X3.
const sort_expression & codomain() const
function_sort(const atermpp::aterm &term)
const sort_expression_list & domain() const
function_symbol(const core::identifier_string &name, const sort_expression &sort)
Constructor.
const core::identifier_string & name() const
const sort_expression & sort() const
\brief Container type for sets
set_container()
\brief Default constructor X3.
sort_expression & operator=(const sort_expression &) noexcept=default
sort_expression(const sort_expression &) noexcept=default
Move semantics.
void add_system_defined_sort(const sort_expression &s)
Adds a sort to this specification, and marks it as system defined.
void add_predefined_basic_sorts()
void sorts_are_not_necessarily_normalised_anymore() const
void reconstruct_m_normalised_aliases() const
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...
structured_sort(const atermpp::aterm &term)
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
aterm identity(const aterm &x)
The default transformer that maps each term to itself.
std::string file_source(const std::string &filename)
atermpp::aterm load_aterm(std::istream &stream, bool binary=true, const std::string &format="aterm", const std::string &source="", atermpp::aterm_transformer transformer=atermpp::identity)
Attempts to read an aterm from a stream.
bool check_variable_sorts(const VariableContainer &variables, const SortContainer &sorts)
Returns true if the domain sorts and the range sort of the given variables are contained in sorts.
atermpp::aterm add_index(const atermpp::aterm &x)
bool check_variable_names(variable_list const &variables, const std::set< core::identifier_string > &names)
Returns true if names of the given variables are not contained in names.
atermpp::aterm remove_index(const atermpp::aterm &x)
atermpp::aterm remove_index_impl(const atermpp::aterm &x)
bool check_assignment_variables(assignment_list const &assignments, variable_list const &variables)
Returns true if the left hand sides of assignments are contained in variables.
bool check_sort(const sort_expression &s, const SortContainer &sorts)
Returns true if the domain sorts and the codomain sort of the given sort s are contained in sorts.
bool check_data_spec_sorts(const Container &container, const SortContainer &sorts)
Returns true if the domain sorts and range sort of the given functions are contained in sorts.
data::sort_expression_list parameter_sorts(const Container ¶meters)
Returns the sorts of a sequence of parameters.
atermpp::aterm add_index_impl(const atermpp::aterm &x)
bool check_sorts(Iterator first, Iterator last, const SortContainer &sorts)
Returns true if the domain sorts and the range sort of the sorts in the sequence [first,...
bool unique_names(const VariableContainer &variables)
Returns true if the names of the given variables are unique.
Namespace for system defined sort bag.
bool is_bag(const sort_expression &e)
Recogniser for sort expression Bag(s)
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
Namespace for system defined sort fbag.
container_sort fbag(const sort_expression &s)
Constructor for sort expression FBag(S)
bool is_fbag(const sort_expression &e)
Recogniser for sort expression FBag(s)
Namespace for system defined sort fset.
bool is_fset(const sort_expression &e)
Recogniser for sort expression FSet(s)
container_sort fset(const sort_expression &s)
Constructor for sort expression FSet(S)
Namespace for system defined sort int_.
const basic_sort & int_()
Constructor for sort expression Int.
Namespace for system defined sort list.
bool is_list(const sort_expression &e)
Recogniser for sort expression List(s)
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
const basic_sort & natpair()
Constructor for sort expression @NatPair.
Namespace for system defined sort pos.
const basic_sort & pos()
Constructor for sort expression Pos.
Namespace for system defined sort real_.
const basic_sort & real_()
Constructor for sort expression Real.
Namespace for system defined sort set_.
bool is_set(const sort_expression &e)
Recogniser for sort expression Set(s)
container_sort set_(const sort_expression &s)
Constructor for sort expression Set(S)
bool is_structured_sort(const atermpp::aterm &x)
Returns true if the term t is a structured sort.
static sort_expression find_normal_form(const sort_expression &e, const std::multimap< sort_expression, sort_expression > &map1, std::set< sort_expression > sorts_already_seen=std::set< sort_expression >())
bool is_untyped_possible_sorts(const atermpp::aterm &x)
Returns true if the term t is an expression for multiple possible sorts.
bool is_untyped_sort(const atermpp::aterm &x)
Returns true if the term t is the unknown sort.
bool is_container_sort(const atermpp::aterm &x)
Returns true if the term t is a container sort.
bool is_basic_sort(const atermpp::aterm &x)
Returns true if the term t is a basic sort.
bool is_function_sort(const atermpp::aterm &x)
Returns true if the term t is a function sort.