12#ifndef MCRL2_MODAL_FORMULA_RESOLVE_NAME_CLASHES_H
13#define MCRL2_MODAL_FORMULA_RESOLVE_NAME_CLASHES_H
23template <
typename Derived>
33 typedef std::map<core::identifier_string, std::vector<core::identifier_string> >
name_map;
50 std::vector<core::identifier_string>& names =
m_names[name];
53 names.push_back(name);
57 names.push_back(
m_generator(std::string(name) +
"_"));
148 std::multiset<data::variable>::const_iterator var_iter=
bound_variables.find(v);
155 i->second.pop_back();
156 if (i->second.empty())
172 return i->second.back();
177 return data::assignment(atermpp::down_cast<data::variable>(sigma(a.lhs())), data::replace_free_variables(a.rhs(), sigma));
191 return i->second.back();
196 return atermpp::down_cast<data::variable>(sigma(v));
303 return i->second.back();
317 core::make_apply_builder<detail::state_variable_name_clash_resolver>().apply(result, x);
Term containing a string.
const_iterator end() const
Returns a const_iterator pointing to the end of the term_list.
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the term_list.
\brief Assignment of a data expression to a variable
void add_identifiers(const std::set< core::identifier_string > &ids)
Add a set of identifiers to the context.
Identifier generator that stores the identifiers of the context in a set. Using the operator()() and ...
const core::identifier_string & name() const
const sort_expression & sort() const
Identifier generator that generates names consisting of a prefix followed by a number....
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
void replace_free_variables(T &x, const Substitution &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
atermpp::term_list< variable > variable_list
\brief list of variables
atermpp::term_list< assignment > assignment_list
\brief list of assignments
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)