Skip to content

Conversation

@oskgo
Copy link
Contributor

@oskgo oskgo commented Oct 3, 2025

This is a follow up PR to #789 that now allows the user to decide the name of the memory bound by a program logic statement or probability expression. This makes nested program logic statements clearer.

The syntax is {&my_memory} after the procedures (and arguments for a Pr) (for the relevant side if two-sided).
Examples:

  • hoare[P.p {&m}: true ==> true]
  • Pr[P.p(a) {&end_mem} @ &start_mem: true] = 0%r
  • equiv[P.p {&left} ~ P.p {&right}: true ==> true]

The change is backwards compatible since it is optional to provide the memory. If not provided a default name will be used instead (&hr for one-sided cases and &1/&2 for left/right in two-sided cases). The pretty printer omits the memory binding if the default names are used.

Some tactics (conseq?) will probably also want an optional memory parameter, but I'd rather deal with that as needed.

@oskgo oskgo changed the title Expose memory binding(s) in program logic statements to the user Expose memory binding(s) in program logic statements Oct 3, 2025
@strub strub added enhancement chore Ungrateful tasks that need done but that nobody wants to do labels Oct 3, 2025
@strub strub self-assigned this Oct 3, 2025
@strub strub merged commit c063e99 into main Oct 6, 2025
15 checks passed
@strub strub deleted the expose-memory branch October 6, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Ungrateful tasks that need done but that nobody wants to do enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants