12#ifndef MCRL2_MODAL_FORMULA_IS_MONOTONOUS_H
13#define MCRL2_MODAL_FORMULA_IS_MONOTONOUS_H
15#include "mcrl2/core/detail/print_utility.h"
16#include "mcrl2/modal_formula/state_formula.h"
28 const std::set<core::identifier_string>& non_negated_variables,
29 const std::set<core::identifier_string>& negated_variables)
35 return is_monotonous(atermpp::down_cast<not_>(f).operand(), negated_variables, non_negated_variables);
39 return is_monotonous(atermpp::down_cast<minus>(f).operand(), negated_variables, non_negated_variables);
55 const and_& g = atermpp::down_cast<and_>(f);
56 return is_monotonous(g.left(), non_negated_variables, negated_variables) &&
57 is_monotonous(g.right(), non_negated_variables, negated_variables);
61 const or_& g = atermpp::down_cast<or_>(f);
62 return is_monotonous(g.left(), non_negated_variables, negated_variables) &&
63 is_monotonous(g.right(), non_negated_variables, negated_variables);
67 const imp& g = atermpp::down_cast<imp>(f);
68 return is_monotonous(g.left(), negated_variables, non_negated_variables) &&
69 is_monotonous(g.right(), non_negated_variables, negated_variables);
73 const plus& g = atermpp::down_cast<plus>(f);
74 return is_monotonous(g.left(), non_negated_variables, negated_variables) &&
75 is_monotonous(g.right(), non_negated_variables, negated_variables);
80 return is_monotonous(g.right(), non_negated_variables, negated_variables);
85 return is_monotonous(g.left(), non_negated_variables, negated_variables);
89 const forall& g = atermpp::down_cast<forall>(f);
90 return is_monotonous(g.body(), non_negated_variables, negated_variables);
94 const exists& g = atermpp::down_cast<exists>(f);
95 return is_monotonous(g.body(), non_negated_variables, negated_variables);
99 const infimum& g = atermpp::down_cast<infimum>(f);
100 return is_monotonous(g.body(), non_negated_variables, negated_variables);
104 const supremum& g = atermpp::down_cast<supremum>(f);
105 return is_monotonous(g.body(), non_negated_variables, negated_variables);
109 const sum& g = atermpp::down_cast<sum>(f);
110 return is_monotonous(g.body(), non_negated_variables, negated_variables);
114 const may& g = atermpp::down_cast<may>(f);
115 return is_monotonous(g.operand(), non_negated_variables, negated_variables);
119 const must& g = atermpp::down_cast<must>(f);
120 return is_monotonous(g.operand(), non_negated_variables, negated_variables);
140 const variable& g = atermpp::down_cast<variable>(f);
141 return !contains(negated_variables, g.name());
145 const mu& g = atermpp::down_cast<mu>(f);
146 std::set<core::identifier_string> non_neg = non_negated_variables;
147 non_neg.insert(g.name());
148 return is_monotonous(g.operand(), non_neg, negated_variables);
152 const nu& g = atermpp::down_cast<nu>(f);
153 std::set<core::identifier_string> non_neg = non_negated_variables;
154 non_neg.insert(g.name());
155 return is_monotonous(g.operand(), non_neg, negated_variables);
158 throw mcrl2::runtime_error(std::string(
"is_monotonous(state_formula) error: unknown argument ") + pp(f));
168 std::set<core::identifier_string> non_negated_variables;
169 std::set<core::identifier_string> negated_variables;
170 return is_monotonous(f, non_negated_variables, negated_variables);
aterm_string(const aterm_string &t) noexcept=default
aterm()
Default constructor.
A unordered_map class in which aterms can be stored.
const sort_expression & element_sort() const
sort_expression sort() const
Returns the sort of the data expression.
void translate_user_notation()
Translate user notation within the equations of the data specification.
data_specification()=default
Default constructor. Generate a data specification that contains only booleans and positive numbers.
data_type_checker(const data_specification &data_spec)
make a data type checker. Throws a mcrl2::runtime_error exception if the data_specification is not we...
data_specification operator()() const
Yields a type checked data specification, provided typechecking was successful. If not successful an ...
const data_specification & typechecked_data_specification() const
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
\brief An untyped parameter
const core::identifier_string & name() const
const data_expression_list & arguments() const
Linear process specification.
Linear process specification.
stochastic_specification(const specification &other)
Constructor. This constructor is explicit as implicit conversions of this kind is a source of bugs.
\brief An untyped multi action or data application
std::map< core::identifier_string, data::sort_expression_list > m_state_variables
bool is_declared(const core::identifier_string &name) const
data::sort_expression_list matching_state_variable_sorts(const core::identifier_string &name, const data::data_expression_list &arguments) const
void add_state_variable(const core::identifier_string &name, const data::variable_list ¶meters, const data::sort_type_checker &sort_typechecker)
D_ParserTables parser_tables_mcrl2
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
void warn_left_merge_merge(const parse_node &)
Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
Namespace for system defined sort bag.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
Namespace for system defined sort fbag.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Namespace for system defined sort fset.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Namespace for system defined sort int_.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_int(const sort_expression &e)
Recogniser for sort expression Int.
Namespace for system defined sort list.
application element_at(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol ..
Namespace for system defined sort nat.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort pos.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort real_.
bool is_real(const sort_expression &e)
Recogniser for sort expression Real.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort set_.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
data_specification merge_data_specifications(const data_specification &dataspec1, const data_specification &dataspec2)
Merges two data specifications. Throws an exception if conflicts are detected.
bool is_untyped_data_parameter(const atermpp::aterm &x)
The main namespace for the LPS library.
specification remove_stochastic_operators(const stochastic_specification &spec)
Converts a stochastic specification to a specification. Throws an exception if non-empty distribution...
The main namespace for the Process library.
bool is_untyped_multi_action(const atermpp::aterm &x)
expression builder that visits all sub expressions
expression traverser that visits all sub expressions