|
|
|
@ -9,6 +9,9 @@
|
|
|
|
|
|
|
|
|
|
open Fol
|
|
|
|
|
|
|
|
|
|
(** enable stronger unsat checking during normalization *)
|
|
|
|
|
let strong_unsat = false
|
|
|
|
|
|
|
|
|
|
[@@@warning "+9"]
|
|
|
|
|
|
|
|
|
|
type seg = {loc: Term.t; bas: Term.t; len: Term.t; siz: Term.t; cnt: Term.t}
|
|
|
|
@ -794,8 +797,12 @@ let rec simplify_ us rev_xss survived ancestor_subst q =
|
|
|
|
|
(* opt: ctx already normalized so just preserve it *)
|
|
|
|
|
{(norm subst {q with djns= emp.djns; ctx= emp.ctx}) with ctx= q.ctx}
|
|
|
|
|
in
|
|
|
|
|
if strong_unsat && is_unsat stem then false_ stem.us
|
|
|
|
|
else
|
|
|
|
|
(* recursively simplify subformulas *)
|
|
|
|
|
let survived = Var.Set.union survived (fv (elim_exists stem.xs stem)) in
|
|
|
|
|
let survived =
|
|
|
|
|
Var.Set.union survived (fv (elim_exists stem.xs stem))
|
|
|
|
|
in
|
|
|
|
|
let q =
|
|
|
|
|
starN
|
|
|
|
|
( stem
|
|
|
|
@ -813,8 +820,8 @@ let rec simplify_ us rev_xss survived ancestor_subst q =
|
|
|
|
|
assert (Var.Set.disjoint removed (Context.fv q.ctx)) ;
|
|
|
|
|
Var.Set.diff removed (fv ~ignore_ctx:() (elim_exists q.xs q)) )
|
|
|
|
|
in
|
|
|
|
|
(* removed may not contain all variables stem_subst has solutions for,
|
|
|
|
|
so the equations in [∃ removed. stem_subst] that are not
|
|
|
|
|
(* removed may not contain all variables stem_subst has solutions
|
|
|
|
|
for, so the equations in [∃ removed. stem_subst] that are not
|
|
|
|
|
universally valid need to be re-conjoined since they have alredy
|
|
|
|
|
been normalized out *)
|
|
|
|
|
let keep, removed, _ =
|
|
|
|
|