Skip to content

fix(fel): count the lvalue of a call to an excepted oracle as a write - #1140

Open
strub wants to merge 1 commit into
mainfrom
fix-1126
Open

strub wants to merge 1 commit into
mainfrom
fix-1126

Conversation

@strub

@strub strub commented Sep 11, 2026

Copy link
Copy Markdown
Member

fel checks that the failure event, counter and invariant are only
modified inside the oracles it emits per-oracle goals for, using the
statement-level write-set with those oracles excepted. i_write_r
returned early on a call to an excepted oracle and dropped the call's
lvalue, so bad <@ o(); in the main body was not seen as a write to
bad and an unsound bound could be derived.

The lvalue is written by the caller regardless of the callee, so add
it to the write-set before the except test. This matches the
function-level write-set, which already counts call lvalues.

Closes #1126

@fdupress

Copy link
Copy Markdown
Member

Do you want a review on this?

@strub

strub commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Do you want a review on this?

You can. The fix is pretty small.

`fel` checks that the failure event, counter and invariant are only
modified inside the oracles it emits per-oracle goals for, using the
statement-level write-set with those oracles excepted. `i_write_r`
returned early on a call to an excepted oracle and dropped the call's
lvalue, so `bad <@ o();` in the main body was not seen as a write to
`bad` and an unsound bound could be derived.

The lvalue is written by the caller regardless of the callee, so add
it to the write-set before the `except` test. This matches the
function-level write-set, which already counts call lvalues.
@strub strub self-assigned this Oct 23, 2026
@strub strub added the bug label Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fel ignores the lvalue of an oracle call (bad <@ o(); outside the oracle)

2 participants