mCRL2
Loading...
Searching...
No Matches
propositional_variable.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_PBES_PROPOSITIONAL_VARIABLE_H
13#define MCRL2_PBES_PROPOSITIONAL_VARIABLE_H
14
15#include "mcrl2/core/print.h"
16#include "mcrl2/data/parse.h"
17
18namespace mcrl2
19{
20
21namespace pbes_system
22{
23
24//--- start generated class propositional_variable ---//
27{
28 public:
31 : atermpp::aterm_appl(core::detail::default_values::PropVarDecl)
32 {}
33
37 : atermpp::aterm_appl(term)
38 {
40 }
41
44 : atermpp::aterm_appl(core::detail::function_symbol_PropVarDecl(), name, parameters)
45 {}
46
49 : atermpp::aterm_appl(core::detail::function_symbol_PropVarDecl(), core::identifier_string(name), parameters)
50 {}
51
55 propositional_variable& operator=(const propositional_variable&) noexcept = default;
56 propositional_variable& operator=(propositional_variable&&) noexcept = default;
57
58 const core::identifier_string& name() const
59 {
60 return atermpp::down_cast<core::identifier_string>((*this)[0]);
61 }
62
64 {
65 return atermpp::down_cast<data::variable_list>((*this)[1]);
66 }
67//--- start user section propositional_variable ---//
68
70 : propositional_variable(name, data::variable_list())
71 {}
72
73 explicit propositional_variable(const std::string& name)
74 : propositional_variable(atermpp::aterm_string(name))
75 {}
76
77//--- end user section propositional_variable ---//
78};
79
82template <class... ARGUMENTS>
83inline void make_propositional_variable(atermpp::aterm_appl& t, const ARGUMENTS&... args)
84{
86}
87
90
92typedef std::vector<propositional_variable> propositional_variable_vector;
93
97inline
99{
101}
102
103// prototype declaration
104std::string pp(const propositional_variable& x);
105
110inline
111std::ostream& operator<<(std::ostream& out, const propositional_variable& x)
112{
113 return out << pbes_system::pp(x);
114}
115
118{
119 t1.swap(t2);
120}
121//--- end generated class propositional_variable ---//
122
123// template function overloads
124std::string pp(const propositional_variable_list& x);
125std::string pp(const propositional_variable_vector& x);
126
127} // namespace pbes_system
128
129} // namespace mcrl2
130
131#endif // MCRL2_PBES_PROPOSITIONAL_VARIABLE_H
Term containing a string.
The aterm base class that provides protection of the underlying shared terms.
Definition aterm.h:186
const function_symbol & function() const
Returns the function symbol belonging to an aterm_appl.
Definition aterm_appl.h:174
void swap(unprotected_aterm &t) noexcept
Swaps this term with its argument.
Definition aterm.h:156
\brief A propositional variable declaration
const data::variable_list & parameters() const
propositional_variable(const std::string &name, const data::variable_list &parameters)
\brief Constructor.
propositional_variable(const propositional_variable &) noexcept=default
Move semantics.
const core::identifier_string & name() const
propositional_variable()
\brief Default constructor.
propositional_variable(propositional_variable &&) noexcept=default
propositional_variable(const atermpp::aterm_string &name)
propositional_variable(const core::identifier_string &name, const data::variable_list &parameters)
\brief Constructor.
Functions for pretty printing ATerms.
Parser for data specifications.
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_appl in a variable based on a function symbol and an forward iterator providing ...
Definition aterm_appl.h:239
const atermpp::function_symbol & function_symbol_PropVarDecl()
bool check_term_PropVarDecl(const Term &t)
void make_propositional_variable(atermpp::aterm_appl &t, const ARGUMENTS &... args)
std::vector< propositional_variable > propositional_variable_vector
\brief vector of propositional_variables
std::ostream & operator<<(std::ostream &os, const absinthe_strategy strategy)
bool is_propositional_variable(const atermpp::aterm_appl &x)
atermpp::term_list< propositional_variable > propositional_variable_list
\brief list of propositional_variables
void swap(fixpoint_symbol &t1, fixpoint_symbol &t2)
\brief swap overload
std::string pp(const fixpoint_symbol &x)
Definition pbes.cpp:37
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 PropVarDecl