Skip to content

Commit

Permalink
Soundness fix (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
bclement-ocp committed May 10, 2024
1 parent 10bf23a commit 859f4e7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/reasoners/bitv_rel.ml
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@ module Interval_domain : Rel_utils.Domain with type t = Intervals.Int.t = struct
Fmt.invalid_arg "unknown: only bit-vector types are supported; got %a"
Ty.print ty

let intersect ~ex x y =
let intersect x y =
match Intervals.Int.intersect x y with
| Empty ex' ->
raise @@ Inconsistent (Ex.union ex ex')
| Empty ex -> raise @@ Inconsistent ex
| NonEmpty u -> u

let lognot sz int =
Expand All @@ -125,7 +124,7 @@ module Interval_domain : Rel_utils.Domain with type t = Intervals.Int.t = struct
let acc = match bv with
| Bitv.Cte z ->
(* Nothing to update, but still check for consistency *)
ignore @@ intersect ~ex:Ex.empty int (point z);
ignore @@ intersect int (point z);
acc
| Other s -> fold_signed f s sz int acc
| Ext (r, r_size, i, j) ->
Expand Down

0 comments on commit 859f4e7

Please sign in to comment.