Skip to content

Conversation

@codyjrivera
Copy link
Contributor

@codyjrivera codyjrivera commented Jan 26, 2026

I add a tactic, wp_if_join, that allows you to 'join' both branches of an if-statement into a single assertion by showing that both branches make said assertion hold.

Given the program below (and assertion A)

if b { S1; } else { S2; } // no `else` is handled trivially by Goose.
// assertion `A`
S3;

By using the tactic wp_if_join <assertion> [with <ipat>] (leaving off the with to provide no spatial hypotheses), the goal is split into three subgoals:

  1. Proving that S1 results in A holding,
  2. Proving that S2 results in A holding, and
  3. Proving the remainder of the program, S3, assuming that A holds.

@tchajed tchajed merged commit 8a7a574 into mit-pdos:master Jan 29, 2026
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