mCRL2
Loading...
Searching...
No Matches
term_traits_optimized.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_PBES_DETAIL_TERM_TRAITS_OPTIMIZED_H
13#define MCRL2_PBES_DETAIL_TERM_TRAITS_OPTIMIZED_H
14
16
17namespace mcrl2 {
18
19namespace core {
20
22template <typename T>
24{
25};
26
28template <>
29struct term_traits_optimized<pbes_system::pbes_expression>: public core::term_traits<pbes_system::pbes_expression>
30{
32
33 static inline
35 {
36 term_type result;
37 data::optimized_not(result, x);
38 return result;
39 }
40
41 static inline
42 void make_not_(term_type& result, const term_type& x)
43 {
44 data::optimized_not(result, x);
45 }
46
47 static inline
48 term_type and_(const term_type& x, const term_type& y)
49 {
50 term_type result;
51 data::optimized_and(result, x, y);
52 return result;
53 }
54
55 static inline
56 void make_and_(term_type& result, const term_type& x, const term_type& y)
57 {
58 data::optimized_and(result, x, y);
59 }
60
61 static inline
62 term_type or_(const term_type& x, const term_type& y)
63 {
64 term_type result;
65 data::optimized_or(result, x, y);
66 return result;
67 }
68
69 static inline
70 void make_or_(term_type& result, const term_type& x, const term_type& y)
71 {
72 data::optimized_or(result, x, y);
73 }
74
75 static inline
76 term_type imp(const term_type& x, const term_type& y)
77 {
78 term_type result;
79 data::optimized_imp(result, x, y);
80 return result;
81 }
82
83 static inline
84 void make_imp(term_type& result, const term_type& x, const term_type& y)
85 {
86 data::optimized_imp(result, x, y);
87 }
88
89 static inline
90 void make_forall(term_type& result, const variable_sequence_type& d, const term_type& x)
91 {
93 }
94
95 static inline
96 void make_exists(term_type& result, const variable_sequence_type& d, const term_type& x)
97 {
99 }
100
101 template <typename FwdIt>
102 static inline
103 term_type join_or(FwdIt first, FwdIt last)
104 {
105 return utilities::detail::join(first, last, or_, false_());
106 }
107
108 template <typename FwdIt>
109 static inline
110 term_type join_and(FwdIt first, FwdIt last)
111 {
112 return utilities::detail::join(first, last, and_, true_());
113 }
114};
115
116} // namespace core
117
118} // namespace mcrl2
119
120#endif // MCRL2_PBES_DETAIL_TERM_TRAITS_OPTIMIZED_H
void optimized_exists_no_empty_domain(Term &result, const VariableSequence &l, const Term &p, bool remove_variables=false)
Make an existential quantification.
void optimized_or(Term &result, const Term &p, const Term &q)
Make a conjunction, and optimize if possible.
void optimized_imp(Term &result, const Term &p, const Term &q)
Make an implication.
void optimized_forall_no_empty_domain(Term &result, const VariableSequence &l, const Term &p, bool remove_variables=false)
Make a universal quantification.
void optimized_not(Term &result, const Term &arg)
Make a negation.
void optimized_and(Term &result, const Term &p, const Term &q)
Make a conjunction, and optimize if possible.
T join(FwdIt first, FwdIt last, BinaryOperation op, T empty_sequence_result)
Given a sequence [t1, t2, ..., tn] of elements of type T, returns op(t1, op(t2, .....
Definition join.h:55
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
The class pbes_expression.
core::term_traits< pbes_system::pbes_expression > super
static void make_imp(term_type &result, const term_type &x, const term_type &y)
static void make_exists(term_type &result, const variable_sequence_type &d, const term_type &x)
static void make_forall(term_type &result, const variable_sequence_type &d, const term_type &x)
static void make_not_(term_type &result, const term_type &x)
static term_type or_(const term_type &x, const term_type &y)
static void make_and_(term_type &result, const term_type &x, const term_type &y)
static term_type and_(const term_type &x, const term_type &y)
static term_type imp(const term_type &x, const term_type &y)
static void make_or_(term_type &result, const term_type &x, const term_type &y)
Contains type information for terms.
Contains type information for terms.
Definition term_traits.h:24