summaryrefslogtreecommitdiff
path: root/src/smt
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2019-08-27 21:07:13 -0500
committerGitHub <noreply@github.com>2019-08-27 21:07:13 -0500
commit453de9df0af984491f6ced883220fdbf113f078b (patch)
tree94e6bcd728add7e81844cb4a70b366de6fd72380 /src/smt
parent9b9ecdf85954e937bd569cba018b6b09eee787a1 (diff)
Fixes for get-abduct (#3229)
Diffstat (limited to 'src/smt')
-rw-r--r--src/smt/smt_engine.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/smt/smt_engine.cpp b/src/smt/smt_engine.cpp
index 1827d902c..3c10516e4 100644
--- a/src/smt/smt_engine.cpp
+++ b/src/smt/smt_engine.cpp
@@ -5127,7 +5127,7 @@ bool SmtEngine::getAbduct(const Expr& conj, const Type& grammarType, Expr& abd)
}
Trace("sygus-abduct") << "SmtEngine::getAbduct: conjecture " << conj
<< std::endl;
- std::vector<Expr> easserts = getAssertions();
+ std::vector<Expr> easserts = getExpandedAssertions();
std::vector<Node> axioms;
for (unsigned i = 0, size = easserts.size(); i < size; i++)
{
@@ -5135,7 +5135,12 @@ bool SmtEngine::getAbduct(const Expr& conj, const Type& grammarType, Expr& abd)
}
std::vector<Node> asserts(axioms.begin(), axioms.end());
// negate the conjecture
- Node conjn = Node::fromExpr(conj).negate();
+ Node conjn = Node::fromExpr(conj);
+ // must expand definitions
+ std::unordered_map<Node, Node, NodeHashFunction> cache;
+ conjn = d_private->expandDefinitions(conjn, cache);
+ // now negate
+ conjn = conjn.negate();
d_abdConj = conjn.toExpr();
asserts.push_back(conjn);
std::string name("A");
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback