let assigns_to_zone_inputs_state state assigns =
try
let treat_one_zone acc (_,ins) =
match ins with
FromAny -> raise Top_input
| From l ->
List.fold_left
(fun acc term ->
let loc_ins =
!Db.Properties.Interp.identified_term_zone_to_loc ~result:None
state
term
in
Zone.join
acc
(Locations.valid_enumerate_bits loc_ins))
acc
l
in
match assigns with
WritesAny -> Zone.bottom
| Writes [] -> Zone.bottom
| Writes l -> List.fold_left treat_one_zone Zone.bottom l
with
Top_input -> Zone.top
| Invalid_argument "not an lvalue" ->
CilE.warn_once "Failed to interpret assigns clause in inputs";
Zone.top