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 core of Run method #240

Merged
merged 111 commits into from
Jan 26, 2024
Merged

Verify core of Run method #240

merged 111 commits into from
Jan 26, 2024

Conversation

jcp19
Copy link
Contributor

@jcp19 jcp19 commented Jan 11, 2024

Specifies and verifies the method (*DataPlane).Run(...). This PR shows that the main loop of the router, which starts a thread per interface of the router which receives, processes, and sends packets is memory safe.

In the process, we ironed out our specification style to make Gobra scale to the challenge and to make the specs more readable

TODO:

  • drop the temporary assume false in processPkt
  • drop the temporary assume false in processOHP concluded in 9f324c8)
  • finish the calls to the closures in (*DataPlane).Run(...) (may be done in a separate PR, this one is already quite large)

@jcp19 jcp19 marked this pull request as draft January 22, 2024 13:30
This was referenced Jan 22, 2024
@jcp19 jcp19 requested a review from Dspil January 25, 2024 10:11
@jcp19 jcp19 marked this pull request as ready for review January 25, 2024 10:13
@jcp19 jcp19 linked an issue Jan 25, 2024 that may be closed by this pull request
@jcp19 jcp19 changed the title Run method - very experimental branch Verify core of Run method Jan 26, 2024
outputCounters := d.forwardingMetrics[result.EgressID]
// @ assert acc(outputCounters.OutputPacketsTotal.Mem(), _)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these asserts that just check for a permission amount to a predicate necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are not necessary, but I found them useful for debugging whenever I was converging to the specs. With this, I can find immediately whenever some expectation is broken

@jcp19 jcp19 merged commit 32c592e into master Jan 26, 2024
4 checks passed
@jcp19 jcp19 deleted the joao-run-experimental branch January 26, 2024 14:04
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