Skip to content

In substitution, fix handling of bound variable in Pr - #745

Closed
strub wants to merge 1 commit into
mainfrom
fix-729
Closed

strub wants to merge 1 commit into
mainfrom
fix-729

Conversation

@strub

@strub strub commented Mar 10, 2025

Copy link
Copy Markdown
Member

No description provided.

@strub strub added the bug label Mar 10, 2025
@strub
strub requested a review from bgregoir March 10, 2025 08:01
@strub strub self-assigned this Mar 10, 2025
@strub strub linked an issue Mar 10, 2025 that may be closed by this pull request

@bgregoir bgregoir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is incorrect, and that the previous was.
f_rem_mem is used to remove a binding in the susbtitution (when crossing a binder).
pr_mem represent the initial memory, mhr is the name used in the post for the final memory.

@fdupress

Copy link
Copy Markdown
Member

I guess this goes back to those built-in memory names being a bad idea from the start...
I agree that the fix by PY is more incorrect than the original, but the original is only correct in a context where mhr has not already had its type refined...

So the right fix here would involve making explicit the fact that events in Pr expressions are functions of a typed memory. I believe this is something @Cameron-Low already did in another part of the substitution stack—perhaps even for postconditions in general?

@strub

strub commented Mar 17, 2025

Copy link
Copy Markdown
Member Author

This PR is totally bugged. Closing.

@strub strub closed this Mar 17, 2025
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.

Anomaly in ecSubst when postconditions contain Pr[...] expressions

3 participants