mirror of
https://github.com/Z3Prover/z3
synced 2025-08-09 12:50:32 +00:00
add synth_solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
31677a0570
commit
8e16acce19
2 changed files with 13 additions and 8 deletions
|
@ -96,14 +96,12 @@ namespace synth {
|
||||||
}
|
}
|
||||||
|
|
||||||
sat::check_result solver::check() {
|
sat::check_result solver::check() {
|
||||||
// TODO: need to know if there are quantifiers to instantiate
|
if (m_synth.empty())
|
||||||
if (m_solved.size() < m_synth.size()) {
|
|
||||||
IF_VERBOSE(2, ctx.display(verbose_stream()));
|
|
||||||
return sat::check_result::CR_DONE;
|
return sat::check_result::CR_DONE;
|
||||||
}
|
|
||||||
if (!compute_solutions())
|
SASSERT(m_solved.size() < m_synth.size());
|
||||||
return sat::check_result::CR_GIVEUP;
|
IF_VERBOSE(2, ctx.display(verbose_stream()));
|
||||||
return sat::check_result::CR_CONTINUE;
|
return sat::check_result::CR_GIVEUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
// display current state (eg. current set of realizers)
|
// display current state (eg. current set of realizers)
|
||||||
|
@ -118,6 +116,13 @@ namespace synth {
|
||||||
return alloc(solver, ctx);
|
return alloc(solver, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void solver::asserted(sat::literal lit) {
|
||||||
|
// lit corresponds to a Boolean output variable.
|
||||||
|
// it is asserted.
|
||||||
|
// assume that we attach this theory to such Boolean output variables.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void solver::on_merge_eh(euf::enode* root, euf::enode* other) {
|
void solver::on_merge_eh(euf::enode* root, euf::enode* other) {
|
||||||
|
|
||||||
auto is_computable = [&](euf::enode* n) { return !contains_uncomputable(n->get_expr()) || m_is_computable.get(n->get_root_id(), false); };
|
auto is_computable = [&](euf::enode* n) { return !contains_uncomputable(n->get_expr()) || m_is_computable.get(n->get_root_id(), false); };
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace synth {
|
||||||
public:
|
public:
|
||||||
solver(euf::solver& ctx);
|
solver(euf::solver& ctx);
|
||||||
~solver() override;
|
~solver() override;
|
||||||
void asserted(sat::literal lit) override {}
|
void asserted(sat::literal lit) override;
|
||||||
sat::check_result check() override;
|
sat::check_result check() override;
|
||||||
void push_core() override {}
|
void push_core() override {}
|
||||||
void pop_core(unsigned n) override {}
|
void pop_core(unsigned n) override {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue