summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-07-31 21:44:22 +0000
committerMorgan Deters <mdeters@gmail.com>2012-07-31 21:44:22 +0000
commitc90b1b66e6c8e3b77f2b73b73208f120445e5f91 (patch)
treecc409476d04f4c0bfe1b889bf291b87f729ab78a /src
parentb88133bc679c541798c2063fec2bc441e744328a (diff)
fixes for portfolio
Diffstat (limited to 'src')
-rw-r--r--src/smt/smt_engine.cpp8
-rw-r--r--src/theory/rewriter.cpp14
2 files changed, 15 insertions, 7 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 0acc53693..272bfe04e 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -345,7 +345,6 @@ void SmtEngine::finishInit() {
d_theoryEngine->setPropEngine(d_propEngine);
d_theoryEngine->setDecisionEngine(d_decisionEngine);
-
}
void SmtEngine::finalOptionsAreSet() {
@@ -353,8 +352,8 @@ void SmtEngine::finalOptionsAreSet() {
return;
}
- finishInit(); // finish initalization, creating prop
- // engine etc.
+ // finish initalization, creat the prop engine, etc.
+ finishInit();
AlwaysAssert( d_propEngine->getAssertionLevel() == 0,
"The PropEngine has pushed but the SmtEngine "
@@ -1992,6 +1991,9 @@ void SmtEngine::internalPop() {
}
void SmtEngine::interrupt() throw(ModalException) {
+ if(!d_fullyInited) {
+ return;
+ }
d_propEngine->interrupt();
}
diff --git a/src/theory/rewriter.cpp b/src/theory/rewriter.cpp
index a91243343..988b2b327 100644
--- a/src/theory/rewriter.cpp
+++ b/src/theory/rewriter.cpp
@@ -30,7 +30,9 @@ static TheoryId theoryOf(TNode node) {
return Theory::theoryOf(THEORY_OF_TYPE_BASED, node);
}
-std::hash_set<Node, NodeHashFunction> d_rewriteStack;
+#ifdef CVC4_ASSERTIONS
+static CVC4_THREADLOCAL(std::hash_set<Node, NodeHashFunction>*) s_rewriteStack = NULL;
+#endif /* CVC4_ASSERTIONS */
/**
* TheoryEngine::rewrite() keeps a stack of things that are being pre-
@@ -72,6 +74,10 @@ Node Rewriter::rewriteTo(theory::TheoryId theoryId, Node node) {
#ifdef CVC4_ASSERTIONS
bool isEquality = node.getKind() == kind::EQUAL;
+
+ if(s_rewriteStack == NULL) {
+ s_rewriteStack = new std::hash_set<Node, NodeHashFunction>();
+ }
#endif
Trace("rewriter") << "Rewriter::rewriteTo(" << theoryId << "," << node << ")"<< std::endl;
@@ -171,12 +177,12 @@ Node Rewriter::rewriteTo(theory::TheoryId theoryId, Node node) {
Assert(response.node != rewriteStackTop.node);
//TODO: this is not thread-safe - should make this assertion dependent on sequential build
#ifdef CVC4_ASSERTIONS
- Assert(d_rewriteStack.find(response.node) == d_rewriteStack.end());
- d_rewriteStack.insert(response.node);
+ Assert(s_rewriteStack->find(response.node) == s_rewriteStack->end());
+ s_rewriteStack->insert(response.node);
#endif
rewriteStackTop.node = rewriteTo(newTheoryId, response.node);
#ifdef CVC4_ASSERTIONS
- d_rewriteStack.erase(response.node);
+ s_rewriteStack->erase(response.node);
#endif
break;
} else if (response.status == REWRITE_DONE) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback