summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-03-30 11:37:14 -0500
committerGitHub <noreply@github.com>2018-03-30 11:37:14 -0500
commit4270318b5f553e93fddab1b1abc287ef7e7a5b77 (patch)
treece342d0c571fde25c62cb2112a99be75f10ed777 /src
parent48767f17e63ea1df001d670429e89d64214ffe11 (diff)
Do not use factoring inference for transcendental functions (#1707)
Diffstat (limited to 'src')
-rw-r--r--src/theory/arith/nonlinear_extension.cpp20
-rw-r--r--src/theory/arith/nonlinear_extension.h5
2 files changed, 21 insertions, 4 deletions
diff --git a/src/theory/arith/nonlinear_extension.cpp b/src/theory/arith/nonlinear_extension.cpp
index 07cf43a35..38b53e107 100644
--- a/src/theory/arith/nonlinear_extension.cpp
+++ b/src/theory/arith/nonlinear_extension.cpp
@@ -2886,9 +2886,23 @@ std::vector<Node> NonlinearExtension::checkFactoring(
{
bool polarity = lit.getKind() != NOT;
Node atom = lit.getKind() == NOT ? lit[0] : lit;
- if (std::find(false_asserts.begin(), false_asserts.end(), lit)
- != false_asserts.end()
- || d_skolem_atoms.find(atom) != d_skolem_atoms.end())
+ Node litv = computeModelValue(lit);
+ bool considerLit = false;
+ if( d_skolem_atoms.find(atom) != d_skolem_atoms.end() )
+ {
+ //always consider skolem literals
+ considerLit = true;
+ }
+ else
+ {
+ // Only consider literals that evaluate to false in the model.
+ // this is a stronger restriction than the restriction that lit is in
+ // false_asserts.
+ // This excludes (most) literals that contain transcendental functions.
+ considerLit = computeModelValue(lit)==d_false;
+ }
+
+ if (considerLit)
{
std::map<Node, Node> msum;
if (ArithMSum::getMonomialSumLit(atom, msum))
diff --git a/src/theory/arith/nonlinear_extension.h b/src/theory/arith/nonlinear_extension.h
index 96d37cbc2..8b1a320a2 100644
--- a/src/theory/arith/nonlinear_extension.h
+++ b/src/theory/arith/nonlinear_extension.h
@@ -426,7 +426,10 @@ class NonlinearExtension {
/** cache of terms t for which we have added the lemma ( t = 0 V t != 0 ). */
NodeSet d_zero_split;
- // literals with Skolems (need not be satisfied by model)
+ /**
+ * The set of atoms with Skolems that this solver introduced. We do not
+ * require that models satisfy literals over Skolem atoms.
+ */
NodeSet d_skolem_atoms;
/** commonly used terms */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback