C++ convex-polyhedron persistence
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
Parents:
|
Incoming link from:
5. Polyhedron internal status signed-keyword loading and rejection
1 |
ascii_dump shall write a reloadable description including ambient dimension, topology, authoritative and pending descriptions, status and saturation data, without changing the receiver's represented set. ascii_load of a complete valid description of the receiver's topology shall restore that same set and dimension, independently of its previous value and cache history. A successful load shall leave a valid representation of the receiver's concrete topology. Invalid syntax, dimensions or topology, and descriptor rows or systems that violate their own invariants, shall return false without relying on debug assertions. Loading is specified for trusted records written by ascii_dump with a compatible build. The consistency of the descriptions with one another and with the status flags is validated by the available invariant checks. Altered records can pass those checks. Failure may leave a partially replaced receiver whose ownership permits destruction. Rollback and further queries shall not be assumed. The description headers shall agree with the status flags. A current saturation matrix shall match the processed row counts before its entries are retained. Obsolete saturation data shall be read without being restored to the loaded representation. print() and ascii_dump() shall write the corresponding representations to standard error. Human-readable pointset output shall not promise a reloadable format or stable descriptor order. The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. The internal status contract shall follow 🔗 4. Polyhedron internal status signed-keyword export. The internal status contract shall follow 🔗 5. Polyhedron internal status signed-keyword loading and rejection. |
Reloadable representation data carry authoritative status and topology; successful loading cannot leave those claims inconsistent with the concrete value type. |
|
|
|
|
|
Round-trip literal values with pending/alternate caches, empty/zero dimensions and both topologies. Reject truncated, cross-topology and structurally inconsistent records in assertion and optimized builds. Check stream identity, external stream failures and failed-load destruction. |
src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/ascii_dump_load1.cc; tests/Polyhedron/ascii_dump_load2.cc; tests/Polyhedron/ascii_dump_load3.cc; tests/Polyhedron/loadstatus1.cc; tests/Polyhedron/writepolyhedron1.cc; tests/Polyhedron/writepolyhedron2.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown. void ascii_dump(std::ostream&) const; bool ascii_load(std::istream&); void print() const; void ascii_dump() const; namespace IO_Operators { std::ostream& operator<<(std::ostream&, const Polyhedron&); } |
|
|
SW_SPEC
|
2 |
|
|
|
External memory accounting shall sum the dynamically owned storage reported by the constraint system, generator system and both saturation matrices, including retained capacities according to those container contracts. Total memory shall equal external memory plus sizeof(Polyhedron). Queries shall preserve values and ownership and shall not materialize new descriptions merely to compute the count. The count shall not promise process-resident size or allocator metadata. The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. |
Owned backing storage differs from mathematical size, active rows and process-level memory usage. |
|
|
|
|
|
Observe actual component backing allocations, spare capacity, pending matrices, empty and dimension shrink/growth histories; verify total-minus-external and absence of query allocations. |
src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/membytes1.cc; tests/Polyhedron/memory2.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown. memory_size_type external_memory_in_bytes() const; memory_size_type total_memory_in_bytes() const; |
||
|
SW_SPEC
|
3 |
|
|
Parents:
|
|
OK(false) shall recognize admitted owned representations whose constraint/generator topologies, dimensions, status, pending boundaries and current saturation data meet the representation invariants. Current representations shall agree on the represented set, and descriptions declared minimal shall satisfy the corresponding redundancy conditions. OK(true) shall additionally require nonemptiness. A latent inconsistent constraint description may satisfy the structural query without having its empty status materialized. The query may use independent temporary normalization and may allocate or propagate supported failures; it shall preserve the receiver's value. Diagnostic wording shall not be a stable interface. The receiver's storage shall already be live and destructible; this query shall not be a validator for arbitrary corrupted addresses. The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. The internal status contract shall follow 🔗 3. Polyhedron internal status consistency predicate. |
Status and saturation shortcuts are safe only when their representation claims hold; checking owned structures is distinct from dereferencing arbitrary untrusted pointers. |
|
|
|
|
|
Check valid pending/cache histories and independently constructed owned counterexamples for status, topology, dimensions, saturation shape and incompatible dual descriptions. |
src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/loadstatus1.cc; tests/Polyhedron/recycledsystems1.cc; tests/Polyhedron/systemidentity1.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown. bool OK(bool check_not_empty=false) const; |