Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Iris Iris
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 171
    • Issues 171
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Iris
  • IrisIris
  • Merge requests
  • !9

Add triple notation for generalized post-condition

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Janno requested to merge janno/hoare-notation into master Aug 29, 2016
  • Overview 42
  • Commits 6
  • Pipelines 0
  • Changes 14

This changeset defines notation for the Iris style of writing Hoare triples:

{{{ P }}} e {{{ v1 .. vn; T, Q }}} := P ★ (∀ v1 .. vn, Q → Φ T) ⊢ WP e {{ Φ }}

For no good reason the notation is parsing only, although I do not declare it as such. We might want to do that though, since it might be too hard to understand a Hoare triple goal without unfolding it.

I have changed the barrier specifications to use the new notation in an attempt to demonstrate their usefulness (or, at a minimum, their applicability). The changes are rather minimal, as you can see.

Changes

First and foremost, the specifications change. (Duh!) Then, there are three kinds of changes to the proofs:

  1. The first iIntros needs to take care of introducing Φ. No big deal, in my opinion.

  2. Introducing the spatial assumptions needs one additional level of structure since we go from

    P1 ★ P2 ★ (∀ v, Q v -★ Φ v) to (P1 ★ P2) ★ (∀ v, Q v -★ Φ v)

  3. A post-condition of True leads to the rather annoying hypothesis True -★ Φ v, which (as far as I can tell) cannot be made to behave the same as just (Φ v) in the context of iFrame.

Applicability

I have also looked at most other examples of specifications in heap_lang/lib. The notation seems to be applicable to almost all of them. The only place where I spotted an obvious mismatch is par.v, where the current lemmas have a later before the generalized post-condition, as in ... ★ (∀ .., ... -★ ▷ Φ ..) ⊢ WP ... We could always add another pair of notations for this special case, I suppose.

Nomenclature

I think "Texan triple" would be a good name, seeing how everything is bigger in Texas, including the number of curly braces.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: janno/hoare-notation