Skip to content
Snippets Groups Projects
Commit b49a4a18 authored by David Bühler's avatar David Bühler
Browse files

[inout] Uses the new Eva API instead of Db.Properties.Interp.loc_to_loc*.

parent 1da88da9
No related branches found
No related tags found
No related merge requests found
...@@ -121,41 +121,35 @@ let eval_assigns kf state assigns = ...@@ -121,41 +121,35 @@ let eval_assigns kf state assigns =
in in
let out_term = out.it_content in let out_term = out.it_content in
let outputs_under, outputs_over, deps = let outputs_under, outputs_over, deps =
try if Logic_const.(is_result out_term || is_exit_status out_term)
if Logic_const.(is_result out_term || is_exit_status out_term) then (Zone.bottom, Zone.bottom, Zone.bottom)
then (Zone.bottom, Zone.bottom, Zone.bottom) else
else let output = Eva.Logic_inout.assigns_tlval_to_zones state Write out_term in
let loc_out_under, loc_out_over, deps = match output with
!Db.Properties.Interp.loc_to_loc_under_over ~result:None state out_term | Some output -> output.under, output.over, clean_deps output.deps
in | None ->
(enumerate_valid_bits_under Write loc_out_under, Inout_parameters.warning ~current:true ~once:true
enumerate_valid_bits Write loc_out_over, "failed to interpret assigns clause '%a'" Printer.pp_term out_term;
clean_deps deps) (Zone.bottom, Zone.top, Zone.top)
with Db.Properties.Interp.No_conversion ->
Inout_parameters.warning ~current:true ~once:true
"failed to interpret assigns clause '%a'" Printer.pp_term out_term;
(Zone.bottom, Zone.top, Zone.top)
in in
(* Compute all inputs as a zone *) (* Compute all inputs as a zone *)
let inputs = let inputs =
try match froms with
match froms with | FromAny -> Zone.top
| FromAny -> Zone.top | From l ->
| From l -> let aux acc { it_content = from } =
let aux acc { it_content = from } = let inputs = Eva.Logic_inout.assigns_tlval_to_zones state Read from in
let _, loc, deps = match inputs with
!Db.Properties.Interp.loc_to_loc_under_over ~result:None state from | Some inputs ->
in let acc = Zone.join (clean_deps inputs.deps) acc in
let acc = Zone.join (clean_deps deps) acc in Zone.join inputs.over acc
let z = enumerate_valid_bits Read loc in | _ ->
Zone.join z acc Inout_parameters.warning ~current:true ~once:true
in "failed to interpret inputs in assigns clause '%a'"
List.fold_left aux deps l Printer.pp_from asgn;
with Db.Properties.Interp.No_conversion -> Zone.top
Inout_parameters.warning ~current:true ~once:true in
"failed to interpret inputs in assigns clause '%a'" List.fold_left aux deps l
Printer.pp_from asgn;
Zone.top
in in
(* Fuse all outputs. An output is sure if it was certainly (* Fuse all outputs. An output is sure if it was certainly
overwritten (i.e. is in the left part of an assign clause, overwritten (i.e. is in the left part of an assign clause,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment