mCRL2
Loading...
Searching...
No Matches
is_linear.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//
9/// \file mcrl2/process/is_linear.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_PROCESS_IS_LINEAR_H
13#define MCRL2_PROCESS_IS_LINEAR_H
14
15#include "mcrl2/process/traverser.h"
16
17namespace mcrl2::process
18{
19
20namespace detail
21{
22
23/// \brief Returns true if the process instance assignment a matches with the process equation eq.
24inline
26{
27 if (inst.identifier() != eq.identifier())
28 {
29 return false;
30 }
31 const data::variable_list& v = eq.formal_parameters();
32
33 // check if the left hand sides of the assignments exist
34 for (const auto& a: inst.assignments())
35 {
36 if (std::find(v.begin(), v.end(), a.lhs()) == v.end())
37 {
38 return false;
39 }
40 }
41 return true;
42}
43
44/// \brief Returns true if the process instance a matches with the process equation eq.
45inline
47{
48 if (eq.identifier() != init.identifier())
49 {
50 return false;
51 }
52 const data::variable_list& v = eq.formal_parameters();
53 const data::data_expression_list& e = init.actual_parameters();
54 data::variable_list::const_iterator i = v.begin();
55 data::data_expression_list::const_iterator j = e.begin();
56 for (; i != v.end(); ++i, ++j)
57 {
58 if (i->sort() != j->sort())
59 {
60 return false;
61 }
62 }
63 return true;
64}
65
66/// \brief Returns true if the argument is a process instance
67inline
69{
72 ;
73}
74
75/// \brief Returns true if the argument is a process instance, optionally wrapped in a stochastic
76/// distribution.
77inline
79{
80 if (is_process(x))
81 {
82 return true;
83 }
85 {
86 return is_process(atermpp::down_cast<stochastic_operator>(x).operand());
87 }
88 return false;
89}
90
91/// \brief Returns true if the argument is a deadlock
92inline
94{
95 return is_delta(x)
96 || is_at(x)
97 ;
98}
99
100/// \brief Returns true if the argument is a multi-action
101inline
103{
104 return is_tau(x)
105 || is_sync(x)
106 || is_action(x)
107 ;
108}
109
110/// \brief Returns true if the argument is a multi-action
111inline
113{
114 return is_at(x)
116}
117
118/// \brief Returns true if the argument is an action prefix
119inline
121{
122 return is_seq(x)
124}
125
126/// \brief Returns true if the argument is a conditional deadlock
127inline
129{
130 return is_if_then(x)
132}
133
134/// \brief Returns true if the argument is a conditional action prefix.
135inline
137{
138 return is_if_then(x)
140}
141
142/// \brief Returns true if the argument is an alternative composition
143inline
145{
146 return is_sum(x)
149 ;
150}
151
152/// \brief Returns true if the argument is a linear process
153inline
155{
156 return is_choice(x)
158 ;
159}
160
161/// \brief Checks if a process equation is linear.
162/// Use the is_linear() member function for this.
164{
166 using super::enter;
167 using super::leave;
168 using super::apply;
169
170 /// \brief The process equation that is checked.
172
173 /// \brief Exception that is thrown by linear_process_expression_traverser.
174 struct non_linear_process_error: public mcrl2::runtime_error
175 {
176 explicit non_linear_process_error(const std::string& msg)
178 {}
179 };
180
182 : eqn(eqn_)
183 {}
184
185 // TODO: check if this function is needed
187 {
189 {
190 throw non_linear_process_error(process::pp(x) + " is not a valid process instance");
191 }
192 }
193
195 {
197 {
198 throw non_linear_process_error(process::pp(x) + " is not a valid process instance assignment");
199 }
200 }
201
202 void enter(const process::sum& x)
203 {
205 {
206 throw non_linear_process_error(process::pp(x.operand()) + " is not an alternative expression");
207 }
208 }
209
210 void enter(const process::block& x)
211 {
212 throw non_linear_process_error("block expression " + process::pp(x) + " encountered");
213 }
214
215 void enter(const process::hide& x)
216 {
217 throw non_linear_process_error("hide expression " + process::pp(x) + " encountered");
218 }
219
220 void enter(const process::rename& x)
221 {
222 throw non_linear_process_error("rename expression " + process::pp(x) + " encountered");
223 }
224
225 void enter(const process::comm& x)
226 {
227 throw non_linear_process_error("comm expression " + process::pp(x) + " encountered");
228 }
229
230 void enter(const process::allow& x)
231 {
232 throw non_linear_process_error("allow expression " + process::pp(x) + " encountered");
233 }
234
235 void enter(const process::sync& x)
236 {
238 {
240 {
241 throw non_linear_process_error(process::pp(x.left()) + " is not a multi action");
242 }
243 else
244 {
245 throw non_linear_process_error(process::pp(x.right()) + " is not a multi action");
246 }
247 }
248 }
249
250 void enter(const process::at& x)
251 {
253 {
254 throw non_linear_process_error(process::pp(x.operand()) + " is not a multi action and not a deadlock");
255 }
256 }
257
258 void enter(const process::seq& x)
259 {
261 {
262 throw non_linear_process_error(process::pp(x.left()) + " is not a timed multi action and not a process");
263 }
266 {
267 right = atermpp::down_cast<stochastic_operator>(right).operand();
268 }
269 if (is_process_instance(right))
270 {
271 const auto& right_ = atermpp::down_cast<process_instance>(right);
272 if (right_.identifier() != eqn.identifier())
273 {
274 throw non_linear_process_error(process::pp(right_) + " has an unexpected identifier");
275 }
276 }
278 {
279 const auto& right_ = atermpp::down_cast<process_instance_assignment>(right);
280 if (right_.identifier() != eqn.identifier())
281 {
282 throw non_linear_process_error(process::pp(right_) + " has an unexpected identifier");
283 }
284 }
285 else
286 {
287 std::cerr << "seq right hand side: " << process::pp(right) << std::endl;
288 throw std::runtime_error("unexpected error in visit_seq");
289 }
290 }
291
292 void enter(const process::if_then& x)
293 {
295 {
296 throw non_linear_process_error(process::pp(x) + " is not an action prefix and not a timed deadlock");
297 }
298 }
299
300 void enter(const process::if_then_else& x)
301 {
302 throw non_linear_process_error("if then else expression " + process::pp(x) + " encountered");
303 }
304
305 void enter(const process::bounded_init& x)
306 {
307 throw non_linear_process_error("bounded init expression " + process::pp(x) + " encountered");
308 }
309
310 void enter(const process::merge& x)
311 {
312 throw non_linear_process_error("merge expression " + process::pp(x) + " encountered");
313 }
314
315 void enter(const process::left_merge& x)
316 {
317 throw non_linear_process_error("left merge expression " + process::pp(x) + " encountered");
318 }
319
320
321 /// \brief Returns true if the process equation e is linear.
322 bool is_linear(const process_expression& x, bool verbose = false)
323 {
324 try
325 {
326 this->apply(x);
327 }
328 catch (non_linear_process_error& p)
329 {
330 if (verbose)
331 {
332 std::clog << p.what() << std::endl;
333 }
334 return false;
335 }
336 return true;
337 }
338};
339
340} // namespace detail
341
342/// \brief Returns true if the process specification is linear.
343inline
344bool is_linear(const process_specification& p, bool verbose = false)
345{
346 if (p.equations().size() != 1)
347 {
348 if (verbose)
349 {
350 std::clog << "warning: the number of equations is not equal to 1" << std::endl;
351 }
352 return false;
353 }
354 const process_equation& eqn = p.equations().front();
356 {
357 if (!visitor.is_linear(eqn.expression(), verbose))
358 {
359 if (verbose)
360 {
361 std::clog << "warning: the first equation is not linear" << std::endl;
362 }
363 return false;
364 }
366 {
367 if (verbose)
368 {
369 std::clog << "warning: the initial process " << process::pp(p.init()) << " is not a process instance or a process instance assignment" << std::endl;
370 }
371 return false;
372 }
373 }
374 return true;
375}
376
377/// \brief Returns true if the process equation is linear.
378inline
380{
382 return f.is_linear(eqn.expression());
383}
384
385/// \brief Returns true if the process expression is linear.
386/// \param x A process expression.
387/// \param eqn The linear equation belonging to the indicated process.
388inline
390{
392 return f.is_linear(x);
393}
394
395} // namespace mcrl2::process
396
397#endif // MCRL2_PROCESS_IS_LINEAR_H
parse_node_unexpected_exception(const parser &p, const parse_node &node)
Definition parse.h:76
\brief Assignment of a data expression to a variable
Definition assignment.h:88
const data_expression & rhs() const
Definition assignment.h:119
const variable & lhs() const
Definition assignment.h:114
data_expression & operator=(const data_expression &) noexcept=default
data_expression & operator=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
Definition data.cpp:107
\brief A sort expression
\brief A data variable
Definition variable.h:25
const sort_expression & sort() const
Definition variable.h:40
action_rename_rule(const data::variable_list &variables, const data::data_expression &condition, const process::action &lhs, const process::process_expression &rhs)
Constructor.
Action rename specification.
process::action_label_list & action_labels()
Returns the sequence of action labels.
LPS summand containing a multi-action.
data::data_expression_list next_state(const data::variable_list &process_parameters) const
Returns the next state corresponding to this summand.
Definition lps.cpp:71
LPS summand containing a deadlock.
Represents a deadlock.
Definition deadlock.h:23
deadlock(data::data_expression time=data::undefined_real())
Constructor.
Definition deadlock.h:33
bool has_time() const
Returns true if time is available.
Definition deadlock.h:39
data::data_expression & time()
Returns the time.
Definition deadlock.h:53
\brief A timed multi-action
bool has_time() const
Returns true if time is available.
const process::action_list & actions() const
multi_action(const process::action &l)
Constructor.
multi_action operator+(const multi_action &other) const
Joins the actions of both multi actions.
multi_action & operator=(multi_action &&) noexcept=default
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor. Actions are sorted to establish the sorted-storage invariant.
process_initializer & operator=(process_initializer &&) noexcept=default
process_initializer(const data::data_expression_list &expressions)
Constructor.
Linear process specification.
\brief A stochastic distribution
stochastic_distribution & operator=(stochastic_distribution &&) noexcept=default
stochastic_distribution()
\brief Default constructor X3.
stochastic_distribution(const data::variable_list &variables, const data::data_expression &distribution)
\brief Constructor Z12.
stochastic_process_initializer(const data::data_expression_list &expressions, const stochastic_distribution &distribution)
Constructor.
\brief An action label
action(const action_label &label, const data::data_expression_list &arguments)
\brief Constructor Z14.
const data::data_expression_list & arguments() const
const action_label & label() const
\brief The allow operator
\brief The at operator
const data::data_expression & time_stamp() const
const process_expression & operand() const
\brief The block operator
\brief The bounded initialization
\brief The choice operator
const process_expression & left() const
const process_expression & right() const
\brief The communication operator
\brief The value delta
delta()
\brief Default constructor X3.
\brief The hide operator
\brief The if-then-else operator
\brief The if-then operator
const process_expression & then_case() const
const data::data_expression & condition() const
\brief The left merge operator
\brief The merge operator
\brief A process equation
process_equation()
\brief Default constructor X3.
process_equation(const process_equation &) noexcept=default
Move semantics.
const data::variable_list & formal_parameters() const
const process_identifier & identifier() const
const process_expression & expression() const
\brief A process expression
process_expression(const process_expression &) noexcept=default
Move semantics.
const process_identifier & identifier() const
const data::data_expression_list & actual_parameters() const
const process_identifier & identifier() const
Process specification consisting of a data specification, action labels, a sequence of process equati...
const process_expression & init() const
Returns the initialization of the process specification.
const process::action_label_list & action_labels() const
Returns the action label specification.
\brief The rename operator
\brief The sequential composition
const process_expression & right() const
const process_expression & left() const
\brief The distribution operator
const data::variable_list & variables() const
const data::data_expression & distribution() const
\brief The sum operator
const process_expression & operand() const
\brief The synchronization operator
const process_expression & left() const
const process_expression & right() const
\brief The value tau
tau()
\brief Default constructor X3.
\brief An untyped multi action or data application
untyped_multi_action()
\brief Default constructor X3.
D_ParserTables parser_tables_mcrl2
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:393
static data_specification const & default_specification()
Definition parse.h:28
bool check_assignment_variables(assignment_list const &assignments, variable_list const &variables)
Returns true if the left hand sides of assignments are contained in variables.
Namespace for system defined sort bool_.
Definition bool.h:29
bool is_bool(const sort_expression &e)
Recogniser for sort expression Bool.
Definition bool.h:51
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:74
Namespace for system defined sort real_.
bool is_real(const sort_expression &e)
Recogniser for sort expression Real.
Definition real1.h:55
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
bool is_well_typed(const T &x)
Checks well typedness of an LPS object.
bool check_action_labels(const process::action_list &actions, const std::set< process::action_label > &labels)
Returns true if the labels of the given actions are contained in labels.
multi_action complete_multi_action(process::untyped_multi_action &x, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Definition lps.cpp:148
bool check_action_label_sorts(const process::action_label_list &action_labels, const std::set< data::sort_expression > &sorts)
Returns true if the sorts of the given action labels are contained in sorts.
bool check_well_typedness(const T &x)
Checks well typedness of an LPS object, and will print error messages to stderr.
bool check_action_sorts(const process::action_list &actions, const std::set< data::sort_expression > &sorts)
Returns true if the sorts of the given actions are contained in sorts.
void complete_action_rename_specification(action_rename_specification &x, const lps::stochastic_specification &spec)
Definition lps.cpp:166
process::untyped_multi_action parse_multi_action_new(const std::string &text)
Definition lps.cpp:130
multi_action complete_multi_action(process::untyped_multi_action &x, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Definition lps.cpp:140
action_rename_specification parse_action_rename_specification_new(const std::string &text)
Definition lps.cpp:156
The main namespace for the LPS library.
Definition constelm.h:18
std::string pp(const lps::stochastic_specification &x, bool arg0)
Definition lps.cpp:40
std::set< data::variable > find_all_variables(const lps::linear_process &x)
Definition lps.cpp:47
std::string pp(const lps::specification &x, bool arg0)
Definition lps.cpp:35
std::set< data::sort_expression > find_sort_expressions(const lps::stochastic_specification &x)
Definition lps.cpp:46
std::string pp_extended(const lps::stochastic_specification &x, const std::string &process_name, bool precedence_aware=true)
Definition lps.cpp:79
std::set< process::action_label > find_action_labels(const lps::stochastic_specification &x)
Definition lps.cpp:68
std::set< data::variable > find_free_variables(const lps::stochastic_specification &x)
Definition lps.cpp:56
std::string pp(const lps::stochastic_distribution &x, bool arg0)
Definition lps.cpp:37
std::string pp_extended(const stochastic_specification &x, const std::string &process_name, bool precedence_aware, bool summand_numbers)
Definition lps.cpp:98
std::set< data::variable > find_all_variables(const lps::multi_action &x)
Returns all variables inside a multi-action.
Definition lps.cpp:52
std::set< data::variable > find_all_variables(const lps::stochastic_specification &x)
Definition lps.cpp:50
bool check_well_typedness(const specification &x)
Definition lps.cpp:118
std::set< data::variable > find_free_variables(const lps::linear_process &x)
Definition lps.cpp:53
bool check_well_typedness(const linear_process &x)
Definition lps.cpp:108
std::set< data::function_symbol > find_function_symbols(const lps::stochastic_specification &x)
Definition lps.cpp:62
std::string pp_extended(const specification &x, const std::string &process_name, bool precedence_aware, bool summand_numbers)
Definition lps.cpp:88
std::set< process::action_label > find_action_labels(const lps::process_initializer &x)
Definition lps.cpp:66
std::set< data::variable > find_free_variables(const lps::specification &x)
Definition lps.cpp:55
multi_action typecheck_multi_action(process::untyped_multi_action &mult_act, const data::data_specification &data_spec, const process::action_label_list &action_decls)
Type check a multi action Throws an exception if something went wrong.
Definition typecheck.h:125
void normalize_sorts(lps::specification &x, const data::sort_specification &)
Definition lps.cpp:42
std::set< data::variable > find_free_variables(const lps::deadlock &x)
Definition lps.cpp:57
std::string pp(const lps::deadlock_summand &x, bool arg0)
Definition lps.cpp:31
std::set< process::action_label > find_action_labels(const lps::linear_process &x)
Definition lps.cpp:65
lps::multi_action normalize_sorts(const lps::multi_action &x, const data::sort_specification &sortspec)
Definition lps.cpp:41
std::set< data::variable > find_free_variables(const lps::stochastic_linear_process &x)
Definition lps.cpp:54
multi_action typecheck_multi_action(process::untyped_multi_action &mult_act, multi_action_type_checker &typechecker)
Type check a multi action Throws an exception if something went wrong.
Definition typecheck.h:141
std::set< data::function_symbol > find_function_symbols(const lps::specification &x)
Definition lps.cpp:61
std::string pp(const lps::stochastic_linear_process &x, bool arg0)
Definition lps.cpp:38
std::set< data::variable > find_free_variables(const lps::stochastic_process_initializer &x)
Definition lps.cpp:60
std::set< data::variable > find_free_variables(const lps::multi_action &x)
Definition lps.cpp:58
std::string pp(const lps::deadlock &x, bool arg0)
Definition lps.cpp:30
void normalize_sorts(lps::stochastic_specification &x, const data::sort_specification &)
Definition lps.cpp:43
std::set< data::variable > find_free_variables(const lps::process_initializer &x)
Definition lps.cpp:59
std::string pp(const lps::stochastic_action_summand &x, bool arg0)
Definition lps.cpp:36
std::string pp(const lps::stochastic_process_initializer &x, bool arg0)
Definition lps.cpp:39
std::string pp(const lps::linear_process &x, bool arg0)
Definition lps.cpp:32
std::string pp(const lps::multi_action &x, bool arg0)
Definition lps.cpp:33
std::set< data::sort_expression > find_sort_expressions(const lps::specification &x)
Definition lps.cpp:45
std::string pp(const lps::action_summand &x, bool arg0)
Definition lps.cpp:29
std::set< data::variable > find_all_variables(const lps::specification &x)
Definition lps.cpp:49
bool check_well_typedness(const stochastic_specification &x)
Definition lps.cpp:123
std::set< data::variable > find_all_variables(const lps::deadlock &x)
Definition lps.cpp:51
action_rename_specification typecheck_action_rename_specification(const action_rename_specification &arspec, const lps::stochastic_specification &lpsspec)
Type checks an action rename specification.
Definition typecheck.h:154
std::set< data::variable > find_all_variables(const lps::stochastic_linear_process &x)
Definition lps.cpp:48
bool check_well_typedness(const stochastic_linear_process &x)
Definition lps.cpp:113
lps::multi_action translate_user_notation(const lps::multi_action &x)
Definition lps.cpp:44
std::set< core::identifier_string > find_identifiers(const lps::stochastic_specification &x)
Definition lps.cpp:64
std::set< core::identifier_string > find_identifiers(const lps::specification &x)
Definition lps.cpp:63
std::set< process::action_label > find_action_labels(const lps::specification &x)
Definition lps.cpp:67
std::string pp(const lps::process_initializer &x, bool arg0)
Definition lps.cpp:34
bool check_process_instance_assignment(const process_equation &eq, const process_instance_assignment &inst)
Returns true if the process instance assignment a matches with the process equation eq.
Definition is_linear.h:25
bool is_process(const process_expression &x)
Returns true if the argument is a process instance.
Definition is_linear.h:68
bool is_conditional_deadlock(const process_expression &x)
Returns true if the argument is a conditional deadlock.
Definition is_linear.h:128
bool is_linear_process_term(const process_expression &x)
Returns true if the argument is a linear process.
Definition is_linear.h:154
bool check_process_instance(const process_equation &eq, const process_instance &init)
Returns true if the process instance a matches with the process equation eq.
Definition is_linear.h:46
bool is_alternative(const process_expression &x)
Returns true if the argument is an alternative composition.
Definition is_linear.h:144
bool is_timed_deadlock(const process_expression &x)
Returns true if the argument is a deadlock.
Definition is_linear.h:93
bool is_action_prefix(const process_expression &x)
Returns true if the argument is an action prefix.
Definition is_linear.h:120
bool is_stochastic_process(const process_expression &x)
Returns true if the argument is a process instance, optionally wrapped in a stochastic distribution.
Definition is_linear.h:78
bool is_multiaction(const process_expression &x)
Returns true if the argument is a multi-action.
Definition is_linear.h:102
bool is_conditional_action_prefix(const process_expression &x)
Returns true if the argument is a conditional action prefix.
Definition is_linear.h:136
bool is_timed_multiaction(const process_expression &x)
Returns true if the argument is a multi-action.
Definition is_linear.h:112
The main namespace for the Process library.
bool is_at(const atermpp::aterm &x)
bool is_linear(const process_specification &p, bool verbose=false)
Returns true if the process specification is linear.
Definition is_linear.h:344
bool is_linear(const process_expression &x, const process_equation &eqn)
Returns true if the process expression is linear.
Definition is_linear.h:389
bool is_process_instance(const atermpp::aterm &x)
bool is_process_instance_assignment(const atermpp::aterm &x)
bool is_tau(const atermpp::aterm &x)
bool is_seq(const atermpp::aterm &x)
bool is_delta(const atermpp::aterm &x)
bool is_linear(const process_equation &eqn)
Returns true if the process equation is linear.
Definition is_linear.h:379
bool is_sum(const atermpp::aterm &x)
bool is_action(const atermpp::aterm &x)
bool is_if_then(const atermpp::aterm &x)
bool is_choice(const atermpp::aterm &x)
bool is_stochastic_operator(const atermpp::aterm &x)
bool is_sync(const atermpp::aterm &x)
core::identifier_string parse_Id(const parse_node &node) const
Definition parse.h:231
const parser & m_parser
Definition parse.h:83
data::data_expression parse_DataExpr(const core::parse_node &node) const
Definition parse_impl.h:208
bool callback_DataSpecElement(const core::parse_node &node, untyped_data_specification &result) const
Definition parse_impl.h:410
std::vector< lps::action_rename_rule > parse_ActionRenameRuleList(const core::parse_node &node) const
Definition parse_impl.h:71
process::action parse_Action_as_action(const core::parse_node &node) const
Definition parse_impl.h:47
bool callback_ActionRenameSpec(const core::parse_node &node, data::untyped_data_specification &dataspec_result, lps::action_rename_specification &result) const
Definition parse_impl.h:87
std::vector< lps::action_rename_rule > parse_ActionRenameRuleSpec(const core::parse_node &node) const
Definition parse_impl.h:76
lps::action_rename_specification parse_ActionRenameSpec(const core::parse_node &node) const
Definition parse_impl.h:119
process::process_expression parse_ActionRenameRuleRHS(const core::parse_node &node) const
Definition parse_impl.h:53
action_rename_actions(const core::parser &parser_)
Definition parse_impl.h:42
lps::action_rename_rule parse_ActionRenameRule(const core::parse_node &node) const
Definition parse_impl.h:61
Function object for applying a substitution to LPS data types.
bool is_well_typed(const linear_process_base< ActionSummand > &p) const
Checks well typedness of a linear process.
bool is_well_typed(const process::action &a) const
Traverses an action.
bool is_well_typed(const action_summand &s) const
Checks well typedness of a summand.
bool check_time(const data::data_expression &t, const std::string &type) const
Checks if the sort of t has type real.
bool is_well_typed(const data::assignment &a) const
Traverses an assignment.
bool check_condition(const data::data_expression &t, const std::string &type) const
Checks if the sort of t has type bool.
bool is_well_typed(const stochastic_specification &spec) const
bool is_well_typed(const data::variable &d) const
Checks well typedness of a variable.
bool check_assignments(const data::assignment_list &l, const std::string &type) const
Checks if the assignments are well typed and have unique left hand sides.
bool is_well_typed(const specification &spec) const
bool is_well_typed(const data::sort_expression &d) const
Checks well typedness of a sort expression.
bool is_well_typed_container(const Container &c) const
Checks well typedness of the elements of a container.
bool is_well_typed(const process::action_label &d) const
Traverses an action label.
bool is_well_typed(const specification_base< LinearProcess, InitialProcessExpression > &spec, const std::set< data::variable > &free_variables) const
Checks well typedness of a linear process specification.
bool is_well_typed(const deadlock &d) const
Checks well typedness of a deadlock.
bool is_well_typed(const data::data_expression &d) const
Checks well typedness of a data expression.
bool is_well_typed(const deadlock_summand &s) const
Checks well typedness of a summand.
bool is_well_typed(const multi_action &a) const
Checks well typedness of a multi-action.
process::untyped_multi_action parse_MultAct(const core::parse_node &node) const
Definition parse_impl.h:29
multi_action_actions(const core::parser &parser_)
Definition parse_impl.h:25
action_actions(const core::parser &parser_)
Definition parse_impl.h:46
Converts a process expression into linear process format. Use the convert member functions for this.
lps::deadlock_summand_vector m_deadlock_summands
The result of the conversion.
process_equation m_equation
The process equation that is checked.
lps::specification convert(const process_specification &p)
Converts a process_specification into a specification. Throws non_linear_process if a non-linear sub-...
void leave(const process::left_merge &x)
Visit left_merge node.
lps::action_summand_vector m_action_summands
The result of the conversion.
void leave(const process::bounded_init &x)
Visit bounded_init node.
void convert(const process_equation &)
Returns true if the process equation e is linear.
void leave(const process::if_then_else &x)
Visit if_then_else node.
Exception that is thrown by linear_process_expression_traverser.
Definition is_linear.h:175
Checks if a process equation is linear. Use the is_linear() member function for this.
Definition is_linear.h:164
linear_process_expression_traverser(const process_equation &eqn_=process_equation())
Definition is_linear.h:181
void enter(const process::process_instance &x)
Definition is_linear.h:186
process_equation eqn
The process equation that is checked.
Definition is_linear.h:171
bool is_linear(const process_expression &x, bool verbose=false)
Returns true if the process equation e is linear.
Definition is_linear.h:322
void enter(const process::process_instance_assignment &x)
Definition is_linear.h:194
Converts a process expression into linear process format. Use the convert member functions for this.
void leave(const process::stochastic_operator &x)
Visit stochastic operator node.
void convert(const process_equation &)
Returns true if the process equation e is linear.
lps::stochastic_action_summand_vector m_action_summands
The result of the conversion.
lps::deadlock_summand_vector m_deadlock_summands
The result of the conversion.
lps::stochastic_specification convert(const process_specification &p)
Converts a process_specification into a stochastic_specification. Throws non_linear_process if a non-...