Skip to content
Snippets Groups Projects
Commit c5a7757b authored by Valentin Perrelle's avatar Valentin Perrelle
Browse files

Merge branch 'fix/eva/logic-plevel' into 'master'

[Eva] Do not disable all logic reductions when plevel is set to 0.

See merge request frama-c/frama-c!3434
parents d353c581 fe611cc6
No related branches found
No related tags found
No related merge requests found
...@@ -166,14 +166,20 @@ let apply_on_all_locs f loc state = ...@@ -166,14 +166,20 @@ let apply_on_all_locs f loc state =
match loc.Locations.size with match loc.Locations.size with
| Int_Base.Top -> state | Int_Base.Top -> state
| Int_Base.Value _ as size -> | Int_Base.Value _ as size ->
try let loc = Locations.valid_part Locations.Read loc in
let loc = Locations.valid_part Locations.Read loc in let plevel = Value_parameters.ArrayPrecisionLevel.get () in
let loc = loc.Locations.loc in let ilevel = Int_set.get_small_cardinal () in
let plevel = Value_parameters.ArrayPrecisionLevel.get() in let limit = max plevel ilevel in
ignore (Locations.Location_Bits.cardinal_less_than loc plevel); let apply_f base ival state =
Locations.Location_Bits.fold_enum f Locations.(make_loc (Location_Bits.inject base ival) size) state
(fun l acc -> f (Locations.make_loc l size) acc) loc state in
with Not_less_than | Abstract_interp.Error_Top -> state let aux base ival state =
if Ival.cardinal_is_less_than ival limit
then Ival.fold_enum (fun i acc -> apply_f base i acc) ival state
else state
in
try Locations.Location_Bits.fold_i aux loc.loc state
with Abstract_interp.Error_Top -> state
(* Display [o] as a single value, when this is more readable and more precise (* Display [o] as a single value, when this is more readable and more precise
than the standard display. *) than the standard display. *)
......
...@@ -96,22 +96,6 @@ ...@@ -96,22 +96,6 @@
[eva] tests/value/multidim.c:63: [eva] tests/value/multidim.c:63:
function Frama_C_interval: precondition 'order' got status valid. function Frama_C_interval: precondition 'order' got status valid.
[eva] Done for function Frama_C_interval [eva] Done for function Frama_C_interval
[eva:alarm] tests/value/multidim.c:63: Warning:
accessing out of bounds index.
assert 0 ≤ tmp;
(tmp from Frama_C_interval(0, 4 - 1))
[eva:alarm] tests/value/multidim.c:63: Warning:
accessing out of bounds index.
assert tmp < 4;
(tmp from Frama_C_interval(0, 4 - 1))
[eva:alarm] tests/value/multidim.c:63: Warning:
accessing out of bounds index.
assert 0 ≤ tmp_0;
(tmp_0 from Frama_C_interval(0, 4 - 1))
[eva:alarm] tests/value/multidim.c:63: Warning:
accessing out of bounds index.
assert tmp_0 < 4;
(tmp_0 from Frama_C_interval(0, 4 - 1))
[eva] tests/value/multidim.c:65: [eva] tests/value/multidim.c:65:
Frama_C_domain_show_each: Frama_C_domain_show_each:
t1 : # cvalue: [--..--] t1 : # cvalue: [--..--]
......
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