mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25:31 +00:00
incorporate ls during propagation
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
836802ed71
commit
5fd1231ec0
4 changed files with 103 additions and 28 deletions
|
@ -106,7 +106,6 @@ namespace sls {
|
|||
m_rewards[v] = m_ddfw->get_reward_avg(w);
|
||||
}
|
||||
m_completed = true;
|
||||
m_min_unsat_size = UINT_MAX;
|
||||
}
|
||||
|
||||
void smt_plugin::bounded_run(unsigned max_iterations) {
|
||||
|
@ -140,6 +139,20 @@ namespace sls {
|
|||
// m_ddfw owns the pointer to smt_plugin and destructs it.
|
||||
dealloc(d);
|
||||
}
|
||||
|
||||
void smt_plugin::get_shared_clauses(vector<sat::literal_vector>& _clauses) {
|
||||
_clauses.reset();
|
||||
for (auto const& clause : clauses()) {
|
||||
if (!all_of(clause.m_clause, [&](sat::literal lit) {
|
||||
return m_sls_bool_var2smt_bool_var.get(lit.var(), sat::null_bool_var) != sat::null_bool_var;
|
||||
}))
|
||||
continue;
|
||||
sat::literal_vector cl;
|
||||
for (auto lit : clause)
|
||||
cl.push_back(sat::literal(m_sls_bool_var2smt_bool_var[lit.var()], lit.sign()));
|
||||
_clauses.push_back(cl);
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& smt_plugin::display(std::ostream& out) {
|
||||
m_ddfw->display(out);
|
||||
|
|
|
@ -107,6 +107,7 @@ namespace sls {
|
|||
// interface to calling solver:
|
||||
void check(expr_ref_vector const& fmls, vector <sat::literal_vector> const& clauses);
|
||||
void finalize(model_ref& md, ::statistics& st);
|
||||
void get_shared_clauses(vector<sat::literal_vector>& clauses);
|
||||
void updt_params(params_ref& p) {}
|
||||
std::ostream& display(std::ostream& out) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue