summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/expr_miner.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-07-14 01:00:00 -0500
committerGitHub <noreply@github.com>2020-07-13 23:00:00 -0700
commit34043bdcd93860969cfd9e87c683340175c640b9 (patch)
tree06028673de1dff5cc606cfa65ffeb8ca0ac5bf9b /src/theory/quantifiers/expr_miner.cpp
parentd9c81008606b81fb8f6ef1d3e14fe2479c7efaa2 (diff)
Minor refactoring of subsolver initialization (#4731)
This decouples asserting a formula with initialization (previously it was a complex process to assert a formula due to having to clone/export to a new ExprManager). Now it is trivial. This commit fixes an unintended consequence of the previous complications. Previously, SmtEngine::setOption would be set after asserting formulas to an SmtEngine subsolver, which is technically incorrect, as options should be finalized before the first assert. This is required for further cleaning up of options listeners.
Diffstat (limited to 'src/theory/quantifiers/expr_miner.cpp')
-rw-r--r--src/theory/quantifiers/expr_miner.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theory/quantifiers/expr_miner.cpp b/src/theory/quantifiers/expr_miner.cpp
index 6153242e7..00a627adf 100644
--- a/src/theory/quantifiers/expr_miner.cpp
+++ b/src/theory/quantifiers/expr_miner.cpp
@@ -72,13 +72,15 @@ Node ExprMiner::convertToSkolem(Node n)
void ExprMiner::initializeChecker(std::unique_ptr<SmtEngine>& checker,
Node query)
{
- // Convert bound variables to skolems. This ensures the satisfiability
- // check is ground.
- Node squery = convertToSkolem(query);
- initializeSubsolver(checker, squery.toExpr());
+ Assert (!query.isNull());
+ initializeSubsolver(checker);
// also set the options
checker->setOption("sygus-rr-synth-input", false);
checker->setOption("input-language", "smt2");
+ // Convert bound variables to skolems. This ensures the satisfiability
+ // check is ground.
+ Node squery = convertToSkolem(query);
+ checker->assertFormula(squery.toExpr());
}
Result ExprMiner::doCheck(Node query)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback