mCRL2
Loading...
Searching...
No Matches
mcrl2::data::maintain_variables_in_rhs< Substitution > Class Template Reference

Wrapper that extends any substitution to a substitution maintaining the vars in its rhs. More...

#include <maintain_variables_in_rhs.h>

Inheritance diagram for mcrl2::data::maintain_variables_in_rhs< Substitution >:

Classes

class  assignment
 Wrapper class for internal storage and substitution updates using operator() More...
 

Public Types

typedef Substitution super
 
typedef super::variable_type variable_type
 
typedef super::expression_type expression_type
 

Public Member Functions

 maintain_variables_in_rhs ()
 Default constructor.
 
assignment operator[] (variable_type const &v)
 Assigment operator.
 
void clear ()
 Clear substitutions.
 
const std::multiset< variable > & variables_in_rhs ()
 Provides a set of variables that occur in the right hand sides of the assignments.
 
bool variable_occurs_in_a_rhs (const variable_type &v)
 Indicates whether a variable occurs in some rhs of this substitution.
 

Protected Attributes

std::multiset< variable_typem_variables_in_rhs
 
std::set< variable_typem_scratch_set
 

Detailed Description

template<typename Substitution>
class mcrl2::data::maintain_variables_in_rhs< Substitution >

Wrapper that extends any substitution to a substitution maintaining the vars in its rhs.

This substitution assumes a function variable -> std::size_t, that, for each variable gives a unique index. The substitutions are stored internally as a vector, mapping std::size_t to expression. Provided that, given a variable, its index can be computed in O(1) time, insertion is O(1) amortized, and lookup is O(1). Memory required is O(n) where n is the largest index used.

Definition at line 35 of file maintain_variables_in_rhs.h.

Member Typedef Documentation

◆ expression_type

template<typename Substitution >
typedef super::expression_type mcrl2::data::maintain_variables_in_rhs< Substitution >::expression_type

Definition at line 40 of file maintain_variables_in_rhs.h.

◆ super

template<typename Substitution >
typedef Substitution mcrl2::data::maintain_variables_in_rhs< Substitution >::super

Definition at line 38 of file maintain_variables_in_rhs.h.

◆ variable_type

template<typename Substitution >
typedef super::variable_type mcrl2::data::maintain_variables_in_rhs< Substitution >::variable_type

Definition at line 39 of file maintain_variables_in_rhs.h.

Constructor & Destructor Documentation

◆ maintain_variables_in_rhs()

template<typename Substitution >
mcrl2::data::maintain_variables_in_rhs< Substitution >::maintain_variables_in_rhs ( )
inline

Default constructor.

Definition at line 48 of file maintain_variables_in_rhs.h.

Member Function Documentation

◆ clear()

template<typename Substitution >
void mcrl2::data::maintain_variables_in_rhs< Substitution >::clear ( )
inline

Clear substitutions.

Definition at line 113 of file maintain_variables_in_rhs.h.

◆ operator[]()

template<typename Substitution >
assignment mcrl2::data::maintain_variables_in_rhs< Substitution >::operator[] ( variable_type const &  v)
inline

Assigment operator.

Parameters
vThe variable to which the assignment is carried out.

Definition at line 107 of file maintain_variables_in_rhs.h.

◆ variable_occurs_in_a_rhs()

template<typename Substitution >
bool mcrl2::data::maintain_variables_in_rhs< Substitution >::variable_occurs_in_a_rhs ( const variable_type v)
inline

Indicates whether a variable occurs in some rhs of this substitution.

Parameters
vThe variable for which occurrence in a rhs is checked.

Definition at line 127 of file maintain_variables_in_rhs.h.

◆ variables_in_rhs()

template<typename Substitution >
const std::multiset< variable > & mcrl2::data::maintain_variables_in_rhs< Substitution >::variables_in_rhs ( )
inline

Provides a set of variables that occur in the right hand sides of the assignments.

Definition at line 120 of file maintain_variables_in_rhs.h.

Member Data Documentation

◆ m_scratch_set

template<typename Substitution >
std::set<variable_type> mcrl2::data::maintain_variables_in_rhs< Substitution >::m_scratch_set
protected

Definition at line 44 of file maintain_variables_in_rhs.h.

◆ m_variables_in_rhs

template<typename Substitution >
std::multiset<variable_type> mcrl2::data::maintain_variables_in_rhs< Substitution >::m_variables_in_rhs
protected

Definition at line 43 of file maintain_variables_in_rhs.h.


The documentation for this class was generated from the following file: