Core data structure low-level requirements
- PPL-SPEC-001202 Injective partial remapping of octagonal coordinates (Specified by)
- PPL-SPEC-000001 Public partial coordinate-map type and valid use (Specified by)
- PPL-SPEC-000002 Empty partial-map construction (Specified by)
- PPL-SPEC-000003 Injective insertion and failure atomicity (Specified by)
- PPL-SPEC-000004 Exact partial-map lookup and unchanged absent output (Specified by)
- PPL-SPEC-000005 Exact empty-codomain query (Specified by)
- PPL-SPEC-000006 Largest image and defined empty-map failure (Specified by)
- PPL-SPEC-000007 Independent copies, assignment and owned-storage cleanup (Specified by)
- PPL-SPEC-000008 Coordinate-map diagnostic printing and output failures (Specified by)
- PPL-SPEC-000009 Move construction and empty source (Specified by)
- PPL-SPEC-000010 Move assignment and empty source (Specified by)
Within the documented insertion preconditions, a partial coordinate map shall represent an injective mapping from selected dimension indices to dimension indices. Lookup of a mapped coordinate shall return its associated image; lookup of an unmapped coordinate shall report absence without changing the caller's output value. Empty-codomain and maximum-image queries shall distinguish the empty map from a nonempty map.
Dimension transformations must preserve coordinate identity and must not merge coordinates unintentionally.
Verification covers partial coordinate-map construction, lookup and range queries. The contracts retain the insertion preconditions and do not promise release-build detection of every invalid map. Verification compares valid operation histories with an independent finite-map model. Successful mathematical results assume valid inputs, documented caller preconditions, and arithmetic representable under the selected configuration; resource or arithmetic failures are not successful results.
Compare incrementally constructed valid maps with an independent finite-map model, including sparse domains, reordered images, empty maps, and repeated absent lookups. Verify unchanged output on absence and the reported maximum image. Review uniqueness and reserved-index preconditions without assuming release-build validation of their violation.
src/Partial_Function_defs.hh: injectivity, insertion preconditions, lookup-output preservation, and empty-codomain behavior. src/Partial_Function_inlines.hh and src/Partial_Function.cc: represented mapping and maximum-image queries.
- PPL-SPEC-000461 Rectangular Boolean values and valid internal use (Specified by)
- PPL-SPEC-000468 Row sorting and duplicate elimination (Specified by)
- PPL-SPEC-000469 Membership in a sorted row sequence (Specified by)
- PPL-SPEC-000470 Recycled row insertion transfers ownership (Specified by)
- PPL-SPEC-000441 Finite bit-set row values and valid use (Specified by)
- PPL-SPEC-000442 Empty construction, owned copying and bit-row lifetime (Specified by)
- PPL-SPEC-000443 Individual bit membership, insertion and removal (Specified by)
- PPL-SPEC-000444 Bit prefixes, suffix removal and complete clearing (Specified by)
- PPL-SPEC-000445 Set union, intersection and difference with aliased operands (Specified by)
- PPL-SPEC-000446 Ordered bit traversal, cardinality and absence (Specified by)
- PPL-SPEC-000447 Bit-set equality and inclusion predicates (Specified by)
- PPL-SPEC-000448 Least-significant differing-position total order (Specified by)
- PPL-SPEC-000449 Bit-row owner exchange and vector element exchange (Specified by)
- PPL-SPEC-000450 Bit-row validity and allocated-memory accounting (Specified by)
- PPL-SPEC-001648 Translation of bit-row member positions (Specified by)
A bit row shall represent a finite set of nonnegative positions and preserve ordinary set semantics for membership, insertion, removal, union, intersection, difference, and inclusion. Ordered traversal shall return exactly the represented positions in the requested direction, with the documented absence indication when no qualifying position exists. Prefix updates shall preserve positions outside their specified update range.
Bit rows encode incidence and saturation information used by numerical algorithms; incorrect membership or traversal can change the represented relations.
Verification covers bit-row set operations, traversal and prefix updates, including range and absence conventions. Verification uses independent finite-set models across storage boundaries and supported aliasing cases. Successful mathematical results assume valid inputs, documented caller preconditions, and arithmetic representable under the selected configuration; resource or arithmetic failures are not successful results.
Compare operations with an independent finite-set model across storage-limb boundaries, sparse high positions, empty sets, and aliased operands where supported. Check cardinality, inclusion, strict predecessor and successor behavior, prefix boundaries, and absence at the largest representable query positions without requiring infeasible allocations.
src/Bit_Row_defs.hh and src/Bit_Row_inlines.hh: set operations, range updates, ordered traversal, and absence conventions. tests/bitrowprefix1.cc: independent finite-set checks, limb boundaries, and extreme traversal queries.
- PPL-SPEC-000461 Rectangular Boolean values and valid internal use (Specified by)
- PPL-SPEC-000462 Empty and explicitly shaped construction and extent queries (Specified by)
- PPL-SPEC-000463 Owned copies, assignment, exchange and lifetime (Specified by)
- PPL-SPEC-000464 Borrowed indexed row access (Specified by)
- PPL-SPEC-000465 General resizing preserves the common rectangle (Specified by)
- PPL-SPEC-000466 Trailing removal and clearing (Specified by)
- PPL-SPEC-000467 Transposition and transposed assignment (Specified by)
- PPL-SPEC-000468 Row sorting and duplicate elimination (Specified by)
- PPL-SPEC-000469 Membership in a sorted row sequence (Specified by)
- PPL-SPEC-000470 Recycled row insertion transfers ownership (Specified by)
- PPL-SPEC-000471 Matrix equality includes both extents and all entries (Specified by)
- PPL-SPEC-000472 ASCII representation and loading (Specified by)
- PPL-SPEC-000473 Invariant, ordering and allocated-memory queries (Specified by)
A bit matrix shall preserve the association between row and column positions when it is resized or transposed within supported dimensions. Resizing shall retain entries in the common old and new coordinate range, discard removed entries, and initialize newly introduced entries to false. Transposition shall exchange row and column positions and their dimensions without changing entry values.
Matrix shape changes must not corrupt the incidence relationships that the matrix records.
Verification covers bit-matrix dimensions, resizing and transposition. Verification checks complete coordinate/value associations against an independent Boolean-array model, including removal followed by growth. Successful mathematical results assume valid inputs, documented caller preconditions, and arithmetic representable under the selected configuration; resource or arithmetic failures are not successful results.
Compare rectangular, empty, one-row, and one-column matrices with an independent Boolean-array model through growth, shrinkage, and transposition histories. Verify that transposing twice restores all dimensions and entries and that removed values do not reappear after later growth. Include changes that reallocate row storage.
src/Bit_Matrix_defs.hh: resizing and transposition contracts. src/Bit_Matrix.cc: column truncation, row growth and removal, and transpose construction. tests/bitmatrixmemory1.cc: matrix-storage and lifecycle scenarios.
- PPL-SPEC-000616 Default-value insertion retains an existing coefficient (Specified by)
- PPL-SPEC-000617 Explicit insertion and replacement capture the argument value (Specified by)
- PPL-SPEC-000618 Hinted insertion preserves the unhinted map result (Specified by)
- PPL-SPEC-000619 Erasure by key returns the strict successor (Specified by)
- PPL-SPEC-000620 Erasure by occupied iterator removes exactly its entry (Specified by)
- PPL-SPEC-000621 Coordinate removal and order-preserving reindexing (Specified by)
- PPL-SPEC-000622 Positive coordinate insertion shifts the complete selected suffix (Specified by)
- PPL-SPEC-000623 Fast leftward key replacement preserves occupied positions (Specified by)
- PPL-SPEC-000624 Backing-array allocation failure preserves the prior map (Specified by)
- PPL-SPEC-000601 Ordered coefficient-map values and valid tree use (Specified by)
- PPL-SPEC-000602 Empty construction, entry counts and supported count limit (Specified by)
- PPL-SPEC-000603 Independent copying, assignment and destruction (Specified by)
- PPL-SPEC-000604 Construction from a counted increasing-key input sequence (Specified by)
- PPL-SPEC-000605 Clearing and swapping complete tree owners (Specified by)
- PPL-SPEC-000606 Iterator ownership, copying, const conversion and equality (Specified by)
- PPL-SPEC-000607 Iterator key and coefficient access (Specified by)
- PPL-SPEC-000608 Bidirectional iterator movement follows stored-key order (Specified by)
- PPL-SPEC-000609 Begin positions and owner-stable cached end references (Specified by)
- PPL-SPEC-000610 Whole-tree bisection returns an exact key or an adjacent entry (Specified by)
- PPL-SPEC-000611 Closed-window bisection confines its candidate to that window (Specified by)
- PPL-SPEC-000612 Hinted bisection retains whole-tree lookup meaning (Specified by)
- PPL-SPEC-000613 Managed storage counts backing arrays and live coefficient payloads (Specified by)
- PPL-SPEC-000614 Diagnostic tree output reflects current stored pairs (Specified by)
- PPL-SPEC-000615 Physical-slot iterator construction preserves the selected live position (Specified by)
- PPL-SPEC-000283 Sparse zero construction and storage limits (Specified by)
- PPL-SPEC-000284 Owning row copies, sized copies and storage conversion (Specified by)
- PPL-SPEC-000285 Row assignment, whole-row swaps and destruction (Specified by)
- PPL-SPEC-000287 Sparse resizing and removal of trailing stored positions (Specified by)
- PPL-SPEC-000288 Indexed coefficient access and borrowed values (Specified by)
- PPL-SPEC-000290 Sparse stored-entry traversal and cached end references (Specified by)
- PPL-SPEC-000291 Indexed row search, lower bounds and hint independence (Specified by)
- PPL-SPEC-000292 Insertion and replacement with argument-value independence (Specified by)
- PPL-SPEC-000293 Reset and clear preserve logical size (Specified by)
- PPL-SPEC-000295 Coefficient swaps and constrained sparse key relocation (Specified by)
- PPL-SPEC-000300 Row equality compares complete logical vectors (Specified by)
- PPL-SPEC-000302 Sparse-row ASCII export, stored entries and validation (Specified by)
- PPL-SPEC-000303 Row invariants and memory-accounting queries (Specified by)
Within supported key and capacity limits, the ordered coefficient map shall retain one coefficient value per stored dimension key and enumerate stored entries in increasing key order. Insertion of an existing key with an explicit value shall replace that value without creating a duplicate key; removal shall preserve all unrelated key-value associations. Stored values shall remain independent of the lifetime of the insertion argument.
Sparse numerical representations require stable associations between dimensions and coefficients even when storage is reorganized.
Verification covers coefficient-map lookup, insertion, replacement, traversal and removal, including argument independence and iterator validity. Verification compares key/value histories with an independent ordered-map model. Successful mathematical results assume valid inputs, documented caller preconditions, and arithmetic representable under the selected configuration; resource or arithmetic failures are not successful results.
Compare valid insertion, replacement, lookup, traversal, and deletion histories with an independent ordered-map model. Include sparse keys, zero coefficients, insertion arguments that refer to a value already in the map when supported, storage growth and shrinkage, and documented iterator invalidation. Check equality of stored coefficients rather than storage addresses.
src/CO_Tree_defs.hh: ordered key-coefficient entries, explicit-value replacement, argument independence, capacity limits, and iterator invalidation. src/CO_Tree.cc and src/CO_Tree_templates.hh: tree storage changes. tests/CO_Tree/cotree1.cc and tests/CO_Tree/memory1.cc: map operations and allocation-sensitive histories.
- PPL-SPEC-000621 Coordinate removal and order-preserving reindexing (Specified by)
- PPL-SPEC-000622 Positive coordinate insertion shifts the complete selected suffix (Specified by)
- PPL-SPEC-000623 Fast leftward key replacement preserves occupied positions (Specified by)
- PPL-SPEC-000624 Backing-array allocation failure preserves the prior map (Specified by)
- PPL-SPEC-000414 System dimension changes and coordinate removal (Specified by)
- PPL-SPEC-000415 Shared coordinate swaps, cycles and zero insertion (Specified by)
- PPL-SPEC-000370 Inserting and removing matrix columns (Specified by)
- PPL-SPEC-000371 Column swaps and encoded nonzero-index permutation cycles (Specified by)
- PPL-SPEC-000294 Coordinate insertion and deletion preserve coefficient association (Specified by)
- PPL-SPEC-000295 Coefficient swaps and constrained sparse key relocation (Specified by)
For valid dimension-shift operations on the ordered coefficient map, each surviving coefficient shall remain associated with the coordinate obtained by the specified key transformation. Removing a coordinate and shifting later coordinates down shall remove only that coordinate's entry; inserting coordinate positions shall shift affected keys without altering their coefficient values or relative order.
Sparse coordinate insertion and removal support variable-size numerical objects and must preserve the meaning of their remaining coordinates.
Verification covers coefficient-map coordinate insertion, removal and shifts. Verification applies independently computed coordinate transformations within the documented ordering and capacity preconditions. Successful mathematical results assume valid inputs, documented caller preconditions, and arithmetic representable under the selected configuration; resource or arithmetic failures are not successful results.
Construct independent key-transformation oracles for coordinate removal and positive coordinate insertion. Compare complete key-value sequences before and after shifts, including absent removed keys, first and last positions, empty maps, and supported index-boundary cases. Apply only transformations satisfying the documented ordering, range, and capacity preconditions.
src/CO_Tree_defs.hh: coordinate removal with left shift, key increases from a threshold, and constrained direct shifts. src/CO_Tree.cc: coordinate-key transformation implementations. tests/CO_Tree/cotree1.cc: ordered-map mutation scenarios.