@@ -64,7 +64,7 @@ module IntDomTupleImpl = struct
64
64
| Some (_ , {underflow; overflow} ) -> not (underflow || overflow)
65
65
| _ -> false
66
66
67
- let check_ov ?(suppress_ovwarn = false ) ~cast ik intv intv_set bf =
67
+ let check_ov ?(suppress_ovwarn = false ) ~cast ik intv intv_set bf =
68
68
let no_ov = (no_overflow ik intv) || (no_overflow ik intv_set) || (no_overflow ik bf) in
69
69
if not no_ov && not suppress_ovwarn && ( BatOption. is_some intv || BatOption. is_some intv_set || BatOption. is_some bf) then (
70
70
let (_,{underflow= underflow_intv; overflow= overflow_intv}) = match intv with None -> (I2. bot () , {underflow= true ; overflow = true }) | Some x -> x in
@@ -100,16 +100,16 @@ module IntDomTupleImpl = struct
100
100
| (_, Some true , _, _, _,_)
101
101
| (_, _, Some true , _, _,_)
102
102
| (_, _, _, Some true , _,_)
103
- | (_, _, _, _, Some true ,_)
104
- | (_ , _ , _ , _ , _ , Some true ) -> true
103
+ | (_, _, _, _, Some true ,_)
104
+ | (_ , _ , _ , _ , _ , Some true ) -> true
105
105
| _ -> false
106
106
107
107
let for_all = function
108
108
| (Some false , _, _, _, _,_)
109
109
| (_, Some false , _, _, _,_)
110
110
| (_, _, Some false , _, _,_)
111
111
| (_, _, _, Some false , _,_)
112
- | (_, _, _, _, Some false ,_)
112
+ | (_, _, _, _, Some false ,_)
113
113
| (_ , _ , _ , _ , _ , Some false ) -> false
114
114
| _ -> true
115
115
@@ -136,7 +136,7 @@ module IntDomTupleImpl = struct
136
136
, opt I3. refine_with_congruence ik c cong
137
137
, opt I4. refine_with_congruence ik d cong
138
138
, opt I5. refine_with_congruence ik e cong
139
- , opt I6. refine_with_congruence ik f cong
139
+ , opt I6. refine_with_congruence ik f cong
140
140
)
141
141
142
142
let refine_with_interval ik (a , b , c , d , e ,f ) intv =
@@ -147,7 +147,7 @@ module IntDomTupleImpl = struct
147
147
, opt I2. refine_with_interval ik b intv
148
148
, opt I3. refine_with_interval ik c intv
149
149
, opt I4. refine_with_interval ik d intv
150
- , opt I5. refine_with_interval ik e intv
150
+ , opt I5. refine_with_interval ik e intv
151
151
, opt I6. refine_with_interval ik f intv )
152
152
153
153
let refine_with_bitfield ik (a , b , c , d , e ,f ) bf =
@@ -158,7 +158,7 @@ module IntDomTupleImpl = struct
158
158
, opt I2. refine_with_bitfield ik b bf
159
159
, opt I3. refine_with_bitfield ik c bf
160
160
, opt I4. refine_with_bitfield ik d bf
161
- , opt I5. refine_with_bitfield ik e bf
161
+ , opt I5. refine_with_bitfield ik e bf
162
162
, opt I6. refine_with_bitfield ik f bf )
163
163
164
164
let refine_with_excl_list ik (a , b , c , d , e ,f ) excl =
@@ -244,9 +244,9 @@ module IntDomTupleImpl = struct
244
244
in
245
245
mapp2 { fp2 = fun (type a ) (module I:SOverflow with type t = a and type int_t = int_t ) -> I. to_incl_list } x |> flat merge
246
246
247
- let to_bitfield ik x =
248
- let bf_meet (z1 ,o1 ) (z2 ,o2 ) = (Z. logand z1 z2, Z. logand o1 o2) in
249
- let bf_top = (Z. lognot Z. zero, Z. lognot Z. zero) in
247
+ let to_bitfield ik x =
248
+ let bf_meet (z1 ,o1 ) (z2 ,o2 ) = (Z. logand z1 z2, Z. logand o1 o2) in
249
+ let bf_top = (Z. lognot Z. zero, Z. lognot Z. zero) in
250
250
let res_tup = mapp2 { fp2 = fun (type a ) (module I:SOverflow with type t = a and type int_t = int_t ) -> I. to_bitfield ik } x
251
251
in List. fold bf_meet bf_top (to_list res_tup)
252
252
@@ -314,7 +314,7 @@ module IntDomTupleImpl = struct
314
314
, BatOption. map fst intv
315
315
, map (fun ?no_ov x -> r.f1_ovc ?no_ov (module I3 ) x |> fst) c
316
316
, map (fun ?no_ov x -> r.f1_ovc ?no_ov (module I4 ) x |> fst) ~no_ov d
317
- , BatOption. map fst intv_set
317
+ , BatOption. map fst intv_set
318
318
, BatOption. map fst bf)
319
319
320
320
(* map2 with overflow check *)
@@ -329,7 +329,7 @@ module IntDomTupleImpl = struct
329
329
, BatOption. map fst intv
330
330
, opt_map2 (fun ?no_ov x y -> r.f2_ovc ?no_ov (module I3 ) x y |> fst) xc yc
331
331
, opt_map2 (fun ?no_ov x y -> r.f2_ovc ?no_ov (module I4 ) x y |> fst) ~no_ov: no_ov xd yd
332
- , BatOption. map fst intv_set
332
+ , BatOption. map fst intv_set
333
333
, BatOption. map fst bf)
334
334
335
335
let map ik r (a , b , c , d , e , f ) =
@@ -372,7 +372,7 @@ module IntDomTupleImpl = struct
372
372
let xs = mapp2 { fp2 = fun (type a ) (module I:SOverflow with type t = a and type int_t = int_t ) -> I. equal_to i } x |> GobTuple.Tuple6. enum |> List. of_enum |> List. filter_map identity in
373
373
if List. mem `Eq xs then `Eq else
374
374
if List. mem `Neq xs then `Neq else
375
- `Top
375
+ `Top
376
376
377
377
let to_bool = same string_of_bool % mapp { fp = fun (type a ) (module I:SOverflow with type t = a ) -> I. to_bool }
378
378
let minimal = flat (List. max ~cmp: Z. compare) % mapp2 { fp2 = fun (type a ) (module I:SOverflow with type t = a and type int_t = int_t ) -> I. minimal }
0 commit comments