diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-03-30 11:37:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 11:37:14 -0500 |
commit | 4270318b5f553e93fddab1b1abc287ef7e7a5b77 (patch) | |
tree | ce342d0c571fde25c62cb2112a99be75f10ed777 /src/theory/arith/nonlinear_extension.cpp | |
parent | 48767f17e63ea1df001d670429e89d64214ffe11 (diff) |
Do not use factoring inference for transcendental functions (#1707)
Diffstat (limited to 'src/theory/arith/nonlinear_extension.cpp')
-rw-r--r-- | src/theory/arith/nonlinear_extension.cpp | 20 |
1 files changed, 17 insertions, 3 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)) |