#include <bitvector_theorem_producer.h>
Inheritance diagram for CVC3::BitvectorTheoremProducer:
Author: Vijay Ganesh, May-August, 2004
Definition at line 41 of file bitvector_theorem_producer.h.
BitvectorTheoremProducer::BitvectorTheoremProducer | ( | TheoryBitvector * | theoryBitvector | ) |
Constructor: constructs an instance of bitvector DP.
Definition at line 48 of file bitvector_theorem_producer.cpp.
References d_bvOne, d_bvZero, d_theoryBitvector, and CVC3::TheoryBitvector::newBVConstExpr().
CVC3::BitvectorTheoremProducer::~BitvectorTheoremProducer | ( | ) | [inline] |
Definition at line 84 of file bitvector_theorem_producer.h.
const Expr& CVC3::BitvectorTheoremProducer::bvZero | ( | ) | const [inline, private] |
Return cached constant 0bin0.
Definition at line 50 of file bitvector_theorem_producer.h.
References d_bvZero.
Referenced by bitExtractToExtract(), expandTypePred(), signBVLTRule(), and typePredBit().
const Expr& CVC3::BitvectorTheoremProducer::bvOne | ( | ) | const [inline, private] |
Return cached constant 0bin1.
Definition at line 52 of file bitvector_theorem_producer.h.
References d_bvOne.
Referenced by bitExtractToExtract(), expandTypePred(), signBVLTRule(), and typePredBit().
void BitvectorTheoremProducer::collectLikeTermsOfPlus | ( | const Expr & | e, | |
ExprMap< Rational > & | likeTerms, | |||
Rational & | plusConstant | |||
) | [private] |
Collect all of: a*x1+b*x1 + c*x2-x2 + d*x3 + ~x3 + ~x4 +e into (a+b, x1) , (c-1 , x2), (d-1, x3), (-1, x4) and the constant e-2. The constant is calculated from the formula -x = ~x+1 (or -x-1=~x).
Definition at line 3462 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::begin(), CVC3::BVCONST, CVC3::BVMULT, CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, CVC3::ExprMap< Data >::clear(), collectOneTermOfPlus(), CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Expr::end(), and CVC3::Expr::toString().
Referenced by combineLikeTermsRule().
void BitvectorTheoremProducer::collectOneTermOfPlus | ( | const Rational & | coefficient, | |
const Expr & | var, | |||
ExprMap< Rational > & | likeTerms, | |||
Rational & | plusConstant | |||
) | [private] |
Collect a single coefficient*var pair into likeTerms. Update the counter of likeTerms[var] += coefficient. Potentially update the constant additive plusConstant.
Definition at line 3432 of file bitvector_theorem_producer.cpp.
References d_theoryBitvector, CVC3::ExprMap< Data >::empty(), CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Theorem::getRHS(), and CVC3::TheoryBitvector::pushNegationRec().
Referenced by collectLikeTermsOfPlus().
void BitvectorTheoremProducer::createNewPlusCollection | ( | const Expr & | e, | |
const ExprMap< Rational > & | likeTerms, | |||
Rational & | plusConstant, | |||
std::vector< Expr > & | result | |||
) | [private] |
Create a vector which will form the next PVPLUS. Use the colleciton of likeTerms, and the constant additive plusConstant
Definition at line 3524 of file bitvector_theorem_producer.cpp.
References CVC3::ExprMap< Data >::begin(), CVC3::BITVECTOR, boundedModulo(), CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::ExprMap< Data >::end(), CVC3::Theorem::getRHS(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoryBitvector::pushNegationRec(), and CVC3::Expr::toString().
Referenced by combineLikeTermsRule().
Expr BitvectorTheoremProducer::sumNormalizedElements | ( | int | bvplusLength, | |
const std::vector< Expr > & | elements | |||
) | [private] |
Create expression by applying plus to all elements. All elements should be normalized and ready. If there are too few elements, a non BVPLUS expression will be created.
Definition at line 3584 of file bitvector_theorem_producer.cpp.
References d_theoryBitvector, CVC3::TheoryBitvector::newBVPlusExpr(), and CVC3::TheoryBitvector::newBVZeroString().
Referenced by combineLikeTermsRule().
thm | input theorem: (e1[i]<=>e2[i])<=>false |
Implements CVC3::BitvectorProofRules.
Definition at line 63 of file bitvector_theorem_producer.cpp.
References CVC3::BOOLEXTRACT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Expr::eqExpr(), CVC3::Theorem::getAssumptionsRef(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Theorem::getExpr(), CVC3::Theorem::getProof(), CVC3::Expr::isIff(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
thm | input theorem: (~e1[i]<=>e2[i])<=>true |
Implements CVC3::BitvectorProofRules.
Definition at line 95 of file bitvector_theorem_producer.cpp.
References CVC3::BOOLEXTRACT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Expr::eqExpr(), CVC3::Theorem::getAssumptionsRef(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Theorem::getExpr(), CVC3::Theorem::getProof(), CVC3::Expr::isIff(), CVC3::Expr::negate(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::NOT, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
e | input equation: e1=e2 over bitvector terms | |
f | formula over the bits of bitvector variables in e: |
where each of
denotes a formula over variables in
respectively
Implements CVC3::BitvectorProofRules.
Definition at line 130 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::Expr::isAnd(), CVC3::Expr::isEq(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::bitBlastDisEqnRule | ( | const Theorem & | e, | |
const Expr & | f | |||
) | [virtual] |
e | : input disequality: e1 != e2 over bitvector terms | |
f | : formula over the bits of bitvector variables in e: |
where each of
denotes a formula over variables in
respectively
Implements CVC3::BitvectorProofRules.
Definition at line 213 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, DebugAssert, CVC3::Theorem::getAssumptionsRef(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Type::getExpr(), CVC3::Theorem::getExpr(), CVC3::Expr::getOpKind(), CVC3::Theorem::getProof(), CVC3::Expr::getType(), CVC3::Expr::isNot(), CVC3::Expr::isOr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newTheorem(), CVC3::Expr::toString(), CVC3::Theorem::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
sign extend the input SX(e) appropriately
Implements CVC3::BitvectorProofRules.
Definition at line 327 of file bitvector_theorem_producer.cpp.
References CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::SX, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Referenced by bitExtractSXRule().
Pad the kids of BVLT/BVLE to make their length equal.
Implements CVC3::BitvectorProofRules.
Definition at line 293 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVLE, CVC3::BVLT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVLEExpr(), CVC3::TheoryBitvector::newBVLTExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), pad(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Sign Extend the kids of BVSLT/BVSLE to make their length equal.
Implements CVC3::BitvectorProofRules.
Definition at line 385 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVSLE, CVC3::BVSLT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVSLEExpr(), CVC3::TheoryBitvector::newBVSLTExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::TheoryBitvector::newSXExpr(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::signBVLTRule | ( | const Expr & | e, | |
const Theorem & | topBit0, | |||
const Theorem & | topBit1 | |||
) | [virtual] |
input: e0 <=(s) e1. output depends on whether the topbits(MSB) of e0 and e1 are constants. If they are constants then optimizations are done, otherwise the following rule is implemented.
e0 <=(s) e1 <==> (e0[n-1] AND NOT e1[n-1]) OR (e0[n-1] AND e1[n-1] AND e1[n-2:0] <= e0[n-2:0]) OR (NOT e0[n-1] AND NOT e1[n-1] AND e0[n-2:0] <= e1[n-2:0])
Implements CVC3::BitvectorProofRules.
Definition at line 425 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::andExpr(), CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVCONST, bvOne(), CVC3::TheoryBitvector::BVSize(), CVC3::BVSLE, CVC3::BVSLT, bvZero(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::eqExpr(), CVC3::Theory::falseExpr(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVLEExpr(), CVC3::TheoryBitvector::newBVLTExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::orExpr(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
NOT(e[0][0] < e[0][1]) <==> (e[0][1] <= e[0][0]), NOT(e[0][0] <= e[0][1]) <==> (e[0][1] < e[0][0])
Implements CVC3::BitvectorProofRules.
Definition at line 595 of file bitvector_theorem_producer.cpp.
References CVC3::BVLE, CVC3::BVLT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVLEExpr(), CVC3::TheoryBitvector::newBVLTExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::NOT, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
if(lhs==rhs) then we have (lhs < rhs <==> false),(lhs <= rhs <==> true)
Implements CVC3::BitvectorProofRules.
Definition at line 625 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVLE, CVC3::BVLT, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
|= 0 <= foo <-> TRUE
Implements CVC3::BitvectorProofRules.
Definition at line 653 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVLE, CHECK_PROOFS, CHECK_SOUND, CVC3::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
if indeed e[0] < e[1] then (e<==>true) else (e<==>false)
Implements CVC3::BitvectorProofRules.
Definition at line 671 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVLE, CVC3::BVLT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::generalIneqn | ( | const Expr & | e, | |
const Theorem & | lhs_i, | |||
const Theorem & | rhs_i, | |||
int | kind | |||
) | [virtual] |
Implements CVC3::BitvectorProofRules.
Definition at line 719 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::andExpr(), CVC3::Expr::arity(), CVC3::BOOLEXTRACT, CVC3::BVLE, CVC3::BVLT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::getType(), CVC3::Expr::iffExpr(), CVC3::Type::isBool(), CVC3::Expr::isFalse(), CVC3::Theorem::isRewrite(), CVC3::Expr::isTrue(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVLEExpr(), CVC3::TheoryBitvector::newBVLTExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::notExpr(), CVC3::Expr::orExpr(), CVC3::Theorem::toString(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
t[i] ==> t[i:i] = 0bin1 or NOT t[i] ==> t[i:i] = 0bin0
Implements CVC3::BitvectorProofRules.
Definition at line 860 of file bitvector_theorem_producer.cpp.
References CVC3::BOOLEXTRACT, bvOne(), bvZero(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Theorem::getAssumptionsRef(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Theorem::getExpr(), CVC3::Expr::getOpKind(), CVC3::Theorem::getProof(), CVC3::Expr::isNot(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t[i] <=> t[i:i][0] (to use rewriter for simplifying t[i:i])
Implements CVC3::BitvectorProofRules.
Definition at line 881 of file bitvector_theorem_producer.cpp.
References CVC3::BOOLEXTRACT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
x | : input1 is bitvector constant | |
i | : input2 is extracted bitposition |
, if bitposition has a 1;
, if the bitposition has a 0
Implements CVC3::BitvectorProofRules.
Definition at line 909 of file bitvector_theorem_producer.cpp.
References CVC3::BVCONST, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::TRACE, CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
x | : input1 is bitvector binary concatenation | |
i | : input2 is extracted bitposition |
, where
, another case of boolextract over concatenation is:
, where
Implements CVC3::BitvectorProofRules.
Definition at line 946 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, d_theoryBitvector, DebugAssert, CVC3::Assumptions::emptyAssump(), CVC3::Theory::getBaseType(), CVC3::Expr::getOpKind(), CVC3::Expr::isNull(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
t | : input1 is bitvector binary BVMULT. x[0] must be BVCONST | |
i | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1000 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoryBitvector::newFixedConstWidthLeftShiftExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), pad(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
t | : input1 is bitvector binary BVMULT. t[0] must not be BVCONST | |
i | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1066 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::Expr::iffExpr(), CVC3::Expr::iteExpr(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoryBitvector::newFixedLeftShiftExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
x | : input1 is bitvector extraction [k:j] | |
i | : input2 is extracted bitposition |
, where
Implements CVC3::BitvectorProofRules.
Definition at line 1128 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::Type::getExpr(), CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::bitExtractBVPlus | ( | const std::vector< Theorem > & | t1, | |
const std::vector< Theorem > & | t2, | |||
const Expr & | bvPlusTerm, | |||
int | i | |||
) | [virtual] |
t1 | : input1 is vector of bitblasts of t, from bit i-1 to 0 | |
t2 | : input2 is vector of bitblasts of q, from bit i-1 to 0 | |
bvPlusTerm | : input3 is BVPLUS term: BVPLUS(n,t,q) | |
i | : input4 is extracted bitposition |
, when
, we have
, where c(t,q,i) is the carry generated by the addition of bits from 0 to i-1
Implements CVC3::BitvectorProofRules.
Definition at line 1179 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVPLUS, CHECK_PROOFS, CHECK_SOUND, computeCarry(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVPlusParam(), CVC3::Expr::getOpKind(), CVC3::Expr::iffExpr(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::bitExtractBVPlusPreComputed | ( | const Theorem & | t1_i, | |
const Theorem & | t2_i, | |||
const Expr & | bvPlusTerm, | |||
int | bitPos, | |||
int | precomputed | |||
) | [virtual] |
Implements CVC3::BitvectorProofRules.
Definition at line 1279 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BOOLEXTRACT, CVC3::BVPLUS, CHECK_PROOFS, CHECK_SOUND, computeCarryPreComputed(), d_theoryBitvector, DebugAssert, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBoolExtractIndex(), CVC3::TheoryBitvector::getBVPlusParam(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::iffExpr(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Theorem::toString(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
bvPlusTerm | : input1 is bvPlusTerm, a BVPLUS term with arity > 2 |
Implements CVC3::BitvectorProofRules.
Definition at line 1439 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKids(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
x | : input1 is bitwise NEGATION | |
i | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1481 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVNEG, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Auxiliary function for bitExtractAnd() and bitExtractOr().
Definition at line 1517 of file bitvector_theorem_producer.cpp.
References CVC3::andExpr(), CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BVAND, CVC3::BVOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::ExprManager::getKindName(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::orExpr(), rat(), CVC3::Theorem::toString(), CVC3::Type::toString(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Referenced by bitExtractAnd(), and bitExtractOr().
x | : input1 is bitwise AND | |
i | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1561 of file bitvector_theorem_producer.cpp.
References bitExtractBitwise(), and CVC3::BVAND.
x | : input1 is bitwise OR | |
i | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1567 of file bitvector_theorem_producer.cpp.
References bitExtractBitwise(), and CVC3::BVOR.
x | : input1 is bitvector FIXED SHIFT
| |
i | : input2 is extracted bitposition |
, if 0 <= i < k. however, if k <= i < n then, result is
Implements CVC3::BitvectorProofRules.
Definition at line 1572 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONST_WIDTH_LEFTSHIFT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Type::getExpr(), CVC3::TheoryBitvector::getFixedLeftShiftParam(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::LEFTSHIFT, CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Implements CVC3::BitvectorProofRules.
Definition at line 1621 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Type::getExpr(), CVC3::TheoryBitvector::getFixedRightShiftParam(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::RIGHTSHIFT, CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
e | : input1 is bitvector term | |
r | : input2 is extracted bitposition |
Implements CVC3::BitvectorProofRules.
Definition at line 1412 of file bitvector_theorem_producer.cpp.
References CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Theory::getBaseType(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
bitExtractSXRule
Implements CVC3::BitvectorProofRules.
Definition at line 368 of file bitvector_theorem_producer.cpp.
References d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theorem::getRHS(), CVC3::TheoryBitvector::newBoolExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), signExtendRule(), and CVC3::TheoremProducer::withProof().
c1=c2 <=> TRUE/FALSE (equality of constant bitvectors)
Implements CVC3::BitvectorProofRules.
Definition at line 1680 of file bitvector_theorem_producer.cpp.
References CHECK_PROOFS, CHECK_SOUND, constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Theory::falseExpr(), CVC3::Expr::isEq(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::Theory::trueExpr(), and CVC3::TheoremProducer::withProof().
|- c1=c2 ==> |- AND(c1[i:i] = c2[i:i]) - expanding equalities into bits
Implements CVC3::BitvectorProofRules.
Definition at line 1698 of file bitvector_theorem_producer.cpp.
References CVC3::andExpr(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Theorem::getAssumptionsRef(), CVC3::Theory::getBaseType(), CVC3::Theorem::getExpr(), CVC3::Type::getExpr(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getProof(), CVC3::Theorem::getRHS(), CVC3::Theorem::isRewrite(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newTheorem(), CVC3::Theorem::toString(), and CVC3::TheoremProducer::withProof().
t<<n = c @ 0bin00...00, takes e == (t<<n)
Implements CVC3::BitvectorProofRules.
Definition at line 1731 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getFixedLeftShiftParam(), CVC3::Expr::getOpKind(), CVC3::LEFTSHIFT, CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t<<n = c @ 0bin00...00, takes e == (t<<n)
Implements CVC3::BitvectorProofRules.
Definition at line 1755 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONST_WIDTH_LEFTSHIFT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getFixedLeftShiftParam(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t>>m = 0bin00...00 @ t[bvlength-1:m], takes e == (t>>n)
Implements CVC3::BitvectorProofRules.
Definition at line 1787 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, DebugAssert, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getFixedRightShiftParam(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::RIGHTSHIFT, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
a XOR b <=> (a & ~b) | (~a & b)
Implements CVC3::BitvectorProofRules.
Definition at line 1819 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVXOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), and CVC3::TheoremProducer::withProof().
a XNOR b <=> (~a & ~b) | (a & b)
Implements CVC3::BitvectorProofRules.
Definition at line 1838 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVXNOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), and CVC3::TheoremProducer::withProof().
a NAND b <=> ~(a & b)
Implements CVC3::BitvectorProofRules.
Definition at line 1857 of file bitvector_theorem_producer.cpp.
References CVC3::andExpr(), CVC3::Expr::arity(), CVC3::BVNAND, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), and CVC3::TheoremProducer::withProof().
a NOR b <=> ~(a | b)
Implements CVC3::BitvectorProofRules.
Definition at line 1872 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVNOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::orExpr(), and CVC3::TheoremProducer::withProof().
a - b <=> a + (-b)
Implements CVC3::BitvectorProofRules.
Definition at line 1887 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::TheoryBitvector::BVSize(), CVC3::BVSUB, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoryBitvector::newBVUminusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), and CVC3::TheoremProducer::withProof().
k*t = BVPLUS(n, <sum of shifts of t>) -- translation of k*t to BVPLUS
If k = 2^m, return k*t = t@0...0
Implements CVC3::BitvectorProofRules.
Definition at line 1910 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, DebugAssert, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Rational::isInteger(), CVC3::Expr::isRational(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoryBitvector::newFixedLeftShiftExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
0bin0...0 @ BVPLUS(n, args) = BVPLUS(n+k, args)
where k is the size of the 0bin0...0
Implements CVC3::BitvectorProofRules.
Definition at line 1958 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVCONST, CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), CVC3::CONCAT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::TheoryBitvector::getBVPlusParam(), CVC3::Expr::getKids(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Theory::reflexivityRule(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Implements CVC3::BitvectorProofRules.
Definition at line 3096 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Implements CVC3::BitvectorProofRules.
Definition at line 3118 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), pad(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t1*a <==> a*t1
Implements CVC3::BitvectorProofRules.
Definition at line 3143 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
converts e to a bitvector of length rat
len | is the desired bvLength of the resulting bitvector | |
e | is the original bitvector of arbitrary bvLength |
Definition at line 3164 of file bitvector_theorem_producer.cpp.
References CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), d_theoryBitvector, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoryBitvector::newConcatExpr(), and CVC3::Expr::toString().
Referenced by bitExtractConstBVMult(), oneCoeffBVMult(), padBVLTRule(), padBVMult(), and padBVPlus().
Pad the kids of BVMULT to make their bvLength = # of output-bits.
Implements CVC3::BitvectorProofRules.
Definition at line 3189 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVMULT, CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), pad(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Pad the kids of BVMULT to make their bvLength = # of output-bits.
Implements CVC3::BitvectorProofRules.
Definition at line 3219 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), pad(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
a*(b*t) <==> (a*b)*t, where a,b,t have same bvLength
Implements CVC3::BitvectorProofRules.
Definition at line 3243 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
(t1*t2)*t3 <==> t1*(t2*t3), where t1<t2<t3
Implements CVC3::BitvectorProofRules.
Definition at line 3281 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
a*(t1+...+tn) <==> (a*t1+...+a*tn), where all kids are equibvLength
Implements CVC3::BitvectorProofRules.
Definition at line 3355 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVMULT, CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
input BVPLUS expression e.output e <==> e', where e' has no BVPLUS
Implements CVC3::BitvectorProofRules.
Definition at line 3395 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Implements CVC3::BitvectorProofRules.
Definition at line 3604 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVMULT, CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, collectLikeTermsOfPlus(), createNewPlusCollection(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), sumNormalizedElements(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Implements CVC3::BitvectorProofRules.
Definition at line 3655 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EQ, CVC3::Expr::getKids(), CVC3::Expr::getKind(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoryBitvector::newBVUminusExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
(x *[n] y)[m:k] = (x *[m+1] y)[m:k], where m < n
Implements CVC3::BitvectorProofRules.
Definition at line 3948 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
(x +[n] y)[m:k] = (x +[m+1] y)[m:k], where m < n
Implements CVC3::BitvectorProofRules.
Definition at line 3980 of file bitvector_theorem_producer.cpp.
References CVC3::BVPLUS, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Theory::reflexivityRule(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
ite(c,t1,t2)[i:j] <=> ite(c,t1[i:j],t2[i:j])
Implements CVC3::BitvectorProofRules.
Definition at line 2231 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::ITE, CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~ite(c,t1,t2) <=> ite(c,~t1,~t2)
Implements CVC3::BitvectorProofRules.
Definition at line 2267 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BITVECTOR, CVC3::BVNEG, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::ITE, CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-0 <==> 0, -c <==> ~c+1
Implements CVC3::BitvectorProofRules.
Definition at line 3750 of file bitvector_theorem_producer.cpp.
References CVC3::BVCONST, CVC3::TheoryBitvector::BVSize(), CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), CVC3::TheoryBitvector::computeNegBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-(c*t)<=>(-c)*t; if -c==0 return e<=>0. if(-c==1) return e<=>t
Implements CVC3::BitvectorProofRules.
Definition at line 3777 of file bitvector_theorem_producer.cpp.
References CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeNegBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-(-e) <==> e
Implements CVC3::BitvectorProofRules.
Definition at line 3823 of file bitvector_theorem_producer.cpp.
References CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-v <==> -1*v
Implements CVC3::BitvectorProofRules.
Definition at line 3844 of file bitvector_theorem_producer.cpp.
References CVC3::TheoryBitvector::BVSize(), CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
c*(-t) <==> (-c)*t
Implements CVC3::BitvectorProofRules.
Definition at line 3867 of file bitvector_theorem_producer.cpp.
References CVC3::BVCONST, CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeNegBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVMultExpr(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-t <==> ~t+1
Implements CVC3::BitvectorProofRules.
Definition at line 3728 of file bitvector_theorem_producer.cpp.
References CVC3::TheoryBitvector::BVSize(), CVC3::BVUMINUS, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVPlusExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
-(c1*t1+...+cn*tn) <==> (-(c1*t1)+...+-(cn*tn))
Implements CVC3::BitvectorProofRules.
Definition at line 3913 of file bitvector_theorem_producer.cpp.
References CVC3::Assumptions::emptyAssump(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), and CVC3::TheoremProducer::withProof().
c1[i:j] = c (extraction from a constant bitvector)
Implements CVC3::BitvectorProofRules.
Definition at line 2005 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CHECK_PROOFS, CHECK_SOUND, constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getBVConstValue(), CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t[n-1:0] = t for n-bit t
Implements CVC3::BitvectorProofRules.
Definition at line 2037 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
t[i:j][k:l] = t[k+j:l+j] (eliminate double extraction)
Implements CVC3::BitvectorProofRules.
Definition at line 2061 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
(t1 @ t2)[i:j] = t1[...] @ t2[...] (push extraction through concat)
Implements CVC3::BitvectorProofRules.
Definition at line 2105 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::EXTRACT, CVC3::Theorem::getExpr(), CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::extractBitwise | ( | const Expr & | e, | |
int | kind, | |||
const std::string & | name | |||
) | [virtual] |
Auxiliary function: (t1 op t2)[i:j] = t1[i:j] op t2[i:j].
Implements CVC3::BitvectorProofRules.
Definition at line 2172 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVAND, CVC3::BVNEG, CVC3::BVOR, CVC3::BVXNOR, CVC3::BVXOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::EXTRACT, CVC3::Theory::getEM(), CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::ExprManager::getKindName(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Referenced by extractAnd(), extractNeg(), and extractOr().
(t1 & t2)[i:j] = t1[i:j] & t2[i:j] (push extraction through OR)
Implements CVC3::BitvectorProofRules.
Definition at line 2211 of file bitvector_theorem_producer.cpp.
References CVC3::BVAND, and extractBitwise().
(t1 | t2)[i:j] = t1[i:j] | t2[i:j] (push extraction through AND)
Implements CVC3::BitvectorProofRules.
Definition at line 2218 of file bitvector_theorem_producer.cpp.
References CVC3::BVOR, and extractBitwise().
(~t)[i:j] = ~(t[i:j]) (push extraction through NEG)
Implements CVC3::BitvectorProofRules.
Definition at line 2225 of file bitvector_theorem_producer.cpp.
References CVC3::BVNEG, and extractBitwise().
~c1 = c (bit-wise negation of a constant bitvector)
Implements CVC3::BitvectorProofRules.
Definition at line 2295 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVNEG, CHECK_PROOFS, CHECK_SOUND, constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstSize(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(t1@...@tn) = (~t1)@...@(~tn) -- push negation through concat
Implements CVC3::BitvectorProofRules.
Definition at line 2318 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVNEG, CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(~t) = t -- eliminate double negation
Implements CVC3::BitvectorProofRules.
Definition at line 2343 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVNEG, CHECK_PROOFS, CHECK_SOUND, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(t1 & t2) <=> ~t1 | ~t2 -- DeMorgan's Laws
Implements CVC3::BitvectorProofRules.
Definition at line 2359 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVNEG, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(t1 | t2) <=> ~t1 & ~t2 -- DeMorgan's Laws
Implements CVC3::BitvectorProofRules.
Definition at line 2381 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVNEG, CVC3::BVOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(t1 xor t2) = ~t1 xor t2
Implements CVC3::BitvectorProofRules.
Definition at line 2404 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVNEG, CVC3::BVXOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVNegExpr(), CVC3::TheoryBitvector::newBVXorExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
~(t1 xnor t2) = t1 xor t2
Implements CVC3::BitvectorProofRules.
Definition at line 2430 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVNEG, CVC3::BVXNOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVXnorExpr(), CVC3::TheoryBitvector::newBVXorExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::bitwiseConst | ( | const Expr & | e, | |
const std::vector< int > & | idxs, | |||
bool | isAnd | |||
) |
Auxiliary method for andConst() and orConst().
c1&c2 = c (bit-wise AND constant bitvectors) c1 op c2 = c -- bit-wise AND and OR of constant bitvectors
Definition at line 2458 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVCONST, CVC3::BVOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstSize(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::RAW_LIST, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Referenced by andConst(), and orConst().
Auxiliary method for andConcat() and orConcat().
Lifts concatenation to the top of bit-wise AND. Takes the bit-wise AND expression 'e' and the index 'i' of the concatenation.
Definition at line 2539 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVAndExpr(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoryBitvector::newBVOrExpr(), CVC3::TheoryBitvector::newConcatExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Referenced by andConcat(), and orConcat().
Auxiliary method for andFlatten() and orFlatten().
Definition at line 2590 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVAND, CVC3::BVOR, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, DebugAssert, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVOneString(), CVC3::TheoryBitvector::newBVZeroString(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), sameKidCheck(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Referenced by andFlatten(), and orFlatten().
Theorem BitvectorTheoremProducer::andConst | ( | const Expr & | e, | |
const std::vector< int > & | idxs | |||
) | [virtual] |
c1&c2&t = c&t -- compute bit-wise AND of constant bitvector arguments
e | is the bit-wise AND expression; | |
idxs | are the indices of the constant bitvectors. There must be at least constant expressions in this rule. |
Implements CVC3::BitvectorProofRules.
Definition at line 2666 of file bitvector_theorem_producer.cpp.
References bitwiseConst().
0bin0...0 & t = 0bin0...0 -- bit-wise AND with zero bitvector
e | is the bit-wise AND expr | |
idx | is the index of the zero bitvector |
Implements CVC3::BitvectorProofRules.
Definition at line 2676 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVCONST, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::andOne | ( | const Expr & | e, | |
const std::vector< int > | idxs | |||
) | [virtual] |
0bin1...1 & t = t -- bit-wise AND with bitvector of 1's
e | is the bit-wise AND expr | |
idxs | is a vector of indices of the bitvectors of 1's which will be dropped |
Implements CVC3::BitvectorProofRules.
Definition at line 2698 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVCONST, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstSize(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getKind(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
... & (t1@...@tk) & ... = (...& t1 &...)@...@(...& tk &...)
Lifts concatenation to the top of bit-wise AND. Takes the bit-wise AND expression 'e' and the index 'i' of the concatenation.
Implements CVC3::BitvectorProofRules.
Definition at line 2755 of file bitvector_theorem_producer.cpp.
References bitwiseConcat().
(t1 & (t2 & t3) & t4) = t1 & t2 & t3 & t4 -- flatten bit-wise AND
Also reorders the terms according to a fixed total ordering
Implements CVC3::BitvectorProofRules.
Definition at line 2763 of file bitvector_theorem_producer.cpp.
References bitwiseFlatten().
Theorem BitvectorTheoremProducer::orConst | ( | const Expr & | e, | |
const std::vector< int > & | idxs | |||
) | [virtual] |
c1|c2|t = c|t -- compute bit-wise OR of constant bitvector arguments
e | is the bit-wise OR expression; | |
idxs | are the indices of the constant bitvectors. There must be at least constant expressions in this rule. |
Implements CVC3::BitvectorProofRules.
Definition at line 2770 of file bitvector_theorem_producer.cpp.
References bitwiseConst().
0bin1...1 | t = 0bin1...1 -- bit-wise OR with bitvector of 1's
e | is the bit-wise OR expr | |
idx | is the index of the bitvector of 1's |
Implements CVC3::BitvectorProofRules.
Definition at line 2781 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVOR, CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstSize(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Theorem BitvectorTheoremProducer::orZero | ( | const Expr & | e, | |
const std::vector< int > | idxs | |||
) | [virtual] |
0bin0...0 | t = t -- bit-wise OR with bitvector of 0's
e | is the bit-wise OR expr | |
idxs | is a vector of indices of the bitvectors of 0's which will be dropped |
Implements CVC3::BitvectorProofRules.
Definition at line 2811 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVOR, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::getKind(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), rat(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
... | (t1@...@tk) | ... = (...| t1 |...)@...@(...| tk |...)
Lifts concatenation to the top of bit-wise OR. Takes the bit-wise OR expression 'e' and the index 'i' of the concatenation.
Implements CVC3::BitvectorProofRules.
Definition at line 2920 of file bitvector_theorem_producer.cpp.
References bitwiseConcat().
(t1 | (t2 | t3) | t4) = t1 | t2 | t3 | t4 -- flatten bit-wise OR
Also reorders the terms according to a fixed total ordering
Implements CVC3::BitvectorProofRules.
Definition at line 2928 of file bitvector_theorem_producer.cpp.
References bitwiseFlatten().
checks if e is already present in likeTerms without conflicts. if yes return 1, else{ if conflict return -1 else return 0 } we have conflict if 1. the kind of e is BVNEG, and e[0] is already present in likeTerms 2. ~e is present in likeTerms already
Definition at line 2863 of file bitvector_theorem_producer.cpp.
References CVC3::BVNEG, d_theoryBitvector, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Expr::getOpKind(), and CVC3::TheoryBitvector::newBVNegExpr().
Referenced by bitwiseFlatten().
c1@c2@...@cn = c (concatenation of constant bitvectors)
Implements CVC3::BitvectorProofRules.
Definition at line 2935 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::TheoryBitvector::getBVConstSize(), CVC3::TheoryBitvector::getBVConstValue(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Flatten one level of nested concatenation, e.g.: x@(y@z)@w = x@y@z@w.
Implements CVC3::BitvectorProofRules.
Definition at line 2957 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Merge n-ary concat. of adjacent extractions: x[15:8]@x[7:0] = x[15:0].
Implements CVC3::BitvectorProofRules.
Definition at line 2979 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::arity(), CHECK_PROOFS, CHECK_SOUND, CVC3::CONCAT, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::EXTRACT, CVC3::TheoryBitvector::getExtractHi(), CVC3::TheoryBitvector::getExtractLow(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
BVPLUS(n, c1,c2,...,cn) = c (bit-vector plus of constant bitvectors).
Implements CVC3::BitvectorProofRules.
Definition at line 3030 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::begin(), CVC3::BVPLUS, CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::end(), CVC3::TheoryBitvector::getBVPlusParam(), CVC3::Expr::getOpKind(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::TheoremProducer::withProof().
n*c1 = c, where n >= 0 (multiplication of a constant bitvector by a non-negative constant)
Implements CVC3::BitvectorProofRules.
Definition at line 3069 of file bitvector_theorem_producer.cpp.
References CVC3::BVMULT, CVC3::TheoryBitvector::BVSize(), CHECK_PROOFS, CHECK_SOUND, CVC3::TheoryBitvector::computeBVConst(), constantKids(), d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::TheoryBitvector::newBVConstExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newRWTheorem(), CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
|- t=0 OR t=1 for any 1-bit bitvector t
Implements CVC3::BitvectorProofRules.
Definition at line 4016 of file bitvector_theorem_producer.cpp.
References CVC3::BITVECTOR, bvOne(), CVC3::TheoryBitvector::BVSize(), bvZero(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Assumptions::emptyAssump(), CVC3::Expr::eqExpr(), CVC3::Theory::getBaseType(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newTheorem(), and CVC3::TheoremProducer::withProof().
Expand the type predicate wrapper (compute the actual type predicate).
Implements CVC3::BitvectorProofRules.
Definition at line 4033 of file bitvector_theorem_producer.cpp.
References CVC3::andExpr(), bvOne(), CVC3::BVTYPEPRED, bvZero(), CHECK_PROOFS, CHECK_SOUND, d_theoryBitvector, CVC3::Theory::falseExpr(), CVC3::Theorem::getAssumptionsRef(), CVC3::TheoryBitvector::getBitvectorTypeParam(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), CVC3::Expr::getOpKind(), CVC3::Theorem::getProof(), CVC3::TheoryBitvector::getTypePredExpr(), CVC3::TheoryBitvector::getTypePredType(), CVC3::TheoryBitvector::newBVExtractExpr(), CVC3::TheoremProducer::newPf(), CVC3::TheoremProducer::newTheorem(), CVC3::NOT, CVC3::Expr::toString(), and CVC3::TheoremProducer::withProof().
Create Expr from Rational (for convenience)
Definition at line 512 of file bitvector_theorem_producer.h.
References CVC3::TheoremProducer::d_em, and CVC3::ExprManager::newRatExpr().
Referenced by andOne(), andZero(), bitExtractBitwise(), bitExtractBVMult(), bitExtractBVPlus(), bitExtractBVPlusPreComputed(), bitExtractConcatenation(), bitExtractConstant(), bitExtractConstBVMult(), bitExtractExtraction(), bitExtractFixedLeftShift(), bitExtractFixedRightShift(), bitExtractNot(), bitExtractSXRule(), bitwiseConcat(), bitwiseConst(), computeCarryPreComputed(), constMultToPlus(), orOne(), orZero(), and zeroPaddingRule().
Expr BitvectorTheoremProducer::computeCarry | ( | const std::vector< Theorem > & | t1BitExtractThms, | |
const std::vector< Theorem > & | t2BitExtractThms, | |||
int | bitPos | |||
) |
t1BitExtractThms | : input1 is vector of bitblasts of t1, from bit i-1 to 0 | |
t2BitExtractThms | : input2 is vector of bitblasts of t2, from bit i-1 to 0 | |
bitPos | : input3 is extracted * bitposition |
Definition at line 1247 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::andExpr(), DebugAssert, and CVC3::orExpr().
Referenced by bitExtractBVPlus().
Expr BitvectorTheoremProducer::computeCarryPreComputed | ( | const Theorem & | t1_i, | |
const Theorem & | t2_i, | |||
int | bitPos, | |||
int | precomputedFlag | |||
) |
compute carryout of the current bits and cache them, and return
Definition at line 1348 of file bitvector_theorem_producer.cpp.
References CVC3::Expr::andExpr(), CVC3::TheoryBitvector::d_bvPlusCarryCacheLeftBV, CVC3::TheoryBitvector::d_bvPlusCarryCacheRightBV, d_theoryBitvector, DebugAssert, CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), CVC3::orExpr(), CVC3::Expr::orExpr(), and rat().
Referenced by bitExtractBVPlusPreComputed().
Definition at line 44 of file bitvector_theorem_producer.h.
Referenced by andOne(), andZero(), bitBlastDisEqnRule(), bitBlastEqnRule(), bitExtractBitwise(), bitExtractBVMult(), bitExtractBVPlus(), bitExtractBVPlusPreComputed(), bitExtractConcatenation(), bitExtractConstant(), bitExtractConstBVMult(), bitExtractExtraction(), bitExtractFixedLeftShift(), bitExtractFixedRightShift(), bitExtractNot(), bitExtractRewrite(), bitExtractSXRule(), bitExtractToExtract(), bitvectorFalseRule(), BitvectorTheoremProducer(), bitvectorTrueRule(), bitwiseConcat(), bitwiseConst(), bitwiseFlatten(), bvConstIneqn(), bvConstMultAssocRule(), bvMultAssocRule(), bvmultBVUminus(), bvmultConst(), bvMultDistRule(), bvPlusAssociativityRule(), bvplusConst(), bvplusZeroConcatRule(), bvuminusBVConst(), bvuminusBVMult(), bvuminusToBVPlus(), bvuminusVar(), collectLikeTermsOfPlus(), collectOneTermOfPlus(), combineLikeTermsRule(), computeCarryPreComputed(), concatConst(), concatMergeExtract(), constMultToPlus(), constWidthLeftShiftToConcat(), createNewPlusCollection(), eqConst(), eqToBits(), expandTypePred(), extractBitwise(), extractBVMult(), extractBVPlus(), extractConcat(), extractConst(), extractExtract(), extractWhole(), flattenBVPlus(), flipBVMult(), generalIneqn(), iteBVnegRule(), iteExtractRule(), leftShiftToConcat(), lhsEqRhsIneqn(), lhsMinusRhsRule(), negBVand(), negBVor(), negBVxnor(), negBVxor(), negConcat(), negConst(), notBVLTRule(), oneCoeffBVMult(), orOne(), orZero(), pad(), padBVLTRule(), padBVMult(), padBVPlus(), padBVSLTRule(), rewriteBVSub(), rewriteNAND(), rewriteNOR(), rewriteXNOR(), rewriteXOR(), rightShiftToConcat(), sameKidCheck(), signBVLTRule(), signExtendRule(), sumNormalizedElements(), typePredBit(), zeroCoeffBVMult(), zeroLeq(), and zeroPaddingRule().
Expr CVC3::BitvectorTheoremProducer::d_bvZero [private] |
Constant 1-bit bit-vector 0bin0.
instance of bitvector DP
Definition at line 46 of file bitvector_theorem_producer.h.
Referenced by BitvectorTheoremProducer(), and bvZero().
Expr CVC3::BitvectorTheoremProducer::d_bvOne [private] |
Constant 1-bit bit-vector 0bin1.
Definition at line 48 of file bitvector_theorem_producer.h.
Referenced by BitvectorTheoremProducer(), and bvOne().