12#ifndef MCRL2_PBES_PBES_EXPRESSION_H
13#define MCRL2_PBES_PBES_EXPRESSION_H
130 const core::identifier_string& name()
const
132 return atermpp::down_cast<core::identifier_string>((*
this)[0]);
137 return atermpp::down_cast<data::data_expression_list>((*
this)[1]);
150 assert(core::detail::check_term_PropVarInst(*
this));
182template <
class... ARGUMENTS>
204std::string
pp(
const propositional_variable_instantiation& x);
237 assert(core::detail::check_term_PBESNot(*
this));
253 return atermpp::down_cast<pbes_expression>((*
this)[0]);
259template <
class... ARGUMENTS>
275std::string
pp(
const not_& x);
308 assert(core::detail::check_term_PBESAnd(*
this));
324 return atermpp::down_cast<pbes_expression>((*
this)[0]);
329 return atermpp::down_cast<pbes_expression>((*
this)[1]);
335template <
class... ARGUMENTS>
351std::string
pp(
const and_& x);
384 assert(core::detail::check_term_PBESOr(*
this));
395 or_& operator=(const
or_&) noexcept = default;
396 or_& operator=(
or_&&) noexcept = default;
400 return atermpp::down_cast<pbes_expression>((*
this)[0]);
405 return atermpp::down_cast<pbes_expression>((*
this)[1]);
411template <
class... ARGUMENTS>
427std::string
pp(
const or_& x);
460 assert(core::detail::check_term_PBESImp(*
this));
471 imp& operator=(const
imp&) noexcept = default;
472 imp& operator=(
imp&&) noexcept = default;
476 return atermpp::down_cast<pbes_expression>((*
this)[0]);
481 return atermpp::down_cast<pbes_expression>((*
this)[1]);
487template <
class... ARGUMENTS>
503std::string
pp(
const imp& x);
536 assert(core::detail::check_term_PBESForall(*
this));
550 const data::variable_list& variables()
const
552 return atermpp::down_cast<data::variable_list>((*
this)[0]);
557 return atermpp::down_cast<pbes_expression>((*
this)[1]);
563template <
class... ARGUMENTS>
579std::string
pp(
const forall& x);
612 assert(core::detail::check_term_PBESExists(*
this));
626 const data::variable_list& variables()
const
628 return atermpp::down_cast<data::variable_list>((*
this)[0]);
633 return atermpp::down_cast<pbes_expression>((*
this)[1]);
639template <
class... ARGUMENTS>
655std::string
pp(
const exists& x);
812 return atermpp::down_cast<const pbes_expression>(t[0]);
816 assert(is_forall(t) || is_exists(t));
817 return atermpp::down_cast<const pbes_expression>(t[1]);
827 if (data::is_data_expression(t))
829 assert(data::is_application(t));
830 const auto& a = atermpp::down_cast<const data::application>(t);
845 assert(is_and(t) || is_or(t) || is_imp(t));
846 return atermpp::down_cast<pbes_expression>(t[0]);
855 if (data::is_data_expression(x))
857 return data::binary_left(atermpp::down_cast<data::application>(x));
871 return atermpp::down_cast<pbes_expression>(t[1]);
880 if (data::is_data_expression(x))
882 return data::binary_right(atermpp::down_cast<data::application>(x));
896 assert(is_forall(t) || is_exists(t));
897 return atermpp::down_cast<data::variable_list>(t[0]);
907 return atermpp::down_cast<core::identifier_string>(t[0]);
917 return atermpp::down_cast<data::data_expression_list>(t[1]);
1058 return atermpp::down_cast<exists>(x).variables();
1062 return atermpp::down_cast<forall>(x).variables();
1185 template <
typename FwdIt>
1192 template <
typename FwdIt>
1390 assert(is_pbes_not(t));
1391 return atermpp::down_cast<term_type>(t[0]);
1403 assert(is_exists(t) || is_forall(t));
1405 return atermpp::down_cast<variable_sequence_type>(t[0]);
1414 assert(is_prop_var(t));
1415 return atermpp::down_cast<string_type>(t[0]);
1424 assert(is_prop_var(t));
1425 return atermpp::down_cast<data_term_sequence_type>(t[1]);
1434 return atermpp::down_cast<term_type>(v);
1468 return hash<atermpp::aterm>()(x);
1473 struct hash<
mcrl2::pbes_system::propositional_variable_instantiation>
1477 return hash<atermpp::aterm>()(x);
Term containing a string.
aterm()
Default constructor.
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
bool empty() const
Returns true if the list's size is 0.
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
An abstraction expression.
\brief An untyped parameter
\brief The and operator for pbes expressions
and_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
and_(const and_ &) noexcept=default
Move semantics.
and_(and_ &&) noexcept=default
and_(const atermpp::aterm &term)
const pbes_expression & right() const
and_()
\brief Default constructor X3.
\brief The existential quantification operator for pbes expressions
exists(const atermpp::aterm &term)
exists(exists &&) noexcept=default
exists(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
exists()
\brief Default constructor X3.
exists(const exists &) noexcept=default
Move semantics.
const pbes_expression & body() const
\brief The universal quantification operator for pbes expressions
forall()
\brief Default constructor X3.
const pbes_expression & body() const
forall(const data::variable_list &variables, const pbes_expression &body)
\brief Constructor Z14.
forall(const atermpp::aterm &term)
forall(const forall &) noexcept=default
Move semantics.
forall(forall &&) noexcept=default
\brief The implication operator for pbes expressions
imp(const imp &) noexcept=default
Move semantics.
imp(imp &&) noexcept=default
imp(const atermpp::aterm &term)
imp()
\brief Default constructor X3.
imp(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
\brief The not operator for pbes expressions
not_()
\brief Default constructor X3.
not_(const pbes_expression &operand)
\brief Constructor Z14.
not_(const not_ &) noexcept=default
Move semantics.
not_(not_ &&) noexcept=default
not_(const atermpp::aterm &term)
\brief The or operator for pbes expressions
or_(const or_ &) noexcept=default
Move semantics.
or_(const pbes_expression &left, const pbes_expression &right)
\brief Constructor Z14.
const pbes_expression & right() const
or_(or_ &&) noexcept=default
or_(const atermpp::aterm &term)
or_()
\brief Default constructor X3.
pbes_expression(const atermpp::aterm &term)
pbes_expression(const pbes_expression &) noexcept=default
Move semantics.
pbes_expression(const data::data_expression &x)
\brief Constructor Z6.
pbes_expression(const data::untyped_data_parameter &x)
\brief Constructor Z6.
pbes_expression(const data::variable &x)
\brief Constructor Z6.
pbes_expression()
\brief Default constructor X3.
pbes_expression(pbes_expression &&) noexcept=default
\brief A propositional variable instantiation
const data::data_expression_list & parameters() const
propositional_variable_instantiation(const propositional_variable_instantiation &) noexcept=default
Move semantics.
propositional_variable_instantiation(const std::string &name)
Constructor.
propositional_variable_instantiation()
Default constructor.
propositional_variable_instantiation(propositional_variable_instantiation &&) noexcept=default
propositional_variable_instantiation(const core::identifier_string &name, const data::data_expression_list ¶meters)
Constructor.
propositional_variable_instantiation(const core::identifier_string &name)
Constructor.
propositional_variable_instantiation(const std::string &name, const data::data_expression_list ¶meters)
Constructor.
propositional_variable_instantiation(const atermpp::aterm &term)
Constructor.
\brief A propositional variable declaration
Contains term traits for data_expression.
The main namespace for the aterm++ library.
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm in a variable based on a function symbol and an forward iterator providing the a...
const atermpp::function_symbol & function_symbol_PBESExists()
const atermpp::function_symbol & function_symbol_PBESNot()
const atermpp::function_symbol & function_symbol_PBESAnd()
const atermpp::function_symbol & function_symbol_PBESOr()
const atermpp::function_symbol & function_symbol_PBESImp()
const atermpp::function_symbol & function_symbol_PBESForall()
bool check_rule_PBExpr(const Term &t)
const atermpp::function_symbol & function_symbol_PropVarInst()
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 & false_()
Constructor for function symbol false.
bool is_and_application(const atermpp::aterm &e)
Recogniser for application of &&.
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 & true_()
Constructor for function symbol true.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
void optimized_or(Term &result, const Term &p, const Term &q)
Make a conjunction, and optimize if possible.
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
void optimized_imp(Term &result, const Term &p, const Term &q)
Make an implication.
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
bool is_untyped_data_parameter(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
void optimized_not(Term &result, const Term &arg)
Make a negation.
void optimized_and(Term &result, const Term &p, const Term &q)
Make a conjunction, and optimize if possible.
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
pbes_expression data_left(const pbes_expression &x)
Returns the left hand side of an expression of type and, or or imp.
pbes_expression data_arg(const pbes_expression &t)
Returns the pbes expression argument of expressions of type not, exists and forall.
const pbes_expression & left(const pbes_expression &t)
Returns the left hand side of an expression of type and, or or imp.
const pbes_expression & right(const pbes_expression &t)
Returns the right hand side of an expression of type and, or or imp.
pbes_expression data_right(const pbes_expression &x)
Returns the left hand side of an expression of type and, or or imp.
const data::data_expression_list & param(const pbes_expression &t)
Returns the parameters of a propositional variable instantiation.
const core::identifier_string & name(const pbes_expression &t)
Returns the name of a propositional variable expression.
const data::variable_list & var(const pbes_expression &t)
Returns the variables of a quantification expression.
bool is_pbes_exists(const pbes_expression &t)
Returns true if the term t is an existential quantification.
atermpp::term_list< pbes_expression > pbes_expression_list
\brief list of pbes_expressions
bool is_universal_or(const pbes_expression &t)
Test for a disjunction.
bool is_data(const pbes_expression &t)
Returns true if the term t is a data expression.
void normalize_sorts(T &x, const data::sort_specification &sortspec, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
bool is_universal_and(const pbes_expression &t)
Test for a conjunction.
bool is_pbes_expression(const atermpp::aterm &x)
bool is_pbes_not(const pbes_expression &t)
Returns true if the term t is a not expression.
const pbes_expression & true_()
bool is_pbes_forall(const pbes_expression &t)
Returns true if the term t is a universal quantification.
pbes_expression make_exists_(const data::variable_list &l, const pbes_expression &p)
Make an existential quantification. It checks for an empty variable list, which is not allowed.
bool is_not(const atermpp::aterm &x)
void optimized_not(pbes_expression &result, const pbes_expression &p)
Make a negation.
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::vector< propositional_variable_instantiation > propositional_variable_instantiation_vector
\brief vector of propositional_variable_instantiations
void find_identifiers(const T &x, OutputIterator o)
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_exists(const atermpp::aterm &x)
data::variable_list free_variables(const pbes_expression &x)
bool is_constant(const pbes_expression &x)
void find_free_variables(const T &x, OutputIterator o)
atermpp::term_list< propositional_variable_instantiation > propositional_variable_instantiation_list
\brief list of propositional_variable_instantiations
bool is_or(const atermpp::aterm &x)
const data::variable_list & quantifier_variables(const pbes_expression &x)
void optimized_exists(pbes_expression &result, const data::variable_list &l, const pbes_expression &p)
Make an existential quantification If l is empty, p is returned.
bool is_forall(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &os, const absinthe_strategy strategy)
void make_propositional_variable_instantiation(atermpp::aterm &t, const ARGUMENTS &... args)
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_universal_not(const pbes_expression &t)
Test for a conjunction.
bool search_variable(const T &x, const data::variable &v)
Returns true if the term has a given variable as subterm.
std::vector< pbes_expression > pbes_expression_vector
\brief vector of pbes_expressions
bool is_pbes_or(const pbes_expression &t)
Returns true if the term t is an or expression.
bool is_false(const pbes_expression &t)
Test for the value false.
void optimized_forall(pbes_expression &result, const data::variable_list &l, const pbes_expression &p)
Make a universal quantification If l is empty, p is returned.
bool is_pbes_imp(const pbes_expression &t)
Returns true if the term t is an imp expression.
void optimized_or(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make a disjunction.
bool is_pbes_and(const pbes_expression &t)
Returns true if the term t is an and expression.
pbes_expression make_forall_(const data::variable_list &l, const pbes_expression &p)
Make a universal quantification. It checks for an empty variable list, which is not allowed.
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_propositional_variable_instantiation(const atermpp::aterm &x)
void swap(fixpoint_symbol &t1, fixpoint_symbol &t2)
\brief swap overload
std::string pp(const fixpoint_symbol &x)
bool is_and(const atermpp::aterm &x)
void optimized_and(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make a conjunction.
void translate_user_notation(pbes_system::pbes &x)
void find_propositional_variable_instantiations(Container const &container, OutputIterator o)
Returns all data variables that occur in a range of expressions.
bool is_imp(const atermpp::aterm &x)
void optimized_imp(pbes_expression &result, const pbes_expression &p, const pbes_expression &q)
Make an implication.
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_true(const pbes_expression &t)
Test for the value true.
const pbes_expression & false_()
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
T join(FwdIt first, FwdIt last, BinaryOperation op, T empty_sequence_result)
Given a sequence [t1, t2, ..., tn] of elements of type T, returns op(t1, op(t2, .....
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
add your file description here.
The classes propositional_variable and propositional_variable_instantiation.
static const atermpp::function_symbol PBESForall
static const atermpp::function_symbol PBESNot
static const atermpp::function_symbol PBESImp
static const atermpp::function_symbol PBESAnd
static const atermpp::function_symbol PropVarInst
static const atermpp::function_symbol PBESExists
static const atermpp::function_symbol PBESOr
static bool is_false(const term_type &t)
Test for the value false.
static void make_or_(term_type &result, const term_type &p, const term_type &q)
Make a disjunction.
static bool is_imp(const term_type &t)
Test for an implication.
static void make_exists(term_type &result, const variable_sequence_type &l, const term_type &p)
Make an existential quantification.
static bool is_data(const term_type &t)
Test for data term.
static term_type forall(const variable_sequence_type &l, const term_type &p)
Make a universal quantification.
static std::string pp(const term_type &t)
Pretty print function.
static term_type true_()
Make the value true.
static term_type exists(const variable_sequence_type &l, const term_type &p)
Make an existential quantification.
static term_type or_(const term_type &p, const term_type &q)
Make a disjunction.
static const data_term_sequence_type & param(const term_type &t)
Returns the parameter list of a propositional variable instantiation.
data::variable variable_type
The variable type.
static bool is_not(const term_type &t)
Test for a negation.
static void make_imp(term_type &result, const term_type &p, const term_type &q)
Make an implication.
static term_type join_and(FwdIt first, FwdIt last)
pbes_system::propositional_variable propositional_variable_decl_type
The propositional variable declaration type.
static bool is_and(const term_type &t)
Test for a conjunction.
static bool is_variable(const term_type &t)
Test if a term is a variable.
pbes_system::pbes_expression term_type
The term type.
static term_type not_(const term_type &p)
Make a negation.
static bool is_exists(const term_type &t)
Test for an existential quantification.
pbes_system::propositional_variable_instantiation propositional_variable_type
The propositional variable instantiation type.
static void make_and_(term_type &result, const term_type &p, const term_type &q)
Make a conjunction.
static term_type false_()
Make the value false.
static term_type left(const term_type &t)
Returns the left argument of a term of type and, or or imp.
static const string_type & name(const term_type &t)
Returns the name of a propositional variable instantiation.
static term_type right(const term_type &t)
Returns the right argument of a term of type and, or or imp.
data::data_expression data_term_type
The data term type.
core::identifier_string string_type
The string type.
static term_type and_(const term_type &p, const term_type &q)
Make a conjunction.
static const variable_sequence_type & var(const term_type &t)
Returns the quantifier variables of a quantifier expression.
static const term_type & variable2term(const variable_type &v)
Conversion from variable to term.
static void make_forall(term_type &result, const variable_sequence_type &l, const term_type &p)
Make a universal quantification.
static void make_not_(term_type &result, const term_type &p)
Make a negation.
static const term_type & not_arg(const term_type &t)
Returns the argument of a term of type not.
data::variable_list variable_sequence_type
The variable sequence type.
static term_type imp(const term_type &p, const term_type &q)
Make an implication.
data::data_expression_list data_term_sequence_type
The data term sequence type.
static term_type join_or(FwdIt first, FwdIt last)
static bool is_forall(const term_type &t)
Test for an universal quantification.
static bool is_prop_var(const term_type &t)
Test for propositional variable instantiation.
static bool is_true(const term_type &t)
Test for the value true.
static bool is_or(const term_type &t)
Test for a disjunction.
Contains type information for terms.
std::size_t operator()(const mcrl2::pbes_system::pbes_expression &x) const
std::size_t operator()(const mcrl2::pbes_system::propositional_variable_instantiation &x) const