Option to interleave tangent plane inferences (#1833)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Thu, 3 May 2018 17:24:08 +0000 (12:24 -0500)
committerGitHub <noreply@github.com>
Thu, 3 May 2018 17:24:08 +0000 (12:24 -0500)
contrib/run-script-smtcomp2018
src/options/arith_options.toml
src/smt/smt_engine.cpp
src/theory/arith/nonlinear_extension.cpp

index 403f6c8a838c2a0d3bee326fc03bfe97ef16a15d..b920152b2572e89d1b7d7569a4b4dea9492a32ea 100644 (file)
@@ -34,7 +34,8 @@ QF_LIA)
   finishwith --miplib-trick --miplib-trick-subs=4 --use-approx --lemmas-on-replay-failure --replay-early-close-depth=4 --replay-lemma-reject-cut=128 --replay-reject-cut=512 --unconstrained-simp --use-soi --pb-rewrites
   ;;
 QF_NIA)
-  trywith 300 --nl-ext --nl-ext-tplanes --decision=internal
+  trywith 300 --nl-ext-tplanes --decision=internal
+  trywith 30 --no-nl-ext-tplanes --decision=internal
   # this totals up to more than 20 minutes, although notice that smaller bit-widths may quickly fail
   trywith 300 --solve-int-as-bv=2 --bitblast=eager --bv-sat-solver=cryptominisat
   trywith 300 --solve-int-as-bv=4 --bitblast=eager --bv-sat-solver=cryptominisat
@@ -43,10 +44,10 @@ QF_NIA)
   finishwith --solve-int-as-bv=32 --bitblast=eager --bv-sat-solver=cryptominisat
   ;;
 QF_NRA)
-  trywith 300 --nl-ext --nl-ext-tplanes --decision=internal
-  trywith 300 --nl-ext --nl-ext-tplanes --decision=justification --no-nl-ext-factor
-  trywith 30 --nl-ext --nl-ext-tplanes --decision=internal --solve-real-as-int
-  finishwith --nl-ext --nl-ext-tplanes --decision=justification
+  trywith 300 --nl-ext-tplanes --decision=internal
+  trywith 300 --nl-ext-tplanes --decision=justification --no-nl-ext-factor
+  trywith 30 --nl-ext-tplanes --decision=internal --solve-real-as-int
+  finishwith --nl-ext-tplanes --decision=justification
   ;;
 # all logics with UF + quantifiers should either fall under this or special cases below
 ALIA|AUFLIA|AUFLIRA|AUFNIRA|UF|UFIDL|UFLIA|UFLRA|UFNIA|UFDT|UFDTLIA|AUFDTLIA|AUFBVDTLIA)
index b2b5f0c31ff018a2c917802ed8a42f4c0224e00c..bb572688b95d859067d57ead08cee418a52f0802 100644 (file)
@@ -450,6 +450,14 @@ header = "options/arith_options.h"
   read_only  = true
   help       = "use non-terminating tangent plane strategy for non-linear"
 
+[[option]]
+  name       = "nlExtTangentPlanesInterleave"
+  category   = "regular"
+  long       = "nl-ext-tplanes-interleave"
+  type       = "bool"
+  default    = "false"
+  help       = "interleave tangent plane strategy for non-linear"
+
 [[option]]
   name       = "nlExtTfTangentPlanes"
   category   = "regular"
index ca01ccd8e8c96915f4ec25ba8bab72a72774bd2f..0cff9c8fa8618af18d9aa54ae0da1583794d9e98 100644 (file)
@@ -1726,6 +1726,14 @@ void SmtEngine::setDefaults() {
   if (options::arithRewriteEq()) {
     d_earlyTheoryPP = false;
   }
+  if (d_logic.isPure(THEORY_ARITH) && !d_logic.areRealsUsed())
+  {
+    if (!options::nlExtTangentPlanesInterleave.wasSetByUser())
+    {
+      Trace("smt") << "setting nlExtTangentPlanesInterleave to true" << endl;
+      options::nlExtTangentPlanesInterleave.set(true);
+    }
+  }
 
   // Set decision mode based on logic (if not set by user)
   if(!options::decisionMode.wasSetByUser()) {
index c2ebc55b8a725dbe125401ab2cebe2bbd4daf889..f790a9f1a51a6db0ec686a2e932be16f5d78a218 100644 (file)
@@ -1553,6 +1553,13 @@ int NonlinearExtension::checkLastCall(const std::vector<Node>& assertions,
   // nt_lemmas.size() << std::endl;  prioritize lemmas that do not
   // introduce new monomials
   lemmas_proc = flushLemmas(lemmas);
+
+  if (options::nlExtTangentPlanes() && options::nlExtTangentPlanesInterleave())
+  {
+    lemmas = checkTangentPlanes();
+    lemmas_proc += flushLemmas(lemmas);
+  }
+
   if (lemmas_proc > 0) {
     Trace("nl-ext") << "  ...finished with " << lemmas_proc << " new lemmas."
                     << std::endl;
@@ -1590,7 +1597,7 @@ int NonlinearExtension::checkLastCall(const std::vector<Node>& assertions,
   }
   
   //------------------------------------tangent planes
-  if (options::nlExtTangentPlanes())
+  if (options::nlExtTangentPlanes() && !options::nlExtTangentPlanesInterleave())
   {
     lemmas = checkTangentPlanes();
     d_waiting_lemmas.insert(