diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-08-28 15:25:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 15:25:12 -0500 |
commit | 2978e5fa3434b80d3ca440ec482d5fe07bf5d368 (patch) | |
tree | 4d23b1ad09a1448b980b2db1708c115b585437cf /src/theory/booleans/theory_bool.cpp | |
parent | f9173b366ff32814ce74402765310efed48d4610 (diff) |
Solve equalities between Boolean variables in presolve. (#2390)
Diffstat (limited to 'src/theory/booleans/theory_bool.cpp')
-rw-r--r-- | src/theory/booleans/theory_bool.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/theory/booleans/theory_bool.cpp b/src/theory/booleans/theory_bool.cpp index 3c6801f28..d025c4966 100644 --- a/src/theory/booleans/theory_bool.cpp +++ b/src/theory/booleans/theory_bool.cpp @@ -40,20 +40,20 @@ Theory::PPAssertStatus TheoryBool::ppAssert(TNode in, SubstitutionMap& outSubsti // Add the substitution from the variable to its value if (in.getKind() == kind::NOT) { - if (in[0].getKind() == kind::VARIABLE) { + if (in[0].isVar()) + { outSubstitutions.addSubstitution(in[0], NodeManager::currentNM()->mkConst<bool>(false)); - } else { - return PP_ASSERT_STATUS_UNSOLVED; + return PP_ASSERT_STATUS_SOLVED; } } else { - if (in.getKind() == kind::VARIABLE) { + if (in.isVar()) + { outSubstitutions.addSubstitution(in, NodeManager::currentNM()->mkConst<bool>(true)); - } else { - return PP_ASSERT_STATUS_UNSOLVED; + return PP_ASSERT_STATUS_SOLVED; } } - return PP_ASSERT_STATUS_SOLVED; + return Theory::ppAssert(in, outSubstitutions); } /* |