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

Injectivity check not performed inside a magic wand #614

Open
fpoli opened this issue May 16, 2022 · 0 comments
Open

Injectivity check not performed inside a magic wand #614

fpoli opened this issue May 16, 2022 · 0 comments
Labels

Comments

@fpoli
Copy link
Member

fpoli commented May 16, 2022

I would expect both methods below to be rejected, but apparently a true --* ... magic wand is enough to escape the injectivity checks.

predicate P(x: Ref)

method m1()
    requires forall s: Set[Ref] ::
        (forall x: Ref :: x in s ==> P(x)) // As expected: Contract might not be well-formed. Receiver of P(x) might not be injective.

method m2()
    requires forall s: Set[Ref] ::
        true --* (forall x: Ref :: x in s ==> P(x)) // This should be rejected, but it's accepted
@mschwerhoff mschwerhoff changed the title Avoid injectivity checks with a magic wand Injectivity check not performed inside a magic wand May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants