We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While playing with a forall-introduction lemma, I noticed that Silicon and Carbon handle perm() nested inside inhale-exhale expressions differently:
perm()
field f: Int function foo(x: Ref, p: Perm): Bool requires p > none requires acc(x.f, p) method lemma_forall_intro() ensures [forall y: Ref :: perm(y.f) > none ==> foo(y, write), true] // Silicon: Rejected as illformed // Carbon: Not rejected method test0() { var a: Ref inhale acc(a.f, 1/2) lemma_forall_intro() assert perm(a.f) > none ==> foo(a, write) // Silicon: OK // Carbon: Fails with insufficient permission } method test1() { var a: Ref inhale acc(a.f, 1/2) lemma_forall_intro() assert perm(a.f) > none ==> foo(a, 1/2) // Silicon: OK // Carbon: Fails with "might not hold" } method test2() { var a: Ref inhale acc(a.f, write) lemma_forall_intro() assert perm(a.f) > none ==> foo(a, write) // Silicon: Fails with "might not hold" // Carbon: OK }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
While playing with a forall-introduction lemma, I noticed that Silicon and Carbon handle
perm()
nested inside inhale-exhale expressions differently:The text was updated successfully, but these errors were encountered: