Parma Polyhedra Library requirements
Octagonal_Shape<T> internal status
1. Octagonal_Shape<T> internal status value ownership and prerequisites PPL-SPEC-001617

The nested Status shall own a finite set of named Boolean flags: empty, strongly_closed. 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. Octagonal_Shape internal status consistency predicate alone shall not certify those numerical facts.

PPL-SPEC-001618
2. Octagonal_Shape<T> internal status flag queries and transitions PPL-SPEC-001618

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. Octagonal_Shape internal status value ownership and prerequisites. set_zero_dim_univ() shall clear all flags. reset_zero_dim_univ() shall replace zero by the empty-only state and preserve every nonzero state. set_empty() shall replace the entire word by the empty-only state; reset_empty() shall clear only the empty bit. Other named setters/resets shall set/clear only the indicated bit, subject to no additional flag dependencies enforced by these individual updates.

Updates shall not generally reconcile other assertions. Transient inconsistent vectors shall remain available to 🔗 3. Octagonal_Shape internal status consistency predicate, but shall not be installed as valid domain state. The prerequisites of 🔗 1. Octagonal_Shape internal status value ownership and prerequisites shall apply.

3. Octagonal_Shape<T> internal status consistency predicate PPL-SPEC-001619

OK() shall return true exactly for the zero word, empty-only and strongly-closed-only words. Empty and strong closure shall exclude one another. The closure flag shall refer to the owning shape's selected representation invariant; rounded/bounded bounds need not be exactly tight.

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. Octagonal_Shape internal status value ownership and prerequisites shall apply.

4. Octagonal_Shape<T> internal status signed-keyword export PPL-SPEC-001620

ascii_dump(stream) shall write signed keywords in the order ZE EM SC. 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. Octagonal_Shape internal status value ownership and prerequisites shall apply.

5. Octagonal_Shape<T> internal status signed-keyword loading and rejection PPL-SPEC-001621

ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Octagonal_Shape internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.

For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Octagonal_Shape internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.

The loader shall retain its preceding word until parsed fields update it. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. 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. Octagonal_Shape internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 2. Compatible octagonal record loading and failure state.