Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix substitution in the presence of shadowing global names #54

Open
wilcoxjay opened this issue Mar 15, 2023 · 0 comments
Open

Fix substitution in the presence of shadowing global names #54

wilcoxjay opened this issue Mar 15, 2023 · 0 comments
Assignees

Comments

@wilcoxjay
Copy link
Collaborator

Consider this program

sort s

mutable x: bool

def y() -> bool {
    x
}

assume forall x:s. y

If we call Module::inline_defs on this module it will produce

sort s

mutable x: bool

assume forall x:s. x

which is incorrect (it's not even well sorted!). It should instead produce

sort s

mutable x: bool

assume forall x0:s. x

which is well sorted and intuitively the right answer. Notice that the bound variable had to be renamed to allow the body to refer to the global x after substitution.


I'm filing this issue just so we don't lose track of it. I'll assign it to me. I plan to fix it via capture avoiding substitution, but probably not until next week.

@wilcoxjay wilcoxjay self-assigned this Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant