Skip to content

Commit fe3e734

Browse files
committed
Replace concat_map of singleton with map in IntervalSetDomain
1 parent 2a0d592 commit fe3e734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cdomain/value/cdomains/int/intervalSetDomain.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct
173173
let binary_op_with_norm op (ik:ikind) (x: t) (y: t) : t*overflow_info = match x, y with
174174
| [], _ -> ([],{overflow=false; underflow=false})
175175
| _, [] -> ([],{overflow=false; underflow=false})
176-
| _, _ -> norm_intvs ik @@ List.concat_map (fun (x,y) -> [op x y]) (BatList.cartesian_product x y)
176+
| _, _ -> norm_intvs ik @@ List.map (fun (x,y) -> op x y) (BatList.cartesian_product x y)
177177

178178
let binary_op_concat_with_norm op (ik:ikind) (x: t) (y: t) : t*overflow_info = match x, y with
179179
| [], _ -> ([],{overflow=false; underflow=false})
@@ -192,7 +192,7 @@ struct
192192

193193
let unary_op_with_norm op (ik:ikind) (x: t) = match x with
194194
| [] -> ([],{overflow=false; underflow=false})
195-
| _ -> norm_intvs ik @@ List.concat_map (fun x -> [op x]) x
195+
| _ -> norm_intvs ik @@ List.map op x
196196

197197
let rec leq (xs: t) (ys: t) =
198198
let leq_interval (al, au) (bl, bu) = al >=. bl && au <=. bu in

0 commit comments

Comments
 (0)