Skip to content

Commit d0e049d

Browse files
committed
More
1 parent a577f28 commit d0e049d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/theory/builtin/generic_op.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "theory/datatypes/project_op.h"
2424
#include "theory/datatypes/theory_datatypes_utils.h"
2525
#include "util/bitvector.h"
26+
#include "util/divisible.h"
2627
#include "util/floatingpoint.h"
2728
#include "util/iand.h"
2829
#include "util/rational.h"
@@ -55,7 +56,7 @@ bool GenericOp::operator==(const GenericOp& op) const
5556

5657
bool GenericOp::isNumeralIndexedOperatorKind(Kind k)
5758
{
58-
return k == Kind::REGEXP_LOOP || k == Kind::BITVECTOR_EXTRACT
59+
return k == Kind::DIVISIBLE || k == Kind::REGEXP_LOOP || k == Kind::BITVECTOR_EXTRACT
5960
|| k == Kind::BITVECTOR_REPEAT || k == Kind::BITVECTOR_ZERO_EXTEND
6061
|| k == Kind::BITVECTOR_SIGN_EXTEND || k == Kind::BITVECTOR_ROTATE_LEFT
6162
|| k == Kind::BITVECTOR_ROTATE_RIGHT || k == Kind::INT_TO_BITVECTOR
@@ -86,6 +87,12 @@ std::vector<Node> GenericOp::getIndicesForOperator(Kind k, Node n)
8687
std::vector<Node> indices;
8788
switch (k)
8889
{
90+
case Kind::DIVISIBLE:
91+
{
92+
const Divisible& op = n.getConst<Divisible>();
93+
indices.push_back(nm->mkConstInt(Rational(op.k)));
94+
break;
95+
}
8996
case Kind::REGEXP_LOOP:
9097
{
9198
const RegExpLoop& op = n.getConst<RegExpLoop>();
@@ -283,6 +290,9 @@ Node GenericOp::getOperatorForIndices(NodeManager* nm,
283290
}
284291
switch (k)
285292
{
293+
case Kind::DIVISIBLE:
294+
Assert(numerals.size() == 1);
295+
return nm->mkConst(Divisible(numerals[0]));
286296
case Kind::REGEXP_LOOP:
287297
Assert(numerals.size() == 2);
288298
return nm->mkConst(RegExpLoop(numerals[0], numerals[1]));

0 commit comments

Comments
 (0)