1 |
|
/****************************************************************************** |
2 |
|
* This file is part of the cvc5 project. |
3 |
|
* |
4 |
|
* Copyright (c) 2010-2021 by the authors listed in the file AUTHORS |
5 |
|
* in the top-level source directory and their institutional affiliations. |
6 |
|
* All rights reserved. See the file COPYING in the top-level source |
7 |
|
* directory for licensing information. |
8 |
|
* **************************************************************************** |
9 |
|
* |
10 |
|
* This header file was automatically generated by: |
11 |
|
* |
12 |
|
* ../../../src/expr/mkmetakind /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/expr/metakind_template.cpp /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/builtin/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/booleans/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/uf/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/arith/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/bv/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/fp/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/arrays/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/datatypes/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/sep/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/sets/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/bags/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/strings/kinds /barrett/scratch/cvc4-nightly/src/cvc5-2021-09-05/src/theory/quantifiers/kinds |
13 |
|
* |
14 |
|
* for the cvc5 project. |
15 |
|
*/ |
16 |
|
|
17 |
|
/****************************************************************************** |
18 |
|
* Top contributors (to current version): |
19 |
|
* Morgan Deters, Andres Noetzli, Aina Niemetz |
20 |
|
* |
21 |
|
* This file is part of the cvc5 project. |
22 |
|
* |
23 |
|
* Copyright (c) 2009-2021 by the authors listed in the file AUTHORS |
24 |
|
* in the top-level source directory and their institutional affiliations. |
25 |
|
* All rights reserved. See the file COPYING in the top-level source |
26 |
|
* directory for licensing information. |
27 |
|
* **************************************************************************** |
28 |
|
* |
29 |
|
* [[ Add one-line brief description here ]] |
30 |
|
* |
31 |
|
* [[ Add lengthier description here ]] |
32 |
|
* \todo document this file |
33 |
|
*/ |
34 |
|
|
35 |
|
#include "expr/metakind.h" |
36 |
|
|
37 |
|
#include <iostream> |
38 |
|
|
39 |
|
// clang-format off |
40 |
|
|
41 |
|
// #include "theory/builtin/::cvc5::theory::builtin::TheoryBuiltin" |
42 |
|
#include "expr/uninterpreted_constant.h" |
43 |
|
#include "util/abstract_value.h" |
44 |
|
#include "expr/kind.h" |
45 |
|
// #include "theory/booleans/::cvc5::theory::booleans::TheoryBool" |
46 |
|
#include "util/bool.h" |
47 |
|
// #include "theory/uf/::cvc5::theory::uf::TheoryUF" |
48 |
|
// #include "theory/arith/::cvc5::theory::arith::TheoryArith" |
49 |
|
#include "util/divisible.h" |
50 |
|
#include "util/rational.h" |
51 |
|
#include "util/indexed_root_predicate.h" |
52 |
|
#include "util/iand.h" |
53 |
|
// #include "theory/bv/::cvc5::theory::bv::TheoryBV" |
54 |
|
#include "util/bitvector.h" |
55 |
|
// #include "theory/fp/::cvc5::theory::fp::TheoryFp" |
56 |
|
#include "util/floatingpoint.h" |
57 |
|
#include "util/roundingmode.h" |
58 |
|
// #include "theory/arrays/::cvc5::theory::arrays::TheoryArrays" |
59 |
|
#include "expr/array_store_all.h" |
60 |
|
// #include "theory/datatypes/::cvc5::theory::datatypes::TheoryDatatypes" |
61 |
|
#include "expr/datatype_index.h" |
62 |
|
#include "expr/ascription_type.h" |
63 |
|
#include "theory/datatypes/tuple_project_op.h" |
64 |
|
// #include "theory/sep/::cvc5::theory::sep::TheorySep" |
65 |
|
// #include "theory/sets/::cvc5::theory::sets::TheorySets" |
66 |
|
#include "expr/emptyset.h" |
67 |
|
#include "theory/sets/singleton_op.h" |
68 |
|
// #include "theory/bags/::cvc5::theory::bags::TheoryBags" |
69 |
|
#include "expr/emptybag.h" |
70 |
|
#include "theory/bags/make_bag_op.h" |
71 |
|
// #include "theory/strings/::cvc5::theory::strings::TheoryStrings" |
72 |
|
#include "util/string.h" |
73 |
|
#include "expr/sequence.h" |
74 |
|
#include "util/regexp.h" |
75 |
|
// #include "theory/quantifiers/::cvc5::theory::quantifiers::TheoryQuantifiers" |
76 |
|
// clang-format off |
77 |
|
|
78 |
|
namespace cvc5 { |
79 |
|
namespace kind { |
80 |
|
|
81 |
|
/** |
82 |
|
* Get the metakind for a particular kind. |
83 |
|
*/ |
84 |
5765077392 |
MetaKind metaKindOf(Kind k) |
85 |
|
{ |
86 |
|
static const MetaKind metaKinds[] = { |
87 |
|
metakind::INVALID, /* UNDEFINED_KIND */ |
88 |
|
metakind::INVALID, /* NULL_EXPR */ |
89 |
|
// clang-format off |
90 |
|
|
91 |
|
/* from builtin */ |
92 |
|
metakind::VARIABLE, /* SORT_TAG */ |
93 |
|
metakind::PARAMETERIZED, /* SORT_TYPE */ |
94 |
|
metakind::CONSTANT, /* UNINTERPRETED_CONSTANT */ |
95 |
|
metakind::CONSTANT, /* ABSTRACT_VALUE */ |
96 |
|
metakind::CONSTANT, /* BUILTIN */ |
97 |
|
metakind::OPERATOR, /* EQUAL */ |
98 |
|
metakind::OPERATOR, /* DISTINCT */ |
99 |
|
metakind::VARIABLE, /* VARIABLE */ |
100 |
|
metakind::VARIABLE, /* BOUND_VARIABLE */ |
101 |
|
metakind::VARIABLE, /* SKOLEM */ |
102 |
|
metakind::OPERATOR, /* SEXPR */ |
103 |
|
metakind::OPERATOR, /* LAMBDA */ |
104 |
|
metakind::OPERATOR, /* WITNESS */ |
105 |
|
metakind::CONSTANT, /* TYPE_CONSTANT */ |
106 |
|
metakind::OPERATOR, /* FUNCTION_TYPE */ |
107 |
|
|
108 |
|
/* from booleans */ |
109 |
|
metakind::CONSTANT, /* CONST_BOOLEAN */ |
110 |
|
metakind::OPERATOR, /* NOT */ |
111 |
|
metakind::OPERATOR, /* AND */ |
112 |
|
metakind::OPERATOR, /* IMPLIES */ |
113 |
|
metakind::OPERATOR, /* OR */ |
114 |
|
metakind::OPERATOR, /* XOR */ |
115 |
|
metakind::OPERATOR, /* ITE */ |
116 |
|
|
117 |
|
/* from uf */ |
118 |
|
metakind::PARAMETERIZED, /* APPLY_UF */ |
119 |
|
metakind::VARIABLE, /* BOOLEAN_TERM_VARIABLE */ |
120 |
|
metakind::OPERATOR, /* CARDINALITY_CONSTRAINT */ |
121 |
|
metakind::OPERATOR, /* COMBINED_CARDINALITY_CONSTRAINT */ |
122 |
|
metakind::PARAMETERIZED, /* PARTIAL_APPLY_UF */ |
123 |
|
metakind::OPERATOR, /* CARDINALITY_VALUE */ |
124 |
|
metakind::OPERATOR, /* HO_APPLY */ |
125 |
|
|
126 |
|
/* from arith */ |
127 |
|
metakind::OPERATOR, /* PLUS */ |
128 |
|
metakind::OPERATOR, /* MULT */ |
129 |
|
metakind::OPERATOR, /* NONLINEAR_MULT */ |
130 |
|
metakind::OPERATOR, /* MINUS */ |
131 |
|
metakind::OPERATOR, /* UMINUS */ |
132 |
|
metakind::OPERATOR, /* DIVISION */ |
133 |
|
metakind::OPERATOR, /* DIVISION_TOTAL */ |
134 |
|
metakind::OPERATOR, /* INTS_DIVISION */ |
135 |
|
metakind::OPERATOR, /* INTS_DIVISION_TOTAL */ |
136 |
|
metakind::OPERATOR, /* INTS_MODULUS */ |
137 |
|
metakind::OPERATOR, /* INTS_MODULUS_TOTAL */ |
138 |
|
metakind::OPERATOR, /* ABS */ |
139 |
|
metakind::PARAMETERIZED, /* DIVISIBLE */ |
140 |
|
metakind::OPERATOR, /* POW */ |
141 |
|
metakind::OPERATOR, /* POW2 */ |
142 |
|
metakind::OPERATOR, /* EXPONENTIAL */ |
143 |
|
metakind::OPERATOR, /* SINE */ |
144 |
|
metakind::OPERATOR, /* COSINE */ |
145 |
|
metakind::OPERATOR, /* TANGENT */ |
146 |
|
metakind::OPERATOR, /* COSECANT */ |
147 |
|
metakind::OPERATOR, /* SECANT */ |
148 |
|
metakind::OPERATOR, /* COTANGENT */ |
149 |
|
metakind::OPERATOR, /* ARCSINE */ |
150 |
|
metakind::OPERATOR, /* ARCCOSINE */ |
151 |
|
metakind::OPERATOR, /* ARCTANGENT */ |
152 |
|
metakind::OPERATOR, /* ARCCOSECANT */ |
153 |
|
metakind::OPERATOR, /* ARCSECANT */ |
154 |
|
metakind::OPERATOR, /* ARCCOTANGENT */ |
155 |
|
metakind::OPERATOR, /* SQRT */ |
156 |
|
metakind::CONSTANT, /* DIVISIBLE_OP */ |
157 |
|
metakind::CONSTANT, /* CONST_RATIONAL */ |
158 |
|
metakind::OPERATOR, /* LT */ |
159 |
|
metakind::OPERATOR, /* LEQ */ |
160 |
|
metakind::OPERATOR, /* GT */ |
161 |
|
metakind::OPERATOR, /* GEQ */ |
162 |
|
metakind::CONSTANT, /* INDEXED_ROOT_PREDICATE_OP */ |
163 |
|
metakind::PARAMETERIZED, /* INDEXED_ROOT_PREDICATE */ |
164 |
|
metakind::OPERATOR, /* IS_INTEGER */ |
165 |
|
metakind::OPERATOR, /* TO_INTEGER */ |
166 |
|
metakind::OPERATOR, /* TO_REAL */ |
167 |
|
metakind::OPERATOR, /* CAST_TO_REAL */ |
168 |
|
metakind::NULLARY_OPERATOR, /* PI */ |
169 |
|
metakind::CONSTANT, /* IAND_OP */ |
170 |
|
metakind::PARAMETERIZED, /* IAND */ |
171 |
|
|
172 |
|
/* from bv */ |
173 |
|
metakind::CONSTANT, /* BITVECTOR_TYPE */ |
174 |
|
metakind::CONSTANT, /* CONST_BITVECTOR */ |
175 |
|
metakind::OPERATOR, /* BITVECTOR_BB_TERM */ |
176 |
|
metakind::OPERATOR, /* BITVECTOR_CONCAT */ |
177 |
|
metakind::OPERATOR, /* BITVECTOR_AND */ |
178 |
|
metakind::OPERATOR, /* BITVECTOR_COMP */ |
179 |
|
metakind::OPERATOR, /* BITVECTOR_OR */ |
180 |
|
metakind::OPERATOR, /* BITVECTOR_XOR */ |
181 |
|
metakind::OPERATOR, /* BITVECTOR_NOT */ |
182 |
|
metakind::OPERATOR, /* BITVECTOR_NAND */ |
183 |
|
metakind::OPERATOR, /* BITVECTOR_NOR */ |
184 |
|
metakind::OPERATOR, /* BITVECTOR_XNOR */ |
185 |
|
metakind::OPERATOR, /* BITVECTOR_MULT */ |
186 |
|
metakind::OPERATOR, /* BITVECTOR_NEG */ |
187 |
|
metakind::OPERATOR, /* BITVECTOR_ADD */ |
188 |
|
metakind::OPERATOR, /* BITVECTOR_SUB */ |
189 |
|
metakind::OPERATOR, /* BITVECTOR_UDIV */ |
190 |
|
metakind::OPERATOR, /* BITVECTOR_UREM */ |
191 |
|
metakind::OPERATOR, /* BITVECTOR_SDIV */ |
192 |
|
metakind::OPERATOR, /* BITVECTOR_SMOD */ |
193 |
|
metakind::OPERATOR, /* BITVECTOR_SREM */ |
194 |
|
metakind::OPERATOR, /* BITVECTOR_ASHR */ |
195 |
|
metakind::OPERATOR, /* BITVECTOR_LSHR */ |
196 |
|
metakind::OPERATOR, /* BITVECTOR_SHL */ |
197 |
|
metakind::OPERATOR, /* BITVECTOR_ULE */ |
198 |
|
metakind::OPERATOR, /* BITVECTOR_ULT */ |
199 |
|
metakind::OPERATOR, /* BITVECTOR_UGE */ |
200 |
|
metakind::OPERATOR, /* BITVECTOR_UGT */ |
201 |
|
metakind::OPERATOR, /* BITVECTOR_SLE */ |
202 |
|
metakind::OPERATOR, /* BITVECTOR_SLT */ |
203 |
|
metakind::OPERATOR, /* BITVECTOR_SGE */ |
204 |
|
metakind::OPERATOR, /* BITVECTOR_SGT */ |
205 |
|
metakind::OPERATOR, /* BITVECTOR_ULTBV */ |
206 |
|
metakind::OPERATOR, /* BITVECTOR_SLTBV */ |
207 |
|
metakind::OPERATOR, /* BITVECTOR_REDAND */ |
208 |
|
metakind::OPERATOR, /* BITVECTOR_REDOR */ |
209 |
|
metakind::OPERATOR, /* BITVECTOR_ITE */ |
210 |
|
metakind::OPERATOR, /* BITVECTOR_TO_NAT */ |
211 |
|
metakind::OPERATOR, /* BITVECTOR_ACKERMANNIZE_UDIV */ |
212 |
|
metakind::OPERATOR, /* BITVECTOR_ACKERMANNIZE_UREM */ |
213 |
|
metakind::OPERATOR, /* BITVECTOR_EAGER_ATOM */ |
214 |
|
metakind::CONSTANT, /* BITVECTOR_BITOF_OP */ |
215 |
|
metakind::PARAMETERIZED, /* BITVECTOR_BITOF */ |
216 |
|
metakind::CONSTANT, /* BITVECTOR_EXTRACT_OP */ |
217 |
|
metakind::PARAMETERIZED, /* BITVECTOR_EXTRACT */ |
218 |
|
metakind::CONSTANT, /* BITVECTOR_REPEAT_OP */ |
219 |
|
metakind::PARAMETERIZED, /* BITVECTOR_REPEAT */ |
220 |
|
metakind::CONSTANT, /* BITVECTOR_ROTATE_LEFT_OP */ |
221 |
|
metakind::PARAMETERIZED, /* BITVECTOR_ROTATE_LEFT */ |
222 |
|
metakind::CONSTANT, /* BITVECTOR_ROTATE_RIGHT_OP */ |
223 |
|
metakind::PARAMETERIZED, /* BITVECTOR_ROTATE_RIGHT */ |
224 |
|
metakind::CONSTANT, /* BITVECTOR_SIGN_EXTEND_OP */ |
225 |
|
metakind::PARAMETERIZED, /* BITVECTOR_SIGN_EXTEND */ |
226 |
|
metakind::CONSTANT, /* BITVECTOR_ZERO_EXTEND_OP */ |
227 |
|
metakind::PARAMETERIZED, /* BITVECTOR_ZERO_EXTEND */ |
228 |
|
metakind::CONSTANT, /* INT_TO_BITVECTOR_OP */ |
229 |
|
metakind::PARAMETERIZED, /* INT_TO_BITVECTOR */ |
230 |
|
|
231 |
|
/* from fp */ |
232 |
|
metakind::CONSTANT, /* CONST_FLOATINGPOINT */ |
233 |
|
metakind::CONSTANT, /* CONST_ROUNDINGMODE */ |
234 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TYPE */ |
235 |
|
metakind::OPERATOR, /* FLOATINGPOINT_FP */ |
236 |
|
metakind::OPERATOR, /* FLOATINGPOINT_EQ */ |
237 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ABS */ |
238 |
|
metakind::OPERATOR, /* FLOATINGPOINT_NEG */ |
239 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ADD */ |
240 |
|
metakind::OPERATOR, /* FLOATINGPOINT_SUB */ |
241 |
|
metakind::OPERATOR, /* FLOATINGPOINT_MULT */ |
242 |
|
metakind::OPERATOR, /* FLOATINGPOINT_DIV */ |
243 |
|
metakind::OPERATOR, /* FLOATINGPOINT_FMA */ |
244 |
|
metakind::OPERATOR, /* FLOATINGPOINT_SQRT */ |
245 |
|
metakind::OPERATOR, /* FLOATINGPOINT_REM */ |
246 |
|
metakind::OPERATOR, /* FLOATINGPOINT_RTI */ |
247 |
|
metakind::OPERATOR, /* FLOATINGPOINT_MIN */ |
248 |
|
metakind::OPERATOR, /* FLOATINGPOINT_MAX */ |
249 |
|
metakind::OPERATOR, /* FLOATINGPOINT_MIN_TOTAL */ |
250 |
|
metakind::OPERATOR, /* FLOATINGPOINT_MAX_TOTAL */ |
251 |
|
metakind::OPERATOR, /* FLOATINGPOINT_LEQ */ |
252 |
|
metakind::OPERATOR, /* FLOATINGPOINT_LT */ |
253 |
|
metakind::OPERATOR, /* FLOATINGPOINT_GEQ */ |
254 |
|
metakind::OPERATOR, /* FLOATINGPOINT_GT */ |
255 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISN */ |
256 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISSN */ |
257 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISZ */ |
258 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISINF */ |
259 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISNAN */ |
260 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISNEG */ |
261 |
|
metakind::OPERATOR, /* FLOATINGPOINT_ISPOS */ |
262 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP */ |
263 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR */ |
264 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP */ |
265 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT */ |
266 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_REAL_OP */ |
267 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_REAL */ |
268 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP */ |
269 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR */ |
270 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP */ |
271 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR */ |
272 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_FP_GENERIC_OP */ |
273 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_FP_GENERIC */ |
274 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_UBV_OP */ |
275 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_UBV */ |
276 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_UBV_TOTAL_OP */ |
277 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_UBV_TOTAL */ |
278 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_SBV_OP */ |
279 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_SBV */ |
280 |
|
metakind::CONSTANT, /* FLOATINGPOINT_TO_SBV_TOTAL_OP */ |
281 |
|
metakind::PARAMETERIZED, /* FLOATINGPOINT_TO_SBV_TOTAL */ |
282 |
|
metakind::OPERATOR, /* FLOATINGPOINT_TO_REAL */ |
283 |
|
metakind::OPERATOR, /* FLOATINGPOINT_TO_REAL_TOTAL */ |
284 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_NAN */ |
285 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_INF */ |
286 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_ZERO */ |
287 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_SIGN */ |
288 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_EXPONENT */ |
289 |
|
metakind::OPERATOR, /* FLOATINGPOINT_COMPONENT_SIGNIFICAND */ |
290 |
|
metakind::OPERATOR, /* ROUNDINGMODE_BITBLAST */ |
291 |
|
|
292 |
|
/* from arrays */ |
293 |
|
metakind::OPERATOR, /* ARRAY_TYPE */ |
294 |
|
metakind::OPERATOR, /* SELECT */ |
295 |
|
metakind::OPERATOR, /* STORE */ |
296 |
|
metakind::OPERATOR, /* EQ_RANGE */ |
297 |
|
metakind::CONSTANT, /* STORE_ALL */ |
298 |
|
metakind::OPERATOR, /* ARR_TABLE_FUN */ |
299 |
|
metakind::OPERATOR, /* ARRAY_LAMBDA */ |
300 |
|
metakind::OPERATOR, /* PARTIAL_SELECT_0 */ |
301 |
|
metakind::OPERATOR, /* PARTIAL_SELECT_1 */ |
302 |
|
|
303 |
|
/* from datatypes */ |
304 |
|
metakind::OPERATOR, /* CONSTRUCTOR_TYPE */ |
305 |
|
metakind::OPERATOR, /* SELECTOR_TYPE */ |
306 |
|
metakind::OPERATOR, /* TESTER_TYPE */ |
307 |
|
metakind::OPERATOR, /* UPDATER_TYPE */ |
308 |
|
metakind::PARAMETERIZED, /* APPLY_CONSTRUCTOR */ |
309 |
|
metakind::PARAMETERIZED, /* APPLY_SELECTOR */ |
310 |
|
metakind::PARAMETERIZED, /* APPLY_SELECTOR_TOTAL */ |
311 |
|
metakind::PARAMETERIZED, /* APPLY_TESTER */ |
312 |
|
metakind::PARAMETERIZED, /* APPLY_UPDATER */ |
313 |
|
metakind::CONSTANT, /* DATATYPE_TYPE */ |
314 |
|
metakind::OPERATOR, /* PARAMETRIC_DATATYPE */ |
315 |
|
metakind::PARAMETERIZED, /* APPLY_TYPE_ASCRIPTION */ |
316 |
|
metakind::CONSTANT, /* ASCRIPTION_TYPE */ |
317 |
|
metakind::OPERATOR, /* DT_SIZE */ |
318 |
|
metakind::OPERATOR, /* DT_HEIGHT_BOUND */ |
319 |
|
metakind::OPERATOR, /* DT_SIZE_BOUND */ |
320 |
|
metakind::OPERATOR, /* DT_SYGUS_BOUND */ |
321 |
|
metakind::OPERATOR, /* DT_SYGUS_EVAL */ |
322 |
|
metakind::OPERATOR, /* MATCH */ |
323 |
|
metakind::OPERATOR, /* MATCH_CASE */ |
324 |
|
metakind::OPERATOR, /* MATCH_BIND_CASE */ |
325 |
|
metakind::CONSTANT, /* TUPLE_PROJECT_OP */ |
326 |
|
metakind::PARAMETERIZED, /* TUPLE_PROJECT */ |
327 |
|
|
328 |
|
/* from sep */ |
329 |
|
metakind::NULLARY_OPERATOR, /* SEP_NIL */ |
330 |
|
metakind::OPERATOR, /* SEP_EMP */ |
331 |
|
metakind::OPERATOR, /* SEP_PTO */ |
332 |
|
metakind::OPERATOR, /* SEP_STAR */ |
333 |
|
metakind::OPERATOR, /* SEP_WAND */ |
334 |
|
metakind::OPERATOR, /* SEP_LABEL */ |
335 |
|
|
336 |
|
/* from sets */ |
337 |
|
metakind::CONSTANT, /* EMPTYSET */ |
338 |
|
metakind::OPERATOR, /* SET_TYPE */ |
339 |
|
metakind::OPERATOR, /* UNION */ |
340 |
|
metakind::OPERATOR, /* INTERSECTION */ |
341 |
|
metakind::OPERATOR, /* SETMINUS */ |
342 |
|
metakind::OPERATOR, /* SUBSET */ |
343 |
|
metakind::OPERATOR, /* MEMBER */ |
344 |
|
metakind::CONSTANT, /* SINGLETON_OP */ |
345 |
|
metakind::PARAMETERIZED, /* SINGLETON */ |
346 |
|
metakind::OPERATOR, /* INSERT */ |
347 |
|
metakind::OPERATOR, /* CARD */ |
348 |
|
metakind::OPERATOR, /* COMPLEMENT */ |
349 |
|
metakind::NULLARY_OPERATOR, /* UNIVERSE_SET */ |
350 |
|
metakind::OPERATOR, /* COMPREHENSION */ |
351 |
|
metakind::OPERATOR, /* CHOOSE */ |
352 |
|
metakind::OPERATOR, /* IS_SINGLETON */ |
353 |
|
metakind::OPERATOR, /* JOIN */ |
354 |
|
metakind::OPERATOR, /* PRODUCT */ |
355 |
|
metakind::OPERATOR, /* TRANSPOSE */ |
356 |
|
metakind::OPERATOR, /* TCLOSURE */ |
357 |
|
metakind::OPERATOR, /* JOIN_IMAGE */ |
358 |
|
metakind::OPERATOR, /* IDEN */ |
359 |
|
|
360 |
|
/* from bags */ |
361 |
|
metakind::CONSTANT, /* EMPTYBAG */ |
362 |
|
metakind::OPERATOR, /* BAG_TYPE */ |
363 |
|
metakind::OPERATOR, /* UNION_MAX */ |
364 |
|
metakind::OPERATOR, /* UNION_DISJOINT */ |
365 |
|
metakind::OPERATOR, /* INTERSECTION_MIN */ |
366 |
|
metakind::OPERATOR, /* DIFFERENCE_SUBTRACT */ |
367 |
|
metakind::OPERATOR, /* DIFFERENCE_REMOVE */ |
368 |
|
metakind::OPERATOR, /* SUBBAG */ |
369 |
|
metakind::OPERATOR, /* BAG_COUNT */ |
370 |
|
metakind::OPERATOR, /* DUPLICATE_REMOVAL */ |
371 |
|
metakind::CONSTANT, /* MK_BAG_OP */ |
372 |
|
metakind::PARAMETERIZED, /* MK_BAG */ |
373 |
|
metakind::OPERATOR, /* BAG_IS_SINGLETON */ |
374 |
|
metakind::OPERATOR, /* BAG_CARD */ |
375 |
|
metakind::OPERATOR, /* BAG_FROM_SET */ |
376 |
|
metakind::OPERATOR, /* BAG_TO_SET */ |
377 |
|
metakind::OPERATOR, /* BAG_CHOOSE */ |
378 |
|
metakind::OPERATOR, /* BAG_MAP */ |
379 |
|
|
380 |
|
/* from strings */ |
381 |
|
metakind::OPERATOR, /* STRING_CONCAT */ |
382 |
|
metakind::OPERATOR, /* STRING_IN_REGEXP */ |
383 |
|
metakind::OPERATOR, /* STRING_LENGTH */ |
384 |
|
metakind::OPERATOR, /* STRING_SUBSTR */ |
385 |
|
metakind::OPERATOR, /* STRING_UPDATE */ |
386 |
|
metakind::OPERATOR, /* STRING_CHARAT */ |
387 |
|
metakind::OPERATOR, /* STRING_CONTAINS */ |
388 |
|
metakind::OPERATOR, /* STRING_LT */ |
389 |
|
metakind::OPERATOR, /* STRING_LEQ */ |
390 |
|
metakind::OPERATOR, /* STRING_INDEXOF */ |
391 |
|
metakind::OPERATOR, /* STRING_INDEXOF_RE */ |
392 |
|
metakind::OPERATOR, /* STRING_REPLACE */ |
393 |
|
metakind::OPERATOR, /* STRING_REPLACE_ALL */ |
394 |
|
metakind::OPERATOR, /* STRING_REPLACE_RE */ |
395 |
|
metakind::OPERATOR, /* STRING_REPLACE_RE_ALL */ |
396 |
|
metakind::OPERATOR, /* STRING_PREFIX */ |
397 |
|
metakind::OPERATOR, /* STRING_SUFFIX */ |
398 |
|
metakind::OPERATOR, /* STRING_IS_DIGIT */ |
399 |
|
metakind::OPERATOR, /* STRING_ITOS */ |
400 |
|
metakind::OPERATOR, /* STRING_STOI */ |
401 |
|
metakind::OPERATOR, /* STRING_TO_CODE */ |
402 |
|
metakind::OPERATOR, /* STRING_FROM_CODE */ |
403 |
|
metakind::OPERATOR, /* STRING_TOLOWER */ |
404 |
|
metakind::OPERATOR, /* STRING_TOUPPER */ |
405 |
|
metakind::OPERATOR, /* STRING_REV */ |
406 |
|
metakind::CONSTANT, /* CONST_STRING */ |
407 |
|
metakind::OPERATOR, /* SEQUENCE_TYPE */ |
408 |
|
metakind::CONSTANT, /* CONST_SEQUENCE */ |
409 |
|
metakind::OPERATOR, /* SEQ_UNIT */ |
410 |
|
metakind::OPERATOR, /* SEQ_NTH */ |
411 |
|
metakind::OPERATOR, /* SEQ_NTH_TOTAL */ |
412 |
|
metakind::OPERATOR, /* STRING_TO_REGEXP */ |
413 |
|
metakind::OPERATOR, /* REGEXP_CONCAT */ |
414 |
|
metakind::OPERATOR, /* REGEXP_UNION */ |
415 |
|
metakind::OPERATOR, /* REGEXP_INTER */ |
416 |
|
metakind::OPERATOR, /* REGEXP_DIFF */ |
417 |
|
metakind::OPERATOR, /* REGEXP_STAR */ |
418 |
|
metakind::OPERATOR, /* REGEXP_PLUS */ |
419 |
|
metakind::OPERATOR, /* REGEXP_OPT */ |
420 |
|
metakind::OPERATOR, /* REGEXP_RANGE */ |
421 |
|
metakind::OPERATOR, /* REGEXP_COMPLEMENT */ |
422 |
|
metakind::OPERATOR, /* REGEXP_EMPTY */ |
423 |
|
metakind::OPERATOR, /* REGEXP_SIGMA */ |
424 |
|
metakind::CONSTANT, /* REGEXP_REPEAT_OP */ |
425 |
|
metakind::PARAMETERIZED, /* REGEXP_REPEAT */ |
426 |
|
metakind::CONSTANT, /* REGEXP_LOOP_OP */ |
427 |
|
metakind::PARAMETERIZED, /* REGEXP_LOOP */ |
428 |
|
metakind::OPERATOR, /* REGEXP_RV */ |
429 |
|
|
430 |
|
/* from quantifiers */ |
431 |
|
metakind::OPERATOR, /* FORALL */ |
432 |
|
metakind::OPERATOR, /* EXISTS */ |
433 |
|
metakind::VARIABLE, /* INST_CONSTANT */ |
434 |
|
metakind::OPERATOR, /* BOUND_VAR_LIST */ |
435 |
|
metakind::OPERATOR, /* INST_PATTERN */ |
436 |
|
metakind::OPERATOR, /* INST_NO_PATTERN */ |
437 |
|
metakind::OPERATOR, /* INST_ATTRIBUTE */ |
438 |
|
metakind::OPERATOR, /* INST_POOL */ |
439 |
|
metakind::OPERATOR, /* INST_ADD_TO_POOL */ |
440 |
|
metakind::OPERATOR, /* SKOLEM_ADD_TO_POOL */ |
441 |
|
metakind::OPERATOR, /* INST_PATTERN_LIST */ |
442 |
|
// clang-format on |
443 |
|
metakind::INVALID /* LAST_KIND */ |
444 |
|
}; /* metaKinds[] */ |
445 |
|
|
446 |
5765077392 |
Assert(k >= kind::NULL_EXPR && k < kind::LAST_KIND); |
447 |
|
|
448 |
|
// We've asserted that k >= NULL_EXPR (which is 0), but we still |
449 |
|
// handle the UNDEFINED_KIND (-1) case. If we don't, the compiler |
450 |
|
// emits warnings for non-assertion builds, since the check isn't done. |
451 |
5765077392 |
return metaKinds[k + 1]; |
452 |
|
} /* metaKindOf(k) */ |
453 |
|
|
454 |
|
} // namespace kind |
455 |
|
|
456 |
|
namespace expr { |
457 |
|
|
458 |
|
// clang-format off |
459 |
|
|
460 |
|
// The reinterpret_cast of d_children to "UninterpretedConstant const*" |
461 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
462 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
463 |
|
// NodeValue* child as a constant. |
464 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
465 |
|
|
466 |
|
template <> |
467 |
82937 |
UninterpretedConstant const& NodeValue::getConst< UninterpretedConstant >() const { |
468 |
82937 |
AssertArgument(getKind() == ::cvc5::kind::UNINTERPRETED_CONSTANT, *this, |
469 |
|
"Improper kind for getConst<UninterpretedConstant>()"); |
470 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
471 |
|
// "constructed" when initially checking them against the NodeManager |
472 |
|
// pool), we must check d_nchildren here. |
473 |
82937 |
return d_nchildren == 0 |
474 |
82937 |
? *reinterpret_cast< UninterpretedConstant const* >(d_children) |
475 |
82937 |
: *reinterpret_cast< UninterpretedConstant const* >(d_children[0]); |
476 |
|
} |
477 |
|
|
478 |
|
// re-enable the warning |
479 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
480 |
|
|
481 |
|
|
482 |
|
// The reinterpret_cast of d_children to "AbstractValue const*" |
483 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
484 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
485 |
|
// NodeValue* child as a constant. |
486 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
487 |
|
|
488 |
|
template <> |
489 |
196 |
AbstractValue const& NodeValue::getConst< AbstractValue >() const { |
490 |
196 |
AssertArgument(getKind() == ::cvc5::kind::ABSTRACT_VALUE, *this, |
491 |
|
"Improper kind for getConst<AbstractValue>()"); |
492 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
493 |
|
// "constructed" when initially checking them against the NodeManager |
494 |
|
// pool), we must check d_nchildren here. |
495 |
196 |
return d_nchildren == 0 |
496 |
196 |
? *reinterpret_cast< AbstractValue const* >(d_children) |
497 |
196 |
: *reinterpret_cast< AbstractValue const* >(d_children[0]); |
498 |
|
} |
499 |
|
|
500 |
|
// re-enable the warning |
501 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
502 |
|
|
503 |
|
|
504 |
|
// The reinterpret_cast of d_children to "Kind const*" |
505 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
506 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
507 |
|
// NodeValue* child as a constant. |
508 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
509 |
|
|
510 |
|
template <> |
511 |
21919945 |
Kind const& NodeValue::getConst< Kind >() const { |
512 |
21919945 |
AssertArgument(getKind() == ::cvc5::kind::BUILTIN, *this, |
513 |
|
"Improper kind for getConst<Kind>()"); |
514 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
515 |
|
// "constructed" when initially checking them against the NodeManager |
516 |
|
// pool), we must check d_nchildren here. |
517 |
21919945 |
return d_nchildren == 0 |
518 |
21919945 |
? *reinterpret_cast< Kind const* >(d_children) |
519 |
21919945 |
: *reinterpret_cast< Kind const* >(d_children[0]); |
520 |
|
} |
521 |
|
|
522 |
|
// re-enable the warning |
523 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
524 |
|
|
525 |
|
|
526 |
|
// The reinterpret_cast of d_children to "TypeConstant const*" |
527 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
528 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
529 |
|
// NodeValue* child as a constant. |
530 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
531 |
|
|
532 |
|
template <> |
533 |
505990182 |
TypeConstant const& NodeValue::getConst< TypeConstant >() const { |
534 |
505990182 |
AssertArgument(getKind() == ::cvc5::kind::TYPE_CONSTANT, *this, |
535 |
|
"Improper kind for getConst<TypeConstant>()"); |
536 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
537 |
|
// "constructed" when initially checking them against the NodeManager |
538 |
|
// pool), we must check d_nchildren here. |
539 |
505990182 |
return d_nchildren == 0 |
540 |
505990182 |
? *reinterpret_cast< TypeConstant const* >(d_children) |
541 |
505990182 |
: *reinterpret_cast< TypeConstant const* >(d_children[0]); |
542 |
|
} |
543 |
|
|
544 |
|
// re-enable the warning |
545 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
546 |
|
|
547 |
|
|
548 |
|
// The reinterpret_cast of d_children to "bool const*" |
549 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
550 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
551 |
|
// NodeValue* child as a constant. |
552 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
553 |
|
|
554 |
|
template <> |
555 |
88749381 |
bool const& NodeValue::getConst< bool >() const { |
556 |
88749381 |
AssertArgument(getKind() == ::cvc5::kind::CONST_BOOLEAN, *this, |
557 |
|
"Improper kind for getConst<bool>()"); |
558 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
559 |
|
// "constructed" when initially checking them against the NodeManager |
560 |
|
// pool), we must check d_nchildren here. |
561 |
88749381 |
return d_nchildren == 0 |
562 |
88749381 |
? *reinterpret_cast< bool const* >(d_children) |
563 |
88749381 |
: *reinterpret_cast< bool const* >(d_children[0]); |
564 |
|
} |
565 |
|
|
566 |
|
// re-enable the warning |
567 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
568 |
|
|
569 |
|
|
570 |
|
// The reinterpret_cast of d_children to "Divisible const*" |
571 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
572 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
573 |
|
// NodeValue* child as a constant. |
574 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
575 |
|
|
576 |
|
template <> |
577 |
112 |
Divisible const& NodeValue::getConst< Divisible >() const { |
578 |
112 |
AssertArgument(getKind() == ::cvc5::kind::DIVISIBLE_OP, *this, |
579 |
|
"Improper kind for getConst<Divisible>()"); |
580 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
581 |
|
// "constructed" when initially checking them against the NodeManager |
582 |
|
// pool), we must check d_nchildren here. |
583 |
112 |
return d_nchildren == 0 |
584 |
112 |
? *reinterpret_cast< Divisible const* >(d_children) |
585 |
112 |
: *reinterpret_cast< Divisible const* >(d_children[0]); |
586 |
|
} |
587 |
|
|
588 |
|
// re-enable the warning |
589 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
590 |
|
|
591 |
|
|
592 |
|
// The reinterpret_cast of d_children to "Rational const*" |
593 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
594 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
595 |
|
// NodeValue* child as a constant. |
596 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
597 |
|
|
598 |
|
template <> |
599 |
981848030 |
Rational const& NodeValue::getConst< Rational >() const { |
600 |
981848030 |
AssertArgument(getKind() == ::cvc5::kind::CONST_RATIONAL, *this, |
601 |
|
"Improper kind for getConst<Rational>()"); |
602 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
603 |
|
// "constructed" when initially checking them against the NodeManager |
604 |
|
// pool), we must check d_nchildren here. |
605 |
981848030 |
return d_nchildren == 0 |
606 |
981848030 |
? *reinterpret_cast< Rational const* >(d_children) |
607 |
981848030 |
: *reinterpret_cast< Rational const* >(d_children[0]); |
608 |
|
} |
609 |
|
|
610 |
|
// re-enable the warning |
611 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
612 |
|
|
613 |
|
|
614 |
|
// The reinterpret_cast of d_children to "IndexedRootPredicate const*" |
615 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
616 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
617 |
|
// NodeValue* child as a constant. |
618 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
619 |
|
|
620 |
|
template <> |
621 |
17 |
IndexedRootPredicate const& NodeValue::getConst< IndexedRootPredicate >() const { |
622 |
17 |
AssertArgument(getKind() == ::cvc5::kind::INDEXED_ROOT_PREDICATE_OP, *this, |
623 |
|
"Improper kind for getConst<IndexedRootPredicate>()"); |
624 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
625 |
|
// "constructed" when initially checking them against the NodeManager |
626 |
|
// pool), we must check d_nchildren here. |
627 |
17 |
return d_nchildren == 0 |
628 |
17 |
? *reinterpret_cast< IndexedRootPredicate const* >(d_children) |
629 |
17 |
: *reinterpret_cast< IndexedRootPredicate const* >(d_children[0]); |
630 |
|
} |
631 |
|
|
632 |
|
// re-enable the warning |
633 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
634 |
|
|
635 |
|
|
636 |
|
// The reinterpret_cast of d_children to "IntAnd const*" |
637 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
638 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
639 |
|
// NodeValue* child as a constant. |
640 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
641 |
|
|
642 |
|
template <> |
643 |
1340 |
IntAnd const& NodeValue::getConst< IntAnd >() const { |
644 |
1340 |
AssertArgument(getKind() == ::cvc5::kind::IAND_OP, *this, |
645 |
|
"Improper kind for getConst<IntAnd>()"); |
646 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
647 |
|
// "constructed" when initially checking them against the NodeManager |
648 |
|
// pool), we must check d_nchildren here. |
649 |
1340 |
return d_nchildren == 0 |
650 |
1340 |
? *reinterpret_cast< IntAnd const* >(d_children) |
651 |
1340 |
: *reinterpret_cast< IntAnd const* >(d_children[0]); |
652 |
|
} |
653 |
|
|
654 |
|
// re-enable the warning |
655 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
656 |
|
|
657 |
|
|
658 |
|
// The reinterpret_cast of d_children to "BitVectorSize const*" |
659 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
660 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
661 |
|
// NodeValue* child as a constant. |
662 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
663 |
|
|
664 |
|
template <> |
665 |
4738859 |
BitVectorSize const& NodeValue::getConst< BitVectorSize >() const { |
666 |
4738859 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_TYPE, *this, |
667 |
|
"Improper kind for getConst<BitVectorSize>()"); |
668 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
669 |
|
// "constructed" when initially checking them against the NodeManager |
670 |
|
// pool), we must check d_nchildren here. |
671 |
4738859 |
return d_nchildren == 0 |
672 |
4738859 |
? *reinterpret_cast< BitVectorSize const* >(d_children) |
673 |
4738859 |
: *reinterpret_cast< BitVectorSize const* >(d_children[0]); |
674 |
|
} |
675 |
|
|
676 |
|
// re-enable the warning |
677 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
678 |
|
|
679 |
|
|
680 |
|
// The reinterpret_cast of d_children to "BitVector const*" |
681 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
682 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
683 |
|
// NodeValue* child as a constant. |
684 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
685 |
|
|
686 |
|
template <> |
687 |
21563841 |
BitVector const& NodeValue::getConst< BitVector >() const { |
688 |
21563841 |
AssertArgument(getKind() == ::cvc5::kind::CONST_BITVECTOR, *this, |
689 |
|
"Improper kind for getConst<BitVector>()"); |
690 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
691 |
|
// "constructed" when initially checking them against the NodeManager |
692 |
|
// pool), we must check d_nchildren here. |
693 |
21563841 |
return d_nchildren == 0 |
694 |
21563841 |
? *reinterpret_cast< BitVector const* >(d_children) |
695 |
21563841 |
: *reinterpret_cast< BitVector const* >(d_children[0]); |
696 |
|
} |
697 |
|
|
698 |
|
// re-enable the warning |
699 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
700 |
|
|
701 |
|
|
702 |
|
// The reinterpret_cast of d_children to "BitVectorBitOf const*" |
703 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
704 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
705 |
|
// NodeValue* child as a constant. |
706 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
707 |
|
|
708 |
|
template <> |
709 |
1033751 |
BitVectorBitOf const& NodeValue::getConst< BitVectorBitOf >() const { |
710 |
1033751 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_BITOF_OP, *this, |
711 |
|
"Improper kind for getConst<BitVectorBitOf>()"); |
712 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
713 |
|
// "constructed" when initially checking them against the NodeManager |
714 |
|
// pool), we must check d_nchildren here. |
715 |
1033751 |
return d_nchildren == 0 |
716 |
1033751 |
? *reinterpret_cast< BitVectorBitOf const* >(d_children) |
717 |
1033751 |
: *reinterpret_cast< BitVectorBitOf const* >(d_children[0]); |
718 |
|
} |
719 |
|
|
720 |
|
// re-enable the warning |
721 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
722 |
|
|
723 |
|
|
724 |
|
// The reinterpret_cast of d_children to "BitVectorExtract const*" |
725 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
726 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
727 |
|
// NodeValue* child as a constant. |
728 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
729 |
|
|
730 |
|
template <> |
731 |
1495879 |
BitVectorExtract const& NodeValue::getConst< BitVectorExtract >() const { |
732 |
1495879 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_EXTRACT_OP, *this, |
733 |
|
"Improper kind for getConst<BitVectorExtract>()"); |
734 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
735 |
|
// "constructed" when initially checking them against the NodeManager |
736 |
|
// pool), we must check d_nchildren here. |
737 |
1495879 |
return d_nchildren == 0 |
738 |
1495879 |
? *reinterpret_cast< BitVectorExtract const* >(d_children) |
739 |
1495879 |
: *reinterpret_cast< BitVectorExtract const* >(d_children[0]); |
740 |
|
} |
741 |
|
|
742 |
|
// re-enable the warning |
743 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
744 |
|
|
745 |
|
|
746 |
|
// The reinterpret_cast of d_children to "BitVectorRepeat const*" |
747 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
748 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
749 |
|
// NodeValue* child as a constant. |
750 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
751 |
|
|
752 |
|
template <> |
753 |
8578 |
BitVectorRepeat const& NodeValue::getConst< BitVectorRepeat >() const { |
754 |
8578 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_REPEAT_OP, *this, |
755 |
|
"Improper kind for getConst<BitVectorRepeat>()"); |
756 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
757 |
|
// "constructed" when initially checking them against the NodeManager |
758 |
|
// pool), we must check d_nchildren here. |
759 |
8578 |
return d_nchildren == 0 |
760 |
8578 |
? *reinterpret_cast< BitVectorRepeat const* >(d_children) |
761 |
8578 |
: *reinterpret_cast< BitVectorRepeat const* >(d_children[0]); |
762 |
|
} |
763 |
|
|
764 |
|
// re-enable the warning |
765 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
766 |
|
|
767 |
|
|
768 |
|
// The reinterpret_cast of d_children to "BitVectorRotateLeft const*" |
769 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
770 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
771 |
|
// NodeValue* child as a constant. |
772 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
773 |
|
|
774 |
|
template <> |
775 |
4491 |
BitVectorRotateLeft const& NodeValue::getConst< BitVectorRotateLeft >() const { |
776 |
4491 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_ROTATE_LEFT_OP, *this, |
777 |
|
"Improper kind for getConst<BitVectorRotateLeft>()"); |
778 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
779 |
|
// "constructed" when initially checking them against the NodeManager |
780 |
|
// pool), we must check d_nchildren here. |
781 |
4491 |
return d_nchildren == 0 |
782 |
4491 |
? *reinterpret_cast< BitVectorRotateLeft const* >(d_children) |
783 |
4491 |
: *reinterpret_cast< BitVectorRotateLeft const* >(d_children[0]); |
784 |
|
} |
785 |
|
|
786 |
|
// re-enable the warning |
787 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
788 |
|
|
789 |
|
|
790 |
|
// The reinterpret_cast of d_children to "BitVectorRotateRight const*" |
791 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
792 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
793 |
|
// NodeValue* child as a constant. |
794 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
795 |
|
|
796 |
|
template <> |
797 |
5520 |
BitVectorRotateRight const& NodeValue::getConst< BitVectorRotateRight >() const { |
798 |
5520 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_ROTATE_RIGHT_OP, *this, |
799 |
|
"Improper kind for getConst<BitVectorRotateRight>()"); |
800 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
801 |
|
// "constructed" when initially checking them against the NodeManager |
802 |
|
// pool), we must check d_nchildren here. |
803 |
5520 |
return d_nchildren == 0 |
804 |
5520 |
? *reinterpret_cast< BitVectorRotateRight const* >(d_children) |
805 |
5520 |
: *reinterpret_cast< BitVectorRotateRight const* >(d_children[0]); |
806 |
|
} |
807 |
|
|
808 |
|
// re-enable the warning |
809 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
810 |
|
|
811 |
|
|
812 |
|
// The reinterpret_cast of d_children to "BitVectorSignExtend const*" |
813 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
814 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
815 |
|
// NodeValue* child as a constant. |
816 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
817 |
|
|
818 |
|
template <> |
819 |
87993 |
BitVectorSignExtend const& NodeValue::getConst< BitVectorSignExtend >() const { |
820 |
87993 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_SIGN_EXTEND_OP, *this, |
821 |
|
"Improper kind for getConst<BitVectorSignExtend>()"); |
822 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
823 |
|
// "constructed" when initially checking them against the NodeManager |
824 |
|
// pool), we must check d_nchildren here. |
825 |
87993 |
return d_nchildren == 0 |
826 |
87993 |
? *reinterpret_cast< BitVectorSignExtend const* >(d_children) |
827 |
87993 |
: *reinterpret_cast< BitVectorSignExtend const* >(d_children[0]); |
828 |
|
} |
829 |
|
|
830 |
|
// re-enable the warning |
831 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
832 |
|
|
833 |
|
|
834 |
|
// The reinterpret_cast of d_children to "BitVectorZeroExtend const*" |
835 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
836 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
837 |
|
// NodeValue* child as a constant. |
838 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
839 |
|
|
840 |
|
template <> |
841 |
120634 |
BitVectorZeroExtend const& NodeValue::getConst< BitVectorZeroExtend >() const { |
842 |
120634 |
AssertArgument(getKind() == ::cvc5::kind::BITVECTOR_ZERO_EXTEND_OP, *this, |
843 |
|
"Improper kind for getConst<BitVectorZeroExtend>()"); |
844 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
845 |
|
// "constructed" when initially checking them against the NodeManager |
846 |
|
// pool), we must check d_nchildren here. |
847 |
120634 |
return d_nchildren == 0 |
848 |
120634 |
? *reinterpret_cast< BitVectorZeroExtend const* >(d_children) |
849 |
120634 |
: *reinterpret_cast< BitVectorZeroExtend const* >(d_children[0]); |
850 |
|
} |
851 |
|
|
852 |
|
// re-enable the warning |
853 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
854 |
|
|
855 |
|
|
856 |
|
// The reinterpret_cast of d_children to "IntToBitVector const*" |
857 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
858 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
859 |
|
// NodeValue* child as a constant. |
860 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
861 |
|
|
862 |
|
template <> |
863 |
4306 |
IntToBitVector const& NodeValue::getConst< IntToBitVector >() const { |
864 |
4306 |
AssertArgument(getKind() == ::cvc5::kind::INT_TO_BITVECTOR_OP, *this, |
865 |
|
"Improper kind for getConst<IntToBitVector>()"); |
866 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
867 |
|
// "constructed" when initially checking them against the NodeManager |
868 |
|
// pool), we must check d_nchildren here. |
869 |
4306 |
return d_nchildren == 0 |
870 |
4306 |
? *reinterpret_cast< IntToBitVector const* >(d_children) |
871 |
4306 |
: *reinterpret_cast< IntToBitVector const* >(d_children[0]); |
872 |
|
} |
873 |
|
|
874 |
|
// re-enable the warning |
875 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
876 |
|
|
877 |
|
|
878 |
|
// The reinterpret_cast of d_children to "FloatingPoint const*" |
879 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
880 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
881 |
|
// NodeValue* child as a constant. |
882 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
883 |
|
|
884 |
|
template <> |
885 |
9597 |
FloatingPoint const& NodeValue::getConst< FloatingPoint >() const { |
886 |
9597 |
AssertArgument(getKind() == ::cvc5::kind::CONST_FLOATINGPOINT, *this, |
887 |
|
"Improper kind for getConst<FloatingPoint>()"); |
888 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
889 |
|
// "constructed" when initially checking them against the NodeManager |
890 |
|
// pool), we must check d_nchildren here. |
891 |
9597 |
return d_nchildren == 0 |
892 |
9597 |
? *reinterpret_cast< FloatingPoint const* >(d_children) |
893 |
9597 |
: *reinterpret_cast< FloatingPoint const* >(d_children[0]); |
894 |
|
} |
895 |
|
|
896 |
|
// re-enable the warning |
897 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
898 |
|
|
899 |
|
|
900 |
|
// The reinterpret_cast of d_children to "RoundingMode const*" |
901 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
902 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
903 |
|
// NodeValue* child as a constant. |
904 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
905 |
|
|
906 |
|
template <> |
907 |
93150 |
RoundingMode const& NodeValue::getConst< RoundingMode >() const { |
908 |
93150 |
AssertArgument(getKind() == ::cvc5::kind::CONST_ROUNDINGMODE, *this, |
909 |
|
"Improper kind for getConst<RoundingMode>()"); |
910 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
911 |
|
// "constructed" when initially checking them against the NodeManager |
912 |
|
// pool), we must check d_nchildren here. |
913 |
93150 |
return d_nchildren == 0 |
914 |
93150 |
? *reinterpret_cast< RoundingMode const* >(d_children) |
915 |
93150 |
: *reinterpret_cast< RoundingMode const* >(d_children[0]); |
916 |
|
} |
917 |
|
|
918 |
|
// re-enable the warning |
919 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
920 |
|
|
921 |
|
|
922 |
|
// The reinterpret_cast of d_children to "FloatingPointSize const*" |
923 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
924 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
925 |
|
// NodeValue* child as a constant. |
926 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
927 |
|
|
928 |
|
template <> |
929 |
74780 |
FloatingPointSize const& NodeValue::getConst< FloatingPointSize >() const { |
930 |
74780 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TYPE, *this, |
931 |
|
"Improper kind for getConst<FloatingPointSize>()"); |
932 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
933 |
|
// "constructed" when initially checking them against the NodeManager |
934 |
|
// pool), we must check d_nchildren here. |
935 |
74780 |
return d_nchildren == 0 |
936 |
74780 |
? *reinterpret_cast< FloatingPointSize const* >(d_children) |
937 |
74780 |
: *reinterpret_cast< FloatingPointSize const* >(d_children[0]); |
938 |
|
} |
939 |
|
|
940 |
|
// re-enable the warning |
941 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
942 |
|
|
943 |
|
|
944 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPIEEEBitVector const*" |
945 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
946 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
947 |
|
// NodeValue* child as a constant. |
948 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
949 |
|
|
950 |
|
template <> |
951 |
6870 |
FloatingPointToFPIEEEBitVector const& NodeValue::getConst< FloatingPointToFPIEEEBitVector >() const { |
952 |
6870 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP, *this, |
953 |
|
"Improper kind for getConst<FloatingPointToFPIEEEBitVector>()"); |
954 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
955 |
|
// "constructed" when initially checking them against the NodeManager |
956 |
|
// pool), we must check d_nchildren here. |
957 |
6870 |
return d_nchildren == 0 |
958 |
6870 |
? *reinterpret_cast< FloatingPointToFPIEEEBitVector const* >(d_children) |
959 |
6870 |
: *reinterpret_cast< FloatingPointToFPIEEEBitVector const* >(d_children[0]); |
960 |
|
} |
961 |
|
|
962 |
|
// re-enable the warning |
963 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
964 |
|
|
965 |
|
|
966 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPFloatingPoint const*" |
967 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
968 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
969 |
|
// NodeValue* child as a constant. |
970 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
971 |
|
|
972 |
|
template <> |
973 |
160 |
FloatingPointToFPFloatingPoint const& NodeValue::getConst< FloatingPointToFPFloatingPoint >() const { |
974 |
160 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP, *this, |
975 |
|
"Improper kind for getConst<FloatingPointToFPFloatingPoint>()"); |
976 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
977 |
|
// "constructed" when initially checking them against the NodeManager |
978 |
|
// pool), we must check d_nchildren here. |
979 |
160 |
return d_nchildren == 0 |
980 |
160 |
? *reinterpret_cast< FloatingPointToFPFloatingPoint const* >(d_children) |
981 |
160 |
: *reinterpret_cast< FloatingPointToFPFloatingPoint const* >(d_children[0]); |
982 |
|
} |
983 |
|
|
984 |
|
// re-enable the warning |
985 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
986 |
|
|
987 |
|
|
988 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPReal const*" |
989 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
990 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
991 |
|
// NodeValue* child as a constant. |
992 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
993 |
|
|
994 |
|
template <> |
995 |
230 |
FloatingPointToFPReal const& NodeValue::getConst< FloatingPointToFPReal >() const { |
996 |
230 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_REAL_OP, *this, |
997 |
|
"Improper kind for getConst<FloatingPointToFPReal>()"); |
998 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
999 |
|
// "constructed" when initially checking them against the NodeManager |
1000 |
|
// pool), we must check d_nchildren here. |
1001 |
230 |
return d_nchildren == 0 |
1002 |
230 |
? *reinterpret_cast< FloatingPointToFPReal const* >(d_children) |
1003 |
230 |
: *reinterpret_cast< FloatingPointToFPReal const* >(d_children[0]); |
1004 |
|
} |
1005 |
|
|
1006 |
|
// re-enable the warning |
1007 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1008 |
|
|
1009 |
|
|
1010 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPSignedBitVector const*" |
1011 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1012 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1013 |
|
// NodeValue* child as a constant. |
1014 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1015 |
|
|
1016 |
|
template <> |
1017 |
184 |
FloatingPointToFPSignedBitVector const& NodeValue::getConst< FloatingPointToFPSignedBitVector >() const { |
1018 |
184 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP, *this, |
1019 |
|
"Improper kind for getConst<FloatingPointToFPSignedBitVector>()"); |
1020 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1021 |
|
// "constructed" when initially checking them against the NodeManager |
1022 |
|
// pool), we must check d_nchildren here. |
1023 |
184 |
return d_nchildren == 0 |
1024 |
184 |
? *reinterpret_cast< FloatingPointToFPSignedBitVector const* >(d_children) |
1025 |
184 |
: *reinterpret_cast< FloatingPointToFPSignedBitVector const* >(d_children[0]); |
1026 |
|
} |
1027 |
|
|
1028 |
|
// re-enable the warning |
1029 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1030 |
|
|
1031 |
|
|
1032 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPUnsignedBitVector const*" |
1033 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1034 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1035 |
|
// NodeValue* child as a constant. |
1036 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1037 |
|
|
1038 |
|
template <> |
1039 |
313 |
FloatingPointToFPUnsignedBitVector const& NodeValue::getConst< FloatingPointToFPUnsignedBitVector >() const { |
1040 |
313 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP, *this, |
1041 |
|
"Improper kind for getConst<FloatingPointToFPUnsignedBitVector>()"); |
1042 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1043 |
|
// "constructed" when initially checking them against the NodeManager |
1044 |
|
// pool), we must check d_nchildren here. |
1045 |
313 |
return d_nchildren == 0 |
1046 |
313 |
? *reinterpret_cast< FloatingPointToFPUnsignedBitVector const* >(d_children) |
1047 |
313 |
: *reinterpret_cast< FloatingPointToFPUnsignedBitVector const* >(d_children[0]); |
1048 |
|
} |
1049 |
|
|
1050 |
|
// re-enable the warning |
1051 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1052 |
|
|
1053 |
|
|
1054 |
|
// The reinterpret_cast of d_children to "FloatingPointToFPGeneric const*" |
1055 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1056 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1057 |
|
// NodeValue* child as a constant. |
1058 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1059 |
|
|
1060 |
|
template <> |
1061 |
589 |
FloatingPointToFPGeneric const& NodeValue::getConst< FloatingPointToFPGeneric >() const { |
1062 |
589 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_FP_GENERIC_OP, *this, |
1063 |
|
"Improper kind for getConst<FloatingPointToFPGeneric>()"); |
1064 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1065 |
|
// "constructed" when initially checking them against the NodeManager |
1066 |
|
// pool), we must check d_nchildren here. |
1067 |
589 |
return d_nchildren == 0 |
1068 |
589 |
? *reinterpret_cast< FloatingPointToFPGeneric const* >(d_children) |
1069 |
589 |
: *reinterpret_cast< FloatingPointToFPGeneric const* >(d_children[0]); |
1070 |
|
} |
1071 |
|
|
1072 |
|
// re-enable the warning |
1073 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1074 |
|
|
1075 |
|
|
1076 |
|
// The reinterpret_cast of d_children to "FloatingPointToUBV const*" |
1077 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1078 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1079 |
|
// NodeValue* child as a constant. |
1080 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1081 |
|
|
1082 |
|
template <> |
1083 |
58 |
FloatingPointToUBV const& NodeValue::getConst< FloatingPointToUBV >() const { |
1084 |
58 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_UBV_OP, *this, |
1085 |
|
"Improper kind for getConst<FloatingPointToUBV>()"); |
1086 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1087 |
|
// "constructed" when initially checking them against the NodeManager |
1088 |
|
// pool), we must check d_nchildren here. |
1089 |
58 |
return d_nchildren == 0 |
1090 |
58 |
? *reinterpret_cast< FloatingPointToUBV const* >(d_children) |
1091 |
58 |
: *reinterpret_cast< FloatingPointToUBV const* >(d_children[0]); |
1092 |
|
} |
1093 |
|
|
1094 |
|
// re-enable the warning |
1095 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1096 |
|
|
1097 |
|
|
1098 |
|
// The reinterpret_cast of d_children to "FloatingPointToUBVTotal const*" |
1099 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1100 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1101 |
|
// NodeValue* child as a constant. |
1102 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1103 |
|
|
1104 |
|
template <> |
1105 |
|
FloatingPointToUBVTotal const& NodeValue::getConst< FloatingPointToUBVTotal >() const { |
1106 |
|
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_UBV_TOTAL_OP, *this, |
1107 |
|
"Improper kind for getConst<FloatingPointToUBVTotal>()"); |
1108 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1109 |
|
// "constructed" when initially checking them against the NodeManager |
1110 |
|
// pool), we must check d_nchildren here. |
1111 |
|
return d_nchildren == 0 |
1112 |
|
? *reinterpret_cast< FloatingPointToUBVTotal const* >(d_children) |
1113 |
|
: *reinterpret_cast< FloatingPointToUBVTotal const* >(d_children[0]); |
1114 |
|
} |
1115 |
|
|
1116 |
|
// re-enable the warning |
1117 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1118 |
|
|
1119 |
|
|
1120 |
|
// The reinterpret_cast of d_children to "FloatingPointToSBV const*" |
1121 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1122 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1123 |
|
// NodeValue* child as a constant. |
1124 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1125 |
|
|
1126 |
|
template <> |
1127 |
95 |
FloatingPointToSBV const& NodeValue::getConst< FloatingPointToSBV >() const { |
1128 |
95 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_SBV_OP, *this, |
1129 |
|
"Improper kind for getConst<FloatingPointToSBV>()"); |
1130 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1131 |
|
// "constructed" when initially checking them against the NodeManager |
1132 |
|
// pool), we must check d_nchildren here. |
1133 |
95 |
return d_nchildren == 0 |
1134 |
95 |
? *reinterpret_cast< FloatingPointToSBV const* >(d_children) |
1135 |
95 |
: *reinterpret_cast< FloatingPointToSBV const* >(d_children[0]); |
1136 |
|
} |
1137 |
|
|
1138 |
|
// re-enable the warning |
1139 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1140 |
|
|
1141 |
|
|
1142 |
|
// The reinterpret_cast of d_children to "FloatingPointToSBVTotal const*" |
1143 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1144 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1145 |
|
// NodeValue* child as a constant. |
1146 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1147 |
|
|
1148 |
|
template <> |
1149 |
37 |
FloatingPointToSBVTotal const& NodeValue::getConst< FloatingPointToSBVTotal >() const { |
1150 |
37 |
AssertArgument(getKind() == ::cvc5::kind::FLOATINGPOINT_TO_SBV_TOTAL_OP, *this, |
1151 |
|
"Improper kind for getConst<FloatingPointToSBVTotal>()"); |
1152 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1153 |
|
// "constructed" when initially checking them against the NodeManager |
1154 |
|
// pool), we must check d_nchildren here. |
1155 |
37 |
return d_nchildren == 0 |
1156 |
37 |
? *reinterpret_cast< FloatingPointToSBVTotal const* >(d_children) |
1157 |
37 |
: *reinterpret_cast< FloatingPointToSBVTotal const* >(d_children[0]); |
1158 |
|
} |
1159 |
|
|
1160 |
|
// re-enable the warning |
1161 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1162 |
|
|
1163 |
|
|
1164 |
|
// The reinterpret_cast of d_children to "ArrayStoreAll const*" |
1165 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1166 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1167 |
|
// NodeValue* child as a constant. |
1168 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1169 |
|
|
1170 |
|
template <> |
1171 |
33204 |
ArrayStoreAll const& NodeValue::getConst< ArrayStoreAll >() const { |
1172 |
33204 |
AssertArgument(getKind() == ::cvc5::kind::STORE_ALL, *this, |
1173 |
|
"Improper kind for getConst<ArrayStoreAll>()"); |
1174 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1175 |
|
// "constructed" when initially checking them against the NodeManager |
1176 |
|
// pool), we must check d_nchildren here. |
1177 |
33204 |
return d_nchildren == 0 |
1178 |
33204 |
? *reinterpret_cast< ArrayStoreAll const* >(d_children) |
1179 |
33204 |
: *reinterpret_cast< ArrayStoreAll const* >(d_children[0]); |
1180 |
|
} |
1181 |
|
|
1182 |
|
// re-enable the warning |
1183 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1184 |
|
|
1185 |
|
|
1186 |
|
// The reinterpret_cast of d_children to "DatatypeIndexConstant const*" |
1187 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1188 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1189 |
|
// NodeValue* child as a constant. |
1190 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1191 |
|
|
1192 |
|
template <> |
1193 |
4227224 |
DatatypeIndexConstant const& NodeValue::getConst< DatatypeIndexConstant >() const { |
1194 |
4227224 |
AssertArgument(getKind() == ::cvc5::kind::DATATYPE_TYPE, *this, |
1195 |
|
"Improper kind for getConst<DatatypeIndexConstant>()"); |
1196 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1197 |
|
// "constructed" when initially checking them against the NodeManager |
1198 |
|
// pool), we must check d_nchildren here. |
1199 |
4227224 |
return d_nchildren == 0 |
1200 |
4227224 |
? *reinterpret_cast< DatatypeIndexConstant const* >(d_children) |
1201 |
4227224 |
: *reinterpret_cast< DatatypeIndexConstant const* >(d_children[0]); |
1202 |
|
} |
1203 |
|
|
1204 |
|
// re-enable the warning |
1205 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1206 |
|
|
1207 |
|
|
1208 |
|
// The reinterpret_cast of d_children to "AscriptionType const*" |
1209 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1210 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1211 |
|
// NodeValue* child as a constant. |
1212 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1213 |
|
|
1214 |
|
template <> |
1215 |
5030 |
AscriptionType const& NodeValue::getConst< AscriptionType >() const { |
1216 |
5030 |
AssertArgument(getKind() == ::cvc5::kind::ASCRIPTION_TYPE, *this, |
1217 |
|
"Improper kind for getConst<AscriptionType>()"); |
1218 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1219 |
|
// "constructed" when initially checking them against the NodeManager |
1220 |
|
// pool), we must check d_nchildren here. |
1221 |
5030 |
return d_nchildren == 0 |
1222 |
5030 |
? *reinterpret_cast< AscriptionType const* >(d_children) |
1223 |
5030 |
: *reinterpret_cast< AscriptionType const* >(d_children[0]); |
1224 |
|
} |
1225 |
|
|
1226 |
|
// re-enable the warning |
1227 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1228 |
|
|
1229 |
|
|
1230 |
|
// The reinterpret_cast of d_children to "TupleProjectOp const*" |
1231 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1232 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1233 |
|
// NodeValue* child as a constant. |
1234 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1235 |
|
|
1236 |
|
template <> |
1237 |
310 |
TupleProjectOp const& NodeValue::getConst< TupleProjectOp >() const { |
1238 |
310 |
AssertArgument(getKind() == ::cvc5::kind::TUPLE_PROJECT_OP, *this, |
1239 |
|
"Improper kind for getConst<TupleProjectOp>()"); |
1240 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1241 |
|
// "constructed" when initially checking them against the NodeManager |
1242 |
|
// pool), we must check d_nchildren here. |
1243 |
310 |
return d_nchildren == 0 |
1244 |
310 |
? *reinterpret_cast< TupleProjectOp const* >(d_children) |
1245 |
310 |
: *reinterpret_cast< TupleProjectOp const* >(d_children[0]); |
1246 |
|
} |
1247 |
|
|
1248 |
|
// re-enable the warning |
1249 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1250 |
|
|
1251 |
|
|
1252 |
|
// The reinterpret_cast of d_children to "EmptySet const*" |
1253 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1254 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1255 |
|
// NodeValue* child as a constant. |
1256 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1257 |
|
|
1258 |
|
template <> |
1259 |
21777 |
EmptySet const& NodeValue::getConst< EmptySet >() const { |
1260 |
21777 |
AssertArgument(getKind() == ::cvc5::kind::EMPTYSET, *this, |
1261 |
|
"Improper kind for getConst<EmptySet>()"); |
1262 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1263 |
|
// "constructed" when initially checking them against the NodeManager |
1264 |
|
// pool), we must check d_nchildren here. |
1265 |
21777 |
return d_nchildren == 0 |
1266 |
21777 |
? *reinterpret_cast< EmptySet const* >(d_children) |
1267 |
21777 |
: *reinterpret_cast< EmptySet const* >(d_children[0]); |
1268 |
|
} |
1269 |
|
|
1270 |
|
// re-enable the warning |
1271 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1272 |
|
|
1273 |
|
|
1274 |
|
// The reinterpret_cast of d_children to "SingletonOp const*" |
1275 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1276 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1277 |
|
// NodeValue* child as a constant. |
1278 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1279 |
|
|
1280 |
|
template <> |
1281 |
25063 |
SingletonOp const& NodeValue::getConst< SingletonOp >() const { |
1282 |
25063 |
AssertArgument(getKind() == ::cvc5::kind::SINGLETON_OP, *this, |
1283 |
|
"Improper kind for getConst<SingletonOp>()"); |
1284 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1285 |
|
// "constructed" when initially checking them against the NodeManager |
1286 |
|
// pool), we must check d_nchildren here. |
1287 |
25063 |
return d_nchildren == 0 |
1288 |
25063 |
? *reinterpret_cast< SingletonOp const* >(d_children) |
1289 |
25063 |
: *reinterpret_cast< SingletonOp const* >(d_children[0]); |
1290 |
|
} |
1291 |
|
|
1292 |
|
// re-enable the warning |
1293 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1294 |
|
|
1295 |
|
|
1296 |
|
// The reinterpret_cast of d_children to "EmptyBag const*" |
1297 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1298 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1299 |
|
// NodeValue* child as a constant. |
1300 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1301 |
|
|
1302 |
|
template <> |
1303 |
16450 |
EmptyBag const& NodeValue::getConst< EmptyBag >() const { |
1304 |
16450 |
AssertArgument(getKind() == ::cvc5::kind::EMPTYBAG, *this, |
1305 |
|
"Improper kind for getConst<EmptyBag>()"); |
1306 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1307 |
|
// "constructed" when initially checking them against the NodeManager |
1308 |
|
// pool), we must check d_nchildren here. |
1309 |
16450 |
return d_nchildren == 0 |
1310 |
16450 |
? *reinterpret_cast< EmptyBag const* >(d_children) |
1311 |
16450 |
: *reinterpret_cast< EmptyBag const* >(d_children[0]); |
1312 |
|
} |
1313 |
|
|
1314 |
|
// re-enable the warning |
1315 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1316 |
|
|
1317 |
|
|
1318 |
|
// The reinterpret_cast of d_children to "MakeBagOp const*" |
1319 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1320 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1321 |
|
// NodeValue* child as a constant. |
1322 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1323 |
|
|
1324 |
|
template <> |
1325 |
1540 |
MakeBagOp const& NodeValue::getConst< MakeBagOp >() const { |
1326 |
1540 |
AssertArgument(getKind() == ::cvc5::kind::MK_BAG_OP, *this, |
1327 |
|
"Improper kind for getConst<MakeBagOp>()"); |
1328 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1329 |
|
// "constructed" when initially checking them against the NodeManager |
1330 |
|
// pool), we must check d_nchildren here. |
1331 |
1540 |
return d_nchildren == 0 |
1332 |
1540 |
? *reinterpret_cast< MakeBagOp const* >(d_children) |
1333 |
1540 |
: *reinterpret_cast< MakeBagOp const* >(d_children[0]); |
1334 |
|
} |
1335 |
|
|
1336 |
|
// re-enable the warning |
1337 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1338 |
|
|
1339 |
|
|
1340 |
|
// The reinterpret_cast of d_children to "String const*" |
1341 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1342 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1343 |
|
// NodeValue* child as a constant. |
1344 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1345 |
|
|
1346 |
|
template <> |
1347 |
8435289 |
String const& NodeValue::getConst< String >() const { |
1348 |
8435289 |
AssertArgument(getKind() == ::cvc5::kind::CONST_STRING, *this, |
1349 |
|
"Improper kind for getConst<String>()"); |
1350 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1351 |
|
// "constructed" when initially checking them against the NodeManager |
1352 |
|
// pool), we must check d_nchildren here. |
1353 |
8435289 |
return d_nchildren == 0 |
1354 |
8435289 |
? *reinterpret_cast< String const* >(d_children) |
1355 |
8435289 |
: *reinterpret_cast< String const* >(d_children[0]); |
1356 |
|
} |
1357 |
|
|
1358 |
|
// re-enable the warning |
1359 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1360 |
|
|
1361 |
|
|
1362 |
|
// The reinterpret_cast of d_children to "Sequence const*" |
1363 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1364 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1365 |
|
// NodeValue* child as a constant. |
1366 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1367 |
|
|
1368 |
|
template <> |
1369 |
44193 |
Sequence const& NodeValue::getConst< Sequence >() const { |
1370 |
44193 |
AssertArgument(getKind() == ::cvc5::kind::CONST_SEQUENCE, *this, |
1371 |
|
"Improper kind for getConst<Sequence>()"); |
1372 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1373 |
|
// "constructed" when initially checking them against the NodeManager |
1374 |
|
// pool), we must check d_nchildren here. |
1375 |
44193 |
return d_nchildren == 0 |
1376 |
44193 |
? *reinterpret_cast< Sequence const* >(d_children) |
1377 |
44193 |
: *reinterpret_cast< Sequence const* >(d_children[0]); |
1378 |
|
} |
1379 |
|
|
1380 |
|
// re-enable the warning |
1381 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1382 |
|
|
1383 |
|
|
1384 |
|
// The reinterpret_cast of d_children to "RegExpRepeat const*" |
1385 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1386 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1387 |
|
// NodeValue* child as a constant. |
1388 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1389 |
|
|
1390 |
|
template <> |
1391 |
60 |
RegExpRepeat const& NodeValue::getConst< RegExpRepeat >() const { |
1392 |
60 |
AssertArgument(getKind() == ::cvc5::kind::REGEXP_REPEAT_OP, *this, |
1393 |
|
"Improper kind for getConst<RegExpRepeat>()"); |
1394 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1395 |
|
// "constructed" when initially checking them against the NodeManager |
1396 |
|
// pool), we must check d_nchildren here. |
1397 |
60 |
return d_nchildren == 0 |
1398 |
60 |
? *reinterpret_cast< RegExpRepeat const* >(d_children) |
1399 |
60 |
: *reinterpret_cast< RegExpRepeat const* >(d_children[0]); |
1400 |
|
} |
1401 |
|
|
1402 |
|
// re-enable the warning |
1403 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1404 |
|
|
1405 |
|
|
1406 |
|
// The reinterpret_cast of d_children to "RegExpLoop const*" |
1407 |
|
// flags a "strict aliasing" warning; it's okay, because we never access |
1408 |
|
// the embedded constant as a NodeValue* child, and never access an embedded |
1409 |
|
// NodeValue* child as a constant. |
1410 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1411 |
|
|
1412 |
|
template <> |
1413 |
398 |
RegExpLoop const& NodeValue::getConst< RegExpLoop >() const { |
1414 |
398 |
AssertArgument(getKind() == ::cvc5::kind::REGEXP_LOOP_OP, *this, |
1415 |
|
"Improper kind for getConst<RegExpLoop>()"); |
1416 |
|
// To support non-inlined CONSTANT-kinded NodeValues (those that are |
1417 |
|
// "constructed" when initially checking them against the NodeManager |
1418 |
|
// pool), we must check d_nchildren here. |
1419 |
398 |
return d_nchildren == 0 |
1420 |
398 |
? *reinterpret_cast< RegExpLoop const* >(d_children) |
1421 |
398 |
: *reinterpret_cast< RegExpLoop const* >(d_children[0]); |
1422 |
|
} |
1423 |
|
|
1424 |
|
// re-enable the warning |
1425 |
|
#pragma GCC diagnostic warning "-Wstrict-aliasing" |
1426 |
|
|
1427 |
|
|
1428 |
|
// clang-format on |
1429 |
|
|
1430 |
|
} // namespace expr |
1431 |
|
|
1432 |
|
namespace kind { |
1433 |
|
namespace metakind { |
1434 |
|
|
1435 |
263427600 |
size_t NodeValueCompare::constHash(const ::cvc5::expr::NodeValue* nv) |
1436 |
|
{ |
1437 |
263427600 |
Assert(nv->getMetaKind() == kind::metakind::CONSTANT); |
1438 |
|
|
1439 |
263427600 |
switch (nv->d_kind) |
1440 |
|
{ |
1441 |
|
// clang-format off |
1442 |
|
|
1443 |
27647 |
case kind::UNINTERPRETED_CONSTANT: |
1444 |
27647 |
return ::cvc5::UninterpretedConstantHashFunction()(nv->getConst< UninterpretedConstant >()); |
1445 |
|
|
1446 |
100 |
case kind::ABSTRACT_VALUE: |
1447 |
100 |
return ::cvc5::AbstractValueHashFunction()(nv->getConst< AbstractValue >()); |
1448 |
|
|
1449 |
13087074 |
case kind::BUILTIN: |
1450 |
13087074 |
return ::cvc5::kind::KindHashFunction()(nv->getConst< Kind >()); |
1451 |
|
|
1452 |
31844284 |
case kind::TYPE_CONSTANT: |
1453 |
31844284 |
return ::cvc5::TypeConstantHashFunction()(nv->getConst< TypeConstant >()); |
1454 |
|
|
1455 |
43661640 |
case kind::CONST_BOOLEAN: |
1456 |
43661640 |
return ::cvc5::BoolHashFunction()(nv->getConst< bool >()); |
1457 |
|
|
1458 |
60 |
case kind::DIVISIBLE_OP: |
1459 |
60 |
return ::cvc5::DivisibleHashFunction()(nv->getConst< Divisible >()); |
1460 |
|
|
1461 |
167325351 |
case kind::CONST_RATIONAL: |
1462 |
167325351 |
return ::cvc5::RationalHashFunction()(nv->getConst< Rational >()); |
1463 |
|
|
1464 |
9 |
case kind::INDEXED_ROOT_PREDICATE_OP: |
1465 |
9 |
return ::cvc5::IndexedRootPredicateHashFunction()(nv->getConst< IndexedRootPredicate >()); |
1466 |
|
|
1467 |
406 |
case kind::IAND_OP: |
1468 |
406 |
return ::cvc5::UnsignedHashFunction< ::cvc5::IntAnd >()(nv->getConst< IntAnd >()); |
1469 |
|
|
1470 |
543751 |
case kind::BITVECTOR_TYPE: |
1471 |
543751 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorSize >()(nv->getConst< BitVectorSize >()); |
1472 |
|
|
1473 |
2999764 |
case kind::CONST_BITVECTOR: |
1474 |
2999764 |
return ::cvc5::BitVectorHashFunction()(nv->getConst< BitVector >()); |
1475 |
|
|
1476 |
437941 |
case kind::BITVECTOR_BITOF_OP: |
1477 |
437941 |
return ::cvc5::BitVectorBitOfHashFunction()(nv->getConst< BitVectorBitOf >()); |
1478 |
|
|
1479 |
238899 |
case kind::BITVECTOR_EXTRACT_OP: |
1480 |
238899 |
return ::cvc5::BitVectorExtractHashFunction()(nv->getConst< BitVectorExtract >()); |
1481 |
|
|
1482 |
3840 |
case kind::BITVECTOR_REPEAT_OP: |
1483 |
3840 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRepeat >()(nv->getConst< BitVectorRepeat >()); |
1484 |
|
|
1485 |
2006 |
case kind::BITVECTOR_ROTATE_LEFT_OP: |
1486 |
2006 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRotateLeft >()(nv->getConst< BitVectorRotateLeft >()); |
1487 |
|
|
1488 |
2468 |
case kind::BITVECTOR_ROTATE_RIGHT_OP: |
1489 |
2468 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorRotateRight >()(nv->getConst< BitVectorRotateRight >()); |
1490 |
|
|
1491 |
32129 |
case kind::BITVECTOR_SIGN_EXTEND_OP: |
1492 |
32129 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorSignExtend >()(nv->getConst< BitVectorSignExtend >()); |
1493 |
|
|
1494 |
51492 |
case kind::BITVECTOR_ZERO_EXTEND_OP: |
1495 |
51492 |
return ::cvc5::UnsignedHashFunction< ::cvc5::BitVectorZeroExtend >()(nv->getConst< BitVectorZeroExtend >()); |
1496 |
|
|
1497 |
1696 |
case kind::INT_TO_BITVECTOR_OP: |
1498 |
1696 |
return ::cvc5::UnsignedHashFunction< ::cvc5::IntToBitVector >()(nv->getConst< IntToBitVector >()); |
1499 |
|
|
1500 |
3155 |
case kind::CONST_FLOATINGPOINT: |
1501 |
3155 |
return ::cvc5::FloatingPointHashFunction()(nv->getConst< FloatingPoint >()); |
1502 |
|
|
1503 |
50070 |
case kind::CONST_ROUNDINGMODE: |
1504 |
50070 |
return ::cvc5::RoundingModeHashFunction()(nv->getConst< RoundingMode >()); |
1505 |
|
|
1506 |
36785 |
case kind::FLOATINGPOINT_TYPE: |
1507 |
36785 |
return ::cvc5::FloatingPointSizeHashFunction()(nv->getConst< FloatingPointSize >()); |
1508 |
|
|
1509 |
3145 |
case kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP: |
1510 |
3145 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x1>()(nv->getConst< FloatingPointToFPIEEEBitVector >()); |
1511 |
|
|
1512 |
66 |
case kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP: |
1513 |
66 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x2>()(nv->getConst< FloatingPointToFPFloatingPoint >()); |
1514 |
|
|
1515 |
90 |
case kind::FLOATINGPOINT_TO_FP_REAL_OP: |
1516 |
90 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x4>()(nv->getConst< FloatingPointToFPReal >()); |
1517 |
|
|
1518 |
74 |
case kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP: |
1519 |
74 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x8>()(nv->getConst< FloatingPointToFPSignedBitVector >()); |
1520 |
|
|
1521 |
102 |
case kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP: |
1522 |
102 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x10>()(nv->getConst< FloatingPointToFPUnsignedBitVector >()); |
1523 |
|
|
1524 |
238 |
case kind::FLOATINGPOINT_TO_FP_GENERIC_OP: |
1525 |
238 |
return ::cvc5::FloatingPointConvertSortHashFunction<0x11>()(nv->getConst< FloatingPointToFPGeneric >()); |
1526 |
|
|
1527 |
30 |
case kind::FLOATINGPOINT_TO_UBV_OP: |
1528 |
30 |
return ::cvc5::FloatingPointToBVHashFunction<0x1>()(nv->getConst< FloatingPointToUBV >()); |
1529 |
|
|
1530 |
|
case kind::FLOATINGPOINT_TO_UBV_TOTAL_OP: |
1531 |
|
return ::cvc5::FloatingPointToBVHashFunction<0x4>()(nv->getConst< FloatingPointToUBVTotal >()); |
1532 |
|
|
1533 |
45 |
case kind::FLOATINGPOINT_TO_SBV_OP: |
1534 |
45 |
return ::cvc5::FloatingPointToBVHashFunction<0x2>()(nv->getConst< FloatingPointToSBV >()); |
1535 |
|
|
1536 |
16 |
case kind::FLOATINGPOINT_TO_SBV_TOTAL_OP: |
1537 |
16 |
return ::cvc5::FloatingPointToBVHashFunction<0x8>()(nv->getConst< FloatingPointToSBVTotal >()); |
1538 |
|
|
1539 |
8761 |
case kind::STORE_ALL: |
1540 |
8761 |
return ::cvc5::ArrayStoreAllHashFunction()(nv->getConst< ArrayStoreAll >()); |
1541 |
|
|
1542 |
29077 |
case kind::DATATYPE_TYPE: |
1543 |
29077 |
return ::cvc5::DatatypeIndexConstantHashFunction()(nv->getConst< DatatypeIndexConstant >()); |
1544 |
|
|
1545 |
2503 |
case kind::ASCRIPTION_TYPE: |
1546 |
2503 |
return ::cvc5::AscriptionTypeHashFunction()(nv->getConst< AscriptionType >()); |
1547 |
|
|
1548 |
110 |
case kind::TUPLE_PROJECT_OP: |
1549 |
110 |
return ::cvc5::TupleProjectOpHashFunction()(nv->getConst< TupleProjectOp >()); |
1550 |
|
|
1551 |
10901 |
case kind::EMPTYSET: |
1552 |
10901 |
return ::cvc5::EmptySetHashFunction()(nv->getConst< EmptySet >()); |
1553 |
|
|
1554 |
11254 |
case kind::SINGLETON_OP: |
1555 |
11254 |
return ::cvc5::SingletonOpHashFunction()(nv->getConst< SingletonOp >()); |
1556 |
|
|
1557 |
8238 |
case kind::EMPTYBAG: |
1558 |
8238 |
return ::cvc5::EmptyBagHashFunction()(nv->getConst< EmptyBag >()); |
1559 |
|
|
1560 |
676 |
case kind::MK_BAG_OP: |
1561 |
676 |
return ::cvc5::MakeBagOpHashFunction()(nv->getConst< MakeBagOp >()); |
1562 |
|
|
1563 |
2982718 |
case kind::CONST_STRING: |
1564 |
2982718 |
return ::cvc5::strings::StringHashFunction()(nv->getConst< String >()); |
1565 |
|
|
1566 |
18777 |
case kind::CONST_SEQUENCE: |
1567 |
18777 |
return ::cvc5::SequenceHashFunction()(nv->getConst< Sequence >()); |
1568 |
|
|
1569 |
30 |
case kind::REGEXP_REPEAT_OP: |
1570 |
30 |
return ::cvc5::RegExpRepeatHashFunction()(nv->getConst< RegExpRepeat >()); |
1571 |
|
|
1572 |
182 |
case kind::REGEXP_LOOP_OP: |
1573 |
182 |
return ::cvc5::RegExpLoopHashFunction()(nv->getConst< RegExpLoop >()); |
1574 |
|
|
1575 |
|
// clang-format on |
1576 |
|
default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); |
1577 |
|
} |
1578 |
|
} |
1579 |
|
|
1580 |
|
template <bool pool> |
1581 |
706054813 |
bool NodeValueCompare::compare(const ::cvc5::expr::NodeValue* nv1, |
1582 |
|
const ::cvc5::expr::NodeValue* nv2) |
1583 |
|
{ |
1584 |
706054813 |
if(nv1->d_kind != nv2->d_kind) { |
1585 |
134878160 |
return false; |
1586 |
|
} |
1587 |
|
|
1588 |
571176653 |
if (nv1->getMetaKind() == kind::metakind::CONSTANT) |
1589 |
|
{ |
1590 |
315047026 |
switch (nv1->d_kind) |
1591 |
|
{ |
1592 |
|
// clang-format off |
1593 |
|
|
1594 |
43233 |
case kind::UNINTERPRETED_CONSTANT: |
1595 |
43233 |
return NodeValueConstCompare< kind::UNINTERPRETED_CONSTANT, pool >::compare(nv1, nv2); |
1596 |
|
|
1597 |
46 |
case kind::ABSTRACT_VALUE: |
1598 |
46 |
return NodeValueConstCompare< kind::ABSTRACT_VALUE, pool >::compare(nv1, nv2); |
1599 |
|
|
1600 |
4369638 |
case kind::BUILTIN: |
1601 |
4369638 |
return NodeValueConstCompare< kind::BUILTIN, pool >::compare(nv1, nv2); |
1602 |
|
|
1603 |
31711594 |
case kind::TYPE_CONSTANT: |
1604 |
31711594 |
return NodeValueConstCompare< kind::TYPE_CONSTANT, pool >::compare(nv1, nv2); |
1605 |
|
|
1606 |
43607985 |
case kind::CONST_BOOLEAN: |
1607 |
43607985 |
return NodeValueConstCompare< kind::CONST_BOOLEAN, pool >::compare(nv1, nv2); |
1608 |
|
|
1609 |
24 |
case kind::DIVISIBLE_OP: |
1610 |
24 |
return NodeValueConstCompare< kind::DIVISIBLE_OP, pool >::compare(nv1, nv2); |
1611 |
|
|
1612 |
217625787 |
case kind::CONST_RATIONAL: |
1613 |
217625787 |
return NodeValueConstCompare< kind::CONST_RATIONAL, pool >::compare(nv1, nv2); |
1614 |
|
|
1615 |
6 |
case kind::INDEXED_ROOT_PREDICATE_OP: |
1616 |
6 |
return NodeValueConstCompare< kind::INDEXED_ROOT_PREDICATE_OP, pool >::compare(nv1, nv2); |
1617 |
|
|
1618 |
163 |
case kind::IAND_OP: |
1619 |
163 |
return NodeValueConstCompare< kind::IAND_OP, pool >::compare(nv1, nv2); |
1620 |
|
|
1621 |
517291 |
case kind::BITVECTOR_TYPE: |
1622 |
517291 |
return NodeValueConstCompare< kind::BITVECTOR_TYPE, pool >::compare(nv1, nv2); |
1623 |
|
|
1624 |
13545808 |
case kind::CONST_BITVECTOR: |
1625 |
13545808 |
return NodeValueConstCompare< kind::CONST_BITVECTOR, pool >::compare(nv1, nv2); |
1626 |
|
|
1627 |
339133 |
case kind::BITVECTOR_BITOF_OP: |
1628 |
339133 |
return NodeValueConstCompare< kind::BITVECTOR_BITOF_OP, pool >::compare(nv1, nv2); |
1629 |
|
|
1630 |
217917 |
case kind::BITVECTOR_EXTRACT_OP: |
1631 |
217917 |
return NodeValueConstCompare< kind::BITVECTOR_EXTRACT_OP, pool >::compare(nv1, nv2); |
1632 |
|
|
1633 |
3243 |
case kind::BITVECTOR_REPEAT_OP: |
1634 |
3243 |
return NodeValueConstCompare< kind::BITVECTOR_REPEAT_OP, pool >::compare(nv1, nv2); |
1635 |
|
|
1636 |
1544 |
case kind::BITVECTOR_ROTATE_LEFT_OP: |
1637 |
1544 |
return NodeValueConstCompare< kind::BITVECTOR_ROTATE_LEFT_OP, pool >::compare(nv1, nv2); |
1638 |
|
|
1639 |
1907 |
case kind::BITVECTOR_ROTATE_RIGHT_OP: |
1640 |
1907 |
return NodeValueConstCompare< kind::BITVECTOR_ROTATE_RIGHT_OP, pool >::compare(nv1, nv2); |
1641 |
|
|
1642 |
28307 |
case kind::BITVECTOR_SIGN_EXTEND_OP: |
1643 |
28307 |
return NodeValueConstCompare< kind::BITVECTOR_SIGN_EXTEND_OP, pool >::compare(nv1, nv2); |
1644 |
|
|
1645 |
47094 |
case kind::BITVECTOR_ZERO_EXTEND_OP: |
1646 |
47094 |
return NodeValueConstCompare< kind::BITVECTOR_ZERO_EXTEND_OP, pool >::compare(nv1, nv2); |
1647 |
|
|
1648 |
1024 |
case kind::INT_TO_BITVECTOR_OP: |
1649 |
1024 |
return NodeValueConstCompare< kind::INT_TO_BITVECTOR_OP, pool >::compare(nv1, nv2); |
1650 |
|
|
1651 |
2312 |
case kind::CONST_FLOATINGPOINT: |
1652 |
2312 |
return NodeValueConstCompare< kind::CONST_FLOATINGPOINT, pool >::compare(nv1, nv2); |
1653 |
|
|
1654 |
25743 |
case kind::CONST_ROUNDINGMODE: |
1655 |
25743 |
return NodeValueConstCompare< kind::CONST_ROUNDINGMODE, pool >::compare(nv1, nv2); |
1656 |
|
|
1657 |
17201 |
case kind::FLOATINGPOINT_TYPE: |
1658 |
17201 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TYPE, pool >::compare(nv1, nv2); |
1659 |
|
|
1660 |
3043 |
case kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP: |
1661 |
3043 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP, pool >::compare(nv1, nv2); |
1662 |
|
|
1663 |
27 |
case kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP: |
1664 |
27 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP, pool >::compare(nv1, nv2); |
1665 |
|
|
1666 |
39 |
case kind::FLOATINGPOINT_TO_FP_REAL_OP: |
1667 |
39 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_REAL_OP, pool >::compare(nv1, nv2); |
1668 |
|
|
1669 |
35 |
case kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP: |
1670 |
35 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP, pool >::compare(nv1, nv2); |
1671 |
|
|
1672 |
57 |
case kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP: |
1673 |
57 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP, pool >::compare(nv1, nv2); |
1674 |
|
|
1675 |
139 |
case kind::FLOATINGPOINT_TO_FP_GENERIC_OP: |
1676 |
139 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_FP_GENERIC_OP, pool >::compare(nv1, nv2); |
1677 |
|
|
1678 |
12 |
case kind::FLOATINGPOINT_TO_UBV_OP: |
1679 |
12 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_UBV_OP, pool >::compare(nv1, nv2); |
1680 |
|
|
1681 |
|
case kind::FLOATINGPOINT_TO_UBV_TOTAL_OP: |
1682 |
|
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_UBV_TOTAL_OP, pool >::compare(nv1, nv2); |
1683 |
|
|
1684 |
18 |
case kind::FLOATINGPOINT_TO_SBV_OP: |
1685 |
18 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_SBV_OP, pool >::compare(nv1, nv2); |
1686 |
|
|
1687 |
7 |
case kind::FLOATINGPOINT_TO_SBV_TOTAL_OP: |
1688 |
7 |
return NodeValueConstCompare< kind::FLOATINGPOINT_TO_SBV_TOTAL_OP, pool >::compare(nv1, nv2); |
1689 |
|
|
1690 |
6805 |
case kind::STORE_ALL: |
1691 |
6805 |
return NodeValueConstCompare< kind::STORE_ALL, pool >::compare(nv1, nv2); |
1692 |
|
|
1693 |
12801 |
case kind::DATATYPE_TYPE: |
1694 |
12801 |
return NodeValueConstCompare< kind::DATATYPE_TYPE, pool >::compare(nv1, nv2); |
1695 |
|
|
1696 |
2197 |
case kind::ASCRIPTION_TYPE: |
1697 |
2197 |
return NodeValueConstCompare< kind::ASCRIPTION_TYPE, pool >::compare(nv1, nv2); |
1698 |
|
|
1699 |
60 |
case kind::TUPLE_PROJECT_OP: |
1700 |
60 |
return NodeValueConstCompare< kind::TUPLE_PROJECT_OP, pool >::compare(nv1, nv2); |
1701 |
|
|
1702 |
4865 |
case kind::EMPTYSET: |
1703 |
4865 |
return NodeValueConstCompare< kind::EMPTYSET, pool >::compare(nv1, nv2); |
1704 |
|
|
1705 |
9463 |
case kind::SINGLETON_OP: |
1706 |
9463 |
return NodeValueConstCompare< kind::SINGLETON_OP, pool >::compare(nv1, nv2); |
1707 |
|
|
1708 |
3330 |
case kind::EMPTYBAG: |
1709 |
3330 |
return NodeValueConstCompare< kind::EMPTYBAG, pool >::compare(nv1, nv2); |
1710 |
|
|
1711 |
421 |
case kind::MK_BAG_OP: |
1712 |
421 |
return NodeValueConstCompare< kind::MK_BAG_OP, pool >::compare(nv1, nv2); |
1713 |
|
|
1714 |
2881171 |
case kind::CONST_STRING: |
1715 |
2881171 |
return NodeValueConstCompare< kind::CONST_STRING, pool >::compare(nv1, nv2); |
1716 |
|
|
1717 |
15450 |
case kind::CONST_SEQUENCE: |
1718 |
15450 |
return NodeValueConstCompare< kind::CONST_SEQUENCE, pool >::compare(nv1, nv2); |
1719 |
|
|
1720 |
12 |
case kind::REGEXP_REPEAT_OP: |
1721 |
12 |
return NodeValueConstCompare< kind::REGEXP_REPEAT_OP, pool >::compare(nv1, nv2); |
1722 |
|
|
1723 |
74 |
case kind::REGEXP_LOOP_OP: |
1724 |
74 |
return NodeValueConstCompare< kind::REGEXP_LOOP_OP, pool >::compare(nv1, nv2); |
1725 |
|
|
1726 |
|
// clang-format on |
1727 |
|
default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv1->d_kind); |
1728 |
|
} |
1729 |
|
} |
1730 |
|
|
1731 |
256129627 |
if(nv1->d_nchildren != nv2->d_nchildren) { |
1732 |
|
return false; |
1733 |
|
} |
1734 |
|
|
1735 |
256129627 |
::cvc5::expr::NodeValue::const_nv_iterator i = nv1->nv_begin(); |
1736 |
256129627 |
::cvc5::expr::NodeValue::const_nv_iterator j = nv2->nv_begin(); |
1737 |
256129627 |
::cvc5::expr::NodeValue::const_nv_iterator i_end = nv1->nv_end(); |
1738 |
|
|
1739 |
1405209053 |
while(i != i_end) { |
1740 |
576616099 |
if((*i) != (*j)) { |
1741 |
2076386 |
return false; |
1742 |
|
} |
1743 |
574539713 |
++i; |
1744 |
574539713 |
++j; |
1745 |
|
} |
1746 |
|
|
1747 |
254053241 |
return true; |
1748 |
|
} |
1749 |
|
|
1750 |
|
template bool NodeValueCompare::compare<true>( |
1751 |
|
const ::cvc5::expr::NodeValue* nv1, const ::cvc5::expr::NodeValue* nv2); |
1752 |
|
template bool NodeValueCompare::compare<false>( |
1753 |
|
const ::cvc5::expr::NodeValue* nv1, const ::cvc5::expr::NodeValue* nv2); |
1754 |
|
|
1755 |
10 |
void NodeValueConstPrinter::toStream(std::ostream& out, |
1756 |
|
const ::cvc5::expr::NodeValue* nv) |
1757 |
|
{ |
1758 |
10 |
Assert(nv->getMetaKind() == kind::metakind::CONSTANT); |
1759 |
|
|
1760 |
10 |
switch (nv->d_kind) |
1761 |
|
{ |
1762 |
|
// clang-format off |
1763 |
|
|
1764 |
|
case kind::UNINTERPRETED_CONSTANT: |
1765 |
|
out << nv->getConst< UninterpretedConstant >(); |
1766 |
|
break; |
1767 |
|
|
1768 |
8 |
case kind::ABSTRACT_VALUE: |
1769 |
8 |
out << nv->getConst< AbstractValue >(); |
1770 |
8 |
break; |
1771 |
|
|
1772 |
|
case kind::BUILTIN: |
1773 |
|
out << nv->getConst< Kind >(); |
1774 |
|
break; |
1775 |
|
|
1776 |
|
case kind::TYPE_CONSTANT: |
1777 |
|
out << nv->getConst< TypeConstant >(); |
1778 |
|
break; |
1779 |
|
|
1780 |
|
case kind::CONST_BOOLEAN: |
1781 |
|
out << nv->getConst< bool >(); |
1782 |
|
break; |
1783 |
|
|
1784 |
|
case kind::DIVISIBLE_OP: |
1785 |
|
out << nv->getConst< Divisible >(); |
1786 |
|
break; |
1787 |
|
|
1788 |
2 |
case kind::CONST_RATIONAL: |
1789 |
2 |
out << nv->getConst< Rational >(); |
1790 |
2 |
break; |
1791 |
|
|
1792 |
|
case kind::INDEXED_ROOT_PREDICATE_OP: |
1793 |
|
out << nv->getConst< IndexedRootPredicate >(); |
1794 |
|
break; |
1795 |
|
|
1796 |
|
case kind::IAND_OP: |
1797 |
|
out << nv->getConst< IntAnd >(); |
1798 |
|
break; |
1799 |
|
|
1800 |
|
case kind::BITVECTOR_TYPE: |
1801 |
|
out << nv->getConst< BitVectorSize >(); |
1802 |
|
break; |
1803 |
|
|
1804 |
|
case kind::CONST_BITVECTOR: |
1805 |
|
out << nv->getConst< BitVector >(); |
1806 |
|
break; |
1807 |
|
|
1808 |
|
case kind::BITVECTOR_BITOF_OP: |
1809 |
|
out << nv->getConst< BitVectorBitOf >(); |
1810 |
|
break; |
1811 |
|
|
1812 |
|
case kind::BITVECTOR_EXTRACT_OP: |
1813 |
|
out << nv->getConst< BitVectorExtract >(); |
1814 |
|
break; |
1815 |
|
|
1816 |
|
case kind::BITVECTOR_REPEAT_OP: |
1817 |
|
out << nv->getConst< BitVectorRepeat >(); |
1818 |
|
break; |
1819 |
|
|
1820 |
|
case kind::BITVECTOR_ROTATE_LEFT_OP: |
1821 |
|
out << nv->getConst< BitVectorRotateLeft >(); |
1822 |
|
break; |
1823 |
|
|
1824 |
|
case kind::BITVECTOR_ROTATE_RIGHT_OP: |
1825 |
|
out << nv->getConst< BitVectorRotateRight >(); |
1826 |
|
break; |
1827 |
|
|
1828 |
|
case kind::BITVECTOR_SIGN_EXTEND_OP: |
1829 |
|
out << nv->getConst< BitVectorSignExtend >(); |
1830 |
|
break; |
1831 |
|
|
1832 |
|
case kind::BITVECTOR_ZERO_EXTEND_OP: |
1833 |
|
out << nv->getConst< BitVectorZeroExtend >(); |
1834 |
|
break; |
1835 |
|
|
1836 |
|
case kind::INT_TO_BITVECTOR_OP: |
1837 |
|
out << nv->getConst< IntToBitVector >(); |
1838 |
|
break; |
1839 |
|
|
1840 |
|
case kind::CONST_FLOATINGPOINT: |
1841 |
|
out << nv->getConst< FloatingPoint >(); |
1842 |
|
break; |
1843 |
|
|
1844 |
|
case kind::CONST_ROUNDINGMODE: |
1845 |
|
out << nv->getConst< RoundingMode >(); |
1846 |
|
break; |
1847 |
|
|
1848 |
|
case kind::FLOATINGPOINT_TYPE: |
1849 |
|
out << nv->getConst< FloatingPointSize >(); |
1850 |
|
break; |
1851 |
|
|
1852 |
|
case kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP: |
1853 |
|
out << nv->getConst< FloatingPointToFPIEEEBitVector >(); |
1854 |
|
break; |
1855 |
|
|
1856 |
|
case kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP: |
1857 |
|
out << nv->getConst< FloatingPointToFPFloatingPoint >(); |
1858 |
|
break; |
1859 |
|
|
1860 |
|
case kind::FLOATINGPOINT_TO_FP_REAL_OP: |
1861 |
|
out << nv->getConst< FloatingPointToFPReal >(); |
1862 |
|
break; |
1863 |
|
|
1864 |
|
case kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP: |
1865 |
|
out << nv->getConst< FloatingPointToFPSignedBitVector >(); |
1866 |
|
break; |
1867 |
|
|
1868 |
|
case kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP: |
1869 |
|
out << nv->getConst< FloatingPointToFPUnsignedBitVector >(); |
1870 |
|
break; |
1871 |
|
|
1872 |
|
case kind::FLOATINGPOINT_TO_FP_GENERIC_OP: |
1873 |
|
out << nv->getConst< FloatingPointToFPGeneric >(); |
1874 |
|
break; |
1875 |
|
|
1876 |
|
case kind::FLOATINGPOINT_TO_UBV_OP: |
1877 |
|
out << nv->getConst< FloatingPointToUBV >(); |
1878 |
|
break; |
1879 |
|
|
1880 |
|
case kind::FLOATINGPOINT_TO_UBV_TOTAL_OP: |
1881 |
|
out << nv->getConst< FloatingPointToUBVTotal >(); |
1882 |
|
break; |
1883 |
|
|
1884 |
|
case kind::FLOATINGPOINT_TO_SBV_OP: |
1885 |
|
out << nv->getConst< FloatingPointToSBV >(); |
1886 |
|
break; |
1887 |
|
|
1888 |
|
case kind::FLOATINGPOINT_TO_SBV_TOTAL_OP: |
1889 |
|
out << nv->getConst< FloatingPointToSBVTotal >(); |
1890 |
|
break; |
1891 |
|
|
1892 |
|
case kind::STORE_ALL: |
1893 |
|
out << nv->getConst< ArrayStoreAll >(); |
1894 |
|
break; |
1895 |
|
|
1896 |
|
case kind::DATATYPE_TYPE: |
1897 |
|
out << nv->getConst< DatatypeIndexConstant >(); |
1898 |
|
break; |
1899 |
|
|
1900 |
|
case kind::ASCRIPTION_TYPE: |
1901 |
|
out << nv->getConst< AscriptionType >(); |
1902 |
|
break; |
1903 |
|
|
1904 |
|
case kind::TUPLE_PROJECT_OP: |
1905 |
|
out << nv->getConst< TupleProjectOp >(); |
1906 |
|
break; |
1907 |
|
|
1908 |
|
case kind::EMPTYSET: |
1909 |
|
out << nv->getConst< EmptySet >(); |
1910 |
|
break; |
1911 |
|
|
1912 |
|
case kind::SINGLETON_OP: |
1913 |
|
out << nv->getConst< SingletonOp >(); |
1914 |
|
break; |
1915 |
|
|
1916 |
|
case kind::EMPTYBAG: |
1917 |
|
out << nv->getConst< EmptyBag >(); |
1918 |
|
break; |
1919 |
|
|
1920 |
|
case kind::MK_BAG_OP: |
1921 |
|
out << nv->getConst< MakeBagOp >(); |
1922 |
|
break; |
1923 |
|
|
1924 |
|
case kind::CONST_STRING: |
1925 |
|
out << nv->getConst< String >(); |
1926 |
|
break; |
1927 |
|
|
1928 |
|
case kind::CONST_SEQUENCE: |
1929 |
|
out << nv->getConst< Sequence >(); |
1930 |
|
break; |
1931 |
|
|
1932 |
|
case kind::REGEXP_REPEAT_OP: |
1933 |
|
out << nv->getConst< RegExpRepeat >(); |
1934 |
|
break; |
1935 |
|
|
1936 |
|
case kind::REGEXP_LOOP_OP: |
1937 |
|
out << nv->getConst< RegExpLoop >(); |
1938 |
|
break; |
1939 |
|
|
1940 |
|
// clang-format on |
1941 |
|
default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); |
1942 |
|
} |
1943 |
10 |
} |
1944 |
|
|
1945 |
10 |
void NodeValueConstPrinter::toStream(std::ostream& out, TNode n) { |
1946 |
10 |
toStream(out, n.d_nv); |
1947 |
10 |
} |
1948 |
|
|
1949 |
|
// The reinterpret_cast of d_children to various constant payload types |
1950 |
|
// in deleteNodeValueConstant(), below, can flag a "strict aliasing" |
1951 |
|
// warning; it should actually be okay, because we never access the |
1952 |
|
// embedded constant as a NodeValue* child, and never access an embedded |
1953 |
|
// NodeValue* child as a constant. |
1954 |
|
#pragma GCC diagnostic ignored "-Wstrict-aliasing" |
1955 |
|
|
1956 |
|
/** |
1957 |
|
* Cleanup to be performed when a NodeValue zombie is collected, and |
1958 |
|
* it has CONSTANT metakind. This calls the destructor for the underlying |
1959 |
|
* C++ type representing the constant value. See |
1960 |
|
* NodeManager::reclaimZombies() for more information. |
1961 |
|
* |
1962 |
|
* This doesn't support "non-inlined" NodeValues, which shouldn't need this |
1963 |
|
* kind of cleanup. |
1964 |
|
*/ |
1965 |
2761630 |
void deleteNodeValueConstant(::cvc5::expr::NodeValue* nv) |
1966 |
|
{ |
1967 |
2761630 |
Assert(nv->getMetaKind() == kind::metakind::CONSTANT); |
1968 |
|
|
1969 |
2761630 |
switch (nv->d_kind) |
1970 |
|
{ |
1971 |
|
// clang-format off |
1972 |
|
|
1973 |
2070 |
case kind::UNINTERPRETED_CONSTANT: |
1974 |
2070 |
std::destroy_at(reinterpret_cast< UninterpretedConstant* >(nv->d_children)); |
1975 |
2070 |
break; |
1976 |
|
|
1977 |
18 |
case kind::ABSTRACT_VALUE: |
1978 |
18 |
std::destroy_at(reinterpret_cast< AbstractValue* >(nv->d_children)); |
1979 |
18 |
break; |
1980 |
|
|
1981 |
2184819 |
case kind::BUILTIN: |
1982 |
2184819 |
std::destroy_at(reinterpret_cast< Kind* >(nv->d_children)); |
1983 |
2184819 |
break; |
1984 |
|
|
1985 |
44169 |
case kind::TYPE_CONSTANT: |
1986 |
44169 |
std::destroy_at(reinterpret_cast< TypeConstant* >(nv->d_children)); |
1987 |
44169 |
break; |
1988 |
|
|
1989 |
15227 |
case kind::CONST_BOOLEAN: |
1990 |
15227 |
std::destroy_at(reinterpret_cast< bool* >(nv->d_children)); |
1991 |
15227 |
break; |
1992 |
|
|
1993 |
12 |
case kind::DIVISIBLE_OP: |
1994 |
12 |
std::destroy_at(reinterpret_cast< Divisible* >(nv->d_children)); |
1995 |
12 |
break; |
1996 |
|
|
1997 |
326644 |
case kind::CONST_RATIONAL: |
1998 |
326644 |
std::destroy_at(reinterpret_cast< Rational* >(nv->d_children)); |
1999 |
326644 |
break; |
2000 |
|
|
2001 |
1 |
case kind::INDEXED_ROOT_PREDICATE_OP: |
2002 |
1 |
std::destroy_at(reinterpret_cast< IndexedRootPredicate* >(nv->d_children)); |
2003 |
1 |
break; |
2004 |
|
|
2005 |
81 |
case kind::IAND_OP: |
2006 |
81 |
std::destroy_at(reinterpret_cast< IntAnd* >(nv->d_children)); |
2007 |
81 |
break; |
2008 |
|
|
2009 |
8816 |
case kind::BITVECTOR_TYPE: |
2010 |
8816 |
std::destroy_at(reinterpret_cast< BitVectorSize* >(nv->d_children)); |
2011 |
8816 |
break; |
2012 |
|
|
2013 |
74467 |
case kind::CONST_BITVECTOR: |
2014 |
74467 |
std::destroy_at(reinterpret_cast< BitVector* >(nv->d_children)); |
2015 |
74467 |
break; |
2016 |
|
|
2017 |
32936 |
case kind::BITVECTOR_BITOF_OP: |
2018 |
32936 |
std::destroy_at(reinterpret_cast< BitVectorBitOf* >(nv->d_children)); |
2019 |
32936 |
break; |
2020 |
|
|
2021 |
7005 |
case kind::BITVECTOR_EXTRACT_OP: |
2022 |
7005 |
std::destroy_at(reinterpret_cast< BitVectorExtract* >(nv->d_children)); |
2023 |
7005 |
break; |
2024 |
|
|
2025 |
198 |
case kind::BITVECTOR_REPEAT_OP: |
2026 |
198 |
std::destroy_at(reinterpret_cast< BitVectorRepeat* >(nv->d_children)); |
2027 |
198 |
break; |
2028 |
|
|
2029 |
154 |
case kind::BITVECTOR_ROTATE_LEFT_OP: |
2030 |
154 |
std::destroy_at(reinterpret_cast< BitVectorRotateLeft* >(nv->d_children)); |
2031 |
154 |
break; |
2032 |
|
|
2033 |
187 |
case kind::BITVECTOR_ROTATE_RIGHT_OP: |
2034 |
187 |
std::destroy_at(reinterpret_cast< BitVectorRotateRight* >(nv->d_children)); |
2035 |
187 |
break; |
2036 |
|
|
2037 |
1274 |
case kind::BITVECTOR_SIGN_EXTEND_OP: |
2038 |
1274 |
std::destroy_at(reinterpret_cast< BitVectorSignExtend* >(nv->d_children)); |
2039 |
1274 |
break; |
2040 |
|
|
2041 |
1466 |
case kind::BITVECTOR_ZERO_EXTEND_OP: |
2042 |
1466 |
std::destroy_at(reinterpret_cast< BitVectorZeroExtend* >(nv->d_children)); |
2043 |
1466 |
break; |
2044 |
|
|
2045 |
223 |
case kind::INT_TO_BITVECTOR_OP: |
2046 |
223 |
std::destroy_at(reinterpret_cast< IntToBitVector* >(nv->d_children)); |
2047 |
223 |
break; |
2048 |
|
|
2049 |
321 |
case kind::CONST_FLOATINGPOINT: |
2050 |
321 |
std::destroy_at(reinterpret_cast< FloatingPoint* >(nv->d_children)); |
2051 |
321 |
break; |
2052 |
|
|
2053 |
8084 |
case kind::CONST_ROUNDINGMODE: |
2054 |
8084 |
std::destroy_at(reinterpret_cast< RoundingMode* >(nv->d_children)); |
2055 |
8084 |
break; |
2056 |
|
|
2057 |
6508 |
case kind::FLOATINGPOINT_TYPE: |
2058 |
6508 |
std::destroy_at(reinterpret_cast< FloatingPointSize* >(nv->d_children)); |
2059 |
6508 |
break; |
2060 |
|
|
2061 |
34 |
case kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP: |
2062 |
34 |
std::destroy_at(reinterpret_cast< FloatingPointToFPIEEEBitVector* >(nv->d_children)); |
2063 |
34 |
break; |
2064 |
|
|
2065 |
13 |
case kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP: |
2066 |
13 |
std::destroy_at(reinterpret_cast< FloatingPointToFPFloatingPoint* >(nv->d_children)); |
2067 |
13 |
break; |
2068 |
|
|
2069 |
17 |
case kind::FLOATINGPOINT_TO_FP_REAL_OP: |
2070 |
17 |
std::destroy_at(reinterpret_cast< FloatingPointToFPReal* >(nv->d_children)); |
2071 |
17 |
break; |
2072 |
|
|
2073 |
13 |
case kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP: |
2074 |
13 |
std::destroy_at(reinterpret_cast< FloatingPointToFPSignedBitVector* >(nv->d_children)); |
2075 |
13 |
break; |
2076 |
|
|
2077 |
15 |
case kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP: |
2078 |
15 |
std::destroy_at(reinterpret_cast< FloatingPointToFPUnsignedBitVector* >(nv->d_children)); |
2079 |
15 |
break; |
2080 |
|
|
2081 |
33 |
case kind::FLOATINGPOINT_TO_FP_GENERIC_OP: |
2082 |
33 |
std::destroy_at(reinterpret_cast< FloatingPointToFPGeneric* >(nv->d_children)); |
2083 |
33 |
break; |
2084 |
|
|
2085 |
6 |
case kind::FLOATINGPOINT_TO_UBV_OP: |
2086 |
6 |
std::destroy_at(reinterpret_cast< FloatingPointToUBV* >(nv->d_children)); |
2087 |
6 |
break; |
2088 |
|
|
2089 |
|
case kind::FLOATINGPOINT_TO_UBV_TOTAL_OP: |
2090 |
|
std::destroy_at(reinterpret_cast< FloatingPointToUBVTotal* >(nv->d_children)); |
2091 |
|
break; |
2092 |
|
|
2093 |
9 |
case kind::FLOATINGPOINT_TO_SBV_OP: |
2094 |
9 |
std::destroy_at(reinterpret_cast< FloatingPointToSBV* >(nv->d_children)); |
2095 |
9 |
break; |
2096 |
|
|
2097 |
3 |
case kind::FLOATINGPOINT_TO_SBV_TOTAL_OP: |
2098 |
3 |
std::destroy_at(reinterpret_cast< FloatingPointToSBVTotal* >(nv->d_children)); |
2099 |
3 |
break; |
2100 |
|
|
2101 |
652 |
case kind::STORE_ALL: |
2102 |
652 |
std::destroy_at(reinterpret_cast< ArrayStoreAll* >(nv->d_children)); |
2103 |
652 |
break; |
2104 |
|
|
2105 |
5518 |
case kind::DATATYPE_TYPE: |
2106 |
5518 |
std::destroy_at(reinterpret_cast< DatatypeIndexConstant* >(nv->d_children)); |
2107 |
5518 |
break; |
2108 |
|
|
2109 |
102 |
case kind::ASCRIPTION_TYPE: |
2110 |
102 |
std::destroy_at(reinterpret_cast< AscriptionType* >(nv->d_children)); |
2111 |
102 |
break; |
2112 |
|
|
2113 |
22 |
case kind::TUPLE_PROJECT_OP: |
2114 |
22 |
std::destroy_at(reinterpret_cast< TupleProjectOp* >(nv->d_children)); |
2115 |
22 |
break; |
2116 |
|
|
2117 |
2007 |
case kind::EMPTYSET: |
2118 |
2007 |
std::destroy_at(reinterpret_cast< EmptySet* >(nv->d_children)); |
2119 |
2007 |
break; |
2120 |
|
|
2121 |
597 |
case kind::SINGLETON_OP: |
2122 |
597 |
std::destroy_at(reinterpret_cast< SingletonOp* >(nv->d_children)); |
2123 |
597 |
break; |
2124 |
|
|
2125 |
1631 |
case kind::EMPTYBAG: |
2126 |
1631 |
std::destroy_at(reinterpret_cast< EmptyBag* >(nv->d_children)); |
2127 |
1631 |
break; |
2128 |
|
|
2129 |
85 |
case kind::MK_BAG_OP: |
2130 |
85 |
std::destroy_at(reinterpret_cast< MakeBagOp* >(nv->d_children)); |
2131 |
85 |
break; |
2132 |
|
|
2133 |
33837 |
case kind::CONST_STRING: |
2134 |
33837 |
std::destroy_at(reinterpret_cast< String* >(nv->d_children)); |
2135 |
33837 |
break; |
2136 |
|
|
2137 |
2314 |
case kind::CONST_SEQUENCE: |
2138 |
2314 |
std::destroy_at(reinterpret_cast< Sequence* >(nv->d_children)); |
2139 |
2314 |
break; |
2140 |
|
|
2141 |
6 |
case kind::REGEXP_REPEAT_OP: |
2142 |
6 |
std::destroy_at(reinterpret_cast< RegExpRepeat* >(nv->d_children)); |
2143 |
6 |
break; |
2144 |
|
|
2145 |
36 |
case kind::REGEXP_LOOP_OP: |
2146 |
36 |
std::destroy_at(reinterpret_cast< RegExpLoop* >(nv->d_children)); |
2147 |
36 |
break; |
2148 |
|
|
2149 |
|
// clang-format on |
2150 |
|
default: Unhandled() << ::cvc5::expr::NodeValue::dKindToKind(nv->d_kind); |
2151 |
|
} |
2152 |
2761630 |
} |
2153 |
|
|
2154 |
|
// re-enable the strict-aliasing warning |
2155 |
|
# pragma GCC diagnostic warning "-Wstrict-aliasing" |
2156 |
|
|
2157 |
228906347 |
uint32_t getMinArityForKind(::cvc5::Kind k) |
2158 |
|
{ |
2159 |
|
static const unsigned lbs[] = { |
2160 |
|
0, /* NULL_EXPR */ |
2161 |
|
// clang-format off |
2162 |
|
|
2163 |
|
0, /* SORT_TAG */ |
2164 |
|
0, /* SORT_TYPE */ |
2165 |
|
0, /* UNINTERPRETED_CONSTANT */ |
2166 |
|
0, /* ABSTRACT_VALUE */ |
2167 |
|
0, /* BUILTIN */ |
2168 |
|
2, /* EQUAL */ |
2169 |
|
2, /* DISTINCT */ |
2170 |
|
0, /* VARIABLE */ |
2171 |
|
0, /* BOUND_VARIABLE */ |
2172 |
|
0, /* SKOLEM */ |
2173 |
|
0, /* SEXPR */ |
2174 |
|
2, /* LAMBDA */ |
2175 |
|
2, /* WITNESS */ |
2176 |
|
0, /* TYPE_CONSTANT */ |
2177 |
|
2, /* FUNCTION_TYPE */ |
2178 |
|
0, /* CONST_BOOLEAN */ |
2179 |
|
1, /* NOT */ |
2180 |
|
2, /* AND */ |
2181 |
|
2, /* IMPLIES */ |
2182 |
|
2, /* OR */ |
2183 |
|
2, /* XOR */ |
2184 |
|
3, /* ITE */ |
2185 |
|
1, /* APPLY_UF */ |
2186 |
|
0, /* BOOLEAN_TERM_VARIABLE */ |
2187 |
|
2, /* CARDINALITY_CONSTRAINT */ |
2188 |
|
1, /* COMBINED_CARDINALITY_CONSTRAINT */ |
2189 |
|
1, /* PARTIAL_APPLY_UF */ |
2190 |
|
1, /* CARDINALITY_VALUE */ |
2191 |
|
2, /* HO_APPLY */ |
2192 |
|
2, /* PLUS */ |
2193 |
|
2, /* MULT */ |
2194 |
|
2, /* NONLINEAR_MULT */ |
2195 |
|
2, /* MINUS */ |
2196 |
|
1, /* UMINUS */ |
2197 |
|
2, /* DIVISION */ |
2198 |
|
2, /* DIVISION_TOTAL */ |
2199 |
|
2, /* INTS_DIVISION */ |
2200 |
|
2, /* INTS_DIVISION_TOTAL */ |
2201 |
|
2, /* INTS_MODULUS */ |
2202 |
|
2, /* INTS_MODULUS_TOTAL */ |
2203 |
|
1, /* ABS */ |
2204 |
|
1, /* DIVISIBLE */ |
2205 |
|
2, /* POW */ |
2206 |
|
1, /* POW2 */ |
2207 |
|
1, /* EXPONENTIAL */ |
2208 |
|
1, /* SINE */ |
2209 |
|
1, /* COSINE */ |
2210 |
|
1, /* TANGENT */ |
2211 |
|
1, /* COSECANT */ |
2212 |
|
1, /* SECANT */ |
2213 |
|
1, /* COTANGENT */ |
2214 |
|
1, /* ARCSINE */ |
2215 |
|
1, /* ARCCOSINE */ |
2216 |
|
1, /* ARCTANGENT */ |
2217 |
|
1, /* ARCCOSECANT */ |
2218 |
|
1, /* ARCSECANT */ |
2219 |
|
1, /* ARCCOTANGENT */ |
2220 |
|
1, /* SQRT */ |
2221 |
|
0, /* DIVISIBLE_OP */ |
2222 |
|
0, /* CONST_RATIONAL */ |
2223 |
|
2, /* LT */ |
2224 |
|
2, /* LEQ */ |
2225 |
|
2, /* GT */ |
2226 |
|
2, /* GEQ */ |
2227 |
|
0, /* INDEXED_ROOT_PREDICATE_OP */ |
2228 |
|
2, /* INDEXED_ROOT_PREDICATE */ |
2229 |
|
1, /* IS_INTEGER */ |
2230 |
|
1, /* TO_INTEGER */ |
2231 |
|
1, /* TO_REAL */ |
2232 |
|
1, /* CAST_TO_REAL */ |
2233 |
|
0, /* PI */ |
2234 |
|
0, /* IAND_OP */ |
2235 |
|
2, /* IAND */ |
2236 |
|
0, /* BITVECTOR_TYPE */ |
2237 |
|
0, /* CONST_BITVECTOR */ |
2238 |
|
1, /* BITVECTOR_BB_TERM */ |
2239 |
|
2, /* BITVECTOR_CONCAT */ |
2240 |
|
2, /* BITVECTOR_AND */ |
2241 |
|
2, /* BITVECTOR_COMP */ |
2242 |
|
2, /* BITVECTOR_OR */ |
2243 |
|
2, /* BITVECTOR_XOR */ |
2244 |
|
1, /* BITVECTOR_NOT */ |
2245 |
|
2, /* BITVECTOR_NAND */ |
2246 |
|
2, /* BITVECTOR_NOR */ |
2247 |
|
2, /* BITVECTOR_XNOR */ |
2248 |
|
2, /* BITVECTOR_MULT */ |
2249 |
|
1, /* BITVECTOR_NEG */ |
2250 |
|
2, /* BITVECTOR_ADD */ |
2251 |
|
2, /* BITVECTOR_SUB */ |
2252 |
|
2, /* BITVECTOR_UDIV */ |
2253 |
|
2, /* BITVECTOR_UREM */ |
2254 |
|
2, /* BITVECTOR_SDIV */ |
2255 |
|
2, /* BITVECTOR_SMOD */ |
2256 |
|
2, /* BITVECTOR_SREM */ |
2257 |
|
2, /* BITVECTOR_ASHR */ |
2258 |
|
2, /* BITVECTOR_LSHR */ |
2259 |
|
2, /* BITVECTOR_SHL */ |
2260 |
|
2, /* BITVECTOR_ULE */ |
2261 |
|
2, /* BITVECTOR_ULT */ |
2262 |
|
2, /* BITVECTOR_UGE */ |
2263 |
|
2, /* BITVECTOR_UGT */ |
2264 |
|
2, /* BITVECTOR_SLE */ |
2265 |
|
2, /* BITVECTOR_SLT */ |
2266 |
|
2, /* BITVECTOR_SGE */ |
2267 |
|
2, /* BITVECTOR_SGT */ |
2268 |
|
2, /* BITVECTOR_ULTBV */ |
2269 |
|
2, /* BITVECTOR_SLTBV */ |
2270 |
|
1, /* BITVECTOR_REDAND */ |
2271 |
|
1, /* BITVECTOR_REDOR */ |
2272 |
|
3, /* BITVECTOR_ITE */ |
2273 |
|
1, /* BITVECTOR_TO_NAT */ |
2274 |
|
1, /* BITVECTOR_ACKERMANNIZE_UDIV */ |
2275 |
|
1, /* BITVECTOR_ACKERMANNIZE_UREM */ |
2276 |
|
1, /* BITVECTOR_EAGER_ATOM */ |
2277 |
|
0, /* BITVECTOR_BITOF_OP */ |
2278 |
|
1, /* BITVECTOR_BITOF */ |
2279 |
|
0, /* BITVECTOR_EXTRACT_OP */ |
2280 |
|
1, /* BITVECTOR_EXTRACT */ |
2281 |
|
0, /* BITVECTOR_REPEAT_OP */ |
2282 |
|
1, /* BITVECTOR_REPEAT */ |
2283 |
|
0, /* BITVECTOR_ROTATE_LEFT_OP */ |
2284 |
|
1, /* BITVECTOR_ROTATE_LEFT */ |
2285 |
|
0, /* BITVECTOR_ROTATE_RIGHT_OP */ |
2286 |
|
1, /* BITVECTOR_ROTATE_RIGHT */ |
2287 |
|
0, /* BITVECTOR_SIGN_EXTEND_OP */ |
2288 |
|
1, /* BITVECTOR_SIGN_EXTEND */ |
2289 |
|
0, /* BITVECTOR_ZERO_EXTEND_OP */ |
2290 |
|
1, /* BITVECTOR_ZERO_EXTEND */ |
2291 |
|
0, /* INT_TO_BITVECTOR_OP */ |
2292 |
|
1, /* INT_TO_BITVECTOR */ |
2293 |
|
0, /* CONST_FLOATINGPOINT */ |
2294 |
|
0, /* CONST_ROUNDINGMODE */ |
2295 |
|
0, /* FLOATINGPOINT_TYPE */ |
2296 |
|
3, /* FLOATINGPOINT_FP */ |
2297 |
|
2, /* FLOATINGPOINT_EQ */ |
2298 |
|
1, /* FLOATINGPOINT_ABS */ |
2299 |
|
1, /* FLOATINGPOINT_NEG */ |
2300 |
|
3, /* FLOATINGPOINT_ADD */ |
2301 |
|
3, /* FLOATINGPOINT_SUB */ |
2302 |
|
3, /* FLOATINGPOINT_MULT */ |
2303 |
|
3, /* FLOATINGPOINT_DIV */ |
2304 |
|
4, /* FLOATINGPOINT_FMA */ |
2305 |
|
2, /* FLOATINGPOINT_SQRT */ |
2306 |
|
2, /* FLOATINGPOINT_REM */ |
2307 |
|
2, /* FLOATINGPOINT_RTI */ |
2308 |
|
2, /* FLOATINGPOINT_MIN */ |
2309 |
|
2, /* FLOATINGPOINT_MAX */ |
2310 |
|
3, /* FLOATINGPOINT_MIN_TOTAL */ |
2311 |
|
3, /* FLOATINGPOINT_MAX_TOTAL */ |
2312 |
|
2, /* FLOATINGPOINT_LEQ */ |
2313 |
|
2, /* FLOATINGPOINT_LT */ |
2314 |
|
2, /* FLOATINGPOINT_GEQ */ |
2315 |
|
2, /* FLOATINGPOINT_GT */ |
2316 |
|
1, /* FLOATINGPOINT_ISN */ |
2317 |
|
1, /* FLOATINGPOINT_ISSN */ |
2318 |
|
1, /* FLOATINGPOINT_ISZ */ |
2319 |
|
1, /* FLOATINGPOINT_ISINF */ |
2320 |
|
1, /* FLOATINGPOINT_ISNAN */ |
2321 |
|
1, /* FLOATINGPOINT_ISNEG */ |
2322 |
|
1, /* FLOATINGPOINT_ISPOS */ |
2323 |
|
0, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP */ |
2324 |
|
1, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR */ |
2325 |
|
0, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP */ |
2326 |
|
2, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT */ |
2327 |
|
0, /* FLOATINGPOINT_TO_FP_REAL_OP */ |
2328 |
|
2, /* FLOATINGPOINT_TO_FP_REAL */ |
2329 |
|
0, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP */ |
2330 |
|
2, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR */ |
2331 |
|
0, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP */ |
2332 |
|
2, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR */ |
2333 |
|
0, /* FLOATINGPOINT_TO_FP_GENERIC_OP */ |
2334 |
|
1, /* FLOATINGPOINT_TO_FP_GENERIC */ |
2335 |
|
0, /* FLOATINGPOINT_TO_UBV_OP */ |
2336 |
|
2, /* FLOATINGPOINT_TO_UBV */ |
2337 |
|
0, /* FLOATINGPOINT_TO_UBV_TOTAL_OP */ |
2338 |
|
3, /* FLOATINGPOINT_TO_UBV_TOTAL */ |
2339 |
|
0, /* FLOATINGPOINT_TO_SBV_OP */ |
2340 |
|
2, /* FLOATINGPOINT_TO_SBV */ |
2341 |
|
0, /* FLOATINGPOINT_TO_SBV_TOTAL_OP */ |
2342 |
|
3, /* FLOATINGPOINT_TO_SBV_TOTAL */ |
2343 |
|
1, /* FLOATINGPOINT_TO_REAL */ |
2344 |
|
2, /* FLOATINGPOINT_TO_REAL_TOTAL */ |
2345 |
|
1, /* FLOATINGPOINT_COMPONENT_NAN */ |
2346 |
|
1, /* FLOATINGPOINT_COMPONENT_INF */ |
2347 |
|
1, /* FLOATINGPOINT_COMPONENT_ZERO */ |
2348 |
|
1, /* FLOATINGPOINT_COMPONENT_SIGN */ |
2349 |
|
1, /* FLOATINGPOINT_COMPONENT_EXPONENT */ |
2350 |
|
1, /* FLOATINGPOINT_COMPONENT_SIGNIFICAND */ |
2351 |
|
1, /* ROUNDINGMODE_BITBLAST */ |
2352 |
|
2, /* ARRAY_TYPE */ |
2353 |
|
2, /* SELECT */ |
2354 |
|
3, /* STORE */ |
2355 |
|
4, /* EQ_RANGE */ |
2356 |
|
0, /* STORE_ALL */ |
2357 |
|
4, /* ARR_TABLE_FUN */ |
2358 |
|
1, /* ARRAY_LAMBDA */ |
2359 |
|
0, /* PARTIAL_SELECT_0 */ |
2360 |
|
0, /* PARTIAL_SELECT_1 */ |
2361 |
|
1, /* CONSTRUCTOR_TYPE */ |
2362 |
|
2, /* SELECTOR_TYPE */ |
2363 |
|
1, /* TESTER_TYPE */ |
2364 |
|
2, /* UPDATER_TYPE */ |
2365 |
|
0, /* APPLY_CONSTRUCTOR */ |
2366 |
|
1, /* APPLY_SELECTOR */ |
2367 |
|
1, /* APPLY_SELECTOR_TOTAL */ |
2368 |
|
1, /* APPLY_TESTER */ |
2369 |
|
2, /* APPLY_UPDATER */ |
2370 |
|
0, /* DATATYPE_TYPE */ |
2371 |
|
1, /* PARAMETRIC_DATATYPE */ |
2372 |
|
1, /* APPLY_TYPE_ASCRIPTION */ |
2373 |
|
0, /* ASCRIPTION_TYPE */ |
2374 |
|
1, /* DT_SIZE */ |
2375 |
|
2, /* DT_HEIGHT_BOUND */ |
2376 |
|
2, /* DT_SIZE_BOUND */ |
2377 |
|
2, /* DT_SYGUS_BOUND */ |
2378 |
|
1, /* DT_SYGUS_EVAL */ |
2379 |
|
2, /* MATCH */ |
2380 |
|
2, /* MATCH_CASE */ |
2381 |
|
3, /* MATCH_BIND_CASE */ |
2382 |
|
0, /* TUPLE_PROJECT_OP */ |
2383 |
|
1, /* TUPLE_PROJECT */ |
2384 |
|
0, /* SEP_NIL */ |
2385 |
|
2, /* SEP_EMP */ |
2386 |
|
2, /* SEP_PTO */ |
2387 |
|
2, /* SEP_STAR */ |
2388 |
|
2, /* SEP_WAND */ |
2389 |
|
2, /* SEP_LABEL */ |
2390 |
|
0, /* EMPTYSET */ |
2391 |
|
1, /* SET_TYPE */ |
2392 |
|
2, /* UNION */ |
2393 |
|
2, /* INTERSECTION */ |
2394 |
|
2, /* SETMINUS */ |
2395 |
|
2, /* SUBSET */ |
2396 |
|
2, /* MEMBER */ |
2397 |
|
0, /* SINGLETON_OP */ |
2398 |
|
1, /* SINGLETON */ |
2399 |
|
2, /* INSERT */ |
2400 |
|
1, /* CARD */ |
2401 |
|
1, /* COMPLEMENT */ |
2402 |
|
0, /* UNIVERSE_SET */ |
2403 |
|
3, /* COMPREHENSION */ |
2404 |
|
1, /* CHOOSE */ |
2405 |
|
1, /* IS_SINGLETON */ |
2406 |
|
2, /* JOIN */ |
2407 |
|
2, /* PRODUCT */ |
2408 |
|
1, /* TRANSPOSE */ |
2409 |
|
1, /* TCLOSURE */ |
2410 |
|
2, /* JOIN_IMAGE */ |
2411 |
|
1, /* IDEN */ |
2412 |
|
0, /* EMPTYBAG */ |
2413 |
|
1, /* BAG_TYPE */ |
2414 |
|
2, /* UNION_MAX */ |
2415 |
|
2, /* UNION_DISJOINT */ |
2416 |
|
2, /* INTERSECTION_MIN */ |
2417 |
|
2, /* DIFFERENCE_SUBTRACT */ |
2418 |
|
2, /* DIFFERENCE_REMOVE */ |
2419 |
|
2, /* SUBBAG */ |
2420 |
|
2, /* BAG_COUNT */ |
2421 |
|
1, /* DUPLICATE_REMOVAL */ |
2422 |
|
0, /* MK_BAG_OP */ |
2423 |
|
2, /* MK_BAG */ |
2424 |
|
1, /* BAG_IS_SINGLETON */ |
2425 |
|
1, /* BAG_CARD */ |
2426 |
|
1, /* BAG_FROM_SET */ |
2427 |
|
1, /* BAG_TO_SET */ |
2428 |
|
1, /* BAG_CHOOSE */ |
2429 |
|
2, /* BAG_MAP */ |
2430 |
|
2, /* STRING_CONCAT */ |
2431 |
|
2, /* STRING_IN_REGEXP */ |
2432 |
|
1, /* STRING_LENGTH */ |
2433 |
|
3, /* STRING_SUBSTR */ |
2434 |
|
3, /* STRING_UPDATE */ |
2435 |
|
2, /* STRING_CHARAT */ |
2436 |
|
2, /* STRING_CONTAINS */ |
2437 |
|
2, /* STRING_LT */ |
2438 |
|
2, /* STRING_LEQ */ |
2439 |
|
3, /* STRING_INDEXOF */ |
2440 |
|
3, /* STRING_INDEXOF_RE */ |
2441 |
|
3, /* STRING_REPLACE */ |
2442 |
|
3, /* STRING_REPLACE_ALL */ |
2443 |
|
3, /* STRING_REPLACE_RE */ |
2444 |
|
3, /* STRING_REPLACE_RE_ALL */ |
2445 |
|
2, /* STRING_PREFIX */ |
2446 |
|
2, /* STRING_SUFFIX */ |
2447 |
|
1, /* STRING_IS_DIGIT */ |
2448 |
|
1, /* STRING_ITOS */ |
2449 |
|
1, /* STRING_STOI */ |
2450 |
|
1, /* STRING_TO_CODE */ |
2451 |
|
1, /* STRING_FROM_CODE */ |
2452 |
|
1, /* STRING_TOLOWER */ |
2453 |
|
1, /* STRING_TOUPPER */ |
2454 |
|
1, /* STRING_REV */ |
2455 |
|
0, /* CONST_STRING */ |
2456 |
|
1, /* SEQUENCE_TYPE */ |
2457 |
|
0, /* CONST_SEQUENCE */ |
2458 |
|
1, /* SEQ_UNIT */ |
2459 |
|
2, /* SEQ_NTH */ |
2460 |
|
2, /* SEQ_NTH_TOTAL */ |
2461 |
|
1, /* STRING_TO_REGEXP */ |
2462 |
|
2, /* REGEXP_CONCAT */ |
2463 |
|
2, /* REGEXP_UNION */ |
2464 |
|
2, /* REGEXP_INTER */ |
2465 |
|
2, /* REGEXP_DIFF */ |
2466 |
|
1, /* REGEXP_STAR */ |
2467 |
|
1, /* REGEXP_PLUS */ |
2468 |
|
1, /* REGEXP_OPT */ |
2469 |
|
2, /* REGEXP_RANGE */ |
2470 |
|
1, /* REGEXP_COMPLEMENT */ |
2471 |
|
0, /* REGEXP_EMPTY */ |
2472 |
|
0, /* REGEXP_SIGMA */ |
2473 |
|
0, /* REGEXP_REPEAT_OP */ |
2474 |
|
1, /* REGEXP_REPEAT */ |
2475 |
|
0, /* REGEXP_LOOP_OP */ |
2476 |
|
1, /* REGEXP_LOOP */ |
2477 |
|
1, /* REGEXP_RV */ |
2478 |
|
2, /* FORALL */ |
2479 |
|
2, /* EXISTS */ |
2480 |
|
0, /* INST_CONSTANT */ |
2481 |
|
1, /* BOUND_VAR_LIST */ |
2482 |
|
1, /* INST_PATTERN */ |
2483 |
|
1, /* INST_NO_PATTERN */ |
2484 |
|
1, /* INST_ATTRIBUTE */ |
2485 |
|
1, /* INST_POOL */ |
2486 |
|
2, /* INST_ADD_TO_POOL */ |
2487 |
|
2, /* SKOLEM_ADD_TO_POOL */ |
2488 |
|
1, /* INST_PATTERN_LIST */ |
2489 |
|
// clang-format on |
2490 |
|
|
2491 |
|
0 /* LAST_KIND */ |
2492 |
|
}; |
2493 |
|
|
2494 |
228906347 |
return lbs[k]; |
2495 |
|
} |
2496 |
|
|
2497 |
230249796 |
uint32_t getMaxArityForKind(::cvc5::Kind k) |
2498 |
|
{ |
2499 |
|
static const unsigned ubs[] = { |
2500 |
|
0, /* NULL_EXPR */ |
2501 |
|
// clang-format off |
2502 |
|
|
2503 |
|
0, /* SORT_TAG */ |
2504 |
|
expr::NodeValue::MAX_CHILDREN, /* SORT_TYPE */ |
2505 |
|
0, /* UNINTERPRETED_CONSTANT */ |
2506 |
|
0, /* ABSTRACT_VALUE */ |
2507 |
|
0, /* BUILTIN */ |
2508 |
|
2, /* EQUAL */ |
2509 |
|
expr::NodeValue::MAX_CHILDREN, /* DISTINCT */ |
2510 |
|
0, /* VARIABLE */ |
2511 |
|
0, /* BOUND_VARIABLE */ |
2512 |
|
0, /* SKOLEM */ |
2513 |
|
expr::NodeValue::MAX_CHILDREN, /* SEXPR */ |
2514 |
|
2, /* LAMBDA */ |
2515 |
|
2, /* WITNESS */ |
2516 |
|
0, /* TYPE_CONSTANT */ |
2517 |
|
expr::NodeValue::MAX_CHILDREN, /* FUNCTION_TYPE */ |
2518 |
|
0, /* CONST_BOOLEAN */ |
2519 |
|
1, /* NOT */ |
2520 |
|
expr::NodeValue::MAX_CHILDREN, /* AND */ |
2521 |
|
2, /* IMPLIES */ |
2522 |
|
expr::NodeValue::MAX_CHILDREN, /* OR */ |
2523 |
|
2, /* XOR */ |
2524 |
|
3, /* ITE */ |
2525 |
|
expr::NodeValue::MAX_CHILDREN, /* APPLY_UF */ |
2526 |
|
0, /* BOOLEAN_TERM_VARIABLE */ |
2527 |
|
2, /* CARDINALITY_CONSTRAINT */ |
2528 |
|
1, /* COMBINED_CARDINALITY_CONSTRAINT */ |
2529 |
|
expr::NodeValue::MAX_CHILDREN, /* PARTIAL_APPLY_UF */ |
2530 |
|
1, /* CARDINALITY_VALUE */ |
2531 |
|
2, /* HO_APPLY */ |
2532 |
|
expr::NodeValue::MAX_CHILDREN, /* PLUS */ |
2533 |
|
expr::NodeValue::MAX_CHILDREN, /* MULT */ |
2534 |
|
expr::NodeValue::MAX_CHILDREN, /* NONLINEAR_MULT */ |
2535 |
|
2, /* MINUS */ |
2536 |
|
1, /* UMINUS */ |
2537 |
|
2, /* DIVISION */ |
2538 |
|
2, /* DIVISION_TOTAL */ |
2539 |
|
2, /* INTS_DIVISION */ |
2540 |
|
2, /* INTS_DIVISION_TOTAL */ |
2541 |
|
2, /* INTS_MODULUS */ |
2542 |
|
2, /* INTS_MODULUS_TOTAL */ |
2543 |
|
1, /* ABS */ |
2544 |
|
1, /* DIVISIBLE */ |
2545 |
|
2, /* POW */ |
2546 |
|
1, /* POW2 */ |
2547 |
|
1, /* EXPONENTIAL */ |
2548 |
|
1, /* SINE */ |
2549 |
|
1, /* COSINE */ |
2550 |
|
1, /* TANGENT */ |
2551 |
|
1, /* COSECANT */ |
2552 |
|
1, /* SECANT */ |
2553 |
|
1, /* COTANGENT */ |
2554 |
|
1, /* ARCSINE */ |
2555 |
|
1, /* ARCCOSINE */ |
2556 |
|
1, /* ARCTANGENT */ |
2557 |
|
1, /* ARCCOSECANT */ |
2558 |
|
1, /* ARCSECANT */ |
2559 |
|
1, /* ARCCOTANGENT */ |
2560 |
|
1, /* SQRT */ |
2561 |
|
0, /* DIVISIBLE_OP */ |
2562 |
|
0, /* CONST_RATIONAL */ |
2563 |
|
2, /* LT */ |
2564 |
|
2, /* LEQ */ |
2565 |
|
2, /* GT */ |
2566 |
|
2, /* GEQ */ |
2567 |
|
0, /* INDEXED_ROOT_PREDICATE_OP */ |
2568 |
|
2, /* INDEXED_ROOT_PREDICATE */ |
2569 |
|
1, /* IS_INTEGER */ |
2570 |
|
1, /* TO_INTEGER */ |
2571 |
|
1, /* TO_REAL */ |
2572 |
|
1, /* CAST_TO_REAL */ |
2573 |
|
0, /* PI */ |
2574 |
|
0, /* IAND_OP */ |
2575 |
|
2, /* IAND */ |
2576 |
|
0, /* BITVECTOR_TYPE */ |
2577 |
|
0, /* CONST_BITVECTOR */ |
2578 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_BB_TERM */ |
2579 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_CONCAT */ |
2580 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_AND */ |
2581 |
|
2, /* BITVECTOR_COMP */ |
2582 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_OR */ |
2583 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_XOR */ |
2584 |
|
1, /* BITVECTOR_NOT */ |
2585 |
|
2, /* BITVECTOR_NAND */ |
2586 |
|
2, /* BITVECTOR_NOR */ |
2587 |
|
2, /* BITVECTOR_XNOR */ |
2588 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_MULT */ |
2589 |
|
1, /* BITVECTOR_NEG */ |
2590 |
|
expr::NodeValue::MAX_CHILDREN, /* BITVECTOR_ADD */ |
2591 |
|
2, /* BITVECTOR_SUB */ |
2592 |
|
2, /* BITVECTOR_UDIV */ |
2593 |
|
2, /* BITVECTOR_UREM */ |
2594 |
|
2, /* BITVECTOR_SDIV */ |
2595 |
|
2, /* BITVECTOR_SMOD */ |
2596 |
|
2, /* BITVECTOR_SREM */ |
2597 |
|
2, /* BITVECTOR_ASHR */ |
2598 |
|
2, /* BITVECTOR_LSHR */ |
2599 |
|
2, /* BITVECTOR_SHL */ |
2600 |
|
2, /* BITVECTOR_ULE */ |
2601 |
|
2, /* BITVECTOR_ULT */ |
2602 |
|
2, /* BITVECTOR_UGE */ |
2603 |
|
2, /* BITVECTOR_UGT */ |
2604 |
|
2, /* BITVECTOR_SLE */ |
2605 |
|
2, /* BITVECTOR_SLT */ |
2606 |
|
2, /* BITVECTOR_SGE */ |
2607 |
|
2, /* BITVECTOR_SGT */ |
2608 |
|
2, /* BITVECTOR_ULTBV */ |
2609 |
|
2, /* BITVECTOR_SLTBV */ |
2610 |
|
1, /* BITVECTOR_REDAND */ |
2611 |
|
1, /* BITVECTOR_REDOR */ |
2612 |
|
3, /* BITVECTOR_ITE */ |
2613 |
|
1, /* BITVECTOR_TO_NAT */ |
2614 |
|
1, /* BITVECTOR_ACKERMANNIZE_UDIV */ |
2615 |
|
1, /* BITVECTOR_ACKERMANNIZE_UREM */ |
2616 |
|
1, /* BITVECTOR_EAGER_ATOM */ |
2617 |
|
0, /* BITVECTOR_BITOF_OP */ |
2618 |
|
1, /* BITVECTOR_BITOF */ |
2619 |
|
0, /* BITVECTOR_EXTRACT_OP */ |
2620 |
|
1, /* BITVECTOR_EXTRACT */ |
2621 |
|
0, /* BITVECTOR_REPEAT_OP */ |
2622 |
|
1, /* BITVECTOR_REPEAT */ |
2623 |
|
0, /* BITVECTOR_ROTATE_LEFT_OP */ |
2624 |
|
1, /* BITVECTOR_ROTATE_LEFT */ |
2625 |
|
0, /* BITVECTOR_ROTATE_RIGHT_OP */ |
2626 |
|
1, /* BITVECTOR_ROTATE_RIGHT */ |
2627 |
|
0, /* BITVECTOR_SIGN_EXTEND_OP */ |
2628 |
|
1, /* BITVECTOR_SIGN_EXTEND */ |
2629 |
|
0, /* BITVECTOR_ZERO_EXTEND_OP */ |
2630 |
|
1, /* BITVECTOR_ZERO_EXTEND */ |
2631 |
|
0, /* INT_TO_BITVECTOR_OP */ |
2632 |
|
1, /* INT_TO_BITVECTOR */ |
2633 |
|
0, /* CONST_FLOATINGPOINT */ |
2634 |
|
0, /* CONST_ROUNDINGMODE */ |
2635 |
|
0, /* FLOATINGPOINT_TYPE */ |
2636 |
|
3, /* FLOATINGPOINT_FP */ |
2637 |
|
expr::NodeValue::MAX_CHILDREN, /* FLOATINGPOINT_EQ */ |
2638 |
|
1, /* FLOATINGPOINT_ABS */ |
2639 |
|
1, /* FLOATINGPOINT_NEG */ |
2640 |
|
3, /* FLOATINGPOINT_ADD */ |
2641 |
|
3, /* FLOATINGPOINT_SUB */ |
2642 |
|
3, /* FLOATINGPOINT_MULT */ |
2643 |
|
3, /* FLOATINGPOINT_DIV */ |
2644 |
|
4, /* FLOATINGPOINT_FMA */ |
2645 |
|
2, /* FLOATINGPOINT_SQRT */ |
2646 |
|
2, /* FLOATINGPOINT_REM */ |
2647 |
|
2, /* FLOATINGPOINT_RTI */ |
2648 |
|
2, /* FLOATINGPOINT_MIN */ |
2649 |
|
2, /* FLOATINGPOINT_MAX */ |
2650 |
|
3, /* FLOATINGPOINT_MIN_TOTAL */ |
2651 |
|
3, /* FLOATINGPOINT_MAX_TOTAL */ |
2652 |
|
expr::NodeValue::MAX_CHILDREN, /* FLOATINGPOINT_LEQ */ |
2653 |
|
expr::NodeValue::MAX_CHILDREN, /* FLOATINGPOINT_LT */ |
2654 |
|
expr::NodeValue::MAX_CHILDREN, /* FLOATINGPOINT_GEQ */ |
2655 |
|
expr::NodeValue::MAX_CHILDREN, /* FLOATINGPOINT_GT */ |
2656 |
|
1, /* FLOATINGPOINT_ISN */ |
2657 |
|
1, /* FLOATINGPOINT_ISSN */ |
2658 |
|
1, /* FLOATINGPOINT_ISZ */ |
2659 |
|
1, /* FLOATINGPOINT_ISINF */ |
2660 |
|
1, /* FLOATINGPOINT_ISNAN */ |
2661 |
|
1, /* FLOATINGPOINT_ISNEG */ |
2662 |
|
1, /* FLOATINGPOINT_ISPOS */ |
2663 |
|
0, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP */ |
2664 |
|
1, /* FLOATINGPOINT_TO_FP_IEEE_BITVECTOR */ |
2665 |
|
0, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP */ |
2666 |
|
2, /* FLOATINGPOINT_TO_FP_FLOATINGPOINT */ |
2667 |
|
0, /* FLOATINGPOINT_TO_FP_REAL_OP */ |
2668 |
|
2, /* FLOATINGPOINT_TO_FP_REAL */ |
2669 |
|
0, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP */ |
2670 |
|
2, /* FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR */ |
2671 |
|
0, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP */ |
2672 |
|
2, /* FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR */ |
2673 |
|
0, /* FLOATINGPOINT_TO_FP_GENERIC_OP */ |
2674 |
|
2, /* FLOATINGPOINT_TO_FP_GENERIC */ |
2675 |
|
0, /* FLOATINGPOINT_TO_UBV_OP */ |
2676 |
|
2, /* FLOATINGPOINT_TO_UBV */ |
2677 |
|
0, /* FLOATINGPOINT_TO_UBV_TOTAL_OP */ |
2678 |
|
3, /* FLOATINGPOINT_TO_UBV_TOTAL */ |
2679 |
|
0, /* FLOATINGPOINT_TO_SBV_OP */ |
2680 |
|
2, /* FLOATINGPOINT_TO_SBV */ |
2681 |
|
0, /* FLOATINGPOINT_TO_SBV_TOTAL_OP */ |
2682 |
|
3, /* FLOATINGPOINT_TO_SBV_TOTAL */ |
2683 |
|
1, /* FLOATINGPOINT_TO_REAL */ |
2684 |
|
2, /* FLOATINGPOINT_TO_REAL_TOTAL */ |
2685 |
|
1, /* FLOATINGPOINT_COMPONENT_NAN */ |
2686 |
|
1, /* FLOATINGPOINT_COMPONENT_INF */ |
2687 |
|
1, /* FLOATINGPOINT_COMPONENT_ZERO */ |
2688 |
|
1, /* FLOATINGPOINT_COMPONENT_SIGN */ |
2689 |
|
1, /* FLOATINGPOINT_COMPONENT_EXPONENT */ |
2690 |
|
1, /* FLOATINGPOINT_COMPONENT_SIGNIFICAND */ |
2691 |
|
1, /* ROUNDINGMODE_BITBLAST */ |
2692 |
|
2, /* ARRAY_TYPE */ |
2693 |
|
2, /* SELECT */ |
2694 |
|
3, /* STORE */ |
2695 |
|
4, /* EQ_RANGE */ |
2696 |
|
0, /* STORE_ALL */ |
2697 |
|
4, /* ARR_TABLE_FUN */ |
2698 |
|
1, /* ARRAY_LAMBDA */ |
2699 |
|
2, /* PARTIAL_SELECT_0 */ |
2700 |
|
2, /* PARTIAL_SELECT_1 */ |
2701 |
|
expr::NodeValue::MAX_CHILDREN, /* CONSTRUCTOR_TYPE */ |
2702 |
|
2, /* SELECTOR_TYPE */ |
2703 |
|
1, /* TESTER_TYPE */ |
2704 |
|
2, /* UPDATER_TYPE */ |
2705 |
|
expr::NodeValue::MAX_CHILDREN, /* APPLY_CONSTRUCTOR */ |
2706 |
|
1, /* APPLY_SELECTOR */ |
2707 |
|
1, /* APPLY_SELECTOR_TOTAL */ |
2708 |
|
1, /* APPLY_TESTER */ |
2709 |
|
2, /* APPLY_UPDATER */ |
2710 |
|
0, /* DATATYPE_TYPE */ |
2711 |
|
expr::NodeValue::MAX_CHILDREN, /* PARAMETRIC_DATATYPE */ |
2712 |
|
1, /* APPLY_TYPE_ASCRIPTION */ |
2713 |
|
0, /* ASCRIPTION_TYPE */ |
2714 |
|
1, /* DT_SIZE */ |
2715 |
|
2, /* DT_HEIGHT_BOUND */ |
2716 |
|
2, /* DT_SIZE_BOUND */ |
2717 |
|
2, /* DT_SYGUS_BOUND */ |
2718 |
|
expr::NodeValue::MAX_CHILDREN, /* DT_SYGUS_EVAL */ |
2719 |
|
expr::NodeValue::MAX_CHILDREN, /* MATCH */ |
2720 |
|
2, /* MATCH_CASE */ |
2721 |
|
3, /* MATCH_BIND_CASE */ |
2722 |
|
0, /* TUPLE_PROJECT_OP */ |
2723 |
|
1, /* TUPLE_PROJECT */ |
2724 |
|
0, /* SEP_NIL */ |
2725 |
|
2, /* SEP_EMP */ |
2726 |
|
2, /* SEP_PTO */ |
2727 |
|
expr::NodeValue::MAX_CHILDREN, /* SEP_STAR */ |
2728 |
|
2, /* SEP_WAND */ |
2729 |
|
2, /* SEP_LABEL */ |
2730 |
|
0, /* EMPTYSET */ |
2731 |
|
1, /* SET_TYPE */ |
2732 |
|
2, /* UNION */ |
2733 |
|
2, /* INTERSECTION */ |
2734 |
|
2, /* SETMINUS */ |
2735 |
|
2, /* SUBSET */ |
2736 |
|
2, /* MEMBER */ |
2737 |
|
0, /* SINGLETON_OP */ |
2738 |
|
1, /* SINGLETON */ |
2739 |
|
expr::NodeValue::MAX_CHILDREN, /* INSERT */ |
2740 |
|
1, /* CARD */ |
2741 |
|
1, /* COMPLEMENT */ |
2742 |
|
0, /* UNIVERSE_SET */ |
2743 |
|
3, /* COMPREHENSION */ |
2744 |
|
1, /* CHOOSE */ |
2745 |
|
1, /* IS_SINGLETON */ |
2746 |
|
2, /* JOIN */ |
2747 |
|
2, /* PRODUCT */ |
2748 |
|
1, /* TRANSPOSE */ |
2749 |
|
1, /* TCLOSURE */ |
2750 |
|
2, /* JOIN_IMAGE */ |
2751 |
|
1, /* IDEN */ |
2752 |
|
0, /* EMPTYBAG */ |
2753 |
|
1, /* BAG_TYPE */ |
2754 |
|
2, /* UNION_MAX */ |
2755 |
|
2, /* UNION_DISJOINT */ |
2756 |
|
2, /* INTERSECTION_MIN */ |
2757 |
|
2, /* DIFFERENCE_SUBTRACT */ |
2758 |
|
2, /* DIFFERENCE_REMOVE */ |
2759 |
|
2, /* SUBBAG */ |
2760 |
|
2, /* BAG_COUNT */ |
2761 |
|
1, /* DUPLICATE_REMOVAL */ |
2762 |
|
0, /* MK_BAG_OP */ |
2763 |
|
2, /* MK_BAG */ |
2764 |
|
1, /* BAG_IS_SINGLETON */ |
2765 |
|
1, /* BAG_CARD */ |
2766 |
|
1, /* BAG_FROM_SET */ |
2767 |
|
1, /* BAG_TO_SET */ |
2768 |
|
1, /* BAG_CHOOSE */ |
2769 |
|
2, /* BAG_MAP */ |
2770 |
|
expr::NodeValue::MAX_CHILDREN, /* STRING_CONCAT */ |
2771 |
|
2, /* STRING_IN_REGEXP */ |
2772 |
|
1, /* STRING_LENGTH */ |
2773 |
|
3, /* STRING_SUBSTR */ |
2774 |
|
3, /* STRING_UPDATE */ |
2775 |
|
2, /* STRING_CHARAT */ |
2776 |
|
2, /* STRING_CONTAINS */ |
2777 |
|
2, /* STRING_LT */ |
2778 |
|
2, /* STRING_LEQ */ |
2779 |
|
3, /* STRING_INDEXOF */ |
2780 |
|
3, /* STRING_INDEXOF_RE */ |
2781 |
|
3, /* STRING_REPLACE */ |
2782 |
|
3, /* STRING_REPLACE_ALL */ |
2783 |
|
3, /* STRING_REPLACE_RE */ |
2784 |
|
3, /* STRING_REPLACE_RE_ALL */ |
2785 |
|
2, /* STRING_PREFIX */ |
2786 |
|
2, /* STRING_SUFFIX */ |
2787 |
|
1, /* STRING_IS_DIGIT */ |
2788 |
|
1, /* STRING_ITOS */ |
2789 |
|
1, /* STRING_STOI */ |
2790 |
|
1, /* STRING_TO_CODE */ |
2791 |
|
1, /* STRING_FROM_CODE */ |
2792 |
|
1, /* STRING_TOLOWER */ |
2793 |
|
1, /* STRING_TOUPPER */ |
2794 |
|
1, /* STRING_REV */ |
2795 |
|
0, /* CONST_STRING */ |
2796 |
|
1, /* SEQUENCE_TYPE */ |
2797 |
|
0, /* CONST_SEQUENCE */ |
2798 |
|
1, /* SEQ_UNIT */ |
2799 |
|
2, /* SEQ_NTH */ |
2800 |
|
2, /* SEQ_NTH_TOTAL */ |
2801 |
|
1, /* STRING_TO_REGEXP */ |
2802 |
|
expr::NodeValue::MAX_CHILDREN, /* REGEXP_CONCAT */ |
2803 |
|
expr::NodeValue::MAX_CHILDREN, /* REGEXP_UNION */ |
2804 |
|
expr::NodeValue::MAX_CHILDREN, /* REGEXP_INTER */ |
2805 |
|
2, /* REGEXP_DIFF */ |
2806 |
|
1, /* REGEXP_STAR */ |
2807 |
|
1, /* REGEXP_PLUS */ |
2808 |
|
1, /* REGEXP_OPT */ |
2809 |
|
2, /* REGEXP_RANGE */ |
2810 |
|
1, /* REGEXP_COMPLEMENT */ |
2811 |
|
0, /* REGEXP_EMPTY */ |
2812 |
|
0, /* REGEXP_SIGMA */ |
2813 |
|
0, /* REGEXP_REPEAT_OP */ |
2814 |
|
1, /* REGEXP_REPEAT */ |
2815 |
|
0, /* REGEXP_LOOP_OP */ |
2816 |
|
1, /* REGEXP_LOOP */ |
2817 |
|
1, /* REGEXP_RV */ |
2818 |
|
3, /* FORALL */ |
2819 |
|
3, /* EXISTS */ |
2820 |
|
0, /* INST_CONSTANT */ |
2821 |
|
expr::NodeValue::MAX_CHILDREN, /* BOUND_VAR_LIST */ |
2822 |
|
expr::NodeValue::MAX_CHILDREN, /* INST_PATTERN */ |
2823 |
|
1, /* INST_NO_PATTERN */ |
2824 |
|
expr::NodeValue::MAX_CHILDREN, /* INST_ATTRIBUTE */ |
2825 |
|
expr::NodeValue::MAX_CHILDREN, /* INST_POOL */ |
2826 |
|
2, /* INST_ADD_TO_POOL */ |
2827 |
|
2, /* SKOLEM_ADD_TO_POOL */ |
2828 |
|
expr::NodeValue::MAX_CHILDREN, /* INST_PATTERN_LIST */ |
2829 |
|
// clang-format on |
2830 |
|
|
2831 |
|
0, /* LAST_KIND */ |
2832 |
|
}; |
2833 |
|
|
2834 |
230249796 |
return ubs[k]; |
2835 |
|
} |
2836 |
|
} // namespace metakind |
2837 |
|
|
2838 |
|
/** |
2839 |
|
* Map a kind of the operator to the kind of the enclosing expression. For |
2840 |
|
* example, since the kind of functions is just VARIABLE, it should map |
2841 |
|
* VARIABLE to APPLY_UF. |
2842 |
|
*/ |
2843 |
586622 |
Kind operatorToKind(::cvc5::expr::NodeValue* nv) |
2844 |
|
{ |
2845 |
586622 |
if(nv->getKind() == kind::BUILTIN) { |
2846 |
93595 |
return nv->getConst<Kind>(); |
2847 |
493027 |
} else if(nv->getKind() == kind::LAMBDA) { |
2848 |
1029 |
return kind::APPLY_UF; |
2849 |
|
} |
2850 |
|
|
2851 |
491998 |
switch (Kind k CVC5_UNUSED = nv->getKind()) |
2852 |
|
{ |
2853 |
|
// clang-format off |
2854 |
|
|
2855 |
|
|
2856 |
|
/* from builtin */ |
2857 |
|
case kind::SORT_TAG: return kind::SORT_TYPE; |
2858 |
|
|
2859 |
|
/* from booleans */ |
2860 |
|
|
2861 |
|
/* from uf */ |
2862 |
|
case kind::VARIABLE: return kind::APPLY_UF; |
2863 |
|
case kind::APPLY_UF: return kind::PARTIAL_APPLY_UF; |
2864 |
|
|
2865 |
|
/* from arith */ |
2866 |
|
case kind::DIVISIBLE_OP: return kind::DIVISIBLE; |
2867 |
|
case kind::INDEXED_ROOT_PREDICATE_OP: return kind::INDEXED_ROOT_PREDICATE; |
2868 |
|
case kind::IAND_OP: return kind::IAND; |
2869 |
|
|
2870 |
|
/* from bv */ |
2871 |
306197 |
case kind::BITVECTOR_BITOF_OP: return kind::BITVECTOR_BITOF; |
2872 |
58489 |
case kind::BITVECTOR_EXTRACT_OP: return kind::BITVECTOR_EXTRACT; |
2873 |
|
case kind::BITVECTOR_REPEAT_OP: return kind::BITVECTOR_REPEAT; |
2874 |
|
case kind::BITVECTOR_ROTATE_LEFT_OP: return kind::BITVECTOR_ROTATE_LEFT; |
2875 |
|
case kind::BITVECTOR_ROTATE_RIGHT_OP: return kind::BITVECTOR_ROTATE_RIGHT; |
2876 |
364 |
case kind::BITVECTOR_SIGN_EXTEND_OP: return kind::BITVECTOR_SIGN_EXTEND; |
2877 |
58 |
case kind::BITVECTOR_ZERO_EXTEND_OP: return kind::BITVECTOR_ZERO_EXTEND; |
2878 |
343 |
case kind::INT_TO_BITVECTOR_OP: return kind::INT_TO_BITVECTOR; |
2879 |
|
|
2880 |
|
/* from fp */ |
2881 |
3003 |
case kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR_OP: return kind::FLOATINGPOINT_TO_FP_IEEE_BITVECTOR; |
2882 |
8 |
case kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT_OP: return kind::FLOATINGPOINT_TO_FP_FLOATINGPOINT; |
2883 |
16 |
case kind::FLOATINGPOINT_TO_FP_REAL_OP: return kind::FLOATINGPOINT_TO_FP_REAL; |
2884 |
16 |
case kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR_OP: return kind::FLOATINGPOINT_TO_FP_SIGNED_BITVECTOR; |
2885 |
24 |
case kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR_OP: return kind::FLOATINGPOINT_TO_FP_UNSIGNED_BITVECTOR; |
2886 |
|
case kind::FLOATINGPOINT_TO_FP_GENERIC_OP: return kind::FLOATINGPOINT_TO_FP_GENERIC; |
2887 |
|
case kind::FLOATINGPOINT_TO_UBV_OP: return kind::FLOATINGPOINT_TO_UBV; |
2888 |
|
case kind::FLOATINGPOINT_TO_UBV_TOTAL_OP: return kind::FLOATINGPOINT_TO_UBV_TOTAL; |
2889 |
|
case kind::FLOATINGPOINT_TO_SBV_OP: return kind::FLOATINGPOINT_TO_SBV; |
2890 |
4 |
case kind::FLOATINGPOINT_TO_SBV_TOTAL_OP: return kind::FLOATINGPOINT_TO_SBV_TOTAL; |
2891 |
|
|
2892 |
|
/* from arrays */ |
2893 |
|
|
2894 |
|
/* from datatypes */ |
2895 |
1 |
case kind::APPLY_TYPE_ASCRIPTION: return kind::APPLY_CONSTRUCTOR; |
2896 |
|
case kind::SELECTOR_TYPE: return kind::APPLY_SELECTOR; |
2897 |
|
case kind::TESTER_TYPE: return kind::APPLY_TESTER; |
2898 |
|
case kind::UPDATER_TYPE: return kind::APPLY_UPDATER; |
2899 |
|
case kind::ASCRIPTION_TYPE: return kind::APPLY_TYPE_ASCRIPTION; |
2900 |
|
case kind::TUPLE_PROJECT_OP: return kind::TUPLE_PROJECT; |
2901 |
|
|
2902 |
|
/* from sep */ |
2903 |
|
|
2904 |
|
/* from sets */ |
2905 |
|
case kind::SINGLETON_OP: return kind::SINGLETON; |
2906 |
|
|
2907 |
|
/* from bags */ |
2908 |
|
case kind::MK_BAG_OP: return kind::MK_BAG; |
2909 |
|
|
2910 |
|
/* from strings */ |
2911 |
2 |
case kind::REGEXP_REPEAT_OP: return kind::REGEXP_REPEAT; |
2912 |
2 |
case kind::REGEXP_LOOP_OP: return kind::REGEXP_LOOP; |
2913 |
|
|
2914 |
|
/* from quantifiers */ |
2915 |
|
// clang-format on |
2916 |
|
|
2917 |
123471 |
default: return kind::UNDEFINED_KIND; /* LAST_KIND */ |
2918 |
|
}; |
2919 |
|
} |
2920 |
|
|
2921 |
|
} // namespace kind |
2922 |
29505 |
} // namespace cvc5 |