diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2016-11-03 15:09:12 -0500 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2016-11-03 15:09:26 -0500 |
commit | b6d5d0b11cf7624cd7a3e0a2f6f77d83d2f7001a (patch) | |
tree | b0e5acbce9023c28bf1bb85eee5da97b79c94561 /src/theory/theory_engine.cpp | |
parent | 8a8455d955c084c9a9f7add1f4e4da6b1dbc35eb (diff) |
Add priorities to getNextDecision. Properly handle case for finite types + unbounded heaps in sep logic. Fix another simple memory leak in sygus.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 12 |
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 { |