Parma Polyhedra Library requirements
C++ quantified interval relation refinement
PPL-SPEC-000716
1. Existential interval relation refinement UID: PPL-SPEC-000716 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

For receiving entry set A, witness set B and relation R, refine_existential(rel, x) shall produce an outward interval enclosure of

{aโ€‰โˆˆโ€‰Aโ€‰โˆฃโ€‰โˆƒbโ€‰โˆˆโ€‰B : aโ€†Rโ€†b}.

With exact endpoint conversion and supported membership distinctions, the result shall be the least receiving-profile interval containing that set. An empty witness shall produce empty. Equality shall reduce to intersection. Disequality with a nonsingleton witness shall preserve A; disequality with a singleton shall remove that point before taking the interval hull. For finite ordered witnesses, strict inequalities shall use the opposite extreme regardless of its attainment: strict less-than uses the supremum and strict greater-than the infimum, excluding that limit. For a nonstrict inequality, that limit shall be retained exactly when the witness attains it. Unbounded finite ranges shall remain distinct from included infinite values under an extended carrier.

The admitted relations shall be LESS_THAN, LESS_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, EQUAL and NOT_EQUAL. Unsupported openness or inexact boundary conversion may enlarge the exact filtered hull, but shall not exclude any value that satisfies the stated quantified predicate.

The receiver and any interval operand shall be initialized and valid, with compatible ordered carriers. The receiving policy shall admit empty results where possible. Scalar witnesses shall denote admitted singleton values. Active payloads shall be initialized and rational payloads canonical. Boundary conversions and comparisons shall satisfy the numerical policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall retain their meaning without requiring numerical evaluation of their payloads. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical failure shall propagate with the scalar operation's guarantees, without a universal rollback promise.

The receiver may alias the witness interval. The result shall use both operands' entry sets; a distinct witness shall remain unchanged. The returned I_Result shall obey the logical shape and status meanings of ๐Ÿ”— 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

RATIONALE:

Existential filtering keeps a value whenever at least one witness satisfies the relation. Strictness and attainment determine whether the limiting value itself survives.

INTERFACE:

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

template <Interval_Source From>
I_Result
refine_existential(Relation_Symbol rel, const From& x);
VERIFICATION_CRITERIA:

Compare all six relations against independent exact endpoint predicates, then take the hull of the retained literal endpoint-and-open-cell set. Include empty and singleton witnesses, all finite endpoint topologies, rays and universe, scalar witnesses, distinct-source preservation and receiver aliasing. Check limiting-value attainment for strict and nonstrict inequalities. Exercise policies admitting signed infinity values separately from ordinary unbounded finite intervals, and outward conversion where exact representation is unavailable.

SOURCE:

src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalrefinementspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

PPL-SPEC-000717
2. Universal interval relation refinement UID: PPL-SPEC-000717 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

For receiving entry set A, witness set B and relation R, refine_universal(rel, x) shall produce an outward interval enclosure of

{aโ€‰โˆˆโ€‰Aโ€‰โˆฃโ€‰โˆ€bโ€‰โˆˆโ€‰B : aโ€†Rโ€†b}.

With exact endpoint conversion and supported membership distinctions, the result shall be the least receiving-profile interval containing that set. An empty witness shall preserve A by vacuity. A nonempty witness shall leave an empty receiver empty. Equality shall yield empty for a nonsingleton witness and intersection for a singleton. Disequality shall produce an enclosure of the interval hull of AโงตB. For ordinary finite ordered witnesses, strict less-than shall use the infimum and admit that limit exactly when the witness does not attain it; strict greater-than shall analogously use the supremum. Nonstrict less-than and greater-than shall admit the corresponding limiting value. Infinite extrema shall be interpreted through their endpoint membership and carrier; a metadata-encoded unbounded endpoint shall not be treated as a finite stored payload.

The admitted relations shall be LESS_THAN, LESS_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, EQUAL and NOT_EQUAL. Unsupported openness or inexact boundary conversion may enlarge the exact filtered hull, but shall not exclude any value that satisfies the stated quantified predicate.

The receiver and any interval operand shall be initialized and valid, with compatible ordered carriers. The receiving policy shall admit empty results where possible. Scalar witnesses shall denote admitted singleton values. Active payloads shall be initialized and rational payloads canonical. Boundary conversions and comparisons shall satisfy the numerical policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall retain their meaning without requiring numerical evaluation of their payloads. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical failure shall propagate with the scalar operation's guarantees, without a universal rollback promise.

The receiver may alias the witness interval. The result shall use both operands' entry sets; a distinct witness shall remain unchanged. The returned I_Result shall obey the logical shape and status meanings of ๐Ÿ”— 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

RATIONALE:

Universal filtering uses the most restrictive witness and preserves all receiver values for an empty witness set. The limit can satisfy a strict relation when every witness lies strictly beyond it.

INTERFACE:

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

template <Interval_Source From>
I_Result
refine_universal(Relation_Symbol rel, const From& x);
VERIFICATION_CRITERIA:

Compare all six relations against independent exact endpoint predicates, then take the hull of the retained literal endpoint-and-open-cell set. Include empty and singleton witnesses, all finite endpoint topologies, rays and universe, scalar witnesses, distinct-source preservation and receiver aliasing. Check limiting-value attainment for strict and nonstrict inequalities. Exercise policies admitting signed infinity values separately from ordinary unbounded finite intervals, and outward conversion where exact representation is unavailable.

SOURCE:

src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalrefinementspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.