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

Gobra cannot prove that a func literal is non-nil #713

Closed
jcp19 opened this issue Dec 15, 2023 · 0 comments
Closed

Gobra cannot prove that a func literal is non-nil #713

jcp19 opened this issue Dec 15, 2023 · 0 comments

Comments

@jcp19
Copy link
Contributor

jcp19 commented Dec 15, 2023

Below, we have a snippet from VerifiedSCION. One would expect that the last assert succeeds, but Gobra is not able to prove it.

	verScionTemp :=
		// @ requires acc(&key, _) && acc(sl.AbsSlice_Bytes(key, 0, len(key)), _)
		// @ requires scrypto.ValidKeyForHash(key)
		// @ ensures  acc(&key, _) && acc(sl.AbsSlice_Bytes(key, 0, len(key)), _)
		// @ ensures  h != nil && h.Mem()
		// @ decreases
		func /*@ f @*/ () (h hash.Hash) {
			mac, _ := scrypto.InitMac(key)
			return mac
		}
	// Gobra cannot currently prove the following assertion, even though it must
	// follow from the structure of the declaration of `verScionTemp`.
	// @ assert verScionTemp != nil
Felalolf added a commit that referenced this issue Feb 23, 2024
Felalolf added a commit that referenced this issue Feb 23, 2024
@jcp19 jcp19 closed this as completed in 7c271a0 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant