26#ifndef MCRL2_PBES_COMPLEMENT_H
27#define MCRL2_PBES_COMPLEMENT_H
29#include "mcrl2/data/consistency.h"
30#include "mcrl2/pbes/builder.h"
40template <
typename Derived>
52 result = pbes_system::not_(atermpp::down_cast<pbes_expression>(x));
56 void apply(T& result,
const and_& x)
59 static_cast<Derived&>(*
this).apply(left, x
.left());
61 static_cast<Derived&>(*
this).apply(right, x
.right());
62 optimized_or(result, left, right);
66 void apply(T& result,
const or_& x)
69 static_cast<Derived&>(*
this).apply(left, x
.left());
71 static_cast<Derived&>(*
this).apply(right, x
.right());
72 optimized_and(result, left, right);
78 throw mcrl2::runtime_error(std::string(
"complement_builder error: unexpected propositional variable encountered ") + mcrl2::pbes_system::pp(x));
91 core::make_apply_builder<complement_builder>().apply(result, x);
\brief The and operator for pbes expressions
const pbes_expression & left() const
const pbes_expression & right() const
\brief The or operator for pbes expressions
const pbes_expression & left() const
const pbes_expression & right() const
\brief A propositional variable instantiation
pbes_expression complement(const pbes_expression &x)
Returns the complement of a pbes expression.