diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-08-23 14:00:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-23 14:00:53 -0500 |
commit | 9ddb42136e0a63495d232226cd8dfd0134e54fa6 (patch) | |
tree | 35847601518d255a3fb48a843e857d594db756d5 | |
parent | 085d6a91f0686d6680d15bb54f9435f30d53c331 (diff) |
Exclude redundant lemmas when tracking inst lemmas. (#3210)
-rw-r--r-- | src/theory/quantifiers/inst_match_trie.cpp | 11 | ||||
-rw-r--r-- | test/regress/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/regress/regress1/sygus/issue3205.smt2 | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/theory/quantifiers/inst_match_trie.cpp b/src/theory/quantifiers/inst_match_trie.cpp index 8b8689835..19ef88949 100644 --- a/src/theory/quantifiers/inst_match_trie.cpp +++ b/src/theory/quantifiers/inst_match_trie.cpp @@ -210,8 +210,12 @@ void InstMatchTrie::getInstantiations(std::vector<Node>& insts, { insts.push_back(getInstLemma()); } - else + else if (!options::trackInstLemmas()) { + // If we are tracking instantiation lemmas, then hasInstLemma() + // corresponds exactly to when the lemma was successfully added. + // Hence the above condition guards the case where the instantiation + // was recorded but not sent out as a lemma. insts.push_back(qe->getInstantiate()->getInstantiation(q, terms, true)); } } @@ -469,8 +473,11 @@ void CDInstMatchTrie::getInstantiations(std::vector<Node>& insts, { insts.push_back(getInstLemma()); } - else + else if (!options::trackInstLemmas()) { + // Like in the context-independent case, hasInstLemma() + // corresponds exactly to when the lemma was successfully added when + // trackInstLemmas() is true. insts.push_back( qe->getInstantiate()->getInstantiation(q, terms, true)); } diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 74b602119..e3287983c 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1681,6 +1681,7 @@ set(regress_1_tests regress1/sygus/issue3199.smt2 regress1/sygus/issue3200.smt2 regress1/sygus/issue3201.smt2 + regress1/sygus/issue3205.smt2 regress1/sygus/large-const-simp.sy regress1/sygus/let-bug-simp.sy regress1/sygus/list-head-x.sy diff --git a/test/regress/regress1/sygus/issue3205.smt2 b/test/regress/regress1/sygus/issue3205.smt2 new file mode 100644 index 000000000..b560491cd --- /dev/null +++ b/test/regress/regress1/sygus/issue3205.smt2 @@ -0,0 +1,7 @@ +; EXPECT: sat +; COMMAND-LINE: --sygus-inference +(set-logic ALL) +(declare-fun a () Real) +(assert (= (* a a) 1)) +(check-sat) +(exit) |