mCRL2
Loading...
Searching...
No Matches
negate_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_MODAL_FORMULA_NEGATE_VARIABLES_H
13#define MCRL2_MODAL_FORMULA_NEGATE_VARIABLES_H
14
16
17namespace mcrl2
18{
19
20namespace state_formulas
21{
22
23namespace detail
24{
25
27template <typename Derived>
29{
31 using super::apply;
32
35
36 state_variable_negator(const core::identifier_string& name, bool quantitative)
37 : m_name(name),
38 m_quantitative(quantitative)
39 {}
40
44 template <class T>
45 void apply(T& result, const variable& x)
46 {
47 if (x.name() == m_name)
48 {
50 {
52 }
53 else
54 {
56 }
57 return;
58 }
59 result = x;
60 }
61};
62
63} // namespace detail
64
65inline
70{
71 state_formula result;
72 core::make_apply_builder_arg2<detail::state_variable_negator>(name, quantitative).apply(result, x);
73 return result;
74}
75
76} // namespace state_formulas
77
78} // namespace mcrl2
79
80#endif // MCRL2_MODAL_FORMULA_NEGATE_VARIABLES_H
Term containing a string.
\brief The state formula variable
const core::identifier_string & name() const
add your file description here.
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
state_formula negate_variables(const core::identifier_string &name, bool quantitative, const state_formula &x)
Negates variable instantiations in a state formula with a given name.
void make_minus(atermpp::aterm &t, const ARGUMENTS &... args)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Visitor that negates propositional variable instantiations with a given name.
state_variable_negator(const core::identifier_string &name, bool quantitative)
state_formulas::state_formula_builder< Derived > super
void apply(T &result, const variable &x)
Visit variable node.