Skip to content

Commit 1eb63b9

Browse files
committed
Fix invalid widen call in topdown_term for side effects
1 parent f0a15f6 commit 1eb63b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/solver/sLR.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ module SLR3 =
6666
if tracing then trace "sol" "Contrib:%a" S.Dom.pretty tmp;
6767
let tmp =
6868
if wpx then
69-
if HM.mem globals x then S.Dom.widen old tmp
69+
if HM.mem globals x then S.Dom.widen old tmp (* TODO: no join in second argument, can call widen incorrectly? *)
7070
else box old tmp
7171
else tmp
7272
in

src/solver/topDown_term.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module WP =
8585
and side y d =
8686
let old = try HM.find rho' y with Not_found -> S.Dom.bot () in
8787
if not (S.Dom.leq d old) then (
88-
HM.replace rho' y (S.Dom.widen old d);
88+
HM.replace rho' y (S.Dom.widen old (S.Dom.join old d));
8989
HM.remove stable y;
9090
init y;
9191
solve y Widen;

0 commit comments

Comments
 (0)