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 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
  • !542

clarify the intended use of gen_heap, and rename gen_heap_ctx -> gen_heap_interp

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ralf Jung requested to merge ralf/gen_heap into master Oct 13, 2020
  • Overview 7
  • Commits 3
  • Pipelines 0
  • Changes 6

Perennial is using gen_heap for purely ghost state, and IMO the library does not work very well for that, in particular since it is a "singleton library" -- the gname is hidden in a typeclass, and if you have more than one instance around you need to always explicitly pass an implicit argument to make it pick the right one. This is not a problem for the intended usecase where there is only one instance.

I was surprised how this even came to be, but to be fair, the comments in gen_heap are not really clear about this -- we tacitly assumed that "heap" could only ever mean "physical heap" since we never used that term for ghost state, but if people think of "ghost state of type gmap" as a "ghost heap", then trying to use this library makes perfect sense. So this extends the comment in gen_heap to clarify the intended use of this library.

The proper replacement for gen_heap is described in #358 (closed), but until then I propose we point users to the gmap_view RA.

While at it, I also renamed gen_heap_ctx, which I think got its name way back when this was still put into an invariant because there was not yet a state interpretation. This use of the _ctx suffix is in conflict with e.g. lft_ctx in the lifetime logic, where it means "persistent assertion that everything assumes is in the context everywhere".

@tchajed I'd be interested in your feedback here.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ralf/gen_heap