12#ifndef MCRL2_DATA_XYZ_IDENTIFIER_GENERATOR_H
13#define MCRL2_DATA_XYZ_IDENTIFIER_GENERATOR_H
15#include "mcrl2/data/set_identifier_generator.h"
54 throw mcrl2::runtime_error(
"Unexpected character in xyz_identifier_generator: " + std::string(1, m_char));
57 return m_index < 0 ? std::string(1, m_char) : std::string(1, m_char) + std::to_string(m_index);
80 core::identifier_string
operator()(
const std::string& hint,
bool add_to_context =
true)
override
82 core::identifier_string result(hint);
84 if (m_identifiers.find(hint) != m_identifiers.end())
90 result = core::identifier_string(next());
92 while (m_identifiers.find(result) != m_identifiers.end());
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
A unordered_map class in which aterms can be stored.
Identifier generator that stores the identifiers of the context in a multiset. If an identifier occur...
void add_identifier(const core::identifier_string &s) override
Adds the identifier s to the context.
Identifier generator that generates names from the range X, Y, Z, X0, Y0, Z0, X1, ....
xyz_identifier_generator(const std::set< core::identifier_string > &ids)
Constructor.
core::identifier_string operator()(const std::string &hint, bool add_to_context=true) override
Returns hint if it isn't in the context yet. Else the next available identifier in the range X,...
xyz_identifier_generator()
Constructor.
int m_index
The index of the last generated identifier.
std::string next()
Returns the next name in the range X, Y, Z, X0, Y0, Z0, X1, ...
char m_char
The character of the last generated identifier.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
bool is_assignment(const atermpp::aterm &x)
The main namespace for the LPS library.
bool is_multi_action(const atermpp::aterm &x)