This PR improves the integration of the CAD solver with the nl-ext solver in a simple way: we simply use a few of the simple linearization lemmas in combination with CAD by default, significantly improving the performance on QF_NRA.
[[option]]
name = "nlExt"
category = "regular"
- long = "nl-ext"
- type = "bool"
- default = "true"
+ long = "nl-ext=MODE"
+ type = "NlExtMode"
+ default = "FULL"
help = "incremental linearization approach to non-linear"
+ help_mode = "Modes for the non-linear linearization"
+[[option.mode.NONE]]
+ name = "none"
+ help = "Disable linearization approach"
+[[option.mode.LIGHT]]
+ name = "light"
+ help = "Only use a few light-weight lemma schemes"
+[[option.mode.FULL]]
+ name = "full"
+ help = "Use all lemma schemes"
[[option]]
name = "nlExtResBound"
opts.set(options::nlCad, true);
if (!opts.wasSetByUser(options::nlExt))
{
- opts.set(options::nlExt, false);
+ opts.set(options::nlExt, options::NlExtMode::LIGHT);
}
if (!opts.wasSetByUser(options::nlRlvMode))
{
Notice() << "Cannot use --" << options::nlCad.name
<< " without configuring with --poly." << std::endl;
opts.set(options::nlCad, false);
- opts.set(options::nlExt, true);
+ opts.set(options::nlExt, options::NlExtMode::FULL);
}
}
#endif
// relevance here, since we may have discarded literals that are relevant
// that are entailed based on the techniques in getAssertions.
std::vector<Node> passertions = assertions;
- if (options::nlExt())
+ if (options::nlExt() == options::NlExtMode::FULL)
{
// preprocess the assertions with the trancendental solver
if (!d_trSlv.preprocessAssertionsCheckModel(passertions))
}
// we are incomplete
- if (options::nlExt() && options::nlExtIncPrecision()
- && d_model.usedApproximate())
+ if (options::nlExt() == options::NlExtMode::FULL
+ && options::nlExtIncPrecision() && d_model.usedApproximate())
{
d_trSlv.incrementTaylorDegree();
needsRecheck = true;
{
one << InferStep::ICP << InferStep::BREAK;
}
- if (options::nlExt())
+ if (options::nlExt() == options::NlExtMode::FULL
+ || options::nlExt() == options::NlExtMode::LIGHT)
{
- one << InferStep::NL_INIT << InferStep::TRANS_INIT << InferStep::BREAK;
+ one << InferStep::NL_INIT << InferStep::BREAK;
+ }
+ if (options::nlExt() == options::NlExtMode::FULL)
+ {
+ one << InferStep::TRANS_INIT << InferStep::BREAK;
if (options::nlExtSplitZero())
{
one << InferStep::NL_SPLIT_ZERO << InferStep::BREAK;
}
one << InferStep::IAND_INIT;
one << InferStep::IAND_INITIAL << InferStep::BREAK;
- if (options::nlExt())
+ if (options::nlExt() == options::NlExtMode::FULL
+ || options::nlExt() == options::NlExtMode::LIGHT)
{
one << InferStep::NL_MONOMIAL_SIGN << InferStep::BREAK;
- one << InferStep::TRANS_MONOTONIC << InferStep::BREAK;
one << InferStep::NL_MONOMIAL_MAGNITUDE0 << InferStep::BREAK;
+ }
+ if (options::nlExt() == options::NlExtMode::FULL)
+ {
+ one << InferStep::TRANS_MONOTONIC << InferStep::BREAK;
one << InferStep::NL_MONOMIAL_MAGNITUDE1 << InferStep::BREAK;
one << InferStep::NL_MONOMIAL_MAGNITUDE2 << InferStep::BREAK;
one << InferStep::NL_MONOMIAL_INFER_BOUNDS;
; REQUIRES: poly
-; COMMAND-LINE: --theoryof-mode=term --nl-ext --nl-icp
+; COMMAND-LINE: --theoryof-mode=term --nl-icp
; EXPECT: unknown
(set-logic QF_NRA)
(declare-fun x () Real)
-; COMMAND-LINE: --nl-ext
; EXPECT: sat
(set-logic QF_NRA)
(set-info :status sat)
-; COMMAND-LINE:
+; COMMAND-LINE: --nl-ext=none
; EXPECT: sat
(set-logic QF_NRA)
(set-info :status sat)
-; COMMAND-LINE: --no-nl-ext --nl-cad
+; COMMAND-LINE: --nl-ext=none --nl-cad
; REQUIRES: poly
; EXPECT: unsat
(set-logic QF_NRA)
-; COMMAND-LINE: --no-nl-ext --nl-cad
+; COMMAND-LINE: --nl-ext=none --nl-cad
; REQUIRES: poly
; EXPECT: sat
(set-logic QF_NRA)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NIA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --no-check-models
+; COMMAND-LINE: --nl-ext=full --no-check-models
; EXPECT: sat
(set-logic QF_NRAT)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --simplification=none
+; COMMAND-LINE: --nl-ext=full --simplification=none
; EXPECT: sat
(set-logic QF_UFNRA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :source |
(declare-fun c () Real)
(declare-fun t () Real)
(assert (forall ((s Real)) (and (> t 0) (= 0 (* t c)) (or (< s c) (> s 1.0)))))
-; previously answered "sat" with --no-nl-ext --nl-rlv=always
+; previously answered "sat" with --nl-ext=none --nl-rlv=always
(check-sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRAT)
(set-info :status sat)
-; COMMAND-LINE: --incremental --nl-ext --fmf-fun-rlv --no-check-models
+; COMMAND-LINE: --incremental --nl-ext=full --fmf-fun-rlv --no-check-models
(set-logic UFNIA)
(set-info :smt-lib-version 2.6)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_UFNRAT)
(declare-fun x () Real)
-; COMMAND-LINE: --nl-ext --no-nl-ext-tf-tplanes --no-nl-ext-inc-prec
+; COMMAND-LINE: --nl-ext=full --no-nl-ext-tf-tplanes --no-nl-ext-inc-prec
; EXPECT: unknown
(set-logic UFNRAT)
(declare-fun f (Real) Real)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NIA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes -q
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes -q
; EXPECT: sat
(set-logic QF_UFNIA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext --decision=internal --no-check-models
+; COMMAND-LINE: --nl-ext=full --decision=internal --no-check-models
; EXPECT: sat
(set-logic ALL)
(assert (or (< 60.3 (exp 4.1) 60.4) (< (exp 5.1) 164.1)))
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --no-new-prop
+; COMMAND-LINE: --nl-ext=full --no-new-prop
; EXPECT: sat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext --no-new-prop
+; COMMAND-LINE: --nl-ext=full --no-new-prop
; EXPECT: sat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic UFNIA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic UFNIA)
(set-info :source |Benchmarks from the paper: "Extending Sledgehammer with SMT Solvers" by Jasmin Blanchette, Sascha Bohme, and Lawrence C. Paulson, CADE 2011. Translated to SMT2 by Andrew Reynolds and Morgan Deters.|)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: sat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic UFNIA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NIA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: sat
(set-logic QF_NIRA)
(set-info :status sat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NIRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_UFNRAT)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :status unsat)
-; COMMAND-LINE: --nl-ext --nl-ext-tplanes
+; COMMAND-LINE: --nl-ext=full --nl-ext-tplanes
; EXPECT: unsat
(set-logic QF_NRA)
(set-info :source |
-; COMMAND-LINE: --nl-ext
+; COMMAND-LINE: --nl-ext=full
; EXPECT: unsat
(set-logic QF_NIA)
(declare-const n Int)