diff options
author | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2012-10-10 19:07:16 +0000 |
---|---|---|
committer | Dejan Jovanović <dejan.jovanovic@gmail.com> | 2012-10-10 19:07:16 +0000 |
commit | 46864582756f3381cd5db3a0a977e8897fec66a7 (patch) | |
tree | a7c41f87c069e0d1f8001dc97e07b67d61c483b0 /src/theory/bv | |
parent | 6685c1da8e7add4e4e6cc7996b43225d13782e56 (diff) |
fixing the cvc bv parser and typechecker
Diffstat (limited to 'src/theory/bv')
-rw-r--r-- | src/theory/bv/kinds | 8 | ||||
-rw-r--r-- | src/theory/bv/theory_bv_type_rules.h | 19 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/theory/bv/kinds b/src/theory/bv/kinds index 65500fe91..9dc2e66bb 100644 --- a/src/theory/bv/kinds +++ b/src/theory/bv/kinds @@ -128,10 +128,10 @@ typerule BITVECTOR_XNOR ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_COMP ::CVC4::theory::bv::BitVectorCompRule -typerule BITVECTOR_MULT ::CVC4::theory::bv::BitVectorArithRule -typerule BITVECTOR_PLUS ::CVC4::theory::bv::BitVectorArithRule -typerule BITVECTOR_SUB ::CVC4::theory::bv::BitVectorArithRule -typerule BITVECTOR_NEG ::CVC4::theory::bv::BitVectorArithRule +typerule BITVECTOR_MULT ::CVC4::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_PLUS ::CVC4::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_SUB ::CVC4::theory::bv::BitVectorFixedWidthTypeRule +typerule BITVECTOR_NEG ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_UDIV ::CVC4::theory::bv::BitVectorFixedWidthTypeRule typerule BITVECTOR_UREM ::CVC4::theory::bv::BitVectorFixedWidthTypeRule diff --git a/src/theory/bv/theory_bv_type_rules.h b/src/theory/bv/theory_bv_type_rules.h index 91b3a0e5d..8d8c31fa1 100644 --- a/src/theory/bv/theory_bv_type_rules.h +++ b/src/theory/bv/theory_bv_type_rules.h @@ -72,25 +72,6 @@ public: } }; -class BitVectorArithRule { -public: - inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) - throw (TypeCheckingExceptionPrivate, AssertionException) { - unsigned maxWidth = 0; - TNode::iterator it = n.begin(); - TNode::iterator it_end = n.end(); - // TODO: optimize unary neg - for (; it != it_end; ++ it) { - TypeNode t = (*it).getType(check); - if (check && !t.isBitVector()) { - throw TypeCheckingExceptionPrivate(n, "expecting bit-vector terms"); - } - maxWidth = std::max( maxWidth, t.getBitVectorSize() ); - } - return nodeManager->mkBitVectorType(maxWidth); - } -}; - class BitVectorFixedWidthTypeRule { public: inline static TypeNode computeType(NodeManager* nodeManager, TNode n, bool check) |