diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2018-05-10 16:48:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-10 16:48:51 -0500 |
commit | adcbee78823120baa47eb8ba868b614512a121a9 (patch) | |
tree | f019c19fa63cc06c8b4e93df2cbde7d61791368b /src/theory/quantifiers/extended_rewrite.cpp | |
parent | f29ced85757a85b6bd72b741d6ac7ff45ba29619 (diff) |
Sygus repair constants (#1812)
Diffstat (limited to 'src/theory/quantifiers/extended_rewrite.cpp')
-rw-r--r-- | src/theory/quantifiers/extended_rewrite.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/theory/quantifiers/extended_rewrite.cpp b/src/theory/quantifiers/extended_rewrite.cpp index c52d22cdb..98a493423 100644 --- a/src/theory/quantifiers/extended_rewrite.cpp +++ b/src/theory/quantifiers/extended_rewrite.cpp @@ -771,8 +771,14 @@ Node ExtendedRewriter::extendedRewriteEqRes(Kind andk, if (lit[1].getType() == lit.getType()) { // t != s ---> ~t = s - Assert(lit[1].getKind() != notk); - eq = nm->mkNode(EQUAL, TermUtil::mkNegate(notk, lit[0]), lit[1]); + if (lit[1].getKind() == notk && lit[0].getKind() != notk) + { + eq = nm->mkNode(EQUAL, lit[0], TermUtil::mkNegate(notk, lit[1])); + } + else + { + eq = nm->mkNode(EQUAL, TermUtil::mkNegate(notk, lit[0]), lit[1]); + } } } else @@ -1070,8 +1076,6 @@ bool ExtendedRewriter::inferSubstitution(Node n, { n = slv_eq; } - NodeManager* nm = NodeManager::currentNM(); - Node v[2]; for (unsigned i = 0; i < 2; i++) { |