Skip to content

Conversation

@lredlin
Copy link
Collaborator

@lredlin lredlin commented Oct 12, 2025

This PR adds specifications and proofs for BlockingSelect2 and NonBlockingSelect2, which handle selection over two channels.

Changes

  • Added wp_BlockingSelect2: Specification for blocking select over two channels
  • Added wp_NonBlockingSelect2: Specification for non-blocking select over two channels

Both specs support mixed send/receive operations on each channel, determined by the direction parameters.
Notes on proof size
The proofs are quite large (~500 lines each) because the primary goal was to validate the specification structure rather than optimize the proof strategy. As a result:

  1. Much of the proof is brute-forced through all possible cases
  2. There's significant repetition across similar branches
  3. Little abstraction or tactical refinement was applied

I think for anything larger we can either replace the Select functions with a gooselang wrapper that uses a list fold or use a proof strategy that isn't brute forced so it doesn't blow up by the number of permutations

@tchajed
Copy link
Member

tchajed commented Oct 14, 2025

This looks good to me. Simplifying the proofs might be easier done by also tweaking the code, and we can do that separately.

CI seems to only be failing because you linked goose-lang/goose#144 but this PR doesn't have translations for those examples. Can you remove that from the description if it isn't part of this?

@lredlin lredlin marked this pull request as ready for review October 21, 2025 19:41
@lredlin lredlin enabled auto-merge (squash) October 21, 2025 19:42
@lredlin lredlin disabled auto-merge October 22, 2025 01:21
@lredlin lredlin enabled auto-merge October 22, 2025 01:26
@lredlin lredlin merged commit ca73950 into mit-pdos:master Oct 22, 2025
6 checks passed
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.

2 participants