mirror of
https://github.com/Z3Prover/z3
synced 2025-08-26 21:16:02 +00:00
simplify factory of dependent_expr_state_tactic
And as a side-effect, remove heap allocations for factories
This commit is contained in:
parent
de916f50d6
commit
eb8c53c164
12 changed files with 26 additions and 123 deletions
|
@ -20,14 +20,7 @@ Author:
|
|||
#include "tactic/dependent_expr_state_tactic.h"
|
||||
#include "tactic/bv/bv_slice_tactic.h"
|
||||
|
||||
|
||||
class bv_slice_factory : public dependent_expr_simplifier_factory {
|
||||
public:
|
||||
dependent_expr_simplifier* mk(ast_manager& m, params_ref const& p, dependent_expr_state& s) override {
|
||||
return alloc(bv::slice, m, s);
|
||||
}
|
||||
};
|
||||
|
||||
tactic* mk_bv_slice_tactic(ast_manager& m, params_ref const& p) {
|
||||
return alloc(dependent_expr_state_tactic, m, p, alloc(bv_slice_factory));
|
||||
return alloc(dependent_expr_state_tactic, m, p,
|
||||
[](auto& m, auto& p, auto &s) -> dependent_expr_simplifier* { return alloc(bv::slice, m, s); });
|
||||
}
|
||||
|
|
|
@ -24,15 +24,8 @@ Revision History:
|
|||
#include "ast/simplifiers/max_bv_sharing.h"
|
||||
#include "tactic/dependent_expr_state_tactic.h"
|
||||
|
||||
class max_bv_sharing_tactic_factory : public dependent_expr_simplifier_factory {
|
||||
public:
|
||||
dependent_expr_simplifier* mk(ast_manager& m, params_ref const& p, dependent_expr_state& s) override {
|
||||
return mk_max_bv_sharing(m, p, s);
|
||||
}
|
||||
};
|
||||
|
||||
inline tactic* mk_max_bv_sharing_tactic(ast_manager& m, params_ref const& p = params_ref()) {
|
||||
return alloc(dependent_expr_state_tactic, m, p, alloc(max_bv_sharing_tactic_factory));
|
||||
return alloc(dependent_expr_state_tactic, m, p, mk_max_bv_sharing);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue