mCRL2
Loading...
Searching...
No Matches
action_label.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_PROCESS_ACTION_LABEL_H
13#define MCRL2_PROCESS_ACTION_LABEL_H
14
16
17namespace mcrl2
18{
19
20namespace process
21{
22
23//--- start generated class action_label ---//
26{
27 public:
30 : atermpp::aterm(core::detail::default_values::ActId)
31 {}
32
35 explicit action_label(const atermpp::aterm& term)
36 : atermpp::aterm(term)
37 {
38 assert(core::detail::check_term_ActId(*this));
39 }
40
43 : atermpp::aterm(core::detail::function_symbol_ActId(), name, sorts)
44 {}
45
48 : atermpp::aterm(core::detail::function_symbol_ActId(), core::identifier_string(name), sorts)
49 {}
50
52 action_label(const action_label&) noexcept = default;
53 action_label(action_label&&) noexcept = default;
54 action_label& operator=(const action_label&) noexcept = default;
55 action_label& operator=(action_label&&) noexcept = default;
56
57 const core::identifier_string& name() const
58 {
59 return atermpp::down_cast<core::identifier_string>((*this)[0]);
60 }
61
63 {
64 return atermpp::down_cast<data::sort_expression_list>((*this)[1]);
65 }
66};
67
70template <class... ARGUMENTS>
71inline void make_action_label(atermpp::aterm& t, const ARGUMENTS&... args)
72{
74}
75
78
80typedef std::vector<action_label> action_label_vector;
81
85inline
87{
89}
90
91// prototype declaration
92std::string pp(const action_label& x);
93
98inline
99std::ostream& operator<<(std::ostream& out, const action_label& x)
100{
101 return out << process::pp(x);
102}
103
105inline void swap(action_label& t1, action_label& t2)
106{
107 t1.swap(t2);
108}
109//--- end generated class action_label ---//
110
111// template function overloads
112std::string pp(const action_label_list& x);
113std::string pp(const action_label_vector& x);
115std::set<data::sort_expression> find_sort_expressions(const process::action_label_list& x);
116
117} // namespace process
118
119} // namespace mcrl2
120
121#endif // MCRL2_PROCESS_ACTION_LABEL_H
Term containing a string.
aterm()
Default constructor.
Definition aterm.h:48
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
A list of aterm objects.
Definition aterm_list.h:24
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
\brief An action label
const data::sort_expression_list & sorts() const
action_label()
\brief Default constructor X3.
action_label(const atermpp::aterm &term)
action_label(const std::string &name, const data::sort_expression_list &sorts)
\brief Constructor Z1.
action_label(action_label &&) noexcept=default
const core::identifier_string & name() const
action_label(const action_label &) noexcept=default
Move semantics.
action_label(const core::identifier_string &name, const data::sort_expression_list &sorts)
\brief Constructor Z12.
The class data_specification.
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
bool check_term_ActId(const Term &t)
const atermpp::function_symbol & function_symbol_ActId()
void swap(action_label &t1, action_label &t2)
\brief swap overload
std::set< data::sort_expression > find_sort_expressions(const process::action_label_list &x)
Definition process.cpp:73
bool is_action_label(const atermpp::aterm &x)
action_label_list normalize_sorts(const action_label_list &x, const data::sort_specification &sortspec)
Definition process.cpp:67
void make_action_label(atermpp::aterm &t, const ARGUMENTS &... args)
atermpp::term_list< action_label > action_label_list
\brief list of action_labels
std::string pp(const action_label &x)
Definition process.cpp:36
std::ostream & operator<<(std::ostream &out, const action_label &x)
std::vector< action_label > action_label_vector
\brief vector of action_labels
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
static const atermpp::function_symbol ActId