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
Copy file name to clipboardExpand all lines: src/solver/td3.ml
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ module Base =
58
58
59
59
letexists_keyfhm=HM.exists (funk_ -> f k) hm
60
60
61
+
letfind_default_delayedhkf=Option.default_delayed f (HM.find_option h k)
62
+
61
63
letassert_can_receive_sidex=
62
64
ifHooks.system x <>Nonethen (
63
65
failwith ("side-effect to unknown w/ rhs: "^GobPretty.sprint S.Var.pretty_trace x);
@@ -666,7 +668,7 @@ module Base =
666
668
else
667
669
destabilize_normal;
668
670
669
-
let sys_change =S.sys_change (funv -> tryHM.find rho v withNot_found ->S.Dom.bot()) in
671
+
let sys_change =S.sys_change (funv -> find_default_delayed rho v S.Dom.bot) in
670
672
671
673
let old_ret =HM.create 103in
672
674
if reluctant then (
@@ -861,7 +863,7 @@ module Base =
861
863
letcheck_sidexyd=
862
864
HM.replace visited y ();
863
865
let mem =HM.mem rho y in
864
-
let d' =tryHM.find rho y withNot_found ->S.Dom.bot()in
866
+
let d' =find_default_delayed rho y S.Dom.bot in
865
867
ifnot (S.Dom.leq d d') thenLogs.error "TDFP Fixpoint not reached in restore step at side-effected variable (mem: %b) %a from %a: %a not leq %a" mem S.Var.pretty_trace y S.Var.pretty_trace x S.Dom.pretty d S.Dom.pretty d'
866
868
in
867
869
letrec eqcheckx=
@@ -1049,7 +1051,7 @@ module Base =
1049
1051
if incr_verify then (
1050
1052
HM.iter (funxw ->
1051
1053
HM.iter (funyd ->
1052
-
let old_d =tryHM.find rho y withNot_found ->S.Dom.bot()in
1054
+
let old_d =find_default_delayed rho y S.Dom.bot in
1053
1055
(* Logs.debug "rho_write retrigger %a %a %a %a" S.Var.pretty_trace x S.Var.pretty_trace y S.Dom.pretty old_d S.Dom.pretty d; *)
Copy file name to clipboardExpand all lines: src/solver/topDown_space_cache_term.ml
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ module WP =
20
20
21
21
typephase = Widen | Narrow
22
22
23
+
letfind_default_delayedhkf=Option.default_delayed f (HM.find_option h k)
24
+
23
25
letsolvestvs=
24
26
let stable =HM.create 10in
25
27
let infl =HM.create 10in(* y -> xs *)
@@ -45,7 +47,7 @@ module WP =
45
47
let old =HM.find rho x in
46
48
let l =HM.create 10in
47
49
let tmp = eq x (eval l x) (side l) in
48
-
let tmp =S.Dom.join tmp (tryHM.find rho' x withNot_found ->S.Dom.bot()) in
50
+
let tmp =S.Dom.join tmp (find_default_delayed rho' x S.Dom.bot) in
49
51
if tracing then trace "sol""Var: %a"S.Var.pretty_trace x ;
50
52
if tracing then trace "sol""Contrib:%a"S.Dom.pretty tmp;
51
53
HM.remove called x;
@@ -94,7 +96,7 @@ module WP =
94
96
tmp
95
97
andsidelyd=
96
98
if tracing then trace "sol2""side to %a (wpx: %b) ## value: %a"S.Var.pretty_trace y (HM.mem rho y) S.Dom.pretty d;
97
-
let old =tryHM.find rho' y withNot_found ->S.Dom.bot()in
99
+
let old =find_default_delayed rho' y S.Dom.bot in
98
100
ifnot (S.Dom.leq d old) then (
99
101
HM.replace rho' y (S.Dom.join old d);
100
102
HM.remove l y;
@@ -148,7 +150,7 @@ module WP =
148
150
) else (
149
151
HM.replace visited x ();
150
152
letcheck_sideyd=
151
-
let d' =tryHM.find rho y withNot_found ->S.Dom.bot()in
153
+
let d' =find_default_delayed rho y S.Dom.bot in
152
154
ifnot (S.Dom.leq d d') thenLogs.error "Fixpoint not reached in restore step at side-effected variable %a: %a not leq %a"S.Var.pretty_trace y S.Dom.pretty d S.Dom.pretty d'
0 commit comments