summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-05-03 14:23:48 -0500
committerGitHub <noreply@github.com>2018-05-03 14:23:48 -0500
commitaf67146760804bd18cb85414c17021131d03dcf1 (patch)
tree405c24d08b7ff7001142614b99845cdcf80b6f98
parent64e7ff24ad33a1fb297adfda8ec5aa4631ed9dba (diff)
Interleave quantifiers checks with ground theory checks at LAST_CALL (#1834)
-rw-r--r--src/theory/quantifiers/cegqi/ceg_instantiator.cpp4
-rw-r--r--src/theory/quantifiers/sygus/ce_guided_instantiation.cpp3
-rw-r--r--src/theory/theory_engine.cpp3
-rw-r--r--test/regress/Makefile.tests1
-rw-r--r--test/regress/regress1/quantifiers/nra-interleave-inst.smt218
5 files changed, 23 insertions, 6 deletions
diff --git a/src/theory/quantifiers/cegqi/ceg_instantiator.cpp b/src/theory/quantifiers/cegqi/ceg_instantiator.cpp
index 358efede7..6e59363e2 100644
--- a/src/theory/quantifiers/cegqi/ceg_instantiator.cpp
+++ b/src/theory/quantifiers/cegqi/ceg_instantiator.cpp
@@ -878,10 +878,6 @@ Node CegInstantiator::applySubstitutionToLiteral( Node lit, std::vector< Node >&
}
bool CegInstantiator::check() {
- if( d_qe->getTheoryEngine()->needCheck() ){
- Trace("cbqi-engine") << " CEGQI instantiator : wait until all ground theories are finished." << std::endl;
- return false;
- }
processAssertions();
for( unsigned r=0; r<2; r++ ){
d_effort = r == 0 ? CEG_INST_EFFORT_STANDARD : CEG_INST_EFFORT_FULL;
diff --git a/src/theory/quantifiers/sygus/ce_guided_instantiation.cpp b/src/theory/quantifiers/sygus/ce_guided_instantiation.cpp
index 125682e8c..86f5abf61 100644
--- a/src/theory/quantifiers/sygus/ce_guided_instantiation.cpp
+++ b/src/theory/quantifiers/sygus/ce_guided_instantiation.cpp
@@ -39,7 +39,8 @@ CegInstantiation::~CegInstantiation(){
}
bool CegInstantiation::needsCheck( Theory::Effort e ) {
- return e>=Theory::EFFORT_LAST_CALL;
+ return !d_quantEngine->getTheoryEngine()->needCheck()
+ && e >= Theory::EFFORT_LAST_CALL;
}
QuantifiersModule::QEffort CegInstantiation::needsModel(Theory::Effort e)
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp
index 885c36bb5..edea22fbf 100644
--- a/src/theory/theory_engine.cpp
+++ b/src/theory/theory_engine.cpp
@@ -612,7 +612,8 @@ void TheoryEngine::check(Theory::Effort effort) {
}
}
}
- if( ! d_inConflict && ! needCheck() ){
+ if (!d_inConflict)
+ {
if(d_logicInfo.isQuantified()) {
// quantifiers engine must check at last call effort
d_quantEngine->check(Theory::EFFORT_LAST_CALL);
diff --git a/test/regress/Makefile.tests b/test/regress/Makefile.tests
index 3674e42bb..48c81a13b 100644
--- a/test/regress/Makefile.tests
+++ b/test/regress/Makefile.tests
@@ -1255,6 +1255,7 @@ REG1_TESTS = \
regress1/quantifiers/model_6_1_bv.smt2 \
regress1/quantifiers/mutualrec2.cvc \
regress1/quantifiers/nested9_true-unreach-call.i_575.smt2 \
+ regress1/quantifiers/nra-interleave-inst.smt2 \
regress1/quantifiers/opisavailable-12.smt2 \
regress1/quantifiers/parametric-lists.smt2 \
regress1/quantifiers/psyco-001-bv.smt2 \
diff --git a/test/regress/regress1/quantifiers/nra-interleave-inst.smt2 b/test/regress/regress1/quantifiers/nra-interleave-inst.smt2
new file mode 100644
index 000000000..8e318a372
--- /dev/null
+++ b/test/regress/regress1/quantifiers/nra-interleave-inst.smt2
@@ -0,0 +1,18 @@
+(set-info :smt-lib-version 2.6)
+(set-logic NRA)
+(set-info :status unsat)
+(declare-fun xI () Real)
+(declare-fun ts35uscore2 () Real)
+(declare-fun A () Real)
+(declare-fun B () Real)
+(declare-fun t60uscore0dollarskuscore2 () Real)
+(declare-fun I1 () Real)
+(declare-fun v () Real)
+(declare-fun V () Real)
+(declare-fun xuscore2dollarskuscore50 () Real)
+(declare-fun vuscore2dollarskuscore56 () Real)
+(declare-fun ep () Real)
+(declare-fun I1uscore2dollarskuscore52 () Real)
+(declare-fun x () Real)
+(assert (not (exists ((ts35uscore2 Real)) (let ((?v_1 (- B))) (let ((?v_0 (+ (* ?v_1 ts35uscore2) vuscore2dollarskuscore56)) (?v_3 (+ (* ?v_1 t60uscore0dollarskuscore2) vuscore2dollarskuscore56)) (?v_2 (* (/ 1 2) (+ (+ (* ?v_1 (* t60uscore0dollarskuscore2 t60uscore0dollarskuscore2)) (* (* 2 t60uscore0dollarskuscore2) vuscore2dollarskuscore56)) (* 2 xuscore2dollarskuscore50))))) (=> (and (and (and (and (and (and (and (and (and (and (and (and (and (= I1uscore2dollarskuscore52 2) (=> (and (<= 0 ts35uscore2) (<= ts35uscore2 t60uscore0dollarskuscore2)) (and (and (>= ?v_0 0) (<= ?v_0 V)) (<= ts35uscore2 ep)))) (>= t60uscore0dollarskuscore2 0)) (>= vuscore2dollarskuscore56 0)) (<= vuscore2dollarskuscore56 V)) (< xI xuscore2dollarskuscore50)) (= I1 2)) (< xI x)) (> B 0)) (>= v 0)) (<= v V)) (>= A 0)) (> V 0)) (> ep 0)) (or (< xI ?v_2) (> xI (+ ?v_2 (/ (* ?v_3 ?v_3) (* 2 B)))))))))))
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback