diff options
author | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-18 18:21:27 +0200 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ansys.com> | 2014-06-18 18:21:27 +0200 |
commit | ced4b9677189ea837e267678e9774584b81b087f (patch) | |
tree | f42bb78c2d72f827213b2f9a621dec72db08dd17 | |
parent | 5a4165f55002876033c718303f86e9e1b7417745 (diff) | |
download | scade-analyzer-ced4b9677189ea837e267678e9774584b81b087f.tar.gz scade-analyzer-ced4b9677189ea837e267678e9774584b81b087f.zip |
Presentation changes.
-rw-r--r-- | abstract/abs_interp.ml | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/abstract/abs_interp.ml b/abstract/abs_interp.ml index d706f35..00f7fad 100644 --- a/abstract/abs_interp.ml +++ b/abstract/abs_interp.ml @@ -179,33 +179,44 @@ end = struct let st = init_state widen_delay p root in let pnew = st.env in + let pnew_c = E.apply_cl pnew st.cl in let stay, stay_c = loop st pnew (E.vbottom pnew) in - let final = E.join (E.apply_cl pnew st.cl) stay_c in + Format.printf "@.@[<hov>New %a@]@.@." + E.print_all pnew_c; + Format.printf "@[<hov>Stay %a@]@.@." + E.print_all stay_c; + + let final = E.join pnew_c stay_c in Format.printf "@[<hov>Final %a@]@.@." E.print_all final; let check_guarantee (id, f) = - Format.printf "@[<hv>%s:@ %a@ " - id Formula_printer.print_expr f; - let z = E.apply_f final (BAnd(f, st.f)) in + let cl = Formula.conslist_of_f f in + Format.printf "@[<hv 4>%s:@ %a ⇒ ⊥ @ " + id Formula_printer.print_conslist cl; + let z = E.apply_cl final cl in if E.is_bot z then Format.printf "OK@]@ " else Format.printf "FAIL@]@ " in - Format.printf "Guarantees: @[<v 0>"; - List.iter check_guarantee st.guarantees; - Format.printf "@]@."; - - Format.printf "Probes:@[<v>"; - List.iter (fun (p, id, _) -> - if p then Format.printf " %a ∊ %a@ " - Formula_printer.print_id id - E.print_itv (E.var_itv final id)) - st.all_vars; - Format.printf "@]@." + if st.guarantees <> [] then begin + Format.printf "Guarantee @[<v 0>"; + List.iter check_guarantee st.guarantees; + Format.printf "@]@." + end; + + if List.exists (fun (p, _, _) -> p) st.all_vars then begin + Format.printf "Probes:@[<v>"; + List.iter (fun (p, id, _) -> + if p then Format.printf " %a ∊ %a@ " + Formula_printer.print_id id + E.print_itv (E.var_itv final id)) + st.all_vars; + Format.printf "@]@." + end end |