summaryrefslogtreecommitdiff
path: root/src/theory/theory_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r--src/theory/theory_engine.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index c3e853ec0..9de8fa0dd 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -739,21 +739,25 @@ void TheoryEngine::propagate(Theory::Effort effort) {
Node TheoryEngine::getNextDecisionRequest() {
// Definition of the statement that is to be run by every theory
+ unsigned min_priority;
+ Node dec;
#ifdef CVC4_FOR_EACH_THEORY_STATEMENT
#undef CVC4_FOR_EACH_THEORY_STATEMENT
#endif
#define CVC4_FOR_EACH_THEORY_STATEMENT(THEORY) \
if (theory::TheoryTraits<THEORY>::hasGetNextDecisionRequest && d_logicInfo.isTheoryEnabled(THEORY)) { \
- Node n = theoryOf(THEORY)->getNextDecisionRequest(); \
- if(! n.isNull()) { \
- return n; \
+ unsigned priority; \
+ Node n = theoryOf(THEORY)->getNextDecisionRequest( priority ); \
+ if(! n.isNull() && ( dec.isNull() || priority<min_priority ) ) { \
+ dec = n; \
+ min_priority = priority; \
} \
}
// Request decision from each theory using the statement above
CVC4_FOR_EACH_THEORY;
- return TNode();
+ return dec;
}
bool TheoryEngine::properConflict(TNode conflict) const {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback