mirror of
https://github.com/Z3Prover/z3
synced 2025-07-20 11:22:04 +00:00
add slicing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
352912c6b5
commit
523dc0fb36
1 changed files with 14 additions and 5 deletions
|
@ -22,6 +22,8 @@ Revision History:
|
||||||
#include"horn_tactic.h"
|
#include"horn_tactic.h"
|
||||||
#include"dl_context.h"
|
#include"dl_context.h"
|
||||||
#include"expr_replacer.h"
|
#include"expr_replacer.h"
|
||||||
|
#include"dl_rule_transformer.h"
|
||||||
|
#include"dl_mk_slice.h"
|
||||||
|
|
||||||
class horn_tactic : public tactic {
|
class horn_tactic : public tactic {
|
||||||
struct imp {
|
struct imp {
|
||||||
|
@ -30,9 +32,9 @@ class horn_tactic : public tactic {
|
||||||
datalog::context m_ctx;
|
datalog::context m_ctx;
|
||||||
smt_params m_fparams;
|
smt_params m_fparams;
|
||||||
|
|
||||||
imp(bool is_simplify, ast_manager & m, params_ref const & p):
|
imp(bool t, ast_manager & m, params_ref const & p):
|
||||||
m(m),
|
m(m),
|
||||||
m_is_simplify(is_simplify),
|
m_is_simplify(t),
|
||||||
m_ctx(m, m_fparams) {
|
m_ctx(m, m_fparams) {
|
||||||
updt_params(p);
|
updt_params(p);
|
||||||
}
|
}
|
||||||
|
@ -284,6 +286,13 @@ class horn_tactic : public tactic {
|
||||||
m_ctx.get_rules(); // flush adding rules.
|
m_ctx.get_rules(); // flush adding rules.
|
||||||
m_ctx.apply_default_transformation(mc, pc);
|
m_ctx.apply_default_transformation(mc, pc);
|
||||||
|
|
||||||
|
if (m_ctx.get_params().slice()) {
|
||||||
|
datalog::rule_transformer transformer(m_ctx);
|
||||||
|
datalog::mk_slice* slice = alloc(datalog::mk_slice, m_ctx);
|
||||||
|
transformer.register_plugin(slice);
|
||||||
|
m_ctx.transform_rules(transformer, mc, pc);
|
||||||
|
}
|
||||||
|
|
||||||
expr_substitution sub(m);
|
expr_substitution sub(m);
|
||||||
sub.insert(q, m.mk_false());
|
sub.insert(q, m.mk_false());
|
||||||
scoped_ptr<expr_replacer> rep = mk_default_expr_replacer(m);
|
scoped_ptr<expr_replacer> rep = mk_default_expr_replacer(m);
|
||||||
|
@ -308,10 +317,10 @@ class horn_tactic : public tactic {
|
||||||
statistics m_stats;
|
statistics m_stats;
|
||||||
imp * m_imp;
|
imp * m_imp;
|
||||||
public:
|
public:
|
||||||
horn_tactic(bool is_simplify, ast_manager & m, params_ref const & p):
|
horn_tactic(bool t, ast_manager & m, params_ref const & p):
|
||||||
m_is_simplify(is_simplify),
|
m_is_simplify(t),
|
||||||
m_params(p) {
|
m_params(p) {
|
||||||
m_imp = alloc(imp, is_simplify, m, p);
|
m_imp = alloc(imp, t, m, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual tactic * translate(ast_manager & m) {
|
virtual tactic * translate(ast_manager & m) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue