mCRL2
Loading...
Searching...
No Matches
process_initializer.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_LPS_PROCESS_INITIALIZER_H
13#define MCRL2_LPS_PROCESS_INITIALIZER_H
14
15#include "mcrl2/data/print.h"
16#include "mcrl2/data/replace.h"
20
21namespace mcrl2
22{
23
24namespace lps
25{
26
29{
30 public:
33 : atermpp::aterm(core::detail::default_values::LinearProcessInit)
34 {}
35
39 explicit process_initializer(const atermpp::aterm& term, bool check_distribution = true)
40 : atermpp::aterm(term)
41 {
43 const lps::stochastic_distribution& dist = atermpp::down_cast<lps::stochastic_distribution>(term[1]);
44 if (check_distribution && dist.is_defined())
45 {
46 throw mcrl2::runtime_error("initial state with non-empty stochastic distribution encountered");
47 }
48 }
49
52 : atermpp::aterm(core::detail::function_symbol_LinearProcessInit(), expressions, stochastic_distribution())
53 {}
54
56 process_initializer(const process_initializer&) noexcept = default;
58 process_initializer& operator=(const process_initializer&) noexcept = default;
59 process_initializer& operator=(process_initializer&&) noexcept = default;
60
61 data::data_expression_list expressions() const
62 {
63 return atermpp::down_cast<data::data_expression_list>((*this)[0]);
64 }
65};
66
67
68template <class EXPRESSION_LIST>
69inline void make_process_initializer(atermpp::aterm& t, EXPRESSION_LIST args)
70{
72}
73
74
75//--- start generated class process_initializer ---//
78
80typedef std::vector<process_initializer> process_initializer_vector;
81
85inline
87{
89}
90
91// prototype declaration
92std::string pp(const process_initializer& x);
93
98inline
99std::ostream& operator<<(std::ostream& out, const process_initializer& x)
100{
101 return out << lps::pp(x);
102}
103
106{
107 t1.swap(t2);
108}
109//--- end generated class process_initializer ---//
110
111// template function overloads
112std::set<data::variable> find_free_variables(const lps::process_initializer& x);
113std::set<process::action_label> find_action_labels(const lps::process_initializer& x);
114
115} // namespace lps
116
117} // namespace mcrl2
118
119#endif // MCRL2_LPS_PROCESS_INITIALIZER_H
The class action_label.
add your file description here.
aterm()
Default constructor.
Definition aterm.h:48
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
process_initializer(process_initializer &&) noexcept=default
process_initializer(const process_initializer &) noexcept=default
Move semantics.
process_initializer(const data::data_expression_list &expressions)
Constructor.
process_initializer(const atermpp::aterm &term, bool check_distribution=true)
Constructor.
data::data_expression_list expressions() const
process_initializer()
Default constructor.
\brief A stochastic distribution
bool is_defined() const
Returns true if the distribution is defined, i.e. it contains a valid distribution....
Standard exception class for reporting runtime errors.
Definition exception.h:27
Provides utilities for pretty printing.
add your file description here.
The main namespace for the aterm++ library.
Definition algorithm.h:21
const atermpp::function_symbol & function_symbol_LinearProcessInit()
bool check_term_LinearProcessInit(const Term &t)
atermpp::term_list< process_initializer > process_initializer_list
\brief list of process_initializers
std::string pp(const action_summand &x)
Definition lps.cpp:26
std::ostream & operator<<(std::ostream &out, const action_summand &x)
std::set< data::variable > find_free_variables(const lps::deadlock &x)
Definition lps.cpp:54
void swap(action_summand &t1, action_summand &t2)
\brief swap overload
bool is_process_initializer(const atermpp::aterm &x)
std::vector< process_initializer > process_initializer_vector
\brief vector of process_initializers
void make_process_initializer(atermpp::aterm &t, EXPRESSION_LIST args)
void find_action_labels(const T &x, OutputIterator o)
Returns all action labels that occur in an object.
Definition find.h:172
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
add your file description here.
static const atermpp::function_symbol LinearProcessInit