mCRL2
Loading...
Searching...
No Matches
one_point_rule_preprocessor.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_DATA_DETAIL_ONE_POINT_RULE_PREPROCESSOR_H
13#define MCRL2_DATA_DETAIL_ONE_POINT_RULE_PREPROCESSOR_H
14
15#include "mcrl2/data/join.h"
16
17namespace mcrl2 {
18
19namespace data {
20
21namespace detail {
22
23struct
25{
27 {
29 {
32 {
33 return (*this)(unary_operand1(y));
34 }
36 {
37 std::set<data::data_expression> args = data::split_and(y);
38 std::vector<data::data_expression> result;
39 for (const data::data_expression& arg: args)
40 {
41 result.push_back((*this)(data::sort_bool::not_(arg)));
42 }
43 return data::join_or(result.begin(), result.end());
44 }
46 {
47 std::set<data::data_expression> args = data::split_or(y);
48 std::vector<data::data_expression> result;
49 for (const data::data_expression& arg: args)
50 {
51 result.push_back((*this)(data::sort_bool::not_(arg)));
52 }
53 return data::join_and(result.begin(), result.end());
54 }
56 {
57 return data::not_equal_to(binary_left(atermpp::down_cast<application>(y)), binary_right(atermpp::down_cast<application>(y)));
58 }
60 {
61 return data::equal_to(binary_left(atermpp::down_cast<application>(y)), binary_right(atermpp::down_cast<application>(y)));
62 }
63 }
64 return x;
65 }
66};
67
68} // namespace detail
69
70} // namespace data
71
72} // namespace mcrl2
73
74#endif // MCRL2_DATA_DETAIL_ONE_POINT_RULE_PREPROCESSOR_H
Join and split functions for data expressions.
bool is_or_application(const atermpp::aterm &e)
Recogniser for application of ||.
Definition bool.h:345
bool is_and_application(const atermpp::aterm &e)
Recogniser for application of &&.
Definition bool.h:281
bool is_not_application(const atermpp::aterm &e)
Recogniser for application of !.
Definition bool.h:217
const function_symbol & not_()
Constructor for function symbol !.
Definition bool.h:173
const data_expression & binary_right(const application &x)
function_symbol not_equal_to(const sort_expression &s)
Constructor for function symbol !=.
Definition standard.h:163
bool is_not_equal_to_application(const DataExpression &e)
Recogniser for application of !=.
Definition standard.h:192
std::set< data_expression > split_or(const data_expression &expr)
Splits a disjunction into a sequence of operands Given a data expression of the form p1 || p2 || ....
Definition join.h:53
const data_expression & binary_left(const application &x)
data_expression join_or(FwdIt first, FwdIt last)
Returns or applied to the sequence of data expressions [first, last)
Definition join.h:29
const data_expression & unary_operand1(const data_expression &x)
function_symbol equal_to(const sort_expression &s)
Constructor for function symbol ==.
Definition standard.h:126
data_expression join_and(FwdIt first, FwdIt last)
Returns and applied to the sequence of data expressions [first, last)
Definition join.h:40
bool is_equal_to_application(const DataExpression &e)
Recogniser for application of ==.
Definition standard.h:155
std::set< data_expression > split_and(const data_expression &expr)
Splits a conjunction into a sequence of operands Given a data expression of the form p1 && p2 && ....
Definition join.h:68
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
data::data_expression operator()(const data::data_expression &x) const