diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-08-14 10:37:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 10:37:03 -0500 |
commit | 4924138b1431d7bbc263bc4a6c63510926da3c72 (patch) | |
tree | df0f434bdd7d5dd048742f0646996c4afa45d399 /src/theory/quantifiers/term_database.cpp | |
parent | 5c97514836a18ddb0d00041c013445f2b93efd25 (diff) |
Fix issue related to higher-order purification in term database (#3157)
Diffstat (limited to 'src/theory/quantifiers/term_database.cpp')
-rw-r--r-- | src/theory/quantifiers/term_database.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/theory/quantifiers/term_database.cpp b/src/theory/quantifiers/term_database.cpp index 989609a76..84147bf6b 100644 --- a/src/theory/quantifiers/term_database.cpp +++ b/src/theory/quantifiers/term_database.cpp @@ -1039,7 +1039,21 @@ bool TermDb::reset( Theory::Effort effort ){ } Trace("quant-ho") << "- assert purify equality : " << eq << std::endl; ee->assertEquality(eq, true, eq); - Assert(ee->consistent()); + if (!ee->consistent()) + { + // In some rare cases, purification functions (in the domain of + // d_ho_purify_to_term) may escape the term database. For example, + // matching algorithms may construct instantiations involving these + // functions. As a result, asserting these equalities internally may + // cause a conflict. In this case, we insist that the purification + // equality is sent out as a lemma here. + Trace("term-db-lemma") + << "Purify equality lemma: " << eq << std::endl; + d_quantEngine->addLemma(eq); + d_quantEngine->setConflict(); + d_consistent_ee = false; + return false; + } } } } |