mirror of
https://github.com/Z3Prover/z3
synced 2025-08-19 01:32:17 +00:00
saved params work
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
c3055207ed
commit
cf28cbab0a
130 changed files with 1469 additions and 948 deletions
|
@ -122,11 +122,11 @@ public:
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_sk_hack_enabled = p.get_bool(":nnf-sk-hack", false);
|
||||
m_sk_hack_enabled = p.get_bool("sk_hack", false);
|
||||
}
|
||||
|
||||
static void get_param_descrs(param_descrs & r) {
|
||||
r.insert(":nnf-sk-hack", CPK_BOOL, "(default: false) hack for VCC");
|
||||
r.insert("sk_hack", CPK_BOOL, "(default: false) hack for VCC");
|
||||
}
|
||||
|
||||
ast_manager & m() const { return m_manager; }
|
||||
|
@ -264,7 +264,7 @@ struct nnf::imp {
|
|||
}
|
||||
|
||||
void updt_local_params(params_ref const & p) {
|
||||
symbol mode_sym = p.get_sym(":nnf-mode", m_skolem);
|
||||
symbol mode_sym = p.get_sym("mode", m_skolem);
|
||||
if (mode_sym == m_skolem)
|
||||
m_mode = NNF_SKOLEM;
|
||||
else if (mode_sym == "full")
|
||||
|
@ -276,18 +276,18 @@ struct nnf::imp {
|
|||
|
||||
TRACE("nnf", tout << "nnf-mode: " << m_mode << " " << mode_sym << "\n" << p << "\n";);
|
||||
|
||||
m_ignore_labels = p.get_bool(":nnf-ignore-labels", false);
|
||||
m_skolemize = p.get_bool(":skolemize", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_ignore_labels = p.get_bool("ignore_labels", false);
|
||||
m_skolemize = p.get_bool("skolemize", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
}
|
||||
|
||||
static void get_param_descrs(param_descrs & r) {
|
||||
insert_max_memory(r);
|
||||
r.insert(":nnf-mode", CPK_SYMBOL,
|
||||
r.insert("mode", CPK_SYMBOL,
|
||||
"(default: skolem) NNF translation mode: skolem (skolem normal form), quantifiers (skolem normal form + quantifiers in NNF), full");
|
||||
r.insert(":nnf-ignore-labels", CPK_BOOL,
|
||||
r.insert("ignore_labels", CPK_BOOL,
|
||||
"(default: false) remove/ignore labels in the input formula, this option is ignored if proofs are enabled");
|
||||
r.insert(":skolemize", CPK_BOOL,
|
||||
r.insert("skolemize", CPK_BOOL,
|
||||
"(default: true) skolemize (existential force) quantifiers");
|
||||
skolemizer::get_param_descrs(r);
|
||||
}
|
||||
|
@ -884,15 +884,15 @@ nnf::nnf(ast_manager & m, defined_names & n, params_ref const & p) {
|
|||
nnf::nnf(ast_manager & m, defined_names & n, nnf_params & np) {
|
||||
params_ref p;
|
||||
if (np.m_nnf_mode == NNF_FULL)
|
||||
p.set_sym(":nnf-mode", symbol("full"));
|
||||
p.set_sym("mode", symbol("full"));
|
||||
else if (np.m_nnf_mode == NNF_QUANT)
|
||||
p.set_sym(":nnf-mode", symbol("quantifiers"));
|
||||
p.set_sym("mode", symbol("quantifiers"));
|
||||
|
||||
if (np.m_nnf_ignore_labels)
|
||||
p.set_bool(":nnf-ignore-labels", true);
|
||||
p.set_bool("ignore_labels", true);
|
||||
|
||||
if (np.m_nnf_sk_hack)
|
||||
p.set_bool(":nnf-sk-hack", true);
|
||||
p.set_bool("sk_hack", true);
|
||||
m_imp = alloc(imp, m, n, p);
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ public:
|
|||
);
|
||||
|
||||
void updt_params(params_ref const & p);
|
||||
/*
|
||||
REG_MODULE_PARAMS('nnf', 'nnf::get_param_descrs')
|
||||
*/
|
||||
static void get_param_descrs(param_descrs & r);
|
||||
|
||||
void cancel() { set_cancel(true); }
|
||||
|
|
|
@ -19,6 +19,24 @@ Revision History:
|
|||
#include"pp.h"
|
||||
using namespace format_ns;
|
||||
|
||||
void pp_param_descrs(param_descrs & p) {
|
||||
p.insert("max_indent", CPK_UINT, "max. indentation in pretty printer");
|
||||
p.insert("max_num_lines", CPK_UINT, "max. number of lines to be displayed in pretty printer");
|
||||
p.insert("max_width", CPK_UINT, "max. width in pretty printer");
|
||||
p.insert("max_ribbon", CPK_UINT, "max. ribbon (width - indentation) in pretty printer");
|
||||
p.insert("max_depth", CPK_UINT, "max. term depth (when pretty printing SMT2 terms/formulas)");
|
||||
p.insert("min_alias_size", CPK_UINT, "min. size for creating an alias for a shared term (when pretty printing SMT2 terms/formulas)");
|
||||
p.insert("decimal", CPK_BOOL, "pretty print real numbers using decimal notation (the output may be truncated). Z3 adds a '?' if the value is not precise");
|
||||
p.insert("decimal_precision", CPK_BOOL, "maximum number of decimal places to be used when pp.decimal=true");
|
||||
p.insert("bv_literals", CPK_BOOL, "use Bit-Vector literals (e.g, #x0F and #b0101) during pretty printing");
|
||||
p.insert("bv_neg", CPK_BOOL, "use bvneg when displaying Bit-Vector literals where the most significant bit is 1");
|
||||
p.insert("flat_assoc", CPK_BOOL, "flat associative operators (when pretty printing SMT2 terms/formulas)");
|
||||
p.insert("fixed_indent", CPK_BOOL, "use a fixed indentation for applications");
|
||||
p.insert("single_line", CPK_BOOL, "ignore line breaks when true");
|
||||
p.insert("bounded", CPK_BOOL, "ignore characters exceeding max widht");
|
||||
p.insert("simplify_implies", CPK_BOOL, "simplify nested implications for pretty printing");
|
||||
}
|
||||
|
||||
pp_params g_pp_params;
|
||||
|
||||
void set_pp_default_params(pp_params const & p) {
|
||||
|
|
|
@ -21,6 +21,12 @@ Revision History:
|
|||
|
||||
#include"format.h"
|
||||
#include"pp_params.h"
|
||||
#include"params.h"
|
||||
|
||||
/*
|
||||
REG_MODULE_PARAMS('pp', 'pp_param_descrs')
|
||||
*/
|
||||
void pp_param_descrs(param_descrs & d);
|
||||
|
||||
void set_pp_default_params(pp_params const & p);
|
||||
void register_pp_params(ini_params & p);
|
||||
|
|
|
@ -22,18 +22,18 @@ Notes:
|
|||
#include"ast_pp.h"
|
||||
|
||||
void arith_rewriter::updt_local_params(params_ref const & p) {
|
||||
m_arith_lhs = p.get_bool(":arith-lhs", false);
|
||||
m_gcd_rounding = p.get_bool(":gcd-rounding", false);
|
||||
m_eq2ineq = p.get_bool(":eq2ineq", false);
|
||||
m_elim_to_real = p.get_bool(":elim-to-real", false);
|
||||
m_push_to_real = p.get_bool(":push-to-real", true);
|
||||
m_anum_simp = p.get_bool(":algebraic-number-evaluator", true);
|
||||
m_max_degree = p.get_uint(":max-degree", 64);
|
||||
m_expand_power = p.get_bool(":expand-power", false);
|
||||
m_mul2power = p.get_bool(":mul-to-power", false);
|
||||
m_elim_rem = p.get_bool(":elim-rem", false);
|
||||
m_expand_tan = p.get_bool(":expand-tan", false);
|
||||
set_sort_sums(p.get_bool(":sort-sums", false)); // set here to avoid collision with bvadd
|
||||
m_arith_lhs = p.get_bool("arith_lhs", false);
|
||||
m_gcd_rounding = p.get_bool("gcd_rounding", false);
|
||||
m_eq2ineq = p.get_bool("eq2ineq", false);
|
||||
m_elim_to_real = p.get_bool("elim_to_real", false);
|
||||
m_push_to_real = p.get_bool("push_to_real", true);
|
||||
m_anum_simp = p.get_bool("algebraic_number_evaluator", true);
|
||||
m_max_degree = p.get_uint("max_degree", 64);
|
||||
m_expand_power = p.get_bool("expand_power", false);
|
||||
m_mul2power = p.get_bool("mul_to_power", false);
|
||||
m_elim_rem = p.get_bool("elim_rem", false);
|
||||
m_expand_tan = p.get_bool("expand_tan", false);
|
||||
set_sort_sums(p.get_bool("sort_sums", false)); // set here to avoid collision with bvadd
|
||||
}
|
||||
|
||||
void arith_rewriter::updt_params(params_ref const & p) {
|
||||
|
@ -43,18 +43,18 @@ void arith_rewriter::updt_params(params_ref const & p) {
|
|||
|
||||
void arith_rewriter::get_param_descrs(param_descrs & r) {
|
||||
poly_rewriter<arith_rewriter_core>::get_param_descrs(r);
|
||||
r.insert(":algebraic-number-evaluator", CPK_BOOL, "(default: true) simplify/evaluate expressions containing (algebraic) irrational numbers.");
|
||||
r.insert(":mul-to-power", CPK_BOOL, "(default: false) collpase (* t ... t) into (^ t k), it is ignored if :expand-power is true.");
|
||||
r.insert(":expand-power", CPK_BOOL, "(default: false) expand (^ t k) into (* t ... t) if 1 < k <= :max-degree.");
|
||||
r.insert(":expand-tan", CPK_BOOL, "(default: false) replace (tan x) with (/ (sin x) (cos x)).");
|
||||
r.insert(":max-degree", CPK_UINT, "(default: 64) max degree of algebraic numbers (and power operators) processed by simplifier.");
|
||||
r.insert(":eq2ineq", CPK_BOOL, "(default: false) split arithmetic equalities into two inequalities.");
|
||||
r.insert(":sort-sums", CPK_BOOL, "(default: false) sort the arguments of + application.");
|
||||
r.insert(":gcd-rounding", CPK_BOOL, "(default: false) use gcd rounding on integer arithmetic atoms.");
|
||||
r.insert(":arith-lhs", CPK_BOOL, "(default: false) all monomials are moved to the left-hand-side, and the right-hand-side is just a constant.");
|
||||
r.insert(":elim-to-real", CPK_BOOL, "(default: false) eliminate to_real from arithmetic predicates that contain only integers.");
|
||||
r.insert(":push-to-real", CPK_BOOL, "(default: true) distribute to_real over * and +.");
|
||||
r.insert(":elim-rem", CPK_BOOL, "(default: false) replace (rem x y) with (ite (>= y 0) (mod x y) (- (mod x y))).");
|
||||
r.insert("algebraic_number_evaluator", CPK_BOOL, "(default: true) simplify/evaluate expressions containing (algebraic) irrational numbers.");
|
||||
r.insert("mul_to_power", CPK_BOOL, "(default: false) collpase (* t ... t) into (^ t k), it is ignored if expand_power is true.");
|
||||
r.insert("expand_power", CPK_BOOL, "(default: false) expand (^ t k) into (* t ... t) if 1 < k <= max_degree.");
|
||||
r.insert("expand_tan", CPK_BOOL, "(default: false) replace (tan x) with (/ (sin x) (cos x)).");
|
||||
r.insert("max_degree", CPK_UINT, "(default: 64) max degree of algebraic numbers (and power operators) processed by simplifier.");
|
||||
r.insert("eq2ineq", CPK_BOOL, "(default: false) split arithmetic equalities into two inequalities.");
|
||||
r.insert("sort_sums", CPK_BOOL, "(default: false) sort the arguments of + application.");
|
||||
r.insert("gcd_rounding", CPK_BOOL, "(default: false) use gcd rounding on integer arithmetic atoms.");
|
||||
r.insert("arith_lhs", CPK_BOOL, "(default: false) all monomials are moved to the left-hand-side, and the right-hand-side is just a constant.");
|
||||
r.insert("elim_to_real", CPK_BOOL, "(default: false) eliminate to_real from arithmetic predicates that contain only integers.");
|
||||
r.insert("push_to_real", CPK_BOOL, "(default: true) distribute to_real over * and +.");
|
||||
r.insert("elim_rem", CPK_BOOL, "(default: false) replace (rem x y) with (ite (>= y 0) (mod x y) (- (mod x y))).");
|
||||
}
|
||||
|
||||
br_status arith_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result) {
|
||||
|
|
|
@ -21,13 +21,13 @@ Notes:
|
|||
#include"ast_pp.h"
|
||||
|
||||
void array_rewriter::updt_params(params_ref const & p) {
|
||||
m_sort_store = p.get_bool(":sort-store", false);
|
||||
m_expand_select_store = p.get_bool(":expand-select-store", false);
|
||||
m_sort_store = p.get_bool("sort_store", false);
|
||||
m_expand_select_store = p.get_bool("expand_select_store", false);
|
||||
}
|
||||
|
||||
void array_rewriter::get_param_descrs(param_descrs & r) {
|
||||
r.insert(":expand-select-store", CPK_BOOL, "(default: false) replace a (select (store ...) ...) term by an if-then-else term.");
|
||||
r.insert(":sort-store", CPK_BOOL, "(default: false) sort nested stores when the indices are known to be different.");
|
||||
r.insert("expand_select_store", CPK_BOOL, "(default: false) replace a (select (store ...) ...) term by an if-then-else term.");
|
||||
r.insert("sort_store", CPK_BOOL, "(default: false) sort nested stores when the indices are known to be different.");
|
||||
}
|
||||
|
||||
br_status array_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result) {
|
||||
|
|
|
@ -125,12 +125,12 @@ struct blaster_rewriter_cfg : public default_rewriter_cfg {
|
|||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint(":max-steps", UINT_MAX);
|
||||
m_blast_add = p.get_bool(":blast-add", true);
|
||||
m_blast_mul = p.get_bool(":blast-mul", true);
|
||||
m_blast_full = p.get_bool(":blast-full", false);
|
||||
m_blast_quant = p.get_bool(":blast-quant", false);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint("max_steps", UINT_MAX);
|
||||
m_blast_add = p.get_bool("blast_add", true);
|
||||
m_blast_mul = p.get_bool("blast_mul", true);
|
||||
m_blast_full = p.get_bool("blast_full", false);
|
||||
m_blast_quant = p.get_bool("blast_quant", false);
|
||||
m_blaster.set_max_memory(m_max_memory);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,21 +20,22 @@ Notes:
|
|||
#include"rewriter_def.h"
|
||||
|
||||
void bool_rewriter::updt_params(params_ref const & p) {
|
||||
m_flat = p.get_bool(":flat", true);
|
||||
m_elim_and = p.get_bool(":elim-and", false);
|
||||
m_local_ctx = p.get_bool(":local-ctx", false);
|
||||
m_local_ctx_limit = p.get_uint(":local-ctx-limit", UINT_MAX);
|
||||
m_blast_distinct = p.get_bool(":blast-distinct", false);
|
||||
m_ite_extra_rules = p.get_bool(":ite-extra-rules", false);
|
||||
m_flat = p.get_bool("flat", true);
|
||||
m_elim_and = p.get_bool("elim_and", false);
|
||||
m_local_ctx = p.get_bool("local_ctx", false);
|
||||
m_local_ctx_limit = p.get_uint("local_ctx_limit", UINT_MAX);
|
||||
m_blast_distinct = p.get_bool("blast_distinct", false);
|
||||
m_ite_extra_rules = p.get_bool("ite_extra_rules", false);
|
||||
}
|
||||
|
||||
void bool_rewriter::get_param_descrs(param_descrs & r) {
|
||||
r.insert(":ite-extra-rules", CPK_BOOL, "(default: false) extra ite simplifications, these additional simplifications may reduce size locally but increase globally.");
|
||||
r.insert(":flat", CPK_BOOL, "(default: true) create nary applications for and,or,+,*,bvadd,bvmul,bvand,bvor,bvxor.");
|
||||
r.insert(":elim-and", CPK_BOOL, "(default: false) conjunctions are rewritten using negation and disjunctions.");
|
||||
r.insert(":local-ctx", CPK_BOOL, "(default: false) perform local (i.e., cheap) context simplifications.");
|
||||
r.insert(":local-ctx-limit", CPK_UINT, "(default: inf) limit for applying local context simplifier.");
|
||||
r.insert(":blast-distinct", CPK_BOOL, "(default: false) expand a distinct predicate into a quadratic number of disequalities.");
|
||||
r.insert("ite_extra_rules", CPK_BOOL,
|
||||
"(default: false) extra ite simplifications, these additional simplifications may reduce size locally but increase globally.");
|
||||
r.insert("flat", CPK_BOOL, "(default: true) create nary applications for and,or,+,*,bvadd,bvmul,bvand,bvor,bvxor.");
|
||||
r.insert("elim_and", CPK_BOOL, "(default: false) conjunctions are rewritten using negation and disjunctions.");
|
||||
r.insert("local_ctx", CPK_BOOL, "(default: false) perform local (i.e., cheap) context simplifications.");
|
||||
r.insert("local_ctx_limit", CPK_UINT, "(default: inf) limit for applying local context simplifier.");
|
||||
r.insert("blast_distinct", CPK_BOOL, "(default: false) expand a distinct predicate into a quadratic number of disequalities.");
|
||||
}
|
||||
|
||||
br_status bool_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr * const * args, expr_ref & result) {
|
||||
|
|
|
@ -54,14 +54,14 @@ app * mk_extract_proc::operator()(unsigned high, unsigned low, expr * arg) {
|
|||
}
|
||||
|
||||
void bv_rewriter::updt_local_params(params_ref const & p) {
|
||||
m_hi_div0 = p.get_bool(":hi-div0", true);
|
||||
m_elim_sign_ext = p.get_bool(":elim-sign-ext", true);
|
||||
m_mul2concat = p.get_bool(":mul2concat", false);
|
||||
m_bit2bool = p.get_bool(":bit2bool", true);
|
||||
m_blast_eq_value = p.get_bool(":blast-eq-value", false);
|
||||
m_mkbv2num = p.get_bool(":mkbv2num", false);
|
||||
m_split_concat_eq = p.get_bool(":split-concat-eq", false);
|
||||
m_udiv2mul = p.get_bool(":udiv2mul", false);
|
||||
m_hi_div0 = p.get_bool("hi_div0", true);
|
||||
m_elim_sign_ext = p.get_bool("elim_sign_ext", true);
|
||||
m_mul2concat = p.get_bool("mul2concat", false);
|
||||
m_bit2bool = p.get_bool("bit2bool", true);
|
||||
m_blast_eq_value = p.get_bool("blast_eq_value", false);
|
||||
m_mkbv2num = p.get_bool("mkbv2num", false);
|
||||
m_split_concat_eq = p.get_bool("split_concat_eq", false);
|
||||
m_udiv2mul = p.get_bool("udiv2mul", false);
|
||||
}
|
||||
|
||||
void bv_rewriter::updt_params(params_ref const & p) {
|
||||
|
@ -71,15 +71,15 @@ void bv_rewriter::updt_params(params_ref const & p) {
|
|||
|
||||
void bv_rewriter::get_param_descrs(param_descrs & r) {
|
||||
poly_rewriter<bv_rewriter_core>::get_param_descrs(r);
|
||||
r.insert(":udiv2mul", CPK_BOOL, "(default: false) convert constant udiv to mul.");
|
||||
r.insert(":split-concat-eq", CPK_BOOL, "(default: false) split equalities of the form (= (concat t1 t2) t3).");
|
||||
r.insert(":bit2bool", CPK_BOOL, "(default: true) try to convert bit-vector terms of size 1 into Boolean terms.");
|
||||
r.insert(":blast-eq-value", CPK_BOOL, "(default: false) blast (some) Bit-vector equalities into bits.");
|
||||
r.insert(":elim-sign-ext", CPK_BOOL, "(default: true) expand sign-ext operator using concat and extract.");
|
||||
r.insert(":hi-div0", CPK_BOOL, "(default: true) use the 'hardware interpretation' for division by zero (for bit-vector terms).");
|
||||
r.insert(":mul2concat", CPK_BOOL, "(default: false) replace multiplication by a power of two into a concatenation.");
|
||||
r.insert("udiv2mul", CPK_BOOL, "(default: false) convert constant udiv to mul.");
|
||||
r.insert("split_concat_eq", CPK_BOOL, "(default: false) split equalities of the form (= (concat t1 t2) t3).");
|
||||
r.insert("bit2bool", CPK_BOOL, "(default: true) try to convert bit-vector terms of size 1 into Boolean terms.");
|
||||
r.insert("blast_eq_value", CPK_BOOL, "(default: false) blast (some) Bit-vector equalities into bits.");
|
||||
r.insert("elim_sign_ext", CPK_BOOL, "(default: true) expand sign-ext operator using concat and extract.");
|
||||
r.insert("hi_div0", CPK_BOOL, "(default: true) use the 'hardware interpretation' for division by zero (for bit-vector terms).");
|
||||
r.insert("mul2concat", CPK_BOOL, "(default: false) replace multiplication by a power of two into a concatenation.");
|
||||
#ifndef _EXTERNAL_RELEASE
|
||||
r.insert(":mkbv2num", CPK_BOOL, "(default: false) convert (mkbv [true/false]*) into a numeral");
|
||||
r.insert("mkbv2num", CPK_BOOL, "(default: false) convert (mkbv [true/false]*) into a numeral");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -27,19 +27,19 @@ char const * poly_rewriter<Config>::g_ste_blowup_msg = "sum of monomials blowup"
|
|||
|
||||
template<typename Config>
|
||||
void poly_rewriter<Config>::updt_params(params_ref const & p) {
|
||||
m_flat = p.get_bool(":flat", true);
|
||||
m_som = p.get_bool(":som", false);
|
||||
m_hoist_mul = p.get_bool(":hoist-mul", false);
|
||||
m_hoist_cmul = p.get_bool(":hoist-cmul", false);
|
||||
m_som_blowup = p.get_uint(":som-blowup", UINT_MAX);
|
||||
m_flat = p.get_bool("flat", true);
|
||||
m_som = p.get_bool("som", false);
|
||||
m_hoist_mul = p.get_bool("hoist_mul", false);
|
||||
m_hoist_cmul = p.get_bool("hoist_cmul", false);
|
||||
m_som_blowup = p.get_uint("som_blowup", UINT_MAX);
|
||||
}
|
||||
|
||||
template<typename Config>
|
||||
void poly_rewriter<Config>::get_param_descrs(param_descrs & r) {
|
||||
r.insert(":som", CPK_BOOL, "(default: false) put polynomials in som-of-monomials form.");
|
||||
r.insert(":som-blowup", CPK_UINT, "(default: infty) maximum number of monomials generated when putting a polynomial in sum-of-monomials normal form");
|
||||
r.insert(":hoist-mul", CPK_BOOL, "(default: false) hoist multiplication over summation to minimize number of multiplications");
|
||||
r.insert(":hoist-cmul", CPK_BOOL, "(default: false) hoist constant multiplication over summation to minimize number of multiplications");
|
||||
r.insert("som", CPK_BOOL, "(default: false) put polynomials in som-of-monomials form.");
|
||||
r.insert("som_blowup", CPK_UINT, "(default: infty) maximum number of monomials generated when putting a polynomial in sum-of-monomials normal form");
|
||||
r.insert("hoist_mul", CPK_BOOL, "(default: false) hoist multiplication over summation to minimize number of multiplications");
|
||||
r.insert("hoist_cmul", CPK_BOOL, "(default: false) hoist constant multiplication over summation to minimize number of multiplications");
|
||||
}
|
||||
|
||||
template<typename Config>
|
||||
|
|
|
@ -57,13 +57,13 @@ struct th_rewriter_cfg : public default_rewriter_cfg {
|
|||
ast_manager & m() const { return m_b_rw.m(); }
|
||||
|
||||
void updt_local_params(params_ref const & p) {
|
||||
m_flat = p.get_bool(":flat", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint(":max-memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint(":max-steps", UINT_MAX);
|
||||
m_pull_cheap_ite = p.get_bool(":pull-cheap-ite", false);
|
||||
m_cache_all = p.get_bool(":cache-all", false);
|
||||
m_push_ite_arith = p.get_bool(":push-ite-arith", false);
|
||||
m_push_ite_bv = p.get_bool(":push-ite-bv", false);
|
||||
m_flat = p.get_bool("flat", true);
|
||||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_max_steps = p.get_uint("max_steps", UINT_MAX);
|
||||
m_pull_cheap_ite = p.get_bool("pull_cheap_ite", false);
|
||||
m_cache_all = p.get_bool("cache_all", false);
|
||||
m_push_ite_arith = p.get_bool("push_ite_arith", false);
|
||||
m_push_ite_bv = p.get_bool("push_ite_bv", false);
|
||||
}
|
||||
|
||||
void updt_params(params_ref const & p) {
|
||||
|
@ -695,10 +695,10 @@ void th_rewriter::get_param_descrs(param_descrs & r) {
|
|||
array_rewriter::get_param_descrs(r);
|
||||
insert_max_memory(r);
|
||||
insert_max_steps(r);
|
||||
r.insert(":push-ite-arith", CPK_BOOL, "(default: false) push if-then-else over arithmetic terms.");
|
||||
r.insert(":push-ite-bv", CPK_BOOL, "(default: false) push if-then-else over bit-vector terms.");
|
||||
r.insert(":pull-cheap-ite", CPK_BOOL, "(default: false) pull if-then-else terms when cheap.");
|
||||
r.insert(":cache-all", CPK_BOOL, "(default: false) cache all intermediate results.");
|
||||
r.insert("push_ite_arith", CPK_BOOL, "(default: false) push if-then-else over arithmetic terms.");
|
||||
r.insert("push_ite_bv", CPK_BOOL, "(default: false) push if-then-else over bit-vector terms.");
|
||||
r.insert("pull_cheap_ite", CPK_BOOL, "(default: false) pull if-then-else terms when cheap.");
|
||||
r.insert("cache_all", CPK_BOOL, "(default: false) cache all intermediate results.");
|
||||
}
|
||||
|
||||
th_rewriter::~th_rewriter() {
|
||||
|
|
|
@ -37,7 +37,9 @@ public:
|
|||
|
||||
void updt_params(params_ref const & p);
|
||||
static void get_param_descrs(param_descrs & r);
|
||||
|
||||
/*
|
||||
REG_MODULE_PARAMS('simplify', 'th_rewriter::get_param_descrs')
|
||||
*/
|
||||
unsigned get_cache_size() const;
|
||||
unsigned get_num_steps() const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue