mCRL2
Loading...
Searching...
No Matches
find.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_FIND_H
13#define MCRL2_LPS_FIND_H
14
16#include "mcrl2/lps/traverser.h"
17#include "mcrl2/process/find.h"
18
19namespace mcrl2
20{
21
22namespace lps
23{
24
25//--- start generated lps find code ---//
30template <typename T, typename OutputIterator>
31void find_all_variables(const T& x, OutputIterator o)
32{
33 data::detail::make_find_all_variables_traverser<lps::variable_traverser>(o).apply(x);
34}
35
39template <typename T>
40std::set<data::variable> find_all_variables(const T& x)
41{
42 std::set<data::variable> result;
43 lps::find_all_variables(x, std::inserter(result, result.end()));
44 return result;
45}
46
51template <typename T, typename OutputIterator>
52void find_free_variables(const T& x, OutputIterator o)
53{
54 data::detail::make_find_free_variables_traverser<lps::data_expression_traverser, lps::add_data_variable_traverser_binding>(o).apply(x);
55}
56
62template <typename T, typename OutputIterator, typename VariableContainer>
63void find_free_variables_with_bound(const T& x, OutputIterator o, const VariableContainer& bound)
64{
65 data::detail::make_find_free_variables_traverser<lps::data_expression_traverser, lps::add_data_variable_traverser_binding>(o, bound).apply(x);
66}
67
71template <typename T>
72std::set<data::variable> find_free_variables(const T& x)
73{
74 std::set<data::variable> result;
75 lps::find_free_variables(x, std::inserter(result, result.end()));
76 return result;
77}
78
83template <typename T, typename VariableContainer>
84std::set<data::variable> find_free_variables_with_bound(const T& x, VariableContainer const& bound)
85{
86 std::set<data::variable> result;
87 lps::find_free_variables_with_bound(x, std::inserter(result, result.end()), bound);
88 return result;
89}
90
95template <typename T, typename OutputIterator>
96void find_identifiers(const T& x, OutputIterator o)
97{
98 data::detail::make_find_identifiers_traverser<lps::identifier_string_traverser>(o).apply(x);
99}
100
104template <typename T>
105std::set<core::identifier_string> find_identifiers(const T& x)
106{
107 std::set<core::identifier_string> result;
108 lps::find_identifiers(x, std::inserter(result, result.end()));
109 return result;
110}
111
116template <typename T, typename OutputIterator>
117void find_sort_expressions(const T& x, OutputIterator o)
118{
119 data::detail::make_find_sort_expressions_traverser<lps::sort_expression_traverser>(o).apply(x);
120}
121
125template <typename T>
126std::set<data::sort_expression> find_sort_expressions(const T& x)
127{
128 std::set<data::sort_expression> result;
129 lps::find_sort_expressions(x, std::inserter(result, result.end()));
130 return result;
131}
132
137template <typename T, typename OutputIterator>
138void find_function_symbols(const T& x, OutputIterator o)
139{
140 data::detail::make_find_function_symbols_traverser<lps::data_expression_traverser>(o).apply(x);
141}
142
146template <typename T>
147std::set<data::function_symbol> find_function_symbols(const T& x)
148{
149 std::set<data::function_symbol> result;
150 lps::find_function_symbols(x, std::inserter(result, result.end()));
151 return result;
152}
153//--- end generated lps find code ---//
154
159template <typename T>
160bool search_free_variable(const T& x, const data::variable& v)
161{
162 data::detail::search_free_variable_traverser<lps::data_expression_traverser, lps::add_data_variable_traverser_binding> f(v);
163 f.apply(x);
164 return f.found;
165}
166
171template <typename T, typename OutputIterator>
172void find_action_labels(const T& x, OutputIterator o)
173{
174 process::detail::make_find_action_labels_traverser<lps::action_label_traverser>(o).apply(x);
175}
176
180template <typename T>
181std::set<process::action_label> find_action_labels(const T& x)
182{
183 std::set<process::action_label> result;
184 lps::find_action_labels(x, std::inserter(result, result.end()));
185 return result;
186}
187
188} // namespace lps
189
190} // namespace mcrl2
191
192#endif
\brief A data variable
Definition variable.h:28
add your file description here.
add your file description here.
void find_function_symbols(const T &x, OutputIterator o)
Definition find.h:138
bool search_free_variable(const T &x, const data::variable &v)
Returns true if the term has a given free variable as subterm.
Definition find.h:160
void find_sort_expressions(const T &x, OutputIterator o)
Definition find.h:117
std::set< data::variable > find_free_variables(const lps::deadlock &x)
Definition lps.cpp:54
void find_identifiers(const T &x, OutputIterator o)
Definition find.h:96
void find_free_variables_with_bound(const T &x, OutputIterator o, const VariableContainer &bound)
Definition find.h:63
std::set< data::variable > find_all_variables(const lps::deadlock &x)
Definition lps.cpp:48
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.