Parma Polyhedra Library requirements
C++ box widening, limiting constraints and narrowing
1. Threshold box widening and finite stabilization PPL-SPEC-001034

For compatible boxes of one fixed interval profile, let Y be the argument's entry value and X the receiver's entry value, with Y ⊆ X. The iterator overload of CC76_widening_assign shall apply the threshold interval rule of 🔗 1. Threshold interval widening and finite stabilization independently to every coordinate. It shall contain both input sets. An empty argument shall leave the receiver's represented set unchanged. Empty and universe in zero dimensions shall retain their distinct meanings. Self-aliasing shall preserve the represented set.

For nonempty operands, a finite lower boundary moving numerically down from the previous factor shall move to the greatest threshold not above the current boundary, or become unbounded when no such threshold exists. A finite upper boundary moving numerically up shall move to the least threshold not below it, or become unbounded when no such threshold exists. Exact threshold hits, other finite boundaries and already unbounded boundaries shall retain the current factor's boundary. A finite threshold replacement shall retain the current endpoint's openness.

The range shall use readable, multipass bidirectional iterators. It shall be finite, sorted in nondecreasing numerical order and stable throughout the call, with finite thresholds exactly representable in the boundary type. Empty ranges and duplicate values shall be admitted. The range shall not alias storage modified by the call. The numerical and policy conditions of 🔗 1. Threshold interval widening and finite stabilization shall apply.

For a fixed dimension, interval policy and finite threshold range, the ascending recurrence shall first enclose the preceding widened result and the next input, then widen that enclosure against the preceding widened result. This recurrence shall stabilize after finitely many changes: each coordinate has only finitely many threshold/carrier boundaries to visit, and endpoint membership can weaken only finitely often. All comparisons and assignments shall satisfy the selected arithmetic profile's prerequisites.

Unequal box dimensions shall throw std::invalid_argument before receiver modification, including empty and zero-dimensional cases. Containment of the previous argument in the current receiver shall remain a caller precondition. The box validity, lifetime, synchronization and numerical prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. A distinct argument and the threshold range shall retain their values. The enabled overload shall require the exact same Box<ITV> type and an implicit conversion from const ITV& to const Interval_Base&. Resource or numerical failures shall retain their underlying operation's guarantees; whole-operation rollback shall not be promised.

2. Default box widening and precision-sensitive delay tokens PPL-SPEC-001035

CC76_widening_assign(y,tp) shall use the threshold rule of 🔗 1. Threshold box widening and finite stabilization with the fixed ordered values  − 2,  − 1, 0, 1, 2. The selected boundary type shall represent those values exactly. widening_assign(y,tp) shall have the same behavior. Receiver and argument shall have the same dimension, and the argument's entry set shall be contained in the receiver's entry set.

With a null token pointer or a zero counter, the receiver shall become the default threshold-widened value. With a positive counter, the receiver's represented set shall remain its entry set. The counter shall decrease by exactly one if the corresponding undelayed widening would strictly enlarge that set; otherwise it shall retain its value. Tokens shall not be consumed merely because the operation was called. The counter shall be a live, separately owned writable unsigned object, with access synchronized against other users.

A fixed finite initial token budget, without replenishment during the ascending recurrence, shall preserve the finite-stabilization guarantee of 🔗 1. Threshold box widening and finite stabilization. Each delayed precision loss can consume at most one available token; after exhaustion the ordinary widening shall apply. Calls whose undelayed result is exact shall not require a token.

Both entry sets, dimension checking, enabled interval type, source preservation, self-aliasing and exceptional-operation conditions shall follow 🔗 1. Threshold box widening and finite stabilization. Dimension mismatch shall be rejected before changing the receiver or counter. The result shall not depend on sharing default stop-point objects across callers. Underlying resource or numerical exceptions shall not imply a transaction over receiver and counter.

PPL-SPEC-001036
3. Box extrapolation with selected limiting constraints PPL-SPEC-001036

limited_CC76_extrapolation_assign(y,cs,tp) shall require the previous argument's entry set Y to be contained in the receiver's entry set X. The boxes shall have equal ambient dimensions, and the constraint system's dimension shall not exceed them. Dimension errors shall throw std::invalid_argument before receiver or token modification, including on empty or zero-dimensional operands. Strict inequalities in the limiting system shall be admitted under the selected interval policy; their endpoint representation shall retain the outward-conversion rules below.

For nonempty positive-dimensional inputs, limiting constraints shall be selected from the entry receiver. A nontrivial constraint concerning only one coordinate shall be selected exactly when every point of X satisfies it. Constant constraints and constraints involving multiple coordinates shall be ignored. Redundant or differently scaled rows shall not change the mathematical selection rule.

Let L be the least box of the selected profile enclosing the conjunction of the selected coordinate constraints. Let W be the result of the default delayed widening specified by 🔗 2. Default box widening and precision-sensitive delay tokens, computed from the entry operands and counter. The result shall denote W∩L, under the same-profile intersection contract of 🔗 4. Cartesian box intersection. It shall contain X and Y and be contained in W. Under exact rational endpoint arithmetic, the selected constraints shall hold exactly. Under outward endpoint conversion, their box representation shall follow 🔗 1. Addition of optimally supported box constraints; original bounds need not all remain exact after that conversion.

An empty previous argument, empty receiver or zero-dimensional receiver shall retain the current represented set and leave the counter unchanged. A distinct box argument and the supplied constraint system shall retain their values. Self-aliasing of the box operands shall be admitted.

With a fixed finite limiting system, fixed profile and dimension, exact admitted comparisons/conversions and a finite token budget without replenishment, the prescribed ascending recurrence shall stabilize. Selected bounds can only be lost as the receiver grows; each coordinate can visit only the finite threshold/limiting boundary set, including open/closed membership, and its unbounded extents. Arbitrarily changing limiting systems shall have no general finite-convergence guarantee.

The validity, lifetime, synchronization, numeric and enabled interval-type prerequisites of 🔗 2. Default box widening and precision-sensitive delay tokens shall apply. Constraint descriptors and diagnostic reporting shall retain the initialized-context prerequisites of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical and resource exceptions may propagate without whole-operation rollback.

PPL-SPEC-001037
4. Box narrowing with complete previous-boundary retention PPL-SPEC-001037

For equal-dimensional boxes, let X be the receiver's entry set and Y the previous argument's entry set, with X ⊆ Y. CC76_narrowing_assign(y) shall replace the receiver by a box Z with X ⊆ Z ⊆ Y.

For nonempty positive-dimensional inputs, each finite previous lower boundary shall be retained in the result, including its exact value and openness. A previous unbounded lower boundary shall leave the current lower boundary unchanged. The corresponding rule shall apply to upper boundaries. Where both current and previous boundaries are finite, the complete previous boundary shall be retained; endpoint membership shall not be copied from the current factor when it differs from that previous boundary.

An empty current set shall remain empty. If the previous set is empty, the containment precondition makes the current set empty as well. Zero-dimensional values shall retain their represented set. A distinct argument shall retain its set and dimension. Self-aliasing shall preserve the receiver's represented set.

For a fixed dimension and interval policy, a descending recurrence shall supply a current set contained in the preceding narrowed result and narrow it against that preceding result. This recurrence shall stabilize after finitely many changes: a previous finite boundary remains fixed, and a previous unbounded boundary can become finite at most once. Reaching the empty set shall terminate further set changes. The selected endpoint comparisons and assignments shall meet their numerical prerequisites.

Dimension mismatch shall throw std::invalid_argument before receiver modification, including empty and zero-dimensional cases. Nesting shall remain a caller precondition. The enabled overload shall require the exact same Box<ITV> type and an implicit conversion from const ITV& to const Interval_Base&. The validity, lifetime, synchronization and numerical conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Diagnostic reporting shall retain its initialized-context prerequisites. Numerical or resource exceptions shall follow the underlying operation's guarantees without a general rollback promise.

PPL-SPEC-001647
5. Threshold-aware CC76 box convergence certificates PPL-SPEC-001647

CC76_Certificate shall record a finite remaining level for a nonempty Box<ITV> whose boundary type represents the ordered default stopping points T = { − 2,  − 1, 0, 1, 2}. An unbounded endpoint shall contribute zero. A closed endpoint at a finite carrier extent shall also contribute zero; an open endpoint there shall contribute one. Any other finite lower endpoint at b shall contribute 2 + 2#{t ∈ T : t < b} + o, where o is one for an open endpoint and zero for a closed endpoint. A finite upper endpoint shall instead count stopping points strictly greater than its value. The certificate level shall be the sum over both endpoints of every coordinate.

Default construction shall describe the zero-dimensional universe. Copying and assignment shall preserve the stored level. Comparison shall return 1, 0 or -1 according as the receiver's level is greater than, equal to or less than the argument's level. Compare shall order larger levels first. Comparison with a box shall compute its certificate and use the same ordering. Equal levels shall not imply equal sets. Inclusion alone shall not promise a nonincreasing level: an endpoint moving inside a threshold cell may also open.

For a fixed dimension and interval policy, consider a nonempty previous box and a containing candidate, widened by the tokenless default CC76 overload of 🔗 2. Default box widening and precision-sensitive delay tokens. Each endpoint level shall be nonincreasing over that widened step, and every strict set increase shall strictly decrease the sum. The sum shall be between zero and 26 times the dimension, proving finite stabilization for this base widening and supplying the finite certificate required by 🔗 3. Certificate-based powerset widening. This compatibility shall not extend to arbitrary iterator-supplied stopping points, delayed widening or limited extrapolation without a separate argument.

Empty box construction shall throw std::invalid_argument. Unrepresentable stopping points shall retain the boundary conversion's exception, or throw std::invalid_argument if the converted values are not strictly ordered. A dimension for which 26 times the dimension would overflow dimension_type shall throw std::length_error. The box lifetime, initialization and numerical prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Queries may normalize lazy caches without changing the represented set.