mCRL2
Loading...
Searching...
No Matches
data_equation.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_DATA_EQUATION_H
13#define MCRL2_DATA_DATA_EQUATION_H
14
17
18namespace mcrl2
19{
20
21namespace data
22{
23
24// predeclare
25namespace sort_bool
26{
27function_symbol const& true_();
28} // namespace sort_bool
29
30//--- start generated class data_equation ---//
33{
34 public:
37 : atermpp::aterm(core::detail::default_values::DataEqn)
38 {}
39
42 explicit data_equation(const atermpp::aterm& term)
43 : atermpp::aterm(term)
44 {
46 }
47
50 : atermpp::aterm(core::detail::function_symbol_DataEqn(), variables, condition, lhs, rhs)
51 {}
52
54 template <typename Container>
56 : atermpp::aterm(core::detail::function_symbol_DataEqn(), variable_list(variables.begin(), variables.end()), condition, lhs, rhs)
57 {}
58
60 data_equation(const data_equation&) noexcept = default;
61 data_equation(data_equation&&) noexcept = default;
62 data_equation& operator=(const data_equation&) noexcept = default;
63 data_equation& operator=(data_equation&&) noexcept = default;
64
65 const variable_list& variables() const
66 {
67 return atermpp::down_cast<variable_list>((*this)[0]);
68 }
69
71 {
72 return atermpp::down_cast<data_expression>((*this)[1]);
73 }
74
75 const data_expression& lhs() const
76 {
77 return atermpp::down_cast<data_expression>((*this)[2]);
78 }
79
80 const data_expression& rhs() const
81 {
82 return atermpp::down_cast<data_expression>((*this)[3]);
83 }
84//--- start user section data_equation ---//
92 template < typename Container >
93 data_equation(const Container& variables,
94 const data_expression& lhs,
95 const data_expression& rhs,
97 : atermpp::aterm(core::detail::function_symbol_DataEqn(), variable_list(variables.begin(),variables.end()), sort_bool::true_(), lhs, rhs)
98 {}
99
107 const data_expression& rhs)
108 : atermpp::aterm(core::detail::function_symbol_DataEqn(), variable_list(), sort_bool::true_(), lhs, rhs)
109 {}
110//--- end user section data_equation ---//
111};
112
115template <class... ARGUMENTS>
116inline void make_data_equation(atermpp::aterm& t, const ARGUMENTS&... args)
117{
119}
120
123
125typedef std::vector<data_equation> data_equation_vector;
126
127// prototype declaration
128std::string pp(const data_equation& x);
129
134inline
135std::ostream& operator<<(std::ostream& out, const data_equation& x)
136{
137 return out << data::pp(x);
138}
139
141inline void swap(data_equation& t1, data_equation& t2)
142{
143 t1.swap(t2);
144}
145//--- end generated class data_equation ---//
146
150inline bool is_data_equation(const atermpp::aterm& t)
151{
153}
154
155// template function overloads
156std::string pp(const data_equation_list& x);
157std::string pp(const data_equation_vector& x);
159std::set<data::sort_expression> find_sort_expressions(const data::data_equation& x);
160std::set<data::function_symbol> find_function_symbols(const data::data_equation& x);
161
162} // namespace data
163
164} // namespace mcrl2
165
166#endif // MCRL2_DATA_DATA_EQUATION_H
167
The class basic_sort.
const_iterator end() const
Returns a const_iterator pointing past the last argument.
Definition aterm.h:172
aterm()
Default constructor.
Definition aterm.h:48
const_iterator begin() const
Returns an iterator pointing to the first argument.
Definition aterm.h:165
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
\brief A data equation
data_equation(const atermpp::aterm &term)
data_equation()
\brief Default constructor X3.
const data_expression & lhs() const
const data_expression & condition() const
data_equation(const Container &variables, const data_expression &lhs, const data_expression &rhs, typename atermpp::enable_if_container< Container, variable >::type *=nullptr)
Constructor.
const data_expression & rhs() const
data_equation(data_equation &&) noexcept=default
data_equation(const Container &variables, const data_expression &condition, const data_expression &lhs, const data_expression &rhs, typename atermpp::enable_if_container< Container, variable >::type *=nullptr)
\brief Constructor Z1.
data_equation(const variable_list &variables, const data_expression &condition, const data_expression &lhs, const data_expression &rhs)
\brief Constructor Z12.
const variable_list & variables() const
data_equation(const data_expression &lhs, const data_expression &rhs)
Constructor.
data_equation(const data_equation &) noexcept=default
Move semantics.
The class function symbol.
The main namespace for the aterm++ library.
Definition algorithm.h:21
void make_term_appl(Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
Constructor an aterm in a variable based on a function symbol and an forward iterator providing the a...
Definition aterm.h:213
const atermpp::function_symbol & function_symbol_DataEqn()
bool check_term_DataEqn(const Term &t)
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
bool is_data_equation(const atermpp::aterm &t)
Recognizer function.
void swap(abstraction &t1, abstraction &t2)
\brief swap overload
data::data_equation translate_user_notation(const data::data_equation &x)
Definition data.cpp:90
std::vector< data_equation > data_equation_vector
\brief vector of data_equations
const data_expression & true_()
Definition consistency.h:92
std::string pp(const abstraction &x)
Definition data.cpp:39
atermpp::term_list< data_equation > data_equation_list
\brief list of data_equations
std::set< data::sort_expression > find_sort_expressions(const data::data_equation &x)
Definition data.cpp:91
std::set< data::function_symbol > find_function_symbols(const data::data_equation &x)
Definition data.cpp:101
void make_data_equation(atermpp::aterm &t, const ARGUMENTS &... args)
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