summaryrefslogtreecommitdiff
path: root/src/theory/bv
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-01-05 22:50:21 -0800
committerGitHub <noreply@github.com>2018-01-05 22:50:21 -0800
commitd26e19150d5d3a6cc8cee332a5f2067a7383a129 (patch)
tree922eb51c3f5c27b39287d63af0463f5224189957 /src/theory/bv
parent947b04aafc5d45fe901eccebc151f7a9c90de00e (diff)
Add special {SGE,SGT,NE}_UDIV1 side conditions for BV of size 1. (#1483)
This commit further fixes some other issues with bit-vectors of size 1.
Diffstat (limited to 'src/theory/bv')
-rw-r--r--src/theory/bv/theory_bv_utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/theory/bv/theory_bv_utils.h b/src/theory/bv/theory_bv_utils.h
index ed772b7c4..a11436c9e 100644
--- a/src/theory/bv/theory_bv_utils.h
+++ b/src/theory/bv/theory_bv_utils.h
@@ -195,6 +195,18 @@ inline BitVector mkBitVectorOnes(unsigned size) {
return BitVector(1, Integer(1)).signExtend(size - 1);
}
+inline BitVector mkBitVectorMinSigned(unsigned size)
+{
+ Assert(size > 0);
+ return BitVector(size).setBit(size - 1);
+}
+
+inline BitVector mkBitVectorMaxSigned(unsigned size)
+{
+ Assert(size > 0);
+ return ~mkBitVectorMinSigned(size);
+}
+
inline Node mkOnes(unsigned size) {
BitVector val = mkBitVectorOnes(size);
return NodeManager::currentNM()->mkConst<BitVector>(val);
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback