Skip to content

Make abstract phoare proc use a >= 1#887

Open
oskgo wants to merge 1 commit intomainfrom
weaken-phoare-abs-proc
Open

Make abstract phoare proc use a >= 1#887
oskgo wants to merge 1 commit intomainfrom
weaken-phoare-abs-proc

Conversation

@oskgo
Copy link
Contributor

@oskgo oskgo commented Feb 5, 2026

I change the ground truth to be a (IMO easier to work with) variant with a >= 1 bound and instead recover the = 1 variant using conseq on the original goal and the generated side conditions.

This also means that the conseq used to link the invariant with the postcondition now generates a goal to show implication rather than equivalence, making it more consistent with abstract proc for the other program logics, improving the documentation.

This is a breaking change since it slightly changes one of the goals generated by the tactic.

@oskgo oskgo force-pushed the weaken-phoare-abs-proc branch from da4d7da to 11cfc9f Compare February 5, 2026 13:32
| _ -> tc_error !!tc "bound must of \"= 1\""
| _ -> tc_error !!tc "bound must \">= 1%%r\""

let t_bdhoareF_abs_r inv tc =
Copy link
Member

Choose a reason for hiding this comment

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

This function seems to be used nowhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The diff might look a bit weird. The function you're highlighting is the original function, which is used to define t_bdhoareF_abs, which is used in a bunch of places.

The t_bdhoareF_abs_ge_r function above is the new one, though its implementation is nearly the same as the original.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants