mCRL2
Loading...
Searching...
No Matches
anonymize.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//
9/// \file mcrl2/pbes/anonymize.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_PBES_ANONYMIZE_H
13#define MCRL2_PBES_ANONYMIZE_H
14
15#include "mcrl2/data/anonymize.h"
16#include "mcrl2/pbes/builder.h"
17
18namespace mcrl2::pbes_system {
19
20namespace detail {
21
22template <typename Derived>
24{
26 using super::enter;
27 using super::leave;
28 using super::update;
29 using super::apply;
30 using super::add_name;
31 using super::derived;
32
34
35 void update(pbes& x)
36 {
37 super::update(x.data());
38 super::update(x);
39 }
40
42 {
43 add_name(x.name(), propositional_variable_name_substitution, "X");
44 }
45
46 template <class T>
47 void apply(T& result, const propositional_variable& x)
48 {
49 derived().enter(x);
50 data::variable_list parameters;
51 derived().apply(parameters, x.parameters());
52 make_propositional_variable(result,propositional_variable_name_substitution[x.name()], parameters);
53 derived().leave(x);
54 }
55
57 {
58 add_name(x.name(), propositional_variable_name_substitution, "X");
59 }
60
61 template <class T>
63 {
64 derived().enter(x);
65 data::data_expression_list parameters;
66 derived().apply(parameters, x.parameters());
67 make_propositional_variable_instantiation(result, propositional_variable_name_substitution[x.name()], parameters);
68 derived().leave(x);
69 }
70};
71
73{
74};
75
76} // namespace detail
77
78inline
79void anonymize(pbes& pbesspec)
80{
82 f.update(pbesspec);
83}
84
85} // namespace mcrl2::pbes_system
86
87
88
89#endif // MCRL2_PBES_ANONYMIZE_H
parameterized boolean equation system
Definition pbes.h:54
\brief A propositional variable instantiation
\brief A propositional variable declaration
void anonymize(pbes &pbesspec)
Definition anonymize.h:79
void enter(const propositional_variable_instantiation &x)
Definition anonymize.h:56
std::map< core::identifier_string, core::identifier_string > propositional_variable_name_substitution
Definition anonymize.h:33
void apply(T &result, const propositional_variable &x)
Definition anonymize.h:47
void enter(const propositional_variable &x)
Definition anonymize.h:41
void apply(T &result, const propositional_variable_instantiation &x)
Definition anonymize.h:62