Skip to content

Commit d6456c8

Browse files
committed
narrow thresholds for int interval sets
1 parent 11526a8 commit d6456c8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cdomain/value/cdomains/intDomain.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,8 +1393,9 @@ struct
13931393
let min_ys = minimal ys |> Option.get in
13941394
let max_ys = maximal ys |> Option.get in
13951395
let min_range,max_range = range ik in
1396-
let min = if min_xs =. min_range then min_ys else min_xs in
1397-
let max = if max_xs =. max_range then max_ys else max_xs in
1396+
let threshold = get_interval_threshold_widening () in
1397+
let min = if min_xs =. min_range || threshold && min_ys <. min_xs && IArith.is_lower_threshold min_xs then min_ys else min_xs in
1398+
let max = if max_xs =. max_range || threshold && max_ys <. max_xs && IArith.is_upper_threshold max_xs then max_ys else max_xs in
13981399
xs
13991400
|> (function (_, y)::z -> (min, y)::z | _ -> [])
14001401
|> List.rev

0 commit comments

Comments
 (0)