sir: allocator policy parameter - #24
Closed
Eduardogbg wants to merge 6 commits into
Closed
Conversation
The step relation now carries the allocator policy, so availability of a fresh allocation is a question about that policy rather than about the memory alone. Program.AllocationAvailable takes the policy and asks it for the allocation it will admit. It unfolds definitionally, so no proof changed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Eduardogbg
force-pushed
the
sir/allocator
branch
from
August 7, 2026 05:35
12bed4b to
ac843ec
Compare
Collaborator
Author
|
superseded by #26 |
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.
mallocUninitpicks its allocation nondeterministically, and the semantics now carries aGeneric.MemoryPolicythat says which choices are permitted.What changed
SmallStep,Steps,EvalFn, theRuns*family and the observation predicates each take the policy explicitly; the hard-wiredsirMemoryPolicyis deleted.Operation.Admissibleintersectspolicy.Allowswith validity and the size match, so a policy can narrow what an allocation step may return, never widen it.permissiveis the previously hard-wired behaviour verbatim, andpermissive_not_deterministicexhibits two allocations it permits at one state.bumpputs the allocation at the watermark and rejects requests past the address space:bump_deterministic,bump_sound,bump_satisfiable.Program.AllocationDeterministic policy = policy.Deterministic ∨ program.AllocationFree.AllocationFreeisMemOracleFreerenamed, so.inratpermissiverecovers every previous statement;.inl bump_deterministicgives determinism underbumpfor programs that allocate, whichzeroSizeStore_deterministic_bumpuses.zeroSizeStore_not_deterministicseparates the same program underpermissive.progress_reachable_nonIcall_of_satisfiablederives the allocation obligation frompolicy.Soundandpolicy.Satisfiable, and the bump progress theorem is its instantiation.initializedLoad_deterministicproves a program deterministic underpermissivethrough a reachability invariant that absorbs the allocator choice, with neither disjunct available.