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

Verify loops in Run #244

Merged
merged 11 commits into from
Feb 6, 2024
Merged

Verify loops in Run #244

merged 11 commits into from
Feb 6, 2024

Conversation

jcp19
Copy link
Contributor

@jcp19 jcp19 commented Jan 30, 2024

This PR verifies the missing parts of the Run method - the loops that start a connection on each thread are now verified. Unfortunately, Gobra suffers from an incompleteness with closures (viperproject/gobra#723) that makes it pretty much impossible from calling a closure from another closure. Because of this, the call to the closure read inside closure2 and closure3 cannot be verified. Until this issue is fixed, we check the precondition of read before calling it (manually, with asserts) and then kill that branch - we do not verify the call automatically. Fortunately, this function does not have postconditions, thus there are no major proof obligations being assumed away by killing the branch. As soon as the issue is fixed, it would be safe to remove the assertions and the calls to TODO().

Finally, I had to make a few syntactic changes to split the closure declaration and the closure call into two statements, otherwise the program with spec becomes very hard to look at.

@jcp19 jcp19 mentioned this pull request Jan 30, 2024
20 tasks
@jcp19 jcp19 changed the title Verify loops in Run() Verify loops in Run() Feb 4, 2024
@jcp19 jcp19 changed the title Verify loops in Run() Verify loops in Run Feb 4, 2024
@jcp19 jcp19 requested a review from Dspil February 4, 2024 18:22
@jcp19 jcp19 marked this pull request as ready for review February 4, 2024 18:22
router/dataplane.go Outdated Show resolved Hide resolved
@jcp19 jcp19 linked an issue Feb 5, 2024 that may be closed by this pull request
@jcp19 jcp19 merged commit 685c562 into master Feb 6, 2024
4 checks passed
@jcp19 jcp19 deleted the joao-run-loops branch February 6, 2024 20:03
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

Successfully merging this pull request may close these issues.

Method Run
2 participants