|
23 | 23 | #include "theory/datatypes/project_op.h"
|
24 | 24 | #include "theory/datatypes/theory_datatypes_utils.h"
|
25 | 25 | #include "util/bitvector.h"
|
| 26 | +#include "util/divisible.h" |
26 | 27 | #include "util/floatingpoint.h"
|
27 | 28 | #include "util/iand.h"
|
28 | 29 | #include "util/rational.h"
|
@@ -55,7 +56,7 @@ bool GenericOp::operator==(const GenericOp& op) const
|
55 | 56 |
|
56 | 57 | bool GenericOp::isNumeralIndexedOperatorKind(Kind k)
|
57 | 58 | {
|
58 |
| - return k == Kind::REGEXP_LOOP || k == Kind::BITVECTOR_EXTRACT |
| 59 | + return k == Kind::DIVISIBLE || k == Kind::REGEXP_LOOP || k == Kind::BITVECTOR_EXTRACT |
59 | 60 | || k == Kind::BITVECTOR_REPEAT || k == Kind::BITVECTOR_ZERO_EXTEND
|
60 | 61 | || k == Kind::BITVECTOR_SIGN_EXTEND || k == Kind::BITVECTOR_ROTATE_LEFT
|
61 | 62 | || k == Kind::BITVECTOR_ROTATE_RIGHT || k == Kind::INT_TO_BITVECTOR
|
@@ -86,6 +87,12 @@ std::vector<Node> GenericOp::getIndicesForOperator(Kind k, Node n)
|
86 | 87 | std::vector<Node> indices;
|
87 | 88 | switch (k)
|
88 | 89 | {
|
| 90 | + case Kind::DIVISIBLE: |
| 91 | + { |
| 92 | + const Divisible& op = n.getConst<Divisible>(); |
| 93 | + indices.push_back(nm->mkConstInt(Rational(op.k))); |
| 94 | + break; |
| 95 | + } |
89 | 96 | case Kind::REGEXP_LOOP:
|
90 | 97 | {
|
91 | 98 | const RegExpLoop& op = n.getConst<RegExpLoop>();
|
@@ -283,6 +290,9 @@ Node GenericOp::getOperatorForIndices(NodeManager* nm,
|
283 | 290 | }
|
284 | 291 | switch (k)
|
285 | 292 | {
|
| 293 | + case Kind::DIVISIBLE: |
| 294 | + Assert(numerals.size() == 1); |
| 295 | + return nm->mkConst(Divisible(numerals[0])); |
286 | 296 | case Kind::REGEXP_LOOP:
|
287 | 297 | Assert(numerals.size() == 2);
|
288 | 298 | return nm->mkConst(RegExpLoop(numerals[0], numerals[1]));
|
|
0 commit comments