mCRL2
Loading...
Searching...
No Matches
action_utility.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_DETAIL_ACTION_UTILITY_H
13#define MCRL2_LPS_DETAIL_ACTION_UTILITY_H
14
17
18namespace mcrl2
19{
20
21namespace lps
22{
23
24namespace detail
25{
26
31inline
32bool check_action_sorts(const process::action_list& actions, const std::set<data::sort_expression>& sorts)
33{
34 for (const process::action& a: actions)
35 {
36 for (const data::sort_expression& s: a.label().sorts())
37 {
38 if (!data::detail::check_sort(s, sorts))
39 {
40 return false;
41 }
42 }
43 }
44 return true;
45}
46
51inline
52bool check_action_labels(const process::action_list& actions, const std::set<process::action_label>& labels)
53{
55 for (const process::action& a: actions)
56 {
57 if (!contains(labels, a.label()))
58 {
59 return false;
60 }
61 }
62 return true;
63}
64
69inline
70bool check_action_label_sorts(const process::action_label_list& action_labels, const std::set<data::sort_expression>& sorts)
71{
72 for (const process::action_label& label: action_labels)
73 {
74 for (const data::sort_expression& s: label.sorts())
75 {
76 if (!data::detail::check_sort(s, sorts))
77 {
78 return false;
79 }
80 }
81 }
82 return true;
83}
84
85} // namespace detail
86
87} // namespace lps
88
89} // namespace mcrl2
90
91#endif // MCRL2_LPS_DETAIL_ACTION_UTILITY_H
A list of aterm objects.
Definition aterm_list.h:24
\brief A sort expression
\brief An action label
Add your file description here.
bool check_sort(const sort_expression &s, const SortContainer &sorts)
Returns true if the domain sorts and the codomain sort of the given sort s are contained in sorts.
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.
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_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.
bool contains(const atermpp::indexed_set< Key, ThreadSafe, Hash, Equals, Allocator, KeyTable > &c, const typename atermpp::indexed_set< Key, ThreadSafe, Hash, Equals, Allocator, KeyTable >::key_type &v, const std::size_t thread_index=0)
Definition indexed_set.h:86
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.