3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-21 18:50:26 +00:00

add more simplifiers, fix model reconstruction order for elim_unconstrained

- enable sat.smt in smt_tactic that
is invoked by default on first goals
add flatten-clauses
add push-ite
have tptp5 front-end pretty print SMT2 formulas a little nicer.
This commit is contained in:
Nikolaj Bjorner 2022-12-01 02:35:43 +09:00
parent edb0fc394b
commit cfc8e19baf
10 changed files with 271 additions and 54 deletions

View file

@ -0,0 +1,66 @@
/*++
Copyright (c) 2022 Microsoft Corporation
Module Name:
push_ite.h
Author:
Nikolaj Bjorner (nbjorner) 2022-11-24
--*/
#pragma once
#include "ast/simplifiers/dependent_expr_state.h"
#include "ast/rewriter/push_app_ite.h"
class push_ite_simplifier : public dependent_expr_simplifier {
push_app_ite_rw m_push;
public:
push_ite_simplifier(ast_manager& m, params_ref const& p, dependent_expr_state& fmls, bool c):
dependent_expr_simplifier(m, fmls),
m_push(m) {
m_push.set_conservative(c);
}
char const* name() const override { return "push-app-ite"; }
void reduce() override {
expr_ref r(m);
for (unsigned idx : indices()) {
auto const& d = m_fmls[idx];
m_push(d.fml(), r);
m_fmls.update(idx, dependent_expr(m, r, d.dep()));
}
}
};
class ng_push_ite_simplifier : public dependent_expr_simplifier {
ng_push_app_ite_rw m_push;
public:
ng_push_ite_simplifier(ast_manager& m, params_ref const& p, dependent_expr_state& fmls, bool c):
dependent_expr_simplifier(m, fmls),
m_push(m) {
m_push.set_conservative(c);
}
char const* name() const override { return "ng-push-app-ite"; }
void reduce() override {
expr_ref r(m);
for (unsigned idx : indices()) {
auto const& d = m_fmls[idx];
m_push(d.fml(), r);
m_fmls.update(idx, dependent_expr(m, r, d.dep()));
}
}
};