File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
src/cdomain/value/cdomains Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -560,17 +560,19 @@ module IntervalArith (Ints_t : IntOps.IntOps) = struct
560560 ResettableLazy. force ts
561561
562562 let upper_threshold u max_ik =
563- let ts = find_thresholds WideningThresholds. upper_thresholds in
564563 let u = Ints_t. to_bigint u in
565564 let max_ik' = Ints_t. to_bigint max_ik in
566- let t = WideningThresholds.Thresholds. find_first_opt (fun x -> Z. compare u x < = 0 && Z. compare x max_ik' < = 0 ) ts in
567- BatOption. map_default Ints_t. of_bigint max_ik t
565+ find_thresholds WideningThresholds. upper_thresholds
566+ |> WideningThresholds.Thresholds. find_first_opt (fun x -> Z. compare u x < = 0 )
567+ |> BatOption. filter (fun x -> Z. compare x max_ik' < = 0 )
568+ |> BatOption. map_default Ints_t. of_bigint max_ik
568569 let lower_threshold l min_ik =
569- let ts = find_thresholds WideningThresholds. lower_thresholds in
570570 let l = Ints_t. to_bigint l in
571571 let min_ik' = Ints_t. to_bigint min_ik in
572- let t = WideningThresholds.Thresholds. find_last_opt (fun x -> Z. compare l x > = 0 && Z. compare x min_ik' > = 0 ) ts in
573- BatOption. map_default Ints_t. of_bigint min_ik t
572+ find_thresholds WideningThresholds. lower_thresholds
573+ |> WideningThresholds.Thresholds. find_last_opt (fun x -> Z. compare l x > = 0 )
574+ |> BatOption. filter (fun x -> Z. compare x min_ik' > = 0 )
575+ |> BatOption. map_default Ints_t. of_bigint min_ik
574576
575577 let is_threshold t ts =
576578 let ts = find_thresholds ts in
You can’t perform that action at this time.
0 commit comments