Core data structure low-level requirements
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
LLR
|
1 |
|
|
Parents:
Children:
|
Incoming link from:
3. Coordinate remapping semantics
1 |
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. |
|||
|
LLR
|
2 |
|
|
Parents:
Children:
|
|
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. |
|||
|
LLR
|
3 |
|
|
Parents:
Children:
|
|
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. |
|||
|
LLR
|
4 |
|
|
Parents:
Children:
|
|
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. |
|||
|
LLR
|
5 |
|
|
Parents:
Children:
|
|
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. |