}
TheoryProofEngine* ProofManager::getTheoryProofEngine() {
- Assert (options::proof());
Assert (currentPM()->d_theoryProof != NULL);
return currentPM()->d_theoryProof;
}
if (id == theory::THEORY_BV) {
BitVectorProof * bvp = new LFSCBitVectorProof((theory::bv::TheoryBV*)th, this);
d_theoryProofTable[id] = bvp;
- ((theory::bv::TheoryBV*)th)->setProofLog( bvp );
return;
}
}
}
+void TheoryProofEngine::finishRegisterTheory(theory::Theory* th) {
+ if (th) {
+ theory::TheoryId id = th->getId();
+ if (id == theory::THEORY_BV) {
+ Assert(d_theoryProofTable.find(id) != d_theoryProofTable.end());
+
+ BitVectorProof *bvp = (BitVectorProof *)d_theoryProofTable[id];
+ ((theory::bv::TheoryBV*)th)->setProofLog( bvp );
+ return;
+ }
+ }
+}
+
TheoryProof* TheoryProofEngine::getTheoryProof(theory::TheoryId id) {
// The UF theory handles queries for the Builtin theory.
if (id == theory::THEORY_BUILTIN) {
/**
* Ensures that a theory proof class for the given theory is created.
+ * This method can be invoked regardless of whether the "proof" option
+ * has been set.
*
* @param theory
*/
void registerTheory(theory::Theory* theory);
+ /**
+ * Additional configuration of the theory proof class for the given theory.
+ * This method should only be invoked when the "proof" option has been set.
+ *
+ * @param theory
+ */
+ void finishRegisterTheory(theory::Theory* theory);
theory::TheoryId getTheoryForLemma(const prop::SatClause* clause);
TheoryProof* getTheoryProof(theory::TheoryId id);
for(TheoryId id = theory::THEORY_FIRST; id < theory::THEORY_LAST; ++id) {
TheoryConstructor::addTheory(d_theoryEngine, id);
//register with proof engine if applicable
- THEORY_PROOF(ProofManager::currentPM()->getTheoryProofEngine()->registerTheory(d_theoryEngine->theoryOf(id)); );
+#ifdef CVC4_PROOF
+ ProofManager::currentPM()->getTheoryProofEngine()->registerTheory(d_theoryEngine->theoryOf(id));
+#endif
}
d_private->addUseTheoryListListener(d_theoryEngine);
d_dumpCommands.clear();
PROOF( ProofManager::currentPM()->setLogic(d_logic); );
+ PROOF({
+ for(TheoryId id = theory::THEORY_FIRST; id < theory::THEORY_LAST; ++id) {
+ ProofManager::currentPM()->getTheoryProofEngine()->
+ finishRegisterTheory(d_theoryEngine->theoryOf(id));
+ }
+ });
+
Trace("smt-debug") << "SmtEngine::finishInit done" << std::endl;
}
}
//counterexample-guided instantiation for non-sygus
// enable if any possible quantifiers with arithmetic, datatypes or bitvectors
- if( ( d_logic.isQuantified() && ( d_logic.isTheoryEnabled(THEORY_ARITH) || d_logic.isTheoryEnabled(THEORY_DATATYPES) || d_logic.isTheoryEnabled(THEORY_BV) ) ) ||
+ if( ( d_logic.isQuantified() && ( d_logic.isTheoryEnabled(THEORY_ARITH) || d_logic.isTheoryEnabled(THEORY_DATATYPES) || d_logic.isTheoryEnabled(THEORY_BV) ) ) ||
options::cbqiAll() ){
if( !options::cbqi.wasSetByUser() ){
options::cbqi.set( true );