Parma Polyhedra Library requirements
Internal finite interval cutoff conversions
1. Single real cutoff conversion on the destination carrier PPL-SPEC-000686

For a live constraint with finite canonical cutoff q and relation V_EMPTY, V_LGE, V_EQ, V_NE, V_LT, V_LE, V_GT or V_GE, convert_real(to) shall return a relation r’ and store a cutoff q’ such that, for every value x representable by the destination scalar type, x r q holds exactly when x r’ q’ holds. V_EMPTY shall denote false and V_LGE true, independently of the stored cutoff. This equivalence shall concern the destination's represented carrier; it shall not imply equivalence for all real numbers between adjacent representable destination values.

An empty or unconstrained source shall return that same relation without changing to or reading a cutoff value; no initialized cutoff storage shall be required for those two relations. An exactly representable cutoff shall retain its ordinary relation and numerical cutoff. Equality at an inexact cutoff shall become V_EMPTY; disequality there shall become V_LGE. An upper inequality shall use an upward cutoff and a lower inequality a downward cutoff. A nonstrict inequality whose cutoff is inexact shall become strict at the outward-rounded cutoff. The source shall remain unchanged.

Source and destination scalars shall be admitted native integer types, mpz_class, canonical mpq_class or configured supported native floating formats, including supported checked forms whose policies admit the conversions used. The finite cutoff's required upward and downward conversions shall remain within the destination's finite representable range. Source and destination storage shall be distinct, live and valid; borrowed cutoffs shall remain live. Numerical conversion, resource, shared-temporary serialization and FPU prerequisites shall be those of the corresponding assign_r contracts. In particular, a native floating destination requiring directed rounding shall have the required caller-owned FPU state. No additional library initialization shall be required.

PPL-SPEC-000687
2. Paired real cutoff conversion and point enclosure PPL-SPEC-000687

Under the finite scalar, storage and numerical prerequisites of 🔗 1. Single real cutoff conversion on the destination carrier, convert_real(to1, rel2, to2) shall return rel1 and produce the conjunction of the predicates described by (rel1, to1) and (rel2, to2). This conjunction, interpreted over the reals, shall contain every real number admitted by the source constraint. The source shall remain unchanged. The output objects shall be distinct from one another and from the source's storage.

For a source relation other than equality, rel1 shall be V_LGE, to1 shall remain unchanged, and the second relation and cutoff shall be the single-cut conversion of 🔗 1. Single real cutoff conversion on the destination carrier.

For equality when the upward conversion reports exact equality, rel1 shall be V_LGE, to1 shall remain unchanged and the second predicate shall be equality at that cutoff. Otherwise, the two finite outputs shall enclose the source point using downward and upward cutoffs. Their reported relations shall retain the established strict or nonstrict comparison with that point. When the conversions establish the same exact point, the result shall reduce to an unconstrained first predicate and equality in the second predicate. In that latter case, to1 may have been written by the downward conversion. A returned V_LGE shall make its associated stored cutoff irrelevant to the predicate; callers shall not interpret an unchanged to1 as an established bound.

PPL-SPEC-000688
3. Integral cutoff normalization PPL-SPEC-000688

For a finite constraint satisfying 🔗 1. Single real cutoff conversion on the destination carrier, convert_integer(to) shall produce an equivalent predicate on integer candidates. Every resulting effective cutoff shall be integral. An upper inequality shall normalize to a closed upper bound, using ⌊q⌋ for x ≤ q and ⌈q⌉ − 1 for x < q. A lower inequality shall normalize to a closed lower bound, using ⌈q⌉ for x ≥ q and ⌊q⌋ + 1 for x > q.

Equality at an integral cutoff shall remain equality and at a nonintegral cutoff shall become V_EMPTY. Disequality at an integral cutoff shall remain disequality and at a nonintegral cutoff shall become V_LGE. Empty and unconstrained inputs shall retain their relation without changing to. The source shall remain unchanged.

This exact normalization shall require the relevant rounded integral cutoffs and any unit adjustment to be representable exactly by the destination scalar. Source/destination lifetimes, separation, resources, serialization and native FPU prerequisites shall follow 🔗 1. Single real cutoff conversion on the destination carrier and the scalar's floor, ceiling and unit-arithmetic contracts. A caller shall not infer an exact normalized predicate from a conversion or unit adjustment outside those prerequisites.