Parma Polyhedra Library requirements
Internal interval endpoint interpretation and comparison
1. Boundary infinity and scalar-domain extremum interpretation PPL-SPEC-001077

A boundary shall comprise its named side, a scalar object and an information object. Under the representation rules of 🔗 1. Interval types, initial storage and independent value copies, a stored SPECIAL flag shall denote negative infinity on LOWER and positive infinity on UPPER; its numerical payload shall be inactive. A normal boundary shall instead use the initialized scalar value. Canonical GMP values and admitted checked scalar policies shall retain their own scalar contracts. NaN shall remain outside this boundary domain. An information policy storing special endpoints shall not be combined with a scalar type whose numerical limits already provide infinity.

is_boundary_infinity shall recognize the side's natural infinity, using SPECIAL when it is stored and otherwise the scalar's actual infinity. normal_is_boundary_infinity shall recognize only the latter encoding on an admitted normal boundary. Reverse infinity shall mean positive infinity on LOWER or negative infinity on UPPER and shall be admitted only when the information policy permits infinity as an element; normal_is_reverse_infinity and is_reverse_infinity shall recognize that scalar encoding. is_minus_infinity and is_plus_infinity shall recognize the corresponding sign of the admitted boundary. infinity_sign shall return -1, +1 or zero according as the boundary is negative-infinite, positive-infinite or finite. These queries shall not change either object.

On LOWER, is_domain_inf shall recognize the minimum of the declared boundary domain: metadata negative infinity when available, otherwise actual scalar negative infinity when available, otherwise the native bounded scalar minimum. On UPPER, is_domain_sup shall analogously recognize the maximum. For unbounded finite-only scalar domains these extrema shall not exist. These two domain-extremum uses shall retain their natural sides; a finite scalar limit shall not thereby become an infinite endpoint.

Objects and borrowed storage shall remain live, and queries shall be synchronized against modification. An inactive payload shall not require a numerical read by a metadata-based query. Queries of a normal payload shall require a valid initialized scalar. Numerical classification and mixed-scalar comparison shall retain their admitted types and configured availability. No additional library initialization shall be required.

PPL-SPEC-001078
2. Boundary openness and infinity membership interpretation PPL-SPEC-001078

For the boundary representation and lifetimes of 🔗 1. Boundary infinity and scalar-domain extremum interpretation, is_open shall return the stored OPEN value when the information policy stores it. Otherwise it shall identify a natural infinite endpoint as open exactly when infinity is excluded from the carrier; finite endpoints shall be closed. A metadata policy without stored openness shall report an unsupported OPEN property as false under 🔗 3. Stateless interval metadata reports unsupported properties.

special_is_open shall report whether infinity is excluded from the carrier for an admitted metadata special endpoint. normal_is_open shall use the stored openness when supported; otherwise it shall infer openness only for a normal scalar natural infinity when infinity is excluded. is_boundary_infinity_closed shall hold exactly for a natural infinite endpoint, an infinity-admitting carrier and a false stored OPEN query. boundary_infinity_is_open shall report exclusion of infinity from the carrier or a true OPEN query, without inspecting a scalar payload.

A valid complete representation shall satisfy the selected carrier and information policy's consistency rules; unsupported openness shall not invent a stored bit. All queries shall preserve scalar and metadata state, including the opposite side and cached interval claims. They shall require no additional initialization, coefficient constants or FPU state change.

3. Unbounded and signed-infinity boundary assignment PPL-SPEC-001079

With the live storage and representation capabilities of 🔗 1. Boundary infinity and scalar-domain extremum interpretation, special_set_boundary_infinity shall require stored special endpoints, set the selected side's SPECIAL property, leave the scalar payload unchanged and return V_EQ.

set_unbounded shall select the side's outward domain extremum. A metadata encoding shall use the preceding special-endpoint operation. Otherwise LOWER shall assign negative infinity with ROUND_UP and UPPER positive infinity with ROUND_DOWN, retaining the scalar assignment's returned Result. A bounded scalar without an infinity encoding may consequently hold its finite domain minimum or maximum; this shall not relabel that finite value as an actual scalar infinity. An exactly assigned infinite endpoint shall set OPEN when infinity is excluded from the carrier.

set_minus_infinity and set_plus_infinity shall assign their stated infinity using either the admitted metadata encoding or the scalar assignment with the selected side's direction. A true open request shall require the natural side for that infinity; a false request shall require an infinity-admitting carrier. Stored special endpoints shall require the natural side. Their OPEN update shall be true when requested or when the numerical assignment is inexact. The numerical result shall be representable under the selected scalar policy.

set_boundary_infinity shall assign the natural infinity of the selected side through metadata or the scalar assignment with that side's direction. It shall require a true open request or an infinity-admitting carrier, and a representable scalar result. It shall set OPEN when requested.

These operations shall retain existing OPEN state when no rule above sets it; a false request shall not clear an existing true property. They shall preserve all other boundary/interval properties, the opposite side and cached interval claims. A caller requiring replacement of such retained properties shall clear them separately before assignment. Setting a stored special endpoint shall not require an initialized readable numerical payload. Scalar writes shall retain the marker-assignment meanings of 🔗 1. Typed special-marker assignment to native integer storage and 🔗 2. Typed special-marker assignment to GMP integer and rational storage where applicable, and meet their own type, resource, policy and caller-owned FPU prerequisites; failures shall retain those operations' permitted partial state, without an additional rollback promise. No extra library initialization shall be required.

PPL-SPEC-001080
4. Numerical sign of an interval boundary PPL-SPEC-001080

For the representation of 🔗 1. Boundary infinity and scalar-domain extremum interpretation, sgn_b shall return -1, zero or +1 according as the active boundary value is negative, zero or positive. A metadata natural infinity shall have the sign of its side, without reading its inactive payload. An admitted normal scalar infinity shall have its own sign. Endpoint openness shall not affect this numerical sign, including for positive and negative scalar zero.

The boundary scalar and metadata shall remain unchanged. Finite scalar payloads shall satisfy their ordinary numerical validity conditions and source lifetimes. Queries shall require no additional library initialization or FPU state change. The side and property keys shall retain 🔗 1. Boundary sides and interval metadata property keys.

5. Ordering of interval boundary cuts PPL-SPEC-001081

For admitted boundaries of 🔗 1. Boundary infinity and scalar-domain extremum interpretation, eq, lt, gt, le and ge shall compare endpoint cuts. Finite numerical values shall have their exact scalar ordering, with negative infinity before all finite values and positive infinity after them. At an equal numerical value the cut order shall be

(v, UPPER, open) < (v, closed) < (v, LOWER, open).

Closed lower and upper boundaries at that value shall denote the same cut. Two cuts shall be equal exactly when their numerical values and positions in this order agree. The same comparison of inclusion positions shall apply to admitted infinity encodings; infinity signs shall not be inferred from an inactive metadata payload. gt shall be the converse of lt; le and ge shall include equality. Mixed scalar/information types shall be admitted when their numerical comparison and representation contracts support the operands.

All operands shall retain their values and metadata. Same-object operands and overlapping read-only references shall be admitted. Access shall be synchronized against mutation; scalar comparisons shall retain their configured availability and numerical prerequisites. No additional library initialization or FPU state change shall be required.