12#ifndef MCRL2_PBES_IS_MONOTONOUS_H
13#define MCRL2_PBES_IS_MONOTONOUS_H
15#include "mcrl2/pbes/pbes.h"
31 f = atermpp::down_cast<not_>(f).operand();
46 return is_monotonous(atermpp::down_cast<not_>(f).operand());
50 const auto& left = atermpp::down_cast<and_>(f).left();
51 const auto& right = atermpp::down_cast<and_>(f).right();
52 return is_monotonous(not_(left)) && is_monotonous(not_(right));
56 const auto& left = atermpp::down_cast<or_>(f).left();
57 const auto& right = atermpp::down_cast<or_>(f).right();
58 return is_monotonous(not_(left)) && is_monotonous(not_(right));
62 const auto& left = atermpp::down_cast<imp>(f).left();
63 const auto& right = atermpp::down_cast<imp>(f).right();
64 return is_monotonous(left) && is_monotonous(not_(right));
68 const auto& body = atermpp::down_cast<forall>(f).body();
69 return is_monotonous(not_(body));
73 const auto& body = atermpp::down_cast<exists>(f).body();
74 return is_monotonous(not_(body));
97 const auto& left = atermpp::down_cast<and_>(f).left();
98 const auto& right = atermpp::down_cast<and_>(f).right();
99 return is_monotonous(left) && is_monotonous(right);
103 const auto& left = atermpp::down_cast<or_>(f).left();
104 const auto& right = atermpp::down_cast<or_>(f).right();
105 return is_monotonous(left) && is_monotonous(right);
109 const auto& left = atermpp::down_cast<imp>(f).left();
110 const auto& right = atermpp::down_cast<imp>(f).right();
111 return is_monotonous(not_(left)) && is_monotonous(right);
115 const auto& body = atermpp::down_cast<forall>(f).body();
116 return is_monotonous(body);
120 const auto& body = atermpp::down_cast<exists>(f).body();
121 return is_monotonous(body);
128 throw mcrl2::runtime_error(std::string(
"is_monotonous(pbes_expression) error: unknown argument ") + pp(f));
143 for (
const pbes_equation& eqn: p.equations())
145 if (!is_monotonous(eqn))
const pbes_expression & formula() const
Returns the predicate formula on the right hand side of the equation.
parameterized boolean equation system
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
bool is_not(const atermpp::aterm &x)
bool is_exists(const atermpp::aterm &x)
bool is_or(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
bool is_monotonous(pbes_expression f)
Returns true if the pbes expression is monotonous.
bool is_false(const pbes_expression &t)
Test for the value false.
bool is_monotonous(const pbes &p)
Returns true if the pbes is monotonous.
bool is_propositional_variable_instantiation(const atermpp::aterm &x)
bool is_and(const atermpp::aterm &x)
bool is_imp(const atermpp::aterm &x)
bool is_true(const pbes_expression &t)
Test for the value true.
bool is_monotonous(const pbes_equation &e)
Returns true if the pbes equation is monotonous.