You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Test (exp, false), if_true_next_false_next_n, if_false_next_ps @cartesian_concat_paths if_true_next_ps if_true_next_false_next_ps) (* concat two different path families to same false node *)
(Test (exp, false), if_true_next_false_next_n, if_false_next_ps @cartesian_append if_true_next_ps if_true_next_false_next_ps) (* concat two different path families to same false node *)
323
323
]
324
324
else
325
325
None
@@ -330,8 +330,8 @@ struct
330
330
ifNode.equal if_true_next_n if_false_next_true_next_n then
331
331
let exp =BinOp (LOr, e, e2, intType) in
332
332
Some [
333
-
(Test (exp, true), if_false_next_true_next_n, if_true_next_ps @cartesian_concat_paths if_false_next_ps if_false_next_true_next_ps); (* concat two different path families to same true node *)
(Test (exp, true), if_false_next_true_next_n, if_true_next_ps @cartesian_append if_false_next_ps if_false_next_true_next_ps); (* concat two different path families to same true node *)
(Assign (v_true, exp), if_true_next_next_n, cartesian_concat_paths if_true_next_ps if_true_next_next_ps @cartesian_concat_paths if_false_next_ps if_false_next_next_ps) (* concat two different path families with same variable to same node *)
369
+
(Assign (v_true, exp), if_true_next_next_n, cartesian_append if_true_next_ps if_true_next_next_ps @cartesian_append if_false_next_ps if_false_next_next_ps) (* concat two different path families with same variable to same node *)
GobList.cartesian_map op2 a b|>funx -> reduce (of_list x)
309
309
(* why are type annotations needed for product_widen? *)
310
310
(* TODO: unused now *)
311
311
letproduct_widenopop2 (a:t) (b:t): t =(* assumes b to be bigger than a *)
312
312
let xs,ys = elements a, elements b in
313
-
List.concat_map (fun (x,xr) -> List.map (fun (y,yr) -> (op x y, op2 xr yr)) ys) xs|>funx -> reduce (join b (of_list x)) (* join instead of union because R is HoareDomain.Set for witness generation *)
313
+
GobList.cartesian_map (fun (x,xr) (y,yr) -> (op x y, op2 xr yr)) xs ys|>funx -> reduce (join b (of_list x)) (* join instead of union because R is HoareDomain.Set for witness generation *)
314
314
letproduct_widen2op2 (a:t) (b:t): t =(* assumes b to be bigger than a *)
315
315
let xs,ys = elements a, elements b in
316
-
List.concat_map (fun (x,xr) -> List.map (fun (y,yr) -> op2 (x, xr) (y, yr)) ys) xs|>funx -> reduce (join b (of_list x)) (* join instead of union because R is HoareDomain.Set for witness generation *)
316
+
GobList.cartesian_map op2 xs ys|>funx -> reduce (join b (of_list x)) (* join instead of union because R is HoareDomain.Set for witness generation *)
317
317
letjoinab= join a b |> reduce
318
318
let meet = product_bot SpecD.meet R.inter
319
319
(* let narrow = product_bot (fun x y -> if SpecD.leq y x then SpecD.narrow x y else x) R.narrow *)
@@ -368,7 +368,7 @@ struct
368
368
(* TODO: move to Set above? *)
369
369
letproduct_widen (op: elt -> elt -> elt option) ab=(* assumes b to be bigger than a *)
370
370
let xs,ys = elements a, elements b in
371
-
List.concat_map (funx -> List.filter_map (funy -> op x y) ys) xs|>funx -> join b (of_list x)
371
+
GobList.cartesian_filter_map op xs ys|>funx -> join b (of_list x)
372
372
let widen = product_widen (funxy -> ifE.leq x y thenSome (E.widen x y) elseNone)
373
373
374
374
(* above widen is actually extrapolation operator, so define connector-based widening instead *)
0 commit comments