mirror of
https://github.com/Z3Prover/z3
synced 2025-05-06 23:35:46 +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
|
@ -141,8 +141,8 @@ public:
|
|||
UNARY_CMD(bool_rewriter_cmd, "dbg-bool-rewriter", "<term>", "apply the Boolean rewriter to the given term", CPK_EXPR, expr *, {
|
||||
expr_ref t(ctx.m());
|
||||
params_ref p;
|
||||
p.set_bool(":flat", false);
|
||||
SASSERT(p.get_bool(":flat", true) == false);
|
||||
p.set_bool("flat", false);
|
||||
SASSERT(p.get_bool("flat", true) == false);
|
||||
bool_rewriter_star r(ctx.m(), p);
|
||||
r(arg, t);
|
||||
ctx.display(ctx.regular_stream(), t);
|
||||
|
@ -153,7 +153,7 @@ UNARY_CMD(bool_frewriter_cmd, "dbg-bool-flat-rewriter", "<term>", "apply the Boo
|
|||
expr_ref t(ctx.m());
|
||||
{
|
||||
params_ref p;
|
||||
p.set_bool(":flat", true);
|
||||
p.set_bool("flat", true);
|
||||
bool_rewriter_star r(ctx.m(), p);
|
||||
r(arg, t);
|
||||
}
|
||||
|
@ -165,8 +165,8 @@ UNARY_CMD(elim_and_cmd, "dbg-elim-and", "<term>", "apply the Boolean rewriter (e
|
|||
expr_ref t(ctx.m());
|
||||
{
|
||||
params_ref p;
|
||||
p.set_bool(":flat", true);
|
||||
p.set_bool(":elim-and", true);
|
||||
p.set_bool("flat", true);
|
||||
p.set_bool("elim_and", true);
|
||||
bool_rewriter_star r(ctx.m(), p);
|
||||
r(arg, t);
|
||||
}
|
||||
|
@ -208,15 +208,15 @@ UNARY_CMD(some_value_cmd, "dbg-some-value", "<sort>", "retrieve some value of th
|
|||
void tst_params(cmd_context & ctx) {
|
||||
params_ref p1;
|
||||
params_ref p2;
|
||||
p1.set_uint(":val", 100);
|
||||
p1.set_uint("val", 100);
|
||||
p2 = p1;
|
||||
SASSERT(p2.get_uint(":val", 0) == 100);
|
||||
p2.set_uint(":val", 200);
|
||||
SASSERT(p2.get_uint(":val", 0) == 200);
|
||||
SASSERT(p1.get_uint(":val", 0) == 100);
|
||||
SASSERT(p2.get_uint("val", 0) == 100);
|
||||
p2.set_uint("val", 200);
|
||||
SASSERT(p2.get_uint("val", 0) == 200);
|
||||
SASSERT(p1.get_uint("val", 0) == 100);
|
||||
p2 = p1;
|
||||
SASSERT(p2.get_uint(":val", 0) == 100);
|
||||
SASSERT(p1.get_uint(":val", 0) == 100);
|
||||
SASSERT(p2.get_uint("val", 0) == 100);
|
||||
SASSERT(p1.get_uint("val", 0) == 100);
|
||||
ctx.regular_stream() << "worked" << std::endl;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ static void to_subpaving(cmd_context & ctx, expr * t) {
|
|||
expr2var e2v(m);
|
||||
expr2subpaving e2s(m, *s, &e2v);
|
||||
params_ref p;
|
||||
p.set_bool(":mul-to-power", true);
|
||||
p.set_bool("mul_to_power", true);
|
||||
th_rewriter simp(m, p);
|
||||
expr_ref t_s(m);
|
||||
simp(t, t_s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue