12#ifndef MCRL2_MODAL_FORMULA_FIND_H
13#define MCRL2_MODAL_FORMULA_FIND_H
15#include "mcrl2/process/find.h"
16#include "mcrl2/modal_formula/add_binding.h"
17#include "mcrl2/modal_formula/traverser.h"
29template <
typename T,
typename OutputIterator>
41 std::set<data::variable> result;
42 action_formulas::find_all_variables(x, std::inserter(result, result.end()));
49template <
typename T,
typename OutputIterator>
59template <
typename T,
typename OutputIterator,
typename VariableContainer>
71 std::set<data::variable> result;
72 action_formulas::find_free_variables(x, std::inserter(result, result.end()));
80template <
typename T,
typename VariableContainer>
83 std::set<data::variable> result;
84 action_formulas::find_free_variables_with_bound(x, std::inserter(result, result.end()), bound);
91template <
typename T,
typename OutputIterator>
103 std::set<core::identifier_string> result;
104 action_formulas::find_identifiers(x, std::inserter(result, result.end()));
111template <
typename T,
typename OutputIterator>
123 std::set<data::sort_expression> result;
124 action_formulas::find_sort_expressions(x, std::inserter(result, result.end()));
131template <
typename T,
typename OutputIterator>
143 std::set<data::function_symbol> result;
144 action_formulas::find_function_symbols(x, std::inserter(result, result.end()));
158template <
typename T,
typename OutputIterator>
170 std::set<data::variable> result;
171 regular_formulas::find_all_variables(x, std::inserter(result, result.end()));
178template <
typename T,
typename OutputIterator>
188template <
typename T,
typename OutputIterator,
typename VariableContainer>
200 std::set<data::variable> result;
201 regular_formulas::find_free_variables(x, std::inserter(result, result.end()));
209template <
typename T,
typename VariableContainer>
212 std::set<data::variable> result;
213 regular_formulas::find_free_variables_with_bound(x, std::inserter(result, result.end()), bound);
220template <
typename T,
typename OutputIterator>
232 std::set<core::identifier_string> result;
233 regular_formulas::find_identifiers(x, std::inserter(result, result.end()));
240template <
typename T,
typename OutputIterator>
252 std::set<data::sort_expression> result;
253 regular_formulas::find_sort_expressions(x, std::inserter(result, result.end()));
260template <
typename T,
typename OutputIterator>
272 std::set<data::function_symbol> result;
273 regular_formulas::find_function_symbols(x, std::inserter(result, result.end()));
287template <
typename T,
typename OutputIterator>
299 std::set<data::variable> result;
300 state_formulas::find_all_variables(x, std::inserter(result, result.end()));
307template <
typename T,
typename OutputIterator>
317template <
typename T,
typename OutputIterator,
typename VariableContainer>
329 std::set<data::variable> result;
330 state_formulas::find_free_variables(x, std::inserter(result, result.end()));
338template <
typename T,
typename VariableContainer>
341 std::set<data::variable> result;
342 state_formulas::find_free_variables_with_bound(x, std::inserter(result, result.end()), bound);
349template <
typename T,
typename OutputIterator>
361 std::set<core::identifier_string> result;
362 state_formulas::find_identifiers(x, std::inserter(result, result.end()));
369template <
typename T,
typename OutputIterator>
381 std::set<data::sort_expression> result;
382 state_formulas::find_sort_expressions(x, std::inserter(result, result.end()));
389template <
typename T,
typename OutputIterator>
401 std::set<data::function_symbol> result;
402 state_formulas::find_function_symbols(x, std::inserter(result, result.end()));
421 names.insert(x.name());
425template <
template <
class>
class Traverser,
class OutputIterator>
445template <
template <
class>
class Traverser,
class OutputIterator>
449 return find_state_variables_traverser<Traverser, OutputIterator>(out);
452template <
template <
class>
class Traverser,
template <
template <
class>
class,
class>
class Binder,
class OutputIterator>
470
471
472
473
474
475
476
487template <
template <
class>
class Traverser,
template <
template <
class>
class,
class>
class Binder,
class OutputIterator>
491 return find_free_state_variables_traverser<Traverser, Binder, OutputIterator>(out);
494template <
template <
class>
class Traverser,
template <
template <
class>
class,
class>
class Binder,
class OutputIterator,
class VariableContainer>
498 return find_free_state_variables_traverser<Traverser, Binder, OutputIterator>(out, v);
516template <
typename T,
typename OutputIterator>
528 std::set<state_formulas::variable> result;
529 state_formulas::find_state_variables(x, std::inserter(result, result.end()));
536template <
typename T,
typename OutputIterator>
548 std::set<state_formulas::variable> result;
549 state_formulas::find_free_state_variables(x, std::inserter(result, result.end()));
556template <
typename T,
typename OutputIterator>
568 std::set<process::action_label> result;
569 state_formulas::find_action_labels(x, std::inserter(result, result.end()));
aterm_string(const aterm_string &t) noexcept=default
aterm()
Default constructor.
A unordered_map class in which aterms can be stored.
parse_node_unexpected_exception(const parser &p, const parse_node &node)
\brief Assignment of a data expression to a variable
assignment(const variable &lhs, const data_expression &rhs)
\brief Constructor Z14.
const sort_expression & element_sort() const
sort_expression sort() const
Returns the sort of the data expression.
void translate_user_notation()
Translate user notation within the equations of the data specification.
data_specification()=default
Default constructor. Generate a data specification that contains only booleans and positive numbers.
data_type_checker(const data_specification &data_spec)
make a data type checker. Throws a mcrl2::runtime_error exception if the data_specification is not we...
data_specification operator()() const
Yields a type checked data specification, provided typechecking was successful. If not successful an ...
const data_specification & typechecked_data_specification() const
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
\brief An untyped parameter
const core::identifier_string & name() const
const data_expression_list & arguments() const
variable(const core::identifier_string &name, const sort_expression &sort)
Constructor.
Linear process specification.
Linear process specification.
stochastic_specification(const specification &other)
Constructor. This constructor is explicit as implicit conversions of this kind is a source of bugs.
\brief An untyped multi action or data application
std::map< core::identifier_string, data::sort_expression_list > m_state_variables
bool is_declared(const core::identifier_string &name) const
data::sort_expression_list matching_state_variable_sorts(const core::identifier_string &name, const data::data_expression_list &arguments) const
void add_state_variable(const core::identifier_string &name, const data::variable_list ¶meters, const data::sort_type_checker &sort_typechecker)
D_ParserTables parser_tables_mcrl2
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
void warn_left_merge_merge(const parse_node &)
Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
void warn_and_or(const parse_node &)
Prints a warning for each occurrence of 'x && y || z' in the parse tree.
Namespace for system defined sort bag.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort bool_.
const basic_sort & bool_()
Constructor for sort expression Bool.
Namespace for system defined sort fbag.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Namespace for system defined sort fset.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
Namespace for system defined sort int_.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
bool is_int(const sort_expression &e)
Recogniser for sort expression Int.
Namespace for system defined sort list.
application element_at(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol ..
Namespace for system defined sort nat.
bool is_nat(const sort_expression &e)
Recogniser for sort expression Nat.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort pos.
bool is_pos(const sort_expression &e)
Recogniser for sort expression Pos.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort real_.
bool is_real(const sort_expression &e)
Recogniser for sort expression Real.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Namespace for system defined sort set_.
bool is_union_application(const atermpp::aterm &e)
Recogniser for application of +.
application union_(const sort_expression &s, const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
int precedence(const data_expression &x)
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
data_specification merge_data_specifications(const data_specification &dataspec1, const data_specification &dataspec2)
Merges two data specifications. Throws an exception if conflicts are detected.
bool is_untyped_data_parameter(const atermpp::aterm &x)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
The main namespace for the LPS library.
specification remove_stochastic_operators(const stochastic_specification &spec)
Converts a stochastic specification to a specification. Throws an exception if non-empty distribution...
The main namespace for the Process library.
action_label_list merge_action_specifications(const action_label_list &actspec1, const action_label_list &actspec2)
Merges two action specifications.
bool is_untyped_multi_action(const atermpp::aterm &x)
expression builder that visits all sub expressions
core::identifier_string parse_Id(const parse_node &node) const
expression traverser that visits all sub expressions
data::data_expression parse_DataValExpr(const core::parse_node &node) const
data::data_expression parse_DataExpr(const core::parse_node &node) const
bool callback_DataSpecElement(const core::parse_node &node, untyped_data_specification &result) const
data::sort_expression parse_SortExpr(const core::parse_node &node, data::sort_expression_list *product=nullptr) const
data_specification construct_data_specification() const
multi_action_actions(const core::parser &parser_)