Commit 4035a124 authored by Martin Clochard's avatar Martin Clochard
parents e6f2f3ff bb4e54da
......@@ -77,6 +77,8 @@ end
*)
(* REMOVED: we do not use BV theory from Z3 in 4.3.2 but starting from 4.4.0
(* bitvector modules, is not in smt-libv2.drv since cvc4 and z3 don't
have the same name for the function to_uint *)
theory bv.BV64
......@@ -98,3 +100,5 @@ theory bv.BV8
syntax converter of_int "((_ int2bv 8) %1)"
syntax function to_uint "(bv2int %1)"
end
*)
\ No newline at end of file
......@@ -263,28 +263,30 @@ let print_decl info fmt d = match d.d_node with
head print_pr pr (print_fmla info) f
| Dprop ((Plemma|Pskip), _, _) -> assert false
let print_decls fm nm rew_rules =
let print_decls fm nm =
(*
Format.eprintf "rewrite rules:";
Spr.iter (fun pr -> Format.eprintf " %s" pr.pr_name.id_string) rew_rules;
Format.eprintf "@.";
*)
let print_decl (sm,fm,ct) fmt d =
let print_decl (sm,fm,rr,ct) fmt d =
let info = { info_syn = sm;
info_fmt = fm;
info_num = nm;
info_srt = ref ct;
info_urg = ref [];
info_rules = rew_rules } in
info_rules = rr } in
try print_decl info fmt d;
(sm,fm,!(info.info_srt)), !(info.info_urg)
(sm,fm,rr,!(info.info_srt)), !(info.info_urg)
with Unsupported s -> raise (UnsupportedDecl (d,s)) in
let print_decl = Printer.sprint_decl print_decl in
let print_decl task acc = print_decl task.Task.task_decl acc in
Discriminate.on_syntax_map (fun sm ->
Trans.fold print_decl ((sm,fm,Mty.empty),[]))
Trans.on_tagged_pr Compute.meta_rewrite (fun rr ->
Trans.fold print_decl ((sm,fm,rr,Mty.empty),[])))
let print_task fm nm =
let print_decls = print_decls fm nm in
fun args ?old:_ fmt task ->
(* In trans-based p-printing [forget_all] is a no-no *)
(* forget_all ident_printer; *)
......@@ -293,10 +295,7 @@ let print_task fm nm =
let rec print = function
| x :: r -> print r; Pp.string fmt x
| [] -> () in
let print_decls_with_meta =
Trans.on_tagged_pr Compute.meta_rewrite (print_decls fm nm)
in
print (snd (Trans.apply print_decls_with_meta task));
print (snd (Trans.apply print_decls task));
pp_print_flush fmt ()
let () =
......
......@@ -355,7 +355,6 @@ name = "Z3"
exec = "z3-4.3.2"
version_switch = "-version"
version_regexp = "Z3 version \\([^ \n\r]+\\)"
version_ok = "4.4.0"
version_ok = "4.3.2"
driver = "drivers/z3_432.drv"
command = "%e -smt2 sat.random_seed=42 nlsat.randomize=false smt.random_seed=42 %f"
......
This diff is collapsed.
......@@ -367,21 +367,30 @@ let () =
discriminate_if_poly
~desc:"Same@ as@ discriminate@ but@ only@ if@ polymorphism@ appear."
let li_add_ls acc = function
| [MAls ls; MAls nls] -> Mls.add nls ls acc
| _ -> assert false
let get_lsinst task =
Task.on_meta meta_lsinst li_add_ls Mls.empty task
let on_lsinst fn =
let add_ls acc = function
| [MAls ls; MAls nls] -> Mls.add nls ls acc
| _ -> assert false in
Trans.on_meta meta_lsinst (fun dls ->
fn (List.fold_left add_ls Mls.empty dls))
fn (List.fold_left li_add_ls Mls.empty dls))
let sm_add_ls sm0 sm = function
| [MAls ls; MAls nls] ->
begin match Mid.find_opt ls.ls_name sm0 with
| Some s -> Mid.add nls.ls_name s sm
| None -> sm
end
| _ -> assert false
let get_syntax_map task =
let sm0 = Printer.get_syntax_map task in
Task.on_meta meta_lsinst (sm_add_ls sm0) sm0 task
let on_syntax_map fn =
let add_ls sm0 sm = function
| [MAls ls; MAls nls] ->
begin match Mid.find_opt ls.ls_name sm0 with
| Some s -> Mid.add nls.ls_name s sm
| None -> sm
end
| _ -> assert false in
Printer.on_syntax_map (fun sm0 ->
Trans.on_meta meta_lsinst (fun dls ->
fn (List.fold_left (fun sm dl -> add_ls sm0 sm dl) sm0 dls)))
fn (List.fold_left (sm_add_ls sm0) sm0 dls)))
......@@ -23,5 +23,8 @@ val ft_select_inst : (Env.env,Ty.Sty.t) Trans.flag_trans
val ft_select_lskept : (Env.env,Term.Sls.t) Trans.flag_trans
val ft_select_lsinst : (Env.env,Lsmap.t) Trans.flag_trans
val get_lsinst : Task.task -> Term.lsymbol Term.Mls.t
val get_syntax_map : Task.task -> Printer.syntax_map
val on_lsinst : (Term.lsymbol Term.Mls.t -> 'a Trans.trans) -> 'a Trans.trans
val on_syntax_map : (Printer.syntax_map -> 'a Trans.trans) -> 'a Trans.trans
......@@ -409,8 +409,6 @@ end
(* TODO / TO DISCUSS
- reverse
- what about s[i..j] when i..j is not a valid range?
left undefined? empty sequence?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment