-
Notifications
You must be signed in to change notification settings - Fork 285
Feat memory locations referrers #6293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
MikaelMayer
wants to merge
59
commits into
master
Choose a base branch
from
feat-memory-locations-referrers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Fixed test cases Start resolving referrers Field .IsGhost for fields Fixed test and resolution of referrers. 13 compilation errors remaining Fixed all run-time crashes so far. Fixed resolution of generated boogie IsGhostField now a field of the field type itself Fixing the test and creating the boogie template 3 verified, 10 errors 5 verified 9 errors 7 verified 3 errors More fixed referrers
Added missing axiom for Indexfield. Added missing free ensures on lemmas so that they don't modify the heap 302 diff count
Diff = 289
…e return statements. Support for locals`this Diff=237
Reduced indentation Diff is now 182
Make diff returns 96
Refactored ReferrersHelper.
…rs are set. Definite assignments are checked Make diff is 73
# Conflicts: # Source/DafnyCore/Dafny.atg
Fixed TypeConversions and TraitResolution's expect files.
…upported functions Referrers is now passing
…an be parsed as unary op REstored eager threshold Fixed error message
…dafny-lang/dafny into feat-memory-locations-referrers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
run-integration-tests
Forces running the CI for integration tests even if the deep tests fail
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.
Fixes #6363
What was changed?
referrers(o): set<(object, field)>whereois an object.$ReferrersHeapand update/read referrers heap in the Dafny prelude.BoogieGenerator.Referrers.csfile to gather all rules related to referrers, includingthisas a special local field per non-static method, so that we can uselocals`thisas a referrer - and added special support to parsethisas a field name.f.IsGhostiffis a field. Since the only way to write a field currently is to write something likeo`f, one can detect in Dafny if a field is ghost by writingo`f.1.IsGhost, which was not possible before.IndexIField_Inverse(f)in theDafnyPrelude.bplso thatIndexFieldis proved injective, and it makes it possible to write the axiom of referrers for array assignments without existential quantifier in positive position.Semantic differences
Other add-ons and refactorings
make preludecompiles the prelude now and works without C++ preprocessorsExprHeapUsageas a way to differentiate the booleans that indicate which heap an expression is using: The current one, the old one and the referrers heap. That helped clarify a few booleans. This differs fromHeapReadingStatuswhich is affected for functions.HeapExpressionsto expression translators so that all heaps are under the same object, it will be easier to maintain and generalize to more heaps."constructor"can be recognized s the name of a method for memory location's sake, by mapping it to the internal name"_ctor"How has this been tested?
referrers.dfythat now passes, another onereferrers-resolutionerrors.dfythat does not pass and will never, another onereferrers-unsupported.dfythat contain code supposed to work in the future but does not yet. finally, another onereferrers-errors.dfythat captures verification errors, including absence of detectable soundness issue.TODO
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.