mCRL2
Loading...
Searching...
No Matches
forall.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_FORALL_H
13#define MCRL2_DATA_FORALL_H
14
16
17namespace mcrl2
18{
19
20namespace data
21{
22
25class forall: public abstraction
26{
27 public:
28
34 explicit forall(const aterm& d)
35 : abstraction(d)
36 {
37 assert(is_abstraction(d));
38 assert(static_cast<abstraction>(d).binding_operator() == forall_binder());
39 }
40
46 template < typename Container >
47 forall(const Container& variables,
48 const data_expression& body,
51 {
52 assert(!variables.empty());
53 }
54
56 forall(const forall&) noexcept = default;
57 forall(forall&&) noexcept = default;
58 forall& operator=(const forall&) noexcept = default;
59 forall& operator=(forall&&) noexcept = default;
60
61}; // class forall
62
63template <class... ARGUMENTS>
64void make_forall(atermpp::aterm& result, ARGUMENTS... arguments)
65{
66 make_abstraction(result, forall_binder(), arguments...);
67}
68
69//--- start generated class forall ---//
70// prototype declaration
71std::string pp(const forall& x);
72
77inline
78std::ostream& operator<<(std::ostream& out, const forall& x)
79{
80 return out << data::pp(x);
81}
82
84inline void swap(forall& t1, forall& t2)
85{
86 t1.swap(t2);
87}
88//--- end generated class forall ---//
89
90} // namespace data
91
92} // namespace mcrl2
93
94#endif // MCRL2_DATA_FORALL_H
95
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 universal quantification
universal quantification.
Definition forall.h:26
forall(forall &&) noexcept=default
forall(const aterm &d)
Definition forall.h:34
forall(const Container &variables, const data_expression &body, typename atermpp::enable_if_container< Container, variable >::type *=nullptr)
Definition forall.h:47
forall(const forall &) noexcept=default
Move semantics.
The main namespace for the aterm++ library.
Definition algorithm.h:21
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_forall(atermpp::aterm &result, ARGUMENTS... arguments)
Definition forall.h:64
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