mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 03:57:51 +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
|
@ -16,25 +16,16 @@ Author:
|
|||
--*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "util/params.h"
|
||||
#include "tactic/tactic.h"
|
||||
#include "tactic/dependent_expr_state_tactic.h"
|
||||
#include "ast/simplifiers/card2bv.h"
|
||||
|
||||
class card2bv_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 alloc(card2bv, m, p, s);
|
||||
}
|
||||
};
|
||||
|
||||
inline tactic* mk_card2bv_tactic(ast_manager& m, params_ref const& p = params_ref()) {
|
||||
return alloc(dependent_expr_state_tactic, m, p, alloc(card2bv_tactic_factory));
|
||||
return alloc(dependent_expr_state_tactic, m, p,
|
||||
[](auto& m, auto& p, auto &s) -> dependent_expr_simplifier* { return alloc(card2bv, m, p, s); });
|
||||
}
|
||||
|
||||
/*
|
||||
ADD_TACTIC("card2bv", "convert pseudo-boolean constraints to bit-vectors.", "mk_card2bv_tactic(m, p)")
|
||||
*/
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue