mCRL2
Loading...
Searching...
No Matches
rewrite.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_REWRITE_H
13#define MCRL2_LPS_REWRITE_H
14
15#include "mcrl2/data/rewrite.h"
16#include "mcrl2/lps/builder.h"
17
18namespace mcrl2 {
19
20namespace lps {
21
22//--- start generated lps rewrite code ---//
26template <typename T, typename Rewriter>
27void rewrite(T& x,
28 Rewriter R,
29 typename std::enable_if<!std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
30 )
31{
32 data::detail::make_rewrite_data_expressions_builder<lps::data_expression_builder>(R).update(x);
33}
34
39template <typename T, typename Rewriter>
40T rewrite(const T& x,
41 Rewriter R,
42 typename std::enable_if<std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
43 )
44{
45 T result;
46 data::detail::make_rewrite_data_expressions_builder<lps::data_expression_builder>(R).apply(result, x);
47 return result;
48}
49
54template <typename T, typename Rewriter, typename Substitution>
55void rewrite(T& x,
56 Rewriter R,
57 const Substitution& sigma,
58 typename std::enable_if<!std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
59 )
60{
61 data::detail::make_rewrite_data_expressions_with_substitution_builder<lps::data_expression_builder>(R, sigma).update(x);
62}
63
69template <typename T, typename Rewriter, typename Substitution>
70T rewrite(const T& x,
71 Rewriter R,
72 const Substitution& sigma,
73 typename std::enable_if<std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr
74 )
75{
76 T result;
77 data::detail::make_rewrite_data_expressions_with_substitution_builder<lps::data_expression_builder>(R, sigma).apply(result, x);
78 return result;
79}
80//--- end generated lps rewrite code ---//
81
82} // namespace lps
83
84} // namespace mcrl2
85
86#endif // MCRL2_LPS_REWRITE_H
add your file description here.
static RewriterCompilingJitty::substitution_type & sigma(RewriterCompilingJitty *this_rewriter)
add your file description here.
void rewrite(T &x, Rewriter R, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Definition rewrite.h:27
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72