fix(eager): fun-abs must check the swap statement does not modify glob A - #1097
Open
namasikanam wants to merge 1 commit into
Open
fix(eager): fun-abs must check the swap statement does not modify glob A#1097namasikanam wants to merge 1 commit into
namasikanam wants to merge 1 commit into
Conversation
oskgo
reviewed
Aug 24, 2026
t_eager_fun_abs_r omitted the documented side-conditions that the swapped statement S depends only on globals and does not modify glob A (the sibling eager call checks these). With a concrete assignment to a global that an unrestricted abstract A may touch, a false eager judgment was accepted. Add check_only_global and a s_write/glob-A disjointness check. Adds a fail-idiom regression test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
namasikanam
force-pushed
the
fix/eager-glob-check
branch
from
August 24, 2026 18:07
47d3f90 to
9f62001
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eager fun-absomits a documented side-condition and is unsound: the swapped statementSis not checked to be independent of / non-modifying
glob Afor the abstract moduleA.With a concrete
Shared.g <- 5asSand an unrestricted abstractA, EC accepts a falseeager judgment that equates two procedures returning
5(Pr 1) and0(Pr 0), giving1 = 0viabyequiv.Root cause
t_eager_fun_abs_r/process_fun_absnever emit the conditions (documented in the.mli)that
Sreads only globals and does not modifyglob A. The siblingeager call(
process_call) does perform these checks; fun-abs was missing them.Fix (
src/phl/ecPhlEager.ml)Add the
glob A-disjointness check for the swap statement in the fun-abs path, mirroringwhat
eager callalready enforces (check_only_global+PV.add_glob/PV.interdepdisjointness against
glob A).Test
tests/eager-glob-check.ec: the swap-across-glob Aeager judgment must now fail.