summaryrefslogtreecommitdiff
path: root/src/theory/arith/nl/cad_solver.cpp
diff options
context:
space:
mode:
authorGereon Kremer <gereon.kremer@cs.rwth-aachen.de>2020-08-28 17:26:02 +0200
committerGitHub <noreply@github.com>2020-08-28 10:26:02 -0500
commit64eae4836286d95a04126d7bcffb18c5eb383bc1 (patch)
tree799679356ba6e17a9684b7d94d6773c3e58e0bb3 /src/theory/arith/nl/cad_solver.cpp
parentd03fa5697e278bef5cbc385978634421cb5a050b (diff)
(cad-solver) Fixed excluding lemma generation. (#4958)
The lemma generation for partial cad checks had a number of issues that have been fixed in this PR. The previous version had both soundness issues and a very naive approach to handling algebraic numbers. This new version is sound (fingers crossed) and allows to construct more precise, but also more complex lemmas. To avoid constructing very large lemmas, a (somewhat arbitrary) limit based on the size of coefficients was added.
Diffstat (limited to 'src/theory/arith/nl/cad_solver.cpp')
-rw-r--r--src/theory/arith/nl/cad_solver.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theory/arith/nl/cad_solver.cpp b/src/theory/arith/nl/cad_solver.cpp
index bb1ef9911..b1f0894fb 100644
--- a/src/theory/arith/nl/cad_solver.cpp
+++ b/src/theory/arith/nl/cad_solver.cpp
@@ -134,10 +134,12 @@ std::vector<NlLemma> CadSolver::checkPartial()
premise = nm->mkNode(Kind::AND, interval.d_origins);
}
Node conclusion =
- excluding_interval_to_lemma(first_var, interval.d_interval);
- Node lemma = nm->mkNode(Kind::IMPLIES, premise, conclusion);
- Trace("nl-cad") << "Excluding " << first_var << " -> " << interval.d_interval << " using " << lemma << std::endl;
- lems.emplace_back(lemma, Inference::CAD_EXCLUDED_INTERVAL);
+ excluding_interval_to_lemma(first_var, interval.d_interval, false);
+ if (!conclusion.isNull()) {
+ Node lemma = nm->mkNode(Kind::IMPLIES, premise, conclusion);
+ Trace("nl-cad") << "Excluding " << first_var << " -> " << interval.d_interval << " using " << lemma << std::endl;
+ lems.emplace_back(lemma, Inference::CAD_EXCLUDED_INTERVAL);
+ }
}
}
return lems;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback