mCRL2
Loading...
Searching...
No Matches
replace_constants_by_variables.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_LPS_REPLACE_CONSTANTS_BY_VARIABLES_H
13#define MCRL2_LPS_REPLACE_CONSTANTS_BY_VARIABLES_H
14
16#include "mcrl2/lps/builder.h"
17
18namespace mcrl2 {
19
20namespace lps {
21
22namespace detail {
23
25{
27 using super::apply;
28 using super::update;
29
31 : super(r, sigma)
32 {}
33};
34
35} // namespace detail
36
40template <typename T>
42 const data::rewriter& r,
44 typename std::enable_if<!std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
45 )
46{
48 f.update(x);
49}
50
54template <typename T>
56 const data::rewriter& r,
58 typename std::enable_if<std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
59)
60{
61 T result;
63 f.apply(result, x);
64 return result;
65}
66
67} // namespace lps
68
69} // namespace mcrl2
70
71#endif // MCRL2_LPS_REPLACE_CONSTANTS_BY_VARIABLES_H
Rewriter that operates on data expressions.
Definition rewriter.h:81
add your file description here.
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
add your file description here.
void replace_constants_by_variables(T &x, const data::rewriter &r, data::mutable_indexed_substitution<> &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Replace each constant data application c in x by a fresh variable v, and add extend the substitution ...
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Replace each constant data application c by a fresh variable v, and add extend the substitution sigma...
data::detail::replace_constants_by_variables_builder< lps::data_expression_builder > super
replace_constants_by_variables_builder(const data::rewriter &r, data::mutable_indexed_substitution<> &sigma)