summaryrefslogtreecommitdiff
path: root/src/theory
diff options
context:
space:
mode:
authorAina Niemetz <aina.niemetz@gmail.com>2020-06-15 12:32:42 -0700
committerGitHub <noreply@github.com>2020-06-15 12:32:42 -0700
commit3cb6e28c13a2c3ff42d68d5b5025e4b56cb2054b (patch)
tree1adb7a13adb48c73fec51125e9945b7f04557a5b /src/theory
parentaf37e2c948c140dbee2421a3cb046e068cc5b0f8 (diff)
BV: Add missing type check for BITVECTOR_REPEAT_OP. (#4614)
Fixes #4075.
Diffstat (limited to 'src/theory')
-rw-r--r--src/theory/bv/theory_bv_type_rules.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h
index 42b90cd29..3589538bf 100644
--- a/src/theory/bv/theory_bv_type_rules.h
+++ b/src/theory/bv/theory_bv_type_rules.h
@@ -302,6 +302,10 @@ class BitVectorRepeatTypeRule
throw TypeCheckingExceptionPrivate(n, "expecting bit-vector term");
}
unsigned repeatAmount = n.getOperator().getConst<BitVectorRepeat>();
+ if (repeatAmount == 0)
+ {
+ throw TypeCheckingExceptionPrivate(n, "expecting number of repeats > 0");
+ }
return nodeManager->mkBitVectorType(repeatAmount * t.getBitVectorSize());
}
}; /* class BitVectorRepeatTypeRule */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback