Parma Polyhedra Library requirements
C++ target-adapted floating expression linearization
1. Target-adapted floating expression evaluation PPL-SPEC-000991

For a well-formed floating-point expression and sound composite abstract store, linearize() shall return true only with a linear form enclosing every modeled expression value consistent with the entry inputs, including the analyzed operations' rounding error. Target nodes and the oracle shall meet 🔗 4. Target-specific concrete-expression adapter protocol, 🔗 6. Oracle interval and expression-value queries and 🔗 7. Oracle reference-to-coordinate associations. Each stored affine binding shall already enclose the corresponding coordinate in that same modeled state. Correlations shall use consistent coordinate identities.

C shall have a supported native floating-point boundary type and sound interval operations under its initialized arithmetic/FPU prerequisites. Modeled metadata shall not itself establish numerical format support. The selected relative/absolute-error helpers shall support every format for which the operation needs an error bound. Allocation, callback and selected arithmetic operations shall satisfy their documented preconditions.

On false return, the output shall not establish a complete enclosure; no preservation of its prior value shall be promised. Documented callback, resource and unsupported-operation exceptions may propagate. Output owners shall remain safely destructible and reusable after such failure. Analysis shall use input entry values even when result designates a store binding; only the designated output may then change, and other input bindings and target nodes shall remain unchanged. No node or oracle ownership shall be acquired.

PPL-SPEC-000992
2. Floating constant linearization PPL-SPEC-000992

For a floating-constant node, linearize() shall query the oracle for that constant. Refusal shall return false. Success shall replace result with a dimension-zero form whose constant is the returned interval and whose homogeneous coefficients are zero. This leaf shall add no operation-rounding error beyond the oracle's enclosure. A valid unbounded oracle interval shall remain an admitted constant result; true at this leaf shall not by itself certify finite coefficients. The common prerequisites and failure/lifetime rules of 🔗 1. Target-adapted floating expression evaluation shall apply.

PPL-SPEC-000993
3. Unary and unsupported operator dispatch PPL-SPEC-000993

For unary UPLUS, linearize() shall return the operand's linearization without an additional rounding term. For UMINUS, it shall propagate operand refusal; on success it shall negate every coefficient interval, preserving the operand form's dimension. Unary BNOT shall report unsupported evaluation by throwing std::runtime_error.

Binary REM, BAND, BOR, BXOR, LSHIFT and RSHIFT shall return false without claiming a result. ADD, SUB, MUL and DIV shall dispatch to their matching helper contracts. Unknown kind/operator codes inconsistent with the target protocol shall be outside the admitted interface. The common prerequisites and failure/lifetime rules of 🔗 1. Target-adapted floating expression evaluation shall apply.

4. Rounding-aware addition linearization PPL-SPEC-000994

add_linearize() shall require an ADD node and linearize both operands in the same entry store. When either operand refuses, it shall return false. A successful child form with an unbounded coefficient shall also cause refusal before its relative-error form is constructed; later children need not be evaluated after this refusal. Let L1, L2 be their forms, Rf the selected format's relative-error form from 🔗 21. Format-specific relative-error linear form, and Af the interval returned by compute_absolute_error<C>(f). The output shall soundly enclose the coefficient-wise combination L1 + L2 + Rf(L1) + Rf(L2) + Af, retaining symbolic coordinate terms. It shall return false if the resulting coefficients are unbounded, and true otherwise. 🔗 1. Target-adapted floating expression evaluation shall govern runtime, entry-value, exception and ownership semantics.

PPL-SPEC-000995
5. Rounding-aware subtraction linearization PPL-SPEC-000995

sub_linearize() shall require a SUB node and linearize both operands in the same entry store. Operand refusal shall return false. A successful child form with an unbounded coefficient shall also cause refusal before its relative-error form is constructed; later children need not be evaluated after this refusal. Using L1, L2, Rf, Af as in 🔗 4. Rounding-aware addition linearization, the output shall soundly enclose L1 − L2 + Rf(L1) + Rf(L2) + Af, using coefficient-wise interval operations and preserving the operands' coordinate identities. It shall return false if any resulting coefficient is unbounded, and true otherwise. 🔗 1. Target-adapted floating expression evaluation shall govern common prerequisites and failure effects.

PPL-SPEC-000996
6. Interval-scalar multiplication linearization PPL-SPEC-000996

mul_linearize() shall require a MUL node, obtain both operand forms and intervalize both through the oracle. Failure of any required linearization or coordinate query shall return false. It shall select a bounded intervalized operand for scalar multiplication; if neither operand has a bounded interval enclosure it shall return false. If the retained form has an unbounded coefficient, an exactly zero selected scalar shall yield a dimension-zero form containing the absolute-error interval without constructing relative error; a nonzero selected scalar shall cause refusal. Width estimates may choose either bounded operand and shall not promise optimal precision.

For a bounded retained form, if I1 is selected, the result shall soundly enclose I1L2 + I1Rf(L2) + Af; if I2 is selected it shall soundly enclose I2L1 + I2Rf(L1) + Af. Scalar multiplication shall preserve the other operand's symbolic coordinates. It shall return false for an unbounded result coefficient, and true otherwise. Common notation and prerequisites shall follow 🔗 4. Rounding-aware addition linearization and 🔗 1. Target-adapted floating expression evaluation.

PPL-SPEC-000997
7. Nonzero interval-divisor linearization PPL-SPEC-000997

div_linearize() shall require a DIV node and first obtain the denominator's linear form and oracle-based interval enclosure. Required query refusal shall return false. If the closed hull of the denominator interval reaches zero it shall return false, including a zero endpoint excluded by openness. Thus a successful division shall not rely on an unproved nonzero denominator. A one-sided unbounded denominator whose closed hull excludes zero shall remain admitted when the selected interval arithmetic supports it.

It shall then linearize the numerator, propagating refusal. An unbounded numerator coefficient shall cause refusal before its relative-error form is constructed. For numerator form L1 and denominator enclosure I2, it shall soundly enclose L1 ⁄ I2 + Rf(L1) ⁄ I2 + Af, retaining numerator coordinates. An unbounded result coefficient shall return false; a bounded result shall return true. Common prerequisites and notation shall follow 🔗 1. Target-adapted floating expression evaluation and 🔗 4. Rounding-aware addition linearization.

PPL-SPEC-000998
8. Floating and integer cast linearization PPL-SPEC-000998

cast_linearize() shall require a floating-result cast node. For a floating argument it shall linearize that argument, propagating refusal. When the destination format contains every finite value representable by the source format, it shall retain the resulting form without added cast error. A constant enclosure certified by 🔗 11. Constant affine enclosures closed under destination rounding shall also require no added cast error.

For an integer argument it shall obtain a sound interval through get_integer_expr_value(), returning false on refusal. If the destination contains every finite value of the analyzer boundary format, it shall close any excluded finite endpoints of that interval and retain the resulting constant form without a further error term. Equality of formats shall satisfy this inclusion condition. Other integer enclosures certified by 🔗 11. Constant affine enclosures closed under destination rounding shall remain unchanged without an error term.

Value-set inclusion shall use is_less_precise_than(): the destination contains the analyzer exactly when !is_less_precise_than(destination, analyzer). The converse difference predicate shall not establish inclusion for incomparable formats.

In the remaining cases it shall add destination-format relative and absolute error enclosures. An unbounded input coefficient shall cause refusal before relative error is constructed. Unbounded resulting coefficients shall return false and bounded coefficients true. Error-free casts may retain admitted unbounded enclosures; success alone shall not certify finite coefficients. Common numerical and entry-value rules shall follow 🔗 1. Target-adapted floating expression evaluation; unsupported selected error helpers may report their documented exceptions.

PPL-SPEC-000999
9. Reference association and symbolic-store lookup PPL-SPEC-000999

For an approximable reference, linearize() shall obtain its possible coordinate identities from the oracle. Refusal or an empty association set shall return false. For a single associated coordinate, an existing store binding shall be copied into the result; an unbounded copied form shall return false. If that key is absent, the result shall be the exact unit variable form for that coordinate, with dimension equal to its index plus one. This symbolic fallback shall not require a numerical coordinate query.

For multiple possible coordinates it shall query every required coordinate interval and return false on refusal. Otherwise it shall form their interval hull as a dimension-zero constant form, returning true exactly when its coefficient is bounded. It shall not arbitrarily select one possible identity or combine alternatives as a conjunction. Coordinate validity, entry-value copying and common lifetime/numerical rules shall follow 🔗 7. Oracle reference-to-coordinate associations and 🔗 1. Target-adapted floating expression evaluation.

10. Native value membership in modeled floating formats PPL-SPEC-001658

For a configured supported native binary floating type Boundary and one of the seven modeled Floating_Point_Format values, cast_value_is_exact() shall return true exactly when the native value is finite and exactly representable in that modeled format. Both signs of zero shall be representable. Nonfinite native values shall return false.

Binary format membership shall include normal and subnormal values within the finite range of binary16, binary32, binary64, binary128 and x87 extended. IBM single and double membership shall use their normalized radix-16 value sets, including zero, their finite exponent ranges and their respective significand precisions. Membership shall be symmetric under sign reversal. The checker shall require no dynamic storage and shall preserve the active rounding direction.

11. Constant affine enclosures closed under destination rounding PPL-SPEC-001659

For a linear form over admitted real intervals with a configured supported native floating boundary type and a known modeled destination format, cast_interval_is_rounding_closed() shall return true exactly when all homogeneous coefficients are zero and the constant interval is nonempty, topologically closed, and has exactly representable finite endpoints as defined by 🔗 10. Native value membership in modeled floating formats. Infinite abstract bounds shall impose no additional representability condition. Retained zero dimensions shall not prevent certification.

A true result shall certify that rounding any admitted finite concrete value from the enclosure to a finite destination value remains in that enclosure. It shall not claim that every interior real value is exactly representable. False shall provide no such certificate. The checker shall preserve the represented form, its space dimension and the active rounding direction, and shall require no dynamic storage.