Parma Polyhedra Library requirements
C++ octagonal readable presentation and owned storage
PPL-SPEC-001234
1. Human-readable octagonal presentation PPL-SPEC-001234

Stream insertion shall write false for a shape whose emptiness is already certified, and true for a universe shape, including their zero-dimensional forms. Otherwise it shall write a conjunction of the stored finite unary and signed binary bounds. A logically empty shape whose emptiness has not been classified may be displayed as a contradictory conjunction. Presentation shall not require computing strong closure or provide a canonical constraint list.

Unary constraints shall precede binary constraints and shall be ordered by increasing coordinate identity. Each unary equality shall be displayed once; otherwise a finite lower side shall precede a finite upper side. For a stored unary bound on twice a coordinate, exact representable halving shall permit the form variable relation value. If such halving is not exact and representable in the selected bound profile, the doubled coefficient shall remain explicit. A sign may be moved to the coefficient side, including -2*variable <= bound, when this denotes the same halfspace. Printed relations, signs and constants shall retain the exact mathematical meaning of the stored bound.

Binary constraints shall be ordered by increasing larger coordinate identity, then increasing smaller coordinate identity. Difference constraints for each pair shall precede sum constraints. Two opposite finite bounds that are additive inverses shall be displayed as one equality; other finite sides shall be displayed as non-strict inequalities. Difference forms may reverse the coordinate order and relation to display a nonnegative constant. Sum forms shall keep the smaller-index coordinate first. Positive-infinite sides shall not be displayed. Consecutive constraints shall be separated by ", "; no ambient-dimension header shall be inserted.

Variable occurrences shall follow the active formatter and its live-callback prerequisites in 🔗 7. Active Variable formatter and initialized thread state and 🔗 8. Variable names, formatter dispatch and output failures. Bound values shall follow the admitted mathematical numeric stream output of 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration. Interpreted with their coordinate identities, the printed conjunction shall denote the source's represented real set.

Insertion shall return the supplied stream reference without adding a newline or explicitly flushing it. print() shall send the same presentation to the current std::cerr. Both operations shall preserve the source set, ambient dimension, stored status, matrix and ownership. Stream and formatter failures shall retain their applicable state, exception-mask and partial-output behavior. Rendering callbacks shall not mutate or invalidate traversed source objects.

The selected representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. The borrowed stream and its callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

PPL-SPEC-001235
2. Owned octagonal memory accounting PPL-SPEC-001235

external_memory_in_bytes() shall report the owned external storage of the pseudo-triangular bound matrix under 🔗 4. Owned backing storage and live-payload memory accounting, including its backing-row allocation, retained capacity, owned row metadata and external payload of every physically live selected coefficient. Logically empty shapes, inactive geometric content or reduced ambient dimensions shall not remove still-owned allocated capacity from the count. Borrowed views, independently owned runtime temporaries, other objects and allocator bookkeeping shall be excluded.

total_memory_in_bytes() shall equal sizeof(Octagonal_Shape<T>) plus the external count. Sizes shall be those of the selected build/profile, and the sum shall fit memory_size_type. The selected live coefficient memory hooks shall be well-formed. Both queries shall preserve the source set, ambient dimension, stored status, matrix, ownership and lifetimes. They shall not classify emptiness or recompute strong closure.

The selected representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Live owned storage shall remain unchanged during either query.