summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorKshitij Bansal <kshitij@cs.nyu.edu>2012-04-23 17:56:19 +0000
committerKshitij Bansal <kshitij@cs.nyu.edu>2012-04-23 17:56:19 +0000
commit5676b8bddcf001ba567ebb6d8e7b42dbd13ac9f3 (patch)
treea3fe0f00ae5d5cd087b23c885c8b170ceb07b919 /src/smt
parent04e81f6d12cad8f2519aa6c94adee52aadd71ec3 (diff)
Merge from decision branch -- partially working justification heuristic
Overview of changes * command line option --decision={internal,justification} * justification heuristic handles all operators except ITEs revelant stats: decision::jh::* * if decisionEngine has solved the problem PropEngine returns unknown and smtEngine queries DE to get the answer relevant stat: smt::resultSource * there are known bugs Full list of commits being merged r3330 use CD data structures in JH r3329 add command-line option --decision=MODE r3328 timer stat, other fixes r3326 more trace r3325 enable implies, iff, xor (no further regression losses) r3324 feed decision engine lemmas, changes to quitting mechanism r3322 In progress r3321 more fixes... r3318 bugfix1 (69 more to go) r3317 Handle other boolean operators in JH (except ITE) r3316 mechanism for DE to stopSearch r3315 merge from trunk + JH translation continuation r3275 change option to enable JH by default[A
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp18
-rw-r--r--src/smt/smt_engine.h3
2 files changed, 19 insertions, 2 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index a41def821..c95b9d197 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -244,13 +244,15 @@ SmtEngine::SmtEngine(ExprManager* em) throw(AssertionException) :
d_private(new smt::SmtEnginePrivate(*this)),
d_definitionExpansionTime("smt::SmtEngine::definitionExpansionTime"),
d_nonclausalSimplificationTime("smt::SmtEngine::nonclausalSimplificationTime"),
- d_staticLearningTime("smt::SmtEngine::staticLearningTime") {
+ d_staticLearningTime("smt::SmtEngine::staticLearningTime"),
+ d_statResultSource("smt::resultSource", "unknown") {
NodeManagerScope nms(d_nodeManager);
StatisticsRegistry::registerStat(&d_definitionExpansionTime);
StatisticsRegistry::registerStat(&d_nonclausalSimplificationTime);
StatisticsRegistry::registerStat(&d_staticLearningTime);
+ StatisticsRegistry::registerStat(&d_statResultSource);
// We have mutual dependency here, so we add the prop engine to the theory
// engine later (it is non-essential there)
@@ -264,7 +266,7 @@ SmtEngine::SmtEngine(ExprManager* em) throw(AssertionException) :
d_theoryEngine->addTheory<theory::TheoryTraits<THEORY>::theory_class>(THEORY);
CVC4_FOR_EACH_THEORY;
- d_decisionEngine = new DecisionEngine();
+ d_decisionEngine = new DecisionEngine(d_context);
d_propEngine = new PropEngine(d_theoryEngine, d_decisionEngine, d_context);
d_theoryEngine->setPropEngine(d_propEngine);
// d_decisionEngine->setPropEngine(d_propEngine);
@@ -339,12 +341,15 @@ SmtEngine::~SmtEngine() throw() {
StatisticsRegistry::unregisterStat(&d_definitionExpansionTime);
StatisticsRegistry::unregisterStat(&d_nonclausalSimplificationTime);
StatisticsRegistry::unregisterStat(&d_staticLearningTime);
+ StatisticsRegistry::unregisterStat(&d_statResultSource);
+
delete d_private;
delete d_userContext;
delete d_theoryEngine;
delete d_propEngine;
+ //delete d_decisionEngine;
} catch(Exception& e) {
Warning() << "CVC4 threw an exception during cleanup." << endl
<< e << endl;
@@ -967,6 +972,7 @@ Result SmtEngine::check() {
Trace("smt") << "SmtEngine::check(): running check" << endl;
Result result = d_propEngine->checkSat(millis, resource);
+ d_statResultSource.setData("satSolver");
// PropEngine::checkSat() returns the actual amount used in these
// variables.
@@ -976,6 +982,14 @@ Result SmtEngine::check() {
Trace("limit") << "SmtEngine::check(): cumulative millis " << d_cumulativeTimeUsed
<< ", conflicts " << d_cumulativeResourceUsed << endl;
+ if(result.isUnknown() and d_decisionEngine != NULL) {
+ Result deResult = d_decisionEngine->getResult();
+ if(not deResult.isUnknown()) {
+ d_statResultSource.setData("decisionEngine");
+ result = deResult;
+ }
+ }
+
return result;
}
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index abd07538b..7feaa7e61 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -223,6 +223,9 @@ class CVC4_PUBLIC SmtEngine {
TimerStat d_nonclausalSimplificationTime;
/** time spent in static learning */
TimerStat d_staticLearningTime;
+ /** how the SMT engine got the answer -- SAT solver or DE */
+ BackedStat<std::string> d_statResultSource;
+
public:
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback