Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Iris Iris
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 171
    • Issues 171
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • 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
  • !838

Make sure that `Make` instances are consistent and "constant time".

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Robbert Krebbers requested to merge robbert/make_better into master Aug 11, 2022
  • Overview 42
  • Commits 4
  • Pipelines 4
  • Changes 4

A follow up of !836 (merged) to fix two things:

  1. Various Make instances still had expensive/recursive/non-constant-time Affine/Absorbing premises.
  2. There were some inconsistencies between the instances for the modalities and the conjunctions, for example, where emp ∧ P was turned into P if P is affine, but <affine> P remained just <affine> P regardless of whether P is affine.

To fix these things, this MR introduces classes QuickAffine and QuickAbsorbing. These classes are aliases for [Affine] and [Absorbing], but their instances are severely restricted. They only inspect the top-level symbol or check if the whole BI is affine---thus fixing (1). Aside, we use these classes for both all Make instances, thus ensuring consistent behavior and fixing (2).

As a consequence of this MR, one test fails:

Lemma demo_3 P1 P2 P3 :
  P1 ∗ P2 ∗ P3 -∗ P1 ∗ ▷ (P2 ∗ ∃ x, (P3 ∧ ⌜x = 0⌝) ∨ P3).
Proof. iIntros "($ & $ & $)". iNext. by iExists 0. Qed.

What happens is that after framing, the subterm (P3 ∧ ⌜x = 0⌝) ∨ P3 is turned into (emp ∧ ⌜x = 0⌝) ∨ emp. Before, the instance for ∨ would be fired, since emp ∧ ⌜x = 0⌝ is affine, thus turning the whole subterm into emp. I don't see how we can support this example without performing a recursive search to check if terms are affine.

That said, this test seems artificial/contrived, so I am not bothered that it fails. This MR is an improvement for Iron, due to fixing (2), a single iSplit can be removed somewhere.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: robbert/make_better