mCRL2
Loading...
Searching...
No Matches
bag_comprehension.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_BAG_COMPREHENSION_H
13#define MCRL2_DATA_BAG_COMPREHENSION_H
14
16
17namespace mcrl2 {
18
19namespace data {
20
24{
25 public:
26
32 explicit bag_comprehension(const aterm& d)
33 : abstraction(d)
34 {
35 assert(is_abstraction(d));
36 assert(static_cast<abstraction>(d).binding_operator() == bag_comprehension_binder());
37 }
38
44 template < typename Container >
45 bag_comprehension(const Container& variables,
46 const data_expression& body,
49 {
50 assert(!variables.empty());
51 }
52
54 bag_comprehension(const bag_comprehension&) noexcept = default;
55 bag_comprehension(bag_comprehension&&) noexcept = default;
56 bag_comprehension& operator=(const bag_comprehension&) noexcept = default;
57 bag_comprehension& operator=(bag_comprehension&&) noexcept = default;
58
59}; // class bag_comprehension
60
61template <class... ARGUMENTS>
62void make_bag_comprehension(atermpp::aterm& result, ARGUMENTS... arguments)
63{
64 make_abstraction(result, bag_comprehension_binder(), arguments...);
65}
66
67
68//--- start generated class bag_comprehension ---//
69// prototype declaration
70std::string pp(const bag_comprehension& x);
71
76inline
77std::ostream& operator<<(std::ostream& out, const bag_comprehension& x)
78{
79 return out << data::pp(x);
80}
81
84{
85 t1.swap(t2);
86}
87//--- end generated class bag_comprehension ---//
88
89} // namespace data
90
91} // namespace mcrl2
92
93#endif // MCRL2_DATA_BAG_COMPREHENSION_H
The class abstraction.
aterm()
Default constructor.
Definition aterm.h:48
bool empty() const
Returns true if the list's size is 0.
Definition aterm_list.h:268
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
An abstraction expression.
Definition abstraction.h:26
const variable_list & variables() const
Definition abstraction.h:63
const data_expression & body() const
Definition abstraction.h:68
const binder_type & binding_operator() const
Definition abstraction.h:58
\brief Binder for bag comprehension
universal quantification.
bag_comprehension(const bag_comprehension &) noexcept=default
Move semantics.
bag_comprehension(bag_comprehension &&) noexcept=default
bag_comprehension(const Container &variables, const data_expression &body, typename atermpp::enable_if_container< Container, variable >::type *=nullptr)
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_bag_comprehension(atermpp::aterm &result, ARGUMENTS... arguments)
void swap(abstraction &t1, abstraction &t2)
\brief swap overload
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
std::string pp(const abstraction &x)
Definition data.cpp:39
void make_abstraction(atermpp::aterm &result, ARGUMENTS... arguments)
Definition abstraction.h:75
std::ostream & operator<<(std::ostream &out, const abstraction &x)
Definition abstraction.h:94
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72