mCRL2
Loading...
Searching...
No Matches
join.h
Go to the documentation of this file.
1// Author(s): Jeroen Keiren
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_JOIN_H
13#define MCRL2_DATA_JOIN_H
14
17
18namespace mcrl2
19{
20
21namespace data
22{
23
28 template <typename FwdIt>
29 data_expression join_or(FwdIt first, FwdIt last)
30 {
32 return utilities::detail::join(first, last, tr::or_, tr::false_());
33 }
34
39 template <typename FwdIt>
40 data_expression join_and(FwdIt first, FwdIt last)
41 {
43 return utilities::detail::join(first, last, tr::and_, tr::true_());
44 }
45
52 inline
53 std::set<data_expression> split_or(const data_expression& expr)
54 {
56 std::set<data_expression> result;
57 utilities::detail::split(expr, std::insert_iterator<std::set<data_expression> >(result, result.begin()), tr::is_or, tr::left, tr::right);
58 return result;
59 }
60
67 inline
68 std::set<data_expression> split_and(const data_expression& expr)
69 {
71 std::set<data_expression> result;
72 utilities::detail::split(expr, std::insert_iterator<std::set<data_expression> >(result, result.begin()), tr::is_and, tr::left, tr::right);
73 return result;
74 }
75
76} // namespace data
77
78} // namespace mcrl2
79
80#endif // MCRL2_DATA_JOIN_H
Contains term traits for data_expression.
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
data_expression join_or(FwdIt first, FwdIt last)
Returns or applied to the sequence of data expressions [first, last)
Definition join.h:29
data_expression join_and(FwdIt first, FwdIt last)
Returns and applied to the sequence of data expressions [first, last)
Definition join.h:40
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
T join(FwdIt first, FwdIt last, BinaryOperation op, T empty_sequence_result)
Given a sequence [t1, t2, ..., tn] of elements of type T, returns op(t1, op(t2, .....
Definition join.h:55
void split(const T &t, OutputIterator i, MatchFunction match, AccessorFunction1 lhs, AccessorFunction2 rhs)
Splits a binary tree T into a sequence, and writes the result to the output range given by an output ...
Definition join.h:34
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Contains type information for terms.
Definition term_traits.h:24
Generic join and split functions.