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

Quantified permissions for list entries based on indices result in errors #136

Open
marcoeilers opened this issue Sep 27, 2018 · 0 comments

Comments

@marcoeilers
Copy link
Owner

When specifying permissions to the elements of a list based on their indices, e.g. as follows:

Forall(range(0, len(l)), lambda i: Acc(l[i].value))

Viper raises an error complaining that the receiver of the quantified permission is not injective (and Nagini currently crashes when trying to translate the error message).
While it is possible to specify permissions like these based on list containment, i.e.

Forall(l, lambda e: Acc(e.value))

Nagini then doesn't always realize that this gives the permission required for referencing l[i].value elsewhere.

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