mCRL2
Loading...
Searching...
No Matches
one_point_rule_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_ONE_POINT_RULE_REWRITE_H
13#define MCRL2_LPS_ONE_POINT_RULE_REWRITE_H
14
16#include "mcrl2/lps/builder.h"
17
18namespace mcrl2 {
19
20namespace lps {
21
22namespace detail {
23
24
25
26struct one_point_rule_rewrite_builder: public lps::data_expression_builder<one_point_rule_rewrite_builder>
27{
29 using super::apply;
30 using super::update;
31
33
34 template <class T>
35 void apply(T& result, const data::data_expression& x)
36 {
37 result = r(x);
38 }
39};
40
41} // namespace detail
42
45template <typename T>
46void one_point_rule_rewrite(T& x, typename std::enable_if<!std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr)
47{
49 f.update(x);
50}
51
55template <typename T>
56T one_point_rule_rewrite(const T& x, typename std::enable_if<std::is_base_of<atermpp::aterm, T>::value>::type* = nullptr)
57{
58 T result;
60 f.apply(result, x);
61 return result;
62}
63
64} // namespace lps
65
66} // namespace mcrl2
67
68#endif // MCRL2_LPS_ONE_POINT_RULE_REWRITE_H
add your file description here.
add your file description here.
void one_point_rule_rewrite(T &x, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)
Applies the one point rule rewriter to all embedded data expressions in an object x.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
void apply(T &result, const lps::multi_action &x)
Definition builder.h:212
void update(lps::deadlock &x)
Definition builder.h:202
void apply(T &result, const data::data_expression &x)
lps::data_expression_builder< one_point_rule_rewrite_builder > super