40std::string
pp(
const data::alias& x) {
return data::pp< data::alias >(x); }
106std::string
pp(
const std::set<variable>& x) {
return data::pp< std::set<variable> >(x); }
115#ifdef MCRL2_ENABLE_MACHINENUMBERS
123 const auto& v = atermpp::down_cast<variable>(*
this);
128 const auto& f = atermpp::down_cast<function_symbol>(*
this);
139 const auto& v_variables = atermpp::down_cast<atermpp::term_list<aterm> >((*this)[1]);
141 for (
const auto & v_variable : v_variables)
143 s.push_back(down_cast<sort_expression>(v_variable[1]));
150 const auto& v_variables = atermpp::down_cast<atermpp::term_list<aterm> >((*this)[1]);
151 assert(v_variables.size() == 1);
166 return atermpp::down_cast<data_expression>((*
this)[0]).sort();
174 const auto& head = atermpp::down_cast<const data_expression>((*
this)[0]);
178 const auto& fs = atermpp::down_cast<function_sort>(s);
179 assert(fs.domain().size()+1==this->size());
180 return (fs.codomain());
187 std::set<data::variable> result;
188 for (
const auto& i:
sigma)
207 bool partial_parses =
false;
217 bool partial_parses =
false;
218 std::string var_text(
"var " + text);
228 bool partial_parses =
false;
239 bool partial_parses =
false;
250 bool partial_parses =
false;
262 bool partial_parses =
false;
271 sorts.push_back(atermpp::down_cast<basic_sort>(x));
275 aliases.push_back(atermpp::down_cast<alias>(x));
278 auto result = std::make_pair(sorts, aliases);
An abstraction expression.
An application of a data expression to a number of arguments.
\brief Assignment expression
\brief Assignment of a data expression to a variable
\brief Binder for bag comprehension
universal quantification.
\brief Container type for bags
sort_expression sort() const
Returns the sort of the data expression.
\brief Binder for existential quantification
existential quantification.
\brief Container type for finite bags
\brief Binder for universal quantification
universal quantification.
\brief Container type for finite sets
const sort_expression & sort() const
\brief Binder for lambda abstraction
\brief Container type for lists
Generic substitution function. The substitution is stored as a mapping of variables to expressions....
\brief Binder for set comprehension
universal quantification.
\brief Container type for sets
\brief An argument of a constructor of a structured sort
\brief A constructor for a structured sort
\brief An untyped parameter
\brief Assignment of a data expression to a string
\brief An untyped identifier
\brief Multiple possible sorts
\brief Binder for untyped set or bag comprehension
universal quantification.
\brief Untyped sort variable
\brief Unknown sort expression
\brief A where expression
D_ParserTables parser_tables_mcrl2
add your file description here.
add your file description here.
Provides utilities for pretty printing.
add your file description here.
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
add your file description here.
The main namespace for the aterm++ library.
void syntax_error_fn(struct D_Parser *ap)
Custom syntax error function that prints both the line number and the column.
struct D_ParseNode * ambiguity_fn(struct D_Parser *, int, struct D_ParseNode **)
Function for resolving ambiguities in the '_ -> _ <> _' operator for process expressions.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
data_expression parse_data_expression(const std::string &text)
data_specification parse_data_specification_new(const std::string &text)
variable_list parse_variable_declaration_list(const std::string &text)
variable_list parse_variables(const std::string &text)
sort_expression parse_sort_expression(const std::string &text)
const basic_sort & bool_()
Constructor for sort expression Bool.
const basic_sort & machine_word()
Constructor for sort expression @word.
std::vector< assignment > assignment_vector
\brief vector of assignments
void find_identifiers(const T &x, OutputIterator o)
variable_list free_variables(const data_expression &x)
std::vector< sort_expression > sort_expression_vector
\brief vector of sort_expressions
data::data_equation translate_user_notation(const data::data_equation &x)
std::vector< alias > alias_vector
\brief vector of aliass
std::set< data::variable > find_all_variables(const data::data_expression &x)
bool is_where_clause(const atermpp::aterm &x)
Returns true if the term t is a where clause.
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
std::set< data::variable > substitution_variables(const Substitution &)
Returns the variables appearing in the right hand sides of the substitution.
std::vector< data_equation > data_equation_vector
\brief vector of data_equations
std::vector< variable > variable_vector
\brief vector of variables
bool is_untyped_identifier(const atermpp::aterm &x)
Returns true if the term t is an identifier.
atermpp::term_list< sort_expression > sort_expression_list
\brief list of sort_expressions
std::vector< data_expression > data_expression_vector
\brief vector of data_expressions
std::string pp(const abstraction &x)
std::vector< structured_sort_constructor > structured_sort_constructor_vector
\brief vector of structured_sort_constructors
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
bool is_function_symbol(const atermpp::aterm &x)
Returns true if the term t is a function symbol.
bool is_basic_sort(const atermpp::aterm &x)
Returns true if the term t is a basic sort.
std::set< data::sort_expression > find_sort_expressions(const data::data_equation &x)
std::set< data::function_symbol > find_function_symbols(const data::data_equation &x)
std::set< data::variable > find_free_variables(const data::data_expression &x)
bool is_untyped_set_or_bag_comprehension(const atermpp::aterm &x)
Returns true if the term t is a set/bag comprehension.
atermpp::term_list< variable > variable_list
\brief list of variables
std::pair< basic_sort_vector, alias_vector > parse_sort_specification(const std::string &text)
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
bool is_function_sort(const atermpp::aterm &x)
Returns true if the term t is a function sort.
data_expression normalize_sorts(const data_expression &x, const data::sort_specification &sortspec)
bool is_bag_comprehension(const atermpp::aterm &x)
Returns true if the term t is a bag comprehension.
bool is_set_comprehension(const atermpp::aterm &x)
Returns true if the term t is a set comprehension.
bool is_machine_number(const atermpp::aterm &x)
Returns true if the term t is a machine_number.
bool is_lambda(const atermpp::aterm &x)
Returns true if the term t is a lambda abstraction.
bool is_alias(const atermpp::aterm &x)
std::vector< basic_sort > basic_sort_vector
vector of basic sorts
bool search_variable(const data::data_expression &x, const data::variable &v)
bool is_application(const atermpp::aterm &x)
Returns true if the term t is an application.
std::vector< function_symbol > function_symbol_vector
\brief vector of function_symbols
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Wrapper for D_Parser and its corresponding D_ParserTables.
parse_node parse(const std::string &text, unsigned int start_symbol_index=0, bool partial_parses=false)
Parses a string. N.B. The user is responsible for destruction of the returned value by calling destro...
unsigned int start_symbol_index(const std::string &name) const
data::variable_list parse_VarsDeclList(const core::parse_node &node) const
data::data_expression parse_DataExpr(const core::parse_node &node) const
data::variable_list parse_VarSpec(const core::parse_node &node) const
untyped_data_specification parse_DataSpec(const core::parse_node &node) const
std::vector< atermpp::aterm > parse_SortSpec(const core::parse_node &node) const
data::sort_expression parse_SortExpr(const core::parse_node &node, data::sort_expression_list *product=nullptr) const
data_specification construct_data_specification() const