|
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 | |
| using | variable_type = typename AssociativeContainer::key_type |
| using | expression_type = typename AssociativeContainer::mapped_type |
| using | const_iterator = typename AssociativeContainer::const_iterator |
| using | iterator = typename AssociativeContainer::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<IsSubstitution 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() | |
Static Public Attributes | |
| static constexpr bool | is_identity_substitution =false |
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.
| using mcrl2::data::mutable_map_substitution< AssociativeContainer >::const_iterator = typename AssociativeContainer::const_iterator |
Definition at line 41 of file mutable_map_substitution.h.
| using mcrl2::data::mutable_map_substitution< AssociativeContainer >::expression_type = typename AssociativeContainer::mapped_type |
Definition at line 40 of file mutable_map_substitution.h.
| using mcrl2::data::mutable_map_substitution< AssociativeContainer >::iterator = typename 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.
| using mcrl2::data::mutable_map_substitution< AssociativeContainer >::variable_type = typename AssociativeContainer::key_type |
Definition at line 39 of file mutable_map_substitution.h.
|
default |
|
inlineexplicit |
Definition at line 80 of file mutable_map_substitution.h.
|
inline |
Definition at line 85 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 142 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 128 of file mutable_map_substitution.h.
|
inline |
Resets the substitution by letting every variable yield itself. Cf. clear() of a map.
Definition at line 115 of file mutable_map_substitution.h.
|
inline |
Returns true if the substitution is empty.
Definition at line 155 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 149 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 135 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 173 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 179 of file mutable_map_substitution.h.
|
inline |
Definition at line 95 of file mutable_map_substitution.h.
|
inline |
Definition at line 121 of file mutable_map_substitution.h.
|
inline |
Definition at line 108 of file mutable_map_substitution.h.
|
inline |
Definition at line 160 of file mutable_map_substitution.h.
|
staticconstexpr |
Definition at line 46 of file mutable_map_substitution.h.
|
protected |
Definition at line 36 of file mutable_map_substitution.h.