3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00
* adding dt-solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* move mbp to self-contained module

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* Create CMakeLists.txt

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* rename to bool_var2expr to indicate type class

* mbp

* na

* add projection

* na

* na

* na

* na

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* deps

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* testing arith/q

* na

* newline for model printing

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-10-21 15:48:40 -07:00 committed by GitHub
parent e5cc613bf1
commit 72d407a49f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 903 additions and 618 deletions

View file

@ -27,14 +27,15 @@ namespace q {
solver::solver(euf::solver& ctx, family_id fid) :
th_euf_solver(ctx, ctx.get_manager().get_family_name(fid), fid),
m_mbqi(ctx, *this)
{}
{
}
void solver::asserted(sat::literal l) {
expr* e = bool_var2expr(l.var());
SASSERT(is_forall(e) || is_exists(e));
if (l.sign() == is_forall(e)) {
if (!is_forall(e) && !is_exists(e))
return;
if (l.sign() == is_forall(e))
add_clause(~l, skolemize(to_quantifier(e)));
}
else {
add_clause(~l, specialize(to_quantifier(e)));
ctx.push_vec(m_universal, l);
@ -45,7 +46,7 @@ namespace q {
sat::check_result solver::check() {
if (ctx.get_config().m_mbqi) {
switch (m_mbqi()) {
case l_true: return sat::check_result::CR_DONE;
case l_true: return sat::check_result::CR_DONE;
case l_false: return sat::check_result::CR_CONTINUE;
case l_undef: return sat::check_result::CR_GIVEUP;
}
@ -95,8 +96,8 @@ namespace q {
vars[i] = mk_var(q_flat, i);
var_subst subst(m);
expr_ref body = subst(q_flat->get_expr(), vars);
ctx.get_rewriter()(body);
return b_internalize(body);
rewrite(body);
return mk_literal(body);
}
sat::literal solver::skolemize(quantifier* q) {