12#ifndef MCRL2_LPS_RESOLVE_NAME_CLASHES_H
13#define MCRL2_LPS_RESOLVE_NAME_CLASHES_H
24template <
typename VariableContainer>
25std::set<core::identifier_string>
variable_names(
const VariableContainer& vars)
27 std::set<core::identifier_string> result;
30 result.insert(v.name());
36template <
typename VariableContainer>
37std::set<core::identifier_string>
variable_name_clashes(
const VariableContainer& vars,
const std::set<core::identifier_string>& w)
39 std::set<core::identifier_string> result;
42 if (w.find(v.name()) != w.end())
44 result.insert(v.name());
52 const std::set<core::identifier_string>& process_parameter_names,
56 std::set<core::identifier_string> names =
variable_name_clashes(summation_variables, process_parameter_names);
62 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
67 lps::replace_all_variables(summand,
sigma);
73 const std::set<core::identifier_string>& process_parameter_names,
77 std::set<core::identifier_string> names =
variable_name_clashes(summation_variables, process_parameter_names);
83 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
88 lps::replace_all_variables(summand,
sigma);
94 const std::set<core::identifier_string>& process_parameter_names,
98 std::set<core::identifier_string> summation_names;
103 if (process_parameter_names.find(v.name()) != process_parameter_names.end())
107 summation_names.insert(v.name());
111 lps::replace_all_variables(summand,
sigma);
119 if (process_parameter_names.find(v.name()) != process_parameter_names.end() ||
120 summation_names.find(v.name()) != summation_names.end())
135template <
typename Specification>
138 typename Specification::process_type&
proc = spec.process();
145 for (
typename Specification::process_type::action_summand_type& s:
proc.action_summands())
void add_identifiers(const std::set< core::identifier_string > &ids)
Add a set of identifiers to the context.
Generic substitution function. The substitution is stored as a mapping of variables to expressions....
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
LPS summand containing a multi-action.
const data::assignment_list & assignments() const
Returns the sequence of assignments.
LPS summand containing a deadlock.
LPS summand containing a multi-action.
const stochastic_distribution & distribution() const
Returns the distribution of this summand.
const data::variable_list & variables() const
data::variable_list & summation_variables()
Returns the sequence of summation variables.
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
add your file description here.
std::set< core::identifier_string > function_and_mapping_identifiers(const data_specification &dataspec)
Returns the names of functions and mappings that occur in a data specification.
void resolve_summand_variable_name_clashes(action_summand &summand, const std::set< core::identifier_string > &process_parameter_names, data::set_identifier_generator &generator)
std::set< core::identifier_string > variable_name_clashes(const VariableContainer &vars, const std::set< core::identifier_string > &w)
std::set< core::identifier_string > variable_names(const VariableContainer &vars)
void resolve_summand_variable_name_clashes(Specification &spec)
Renames summand variables such that there are no name clashes between summand variables and process p...
void find_identifiers(const T &x, OutputIterator o)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...