mCRL2
|
Generic substitution function. The substitution is stored as a mapping of variables to expressions. The substitution is mutable, meaning that substitutions to variables can be added and removed as follows: More...
#include <mutable_map_substitution.h>
Classes | |
struct | assignment |
Wrapper class for internal storage and substitution updates using operator() More... | |
Public Types | |
typedef AssociativeContainer::key_type | variable_type |
typedef AssociativeContainer::mapped_type | expression_type |
typedef AssociativeContainer::const_iterator | const_iterator |
typedef AssociativeContainer::iterator | iterator |
using | argument_type = variable_type |
using | result_type = expression_type |
Public Member Functions | |
mutable_map_substitution ()=default | |
mutable_map_substitution (const AssociativeContainer &m) | |
template<typename VariableContainer , typename ExpressionContainer > | |
mutable_map_substitution (VariableContainer const &variables, ExpressionContainer const &expressions) | |
expression_type | operator() (const variable_type &v) const |
assignment | operator[] (variable_type const &v) |
void | clear () |
Resets the substitution by letting every variable yield itself. Cf. clear() of a map. | |
template<typename Substitution > | |
bool | operator== (const Substitution &) const |
const_iterator | begin () const |
Returns an iterator pointing to the beginning of the sequence of assignments TODO: should become protected. | |
const_iterator | end () const |
Returns an iterator pointing past the end of the sequence of assignments TODO: should become protected. | |
iterator | begin () |
Returns an iterator pointing to the beginning of the sequence of assignments TODO: should become protected. | |
iterator | end () |
Returns an iterator pointing past the end of the sequence of assignments TODO: should become protected. | |
bool | empty () const |
Returns true if the substitution is empty. | |
std::string | to_string () const |
iterator | find (variable_type const &v) |
Returns an iterator that references the expression associated with v or is equal to m_map.end() | |
const_iterator | find (variable_type const &v) const |
Returns an iterator that references the expression associated with v or is equal to m_map.end() | |
Protected Attributes | |
AssociativeContainer | m_map |
Generic substitution function. The substitution is stored as a mapping of variables to expressions. The substitution is mutable, meaning that substitutions to variables can be added and removed as follows:
* mutable_map_substitution sigma; * mutable_map_substitution::variable_type v; * mutable_map_substitution::expression_type e; * sigma[v] = e; // add the assignment of e to v * sigma[v] = v; // remove the assignment to v *
Definition at line 33 of file mutable_map_substitution.h.
using mcrl2::data::mutable_map_substitution< AssociativeContainer >::argument_type = variable_type |
Definition at line 43 of file mutable_map_substitution.h.
typedef AssociativeContainer::const_iterator mcrl2::data::mutable_map_substitution< AssociativeContainer >::const_iterator |
Definition at line 41 of file mutable_map_substitution.h.
typedef AssociativeContainer::mapped_type mcrl2::data::mutable_map_substitution< AssociativeContainer >::expression_type |
Definition at line 40 of file mutable_map_substitution.h.
typedef AssociativeContainer::iterator mcrl2::data::mutable_map_substitution< AssociativeContainer >::iterator |
Definition at line 42 of file mutable_map_substitution.h.
using mcrl2::data::mutable_map_substitution< AssociativeContainer >::result_type = expression_type |
Definition at line 44 of file mutable_map_substitution.h.
typedef AssociativeContainer::key_type mcrl2::data::mutable_map_substitution< AssociativeContainer >::variable_type |
Definition at line 39 of file mutable_map_substitution.h.
|
default |
|
inlineexplicit |
Definition at line 78 of file mutable_map_substitution.h.
|
inline |
Definition at line 83 of file mutable_map_substitution.h.
|
inline |
Returns an iterator pointing to the beginning of the sequence of assignments TODO: should become protected.
Definition at line 140 of file mutable_map_substitution.h.
|
inline |
Returns an iterator pointing to the beginning of the sequence of assignments TODO: should become protected.
Definition at line 126 of file mutable_map_substitution.h.
|
inline |
Resets the substitution by letting every variable yield itself. Cf. clear() of a map.
Definition at line 113 of file mutable_map_substitution.h.
|
inline |
Returns true if the substitution is empty.
Definition at line 153 of file mutable_map_substitution.h.
|
inline |
Returns an iterator pointing past the end of the sequence of assignments TODO: should become protected.
Definition at line 147 of file mutable_map_substitution.h.
|
inline |
Returns an iterator pointing past the end of the sequence of assignments TODO: should become protected.
Definition at line 133 of file mutable_map_substitution.h.
|
inline |
Returns an iterator that references the expression associated with v or is equal to m_map.end()
Definition at line 171 of file mutable_map_substitution.h.
|
inline |
Returns an iterator that references the expression associated with v or is equal to m_map.end()
Definition at line 177 of file mutable_map_substitution.h.
|
inline |
Definition at line 93 of file mutable_map_substitution.h.
|
inline |
Definition at line 119 of file mutable_map_substitution.h.
|
inline |
Definition at line 106 of file mutable_map_substitution.h.
|
inline |
Definition at line 158 of file mutable_map_substitution.h.
|
protected |
Definition at line 36 of file mutable_map_substitution.h.