Debugger records all old heaps and their parent heaps#973
Open
jackstodart wants to merge 17 commits into
Open
Conversation
…eaps in Executor, Evaluator
marcoeilers
reviewed
May 8, 2026
| val ve = pve dueTo InsufficientPermission(fa) | ||
| v.heapSupporter.evalFieldAccess(s1, fa, tRcvr, eRcvr, ve, v1)((s2, snap, v2) => { | ||
| val (debugHeapName, debugLabel) = v1.getDebugOldLabel(s2, fa.pos, Some(magicWandSupporter.getEvalHeap(s2))) | ||
| val (_, debugLabel) = v1.getDebugOldLabel(s2, fa.pos, Some(magicWandSupporter.getEvalHeap(s2))) |
Contributor
There was a problem hiding this comment.
So this now assumes that the heap in which we're evaluating the field access has already been recorded, right? But I don't think that's necessarily the case, because of the scenario we I think briefly talked about but then got interrupted (or if there was some conclusion I don't remember it):
// heap h1
inhale acc(x.f) && x.f > 8 && acc(x.g)
// heap h2
x.f is evaluated in a heap that is neither h1 nor h2, but an intermediate one that is h1 + the x.f permission. So I think here you'd get a new debug label that doesn't correspond to an existing heap, but the new heap is also not recorded.
Author
There was a problem hiding this comment.
OK I think this is finally fixed and now we record intermediate heaps when they are used (with either funcapp or field access).
…sume heaps, not all checked yet
…nhale, unfolding etc
# Conflicts: # src/main/scala/rules/Evaluator.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing the debugger from recording only heaps referenced in assumptions, to recording all heaps when they are created. Also records the statement or expression that caused the heap to be created, and any possible branch conditions.
Debugger now prints the parents and causes when printOldHeaps is on; it's a little verbose maybe, but it's off by default anyway.