mCRL2
Loading...
Searching...
No Matches
set_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_SET_COMPREHENSION_H
13#define MCRL2_DATA_SET_COMPREHENSION_H
14
16
17namespace mcrl2 {
18
19namespace data {
20
24{
25 public:
26
32 explicit set_comprehension(const aterm& d)
33 : abstraction(d)
34 {
35 assert(is_abstraction(d));
36 assert(static_cast<abstraction>(d).binding_operator() == set_comprehension_binder());
37 }
38
44 template < typename Container >
45 set_comprehension(const Container& variables,
46 const data_expression& body,
49 {
50 assert(!variables.empty());
51 }
52
54 set_comprehension(const set_comprehension&) noexcept = default;
55 set_comprehension(set_comprehension&&) noexcept = default;
56 set_comprehension& operator=(const set_comprehension&) noexcept = default;
57 set_comprehension& operator=(set_comprehension&&) noexcept = default;
58
59}; // class set_comprehension
60
61template <class... ARGUMENTS>
62void make_set_comprehension(atermpp::aterm& result, ARGUMENTS... arguments)
63{
64 make_abstraction(result, set_comprehension_binder(), arguments...);
65}
66
67
68//--- start generated class set_comprehension ---//
69// prototype declaration
70std::string pp(const set_comprehension& x);
71
76inline
77std::ostream& operator<<(std::ostream& out, const set_comprehension& x)
78{
79 return out << data::pp(x);
80}
81
84{
85 t1.swap(t2);
86}
87//--- end generated class set_comprehension ---//
88
89} // namespace data
90
91} // namespace mcrl2
92
93#endif // MCRL2_DATA_SET_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 set comprehension
universal quantification.
set_comprehension(set_comprehension &&) noexcept=default
set_comprehension(const Container &variables, const data_expression &body, typename atermpp::enable_if_container< Container, variable >::type *=nullptr)
set_comprehension(const set_comprehension &) noexcept=default
Move semantics.
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_set_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