mCRL2
Loading...
Searching...
No Matches
mutable_substitution_composer.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_DATA_SUBSTITUTIONS_MUTABLE_SUBSTITUTION_COMPOSER_H
13#define MCRL2_DATA_SUBSTITUTIONS_MUTABLE_SUBSTITUTION_COMPOSER_H
14
15#include "mcrl2/data/replace.h"
18
19namespace mcrl2 {
20
21namespace data {
22
24template <typename Substitution>
26{
27 public:
29 using variable_type = typename Substitution::variable_type ;
30
32 using expression_type = typename Substitution::expression_type;
33
36
38 using substitution_type = Substitution;
39
42
43 protected:
45 const Substitution& f_;
46
49
50 public:
52 mutable_substitution_composer(const Substitution& f)
53 : f_(f)
54 {}
55
60 {
62 }
63
65 {
66 return g_[v];
67 }
68
72 {
73 return f_;
74 }
75};
76
78template <typename AssociativeContainer>
80{
81 public:
84
87
90
93
96
97 protected:
100
101 public:
102
106 : g_(g)
107 {}
108
113 {
114 return g_(v);
115 }
116
118 {
119 return g_[v];
120 }
121
125 {
126 return g_;
127 }
128};
129
131template <typename VariableType, typename ExpressionSequence>
132class mutable_substitution_composer<mutable_indexed_substitution<VariableType, ExpressionSequence>>
133{
134 public:
137
140
143
146
149
150 protected:
153
154 public:
155
159 : g_(g)
160 {}
161
166 {
167 return g_(v);
168 }
169
171 {
172 return g_[v];
173 }
174
178 {
179 return g_;
180 }
181};
182
183} // namespace data
184
185} // namespace mcrl2
186
187#endif // MCRL2_DATA_SUBSTITUTIONS_MUTABLE_SUBSTITUTION_COMPOSER_H
ExpressionType expression_type
Type of expressions.
Generic substitution function. The substitution is stored as a mapping of variables to expressions....
AssociativeContainer::key_type variable_type
AssociativeContainer::mapped_type expression_type
typename substitution_type::assignment assignment
Wrapper class for internal storage and substitution updates using operator().
const expression_type operator()(variable_type const &v) const
Apply on single single variable expression.
mutable_substitution_composer(mutable_map_substitution< AssociativeContainer > &g)
Constructor with mutable substitution object.
typename substitution_type::variable_type variable_type
type used to represent variables.
typename substitution_type::assignment assignment
Wrapper class for internal storage and substitution updates using operator().
const expression_type operator()(variable_type const &v) const
Apply on single single variable expression.
substitution_type & g_
object on which substitution manipulations are performed.
typename substitution_type::expression_type expression_type
type used to represent expressions.
An adapter that makes an arbitrary substitution function mutable.
const substitution_type & substitution() const
Returns the wrapped substitution.
mutable_substitution_composer(const Substitution &f)
Constructor.
typename Substitution::variable_type variable_type
type used to represent variables.
const Substitution & f_
The wrapped substitution.
mutable_map_substitution< std::map< variable_type, expression_type > > g_
An additional mutable substitution.
Substitution substitution_type
The type of the wrapped substitution.
expression_type operator()(variable_type const &v) const
Apply on single single variable expression.
typename Substitution::expression_type expression_type
type used to represent expressions.
typename mutable_map_substitution< std::map< variable_type, expression_type > >::assignment assignment
Wrapper class for internal storage and substitution updates using operator().
add your file description here.
add your file description here.
add your file description here.
void replace_free_variables(T &x, const Substitution &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Definition replace.h:255
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Wrapper class for internal storage and substitution updates using operator()
Wrapper class for internal storage and substitution updates using operator()