12#ifndef MCRL2_DATA_REWRITERS_IF_REWRITER_H
13#define MCRL2_DATA_REWRITERS_IF_REWRITER_H
37 for (std::size_t i = 0; i < x.
size(); i++)
41 const auto& x_i = atermpp::down_cast<application>(x[i]);
51template <
typename Derived>
77 return if_(b1,
if_(b2, t1, t2), t2);
83 return if_(b1, t1,
if_(b2, t1, t2));
89 return if_(b1,
if_(b2, t1, t2), t1);
94 return if_(b1, t2, t1);
105 const application& t1_ = atermpp::down_cast<application>(t1);
120 return if_(b, t1, t2);
125 const application& t2_ = atermpp::down_cast<application>(t2);
140 return if_(b, t1, t2);
145 return if_(b, t1, t2);
200 result =
rewr(result);
214 core::make_apply_builder<detail::if_rewrite_builder>().apply(result, x);
220void if_rewrite(T& x,
typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value>::type* = 0)
222 core::make_update_apply_builder<data::data_expression_builder>(
if_rewriter()).update(x);
226T
if_rewrite(
const T& x,
typename std::enable_if< std::is_base_of< atermpp::aterm, T >::value>::type* = 0)
229 core::make_update_apply_builder<data::data_expression_builder>(
if_rewriter()).apply(result, x);
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.
const data_expression & head() const
Get the function at the head of this expression.
Rewriter that operates on data expressions.
This file contains some functions that are present in all libraries except the data library....
add your file description here.
bool is_or(const application &x)
bool is_and(const application &x)
application replace_argument(const application &x, std::size_t i, const data_expression &y)
data_expression push_if_outside(const application &x)
void if_rewrite(T &x, typename std::enable_if< !std::is_base_of< atermpp::aterm, T >::value >::type *=0)
bool is_if_application(const DataExpression &e)
Recogniser for application of if.
bool is_false(const data_expression &x)
Test if x is false.
bool is_not(const data_expression &x)
Test if x is a negation.
bool is_true(const data_expression &x)
Test if x is true.
bool is_imp(const data_expression &x)
Test if x is an implication.
const data_expression & unary_operand1(const data_expression &x)
const data_expression & binary_right1(const data_expression &x)
const data_expression & binary_left1(const data_expression &x)
function_symbol if_(const sort_expression &s)
Constructor for function symbol if.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Standard functions that are available for all sorts.
void apply(T &result, const data::variable &x)
bool is_simple(const data_expression &x) const
data_expression_builder< Derived > super
data_expression apply_if(const data_expression &b, const data_expression &t1, const data_expression &t2)
void apply(T &result, const application &x)
if_rewrite_builder< if_rewrite_with_rewriter_builder > super
void apply(T &result, const application &x)
if_rewrite_with_rewriter_builder(data::rewriter &rewr_)
data_expression operator()(const data_expression &x) const