Skip to content

Commit b65cdc3

Browse files
committed
replace should_widen with wpoint membership checks where appropriate
1 parent 4bceb14 commit b65cdc3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/solver/td3.ml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ module Base =
374374
if tracing then trace "sol2" "solve still unstable %a" S.Var.pretty_trace x;
375375
(solve[@tailcall]) x Widen
376376
) else (
377-
if term && phase = Widen && should_widen x then ( (* TODO: or use wp? *)
377+
if term && phase = Widen && HM.mem wpoint_gas x then ( (* TODO: or use wp? *)
378378
if tracing then trace "sol2" "solve switching to narrow %a" S.Var.pretty_trace x;
379379
if tracing then trace "sol2" "stable remove %a" S.Var.pretty_trace x;
380380
HM.remove stable x;
@@ -405,8 +405,7 @@ module Base =
405405
HM.replace called y ();
406406
let eqd = eq y (eval l x) (side ~x) in
407407
HM.remove called y;
408-
(* TODO: is should_widen correct here? *)
409-
if should_widen y then (HM.remove l y; solve y Widen; HM.find rho y)
408+
if HM.mem wpoint_gas y then (HM.remove l y; solve y Widen; HM.find rho y)
410409
else (if cache then HM.replace l y eqd; eqd)
411410
)
412411
and eval l x y =

0 commit comments

Comments
 (0)