Repository navigation
Conversation
Add the approved default-allocator LP64 interface for fill/move/destruction and bit access/update. Keep the abstract packed-storage Rep and type observation explicit, with a concrete definition sketch. Define the proxy's real fields and require matching live vector ownership for reads and writes. Bound fill sizes by 2^63-64. Add a cpp.prog client exercising construction, update, move, read and cleanup. Checked independently and through Monad all.vo; library bodies remain assumed. (cherry picked from commit e877ee834e51406b2f64945c62507765259489d8)
Author
|
CI note: the initial Trigger run failed before compilation while checking out |
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.
Summary
Add the existing packed-bit
std::vector<bool, std::allocator<bool>>interface as a focused change based on upstream maind745fecc7cc7322c2269b7a16bb04fd052ccf779.This is one cherry-picked commit and two new files. It does not include, or depend on, the pending shared-pointer changes in #10.
VectorBoolRfor the descriptor and packed storage, with a documented concrete-definition sketch and explicit type-pointer observation assumption.BitReferenceRfor libstdc++'s pointer/mask proxy fields.Ownership and scope
This is an explicitly assumed library interface, not a verification of the standard-library method bodies.
VectorBoolRand its type observation remain abstract/assumed. The client theorem is proved using the library specs.The interface targets libstdc++'s default allocator on LP64. The fill-size bound is
2^63 - 64. Custom allocators and other layouts are outside this interface.A proxy owns only its descriptor. Reading also requires fractional ownership of the matching live vector storage; writing requires full mutable ownership and an in-range index. The specs do not expose independently writable ownership for separate bits, which may share a machine word.
Validation
dune build fmdeps/brick-libcpp/rocq-brick-libstdcpp/proof/vector/bool_test.vo monad/monadproofs/proofs/all.vopasses in the composed development workspace.allocator/spec.v, thenvector/bool_spec.vandvector/bool_test.v, using the same built BRiCk/auto/Rocq dependencies and remapping the library load path to this branch. All three passed. Thus the client does not rely on our unrelated allocator or shared-pointer patches.git diff --checkpasses.Original local commit:
e877ee834e51406b2f64945c62507765259489d8.