Repository navigation
mem: --mem gives each reuse a region verdict and lists the sanity checks that must stay empty - #77
Merged
Merged
Conversation
…cks that must stay empty
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.
Two more parts of the
--memanalysis.Region verdict per reuse. A reuse writes the new box into the matched box's cell, so the new box lives in the matched box's region. Each
reuse[]record now hasdef,boxAt(the line of the box its arm builds),varRegions(the regions the matched var can hold:rin),boxRegions(the regions the box would be made in:fillsof its site) andverdict:ok: every var region outlives (or is) every box region (outl);regionShorterwithvarRegionandboxRegion: the matched box dies before the new box would;regionUnknown: a region set is empty, so there is no proof (a def nothing calls).M7b may write in place only for
ok.Sanity checks (
fail[]). Relations that must be empty on every program (the shape of Doop's sanity.dl). First check,siteNoRegion: a site of a reached def whose box has no region (noRegion(E) :- esiteOf(E, F), reached(F), esiteNode(E, N), !hasOwn(N)). New gate checkmemfail/*: on every prog and mem test --mem reads,.failis an empty array; armed: the check fails when.failis missing, and it must read at least the mem tests.New test
tests/s2/mem/reuse_region.srs:RR.up{r}reuses a box of t for a box of r (regionShorter),RR.samereuses within t (ok),RR.loneis never called (regionUnknown). Checked by hand; the program prints 6.Checks:
fail).failis empty on all 139 programs; a mutant that breaks the site join (no box gets a region) makes it non-empty on 79 of them.--mem1.904 G -> 1.928 G (+1.3%).Mutants (each builds):
regionShorterreported asokokRR.lone)noRegionwith a positivehasOwnmemfail