CVC3
2.4.1
|
Theory of bitvectors of known length \ (operations include: @,[i:j],[i],+,.,BVAND,BVNEG) More...
#include <theory_bitvector.h>
Public Member Functions | |
Theorem | pushNegationRec (const Expr &e) |
TheoryBitvector (TheoryCore *core) | |
~TheoryBitvector () | |
BitvectorProofRules * | createProofRules () |
void | addSharedTerm (const Expr &e) |
Notify theory of a new shared term. More... | |
void | assertFact (const Theorem &e) |
Assert a new fact to the decision procedure. More... | |
void | assertTypePred (const Expr &e, const Theorem &pred) |
Receives all the type predicates for the types of the given theory. More... | |
void | checkSat (bool fullEffort) |
Check for satisfiability in the theory. More... | |
Theorem | rewrite (const Expr &e) |
Theory-specific rewrite rules. More... | |
Theorem | rewriteAtomic (const Expr &e) |
Theory-specific rewrites for atomic formulas. More... | |
void | setup (const Expr &e) |
Set up the term e for call-backs when e or its children change. More... | |
void | update (const Theorem &e, const Expr &d) |
Notify a theory of a new equality. More... | |
Theorem | solve (const Theorem &e) |
An optional solver. More... | |
void | checkType (const Expr &e) |
Check that e is a valid Type expr. More... | |
Cardinality | finiteTypeInfo (Expr &e, Unsigned &n, bool enumerate, bool computeSize) |
Compute information related to finiteness of types. More... | |
void | computeType (const Expr &e) |
Compute and store the type of e. More... | |
void | computeModelTerm (const Expr &e, std::vector< Expr > &v) |
Add variables from 'e' to 'v' for constructing a concrete model. More... | |
void | computeModel (const Expr &e, std::vector< Expr > &vars) |
Compute the value of a compound variable from the more primitive ones. More... | |
Expr | computeTypePred (const Type &t, const Expr &e) |
Theory specific computation of the subtyping predicate for type t applied to the expression e. More... | |
Expr | computeTCC (const Expr &e) |
Compute and cache the TCC of e. More... | |
ExprStream & | print (ExprStream &os, const Expr &e) |
Theory-specific pretty-printing. More... | |
Expr | parseExprOp (const Expr &e) |
Theory-specific parsing implemented by the DP. More... | |
int | BVSize (const Expr &e) |
Return the number of bits in the bitvector expression. More... | |
Expr | rat (const Rational &r) |
Expr | pad (int len, const Expr &e) |
pads e to be of length len More... | |
bool | comparebv (const Expr &e1, const Expr &e2) |
Type | newBitvectorType (int i) |
Expr | newBitvectorTypePred (const Type &t, const Expr &e) |
Expr | newBitvectorTypeExpr (int i) |
Expr | newBVAndExpr (const Expr &t1, const Expr &t2) |
Expr | newBVAndExpr (const std::vector< Expr > &kids) |
Expr | newBVOrExpr (const Expr &t1, const Expr &t2) |
Expr | newBVOrExpr (const std::vector< Expr > &kids) |
Expr | newBVXorExpr (const Expr &t1, const Expr &t2) |
Expr | newBVXorExpr (const std::vector< Expr > &kids) |
Expr | newBVXnorExpr (const Expr &t1, const Expr &t2) |
Expr | newBVXnorExpr (const std::vector< Expr > &kids) |
Expr | newBVNandExpr (const Expr &t1, const Expr &t2) |
Expr | newBVNorExpr (const Expr &t1, const Expr &t2) |
Expr | newBVCompExpr (const Expr &t1, const Expr &t2) |
Expr | newBVLTExpr (const Expr &t1, const Expr &t2) |
Expr | newBVLEExpr (const Expr &t1, const Expr &t2) |
Expr | newSXExpr (const Expr &t1, int len) |
Expr | newBVIndexExpr (int kind, const Expr &t1, int len) |
Expr | newBVSLTExpr (const Expr &t1, const Expr &t2) |
Expr | newBVSLEExpr (const Expr &t1, const Expr &t2) |
Expr | newBVNegExpr (const Expr &t1) |
Expr | newBVUminusExpr (const Expr &t1) |
Expr | newBoolExtractExpr (const Expr &t1, int r) |
Expr | newFixedLeftShiftExpr (const Expr &t1, int r) |
Expr | newFixedConstWidthLeftShiftExpr (const Expr &t1, int r) |
Expr | newFixedRightShiftExpr (const Expr &t1, int r) |
Expr | newConcatExpr (const Expr &t1, const Expr &t2) |
Expr | newConcatExpr (const Expr &t1, const Expr &t2, const Expr &t3) |
Expr | newConcatExpr (const std::vector< Expr > &kids) |
Expr | newBVConstExpr (const std::string &s, int base=2) |
Expr | newBVConstExpr (const std::vector< bool > &bits) |
Expr | signed_newBVConstExpr (Rational c, int bv_size) |
Expr | newBVConstExpr (const Rational &r, int len=0) |
Expr | newBVZeroString (int r) |
produces a string of 0's of length bvLength More... | |
Expr | newBVOneString (int r) |
produces a string of 1's of length bvLength More... | |
Expr | newBVExtractExpr (const Expr &e, int hi, int low) |
hi and low are bit indices More... | |
Expr | newBVSubExpr (const Expr &t1, const Expr &t2) |
Expr | newBVPlusExpr (int numbits, const Expr &k1, const Expr &k2) |
'numbits' is the number of bits in the result More... | |
Expr | newBVPlusExpr (int numbits, const std::vector< Expr > &k) |
'numbits' is the number of bits in the result More... | |
Expr | newBVPlusPadExpr (int bvLength, const std::vector< Expr > &k) |
pads children and then builds plus expr More... | |
Expr | newBVMultExpr (int bvLength, const Expr &t1, const Expr &t2) |
Expr | newBVMultExpr (int bvLength, const std::vector< Expr > &kids) |
Expr | newBVMultPadExpr (int bvLength, const Expr &t1, const Expr &t2) |
Expr | newBVMultPadExpr (int bvLength, const std::vector< Expr > &kids) |
Expr | newBVUDivExpr (const Expr &t1, const Expr &t2) |
Expr | newBVURemExpr (const Expr &t1, const Expr &t2) |
Expr | newBVSDivExpr (const Expr &t1, const Expr &t2) |
Expr | newBVSRemExpr (const Expr &t1, const Expr &t2) |
Expr | newBVSModExpr (const Expr &t1, const Expr &t2) |
int | getBitvectorTypeParam (const Expr &e) |
int | getBitvectorTypeParam (const Type &t) |
Type | getTypePredType (const Expr &tp) |
const Expr & | getTypePredExpr (const Expr &tp) |
int | getSXIndex (const Expr &e) |
int | getBVIndex (const Expr &e) |
int | getBoolExtractIndex (const Expr &e) |
int | getFixedLeftShiftParam (const Expr &e) |
int | getFixedRightShiftParam (const Expr &e) |
int | getExtractHi (const Expr &e) |
int | getExtractLow (const Expr &e) |
int | getBVPlusParam (const Expr &e) |
int | getBVMultParam (const Expr &e) |
unsigned | getBVConstSize (const Expr &e) |
bool | getBVConstValue (const Expr &e, int i) |
Rational | computeBVConst (const Expr &e) |
computes the integer value of a bitvector constant More... | |
Rational | computeNegBVConst (const Expr &e) |
computes the integer value of ~c+1 or BVUMINUS(c) More... | |
int | getMaxSize () |
bool | isLinearTerm (const Expr &e) |
void | extract_vars (const Expr &e, std::vector< Expr > &vars) |
bool | canSolveFor (const Expr &term, const Expr &e) |
Rational | multiplicative_inverse (Rational r, int n_bits) |
![]() | |
Theory (TheoryCore *theoryCore, const std::string &name) | |
Whether theory has been used (for smtlib translator) More... | |
virtual | ~Theory (void) |
Destructor. More... | |
ExprManager * | getEM () |
Access to ExprManager. More... | |
TheoryCore * | theoryCore () |
Get a pointer to theoryCore. More... | |
CommonProofRules * | getCommonRules () |
Get a pointer to common proof rules. More... | |
const std::string & | getName () const |
Get the name of the theory (for debugging purposes) More... | |
virtual void | setUsed () |
Set the "used" flag on this theory (for smtlib translator) More... | |
virtual bool | theoryUsed () |
Get whether theory has been used (for smtlib translator) More... | |
virtual Theorem | theoryPreprocess (const Expr &e) |
Theory-specific preprocessing. More... | |
virtual void | checkAssertEqInvariant (const Theorem &e) |
A debug check used by the primary solver. More... | |
virtual Type | computeBaseType (const Type &tp) |
Compute the base type of the top-level operator of an arbitrary type. More... | |
virtual void | refineCounterExample () |
Process disequalities from the arrangement for model generation. More... | |
virtual void | computeModelBasic (const std::vector< Expr > &v) |
Assign concrete values to basic-type variables in v. More... | |
virtual void | notifyInconsistent (const Theorem &thm) |
Notification of conflict. More... | |
virtual void | registerAtom (const Expr &e, const Theorem &thm) |
virtual void | registerAtom (const Expr &e) |
Theory-specific registration of atoms. More... | |
virtual bool | inconsistent () |
Check if the current context is inconsistent. More... | |
virtual void | setInconsistent (const Theorem &e) |
Make the context inconsistent; The formula proved by e must FALSE. More... | |
virtual void | setIncomplete (const std::string &reason) |
Mark the current decision branch as possibly incomplete. More... | |
virtual Theorem | simplify (const Expr &e) |
Simplify a term e and return a Theorem(e==e') More... | |
Expr | simplifyExpr (const Expr &e) |
Simplify a term e w.r.t. the current context. More... | |
virtual void | enqueueFact (const Theorem &e) |
Submit a derived fact to the core from a decision procedure. More... | |
virtual void | enqueueSE (const Theorem &e) |
Check if the current context is inconsistent. More... | |
virtual void | assertEqualities (const Theorem &e) |
Handle new equalities (usually asserted through addFact) More... | |
virtual Expr | parseExpr (const Expr &e) |
Parse the generic expression. More... | |
virtual void | assignValue (const Expr &t, const Expr &val) |
Assigns t a concrete value val. Used in model generation. More... | |
virtual void | assignValue (const Theorem &thm) |
Record a derived assignment to a variable (LHS). More... | |
void | registerKinds (Theory *theory, std::vector< int > &kinds) |
Register new kinds with the given theory. More... | |
void | unregisterKinds (Theory *theory, std::vector< int > &kinds) |
Unregister kinds for a theory. More... | |
void | registerTheory (Theory *theory, std::vector< int > &kinds, bool hasSolver=false) |
Register a new theory. More... | |
void | unregisterTheory (Theory *theory, std::vector< int > &kinds, bool hasSolver) |
Unregister a theory. More... | |
int | getNumTheories () |
Return the number of registered theories. More... | |
bool | hasTheory (int kind) |
Test whether a kind maps to any theory. More... | |
Theory * | theoryOf (int kind) |
Return the theory associated with a kind. More... | |
Theory * | theoryOf (const Type &e) |
Return the theory associated with a type. More... | |
Theory * | theoryOf (const Expr &e) |
Return the theory associated with an Expr. More... | |
Theorem | find (const Expr &e) |
Return the theorem that e is equal to its find. More... | |
const Theorem & | findRef (const Expr &e) |
Return the find as a reference: expr must have a find. More... | |
Theorem | findReduce (const Expr &e) |
Return find-reduced version of e. More... | |
bool | findReduced (const Expr &e) |
Return true iff e is find-reduced. More... | |
Expr | findExpr (const Expr &e) |
Return the find of e, or e if it has no find. More... | |
Expr | getTCC (const Expr &e) |
Compute the TCC of e, or the subtyping predicate, if e is a type. More... | |
Type | getBaseType (const Expr &e) |
Compute (or look up in cache) the base type of e and return the result. More... | |
Type | getBaseType (const Type &tp) |
Compute the base type from an arbitrary type. More... | |
Expr | getTypePred (const Type &t, const Expr &e) |
Calls the correct theory to compute a type predicate. More... | |
Theorem | updateHelper (const Expr &e) |
Update the children of the term e. More... | |
void | setupCC (const Expr &e) |
Setup a term for congruence closure (must have sig and rep attributes) More... | |
void | updateCC (const Theorem &e, const Expr &d) |
Update a term w.r.t. congruence closure (must be setup with setupCC()) More... | |
Theorem | rewriteCC (const Expr &e) |
Rewrite a term w.r.t. congruence closure (must be setup with setupCC()) More... | |
void | getModelTerm (const Expr &e, std::vector< Expr > &v) |
Calls the correct theory to get all of the terms that need to be assigned values in the concrete model. More... | |
Theorem | getModelValue (const Expr &e) |
Fetch the concrete assignment to the variable during model generation. More... | |
void | addSplitter (const Expr &e, int priority=0) |
Suggest a splitter to the SearchEngine. More... | |
void | addGlobalLemma (const Theorem &thm, int priority=0) |
Add a global lemma. More... | |
bool | isLeaf (const Expr &e) |
Test if e is an i-leaf term for the current theory. More... | |
bool | isLeafIn (const Expr &e1, const Expr &e2) |
Test if e1 is an i-leaf in e2. More... | |
bool | leavesAreSimp (const Expr &e) |
Test if all i-leaves of e are simplified. More... | |
Type | boolType () |
Return BOOLEAN type. More... | |
const Expr & | falseExpr () |
Return FALSE Expr. More... | |
const Expr & | trueExpr () |
Return TRUE Expr. More... | |
Expr | newVar (const std::string &name, const Type &type) |
Create a new variable given its name and type. More... | |
Expr | newVar (const std::string &name, const Type &type, const Expr &def) |
Create a new named expression given its name, type, and definition. More... | |
Op | newFunction (const std::string &name, const Type &type, bool computeTransClosure) |
Create a new uninterpreted function. More... | |
Op | lookupFunction (const std::string &name, Type *type) |
Look up a function by name. More... | |
Op | newFunction (const std::string &name, const Type &type, const Expr &def) |
Create a new defined function. More... | |
Expr | addBoundVar (const std::string &name, const Type &type) |
Create and add a new bound variable to the stack, for parseExprOp(). More... | |
Expr | addBoundVar (const std::string &name, const Type &type, const Expr &def) |
Create and add a new bound named def to the stack, for parseExprOp(). More... | |
Expr | lookupVar (const std::string &name, Type *type) |
Lookup variable and return it and its type. Return NULL Expr if it doesn't exist yet. More... | |
Type | newTypeExpr (const std::string &name) |
Create a new uninterpreted type with the given name. More... | |
Type | lookupTypeExpr (const std::string &name) |
Lookup type by name. Return Null if no such type exists. More... | |
Type | newTypeExpr (const std::string &name, const Type &def) |
Create a new type abbreviation with the given name. More... | |
Type | newSubtypeExpr (const Expr &pred, const Expr &witness) |
Create a new subtype expression. More... | |
Expr | resolveID (const std::string &name) |
Resolve an identifier, for use in parseExprOp() More... | |
void | installID (const std::string &name, const Expr &e) |
Install name as a new identifier associated with Expr e. More... | |
Theorem | typePred (const Expr &e) |
Return BOOLEAN type. More... | |
Theorem | reflexivityRule (const Expr &a) |
==> a == a More... | |
Theorem | symmetryRule (const Theorem &a1_eq_a2) |
a1 == a2 ==> a2 == a1 More... | |
Theorem | transitivityRule (const Theorem &a1_eq_a2, const Theorem &a2_eq_a3) |
(a1 == a2) & (a2 == a3) ==> (a1 == a3) More... | |
Theorem | substitutivityRule (const Op &op, const std::vector< Theorem > &thms) |
(c_1 == d_1) & ... & (c_n == d_n) ==> op(c_1,...,c_n) == op(d_1,...,d_n) More... | |
Theorem | substitutivityRule (const Expr &e, const Theorem &t) |
Special case for unary operators. More... | |
Theorem | substitutivityRule (const Expr &e, const Theorem &t1, const Theorem &t2) |
Special case for binary operators. More... | |
Theorem | substitutivityRule (const Expr &e, const std::vector< unsigned > &changed, const std::vector< Theorem > &thms) |
Optimized: only positions which changed are included. More... | |
Theorem | substitutivityRule (const Expr &e, int changed, const Theorem &thm) |
Optimized: only a single position changed. More... | |
Theorem | iffMP (const Theorem &e1, const Theorem &e1_iff_e2) |
e1 AND (e1 IFF e2) ==> e2 More... | |
Theorem | rewriteAnd (const Expr &e) |
==> AND(e1,e2) IFF [simplified expr] More... | |
Theorem | rewriteOr (const Expr &e) |
==> OR(e1,...,en) IFF [simplified expr] More... | |
Theorem | rewriteIte (const Expr &e) |
Derived rule for rewriting ITE. More... | |
Theorem | renameExpr (const Expr &e) |
Derived rule to create a new name for an expression. More... | |
Public Attributes | |
ExprMap< Expr > | d_bvPlusCarryCacheLeftBV |
ExprMap< Expr > | d_bvPlusCarryCacheRightBV |
std::vector< Theorem > | additionalRewriteConstraints |
Private Member Functions | |
const Expr & | bvZero () const |
Return cached constant 0bin0. More... | |
const Expr & | bvOne () const |
Return cached constant 0bin1. More... | |
Theorem | bitBlastEqn (const Expr &e) |
functions which implement the DP strategy for bitblasting More... | |
Theorem | bitBlastDisEqn (const Theorem ¬E) |
bitblast disequation More... | |
Theorem | bitBlastIneqn (const Expr &e) |
function which implements the DP strtagey to bitblast Inequations More... | |
Theorem | bitBlastTerm (const Expr &t, int bitPosition) |
functions which implement the DP strategy for bitblasting More... | |
Theorem | pushNegation (const Expr &e) |
virtual Theorem | simplifyOp (const Expr &e) |
Top down simplifier. More... | |
Theorem | rewriteBV (const Expr &e, ExprMap< Theorem > &cache, int n=1) |
Internal rewrite method for constants. More... | |
Theorem | rewriteBV (const Expr &e, int n=1) |
Rewrite children 'n' levels down (n==1 means "only the top level") More... | |
Theorem | rewriteBV (const Theorem &t, ExprMap< Theorem > &cache, int n=1) |
Theorem | rewriteBV (const Theorem &t, int n=1) |
Theorem | rewriteBoolean (const Expr &e) |
rewrite input boolean expression e to a simpler form More... | |
Expr | multiply_coeff (Rational mult_inv, const Expr &e) |
int | min (std::vector< Rational > list) |
Rational | Odd_coeff (const Expr &e) |
int | check_linear (const Expr &e) |
bool | isTermIn (const Expr &e1, const Expr &e2) |
Theorem | updateSubterms (const Expr &d) |
int | countTermIn (const Expr &term, const Expr &e) |
Theorem | simplifyPendingEq (const Theorem &thm, int maxEffort) |
Theorem | generalBitBlast (const Theorem &thm) |
ExprStream & | printSmtLibShared (ExprStream &os, const Expr &e) |
Private Attributes | |
BitvectorProofRules * | d_rules |
size_t | d_bvConstExprIndex |
MemoryManager index for BVConstExpr subclass. More... | |
size_t | d_bvPlusExprIndex |
size_t | d_bvParameterExprIndex |
size_t | d_bvTypePredExprIndex |
StatCounter | d_bvDelayEq |
counts delayed asserted equalities More... | |
StatCounter | d_bvAssertEq |
counts asserted equalities More... | |
StatCounter | d_bvDelayDiseq |
counts delayed asserted disequalities More... | |
StatCounter | d_bvAssertDiseq |
counts asserted disequalities More... | |
StatCounter | d_bvTypePreds |
counts type predicates More... | |
StatCounter | d_bvDelayTypePreds |
counts delayed type predicates More... | |
StatCounter | d_bvBitBlastEq |
counts bitblasted equalities More... | |
StatCounter | d_bvBitBlastDiseq |
counts bitblasted disequalities More... | |
const bool * | d_booleanRWFlag |
boolean on the fly rewrite flag More... | |
const bool * | d_boolExtractCacheFlag |
bool extract cache flag More... | |
const bool * | d_bv32Flag |
flag which indicates that all arithmetic is 32 bit with no overflow More... | |
CDMap< Expr, Theorem > | d_bitvecCache |
Cache for storing the results of the bitBlastTerm function. More... | |
ExprMap< Theorem > | d_pushNegCache |
Cache for pushNegation(). it is ok that this is cache is. More... | |
CDList< Theorem > | d_eq |
Backtracking queue for equalities. More... | |
CDList< Theorem > | d_eqPending |
Backtracking queue for unsolved equalities. More... | |
CDO< unsigned int > | d_eq_index |
Index to current position in d_eqPending. More... | |
CDList< Theorem > | d_bitblast |
Backtracking queue for all other assertions. More... | |
CDO< unsigned int > | d_bb_index |
Index to current position in d_bitblast. More... | |
CDMap< Expr, Expr > | d_sharedSubterms |
Backtracking database of subterms of shared terms. More... | |
CDList< Expr > | d_sharedSubtermsList |
Backtracking database of subterms of shared terms. More... | |
Expr | d_bvZero |
Constant 1-bit bit-vector 0bin0. More... | |
Expr | d_bvOne |
Constant 1-bit bit-vector 0bin0. More... | |
int | d_maxLength |
Max size of any bitvector we've seen. More... | |
CDO< unsigned > | d_index1 |
Used in checkSat. More... | |
CDO< unsigned > | d_index2 |
Additional Inherited Members | |
![]() | |
bool | d_theoryUsed |
Theory of bitvectors of known length \ (operations include: @,[i:j],[i],+,.,BVAND,BVNEG)
Author: Vijay Ganesh
Created:Wed May 5 15:35:07 PDT 2004
Definition at line 100 of file theory_bitvector.h.
TheoryBitvector::TheoryBitvector | ( | TheoryCore * | core | ) |
Definition at line 1708 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVTOINT, CVC3::BVTYPEPRED, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::BVZEROEXTEND, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, createProofRules(), d_bvConstExprIndex, d_bvOne, d_bvZero, d_rules, CVC3::EXTRACT, CVC3::Theory::getEM(), CVC3::INTTOBV, CVC3::LEFTSHIFT, newBVConstExpr(), CVC3::ExprManager::newKind(), CVC3::ExprManager::registerSubclass(), CVC3::Theory::registerTheory(), CVC3::RIGHTSHIFT, and CVC3::SX.
TheoryBitvector::~TheoryBitvector | ( | ) |
Definition at line 1842 of file theory_bitvector.cpp.
References d_rules.
|
inlineprivate |
Return cached constant 0bin0.
Definition at line 160 of file theory_bitvector.h.
References d_bvZero.
|
inlineprivate |
Return cached constant 0bin1.
Definition at line 162 of file theory_bitvector.h.
References d_bvOne.
functions which implement the DP strategy for bitblasting
accepts a bitvector equation t1 = t2.
Definition at line 91 of file theory_bitvector.cpp.
References AND, CVC3::BITVECTOR, DebugAssert, CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), IF_DEBUG, IFF, CVC3::Expr::isEq(), CVC3::Expr::isFalse(), CVC3::Expr::toString(), and TRACE.
Referenced by comparebv(), and generalBitBlast().
bitblast disequation
accepts a bitvector equation t1 != t2.
A separate rule for disequations for efficiency sake. Obvious implementation using rule for equations and rule for NOT, is not efficient.
Definition at line 164 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Theorem::getExpr(), CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), CVC3::Expr::getType(), IF_DEBUG, IFF, CVC3::Expr::isNot(), CVC3::Expr::isTrue(), OR, CVC3::Theorem::toString(), CVC3::Expr::toString(), and TRACE.
Referenced by generalBitBlast().
function which implements the DP strtagey to bitblast Inequations
e | has the form e1 pred e2, where pred is < or <=. |
if e1,e2 are constants, determine bv2int(e1) pred bv2int(e2).
most significant bit of ei is denoted by msb(ei)
Definition at line 240 of file theory_bitvector.cpp.
References AND, CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVLE, CVC3::BVLT, DebugAssert, CVC3::Expr::getKind(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::isBoolConst(), OR, CVC3::Theorem::toString(), CVC3::Expr::toString(), and TRACE.
Referenced by generalBitBlast().
functions which implement the DP strategy for bitblasting
The invariant maintained by this function is: accepts a bitvector term, t,and a bitPosition, i. returns a formula over the set of propositional variables defined using BOOLEXTRACT of bitvector variables in t at the position i.
Definition at line 359 of file theory_bitvector.cpp.
References AND, CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::BVAND, CVC3::BVASHR, CVC3::BVCONST, CVC3::BVLSHR, CVC3::BVMULT, CVC3::BVNEG, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVSHL, CVC3::BVXOR, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, DebugAssert, CVC3::Expr::end(), CVC3::EXTRACT, FatalAssert, CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::getType(), IF_DEBUG, CVC3::int2string(), CVC3::Theorem::isNull(), CVC3::leExpr(), NOT, OR, CVC3::Theorem::toString(), CVC3::Expr::toString(), TRACE, and XOR.
Referenced by comparebv().
Definition at line 699 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BVAND, CVC3::BVCONST, CVC3::BVMULT, CVC3::BVNEG, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVXNOR, CVC3::BVXOR, CVC3::CONCAT, DebugAssert, CVC3::Expr::end(), CVC3::Expr::getKind(), CVC3::Expr::getOp(), CVC3::Theorem::getRHS(), CVC3::Theorem::isRefl(), and TRACE.
Referenced by CVC3::BitvectorTheoremProducer::collectOneTermOfPlus(), and CVC3::BitvectorTheoremProducer::createNewPlusCollection().
Definition at line 804 of file theory_bitvector.cpp.
References CVC3::BVNEG, DebugAssert, and CVC3::Expr::getOpKind().
Top down simplifier.
Reimplemented from CVC3::Theory.
Definition at line 812 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BVMULT, CVC3::BVNEG, CVC3::BVPLUS, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, CVC3::EXTRACT, CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Theorem::isNull(), CVC3::LEFTSHIFT, and CVC3::RIGHTSHIFT.
|
private |
Internal rewrite method for constants.
Main rewrite method (implements the actual rewrites)
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. In general, the following rule is implemented. Step1: e0 <=(s) e1 <==> pad(e0) <=(s) pad(e1) Step2: pad(e0) <=(s) pad(e1) <==> (e0[n-1] AND NOT e1[n-1]) OR (e0[n-1] = e1[n-1] AND e0[n-2:0] <= e1[n-2:0])
Definition at line 887 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BOOLEXTRACT, CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::BVZEROEXTEND, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, constantKids(), DebugAssert, CVC3::ExprMap< Data >::end(), EQ, CVC3::EXTRACT, FatalAssert, CVC3::ExprMap< Data >::find(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::hasFind(), IF_DEBUG, CVC3::int2string(), CVC3::Theorem::isNull(), CVC3::Theorem::isRefl(), CVC3::LEFTSHIFT, NOT, CVC3::pow(), CVC3::RIGHTSHIFT, CVC3::Expr::setRewriteNormal(), CVC3::SX, CVC3::Expr::toString(), and TRACE.
Referenced by rewrite(), and rewriteBV().
Rewrite children 'n' levels down (n==1 means "only the top level")
Definition at line 1631 of file theory_bitvector.cpp.
|
inlineprivate |
Definition at line 218 of file theory_bitvector.h.
References CVC3::Theorem::getRHS(), rewriteBV(), and CVC3::Theory::transitivityRule().
Definition at line 221 of file theory_bitvector.h.
References CVC3::Theorem::getRHS(), rewriteBV(), and CVC3::Theory::transitivityRule().
rewrite input boolean expression e to a simpler form
Definition at line 1638 of file theory_bitvector.cpp.
References AND, CVC3::Expr::begin(), CVC3::Expr::end(), CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), IFF, CVC3::Expr::isNot(), CVC3::Theorem::isNull(), NOT, and OR.
Definition at line 1965 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::BVPLUS, BVSize(), computeBVConst(), EQ, CVC3::Expr::getOpKind(), CVC3::Expr::isEq(), CVC3::Theory::isLeaf(), newBVConstExpr(), newBVMultExpr(), and newBVPlusExpr().
|
private |
Definition at line 2178 of file theory_bitvector.cpp.
References CVC3::BVCONST, CVC3::BVMULT, CVC3::BVPLUS, BVSize(), computeBVConst(), DebugAssert, EQ, CVC3::Expr::getOpKind(), CVC3::Theory::isLeaf(), CVC3::Theory::isLeafIn(), isTermIn(), and newBVZeroString().
|
private |
Definition at line 2251 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, CVC3::BVMULT, CVC3::BVPLUS, CVC3::BVUMINUS, EQ, CVC3::Expr::getOpKind(), CVC3::Expr::isVar(), CVC3::PRESENTATION_LANG, CVC3::Expr::toString(), and TRACE.
Definition at line 2291 of file theory_bitvector.cpp.
References CVC3::Expr::begin(), CVC3::Expr::end(), and CVC3::Theory::theoryOf().
Referenced by Odd_coeff().
Definition at line 2791 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::Theory::find(), CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), CVC3::Theory::isLeaf(), rewrite(), CVC3::Theory::substitutivityRule(), and CVC3::Theory::transitivityRule().
Definition at line 2327 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BVCONST, and CVC3::Expr::getOpKind().
Referenced by canSolveFor().
Definition at line 2366 of file theory_bitvector.cpp.
References CVC3::BitvectorProofRules::canonBVEQ(), d_rules, DebugAssert, EQ, CVC3::Theory::find(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), CVC3::Theory::iffMP(), CVC3::Theory::isLeaf(), CVC3::Theorem::isRewrite(), rewrite(), CVC3::Theory::substitutivityRule(), CVC3::Theory::symmetryRule(), and CVC3::Theory::transitivityRule().
Referenced by checkSat(), and generalBitBlast().
Definition at line 2409 of file theory_bitvector.cpp.
References AND, CVC3::Expr::arity(), bitBlastDisEqn(), bitBlastEqn(), bitBlastIneqn(), CVC3::BVLE, CVC3::BVLT, CVC3::BitvectorProofRules::canonBVEQ(), d_rules, DebugAssert, EQ, FALSE_EXPR, FatalAssert, CVC3::Theory::find(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Theory::iffMP(), CVC3::Expr::isEq(), NOT, CVC3::Theory::reflexivityRule(), rewrite(), simplifyPendingEq(), CVC3::Theory::substitutivityRule(), CVC3::Theory::transitivityRule(), and TRUE_EXPR.
Referenced by checkSat().
|
private |
Definition at line 3429 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVTOINT, CVC3::BVTYPEPRED, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::CONCAT, CVC3::Theory::d_theoryUsed, DebugAssert, FatalAssert, getBVMultParam(), getBVPlusParam(), CVC3::Op::getExpr(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), CVC3::INTTOBV, CVC3::Expr::isApply(), pad(), CVC3::pop(), CVC3::Expr::printAST(), CVC3::push(), and CVC3::space().
Referenced by print().
BitvectorProofRules * TheoryBitvector::createProofRules | ( | ) |
Definition at line 45 of file bitvector_theorem_producer.cpp.
Referenced by TheoryBitvector().
|
virtual |
Notify theory of a new shared term.
When a term e associated with theory i occurs as a child of an expression associated with theory j, the framework calls i->addSharedTerm(e) and j->addSharedTerm(e)
Reimplemented from CVC3::Theory.
Definition at line 1850 of file theory_bitvector.cpp.
Referenced by assertTypePred(), and update().
|
virtual |
Assert a new fact to the decision procedure.
Each fact that makes it into the core framework is assigned to exactly one theory: the theory associated with that fact. assertFact is called to inform the theory that a new fact has been assigned to the theory.
Implements CVC3::Theory.
Definition at line 1861 of file theory_bitvector.cpp.
References assertTypePred(), CVC3::BOOLEXTRACT, CVC3::BVTYPEPRED, d_bb_index, d_bitblast, d_eq, d_eqPending, DebugAssert, EQ, CVC3::Theory::getCommonRules(), CVC3::Theorem::getExpr(), CVC3::Expr::getOpKind(), getTypePredExpr(), CVC3::Theory::isLeaf(), CVC3::Theory::isLeafIn(), NOT, CVC3::Theory::setInconsistent(), CVC3::Theory::theoryCore(), CVC3::Expr::toString(), TRACE, and CVC3::Theory::typePred().
Receives all the type predicates for the types of the given theory.
Type predicates may be expensive to enqueue eagerly, and DPs may choose to postpone them, or transform them to something more efficient. By default, the asserted type predicate is immediately enqueued as a new fact.
Note: Used only by bitvector theory.
e | is the expression for which the type predicate is computed |
pred | is the predicate theorem P(e) |
Reimplemented from CVC3::Theory.
Definition at line 1926 of file theory_bitvector.cpp.
References addSharedTerm(), CVC3::PRESENTATION_LANG, CVC3::Theory::theoryOf(), CVC3::Expr::toString(), and TRACE.
Referenced by assertFact().
|
virtual |
Check for satisfiability in the theory.
fullEffort | when it is false, checkSat can do as much or as little work as it likes, though simple inferences and checks for consistency should be done to increase efficiency. If fullEffort is true, checkSat must check whether the set of facts given by assertFact together with the arrangement of shared terms (provided by addSharedTerm) induced by the global find database equivalence relation are satisfiable. If satisfiable, checkSat does nothing. |
If satisfiability can be acheived by merging some of the shared terms, a new fact must be enqueued using enqueueFact (this fact need not be a literal). If there is no way to make things satisfiable, setInconsistent must be called.
Implements CVC3::Theory.
Definition at line 2574 of file theory_bitvector.cpp.
References additionalRewriteConstraints, AND, bvdump, BVSize(), d_bb_index, d_bitblast, d_eq, d_eq_index, d_eqPending, DebugAssert, std::endl(), CVC3::Theory::enqueueFact(), EQ, FALSE_EXPR, FatalAssert, generalBitBlast(), CVC3::Theory::getCommonRules(), CVC3::Theorem::getExpr(), CVC3::Expr::getKind(), newBVConstExpr(), CVC3::Theory::simplify(), simplifyPendingEq(), TRUE_EXPR, and CVC3::Theory::trueExpr().
Theory-specific rewrite rules.
By default, rewrite just returns a reflexive theorem stating that the input expression is equivalent to itself. However, rewrite is allowed to return any theorem which describes how the input expression is equivalent to some new expression. rewrite should be used to perform simplifications, normalization, and any other preprocessing on theory-specific expressions that needs to be done.
Reimplemented from CVC3::Theory.
Definition at line 2670 of file theory_bitvector.cpp.
References rewriteBV().
Referenced by generalBitBlast(), simplifyPendingEq(), and updateSubterms().
Theory-specific rewrites for atomic formulas.
The intended use is to convert complex atomic formulas into an equivalent Boolean combination of simpler formulas. Such conversion may be harmful for algebraic rewrites, and is not always desirable to have in rewrite() method.
Note: Used only by bitvector theory and rewriteLiteral in core.
However, if rewrite() alone cannot solve the problem, and the SAT solver needs to be envoked, these additional rewrites may ease the job for the SAT solver.
Reimplemented from CVC3::Theory.
Definition at line 2677 of file theory_bitvector.cpp.
References CVC3::Theory::reflexivityRule().
|
virtual |
Set up the term e for call-backs when e or its children change.
setup is called once for each expression associated with the theory. It is typically used to setup theory-specific data for an expression and to add call-back information for use with update.
Reimplemented from CVC3::Theory.
Definition at line 2683 of file theory_bitvector.cpp.
References CVC3::Expr::addToNotify(), CVC3::Expr::arity(), and CVC3::Expr::isTerm().
Notify a theory of a new equality.
update is a call-back used by the notify mechanism of the core theory. It works as follows. When an equation t1 = t2 makes it into the core framework, the two find equivalence classes for t1 and t2 are merged. The result is that t2 is the new equivalence class representative and t1 is no longer an equivalence class representative. When this happens, the notify list of t1 is traversed. Notify list entries consist of a theory and an expression d. For each entry (i,d), i->update(e, d) is called, where e is the theorem corresponding to the equality t1=t2.
To add the entry (i,d) to a term t1's notify list, a call must be made to t1.addNotify(i,d). This is typically done in setup.
Reimplemented from CVC3::Theory.
Definition at line 2695 of file theory_bitvector.cpp.
References addSharedTerm(), CVC3::Theory::assertEqualities(), CVC3::BVCONST, d_sharedSubterms, DebugAssert, CVC3::Theory::enqueueFact(), CVC3::Theory::find(), CVC3::Theorem::getExpr(), CVC3::Theorem::getLHS(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::hasFind(), CVC3::Theory::inconsistent(), CVC3::Expr::isAtomic(), CVC3::Expr::isNull(), CVC3::Theory::renameExpr(), CVC3::Theory::simplify(), CVC3::Theory::symmetryRule(), CVC3::Expr::toString(), and CVC3::Theory::transitivityRule().
An optional solver.
The solve method can be used to implement a Shostak-style solver. Since solvers do not in general combine, the following technique is used. One theory is designated as the primary solver (in our case, it is the theory of arithmetic). For each equation that enters the core framework, the primary solver is called to ensure that the equation is in solved form with respect to the primary theory.
After the primary solver, the solver for the theory associated with the equation is called. This solver can do whatever it likes, as long as the result is still in solved form with respect to the primary solver. This is a slight generalization of what is described in my (Clark)'s PhD thesis.
Reimplemented from CVC3::Theory.
Definition at line 2818 of file theory_bitvector.cpp.
References CVC3::CommonProofRules::andElim(), CVC3::BVCONST, CVC3::BitvectorProofRules::canonBVEQ(), d_rules, DebugAssert, CVC3::Theory::enqueueFact(), CVC3::EXTRACT, CVC3::Theory::getCommonRules(), CVC3::Theorem::getExpr(), CVC3::Theorem::getLHS(), IF_DEBUG, CVC3::Theory::iffMP(), CVC3::Theory::isLeaf(), CVC3::Theory::isLeafIn(), CVC3::Theorem::isRewrite(), CVC3::Expr::isTerm(), CVC3::BitvectorProofRules::processExtract(), CVC3::CommonProofRules::skolemize(), CVC3::BitvectorProofRules::solveExtractOverlap(), CVC3::BitvectorProofRules::solveExtractOverlapApplies(), and CVC3::Theory::symmetryRule().
|
virtual |
Check that e is a valid Type expr.
Reimplemented from CVC3::Theory.
Definition at line 2932 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, FatalAssert, CVC3::Theory::getEM(), and CVC3::Expr::getOpKind().
|
virtual |
Compute information related to finiteness of types.
Used by the TypeComputer defined in TheoryCore (theories should not call this funtion directly – they should use the methods in Type instead). Each theory should implement this if it contains any types that could be non-infinite.
Reimplemented from CVC3::Theory.
Definition at line 2945 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::CARD_FINITE, FatalAssert, getBitvectorTypeParam(), CVC3::Expr::getKind(), CVC3::Rational::getUnsigned(), CVC3::Rational::getUnsignedMP(), newBVConstExpr(), and CVC3::pow().
|
virtual |
Compute and store the type of e.
e | is the expression whose type is computed. |
This function computes the type of the top-level operator of e, and recurses into children using getType(), if necessary.
Reimplemented from CVC3::Theory.
Definition at line 2969 of file theory_bitvector.cpp.
References CVC3::Type::anyType(), CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::Theory::boolType(), CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, BVSize(), CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVTYPEPRED, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::BVZEROEXTEND, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, CVC3::Expr::end(), CVC3::EXTRACT, FatalAssert, CVC3::Theory::getBaseType(), getBoolExtractIndex(), getBVConstSize(), getBVIndex(), getBVMultParam(), getBVPlusParam(), CVC3::Theory::getEM(), CVC3::Type::getExpr(), getExtractHi(), getExtractLow(), getFixedLeftShiftParam(), getFixedRightShiftParam(), CVC3::Expr::getKind(), CVC3::Expr::getOpKind(), getSXIndex(), CVC3::Expr::getType(), CVC3::int2string(), CVC3::Expr::isApply(), CVC3::LEFTSHIFT, newBitvectorType(), newBitvectorTypeExpr(), CVC3::RIGHTSHIFT, CVC3::Expr::setType(), CVC3::SX, CVC3::Expr::toString(), and TRACE.
Add variables from 'e' to 'v' for constructing a concrete model.
If e is already of primitive type, do NOT add it to v.
Reimplemented from CVC3::Theory.
Definition at line 3296 of file theory_bitvector.cpp.
References CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BVAND, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSUB, CVC3::BVUMINUS, CVC3::BVXNOR, CVC3::BVXOR, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, CVC3::Expr::end(), CVC3::EXTRACT, getBitvectorTypeParam(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::LEFTSHIFT, newBoolExtractExpr(), and CVC3::RIGHTSHIFT.
Compute the value of a compound variable from the more primitive ones.
The more primitive variables for e are already assigned concrete values, and are available through getModelValue().
The new value for e must be assigned using assignValue() method.
e | is the compound type expression to assign a value; |
vars | are the variables actually assigned. Normally, 'e' is the only element of vars. However, e.g. in the case of uninterpreted functions, assigning 'f' means assigning all relevant applications of 'f' to constant values (f(0), f(5), etc.). Such applications might not be known before the model is constructed (they may be of the form f(x), f(y+z), etc., where x,y,z are still unassigned). |
Populating 'vars' is an opportunity for a DP to change the set of top-level "variables" to assign, if needed. In particular, it may drop 'e' from the model entirely, if it is already a concrete value by itself.
Reimplemented from CVC3::Theory.
Definition at line 3345 of file theory_bitvector.cpp.
References CVC3::Theory::assignValue(), CVC3::BITVECTOR, CVC3::BVAND, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSUB, CVC3::BVUMINUS, CVC3::BVXNOR, CVC3::BVXOR, CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, DebugAssert, CVC3::EXTRACT, FatalAssert, getBitvectorTypeParam(), CVC3::Theorem::getExpr(), CVC3::Theory::getModelValue(), CVC3::Expr::getOpKind(), CVC3::Theorem::getRHS(), CVC3::Expr::getType(), CVC3::Expr::isBoolConst(), CVC3::Expr::isTrue(), CVC3::LEFTSHIFT, newBoolExtractExpr(), newBVConstExpr(), CVC3::RIGHTSHIFT, CVC3::Theory::simplify(), CVC3::SX, and CVC3::Expr::toString().
Theory specific computation of the subtyping predicate for type t applied to the expression e.
By default returns true. Each theory needs to compute subtype predicates for the types associated with it. So, for example, the theory of records will take a record type [# f1: T1, f2: T2 #] and an expression e and will return the subtyping predicate for e, namely: computeTypePred(T1, e.f1) AND computeTypePred(T2, e.f2)
Reimplemented from CVC3::Theory.
Definition at line 3411 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Expr::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Type::toString(), and CVC3::ExprManager::trueExpr().
Compute and cache the TCC of e.
e | is an expression (term or formula). This function computes the TCC of e which is true iff the expression is defined. |
This function computes the TCC or predicate of the top-level operator of e, and recurses into children using getTCC(), if necessary.
The default implementation is to compute TCCs recursively for all children, and return their conjunction.
Reimplemented from CVC3::Theory.
Definition at line 5570 of file theory_bitvector.cpp.
References CVC3::Expr::andExpr(), CVC3::andExpr(), CVC3::Expr::arity(), CVC3::BVSDIV, BVSize(), CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVUDIV, CVC3::BVUREM, DebugAssert, CVC3::Expr::eqExpr(), CVC3::ExprMap< Data >::find(), CVC3::Theory::getCommonRules(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Theory::getTCC(), CVC3::Expr::isVar(), newBVZeroString(), CVC3::CommonProofRules::rewriteAnd(), CVC3::TheoryCore::tccCache(), CVC3::Theory::theoryCore(), CVC3::Theory::theoryOf(), and CVC3::Theory::trueExpr().
|
virtual |
Theory-specific pretty-printing.
By default, print the top node in AST, and resume pretty-printing the children. The same call e.print(os) can be used in DP-specific printers to use AST printing for the given node. In fact, it is strongly recommended to add e.print(os) as the default for all the cases/kinds that are not handled by the particular pretty-printer.
Reimplemented from CVC3::Theory.
Definition at line 3662 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, BVSize(), CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVTOINT, CVC3::BVTYPEPRED, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::BVZEROEXTEND, computeBVConst(), CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, DebugAssert, CVC3::Expr::end(), CVC3::EXTRACT, FatalAssert, getBitvectorTypeParam(), getBoolExtractIndex(), getBVConstSize(), getBVConstValue(), getBVIndex(), getBVMultParam(), getBVPlusParam(), CVC3::Op::getExpr(), getExtractHi(), getExtractLow(), getFixedLeftShiftParam(), getFixedRightShiftParam(), CVC3::Expr::getOp(), CVC3::Expr::getOpKind(), getSXIndex(), CVC3::INTTOBV, CVC3::Expr::isApply(), CVC3::Rational::isInteger(), CVC3::ExprStream::lang(), CVC3::LEFTSHIFT, newBVConstExpr(), CVC3::pop(), CVC3::PRESENTATION_LANG, CVC3::Expr::printAST(), printSmtLibShared(), CVC3::push(), CVC3::RIGHTSHIFT, CVC3::SMTLIB_LANG, CVC3::SMTLIB_V2_LANG, CVC3::space(), and CVC3::SX.
Theory-specific parsing implemented by the DP.
Reimplemented from CVC3::Theory.
Definition at line 4087 of file theory_bitvector.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BITVECTOR, CVC3::BOOLEXTRACT, CVC3::BVAND, CVC3::BVASHR, CVC3::BVCOMP, CVC3::BVCONST, CVC3::BVGE, CVC3::BVGT, CVC3::BVLE, CVC3::BVLSHR, CVC3::BVLT, CVC3::BVMULT, CVC3::BVNAND, CVC3::BVNEG, CVC3::BVNOR, CVC3::BVOR, CVC3::BVPLUS, CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVSDIV, CVC3::BVSGE, CVC3::BVSGT, CVC3::BVSHL, BVSize(), CVC3::BVSLE, CVC3::BVSLT, CVC3::BVSMOD, CVC3::BVSREM, CVC3::BVSUB, CVC3::BVTOINT, CVC3::BVTYPEPRED, CVC3::BVUDIV, CVC3::BVUMINUS, CVC3::BVUREM, CVC3::BVXNOR, CVC3::BVXOR, CVC3::BVZEROEXTEND, computeBVConst(), CVC3::CONCAT, CVC3::CONST_WIDTH_LEFTSHIFT, CVC3::Theory::d_theoryUsed, DebugAssert, CVC3::Expr::end(), CVC3::EXTRACT, FatalAssert, CVC3::Theory::getBaseType(), CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Rational::getInt(), CVC3::ExprManager::getKind(), CVC3::Expr::getKind(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::getString(), CVC3::Expr::getType(), ID, CVC3::INTTOBV, CVC3::Rational::isInteger(), CVC3::isRational(), CVC3::LEFTSHIFT, newBitvectorTypeExpr(), newBoolExtractExpr(), newBVAndExpr(), newBVCompExpr(), newBVConstExpr(), newBVExtractExpr(), newBVIndexExpr(), newBVLEExpr(), newBVLTExpr(), newBVMultPadExpr(), newBVNandExpr(), newBVNegExpr(), newBVNorExpr(), newBVOrExpr(), newBVPlusPadExpr(), newBVSLEExpr(), newBVSLTExpr(), newBVSubExpr(), newBVUminusExpr(), newBVXnorExpr(), newBVXorExpr(), newConcatExpr(), newFixedConstWidthLeftShiftExpr(), newFixedLeftShiftExpr(), newFixedRightShiftExpr(), newSXExpr(), pad(), CVC3::Theory::parseExpr(), RAW_LIST, CVC3::RIGHTSHIFT, CVC3::SX, CVC3::Expr::toString(), and TRACE.
int TheoryBitvector::BVSize | ( | const Expr & | e | ) |
Return the number of bits in the bitvector expression.
Definition at line 45 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitblastBVMult(), CVC3::BitvectorTheoremProducer::bitblastBVPlus(), CVC3::BitvectorTheoremProducer::bitBlastDisEqnRule(), CVC3::BitvectorTheoremProducer::bitBlastEqnRule(), CVC3::BitvectorTheoremProducer::bitExtractBitwise(), CVC3::BitvectorTheoremProducer::bitExtractBVASHR(), CVC3::BitvectorTheoremProducer::bitExtractBVLSHR(), CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractBVSHL(), CVC3::BitvectorTheoremProducer::bitExtractConcatenation(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), CVC3::BitvectorTheoremProducer::bitExtractExtraction(), CVC3::BitvectorTheoremProducer::bitExtractFixedLeftShift(), CVC3::BitvectorTheoremProducer::bitExtractFixedRightShift(), CVC3::BitvectorTheoremProducer::bitExtractNot(), CVC3::BitvectorTheoremProducer::bitExtractRewrite(), CVC3::BitvectorTheoremProducer::bitwiseConcat(), CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::bitwiseFlatten(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvashrToConcat(), CVC3::BitvectorTheoremProducer::bvConstIneqn(), CVC3::BitvectorTheoremProducer::bvConstMultAssocRule(), CVC3::BitvectorTheoremProducer::bvlshrToConcat(), CVC3::BitvectorTheoremProducer::BVMult_order_subterms(), CVC3::BitvectorTheoremProducer::bvMultAssocRule(), CVC3::BitvectorTheoremProducer::bvmultBVUminus(), CVC3::BitvectorTheoremProducer::bvmultConst(), CVC3::BitvectorTheoremProducer::bvMultDistRule(), CVC3::BitvectorTheoremProducer::bvPlusAssociativityRule(), CVC3::BitvectorTheoremProducer::bvplusZeroConcatRule(), CVC3::BitvectorTheoremProducer::bvSDivRewrite(), CVC3::BitvectorTheoremProducer::bvShiftZero(), CVC3::BitvectorTheoremProducer::bvshlSplit(), CVC3::BitvectorTheoremProducer::bvshlToConcat(), CVC3::BitvectorTheoremProducer::bvSModRewrite(), CVC3::BitvectorTheoremProducer::bvSRemRewrite(), CVC3::BitvectorTheoremProducer::bvUDivConst(), CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::bvuminusBVConst(), CVC3::BitvectorTheoremProducer::bvuminusBVMult(), CVC3::BitvectorTheoremProducer::bvuminusToBVPlus(), CVC3::BitvectorTheoremProducer::bvuminusVar(), CVC3::BitvectorTheoremProducer::bvURemConst(), CVC3::BitvectorTheoremProducer::bvURemRewrite(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::canonBVMult(), CVC3::BitvectorTheoremProducer::canonBVPlus(), CVC3::BitvectorTheoremProducer::canonBVUMinus(), checkSat(), CVC3::BitvectorTheoremProducer::chopConcat(), CVC3::BitvectorTheoremProducer::combineLikeTermsRule(), comparebv(), computeTCC(), computeType(), CVC3::BitvectorTheoremProducer::constMultToPlus(), CVC3::BitvectorTheoremProducer::constWidthLeftShiftToConcat(), CVC3::BitvectorTheoremProducer::createNewPlusCollection(), CVC3::BitvectorTheoremProducer::distributive_rule(), CVC3::BitvectorTheoremProducer::eqToBits(), CVC3::BitvectorTheoremProducer::extractBVMult(), CVC3::BitvectorTheoremProducer::extractBVPlus(), CVC3::BitvectorTheoremProducer::extractConcat(), CVC3::BitvectorTheoremProducer::extractWhole(), CVC3::BitvectorTheoremProducer::flattenBVPlus(), CVC3::BitvectorTheoremProducer::flipBVMult(), CVC3::BitvectorTheoremProducer::generalIneqn(), CVC3::BitvectorTheoremProducer::getPlusTerms(), CVC3::BitvectorTheoremProducer::isolate_var(), CVC3::BitvectorTheoremProducer::iteExtractRule(), CVC3::BitvectorTheoremProducer::lhsMinusRhsRule(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), CVC3::BitvectorTheoremProducer::MarkNonSolvableEq(), multiply_coeff(), CVC3::BitvectorTheoremProducer::negElim(), newBVAndExpr(), newBVCompExpr(), newBVExtractExpr(), newBVMultExpr(), newBVNandExpr(), newBVNorExpr(), newBVOrExpr(), newBVPlusExpr(), newBVSDivExpr(), newBVSModExpr(), newBVSRemExpr(), newBVSubExpr(), newBVUDivExpr(), newBVURemExpr(), newBVXnorExpr(), newBVXorExpr(), CVC3::BitvectorTheoremProducer::notBVEQ1Rule(), Odd_coeff(), CVC3::BitvectorTheoremProducer::oneBVAND(), CVC3::BitvectorTheoremProducer::oneCoeffBVMult(), CVC3::BitvectorTheoremProducer::pad(), CVC3::BitvectorTheoremProducer::padBVMult(), CVC3::BitvectorTheoremProducer::padBVPlus(), parseExprOp(), print(), CVC3::BitvectorTheoremProducer::processExtract(), CVC3::BitvectorTheoremProducer::rewriteBVSub(), CVC3::BitvectorTheoremProducer::rightShiftToConcat(), CVC3::BitvectorTheoremProducer::rotlRule(), CVC3::BitvectorTheoremProducer::rotrRule(), CVC3::BitvectorTheoremProducer::signBVLTRule(), CVC3::BitvectorTheoremProducer::signExtendRule(), CVC3::BitvectorTheoremProducer::solveExtractOverlap(), CVC3::BitvectorTheoremProducer::typePredBit(), CVC3::BitvectorTheoremProducer::zeroCoeffBVMult(), and CVC3::BitvectorTheoremProducer::zeroPaddingRule().
Definition at line 300 of file theory_bitvector.h.
References CVC3::Theory::getEM(), and CVC3::ExprManager::newRatExpr().
pads e to be of length len
Converts e into a BITVECTOR of length 'len'.
len | is the desired length of the resulting bitvector |
e | is the original bitvector of arbitrary length |
Definition at line 59 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::canonBVEQ(), newBVConstExpr(), newBVMultPadExpr(), newBVPlusPadExpr(), parseExprOp(), and printSmtLibShared().
Definition at line 2512 of file theory_bitvector.cpp.
References CVC3::Theory::addSplitter(), CVC3::Theory::assertEqualities(), bitBlastEqn(), bitBlastTerm(), CVC3::BitvectorProofRules::bitExtractAllToConstEq(), CVC3::BVCONST, BVSize(), d_bb_index, d_bitblast, d_rules, DebugAssert, CVC3::Theory::enqueueFact(), CVC3::Expr::eqExpr(), FatalAssert, findAtom(), CVC3::Theory::getCommonRules(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Theory::iffMP(), CVC3::Expr::isBoolConst(), CVC3::Expr::isNull(), CVC3::Theory::simplify(), and CVC3::Theory::transitivityRule().
|
inline |
Definition at line 307 of file theory_bitvector.h.
References newBitvectorTypeExpr().
Referenced by computeType(), CVC3::BitvectorTheoremProducer::processExtract(), CVC3::Translator::processType(), and CVC3::BitvectorTheoremProducer::solveExtractOverlap().
Definition at line 4650 of file theory_bitvector.cpp.
References CVC3::BVTYPEPRED, and CVC3::Type::getExpr().
Expr TheoryBitvector::newBitvectorTypeExpr | ( | int | i | ) |
Definition at line 4638 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, d_maxLength, DebugAssert, CVC3::Theory::getEM(), and CVC3::int2string().
Referenced by computeType(), newBitvectorType(), and parseExprOp().
Definition at line 4656 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVAND, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::negBVor(), parseExprOp(), and CVC3::BitvectorTheoremProducer::rewriteNAND().
Definition at line 4671 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVAND, BVSize(), DebugAssert, and CVC3::Theory::getEM().
Definition at line 4692 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVOR, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::negBVand(), parseExprOp(), and CVC3::BitvectorTheoremProducer::rewriteNOR().
Definition at line 4707 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVOR, BVSize(), DebugAssert, and CVC3::Theory::getEM().
Definition at line 4758 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVXOR, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::negBVxnor(), CVC3::BitvectorTheoremProducer::negBVxor(), parseExprOp(), and CVC3::BitvectorTheoremProducer::rewriteXNOR().
Definition at line 4773 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVXOR, DebugAssert, and CVC3::Theory::getEM().
Definition at line 4794 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVXNOR, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::negBVxnor(), and parseExprOp().
Definition at line 4824 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVXNOR, DebugAssert, and CVC3::Theory::getEM().
Definition at line 4728 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVNAND, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by parseExprOp().
Definition at line 4743 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVNOR, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by parseExprOp().
Definition at line 4809 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVCOMP, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by parseExprOp().
Definition at line 4845 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVLT, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::generalIneqn(), CVC3::BitvectorTheoremProducer::notBVLTRule(), CVC3::BitvectorTheoremProducer::padBVLTRule(), parseExprOp(), and CVC3::BitvectorTheoremProducer::signBVLTRule().
Definition at line 4856 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVLE, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVASHR(), CVC3::BitvectorTheoremProducer::generalIneqn(), CVC3::BitvectorTheoremProducer::notBVLTRule(), CVC3::BitvectorTheoremProducer::padBVLTRule(), parseExprOp(), and CVC3::BitvectorTheoremProducer::signBVLTRule().
Definition at line 4867 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), CVC3::SX, and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvashrToConcat(), CVC3::BitvectorTheoremProducer::padBVSLTRule(), and parseExprOp().
Definition at line 4882 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVREPEAT, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by parseExprOp().
Definition at line 4898 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVSLT, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::padBVSLTRule(), and parseExprOp().
Definition at line 4909 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVSLE, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::padBVSLTRule(), and parseExprOp().
Definition at line 4920 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVNEG, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::bitwiseFlatten(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvuminusToBVPlus(), CVC3::BitvectorTheoremProducer::collectOneTermOfPlus(), CVC3::BitvectorTheoremProducer::constMultToPlus(), CVC3::BitvectorTheoremProducer::createNewPlusCollection(), CVC3::BitvectorTheoremProducer::iteBVnegRule(), CVC3::BitvectorTheoremProducer::negBVand(), CVC3::BitvectorTheoremProducer::negBVor(), CVC3::BitvectorTheoremProducer::negBVxor(), CVC3::BitvectorTheoremProducer::negConcat(), CVC3::BitvectorTheoremProducer::notBVEQ1Rule(), parseExprOp(), CVC3::BitvectorTheoremProducer::rewriteNAND(), CVC3::BitvectorTheoremProducer::rewriteNOR(), CVC3::BitvectorTheoremProducer::rewriteXNOR(), and CVC3::BitvectorTheoremProducer::sameKidCheck().
Definition at line 4930 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVUMINUS, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvSDivRewrite(), CVC3::BitvectorTheoremProducer::bvSModRewrite(), CVC3::BitvectorTheoremProducer::bvSRemRewrite(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::lhsMinusRhsRule(), parseExprOp(), and CVC3::BitvectorTheoremProducer::rewriteBVSub().
Definition at line 4940 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BOOLEXTRACT, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitblastBVMult(), CVC3::BitvectorTheoremProducer::bitblastBVPlus(), CVC3::BitvectorTheoremProducer::bitExtractBitwise(), CVC3::BitvectorTheoremProducer::bitExtractBVASHR(), CVC3::BitvectorTheoremProducer::bitExtractBVLSHR(), CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractBVPlus(), CVC3::BitvectorTheoremProducer::bitExtractBVPlusPreComputed(), CVC3::BitvectorTheoremProducer::bitExtractBVSHL(), CVC3::BitvectorTheoremProducer::bitExtractConcatenation(), CVC3::BitvectorTheoremProducer::bitExtractConstant(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), CVC3::BitvectorTheoremProducer::bitExtractExtraction(), CVC3::BitvectorTheoremProducer::bitExtractFixedLeftShift(), CVC3::BitvectorTheoremProducer::bitExtractFixedRightShift(), CVC3::BitvectorTheoremProducer::bitExtractNot(), CVC3::BitvectorTheoremProducer::bitExtractRewrite(), CVC3::BitvectorTheoremProducer::bitExtractSXRule(), computeModel(), computeModelTerm(), parseExprOp(), and CVC3::BitvectorTheoremProducer::zeroPaddingRule().
Definition at line 4954 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), CVC3::LEFTSHIFT, and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::constMultToPlus(), and parseExprOp().
Definition at line 4968 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::CONST_WIDTH_LEFTSHIFT, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), newBVExtractExpr(), and parseExprOp().
Definition at line 4982 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), CVC3::RIGHTSHIFT, and CVC3::Expr::toString().
Referenced by parseExprOp().
Definition at line 4997 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::CONCAT, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConcat(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvlshrToConcat(), CVC3::BitvectorTheoremProducer::bvshlSplit(), CVC3::BitvectorTheoremProducer::bvshlToConcat(), CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::chopConcat(), CVC3::BitvectorTheoremProducer::constWidthLeftShiftToConcat(), CVC3::BitvectorTheoremProducer::extractConcat(), CVC3::BitvectorTheoremProducer::leftShiftToConcat(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), CVC3::BitvectorTheoremProducer::negConcat(), CVC3::BitvectorTheoremProducer::pad(), parseExprOp(), CVC3::BitvectorTheoremProducer::processExtract(), CVC3::BitvectorTheoremProducer::repeatRule(), CVC3::BitvectorTheoremProducer::rightShiftToConcat(), CVC3::BitvectorTheoremProducer::rotlRule(), CVC3::BitvectorTheoremProducer::rotrRule(), CVC3::BitvectorTheoremProducer::signExtendRule(), CVC3::BitvectorTheoremProducer::solveExtractOverlap(), and CVC3::BitvectorTheoremProducer::zeroExtendRule().
Definition at line 5008 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::CONCAT, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Definition at line 5023 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::CONCAT, DebugAssert, and CVC3::Theory::getEM().
Expr TheoryBitvector::newBVConstExpr | ( | const std::string & | s, |
int | base = 2 |
||
) |
Definition at line 5214 of file theory_bitvector.cpp.
References d_bvConstExprIndex, DebugAssert, CVC3::Theory::getEM(), CVC3::int2string(), and CVC3::ExprManager::newExpr().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractAllToConstEq(), CVC3::BitvectorTheoremProducer::bitExtractBVASHR(), CVC3::BitvectorTheoremProducer::bitExtractBVLSHR(), CVC3::BitvectorTheoremProducer::bitExtractBVSHL(), CVC3::BitvectorTheoremProducer::BitvectorTheoremProducer(), CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvConstMultAssocRule(), CVC3::BitvectorTheoremProducer::bvmultBVUminus(), CVC3::BitvectorTheoremProducer::bvmultConst(), CVC3::BitvectorTheoremProducer::bvplusConst(), CVC3::BitvectorTheoremProducer::bvSDivRewrite(), CVC3::BitvectorTheoremProducer::bvshlSplit(), CVC3::BitvectorTheoremProducer::bvshlToConcat(), CVC3::BitvectorTheoremProducer::bvSModRewrite(), CVC3::BitvectorTheoremProducer::bvSRemRewrite(), CVC3::BitvectorTheoremProducer::bvUDivConst(), CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::bvuminusBVConst(), CVC3::BitvectorTheoremProducer::bvuminusBVMult(), CVC3::BitvectorTheoremProducer::bvuminusToBVPlus(), CVC3::BitvectorTheoremProducer::bvuminusVar(), CVC3::BitvectorTheoremProducer::bvURemConst(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::canonBVMult(), CVC3::BitvectorTheoremProducer::canonBVUMinus(), checkSat(), CVC3::BitvectorTheoremProducer::chopConcat(), computeModel(), CVC3::BitvectorTheoremProducer::concatConst(), CVC3::BitvectorTheoremProducer::constMultToPlus(), CVC3::BitvectorTheoremProducer::constWidthLeftShiftToConcat(), CVC3::BitvectorTheoremProducer::createNewPlusCollection(), CVC3::BitvectorTheoremProducer::extractConst(), finiteTypeInfo(), CVC3::BitvectorTheoremProducer::isolate_var(), CVC3::BitvectorTheoremProducer::leftShiftToConcat(), multiply_coeff(), CVC3::BitvectorTheoremProducer::negConst(), CVC3::BitvectorTheoremProducer::negElim(), newBVConstExpr(), newBVOneString(), newBVZeroString(), parseExprOp(), print(), signed_newBVConstExpr(), and TheoryBitvector().
Expr TheoryBitvector::newBVConstExpr | ( | const std::vector< bool > & | bits | ) |
Definition at line 5172 of file theory_bitvector.cpp.
References d_bvConstExprIndex, DebugAssert, CVC3::Theory::getEM(), and CVC3::ExprManager::newExpr().
Definition at line 5459 of file theory_bitvector.cpp.
References computeNegBVConst(), and newBVConstExpr().
Definition at line 5182 of file theory_bitvector.cpp.
References DebugAssert, CVC3::int2string(), CVC3::Rational::isInteger(), newBVConstExpr(), pad(), and CVC3::Rational::toString().
Expr TheoryBitvector::newBVZeroString | ( | int | r | ) |
produces a string of 0's of length bvLength
Definition at line 5145 of file theory_bitvector.cpp.
References DebugAssert, CVC3::int2string(), and newBVConstExpr().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::bitwiseFlatten(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvlshrToConcat(), CVC3::BitvectorTheoremProducer::bvmultBVUminus(), CVC3::BitvectorTheoremProducer::bvShiftZero(), CVC3::BitvectorTheoremProducer::bvshlSplit(), CVC3::BitvectorTheoremProducer::bvuminusBVMult(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::chopConcat(), computeTCC(), CVC3::BitvectorTheoremProducer::isolate_var(), CVC3::BitvectorTheoremProducer::lhsMinusRhsRule(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), CVC3::BitvectorTheoremProducer::MarkNonSolvableEq(), Odd_coeff(), CVC3::BitvectorTheoremProducer::pad(), CVC3::BitvectorTheoremProducer::rewriteBVCOMP(), CVC3::BitvectorTheoremProducer::rightShiftToConcat(), CVC3::BitvectorTheoremProducer::sumNormalizedElements(), CVC3::BitvectorTheoremProducer::zeroCoeffBVMult(), and CVC3::BitvectorTheoremProducer::zeroExtendRule().
Expr TheoryBitvector::newBVOneString | ( | int | r | ) |
produces a string of 1's of length bvLength
Definition at line 5159 of file theory_bitvector.cpp.
References DebugAssert, CVC3::int2string(), and newBVConstExpr().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::bitwiseFlatten(), and CVC3::BitvectorTheoremProducer::rewriteBVCOMP().
hi and low are bit indices
Definition at line 5237 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), DebugAssert, CVC3::EXTRACT, CVC3::Theory::getEM(), CVC3::Type::getExpr(), getFixedLeftShiftParam(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), CVC3::LEFTSHIFT, newFixedConstWidthLeftShiftExpr(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractRewrite(), CVC3::BitvectorTheoremProducer::bitExtractToExtract(), CVC3::BitvectorTheoremProducer::bitwiseConcat(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvashrToConcat(), CVC3::BitvectorTheoremProducer::bvlshrToConcat(), CVC3::BitvectorTheoremProducer::bvSDivRewrite(), CVC3::BitvectorTheoremProducer::bvshlSplit(), CVC3::BitvectorTheoremProducer::bvshlToConcat(), CVC3::BitvectorTheoremProducer::bvSModRewrite(), CVC3::BitvectorTheoremProducer::bvSRemRewrite(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::concatMergeExtract(), CVC3::BitvectorTheoremProducer::constWidthLeftShiftToConcat(), CVC3::BitvectorTheoremProducer::eqToBits(), CVC3::BitvectorTheoremProducer::expandTypePred(), CVC3::BitvectorTheoremProducer::extractBitwise(), CVC3::BitvectorTheoremProducer::extractBVMult(), CVC3::BitvectorTheoremProducer::extractBVPlus(), CVC3::BitvectorTheoremProducer::extractConcat(), CVC3::BitvectorTheoremProducer::extractExtract(), CVC3::BitvectorTheoremProducer::generalIneqn(), CVC3::BitvectorTheoremProducer::getPlusTerms(), CVC3::BitvectorTheoremProducer::iteExtractRule(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), CVC3::BitvectorTheoremProducer::pad(), parseExprOp(), CVC3::BitvectorTheoremProducer::rightShiftToConcat(), CVC3::BitvectorTheoremProducer::rotlRule(), CVC3::BitvectorTheoremProducer::rotrRule(), CVC3::BitvectorTheoremProducer::signBVLTRule(), and CVC3::BitvectorTheoremProducer::signExtendRule().
Definition at line 5260 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVSUB, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvURemRewrite(), and parseExprOp().
'numbits' is the number of bits in the result
Definition at line 5275 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVPLUS, BVSize(), DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVMult(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::bvMultDistRule(), CVC3::BitvectorTheoremProducer::bvPlusAssociativityRule(), CVC3::BitvectorTheoremProducer::bvplusZeroConcatRule(), CVC3::BitvectorTheoremProducer::bvSModRewrite(), CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::bvuminusToBVPlus(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::chopConcat(), CVC3::BitvectorTheoremProducer::constMultToPlus(), CVC3::BitvectorTheoremProducer::distributive_rule(), CVC3::BitvectorTheoremProducer::flattenBVPlus(), CVC3::BitvectorTheoremProducer::isolate_var(), CVC3::BitvectorTheoremProducer::lhsMinusRhsRule(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), multiply_coeff(), CVC3::BitvectorTheoremProducer::negElim(), newBVPlusPadExpr(), CVC3::BitvectorTheoremProducer::padBVPlus(), CVC3::BitvectorTheoremProducer::rewriteBVSub(), and CVC3::BitvectorTheoremProducer::sumNormalizedElements().
'numbits' is the number of bits in the result
Definition at line 5296 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVPLUS, BVSize(), DebugAssert, CVC3::Theory::getEM(), and CVC3::int2string().
pads children and then builds plus expr
Definition at line 5317 of file theory_bitvector.cpp.
References newBVPlusExpr(), and pad().
Referenced by CVC3::BitvectorTheoremProducer::extractBVPlus(), and parseExprOp().
Definition at line 5038 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVMULT, BVSize(), DebugAssert, CVC3::Theory::getEM(), CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), CVC3::int2string(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvConstMultAssocRule(), CVC3::BitvectorTheoremProducer::BVMult_order_subterms(), CVC3::BitvectorTheoremProducer::bvMultAssocRule(), CVC3::BitvectorTheoremProducer::bvmultBVUminus(), CVC3::BitvectorTheoremProducer::bvMultDistRule(), CVC3::BitvectorTheoremProducer::bvUDivTheorem(), CVC3::BitvectorTheoremProducer::bvuminusBVMult(), CVC3::BitvectorTheoremProducer::bvuminusVar(), CVC3::BitvectorTheoremProducer::bvURemRewrite(), CVC3::BitvectorTheoremProducer::canonBVMult(), CVC3::BitvectorTheoremProducer::canonBVUMinus(), CVC3::BitvectorTheoremProducer::createNewPlusCollection(), CVC3::BitvectorTheoremProducer::distributive_rule(), CVC3::BitvectorTheoremProducer::flipBVMult(), CVC3::BitvectorTheoremProducer::isolate_var(), multiply_coeff(), CVC3::BitvectorTheoremProducer::negElim(), newBVMultPadExpr(), CVC3::BitvectorTheoremProducer::padBVMult(), and CVC3::BitvectorTheoremProducer::padBVPlus().
Definition at line 5056 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVMULT, BVSize(), DebugAssert, CVC3::Theory::getEM(), and CVC3::int2string().
Definition at line 5083 of file theory_bitvector.cpp.
References newBVMultExpr(), and pad().
Referenced by CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::canonBVEQ(), CVC3::BitvectorTheoremProducer::extractBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), and parseExprOp().
Definition at line 5073 of file theory_bitvector.cpp.
References newBVMultExpr(), and pad().
Definition at line 5089 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVUDIV, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvSDivRewrite(), and CVC3::BitvectorTheoremProducer::bvURemRewrite().
Definition at line 5100 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVUREM, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvSModRewrite(), and CVC3::BitvectorTheoremProducer::bvSRemRewrite().
Definition at line 5111 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, CVC3::BVSDIV, BVSize(), DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Definition at line 5122 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVSREM, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
Definition at line 5133 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, BVSize(), CVC3::BVSMOD, DebugAssert, CVC3::Type::getExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getType(), and CVC3::Expr::toString().
int TheoryBitvector::getBitvectorTypeParam | ( | const Expr & | e | ) |
Definition at line 5331 of file theory_bitvector.cpp.
References CVC3::BITVECTOR, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getKind(), CVC3::Expr::getRational(), and CVC3::Expr::toString().
Referenced by computeModel(), computeModelTerm(), CVC3::BitvectorTheoremProducer::expandTypePred(), finiteTypeInfo(), print(), and CVC3::Translator::printArrayExpr().
|
inline |
Definition at line 380 of file theory_bitvector.h.
References getBitvectorTypeParam(), and CVC3::Type::getExpr().
Referenced by getBitvectorTypeParam().
Definition at line 5340 of file theory_bitvector.cpp.
References CVC3::BVTYPEPRED, DebugAssert, CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::expandTypePred().
Definition at line 5348 of file theory_bitvector.cpp.
References CVC3::BVTYPEPRED, DebugAssert, CVC3::Expr::getOpKind(), and CVC3::Expr::toString().
Referenced by assertFact(), and CVC3::BitvectorTheoremProducer::expandTypePred().
int TheoryBitvector::getSXIndex | ( | const Expr & | e | ) |
Definition at line 5365 of file theory_bitvector.cpp.
References DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), CVC3::SX, and CVC3::Expr::toString().
Referenced by computeType(), and print().
int TheoryBitvector::getBVIndex | ( | const Expr & | e | ) |
Definition at line 5373 of file theory_bitvector.cpp.
References CVC3::BVREPEAT, CVC3::BVROTL, CVC3::BVROTR, CVC3::BVZEROEXTEND, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by computeType(), print(), CVC3::BitvectorTheoremProducer::repeatRule(), CVC3::BitvectorTheoremProducer::rotlRule(), CVC3::BitvectorTheoremProducer::rotrRule(), and CVC3::BitvectorTheoremProducer::zeroExtendRule().
int TheoryBitvector::getBoolExtractIndex | ( | const Expr & | e | ) |
Definition at line 5356 of file theory_bitvector.cpp.
References CVC3::BOOLEXTRACT, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitBlastDisEqnRule(), CVC3::BitvectorTheoremProducer::bitBlastEqnRule(), CVC3::BitvectorTheoremProducer::bitExtractAllToConstEq(), CVC3::BitvectorTheoremProducer::bitExtractBVPlusPreComputed(), CVC3::BitvectorTheoremProducer::bitExtractRewrite(), CVC3::BitvectorTheoremProducer::bitExtractToExtract(), CVC3::BitvectorTheoremProducer::bitvectorFalseRule(), CVC3::BitvectorTheoremProducer::bitvectorTrueRule(), computeType(), CVC3::BitvectorTheoremProducer::generalIneqn(), and print().
int TheoryBitvector::getFixedLeftShiftParam | ( | const Expr & | e | ) |
Definition at line 5385 of file theory_bitvector.cpp.
References CVC3::CONST_WIDTH_LEFTSHIFT, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), CVC3::LEFTSHIFT, and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractFixedLeftShift(), computeType(), CVC3::BitvectorTheoremProducer::constWidthLeftShiftToConcat(), CVC3::BitvectorTheoremProducer::leftShiftToConcat(), newBVExtractExpr(), and print().
int TheoryBitvector::getFixedRightShiftParam | ( | const Expr & | e | ) |
Definition at line 5396 of file theory_bitvector.cpp.
References DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), CVC3::RIGHTSHIFT, and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractFixedRightShift(), computeType(), print(), and CVC3::BitvectorTheoremProducer::rightShiftToConcat().
int TheoryBitvector::getExtractHi | ( | const Expr & | e | ) |
Definition at line 5414 of file theory_bitvector.cpp.
References DebugAssert, CVC3::EXTRACT, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractExtraction(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::canonBVEQ(), computeType(), CVC3::BitvectorTheoremProducer::concatMergeExtract(), CVC3::BitvectorTheoremProducer::extractBitwise(), CVC3::BitvectorTheoremProducer::extractBVMult(), CVC3::BitvectorTheoremProducer::extractBVPlus(), CVC3::BitvectorTheoremProducer::extractConcat(), CVC3::BitvectorTheoremProducer::extractConst(), CVC3::BitvectorTheoremProducer::extractExtract(), CVC3::BitvectorTheoremProducer::extractWhole(), CVC3::BitvectorTheoremProducer::getPlusTerms(), CVC3::BitvectorTheoremProducer::iteExtractRule(), print(), CVC3::BitvectorTheoremProducer::processExtract(), CVC3::BitvectorTheoremProducer::solveExtractOverlap(), and CVC3::BitvectorTheoremProducer::solveExtractOverlapApplies().
int TheoryBitvector::getExtractLow | ( | const Expr & | e | ) |
Definition at line 5405 of file theory_bitvector.cpp.
References DebugAssert, CVC3::EXTRACT, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractExtraction(), CVC3::BitvectorTheoremProducer::buildPlusTerm(), CVC3::BitvectorTheoremProducer::canonBVEQ(), computeType(), CVC3::BitvectorTheoremProducer::concatMergeExtract(), CVC3::BitvectorTheoremProducer::extractBitwise(), CVC3::BitvectorTheoremProducer::extractBVMult(), CVC3::BitvectorTheoremProducer::extractBVPlus(), CVC3::BitvectorTheoremProducer::extractConcat(), CVC3::BitvectorTheoremProducer::extractConst(), CVC3::BitvectorTheoremProducer::extractExtract(), CVC3::BitvectorTheoremProducer::extractWhole(), CVC3::BitvectorTheoremProducer::getPlusTerms(), CVC3::BitvectorTheoremProducer::iteExtractRule(), print(), CVC3::BitvectorTheoremProducer::processExtract(), CVC3::BitvectorTheoremProducer::solveExtractOverlap(), and CVC3::BitvectorTheoremProducer::solveExtractOverlapApplies().
int TheoryBitvector::getBVPlusParam | ( | const Expr & | e | ) |
Definition at line 5423 of file theory_bitvector.cpp.
References CVC3::AST_LANG, CVC3::BVPLUS, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractBVPlus(), CVC3::BitvectorTheoremProducer::bitExtractBVPlusPreComputed(), CVC3::BitvectorTheoremProducer::bvplusConst(), CVC3::BitvectorTheoremProducer::bvplusZeroConcatRule(), computeType(), print(), and printSmtLibShared().
int TheoryBitvector::getBVMultParam | ( | const Expr & | e | ) |
Definition at line 5431 of file theory_bitvector.cpp.
References CVC3::AST_LANG, CVC3::BVMULT, DebugAssert, CVC3::Rational::getInt(), CVC3::Expr::getOpExpr(), CVC3::Expr::getOpKind(), CVC3::Expr::getRational(), CVC3::Expr::isApply(), and CVC3::Expr::toString().
Referenced by computeType(), print(), and printSmtLibShared().
unsigned TheoryBitvector::getBVConstSize | ( | const Expr & | e | ) |
Definition at line 5439 of file theory_bitvector.cpp.
References CVC3::BVCONST, DebugAssert, CVC3::Expr::getExprValue(), and CVC3::Expr::getKind().
Referenced by CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), computeBVConst(), computeNegBVConst(), computeType(), CVC3::BitvectorTheoremProducer::concatConst(), CVC3::BitvectorTheoremProducer::negConst(), and print().
bool TheoryBitvector::getBVConstValue | ( | const Expr & | e, |
int | i | ||
) |
Definition at line 5448 of file theory_bitvector.cpp.
References CVC3::BVCONST, DebugAssert, CVC3::Expr::getExprValue(), and CVC3::Expr::getKind().
Referenced by CVC3::BitvectorTheoremProducer::bitExtractConstant(), CVC3::BitvectorTheoremProducer::bitExtractConstBVMult(), CVC3::BitvectorTheoremProducer::bitwiseConst(), CVC3::BitvectorTheoremProducer::bitwiseConstElim(), computeBVConst(), computeNegBVConst(), CVC3::BitvectorTheoremProducer::concatConst(), CVC3::BitvectorTheoremProducer::extractConst(), CVC3::BitvectorTheoremProducer::negConst(), and print().
computes the integer value of a bitvector constant
Definition at line 5474 of file theory_bitvector.cpp.
References CVC3::BVCONST, d_bv32Flag, DebugAssert, getBVConstSize(), getBVConstValue(), CVC3::Expr::getKind(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvashrToConcat(), CVC3::BitvectorTheoremProducer::bvConstIneqn(), CVC3::BitvectorTheoremProducer::bvConstMultAssocRule(), CVC3::BitvectorTheoremProducer::bvlshrToConcat(), CVC3::BitvectorTheoremProducer::bvmultConst(), CVC3::BitvectorTheoremProducer::bvplusConst(), CVC3::BitvectorTheoremProducer::bvplusZeroConcatRule(), CVC3::BitvectorTheoremProducer::bvShiftZero(), CVC3::BitvectorTheoremProducer::bvshlToConcat(), CVC3::BitvectorTheoremProducer::bvUDivConst(), CVC3::BitvectorTheoremProducer::bvuminusBVConst(), CVC3::BitvectorTheoremProducer::bvURemConst(), CVC3::BitvectorTheoremProducer::canonBVMult(), CVC3::BitvectorTheoremProducer::chopConcat(), CVC3::BitvectorTheoremProducer::collectLikeTermsOfPlus(), CVC3::BitvectorTheoremProducer::getPlusTerms(), CVC3::BitvectorTheoremProducer::isolate_var(), CVC3::BitvectorTheoremProducer::liftConcatBVMult(), CVC3::BitvectorTheoremProducer::liftConcatBVPlus(), multiply_coeff(), Odd_coeff(), CVC3::BitvectorTheoremProducer::oneBVAND(), CVC3::BitvectorTheoremProducer::oneCoeffBVMult(), parseExprOp(), print(), CVC3::BitvectorTheoremProducer::signBVLTRule(), CVC3::BitvectorTheoremProducer::zeroBVOR(), CVC3::BitvectorTheoremProducer::zeroCoeffBVMult(), and CVC3::BitvectorTheoremProducer::zeroLeq().
computes the integer value of ~c+1 or BVUMINUS(c)
Definition at line 5495 of file theory_bitvector.cpp.
References CVC3::BVCONST, d_bv32Flag, DebugAssert, getBVConstSize(), getBVConstValue(), CVC3::Expr::getKind(), and CVC3::Expr::toString().
Referenced by CVC3::BitvectorTheoremProducer::bvmultBVUminus(), CVC3::BitvectorTheoremProducer::bvuminusBVConst(), CVC3::BitvectorTheoremProducer::bvuminusBVMult(), and signed_newBVConstExpr().
|
inline |
Definition at line 401 of file theory_bitvector.h.
References d_maxLength.
bool TheoryBitvector::isLinearTerm | ( | const Expr & | e | ) |
Definition at line 2345 of file theory_bitvector.cpp.
References CVC3::BVCONST, CVC3::BVMULT, CVC3::BVPLUS, CVC3::Expr::getOpKind(), and CVC3::Theory::isLeaf().
Referenced by canSolveFor().
Definition at line 1950 of file theory_bitvector.cpp.
References CVC3::BVCONST, CVC3::BVMULT, CVC3::BVPLUS, CVC3::BVUMINUS, DebugAssert, and CVC3::Expr::getOpKind().
Referenced by CVC3::BitvectorTheoremProducer::BVMult_order_subterms().
Definition at line 2301 of file theory_bitvector.cpp.
References CVC3::BVCONST, CVC3::BVMULT, countTermIn(), DebugAssert, EQ, CVC3::Expr::getOpKind(), CVC3::Theory::isLeaf(), and isLinearTerm().
Definition at line 2052 of file theory_bitvector.cpp.
References CVC3::pow().
Referenced by CVC3::BitvectorTheoremProducer::canonBVEQ().
|
private |
Definition at line 101 of file theory_bitvector.h.
Referenced by comparebv(), generalBitBlast(), simplifyPendingEq(), solve(), TheoryBitvector(), and ~TheoryBitvector().
|
private |
MemoryManager index for BVConstExpr subclass.
Definition at line 103 of file theory_bitvector.h.
Referenced by newBVConstExpr(), and TheoryBitvector().
|
private |
Definition at line 104 of file theory_bitvector.h.
|
private |
Definition at line 105 of file theory_bitvector.h.
|
private |
Definition at line 106 of file theory_bitvector.h.
|
private |
counts delayed asserted equalities
Definition at line 109 of file theory_bitvector.h.
|
private |
counts asserted equalities
Definition at line 111 of file theory_bitvector.h.
|
private |
counts delayed asserted disequalities
Definition at line 113 of file theory_bitvector.h.
|
private |
counts asserted disequalities
Definition at line 115 of file theory_bitvector.h.
|
private |
counts type predicates
Definition at line 117 of file theory_bitvector.h.
|
private |
counts delayed type predicates
Definition at line 119 of file theory_bitvector.h.
|
private |
counts bitblasted equalities
Definition at line 121 of file theory_bitvector.h.
|
private |
counts bitblasted disequalities
Definition at line 123 of file theory_bitvector.h.
|
private |
boolean on the fly rewrite flag
Definition at line 126 of file theory_bitvector.h.
|
private |
bool extract cache flag
Definition at line 128 of file theory_bitvector.h.
|
private |
flag which indicates that all arithmetic is 32 bit with no overflow
Definition at line 130 of file theory_bitvector.h.
Referenced by computeBVConst(), and computeNegBVConst().
Cache for storing the results of the bitBlastTerm function.
Definition at line 133 of file theory_bitvector.h.
Cache for pushNegation(). it is ok that this is cache is.
Definition at line 138 of file theory_bitvector.h.
Backtracking queue for equalities.
Definition at line 141 of file theory_bitvector.h.
Referenced by assertFact(), and checkSat().
Backtracking queue for unsolved equalities.
Definition at line 143 of file theory_bitvector.h.
Referenced by assertFact(), and checkSat().
|
private |
Index to current position in d_eqPending.
Definition at line 145 of file theory_bitvector.h.
Referenced by checkSat().
Backtracking queue for all other assertions.
Definition at line 147 of file theory_bitvector.h.
Referenced by assertFact(), checkSat(), and comparebv().
|
private |
Index to current position in d_bitblast.
Definition at line 149 of file theory_bitvector.h.
Referenced by assertFact(), checkSat(), and comparebv().
Backtracking database of subterms of shared terms.
Definition at line 151 of file theory_bitvector.h.
Referenced by update().
Backtracking database of subterms of shared terms.
Definition at line 153 of file theory_bitvector.h.
|
private |
Constant 1-bit bit-vector 0bin0.
Definition at line 156 of file theory_bitvector.h.
Referenced by bvZero(), and TheoryBitvector().
|
private |
Constant 1-bit bit-vector 0bin0.
Definition at line 158 of file theory_bitvector.h.
Referenced by bvOne(), and TheoryBitvector().
|
private |
Max size of any bitvector we've seen.
Definition at line 165 of file theory_bitvector.h.
Referenced by getMaxSize(), and newBitvectorTypeExpr().
|
private |
Used in checkSat.
Definition at line 168 of file theory_bitvector.h.
|
private |
Definition at line 169 of file theory_bitvector.h.
Definition at line 267 of file theory_bitvector.h.
Referenced by CVC3::BitvectorTheoremProducer::computeCarryPreComputed().
Definition at line 268 of file theory_bitvector.h.
Referenced by CVC3::BitvectorTheoremProducer::computeCarryPreComputed().
std::vector<Theorem> CVC3::TheoryBitvector::additionalRewriteConstraints |
Definition at line 416 of file theory_bitvector.h.
Referenced by checkSat().