BD_Shape<T> internal status
The nested Status shall own a finite set of named Boolean flags: empty, shortest_path_closed, shortest_path_reduced. test_zero_dim_univ() shall recognize the zero flag word; that word shall be the default state. It shall be an encoding predicate, not an independent query of the owning object's dimension or numerical payload. The owning object shall supply that context and establish the truth of its cache claims.
Copy construction and assignment shall preserve all stored flags in an independent value. Assignment shall return its target and admit self-assignment. Mutating or destroying one copy shall not change another. Destruction shall release the status value without destroying an owning domain or its payload. These value operations shall admit any vector of the declared flags, including transient inconsistent combinations used while updating a representation.
Status-only operations shall require live objects and synchronized access
against mutation, but no numerical-library/thread initialization or coefficient
constant stage. Their selected streams shall remain live. They shall not
inspect domain coordinates, reconstruct numerical descriptions or perform
coefficient arithmetic. A domain shall use a consistent status whose claims
agree with its representation; the local check of 🔗 3. BD_Shape
Cached facts need an independent value and an explicit distinction between status-bit consistency and the truth of claims about a numerical object.
Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
Status(); Status(const Status&); Status& operator=(const Status&); ~Status();
Check default/copy/assignment, self-assignment, independent mutation and source destruction over every declared flag vector. Use status-only tests without a numerical initialization owner; inspect payload independence.
src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
For a declared mask m and current flag word F, the private test_all(m) shall return (F&m) = m, and test_any(m) shall return (F&m) ≠ 0. The empty mask shall therefore match all and match no individual bit. set(m) shall replace F by F|m; reset(m) shall clear exactly the selected bits. Masks shall contain only the declared flags. Tests shall preserve state.
Each named test_* shall return its stored bit, except the zero-word
predicate of 🔗 1. BD_Shape
Updates shall not generally reconcile other assertions. Transient inconsistent
vectors shall remain available to 🔗 3. BD_Shape
Representation algorithms need exact local cache updates without implicit numerical recomputation or unrelated changes to known facts.
Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool test_zero_dim_univ() const; void set_zero_dim_univ(); void reset_zero_dim_univ(); bool test_empty() const; void set_empty(); void reset_empty(); bool test_shortest_path_closed() const; void set_shortest_path_closed(); void reset_shortest_path_closed(); bool test_shortest_path_reduced() const; void set_shortest_path_reduced(); void reset_shortest_path_reduced(); // Private primitives; flags_t is the declared unsigned flag-word type. bool test_all(flags_t mask) const; bool test_any(flags_t mask) const; void set(flags_t mask); void reset(flags_t mask);
Compare all flag words and declared masks against independent set algebra. Check every named update and query, both zero-reset cases, whole-word empty replacement, and independent copies. For BD status, check clearing closure also clears reduction. Exercise admitted reduction setters with closure set, and check the debug precondition guard through diagnostic replacement.
src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
OK() shall return true exactly for the zero word, empty-only, shortest-path-closed-only and closed-plus-reduced words. Empty shall exclude every other flag and reduction shall imply closure. Rounded/bounded arithmetic shall not turn these cache flags into a promise of exact numerical tightness.
The result shall be the same with and without assertions. Invalid combinations
shall return false; assertion builds shall also write a diagnostic to the
current std::cerr. Valid combinations shall not emit that diagnostic.
The query shall preserve the flag word. Stream failures shall follow ordinary
stream rules. This local predicate shall not inspect the domain payload or
certify its ambient dimension, feasibility or cached numerical facts.
The prerequisites of 🔗 1. BD_Shape
Cache assertions have logical dependencies. Checking their finite Boolean model must remain distinct from checking the numerical representation.
Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool OK() const;
Enumerate every flag vector against an independent propositional oracle; check accepted-state counts, source preservation and diagnostic presence in assertion/release builds. Inspect payload independence.
src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
ascii_dump(stream) shall write signed keywords in the order ZE EM SPC SPR. ZE shall be positive exactly for the zero flag word; each other sign shall equal its stored named bit. One space shall separate successive fields except for two spaces after EM. The record shall end with one trailing space. The exact separators shall follow the default stream formatting; caller-selected width/fill/alignment shall retain ordinary character/string insertion behavior.
Export shall preserve the stored flags, including transient inconsistent
vectors, without reconciling claims or inspecting numerical payload.
Partial output, state flags and exceptions shall follow the selected stream.
The prerequisites of 🔗 1. BD_Shape
ascii_dump() shall send the same record to std::cerr. print() shall write No user level output operator defined for BD_Shape<T>::Status. followed by a flushed newline to std::cerr.
Serialized cache claims and diagnostics must retain the actual flag state without triggering domain normalization.
Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
void ascii_dump(std::ostream& stream) const; void ascii_dump() const; void print() const;
Check exact field signs/order/separators over every flag word, stream formatting and source preservation. Exercise returning/throwing output failures and the declared stderr routes, including their flush behavior.
src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
ascii_load(stream) shall extract exactly the signed keywords of
🔗 4. BD_Shape
For parsed zero marker Z and remaining flag word F, success
shall require Z ⇔ (F = 0) and the consistency predicate of
🔗 3. BD_Shape
The BD loader shall accumulate fields in a local candidate. Lexical rejection,
input exceptions and a contradictory ZE marker shall leave the prior word
unchanged. After a complete canonical marker/word pair, it shall install that
word and return its consistency result; a false consistency result may thus
leave inconsistent loaded flags.
The caller shall restore valid status before installing it as domain state.
Stream/resource exceptions shall retain their ordinary propagation and completed
temporary cleanup. The internal get_field parser shall assign its output
Boolean only on a successful signed-keyword match and preserve it on rejection.
Its keyword shall be a live nonnull null-terminated string, and its output
Boolean shall be live and writable.
The prerequisites of 🔗 1. BD_Shape
The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.
Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool ascii_load(std::istream& stream); // Internal helper, in its defining translation unit or implementation namespace: bool get_field(std::istream& stream, const char* keyword, bool& positive);
Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and get_field output preservation. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.
src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.