12#ifndef MCRL2_DATA_EXPRESSION_TRAITS_H
13#define MCRL2_DATA_EXPRESSION_TRAITS_H
284 for(std::size_t j=0; j<n; ++j, ++i)
297 assert(a.
size() == 2);
306 assert(a.
size() == 2);
307 return *(++(a.
begin()));
316 assert(a.
size() == 1);
335template <
typename Expression >
363 return atermpp::down_cast<mcrl2::data::application>(e).head();
368 return atermpp::container_cast<data_expression_list>(atermpp::down_cast<abstraction>(a).
variables());
373 return atermpp::down_cast<const abstraction>(a).body();
378 const abstraction& a=atermpp::down_cast<const abstraction>(variable_binder);
382 template <
typename Container >
An abstraction expression.
const variable_list & variables() const
const binder_type & binding_operator() const
An application of a data expression to a number of arguments.
const_iterator end() const
Returns an iterator pointing past the last argument of the application.
const_iterator begin() const
Returns an iterator pointing to the first argument of the application.
existential quantification.
universal quantification.
bool is_false_function_symbol(const atermpp::aterm &e)
Recogniser for function false.
bool is_or_application(const atermpp::aterm &e)
Recogniser for application of ||.
const function_symbol & implies()
Constructor for function symbol =>.
bool is_implies_application(const atermpp::aterm &e)
Recogniser for application of =>.
const function_symbol & and_()
Constructor for function symbol &&.
const function_symbol & false_()
Constructor for function symbol false.
bool is_and_application(const atermpp::aterm &e)
Recogniser for application of &&.
const function_symbol & or_()
Constructor for function symbol ||.
bool is_true_function_symbol(const atermpp::aterm &e)
Recogniser for function true.
bool is_not_application(const atermpp::aterm &e)
Recogniser for application of !.
const function_symbol & not_()
Constructor for function symbol !.
void make_not_(data_expression &result, const data_expression &arg0)
Make an application of function symbol !.
void make_and_(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol &&.
const function_symbol & true_()
Constructor for function symbol true.
void make_or_(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol ||.
void make_implies(data_expression &result, const data_expression &arg0, const data_expression &arg1)
Make an application of function symbol =>.
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
std::string pp(const abstraction &x)
void make_forall(atermpp::aterm &result, ARGUMENTS... arguments)
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
bool is_lambda(const atermpp::aterm &x)
Returns true if the term t is a lambda abstraction.
void make_exists(atermpp::aterm &result, ARGUMENTS... arguments)
bool is_application(const atermpp::aterm &x)
Returns true if the term t is an application.
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...
static bool is_and(const term_type &t)
Test for operator and.
static void make_imp(term_type &result, const term_type &p, const term_type &q)
Operator imp.
static bool is_variable(const term_type &t)
Test if a term is a variable.
static const term_type & not_arg(const term_type &t)
static const term_type & argument(const term_type &t, const std::size_t n)
Get the n-th argument of a data expression, provided it is an application.
static term_type or_(const term_type &p, const term_type &q)
Operator or.
static term_type exists(const variable_sequence_type &d, const term_type &p)
Operator exists.
static void make_forall(term_type &result, const variable_sequence_type &d, const term_type &p)
Construct a forall.
static bool is_false(const term_type &t)
Test for value false.
static bool is_exists(const term_type &t)
Test for existential quantification.
static term_type imp(const term_type &p, const term_type &q)
Operator imp.
static term_type and_(const term_type &p, const term_type &q)
Operator and.
data::data_expression term_type
The term type.
static term_type not_(const term_type &p)
Operator not.
static bool is_lambda(const term_type &t)
Test for lambda abstraction.
static void make_exists(term_type &result, const variable_sequence_type &d, const term_type &p)
Construct an exists.
static void make_or_(term_type &result, const term_type &p, const term_type &q)
Operator or.
static const term_type & right(const term_type &t)
static bool is_true(const term_type &t)
Test for value true.
static const term_type & true_()
The value true.
static term_type forall(const variable_sequence_type &d, const term_type &p)
Operator forall.
data::variable_list variable_sequence_type
The variable sequence type.
static bool is_not(const term_type &t)
Test for operator not.
static const term_type & left(const term_type &t)
static bool is_or(const term_type &t)
Test for operator or.
static void make_and_(term_type &result, const term_type &p, const term_type &q)
Operator and.
static const term_type & variable2term(const variable_type &v)
Conversion from variable to term.
static bool is_imp(const term_type &t)
Test for implication.
static void make_not_(term_type &result, const term_type &p)
Operator not.
static bool is_forall(const term_type &t)
Test for universal quantification.
data::variable variable_type
The variable type.
static const term_type & false_()
The value false.
static std::string pp(const term_type &t)
Pretty print function.
Contains type information for terms.
expression traits (currently nothing more than core::term_traits)
static application application(const data_expression &e, const Container &arguments)
static const data_expression_list & variables(const data_expression &a)
static const data_expression & false_()
static bool is_false(const data_expression &e)
static data_expression and_(const data_expression &e1, const data_expression &e2)
mcrl2::data::variable variable_type
static const data_expression & head(const data_expression &e)
static const data_expression & true_()
static data_expression replace_body(const data_expression &variable_binder, const data_expression &new_body)
static data_expression or_(const data_expression &e1, const data_expression &e2)
static bool is_application(const data_expression &e)
static const data_expression & body(const data_expression &a)
static bool is_true(const data_expression &e)
static bool is_abstraction(const data_expression &e)
Traits class for (boolean) terms.