TdZdd  1.1
A top-down/breadth-first decision diagram manipulation framework
DdSpecOp.hpp
1 /*
2  * TdZdd: a Top-down/Breadth-first Decision Diagram Manipulation Framework
3  * by Hiroaki Iwashita <iwashita@erato.ist.hokudai.ac.jp>
4  * Copyright (c) 2014 ERATO MINATO Project
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #pragma once
26 
27 #include "op/BinaryOperation.hpp"
28 #include "op/Lookahead.hpp"
29 #include "op/Unreduction.hpp"
30 
31 namespace tdzdd {
32 
39 template<typename S1, typename S2>
40 BddAnd<S1,S2> bddAnd(S1 const& spec1, S2 const& spec2) {
41  return BddAnd<S1,S2>(spec1, spec2);
42 }
43 
44 #if __cplusplus >= 201103L
45 
51 template<typename... SS>
52 BddAnd<SS...> bddAnd(SS const&... specs) {
53  return BddAnd<SS...>(specs...);
54 }
55 #endif
56 
63 template<typename S1, typename S2>
64 BddOr<S1,S2> bddOr(S1 const& spec1, S2 const& spec2) {
65  return BddOr<S1,S2>(spec1, spec2);
66 }
67 
68 #if __cplusplus >= 201103L
69 
75 template<typename... SS>
76 BddOr<SS...> bddOr(SS const&... specs) {
77  return BddOr<SS...>(specs...);
78 }
79 #endif
80 
87 template<typename S1, typename S2>
88 ZddIntersection<S1,S2> zddIntersection(S1 const& spec1, S2 const& spec2) {
89  return ZddIntersection<S1,S2>(spec1, spec2);
90 }
91 
92 #if __cplusplus >= 201103L
93 
99 template<typename... SS>
100 ZddIntersection<SS...> zddIntersection(SS const&... specs) {
101  return ZddIntersection<SS...>(specs...);
102 }
103 #endif
104 
111 template<typename S1, typename S2>
112 ZddUnion<S1,S2> zddUnion(S1 const& spec1, S2 const& spec2) {
113  return ZddUnion<S1,S2>(spec1, spec2);
114 }
115 
116 #if __cplusplus >= 201103L
117 
123 template<typename... SS>
124 ZddUnion<SS...> zddUnion(SS const&... specs) {
125  return ZddUnion<SS...>(specs...);
126 }
127 #endif
128 
134 template<typename S>
135 BddLookahead<S> bddLookahead(S const& spec) {
136  return BddLookahead<S>(spec);
137 }
138 
144 template<typename S>
145 ZddLookahead<S> zddLookahead(S const& spec) {
146  return ZddLookahead<S>(spec);
147 }
148 
155 template<typename S>
156 BddUnreduction<S> bddUnreduction(S const& spec, int numVars) {
157  return BddUnreduction<S>(spec, numVars);
158 }
159 
166 template<typename S>
167 ZddUnreduction<S> zddUnreduction(S const& spec, int numVars) {
168  return ZddUnreduction<S>(spec, numVars);
169 }
170 
171 } // namespace tdzdd