-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001042 Interval abstraction of wrapped integer images with refinement (Specified by)
- PPL-SPEC-001716 Addition and subtraction of intervals admitting infinity points (Specified by)
- PPL-SPEC-001717 Sign-stable extended interval products and quotients (Specified by)
- PPL-SPEC-001718 Degenerate and singular extended interval products and quotients (Specified by)
- PPL-SPEC-000729 Ordinary interval additive inversion (Specified by)
- PPL-SPEC-000730 Ordinary interval addition and subtraction (Specified by)
- PPL-SPEC-000731 Ordinary interval multiplication (Specified by)
- PPL-SPEC-000732 Ordinary interval division and zero-divisor abstraction (Specified by)
- PPL-SPEC-000733 Ordinary interval arithmetic value operators (Specified by)
- PPL-SPEC-001077 Boundary infinity and scalar-domain extremum interpretation (Specified by)
- PPL-SPEC-001078 Boundary openness and infinity membership interpretation (Specified by)
- PPL-SPEC-001079 Unbounded and signed-infinity boundary assignment (Specified by)
- PPL-SPEC-001080 Numerical sign of an interval boundary (Specified by)
- PPL-SPEC-001081 Ordering of interval boundary cuts (Specified by)
- PPL-SPEC-001086 Outward endpoint addition and subtraction (Specified by)
- PPL-SPEC-001087 Outward endpoint products and zero attainment (Specified by)
- PPL-SPEC-001088 Outward endpoint quotients and zero-limit candidates (Specified by)
- PPL-SPEC-001089 Outward endpoint residues modulo powers of two (Specified by)
- PPL-SPEC-001082 Normalization of numerical results into boundary properties (Specified by)
- PPL-SPEC-001083 Same-side outward boundary conversion and retained properties (Specified by)
- PPL-SPEC-001084 Opposite-side complement and additive inversion of boundaries (Specified by)
- PPL-SPEC-001085 Minimum and maximum selection of interval boundary cuts (Specified by)
- PPL-SPEC-000718 Interval construction from ordinary real constraints (Specified by)
- PPL-SPEC-000719 Constraint refinement through interval abstraction (Specified by)
- PPL-SPEC-000720 Independent outward endpoint extension (Specified by)
- PPL-SPEC-000722 Meet-preserving interval context simplification (Specified by)
- PPL-SPEC-000723 Interval construction disjoint from a supplied context (Specified by)
- PPL-SPEC-000686 Single real cutoff conversion on the destination carrier (Specified by)
- PPL-SPEC-000687 Paired real cutoff conversion and point enclosure (Specified by)
- PPL-SPEC-000688 Integral cutoff normalization (Specified by)
- PPL-SPEC-000681 Interval result possibilities and status-flag set operations (Specified by)
- PPL-SPEC-000682 Cutoff value storage and explicit borrowing criteria (Specified by)
- PPL-SPEC-000683 Interval-constraint relation adapter preserves supported relation codes (Specified by)
- PPL-SPEC-000684 Interval constraints retain relation and cutoff ownership (Specified by)
- PPL-SPEC-000685 Interval-constraint factories preserve explicit storage selection (Specified by)
- PPL-SPEC-000661 Boundary sides and interval metadata property keys (Specified by)
- PPL-SPEC-000662 Bounded unsigned flag-word updates preserve unrelated bits (Specified by)
- PPL-SPEC-000663 Stateless interval metadata reports unsupported properties (Specified by)
- PPL-SPEC-000664 Shared openness view retains a separate Boolean value (Specified by)
- PPL-SPEC-000665 Policy-selected metadata layout and cleared construction (Specified by)
- PPL-SPEC-000666 Independent endpoint and cardinality flag updates (Specified by)
- PPL-SPEC-000667 Bitset metadata copies and exchanges preserve the complete word (Specified by)
- PPL-SPEC-000668 Metadata ASCII representation and stream failure states (Specified by)
- PPL-SPEC-000709 Exact interval integer-point existence (Specified by)
- PPL-SPEC-000710 Interval endpoint normalization around integer points (Specified by)
- PPL-SPEC-000716 Existential interval relation refinement (Specified by)
- PPL-SPEC-000717 Universal interval relation refinement (Specified by)
- PPL-SPEC-000711 Interval assignment and directed enclosure (Specified by)
- PPL-SPEC-000712 Interval hull assignment (Specified by)
- PPL-SPEC-000713 Geometric interval union gap decision (Specified by)
- PPL-SPEC-000714 Interval intersection assignment (Specified by)
- PPL-SPEC-000715 Interval enclosure of set difference (Specified by)
- PPL-SPEC-000724 Interval construction from a scalar numeric literal (Specified by)
- PPL-SPEC-000725 Readable interval presentation and output delivery (Specified by)
- PPL-SPEC-000726 Bracketed interval stream parsing and rejection (Specified by)
- PPL-SPEC-000727 Reloadable interval metadata and endpoint export (Specified by)
- PPL-SPEC-000728 Compatible interval record loading and partial failure state (Specified by)
- PPL-SPEC-000701 Interval types, initial storage and independent value copies (Specified by)
- PPL-SPEC-000702 Interval endpoint and metadata references (Specified by)
- PPL-SPEC-000703 Interval shape and endpoint classification (Specified by)
- PPL-SPEC-000704 Exact interval set comparisons (Specified by)
- PPL-SPEC-000705 Interval closure and endpoint exclusion (Specified by)
- PPL-SPEC-000706 Interval swap and owned boundary memory (Specified by)
- PPL-SPEC-000707 Interval endpoint constraint views (Specified by)
- PPL-SPEC-000708 Interpreting logical interval emptiness flags (Specified by)
- PPL-SPEC-001642 Interval and scalar view adapters (Specified by)
An interval shall denote the values of its declared number carrier that satisfy its represented bounds and supported openness conditions. An unbounded boundary shall be distinguished from an included infinite value, and supported empty and singleton intervals shall retain their distinct meanings.
Endpoint values alone do not distinguish empty, singleton and open-boundary sets. The available endpoint distinctions depend on the supported interval policy.
Verification covers interval value types, policy-dependent carriers, bounds and membership. Related obligations: 🔗 2. Cartesian meaning of boxes, 🔗 3. Sound interval arithmetic.
Check each declared number carrier separately, including real and extended-real policies where supported. Include equal and reversed bounds, every supported endpoint-openness combination, finite singletons, half-unbounded intervals, empty and universe intervals, and singleton signed infinities where admitted. Check that a bound used only to express absence of a finite limit is not mistaken for an included infinite value.
doc/definitions.dox: Intervals and Boxes. src/Interval_defs.hh: interval and boundary semantics. src/Interval_Info_defs.hh: supported endpoint policies.
-
2. Interval abstraction of wrapped integer images with refinement UID: PPL-SPEC-001042 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For the receiver's entry interval X, an admitted width and representation from 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes, and the entry interval J denoted by refinement, wrap_assign shall produce an interval containing every
{wrapw, r(z) ∣ z ∈ X∩ℤ}∩J.The completed interval shall be contained in the receiving profile's outward interval conversion of J; exact conversion shall imply containment in J itself. refinement may denote an arbitrary valid interval or singleton; it need not lie inside the modeled value range. A refinement inside that range shall therefore bound the completed result to that range. An empty receiver shall remain empty. A receiver unbounded in either direction may conservatively become the refinement itself, and noninteger input points need not all be eliminated. No universal least-hull or complete integer filtering guarantee shall be inferred. With exact arithmetic, closed integral endpoints and a closed integral refinement inside the modeled range, the result shall be the least interval hull of the retained wrapped integer images.
The receiver may be the refinement interval, and a singleton refinement may borrow either of its boundary objects. Those calls shall use both entry values. A refinement with distinct storage shall retain its value. Returned I_Result shape and definite status claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations for the whole operation, including its entry-to-result change claims.
The validity, policy, active-payload, lifetime and synchronization conditions of 🔗 1. Interval types, initial storage and independent value copies shall apply. The selected backend shall support any actually evaluated power-of-two subtraction and signed/unsigned residue at the supplied exponent, as specified by its scalar contracts. Exact precision claims shall require exact endpoint conversion, modular arithmetic and any intermediate unit adjustment. Computational range failures, resources, shared temporaries and caller-owned FPU state shall retain those scalar contracts. An admitted modeled width alone shall not establish these backend capabilities. Valid calls shall require no additional PPL initialization. Underlying failures may leave partly updated storage; there shall be no aggregate rollback guarantee.
RATIONALE: A refinement can clip a modular image without making the modular image itself convex; entry-value aliases and truthful aggregate result claims remain independent obligations.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
// Member of Interval<Boundary,Info>: template <Interval_Source From> I_Result wrap_assign(Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, const From& refinement);
VERIFICATION_CRITERIA: Check returned logical shape and entry-to-result change claims on full-period assignment, split/join and intersection paths, including unchanged copied refinements, receiving aliases, borrowed scalars, empty inputs and signed residues. Enumerate concrete wrapped integers in bounded translated intervals using an independent quotient/remainder oracle. Include all endpoint topologies, fractions, one/full/multiple periods, sign discontinuities, empty/ray/universe inputs and arbitrary refinements inside, partly outside and disjoint from the modeled range. Check witness containment, refinement containment and the stated closed-integral least-hull guarantee. Exercise distinct-source preservation, same-interval and borrowed-boundary aliases, meaningful shape/change flags and native/GMP admitted backend prerequisites.
BIBLIOGRAPHY: SimonK07 | Sections 5.1–5.4, explicit wrapping; PDF page indices 7–10 (zero-based).
SOURCE: src/Interval_defs.hh; src/Boundary_defs.hh;
tests/wrappingspec1.cc; tests/wrappingoracle.hh; tests/wrappingpublic1.cc; tests/intervalresultsspec1.cc.
-
1. Addition and subtraction of intervals admitting infinity points UID: PPL-SPEC-001716 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For extended-real entry sets X and Y, add_assign(x,y) and sub_assign(x,y) shall enclose the hull of all their defined extended-real sums and differences. Opposite infinities shall have no sum and equal infinities no difference; these undefined pairs shall contribute no value. With exact endpoint operations and supported membership the enclosure shall be exact. If there is no defined pair, the result shall be empty.
A finite nonempty interval combined with an included infinity singleton shall give the corresponding signed infinity, reversing the right infinity for subtraction. Equal-sign infinity singleton sums and opposite-sign singleton differences shall retain the defined infinity. For rays, a finite extremum shall be attained exactly when its required source extrema are attained; a same-sign infinite sum shall be included if either operand can attain that infinity. Opposite outward rays shall retain every defined finite sum, independently of whether their infinite endpoints are included.
Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.
The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.
INTERFACE: Public header: <ppl.hh>; Interval::add_assign and Interval::sub_assign for compatible extended-real interval operands.
VERIFICATION_CRITERIA: Check finite/infinity singleton permutations, same/opposite infinity pairs, both open/closed finite ray endpoints, included/excluded infinite endpoints, opposite rays and each output alias. Derive expected sets from explicit extended-real pairs rather than applying ordinary-real contracts to infinity.
SOURCE: src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.
-
Incoming link from: 3. Degenerate and singular extended interval products and quotients1
2. Sign-stable extended interval products and quotients UID: PPL-SPEC-001717 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For two nonempty extended-real intervals each wholly strictly positive or wholly strictly negative, mul_assign(x,y) and div_assign(x,y) shall enclose the interval hull of all defined extended-real products or quotients. A zero endpoint may be approached but shall not be included under this sign-stable contract. Infinity divided by infinity shall be undefined and contribute no value; finite values divided by an included infinity shall contribute zero. With exact admitted endpoint operations and supported membership, the resulting enclosure shall be exact for these sign-stable operands.
The signs shall select the mathematical orientation of the result. An infinite product shall be included when an applicable infinite factor is included and a nonzero partner exists. A quotient's zero endpoint shall be included when a finite numerator can be divided by an included infinity; an infinite quotient shall be included when an included infinite numerator has a finite nonzero denominator. Endpoint limits alone shall not establish attainment. These rules shall allow zero and infinity inclusion to vary independently in a ray quotient.
Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.
The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.
INTERFACE: Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for compatible, strictly one-sign extended intervals.
VERIFICATION_CRITERIA: Cross positive/negative rays with bounded nonzero intervals and other rays. Vary finite endpoint openness and infinite endpoint inclusion independently. Compare literal expected sign-oriented sets, zero/infinity attainment and unchanged separate inputs. Exercise exact rational endpoints and admitted receiver aliases; retain zero-crossing divisor tests under their separate ordinary-interval abstraction contract.
SOURCE: src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.
-
3. Degenerate and singular extended interval products and quotients UID: PPL-SPEC-001718 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For initialized, valid intervals over a common extended-real carrier, mul_assign(x,y) and div_assign(x,y) shall enclose every defined extended-real product or quotient of their entry sets. NaN shall not be an interval element. Zero times infinity, infinity divided by infinity and division by zero shall be undefined and shall contribute no value. An empty operand shall yield an empty result.
With exact admitted endpoint operations and supported membership, an infinity singleton multiplied by a finite interval shall yield empty if that interval contains only zero, the appropriately signed infinity if its nonzero elements have one sign, and the interval hull of both infinity points if both signs occur. An included zero shall contribute no extra product. Products of infinity singletons shall retain the product sign. An infinity singleton divided by a finite interval shall have the analogous sign-dependent image of its nonzero denominator elements. Dividing an infinity singleton by another infinity singleton or by a zero singleton shall yield empty. Dividing a nonempty finite interval by an included infinity singleton shall yield the zero singleton.
For a finite strictly positive or strictly negative numerator interval and a one-sided finite denominator interval approaching zero, division shall enclose the correspondingly signed unbounded ray. An infinite bound that arises only as a limit shall be excluded when the receiving policy can express that distinction. For a denominator with both negative and positive finite elements, a conservative universe result shall be permitted, including when the exact quotient has disconnected pieces. When a nonempty finite numerator is divided by a denominator containing zero and values of both signs, the returned I_Result shall include I_SINGULARITIES under 🔗 1. Interval result possibilities and status-flag set operations. A singularity indication shall not assert that an undefined pair has a value.
The source and receiving policies shall admit the required actual infinity points, empty results and finite scalar operations. An excluded infinite endpoint shall denote an unbounded finite extent. Numerical intermediates, resources, canonical-rational values, synchronization, shared temporaries and caller-owned FPU state shall meet the scalar kernels' prerequisites. Inexact arithmetic or an unsupported membership distinction may enlarge the result but shall not exclude defined values. Receiver aliases shall use both entry sets; distinct operands shall remain unchanged. Scalar failures shall retain their own guarantees without a universal rollback promise. Sign-stable cases shall retain 🔗 2. Sign-stable extended interval products and quotients, and ordinary-real interval division shall retain 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Infinity singletons, zero operands and zero-crossing divisors are outside the strictly one-sign operand domain and need explicit defined-pair and conservative-enclosure rules.
INTERFACE: Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for policies admitting actual infinity points.
VERIFICATION_CRITERIA: Compare literal infinity, empty, zero, ray and universe results for both infinity signs and positive, negative, zero, mixed-sign and empty partners. Check finite division by an infinity singleton, infinity divided by infinity, one-sided zero limits and zero-crossing divisors. Repeat with open and closed endpoint policies and available native floating types. Check direct and supported aliased outputs, unchanged separate sources and singularity flags where specified.
SOURCE: src/Interval_inlines.hh; src/Interval_templates.hh; tests/Box/intervalcontracts1.cc.
-
1. Ordinary interval additive inversion UID: PPL-SPEC-000729 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: neg_assign(x) shall replace the receiver by an outward interval enclosure of { − a ∣ a ∈ X}, where X is the source entry set. Empty shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be exact: source upper/lower endpoints shall become negated lower/upper endpoints, with their respective membership interchanged. Unbounded lower/upper extents shall exchange sign and side. An inexact conversion or unsupported openness shall enlarge the result without excluding source images.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Additive inversion reverses endpoint order and membership while remaining safe when the receiver is the source.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From> I_Result neg_assign(const From& x);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare all finite rational endpoint orders/topologies and scalar values with the independent negated endpoint model. Include empty, source/receiver aliasing, rays, universe, same-family integer endpoints and supported directed conversion.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
2. Ordinary interval addition and subtraction UID: PPL-SPEC-000730 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_assign(x,y) shall enclose {a + b ∣ a ∈ X, b ∈ Y}; sub_assign(x,y) shall enclose {a − b ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, these interval images shall be exact. For finite nonempty operands, addition shall use the sums of lower endpoints and upper endpoints. Subtraction shall use the first lower minus second upper endpoint, and first upper minus second lower endpoint. An extremum shall be attained exactly when both required source extrema are attained. Ordinary unbounded extents shall propagate according to these set images. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Addition and subtraction use different endpoint pairings; subtraction must preserve the source entry endpoints under either operand alias.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result add_assign(const From1& x,const From2& y); template <Interval_Source From1, Interval_Source From2> I_Result sub_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare exact rational endpoint/cell models with every finite topology and endpoint order, both operand orders, scalar forms, empty cases and each receiver alias. Check ordinary rays/universe and same-family integral arithmetic and directed integral division.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
3. Ordinary interval multiplication UID: PPL-SPEC-000731 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: mul_assign(x,y) shall enclose {ab ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be the exact interval image. For finite nonempty operands its extrema shall be the least and greatest of the four endpoint products. Endpoint membership shall account for every tied extremizer and for an attained zero in either operand; it shall not infer that zero is excluded merely because one nonzero factor approaches an excluded endpoint. Ordinary unbounded endpoints shall retain their limiting meaning, including a singleton zero multiplied by an unbounded interval. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Multiplication needs sign-sensitive extrema and zero-attainment rules in addition to numerical endpoint products.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result mul_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Independently evaluate all four exact finite endpoint products and tied/zero attainment for every source topology/sign combination. Include both operand orders, scalar forms, empty and zero singletons, each receiver alias and the dedicated ordinary unbounded-zero/ray regressions.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
Incoming links from: 1. Addition and subtraction of intervals admitting infinity points 2. Sign-stable extended interval products and quotients 3. Degenerate and singular extended interval products and quotients 5. Ordinary interval arithmetic value operators 3. Outward endpoint quotients and zero-limit candidates5
4. Ordinary interval division and zero-divisor abstraction UID: PPL-SPEC-000732 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: div_assign(x,y) shall enclose {a ⁄ b ∣ a ∈ X, b ∈ Y, b ≠ 0}. An empty operand or a divisor consisting only of zero shall give empty. A divisor with negative and positive values shall give universe as the specified conservative interval abstraction, including when a tighter interval image could be representable. A divisor with only one nonzero sign, possibly with zero as an endpoint, shall retain every defined quotient; zero-denominator pairs shall not become mathematical results. The negative-and-positive divisor branch shall return I_UNIVERSE | I_SINGULARITIES. It shall not infer exactness of the quotient image from exact assignment of the universe representation.
For finite nonempty operands whose divisor has finite endpoints strictly on one side of zero, exact admitted endpoint operations and supported membership shall give the exact interval image. Its extrema shall be the least/greatest of the four endpoint quotients; attainment shall account for all ties and an attained zero numerator. A one-sided divisor approaching zero may require an unbounded endpoint. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Excluding undefined zero-denominator pairs differs from choosing a conservative universe. A zero numerator has only zero defined quotients, while a numerator and divisor both crossing zero can have every real quotient, so the same conservative branch cannot uniformly certify either exactness or inexactness.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result div_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Compare four-corner rational quotient extrema and tied/zero attainment for all finite topologies with a divisor bounded away from zero. Check empty/zero divisors, negative/positive divisor signs, strict crossing with a zero numerator, one-sided zero limits, scalar forms and each receiver alias. Check directed integral quotient enclosures. Check result claims for zero, one-sided and crossing numerators over a divisor crossing zero, including both exact and inexact universe images and each receiver alias. Distinguish zero-only and empty divisors from the crossing singularity branch.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
5. Ordinary interval arithmetic value operators UID: PPL-SPEC-000733 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The free binary +, -, * and / operators shall return an independent interval value of the interval operand's boundary/information type, with the corresponding semantics of 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction. They shall support two intervals of that type, an interval followed by an admitted scalar singleton, and a scalar followed by an interval. Operand order shall be preserved for subtraction and division. Separate returned values shall not share mutable owned endpoint storage with their operands.
Operands shall satisfy the corresponding assignment operation's numerical, policy and runtime prerequisites. Operand values shall remain unchanged on successful return. Access shall be synchronized with mutation. Allocation or numerical exceptions shall propagate with the corresponding operation's guarantees. No additional library initialization shall be required.
RATIONALE: Value operators must retain directed assignment semantics, operand order and independent ownership.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <typename B,typename Info> Interval<B,Info> operator+(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator+(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator+(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator-(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator-(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator-(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator*(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator*(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator*(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator/(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator/(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator/(const T& x,const Interval<B,Info>& y);
VERIFICATION_CRITERIA: Exercise all twelve overload forms against independent literal rational results, including asymmetric subtraction/division, empty and zero-divisor cases. Mutate/destroy operands and returned values independently to check storage ownership; retain no-initialization and numerical configuration controls.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc.
-
Incoming links from: 2. Boundary openness and infinity membership interpretation 3. Unbounded and signed-infinity boundary assignment 4. Numerical sign of an interval boundary 5. Ordering of interval boundary cuts 1. Outward endpoint addition and subtraction 1. Normalization of numerical results into boundary properties 1. Normalization of numerical results into boundary properties 2. Same-side outward boundary conversion and retained properties8
1. Boundary infinity and scalar-domain extremum interpretation UID: PPL-SPEC-001077 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Infinity encodings and finite carrier limits are different mathematical states; interpreting metadata must not depend on an inactive scalar payload.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Scalar and information template parameters denote the admitted representation profiles described above.
template <typename T, typename Info> bool normal_is_boundary_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_boundary_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool normal_is_reverse_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_reverse_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_minus_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_plus_infinity(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> int infinity_sign(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_domain_inf(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_domain_sup(Boundary_Type side, const T&, const Info&);
VERIFICATION_CRITERIA: Check both sides, finite values, metadata infinities, actual numerical infinities and admitted reverse infinities against independent signed extended-value cases. Check native finite extrema separately from infinity, unbounded GMP finite domains, preserved source representations and meaningful pure calls without Init.
SOURCE: src/Boundary_defs.hh; tests/intervalboundariesspec1.cc; tests/intervalboundaryoracle.hh.
-
Incoming link from: 1. Outward endpoint addition and subtraction1
2. Boundary openness and infinity membership interpretation UID: PPL-SPEC-001078 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Endpoint exclusion and infinity membership depend on the information policy as well as the endpoint value.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Scalar and information template parameters denote the admitted representation profiles described above.
template <typename T, typename Info> bool special_is_open(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool normal_is_open(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_open(Boundary_Type side, const T&, const Info&); template <typename T, typename Info> bool is_boundary_infinity_closed(Boundary_Type side, const T&, const Info&); template <typename Info> bool boundary_infinity_is_open(Boundary_Type side, const Info&);
VERIFICATION_CRITERIA: Enumerate supported open/closed finite endpoints, ordinary unbounded endpoints, included infinities and stateless metadata. Check both sides and preserve unrelated/opposite metadata. Distinguish special and normal helper admission and check pure calls across caller hardware rounding modes.
SOURCE: src/Boundary_defs.hh; tests/intervalboundariesspec1.cc; tests/intervalboundaryoracle.hh.
-
Incoming link from: 2. Same-side outward boundary conversion and retained properties1
3. Unbounded and signed-infinity boundary assignment UID: PPL-SPEC-001079 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Internal endpoint setters update selected representation properties and intentionally retain unrelated metadata; callers can compose those updates without losing other claims.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Scalar and information template parameters denote the admitted representation profiles described above.
template <typename T, typename Info> Result special_set_boundary_infinity(Boundary_Type side, T&, Info&); template <typename T, typename Info> Result set_unbounded(Boundary_Type side, T&, Info&); template <typename T, typename Info> Result set_minus_infinity(Boundary_Type side, T&, Info&, bool open = false); template <typename T, typename Info> Result set_plus_infinity(Boundary_Type side, T&, Info&, bool open = false); template <typename T, typename Info> Result set_boundary_infinity(Boundary_Type side, T&, Info&, bool open = false);
VERIFICATION_CRITERIA: Check metadata encodings with preserved scalar payloads, native scalar/checked infinity assignments, finite bounded-domain fallback, returned classification, both sides, admitted signed/reverse choices and explicit retained OPEN cases. Observe every unrelated and opposite property independently. Exercise valid storage without Init and preserve caller rounding state.
SOURCE: src/Boundary_defs.hh; tests/intervalboundariesspec1.cc; tests/intervalboundaryoracle.hh.
-
4. Numerical sign of an interval boundary UID: PPL-SPEC-001080 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Interval arithmetic needs the sign of the endpoint value separately from endpoint inclusion and ordering of strict cutoffs.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Scalar and information template parameters denote the admitted representation profiles described above.
template <typename T, typename Info> int sgn_b(Boundary_Type side, const T&, const Info&);
VERIFICATION_CRITERIA: Check literal negative/zero/positive signs, both sides, every admitted openness, native extrema, GMP finite values, metadata infinities, normal included infinities and floating signed zeros. Preserve complete source representations and caller hardware state.
SOURCE: src/Boundary_defs.hh; tests/intervalboundariesspec1.cc; tests/intervalboundaryoracle.hh.
-
5. Ordering of interval boundary cuts UID: PPL-SPEC-001081 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Ordering lower and upper strict cuts requires a different tie rule from ordinary scalar comparison; that distinction determines interval emptiness and set inclusion.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Scalar and information template parameters denote the admitted representation profiles described above.
template <typename T1, typename Info1, typename T2, typename Info2> bool eq(Boundary_Type side1, const T1&, const Info1&, Boundary_Type side2, const T2&, const Info2&); template <typename T1, typename Info1, typename T2, typename Info2> bool lt(Boundary_Type side1, const T1&, const Info1&, Boundary_Type side2, const T2&, const Info2&); template <typename T1, typename Info1, typename T2, typename Info2> bool gt(Boundary_Type side1, const T1&, const Info1&, Boundary_Type side2, const T2&, const Info2&); template <typename T1, typename Info1, typename T2, typename Info2> bool le(Boundary_Type side1, const T1&, const Info1&, Boundary_Type side2, const T2&, const Info2&); template <typename T1, typename Info1, typename T2, typename Info2> bool ge(Boundary_Type side1, const T1&, const Info1&, Boundary_Type side2, const T2&, const Info2&);
VERIFICATION_CRITERIA: Enumerate independent extended-value/cut-rank pairs across both sides, finite ties and strict order, openness, natural and admitted reverse infinities, identical owners and mixed scalar/information types. Check all five predicates, symmetry/converse identities, equal closed cuts and preservation of scalar representations and all metadata.
SOURCE: src/Boundary_defs.hh; tests/intervalboundariesspec1.cc; tests/intervalboundaryoracle.hh.
-
1. Outward endpoint addition and subtraction UID: PPL-SPEC-001086 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: add_assign and sub_assign shall form outward selected endpoint candidates for the sum or difference of the two source entry values. Addition shall admit equal source sides; subtraction shall admit opposite source sides. The selected source/destination sides shall give the appropriate extremum: a natural infinite result shall have the receiving side's sign. The owning interval's additive endpoint selection shall retain 🔗 2. Ordinary interval addition and subtraction.
For finite operands, the exact candidate value shall be a + b or a − b; endpoint exclusion shall be required when either selected source endpoint is excluded. Numerical evaluation shall use the receiving side's outward direction and request sufficient relation information for membership under 🔗 1. Normalization of numerical results into boundary properties.
When a selected source is naturally infinite, the output shall be the appropriate natural infinity. It shall include that infinity exactly when an applicable naturally infinite source includes its infinity; all such source infinities excluded shall require exclusion. Natural-infinity classification and inclusion shall use 🔗 1. Boundary infinity and scalar-domain extremum interpretation and 🔗 2. Boundary openness and infinity membership interpretation. Indeterminate extended arithmetic shall be resolved by the owning interval before selecting this endpoint operation.
Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut.
Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required.
RATIONALE: Additive endpoint arithmetic combines outward numerical bounds with joint source attainment and the library carrier's explicit infinity membership.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result add_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result sub_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2);
VERIFICATION_CRITERIA: Compare finite rational sums/differences and independent source-attainment truth tables, both receiving directions, raw/checked and supported floating profiles. Include both natural-infinity source positions and all supported inclusion pairs, scalar/info aliases, bounded overflow outcomes, normalized statuses and caller FPU preservation.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc.
-
2. Outward endpoint products and zero attainment UID: PPL-SPEC-001087 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: mul_assign shall form an outward selected endpoint candidate with exact value ab for nonzero finite source entry values. Endpoint exclusion shall be required when either selected finite source endpoint is excluded. For a naturally infinite source and a nonzero partner, the receiving side shall match the mathematical product's infinity sign. The output shall be that natural infinity, included exactly when an applicable naturally infinite source includes its infinity. The owning interval's sign-sensitive endpoint selection shall retain 🔗 3. Ordinary interval multiplication.
mul_assign_z shall additionally admit zero endpoint values. Supplied first_sign and second_sign shall distinguish the actual entry zero and nonzero source values, including metadata infinity. With two nonzero sources it shall retain the product rule above. With exactly one zero source it shall produce a zero candidate, excluded exactly when the zero source endpoint is excluded. With two zero sources it shall produce zero, excluded exactly when both zero source endpoints are excluded. Thus an attained zero shall remain attainable even when the partner extremum is excluded or unbounded. No inactive infinite payload shall need to be read in a zero branch.
set_zero shall assign an outward representation of mathematical zero with the explicit exclusion request; exactly representable zero shall retain that request whenever the receiving profile supports it. The result shall be the normalized numerical assignment result. Nonzero multiplication and zero assignment shall use the receiving side's outward direction and membership-sensitive relation checking.
Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut.
Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required.
RATIONALE: Product extrema need explicit zero attainment because an attained zero survives multiplication by values whose selected extremum is excluded.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result mul_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result mul_assign_z(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, int first_sign, Boundary_Type side2, const T2& second, const Info2& info2, int second_sign); template <typename To, typename To_Info> Result set_zero(Boundary_Type to_side, To& to, To_Info& to_info, bool should_shrink);
VERIFICATION_CRITERIA: Independently multiply all admitted finite sign/zero candidates and check zero-attainment truth tables for both operand orders and source topologies. Include nonzero directed/inexact products, natural infinities and carrier inclusion, checked range crossings, zero assignment, all scalar receiver aliases, unrelated metadata and result truth.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc.
-
3. Outward endpoint quotients and zero-limit candidates UID: PPL-SPEC-001088 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: div_assign shall form an outward selected endpoint candidate with exact value a ⁄ b for finite nonzero source entry values. Endpoint exclusion shall be required when either selected finite source endpoint is excluded. Numerical division shall use the receiving side's outward direction and membership-sensitive relation checking. The owning interval's divisor-sign selection and defined-quotient semantics shall retain 🔗 4. Ordinary interval division and zero-divisor abstraction.
For a naturally infinite numerator and a finite nonzero denominator, the receiving side shall match the quotient's infinity sign. The output shall be that natural infinity with the numerator's infinity membership. For a finite nonzero numerator and a naturally infinite denominator, the output shall be zero, excluded exactly when the denominator excludes its infinity. An indeterminate quotient of two infinite values shall be resolved by the owning interval before selecting this operation.
div_assign_z shall additionally admit zero endpoints and supplied zero/nonzero classifications consistent with the source entry values. For a nonzero numerator and zero denominator, it shall supply an open natural-infinity limit on the receiving side selected by the owning interval. For a zero numerator it shall supply a zero candidate. That zero shall be included when the numerator zero is included or the denominator is an included natural infinity; otherwise it shall be excluded. A finite zero denominator shall not itself make an excluded numerator zero attainable. These zero-limit branches shall use boundary assignment and shall not numerically divide by zero or evaluate an inactive infinite payload. With two nonzero sources the helper shall retain the quotient rule above.
Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut.
Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required.
RATIONALE: Division endpoint selection distinguishes a numerical quotient from an open pole or a zero candidate, allowing interval arithmetic to exclude undefined denominator-zero pairs.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result div_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result div_assign_z(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, int first_sign, Boundary_Type side2, const T2& second, const Info2& info2, int second_sign);
VERIFICATION_CRITERIA: Compare finite nonzero rational quotients and independent exclusion rules, both directions and signs, exact/inexact storage, and scalar receiver aliases. Enumerate zero/nonzero classifications and all zero-attainment combinations; verify no scalar division occurs in zero branches. Include numerator/denominator natural infinities, supported membership, checked overflow, normalized results and preserved sources/FPU state.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc.
-
4. Outward endpoint residues modulo powers of two UID: PPL-SPEC-001089 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: umod_2exp_assign and smod_2exp_assign shall form same-side outward endpoint candidates for the corresponding scalar residue. For a finite entry value a and m = 2e, the nonnegative candidate shall be u = a − m⌊a ⁄ m⌋, so 0 ≤ u < m. For the centered operation, the candidate shall be s = u when u < m ⁄ 2 and s = u − m otherwise, so − m ⁄ 2 ≤ s < m ⁄ 2. Exponent zero shall mean m = 1 (and shall therefore give zero for integral source values). These scalar meanings shall retain 🔗 6. Exact rational operations with powers of two, 🔗 6. Exact centered and nonnegative unbounded integer residues, 🔗 3. Centered and nonnegative native integer dyadic residues, 🔗 3. Exact centered native residue modulo a power of two and 🔗 4. Rounded nonnegative native residue modulo a power of two.
The destination and source sides shall match. A finite candidate shall retain source endpoint exclusion, enlarged as needed for numerical outward rounding. Evaluation shall use the receiving side's outward direction and membership-sensitive relation checking. A naturally infinite source shall instead give the same-side natural-infinity boundary with its source membership, supporting the owning interval's unbounded residue fallback. The owning interval shall select the required endpoint cases and account for residue discontinuities under 🔗 2. Interval abstraction of wrapped integer images with refinement.
The exponent and every numerical intermediate shall meet the selected scalar operation's admission. A generic template signature shall not promise unavailable source/destination residue specializations.
Selected destination properties shall meet the replacement or compatible composition conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Result normalization, retained selected properties, unrelated/opposite-side metadata and cached interval claims shall obey 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and supported membership distinctions shall yield the exact selected cut; other numerical outcomes shall give an outward receiving cut.
Active source payloads shall be initialized, valid and canonical where required. Metadata-encoded infinity shall not require evaluation of an inactive payload. Scalar types, numerical kernels, intermediate arithmetic, resource bounds, policy checks, shared-temporary synchronization and caller-owned FPU state shall meet the selected numerical contracts. Failures shall retain their underlying permitted partial states without an additional rollback guarantee. Separate sources shall remain unchanged; supported scalar/output and information aliases shall use source values and properties on entry. Borrowed references shall remain live. No extra library initialization shall be required.
RATIONALE: Residue endpoint candidates retain scalar modular semantics and source exclusion while allowing interval wrapping to handle discontinuities and unbounded extents.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result umod_2exp_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, unsigned int exponent); template <typename To, typename To_Info, typename T, typename Info> Result smod_2exp_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, unsigned int exponent);
VERIFICATION_CRITERIA: Use independent exact rational quotient/remainder arithmetic for finite positive/negative grid values, period boundaries and both half-period ties. Check admitted exponent-zero forms, both receiving sides, exact/inexact storage, source topology, natural infinities, scalar aliases, normalized relation truth and preserved metadata/FPU state.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryarithmeticsspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh; tests/mixedboundary1.cc.
-
Incoming links from: 1. Outward endpoint addition and subtraction 1. Outward endpoint addition and subtraction 2. Outward endpoint products and zero attainment 3. Outward endpoint quotients and zero-limit candidates 4. Outward endpoint residues modulo powers of two 2. Same-side outward boundary conversion and retained properties 2. Same-side outward boundary conversion and retained properties 3. Opposite-side complement and additive inversion of boundaries8
1. Normalization of numerical results into boundary properties UID: PPL-SPEC-001082 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: adjust_boundary shall integrate a side-consistent numerical Result with the selected endpoint representation of 🔗 1. Boundary infinity and scalar-domain extremum interpretation. It shall leave the scalar payload unchanged, retain unrelated/opposite-side metadata and cached interval claims, and add required boundary properties. An existing true OPEN or SPECIAL property shall not be cleared.
For LOWER, admitted finite relation classes shall be V_EQ, V_GE and V_GT; for UPPER they shall be V_EQ, V_LE and V_LT. A strict finite relation shall require an open outward endpoint; a weak or exact relation shall preserve the explicit open request. The resulting OPEN property shall include both that required openness and its entry value. Finite classification shall not itself introduce SPECIAL.
An exact or weak natural-infinity classification shall preserve the explicit open request. The admitted weak classes shall be V_GE | VC_MINUS_INFINITY on LOWER and V_LE | VC_PLUS_INFINITY on UPPER. V_GT_MINUS_INFINITY on LOWER and V_LT_PLUS_INFINITY on UPPER shall additionally require openness. When the receiving policy stores special endpoints, these natural infinities shall be encoded by SPECIAL and the returned value shall be V_EQ. Otherwise the natural-infinity relation/classification shall be retained. An exact reverse-infinity classification shall require a numerical infinity encoding, no stored special endpoints and an infinity-admitting carrier; it shall retain that classification and the explicit openness request.
For the remaining admitted cases the return shall be the input's relation and value-class projection under 🔗 3. Overflow-sign and storage-representability result queries. Other diagnostic bits shall not be reported as retained operation guarantees. Input state shall correspond to the classified scalar result or to a natural infinity that the selected metadata encoding can represent; no NaN, contradictory side direction or unsupported finite failure shall be admitted as an ordinary endpoint result. An inactive final metadata payload shall not require a numerical read. Live storage and synchronization shall retain 🔗 1. Boundary infinity and scalar-domain extremum interpretation. No additional initialization or FPU operation shall be required.
RATIONALE: Converting numerical relation information into endpoint exclusion and infinity metadata keeps outward scalar bounds meaningful without overwriting independent interval claims.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename T, typename Info> Result adjust_boundary(Boundary_Type side, T& value, Info& info, bool open, Result result);
VERIFICATION_CRITERIA: Check all admitted lower/upper finite and infinity relation classes using compatible payload states, both explicit openness requests and both entry OPEN values. Independently predict selected property changes, unchanged payloads/opposite/cache properties and normalized return values. Include genuine scalar conversion histories, weak natural-infinity results from native overflow, closed-policy affine-form consumers and metadata re-encoding of infinity.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
-
Incoming links from: 1. Outward endpoint addition and subtraction 2. Outward endpoint products and zero attainment 3. Outward endpoint quotients and zero-limit candidates 4. Outward endpoint residues modulo powers of two 3. Opposite-side complement and additive inversion of boundaries 4. Minimum and maximum selection of interval boundary cuts 4. Minimum and maximum selection of interval boundary cuts 4. Minimum and maximum selection of interval boundary cuts8
2. Same-side outward boundary conversion and retained properties UID: PPL-SPEC-001083 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: assign shall convert a source boundary into a destination of the same side, using the representation and cut meanings of 🔗 1. Boundary infinity and scalar-domain extremum interpretation and 🔗 5. Ordering of interval boundary cuts. The requested source cut shall have its source openness, strengthened to open when should_shrink is true. Numerical conversion shall use the destination side's outward direction, with strict-relation checking when needed to preserve endpoint membership or requested by the receiving information policy. The result shall integrate numerical relation and infinity information through 🔗 1. Normalization of numerical results into boundary properties.
For replacement of a boundary, selected destination OPEN and SPECIAL properties shall be clear independently of source entry properties, or already compatible with the required converted cut. With those conditions, the output shall be an outward enclosure of the requested source half-line. When the scalar value and endpoint inclusion are representable exactly, the source cut shall be preserved exactly. Natural metadata infinity shall retain its source infinity-membership distinction when the receiving profile supports it. Included reverse infinities shall require their supported numerical encoding and carrier.
Without a clearing operation, property updates shall compose with entry state: existing true selected OPEN and SPECIAL properties shall be retained, as specified by 🔗 3. Unbounded and signed-infinity boundary assignment and 🔗 1. Normalization of numerical results into boundary properties. Such retention shall not by itself establish an outward-conversion claim when an incompatible entry OPEN property would exclude a source value. Other metadata and the opposite side shall remain unchanged. The return shall be the selected metadata assignment or numerical normalization result, without an aggregate interval-shape guarantee.
Read-only sources shall retain their entry meanings except where output storage overlaps them. Same-type scalar self-assignment and supported scalar/metadata overlaps shall use source values and properties on entry. The caller shall not destroy source properties while preparing the selected destination. Source payloads shall be valid and initialized when active; metadata infinity shall not imply a readable inactive payload. Numerical conversion, resource, policy and caller-owned FPU prerequisites shall retain the selected scalar contracts. Failures shall retain their permitted partial states without additional rollback. No extra library initialization shall be required.
RATIONALE: Outward endpoint conversion must preserve strictness when possible and distinguish replacement of a cleared boundary from composition with retained representation properties.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, bool should_shrink = false);
VERIFICATION_CRITERIA: Compare exact and inexact finite conversions with independent half-line predicates on destination-representable candidates. Check forced openness, exact membership preservation, natural/reverse infinity profiles, same-side admission, raw/checked scalars, compatible property retention, source preservation, self/borrowed aliases and caller hardware state.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
-
3. Opposite-side complement and additive inversion of boundaries UID: PPL-SPEC-001084 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: complement shall form an outward representation of the opposite-side cut at the same numerical value with endpoint inclusion reversed. For example, the complement of a finite lower closed cut at v shall be an upper open cut at v; a lower open cut shall become upper closed. neg_assign shall instead represent additive inversion of the source half-line: it shall reverse the side and numerical sign while preserving endpoint inclusion. Signed scalar zero shall retain the selected scalar negation contract.
Destination and source sides shall differ. The requested resulting cut, including any infinity sign and membership, shall be representable by the selected receiving profile; an operation requiring an unsupported empty cut or unsupported reverse-infinity encoding shall be handled by its owning interval rather than inferred from a numerical payload. Finite conversion or negation shall use the receiving side's outward direction, request sufficient relation information for endpoint membership, and normalize the result through 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and membership distinctions shall yield the exact transformed cut.
Selected destination properties shall be clear independently of source entry state, or compatible with the required result. Other entry properties shall retain the additive-update behavior of 🔗 2. Same-side outward boundary conversion and retained properties; opposite-side and cached interval properties shall be preserved. Read-only sources shall be preserved except where destination storage overlaps them. Supported scalar self/borrowed aliases and shared information objects shall use source values and source-side properties on entry.
Scalar validity, numerical availability, resource, policy, thread and caller-owned FPU prerequisites shall retain the corresponding assignment or negation contracts. Metadata infinity shall not require evaluation of an inactive source payload. Failures shall retain the underlying operations' permitted partial states, without additional rollback or initialization.
RATIONALE: Logical complement changes inclusion at a fixed cutoff, while additive inversion changes the numerical sign; the two side-reversing transformations require distinct mathematical guarantees.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result complement(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T, typename Info> Result neg_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info);
VERIFICATION_CRITERIA: Independently transform extended-value/cut-rank models and half-line membership, covering all finite signs, zero, strictness and supported infinity results. Check exact same-profile results and inexact outward conversion, source-side/opposite flags, compatible retained target properties, same-scalar and shared-metadata aliases, returned normalization and FPU preservation.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
-
4. Minimum and maximum selection of interval boundary cuts UID: PPL-SPEC-001085 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Updating min_assign and max_assign shall compare the source cut with the receiving entry cut using 🔗 5. Ordering of interval boundary cuts. If the source is not strictly smaller for minimum or strictly larger for maximum, the receiver shall remain completely unchanged and the return shall be V_EQ. Otherwise the operation shall clear the selected destination boundary properties and convert the winning source through 🔗 2. Same-side outward boundary conversion and retained properties.
The two-source overloads shall select the smaller cut for minimum or the larger for maximum; equality shall select the second source. They shall perform the corresponding same-side boundary assignment, retaining the selected destination properties according to 🔗 2. Same-side outward boundary conversion and retained properties. Callers requiring replacement shall clear those selected properties without changing any source entry properties, or retain only compatible properties. Whenever assignment is required, the selected source side shall match the destination side. Other source sides shall remain valid comparison inputs.
With exact representable scalar values and inclusion distinctions, a replacement shall have the selected source cut exactly. Otherwise it shall retain the outward-conversion meaning and conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Unrelated/opposite-side metadata and cached interval claims shall be preserved. Sources shall be unchanged except for storage that intentionally overlaps the receiver. Same-object sources, scalar output/source overlaps and valid shared information objects shall use source cuts, including openness, on entry; clearing destination properties shall not silently change the selected source's meaning before conversion.
Objects and borrowed references shall remain live and synchronized. Scalar comparison, conversion, resources, policies and hardware state shall meet their respective contracts. No universal rollback, interval-shape result or additional library initialization shall be inferred. The return shall be V_EQ for the unchanged updating case and otherwise the selected boundary assignment's result.
RATIONALE: Boundary extrema select ordered cuts, not just numerical minima and maxima; strictness and source-entry aliases are therefore part of the selected value.
INTERFACE: Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result min_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T, typename Info> Result max_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result min_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result max_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2);
VERIFICATION_CRITERIA: Enumerate independent cut minima/maxima, strict and equal choices, both sides, finite/infinite profiles, exact and inexact output conversion and second-source tie selection. Distinguish untouched updating cases from property-clearing replacements and binary property retention. Verify same-object/scalar/shared-info aliases, selected-source preservation, unrelated metadata and status forwarding.
SOURCE: src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
-
1. Interval construction from ordinary real constraints UID: PPL-SPEC-000718 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Interval_Constraint_Source<T> shall have the truth value of std::is_convertible_v<const T&, const I_Constraint_Base&>. Constraint members shall use that classification, retaining implicit conversions and excluding inaccessible, ambiguous and explicit-only conversions.
build() shall initialize the receiver as its universe. build(c) shall replace it with an outward interval enclosure of the values satisfying the supplied ordinary real constraint. Under exact boundary conversion and supported openness, an ordinary equality or ordered inequality shall give the exact interval predicate. Disequality shall give the interval hull of its punctured carrier, which may be universe. Unsupported endpoint strictness or inexact conversion may enlarge that enclosure.
For this ordinary real carrier, V_LGE, V_GT_MINUS_INFINITY and V_LT_PLUS_INFINITY shall build universe without inspecting a cutoff; V_EMPTY and V_NAN shall build empty without inspecting a cutoff. Their unused cutoff storage need not be initialized or bound. The ordinary finite relations shall be V_LT, V_LE, V_GT, V_GE, V_EQ and V_NE. An included-infinity carrier shall not be inferred from these ordinary-real special-relation rules.
build(c1,c2) shall intersect the single-constraint interval enclosures. With exact endpoint conversion, supported openness and interval-valued individual predicates, the result shall denote their exact conjunction. Otherwise it shall enclose the conjunction; taking a hull of a disequality before intersection may retain its removed point. A V_LGE constraint shall be neutral, and either V_NAN constraint shall give empty without reading its cutoff. Separate constraint objects and cutoff values shall remain unchanged.
Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Constructing an interval from a predicate must distinguish exact interval predicates from a disconnected disequality abstraction and ignore irrelevant cutoff storage.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <typename T> concept Interval_Constraint_Source = std::is_convertible_v<const T&, const I_Constraint_Base&>; I_Result build(); template <Interval_Constraint_Source C> I_Result build(const C& c); template <Interval_Constraint_Source C1, Interval_Constraint_Source C2> I_Result build(const C1& c1,const C2& c2);
VERIFICATION_CRITERIA: Compare all ordinary relations and ordered pairs of finite constraints with independent endpoint-and-cell predicate hulls. Check universe/empty logical relations using cutoffs that fail if read, neutral/contradictory paired relations, stable separate sources, exact open endpoints and inexact rational-to-integer conversion.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalvaluesspec1.cc; tests/intervalconstructionspec1.cc; tests/intervalresultsspec1.cc.
-
2. Constraint refinement through interval abstraction UID: PPL-SPEC-000719 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
STATEMENT: add_constraint(c) shall replace receiving entry set A by an outward interval enclosure of its intersection with the interval abstraction of c described by 🔗 1. Interval construction from ordinary real constraints. The represented result shall retain every input value satisfying c and shall introduce no value outside A.
With exact conversion, supported openness and an interval-valued constraint, the result shall be the exact set intersection. A disequality shall first be replaced by its interval hull; this refinement shall not promise removal of the excluded point when that hull fills the puncture. An unconstrained constraint shall preserve A; a false constraint shall give empty. The receiver shall be initialized and valid, and the ordinary-real carrier and admitted relation set shall follow 🔗 1. Interval construction from ordinary real constraints. Separate constraint/cutoff objects shall remain unchanged.
Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Intersecting with a sound interval abstraction gives conservative refinement while making its disequality precision explicit.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Constraint_Source C> I_Result add_constraint(const C& c);
VERIFICATION_CRITERIA: For all finite endpoint orders/topologies, compare refinement with the intersection of the original literal set and the independent constraint hull. Include empty and universe receivers, tautology, contradiction, equality, disequality, open boundaries and preserved cutoffs. Confirm satisfying-value inclusion and absence of points outside the entry interval.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalconstructionspec1.cc.
-
3. Independent outward endpoint extension UID: PPL-SPEC-000720 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
STATEMENT: For a nonempty initialized valid receiver, lower_extend() shall replace its lower endpoint by the lower extent of the receiving carrier, and upper_extend() shall analogously replace its upper endpoint by the upper extent. The other endpoint shall remain unchanged. The result shall contain the entry interval and remain valid under its information policy.
lower_extend(c) shall admit finite relations V_GT, V_GE and V_EQ. It shall replace the lower endpoint by the lesser of its entry endpoint and the cutoff, taking an open cutoff for V_GT and a closed cutoff otherwise. upper_extend(c) shall analogously admit V_LT, V_LE and V_EQ and take the greater endpoint, with an open cutoff for V_LT and a closed cutoff otherwise. Equal limits shall be included when either alternative includes them. Conversion shall be outward when the selected scalar cannot store a cutoff exactly.
For either constrained overload, V_LGE shall perform the corresponding unconstrained extension without reading a cutoff; V_NAN shall preserve the receiver without reading a cutoff. Those unused cutoff values need not be initialized or bound. The ignored V_NAN overload shall also admit an empty valid receiver and preserve it. It shall return I_ANY | I_EXACT | I_UNCHANGED without certifying nonemptiness. The other admitted constrained operations shall require a nonempty receiver. Other relations shall lie outside these endpoint-extension overloads' admitted protocol. Separate cutoff sources shall remain unchanged. Endpoint metadata shall preserve unbounded extent meaning independently of an inactive payload.
Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Endpoint extension must enlarge one side without disturbing the other. Ignoring a descriptor preserves the represented set, including an empty set, without establishing that set's shape.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
I_Result lower_extend(); I_Result upper_extend(); template <Interval_Constraint_Source C> I_Result lower_extend(const C& c); template <Interval_Constraint_Source C> I_Result upper_extend(const C& c);
VERIFICATION_CRITERIA: Check each admitted finite relation against independent minimum/maximum endpoint formulas, including already unbounded sides, inward/no-op cutoffs, equal open/closed limits and both signs. Check unchanged opposite endpoints, nonempty-receiver prerequisites for active extensions, source preservation and unconstrained/no-op relations with unreadable cutoffs. Check ignored descriptors on empty, singleton, proper and universe receivers; verify exact/unchanged claims and defer uncertain emptiness to the actual representation.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalconstructionspec1.cc; tests/intervalresultsspec1.cc.
-
2. Meet-preserving interval context simplification UID: PPL-SPEC-000722 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: simplify_using_context_assign(y) shall replace entry interval A by a valid interval S satisfying A ⊆ S and S∩C = A∩C, where C is the entry context. It shall return true exactly when that intersection is nonempty. An empty receiver or context shall return false without changing the receiver.
For disjoint nonempty intervals, a receiver lying below its context shall retain its separating upper bound and remove its lower bound; a receiver lying above shall retain its separating lower bound and remove its upper bound. For intersecting intervals, each finite receiver bound made redundant by a finite context bound shall be removed. The operation shall not promise a unique or globally minimal representation. Endpoint membership shall be respected when deciding separation and redundancy. Self-aliasing shall be permitted and shall retain the entry-context intersection.
Operands shall be live, initialized and valid intervals over the declared ordinary real carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.
RATIONALE: Context simplification can remove bounds while preserving precisely the information relevant inside the context.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Like From> bool simplify_using_context_assign(const From& y);
VERIFICATION_CRITERIA: Compare original/result intersections with an independent endpoint-and-cell model over every finite endpoint topology, empty sets, rays, universes and self-aliasing. Check exact Boolean meaning, whole-input inclusion, unchanged separate contexts and expected removal of redundant or nonseparating bounds.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.
-
3. Interval construction disjoint from a supplied context UID: PPL-SPEC-000723 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: empty_intersection_assign(y) shall replace the receiver by a valid interval disjoint from the supplied entry context C. An empty context shall give universe. Otherwise it shall prefer a representable nonempty component on the lower side of C, then one on the upper side; if neither can be represented, it shall give empty. The policy shall admit an empty result. The original receiver contents shall not restrict the result, and the context may alias the receiver.
Under exact open rational boundaries over the ordinary real carrier, a finite lower context endpoint shall give its entire lower complement component, with complementary endpoint membership; otherwise a finite upper endpoint shall give its entire upper complement component. An ordinary real universe shall give empty. More generally, conversion of a complement cutoff shall round inward to avoid context values. Where a closed-only discrete boundary type must exclude an exact cutoff, the adjacent representable boundary shall be used when available. For dense closed-only rational boundaries at a closed context endpoint, no inclusion-maximal cutoff exists; the deterministic interior cutoff shall differ by one toward the selected component's interior. Included infinities shall be considered only under policies that admit and represent them; a lone infinity may itself form a representable complement component. An unrepresentable component shall not be reported as nonempty.
Operands shall be live, initialized and valid intervals over the declared declared carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.
RATIONALE: Constructing a disjoint interval requires inward conversion and a deterministic component choice; dense closed-only rational boundaries do not support a universal maximal-cutoff promise.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Like From> void empty_intersection_assign(const From& y);
VERIFICATION_CRITERIA: Check exhaustive ordinary rational contexts against literal complement components, including every open/closed boundary, rays, empty/universe, independent old receiver values and self-aliasing. Check cross-boundary inward rounding, closed integer/floating adjacent cutoffs, bounded endpoint exhaustion, dense closed rational fallback and admitted infinity singletons with the existing dedicated interval regressions.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.
-
1. Single real cutoff conversion on the destination carrier UID: PPL-SPEC-000686 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: A quantized endpoint can represent the same predicate on its scalar carrier without representing the same subset of all real numbers. Explicit carrier semantics preserve the meaning of strictness and equality during conversion.
INTERFACE: Internal header: intervals_defs.hh; member of Parma_Polyhedra_Library::I_Constraint_Common<Derived>:
template <typename T> Result convert_real(T& to) const;
Derived shall supply the live constraint's rel() and value().
VERIFICATION_CRITERIA: Compare all eight source relations with independent rational predicates on destination-representable candidates. Cover positive, negative and zero cutoffs, exact and inexact fractions, every standard native integer type, GMP scalars and supported native floating formats. Include adjacent floating values and a rational cutoff strictly between them, preserved source values, unchanged unused destinations and caller rounding-state restoration.
SOURCE: src/intervals_defs.hh; tests/intervalconversionspec1.cc.
-
2. Paired real cutoff conversion and point enclosure UID: PPL-SPEC-000687 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: A real point between representable endpoints requires two outward bounds. The unused first predicate must remain explicit so that its retained storage cannot be mistaken for a computed endpoint.
INTERFACE: Internal header: intervals_defs.hh; member of Parma_Polyhedra_Library::I_Constraint_Common<Derived>:
template <typename T> Result convert_real(T& to1, Result& rel2, T& to2) const;
VERIFICATION_CRITERIA: For every ordinary relation, compare the conjunction with independent rational candidates and establish source-set containment. For equality, check exact reduction and outward enclosure at nonintegral rational cutoffs and between adjacent native floating values. Check unchanged unused first outputs where no downward conversion is performed, source preservation and all admitted destination scalar families.
SOURCE: src/intervals_defs.hh; tests/intervalconversionspec1.cc.
-
3. Integral cutoff normalization UID: PPL-SPEC-000688 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: 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.
RATIONALE: Integer predicates admit closed integral endpoints even when their original real constraints are strict or fractional. Exact unit adjustment is required to preserve the accepted integer set.
INTERFACE: Internal header: intervals_defs.hh; member of Parma_Polyhedra_Library::I_Constraint_Common<Derived>:
template <typename T> Result convert_integer(T& to) const;
VERIFICATION_CRITERIA: Compare every relation with an independent exact rational predicate on integer candidates. Check positive and negative fractions, integral and zero cutoffs, floor/ceiling asymmetry, strict unit adjustments and the empty/universe equality cases. Exercise all standard native integer types, GMP scalars and supported native floating formats within the stated exact range, preserving source and unused destination values.
SOURCE: src/intervals_defs.hh; tests/intervalconversionspec1.cc.
-
Incoming links from: 2. Interval abstraction of wrapped integer images with refinement 1. Addition and subtraction of intervals admitting infinity points 2. Sign-stable extended interval products and quotients 3. Degenerate and singular extended interval products and quotients 1. Ordinary interval additive inversion 2. Ordinary interval addition and subtraction 3. Ordinary interval multiplication 4. Ordinary interval division and zero-divisor abstraction 1. Interval construction from ordinary real constraints 2. Constraint refinement through interval abstraction 3. Independent outward endpoint extension 1. Existential interval relation refinement 2. Universal interval relation refinement 1. Interval assignment and directed enclosure 2. Interval hull assignment 5. Interval enclosure of set difference 8. Interpreting logical interval emptiness flags17
1. Interval result possibilities and status-flag set operations UID: PPL-SPEC-000681 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: I_Result shall encode possible result shapes using independent bits: I_EMPTY = 1, I_SINGLETON = 2, I_SOME = 4 for a nonsingleton non-universe result, and I_UNIVERSE = 8. I_NOT_EMPTY shall be their three nonempty alternatives, I_ANY all four alternatives, I_NOT_UNIVERSE the first three and I_NOT_DEGENERATE the singleton and nonsingleton non-universe alternatives. A set shape bit shall mean that shape remains possible, not that every named possibility is established.
Independent status bits shall be I_EXACT = 16, I_INEXACT = 32, I_CHANGED = 64, I_UNCHANGED = 128 and I_SINGULARITIES = 256. They shall mean definite exactness, definite inexactness, definite set change, definite absence of set change, and undefined combinations of operand values, respectively. Their absence shall not establish the corresponding opposite claim. The operation producing a result shall determine which claims it establishes.
For bit sets A, B within these nine positions, a | b shall encode A∪B, a & b shall encode A∩B, and a - b shall encode A⧵B. These operators shall not reconcile logically conflicting claims or mutate their operands. They shall require no numerical or library initialization.
combine(lower, upper) shall accept numerical endpoint Result values and return I_ANY with no definite status claim. Numerical endpoint outcomes alone shall not establish interval shape, set-operation exactness or entry-to-result change. In particular, numerical V_EQ outcomes shall not be reinterpreted as logical I_EMPTY or I_CHANGED bits.
RATIONALE: Shape alternatives and definite status claims occupy separate fields. Numerical endpoint equality does not establish the exactness of a disconnected union or difference, and does not compare an operation result with the receiving entry set.
INTERFACE: Internal helper headers: intervals_defs.hh and Interval_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.
enum I_Result { I_EMPTY = 1U, I_SINGLETON = 2U, I_SOME = 4U, I_UNIVERSE = 8U, I_NOT_EMPTY = I_SINGLETON | I_SOME | I_UNIVERSE, I_ANY = I_EMPTY | I_NOT_EMPTY, I_NOT_UNIVERSE = I_EMPTY | I_SINGLETON | I_SOME, I_NOT_DEGENERATE = I_SINGLETON | I_SOME, I_EXACT = 16, I_INEXACT = 32, I_CHANGED = 64, I_UNCHANGED = 128, I_SINGULARITIES = 256 }; I_Result operator|(I_Result a, I_Result b); I_Result operator&(I_Result a, I_Result b); I_Result operator-(I_Result a, I_Result b); I_Result combine(Result lower, Result upper);
VERIFICATION_CRITERIA: Check every named encoding and every pair of nine-bit sets against independent Boolean-vector union, intersection and difference oracles. Check numerical result pairs, including rounded, overflow, exceptional and both infinity outcomes, produce only unknown logical shape possibilities. Check the resulting records through actual scalar assignment and logical emptiness consumers.
SOURCE: src/intervals_defs.hh; src/Interval_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc; tests/intervalresultsspec1.cc.
-
2. Cutoff value storage and explicit borrowing criteria UID: PPL-SPEC-000682 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Use_By_Ref<Use_Slow_Copy, T>::value shall equal Slow_Copy<T>::value; By_Value shall select false and By_Ref true. For owned storage, Val_Or_Ref<T, Criteria> shall contain a distinct T object, use T as both Arg_Type and Return_Type, and default construct that value with T(). Construction, assignment and set shall copy the supplied value using T's ordinary operations. get and the conversion operator shall return its current value by value.
For borrowed storage, Arg_Type shall be T& and Return_Type const T&. Default construction shall leave the holder unbound; no read or value conversion shall be permitted before binding. Construction, assignment and set from a mutable lvalue shall bind its identity; the overload with a const T& and Boolean argument shall bind that same const object's identity. The Boolean argument's value shall not change storage or request a snapshot. get and conversion shall expose the live bound object as a const reference, reflecting subsequent valid donor changes.
Implicit copying/assignment of a holder shall preserve its owned value or borrowed identity according to the selected criterion. Assignment from an argument shall return the holder. Borrowed donors shall outlive every use of their values; copying an unbound holder shall not bind it. All referenced objects shall remain live and access shall be synchronized against mutation. The selected T operations, representability and resource prerequisites shall hold; their exceptions shall propagate without a universal rollback promise. Storage alone shall require no library, coefficient-constant or FPU initialization beyond any prerequisites imposed by the selected T.
RATIONALE: A cutoff snapshot and a borrowed view have different lifetime and mutation semantics even when their initial mathematical values are equal.
INTERFACE: Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.
struct Use_Slow_Copy; struct By_Value; struct By_Ref; template <typename Criteria, typename T> struct Use_By_Ref; template <typename T, typename Criteria = Use_Slow_Copy, typename Enable = void> class Val_Or_Ref; // Owned specialization: Arg_Type = T, Return_Type = T. Val_Or_Ref(); explicit Val_Or_Ref(T value, bool ignored = false); Val_Or_Ref& operator=(T value); void set(T value, bool ignored = false); T get() const; operator T() const; // Borrowed specialization: Arg_Type = T&, Return_Type = const T&. Val_Or_Ref(); explicit Val_Or_Ref(T& value); Val_Or_Ref(const T& value, bool acknowledge_borrow); Val_Or_Ref& operator=(T& value); void set(T& value); void set(const T& value, bool acknowledge_borrow); const T& get() const; operator const T&() const;
VERIFICATION_CRITERIA: Check criteria and type aliases, default owned value and unbound rebinding, owned copy independence/lifetime, mutable and const identity, both Boolean acknowledgments and subsequent donor mutation.
SOURCE: src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.
-
Incoming link from: 4. Interval constraints retain relation and cutoff ownership1
3. Interval-constraint relation adapter preserves supported relation codes UID: PPL-SPEC-000683 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: I_Constraint_Rel constructed from a supported Relation_Symbol shall preserve its numerical relation encoding: equality, strict/nonstrict less, strict/nonstrict greater and disequality shall correspond to V_EQ, V_LT, V_LE, V_GT, V_GE and V_NE. Construction from Result shall require a defined result code satisfying result_relation_class(result) == result; it shall retain that code unchanged. Codes with unrelated status fields shall not meet that precondition.
Its public rel member and conversion to Result shall return the stored code; ordinary copying and assignment shall retain it independently. No cutoff value or numerical initialization shall be required. Interpreting that relation with a cutoff shall follow the selected constraint operation's supported relation/class prerequisites.
RATIONALE: Relation symbols and numerical relation/class codes need one explicit bridge without accidentally treating unrelated status flags as a cutoff relation.
INTERFACE: Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.
struct I_Constraint_Rel { Result rel; I_Constraint_Rel(Result result); I_Constraint_Rel(Relation_Symbol symbol); operator Result() const; };
VERIFICATION_CRITERIA: Check all six symbol mappings and the defined projection-valid finite/infinite codes, copied values and conversion results without initialization.
SOURCE: src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.
-
Incoming links from: 1. Interval construction from ordinary real constraints 2. Constraint refinement through interval abstraction 3. Independent outward endpoint extension 5. Interval-constraint factories preserve explicit storage selection 7. Interval endpoint constraint views 7. Interval endpoint constraint views6
4. Interval constraints retain relation and cutoff ownership UID: PPL-SPEC-000684 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: I_Constraint<T, Criteria, extended> shall combine a relation code with the cutoff holder selected in 🔗 2. Cutoff value storage and explicit borrowing criteria. Default construction shall set rel() to V_LGE; its owned cutoff shall have T()'s value and its borrowed cutoff shall remain unbound until set. value() shall follow the holder's value/reference return type and lifetime rules; an unbound borrowed default shall admit relation inspection but not cutoff access.
Construction from a relation and cutoff shall retain that relation and store or borrow the cutoff according to the criterion. set shall replace the relation and update/rebind the cutoff by those same rules. The Boolean acknowledgment shall not force a copy, regardless of its value. Admitted converting overloads shall apply ordinary T construction/assignment under the source type's valid conversion and representability conditions. extended shall not change the ownership or relation/value access behavior specified here.
Implicit copies and assignments shall retain the relation and the selected owned value or borrowed identity. Owned copies shall survive donor scope and mutate independently; borrowed copies shall retain their donor's lifetime obligation. Self-assignment shall preserve the pair. Underlying value exceptions shall propagate; a failed set may already have replaced the relation and shall not promise atomic replacement of the pair. The type shall derive from I_Constraint_Common and I_Constraint_Base for the supported interval-constraint dispatch. Other prerequisites shall follow 🔗 2. Cutoff value storage and explicit borrowing criteria and 🔗 3. Interval-constraint relation adapter preserves supported relation codes.
RATIONALE: A relation/cutoff pair must retain its selected ownership through copying and rebinding, and failed value assignment must not imply an atomic pair update.
INTERFACE: Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.
class I_Constraint_Base; template <typename Derived> class I_Constraint_Common; template <typename T, typename Criteria = Use_Slow_Copy, bool extended = false> class I_Constraint; explicit I_Constraint(); I_Constraint(I_Constraint_Rel relation, Arg_Type value); I_Constraint(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow); template <typename U> I_Constraint(I_Constraint_Rel relation, const U& value); void set(I_Constraint_Rel relation, Arg_Type value); void set(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow); template <typename U> void set(I_Constraint_Rel relation, const U& value); Return_Type value() const; Result rel() const;
VERIFICATION_CRITERIA: Check defaults, owned/borrowed pairs, conversions, both acknowledgment values, implicit/self assignment, donor identity and scope; inject an observable value-assignment failure and assess the retained relation/value state.
SOURCE: src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.
-
5. Interval-constraint factories preserve explicit storage selection UID: PPL-SPEC-000685 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: The two-argument i_constraint(relation, value) overloads shall return I_Constraint<T, Use_Slow_Copy, false> using the default storage trait. For a borrowed cutoff, the unacknowledged overload shall require a mutable lvalue; borrowing a const cutoff shall require the explicit Boolean argument. For an owned cutoff, mutable or const input shall be copied.
Overloads with an explicit criterion object shall return I_Constraint<T, Criteria, false> and use that criterion, overriding the slow-copy trait. By_Value shall therefore retain an independent snapshot even for an expensive type, and By_Ref shall retain live reference identity even for a cheap type. The Boolean overload shall acknowledge const borrowing without changing ownership when true or false. A criterion object shall select a type; its own lifetime shall not become the cutoff lifetime. The retained relation and cutoff, exception behavior and valid-use conditions shall follow 🔗 4. Interval constraints retain relation and cutoff ownership.
RATIONALE: Explicit storage criteria must propagate to the returned constraint type rather than silently reverting to the default ownership trait.
INTERFACE: Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.
template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value); template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, T& value); template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value, bool acknowledge); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, const T& value, const Criteria& criterion); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, T& value, const Criteria& criterion); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, const T& value, bool acknowledge, const Criteria& criterion);
VERIFICATION_CRITERIA: Check type deduction and retained relations/values for cheap native and expensive rational cutoffs, explicit criteria overriding both defaults, mutable/const donors and acknowledged borrowing; retain interval-integration tests with their interval owner suite.
SOURCE: src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.
-
1. Boundary sides and interval metadata property keys UID: PPL-SPEC-000661 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Boundary_NS::LOWER and UPPER shall identify the lower and upper boundary respectively and have the corresponding ROUND_DOWN and ROUND_UP encodings. round_dir_check(side, check) shall return that bound direction, with ROUND_STRICT_RELATION exactly when check is true. It shall not inspect or change the hardware rounding mode.
Boundary_NS::SPECIAL and OPEN shall identify independent boundary properties. Interval_NS::CARDINALITY_0 and CARDINALITY_1 shall identify cached empty and singleton answers; CARDINALITY_IS shall identify whether the owner's applicable cached answer is established. Property values shall be Boolean, their default setter value true, and their unsupported query value false. Constructing a property key from a named enumeration value shall retain that value.
The metadata containers shall store claims about endpoints or cached answers; the owning interval shall establish their mathematical consistency. Changing an endpoint flag shall not implicitly establish or invalidate cardinality claims. Calls shall use live objects and named boundary sides; property keys shall meet the selected metadata type's interface. Access shall be synchronized against mutation. Metadata storage alone shall require no library or thread initialization, coefficient constants or FPU setup.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Endpoint status and cached knowledge are separate state; their storage must not silently assert new mathematical facts.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
namespace Boundary_NS { struct Property; enum Boundary_Type { LOWER = ROUND_DOWN, UPPER = ROUND_UP }; constexpr Rounding_Dir round_dir_check(Boundary_Type side, bool check = false); } namespace Interval_NS { struct Property; }
VERIFICATION_CRITERIA: Check literal side encodings, both strict-direction choices, property types/defaults and supported/unsupported query meanings without initialization or FPU control. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
2. Bounded unsigned flag-word updates preserve unrelated bits UID: PPL-SPEC-000662 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For a non-Boolean unsigned integer word type T of width w, reset_bits shall set the complete word to zero. Single-bit updates and queries shall require 0 ≤ b < w: reset_bit shall clear exactly bit b, set_bit(..., true) shall set it and set_bit(..., false) shall clear it, and get_bit shall return its Boolean value. Other bits shall be preserved.
Field operations shall require 0 ≤ s < w, 0 ≤ l < w and s + l ≤ w. set_bits shall also require its value v to satisfy 0 ≤ v < 2l; it shall replace exactly the field [s, s + l) with the binary digits of v. get_bits shall return those digits as a right-aligned T value without modifying the word. A zero-length field shall have value zero and perform no update. The operations shall have defined shifts under these preconditions and shall require no numerical initialization.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Independent flag updates require explicit shift and field-fit conditions, particularly for empty fields and the largest valid bit.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
namespace Interval_NS { template <typename T> constexpr void reset_bits(T& bits); template <typename T> constexpr void reset_bit(T& bits, unsigned int bit); template <typename T> constexpr void set_bit(T& bits, unsigned int bit, bool value); template <typename T> constexpr bool get_bit(const T& bits, unsigned int bit); template <typename T> constexpr void set_bits(T& bits, unsigned int start, unsigned int len, T value); template <typename T> constexpr T get_bits(T& bits, unsigned int start, unsigned int len); }
VERIFICATION_CRITERIA: Compare complete words against independent Boolean arrays for zero/all/mixed patterns, every valid single position and all fields in small words; include largest positions in wider words and zero-length fields. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
Incoming link from: 2. Boundary openness and infinity membership interpretation1
3. Stateless interval metadata reports unsupported properties UID: PPL-SPEC-000663 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Interval_Info_Null<Policy> shall propagate may_be_empty, may_contain_infinity and check_inexact from its policy, and shall report store_special, store_open, cache_empty and cache_singleton as false. Default construction, copying, assignment, clearing and swapping shall retain no per-object property state.
Boundary and interval-property setters shall have no effect. Each property query shall return its property type's unsupported_value, including custom property types satisfying the required Value and default/unsupported value interface. clear_boundary_properties shall have no effect. Null-owner borrowing and initialization rules shall follow 🔗 1. Boundary sides and interval metadata property keys; text operations shall follow 🔗 8. Metadata ASCII representation and stream failure states.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Policies without property storage need a consistent unsupported answer rather than accidentally retaining endpoint or cache flags.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
template <typename Policy> class Interval_Info_Null; constexpr Interval_Info_Null(); constexpr void clear(); constexpr void clear_boundary_properties(Boundary_Type side); template <typename P> constexpr void set_boundary_property(Boundary_Type side, const P& p, typename P::Value v = P::default_value); template <typename P> constexpr typename P::Value get_boundary_property(Boundary_Type side, const P& p) const; template <typename P> constexpr void set_interval_property(const P& p, typename P::Value v = P::default_value); template <typename P> constexpr typename P::Value get_interval_property(const P& p) const; constexpr void m_swap(Interval_Info_Null& y); template <typename P> constexpr void swap(Interval_Info_Null<P>& x, Interval_Info_Null<P>& y);
VERIFICATION_CRITERIA: Cross policy Boolean values, all standard property keys and a custom non-Boolean property type; verify unchanged unsupported answers after setters, clear, copies and member/free/self swaps. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
4. Shared openness view retains a separate Boolean value UID: PPL-SPEC-000664 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Interval_Info_Null_Open<Policy>(open) shall store the supplied Boolean openness value and report store_open as true. Its boundary query shall return that same stored value for OPEN on either side, and false for SPECIAL. Copying and assignment shall retain independent Boolean values. The type shall retain the null base's other policy traits and unsupported interval-property answers.
Inherited null-base setters, clearing and base swapping shall remain stateless and shall not change the derived openness value. This view shall not provide independently mutable lower/upper openness flags. Its own ASCII loading shall replace the shared Boolean as specified in 🔗 8. Metadata ASCII representation and stream failure states. Other prerequisites shall follow 🔗 1. Boundary sides and interval metadata property keys.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: A shared openness view supplies one openness choice for an input boundary without allocating the complete independent interval metadata state.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
template <typename Policy> class Interval_Info_Null_Open; constexpr Interval_Info_Null_Open(bool open); constexpr bool get_boundary_property(Boundary_Type side, const Boundary_NS::Property& p) const;
VERIFICATION_CRITERIA: Check both constructor values on both sides, unsupported special/cache properties, independent copies and assignments, and inherited base operations preserving the derived flag. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
5. Policy-selected metadata layout and cleared construction UID: PPL-SPEC-000665 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Interval_Info_Bitset<T, Policy> shall store metadata in one unsigned integer word. The policy shall provide Boolean may_be_empty, may_contain_infinity, check_inexact, store_special, store_open, cache_empty and cache_singleton traits and a nonnegative next_bit position. Each trait shall be exposed unchanged.
Starting at Policy::next_bit, the layout shall allocate lower-special, lower-open, upper-special and upper-open positions in that order, consuming one bit exactly when the corresponding property is stored. It shall then allocate a cardinality-known bit exactly when either cache is enabled, an empty-answer bit exactly when cache_empty is enabled, and a singleton- answer bit exactly when cache_singleton is enabled. Each named position and next_bit shall expose the corresponding layout offset. The selected layout shall fit within the word width.
Default construction and clear() shall establish an all-zero word, including policy-reserved prefix bits. The interval owner shall manage the meaning of any reserved prefix fields and ensure coherence of cached claims. Other validity and initialization conditions shall follow 🔗 1. Boundary sides and interval metadata property keys.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Construction must initialize the complete word before any partial read-modify-write flag update, and optional properties must not overlap.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
template <typename T, typename Policy> class Interval_Info_Bitset; constexpr Interval_Info_Bitset(); constexpr void clear();
VERIFICATION_CRITERIA: Exercise every store/cache Boolean combination with multiple prefix lengths, check layout offsets independently, poison placement storage before construction, and verify all supported flags and reserved bits initially clear. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
6. Independent endpoint and cardinality flag updates UID: PPL-SPEC-000666 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For a valid layout in 🔗 5. Policy-selected metadata layout and cleared construction, setting SPECIAL or OPEN shall replace exactly that configured property on the selected side. Setting CARDINALITY_0, CARDINALITY_1 or CARDINALITY_IS shall replace exactly its configured bit. Omission of the value shall mean true. Every property query shall return its current configured Boolean value. Unsupported setters shall have no effect, and unsupported queries shall return false. An unnamed but representable Interval_NS::Property::Type enumeration value shall be unsupported.
clear_boundary_properties(side) shall clear exactly the selected side's stored special/open flags. Every other side, cache flag and reserved prefix bit shall be preserved. No setter shall infer relations among empty, singleton, known-status or endpoint flags; their consistent interpretation shall remain the interval owner's obligation. Other prerequisites shall follow 🔗 1. Boundary sides and interval metadata property keys and 🔗 5. Policy-selected metadata layout and cleared construction.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Endpoint mutation and cache ownership must remain explicit so no partial update corrupts another stored property or extension field.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
constexpr void clear_boundary_properties(Boundary_Type side); constexpr void set_boundary_property(Boundary_Type side, const Boundary_NS::Property& p, bool v = true); constexpr bool get_boundary_property(Boundary_Type side, const Boundary_NS::Property& p) const; constexpr void set_interval_property(const Interval_NS::Property& p, bool v = true); constexpr bool get_interval_property(Interval_NS::Property p) const;
VERIFICATION_CRITERIA: Compare complete property vectors with an independent Boolean model through every setter/query and side-clear transition, including unsupported policy combinations and preserved prefix bits. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
7. Bitset metadata copies and exchanges preserve the complete word UID: PPL-SPEC-000667 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Copy construction and assignment of Interval_Info_Bitset<T, Policy> shall preserve the source's complete word in a distinct owner, including reserved prefix bits. Assignment shall admit self-assignment and return its target. Later mutation or destruction of either owner shall not change the other's stored word. m_swap and free swap shall exchange both complete words, admit self-swapping and preserve every bit. Other valid-use conditions shall follow 🔗 5. Policy-selected metadata layout and cleared construction.
For constant-evaluable inputs and property/policy definitions, these operations shall support constant evaluation under the same stated preconditions.
RATIONALE: Copy and exchange of interval metadata must retain extension fields as well as the currently configured standard flags.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
constexpr Interval_Info_Bitset(const Interval_Info_Bitset& y); Interval_Info_Bitset& operator=(const Interval_Info_Bitset& y); constexpr void m_swap(Interval_Info_Bitset& y); template <typename T, typename P> constexpr void swap(Interval_Info_Bitset<T, P>& x, Interval_Info_Bitset<T, P>& y);
VERIFICATION_CRITERIA: Check independent copies, assignments, source destruction and every swap form on words containing both standard and reserved fields, including self operations. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
8. Metadata ASCII representation and stream failure states UID: PPL-SPEC-000668 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For Interval_Info_Null, ASCII output shall emit no bytes and loading shall consume no bytes, preserve the object and return true. For Interval_Info_Null_Open, output shall insert open or closed using ordinary string formatting, including the stream's width, fill and alignment. Loading shall extract a token under ordinary string-extraction rules, including the stream's width and whitespace settings; it shall assign the Boolean meaning and return true exactly for open and closed. Invalid or missing tokens shall return false and preserve the preceding Boolean value. With default compatible formatting, output followed by loading shall retain the shared Boolean.
For Interval_Info_Bitset with a noncharacter unsigned integer word type, ASCII output shall insert the complete word in hexadecimal base and loading shall extract a complete word in hexadecimal base using ordinary stream numeric syntax. Other stream formatting shall follow ordinary integer insertion/extraction rules. On normal return, including a failed load that returns false, both operations shall restore the preceding formatting flags. A successful load shall replace the complete word and return true; a failed numeric extraction shall return false and may change the word according to the stream's unsigned-integer extraction rules. Reserved/unused bits shall be retained and shall not cause rejection. With compatible stream formatting, output followed by loading shall retain the complete word.
Stream exceptions shall propagate under the stream's exception-mask rules; partial output/input and temporary hexadecimal base may remain after an exception. Calls shall preserve live valid metadata owners and require live streams, synchronized output/input access and the type's own valid-use rules. No numerical initialization shall be required.
RATIONALE: Null, shared-open and bitset metadata have distinct serialized representations; normal-return formatting restoration differs from the permitted state after a stream exception.
INTERFACE: Internal headers: Boundary_defs.hh and Interval_Info_defs.hh. Names belong to Parma_Polyhedra_Library and the indicated nested namespaces. Unqualified member signatures apply to the metadata type described above.
void ascii_dump(std::ostream& s) const; bool ascii_load(std::istream& s);
VERIFICATION_CRITERIA: Check exact tokens/hex words, reserved-bit round trips, trailing tokens, malformed and overflowing input, flags on success/false return, returning/throwing stream failures, and unchanged open flags on invalid reloads.
SOURCE: src/Boundary_defs.hh; src/Interval_Info_defs.hh; src/Interval_Info_inlines.hh; tests/intervalinfospec1.cc.
-
1. Exact interval integer-point existence UID: PPL-SPEC-000709 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For an initialized valid interval with represented set I, contains_integer_point() shall return true exactly when I∩ℤ ≠ ⌀. Empty intervals shall return false; ordinary real-unbounded nonempty intervals shall return true. A singleton at positive or negative infinity shall return false: an admitted extended infinite value shall not be classified as an integer.
For finite bounds l, u, the least admitted integer shall be ⌈l⌉ for a closed lower endpoint and ⌊l⌋ + 1 for an open lower endpoint. The greatest admitted integer shall be ⌊u⌋ for a closed upper endpoint and ⌈u⌉ − 1 for an open upper endpoint. The query shall report whether that least integer exceeds the greatest integer, returning false exactly in that case. It shall preserve boundary values and metadata.
The finite ceil/floor values and unit adjustments used to establish this exact decision shall be representable exactly by the boundary scalar, and their numerical operations shall satisfy the scalar's policy, resource, shared-temporary and caller-owned FPU prerequisites. Rational values shall be canonical. Inspection shall be synchronized with modification of the interval. The query shall require no additional library initialization.
RATIONALE: A complete integer-point decision must account for strict endpoint membership and distinguish an included infinite value from an unbounded range of finite numbers.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:
bool contains_integer_point() const;
VERIFICATION_CRITERIA: Compare open/closed rational endpoint pairs with independent arbitrary- precision floor/ceiling integer bounds. Cover empty intervals, finite singletons, intervals between consecutive integers, positive/negative fractions, closed-only and integer-bound presets, rays, universe and admitted signed infinity singletons. Exercise supported native floating boundaries within the exact arithmetic range and confirm source preservation.
SOURCE: src/Interval_defs.hh; tests/intervalintegerspec1.cc.
-
Incoming link from: 3. Selected-coordinate integer-point normalization of boxes1
2. Interval endpoint normalization around integer points UID: PPL-SPEC-000710 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: drop_some_non_integer_points() shall preserve every integer point of the receiving interval while replacing effective finite endpoints by closed integral endpoints. Empty intervals shall remain unchanged. A finite closed lower bound l shall become ⌈l⌉; a finite open lower bound shall become ⌊l⌋ + 1. A finite closed upper bound u shall become ⌊u⌋; a finite open upper bound shall become ⌈u⌉ − 1.
For an ordinary real interval, these replacements shall yield the interval hull of its integer points, becoming empty when no integer point remains. Unbounded endpoints shall retain their unbounded meaning without requiring evaluation of an inactive numerical payload. Normalization shall be idempotent and may retain noninteger interior values between distinct integer endpoints. For a policy admitting infinity as an element, the operation shall preserve the extended endpoint values; it shall not establish that every retained element is an integer or that its result is the least interval hull of the finite integer points.
The interval shall be initialized and valid, and its policy shall admit any resulting empty value. Active finite numerical payloads shall be initialized. The relevant rounded integers and unit adjustments shall be representable exactly for the stated exact endpoint guarantee. Numerical policy, resources, shared-temporary serialization and caller-owned FPU state shall satisfy the scalar floor/ceiling and unit-arithmetic contracts. Callers shall synchronize modification. The operation shall require no additional library initialization; underlying numerical failure shall retain the scalar operation's guarantees.
RATIONALE: Rounding the effective endpoints removes finite boundary portions that cannot contain an integer while retaining all integer solutions. A convex interval can still contain noninteger interior values.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:
void drop_some_non_integer_points();
VERIFICATION_CRITERIA: Check independent exact floor/ceiling endpoint formulas on exhaustive quarter-grid rational intervals with all endpoint topologies. Confirm preserved integer membership, closed effective endpoints, empty results and idempotence. Include rays, universe, integer-bound and closed-only presets, supported native floating formats within the exact range, and the stated retention of admitted extended endpoints.
SOURCE: src/Interval_defs.hh; tests/intervalintegerspec1.cc.
-
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.
-
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.
-
1. Interval assignment and directed enclosure UID: PPL-SPEC-000711 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: assign(x) shall replace the receiving interval by an outward enclosure of the source singleton or interval, using the receiving boundary and information policies. An empty source shall produce an empty interval. When both endpoints and their membership distinctions are representable exactly, assignment shall preserve the represented set. Otherwise its converted lower endpoint shall not exclude source values below it and its converted upper endpoint shall not exclude source values above it; unsupported strictness may be relaxed. Source infinity membership shall remain distinct from an unbounded finite range under policies that admit that distinction. Self-assignment shall preserve the represented set. A separate source shall remain unchanged.
assign(EMPTY) shall establish empty denotation; assign(UNIVERSE) shall establish the entire declared carrier. Assignment from admitted MINUS_INFINITY or PLUS_INFINITY shall establish the corresponding singleton. set_infinities() shall establish the interval from included negative infinity to included positive infinity; these operations shall require a policy that admits those included values. The templated assignment operator shall perform the corresponding assignment and return the receiving object. Constructors delegating to these assignments shall establish the same set.
Returned I_Result values shall obey the logical shape and status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.
RATIONALE: Assignment must distinguish mathematical set preservation from outward endpoint conversion when source and destination policies differ.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
I_Result assign(Degenerate_Element e); template <Special_Marker From> I_Result assign(const From& value); I_Result set_infinities(); template <Interval_Source From> I_Result assign(const From& x); template <Interval_Source T> Interval& operator=(const T& x);
VERIFICATION_CRITERIA: Check empty, universe, finite singleton, all finite endpoint topologies, rays and self-assignment. Compare exact same-profile results with an independent real-set model. Check inexact rational-to-integer enclosure, separate-source preservation and admitted included-infinity assignments. For scalar two, self-assignment, copied intervals, both included infinities and rounded conversions, check every returned definite claim against the independently known resulting set and entry-to-result change. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
2. Interval hull assignment UID: PPL-SPEC-000712 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For entry sets X, Y, join_assign(x,y) shall produce an outward enclosure of their interval hull hull(X∪Y). join_assign(x) shall use the receiving interval's entry set as X and the argument's set as Y. Empty operands shall be neutral. Under exact endpoint conversion with supported membership conditions, the result shall be the least interval of the receiving profile that contains both input sets. Equal limiting endpoints shall be included when either input includes that endpoint. A gap between the sets may be filled by the hull.
The receiver may alias either or both interval arguments. Results shall use their entry values, and distinct sources shall remain unchanged. Returned I_Result claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations; a conversion result shall not falsely establish exactness or a particular shape.
The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.
RATIONALE: The interval join is the least enclosing interval when representable; it need not equal a disconnected union.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Source From> I_Result join_assign(const From& x); template <Interval_Source From1, Interval_Source From2> I_Result join_assign(const From1& x, const From2& y);
VERIFICATION_CRITERIA: Check disconnected unions with exact endpoints without inferring exactness of the literal union. Check returned claims for changed results, receiver aliases and empty-source no-ops. Compare the hull of literal endpoint-and-open-cell unions against both overloads, with empty, universe, disjoint, nested and touching sets, every endpoint topology, rays and each receiver alias. Check source preservation and mixed scalar operands. Check directed enclosure when endpoint conversion is inexact.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
3. Geometric interval union gap decision UID: PPL-SPEC-000713 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: can_be_exactly_joined_to(x) shall return true exactly when the union of the receiving interval and the argument is itself an interval: there shall be no omitted point or gap between their represented sets. Touching finite limits shall join without a gap when at least one touching endpoint is included. Two open limits at that same finite value shall leave a gap. Neither operand shall be changed.
Both operands shall be nonempty, and neither shall be a singleton at an included infinity. They shall have compatible ordered carriers for their comparison operations. The decision shall concern their geometric union; it shall not certify that an endpoint of a different scalar or information policy can be represented exactly by the receiving interval's policy.
The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.
RATIONALE: Gap detection and endpoint representability are different properties. Conflating them could incorrectly certify a rounded hull as an exact union.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Source Type> bool can_be_exactly_joined_to(const Type& x) const;
VERIFICATION_CRITERIA: Compare with literal unions of independent endpoint-and-cell sets. Cover finite and unbounded overlapping, separated, contained and touching intervals, all four touching endpoint topologies and source preservation. Include a gap-free mixed-boundary union whose limiting endpoint is not exactly representable by the receiver.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc.
-
4. Interval intersection assignment UID: PPL-SPEC-000714 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For entry sets X, Y, intersect_assign(x,y) shall produce an outward enclosure of X∩Y under destination endpoint conversion. intersect_assign(x) shall use the receiving interval's entry set as X. For exactly representable endpoints and supported membership conditions, the result shall denote the exact intersection. Equal limiting endpoints shall be included only when both operands include them. Disjoint sets and any empty operand shall produce an empty interval when that result is admitted.
The receiver may alias either or both interval arguments; the result shall use their entry values and preserve distinct sources. On success the return shall be I_EMPTY exactly when the represented result is empty and I_NOT_EMPTY otherwise. This shape indication shall not assert that a cross-policy rounded enclosure equals the mathematical intersection.
The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.
RATIONALE: Intersection requires both endpoint membership conditions and an explicit emptiness outcome, including when the receiver aliases an input.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Source From> I_Result intersect_assign(const From& x); template <Interval_Source From1, Interval_Source From2> I_Result intersect_assign(const From1& x, const From2& y);
VERIFICATION_CRITERIA: Compare both overloads with literal endpoint-and-cell intersection. Include empty and universe operands, all relative endpoint orders and topologies, rays, singleton intersections, source preservation and each receiver alias. Check the returned shape and mixed-boundary outward enclosure.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc.
-
5. Interval enclosure of set difference UID: PPL-SPEC-000715 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For entry sets X, Y, difference_assign(x,y) shall produce an outward enclosure of hull(X⧵Y). difference_assign(y) shall use the receiving interval's entry set as X. For exact endpoints with supported complementary openness, the result shall be the least interval containing the literal set difference. Removing all of X shall yield empty; removing nothing shall preserve X. Removing an interior interval while leaving nonempty portions on both sides shall preserve the hull across the removed interior. A removed included endpoint shall become excluded, and a removed open limit shall remain included when it belongs to X. Endpoint conversion or unsupported openness may enlarge that exact hull under the receiving policy; it shall not exclude a surviving value.
The receiver may alias either or both interval arguments. Results shall use entry values and distinct sources shall remain unchanged. Returned I_Result claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations; no shape or exactness claim shall be inferred from unestablished endpoint conversion information.
The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.
RATIONALE: A literal difference can be disconnected. Its interval abstraction must preserve surviving values and use complementary membership at a newly exposed limit.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Source From> I_Result difference_assign(const From& x); template <Interval_Source From1, Interval_Source From2> I_Result difference_assign(const From1& x, const From2& y);
VERIFICATION_CRITERIA: Compare both overloads with the hull of literal endpoint-and-cell difference. Include empty operands, containment, equality, disjointness, left/right truncation, interior holes, all touching topologies, rays, universe, singleton removal and each receiver alias. Check distinct sources remain unchanged and mixed-policy results enclose surviving values. Check returned shape, exactness and change claims for interior holes, removed-all cases and no-op differences against the literal difference and receiving entry set.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
1. Interval construction from a scalar numeric literal UID: PPL-SPEC-000724 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Interval(s) shall enclose the scalar denoted by the numeric string s, parsing under the selected boundary type's numeric syntax and rounding the lower endpoint downward and the upper endpoint upward. An exactly representable finite scalar shall give its singleton when the policy admits it. Inexact endpoint conversion shall give an outward enclosure, with supported endpoint strictness reflecting strict conversion. Under policies that admit and represent an exact signed infinity as a point, an exact infinity literal shall give that signed singleton. Infinity used only as an unbounded endpoint shall retain the receiving carrier's meaning. Unknown numeric syntax and a rejected NaN literal shall throw std::invalid_argument. This constructor shall parse a scalar numeric literal rather than bracketed interval text; the scalar syntax and conversion rules shall follow 🔗 1. Exact finite numeric token syntax through 🔗 4. Numeric text input into supported native floating destinations. The source bytes shall remain unchanged.
Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.
RATIONALE: A scalar literal and a bracketed interval use different input interfaces, while conversion must retain a sound numerical enclosure.
INTERFACE: Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.
explicit Interval(const char* s);
VERIFICATION_CRITERIA: Check exact integers, canonical fractions, decimal/scaled forms, inexact rational-to-integer conversion, unknown/truncated syntax and admitted signed infinity literals. Compare literal mathematical endpoints and unchanged source text.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.
-
Incoming link from: 1. Human-readable box presentation1
2. Readable interval presentation and output delivery UID: PPL-SPEC-000725 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Insertion with operator<< shall return the supplied stream and leave the interval's mathematical value unchanged. It shall print an empty interval as []. A singleton shall be printed through its scalar lower endpoint without interval brackets. Otherwise it shall print a lower bracket, the lower endpoint, , ``, the upper endpoint and an upper bracket; open endpoints shall use parentheses and closed endpoints square brackets. Metadata-encoded lower/upper infinities shall print as ``-inf and +inf without reading their inactive numerical payloads. Other endpoints shall use the numeric output rules of 🔗 5. Mathematical numeric output and stream delivery status.
The interval shall be initialized and valid. Formatting and delivery failure shall follow the supplied stream and selected scalar output operations. The returned stream state shall report delivery failure under ordinary stream rules; no independent Boolean status or machine-reload guarantee shall be implied. In particular, singleton presentation shall not be a bracketed input record under 🔗 3. Bracketed interval stream parsing and rejection.
Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.
RATIONALE: Readable singleton output is intentionally scalar text; machine persistence has its own framed interface.
INTERFACE: Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.
template <typename Boundary, typename Info> std::ostream& operator<<(std::ostream& os, const Interval<Boundary, Info>& x);
VERIFICATION_CRITERIA: Check exact ordinary empty, singleton, bounded open/closed and ray presentations, inactive metadata endpoints, unchanged denotation, returned stream identity and both returning and throwing delivery failures.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.
-
Incoming link from: 2. Readable interval presentation and output delivery1
3. Bracketed interval stream parsing and rejection UID: PPL-SPEC-000726 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Extraction with operator>> shall consume a bracketed interval record and return the supplied stream. It shall recognize leading whitespace, [] for empty, or a lower [/(, numeric lower endpoint, comma, numeric upper endpoint and closing ]/). Whitespace may surround numeric tokens and delimiters. It shall leave subsequent records or suffix text available. Scalar singleton text without brackets shall not satisfy this grammar.
Valid finite records shall be enclosed using downward lower conversion and upward upper conversion, respecting supported requested openness and strict conversion. Reversed finite endpoints, or coincident exact finite endpoints with either endpoint excluded, shall denote empty when the policy admits empty. An exact coincident signed-infinity pair shall denote its singleton only when both endpoints are closed and the boundary/information policy admits and represents that point; excluding either endpoint shall give empty under those policies. Unbounded finite ranges and included infinity points shall remain distinct according to the receiving carrier.
Malformed syntax, missing delimiters/endpoints and rejected NaN endpoints shall set failbit and return the supplied stream, or throw according to its exception mask. The destination shall remain unchanged for a syntactic failure before a complete accepted record has been parsed. Successful parsing shall establish the record's interval independently of the preceding destination value; a default-constructed destination shall be admissible. Underlying numerical or allocation exceptions shall retain their own state guarantees. No general rewind of consumed input shall be promised.
Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.
RATIONALE: Bracketed input needs framing, directed conversion and a defined distinction between syntactic failure and numerical exceptions.
INTERFACE: Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.
template <typename Boundary, typename Info> std::istream& operator>>(std::istream& is, Interval<Boundary, Info>& x);
VERIFICATION_CRITERIA: Enumerate endpoint topologies, exact and fractional cuts, empty/reversed/coincident records, leading whitespace and suffix/multiple records. Check malformed/truncated input, preserved initialized destination on syntactic failure, exception-mask behavior, recovery by replacing the stream, and admitted infinity-point/open-infinity cases.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.
-
Incoming links from: 2. Reloadable box record export 5. Compatible interval record loading and partial failure state2
4. Reloadable interval metadata and endpoint export UID: PPL-SPEC-000727 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: ascii_dump(s) shall export one interval record as the labels info, lower and upper in that order, separated from their metadata/payload values by spaces, followed by a newline. Metadata shall use 🔗 8. Metadata ASCII representation and stream failure states, and active endpoints shall use their scalar ASCII representation under 🔗 1. Exact scalar ASCII persistence through 🔗 4. Scalar ASCII stream delivery and failure handling. A metadata-encoded SPECIAL endpoint shall instead have canonical zero payload, without inspecting its inactive numerical storage. The represented set and all active endpoint values shall remain unchanged; inactive payload bytes need not be preserved.
The source shall be initialized and valid. The record shall be reloadable with the corresponding interval type, compatible metadata/number formats and compatible stream formatting under 🔗 5. Compatible interval record loading and partial failure state. Stream failure shall be observable through its state or configured exception mask; output shall not report a separate success value.
Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.
RATIONALE: Machine export must preserve interval metadata and avoid reading numerical storage whose value is carried entirely by metadata.
INTERFACE: Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.
void ascii_dump(std::ostream& s) const;
VERIFICATION_CRITERIA: Round-trip every ordinary endpoint topology, rays, empty/universe and finite singleton records; inspect exact label order, newline framing, metadata and canonical inactive payloads. Check concatenation, source preservation and returning/throwing output failures.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc; tests/intervalcodecspec1.cc; tests/inactiveboundcodec.hh.
-
5. Compatible interval record loading and partial failure state UID: PPL-SPEC-000728 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: ascii_load(s) shall read info, its metadata representation, lower, its scalar payload, upper and its scalar payload in order. It shall return true after the complete compatible record is loaded, leaving subsequent records or suffix tokens available. Loading a complete record exported by 🔗 4. Reloadable interval metadata and endpoint export under compatible formatting shall preserve its mathematical set, endpoint membership and metadata meaning. Canonical inactive zero payloads shall not replace the infinity meaning carried by SPECIAL flags.
The stream shall carry a representation compatible with the receiving boundary/information types, including an admitted metadata/payload combination whenever loading succeeds. This low-level record interface shall not promise validation of arbitrary metadata claims or cross-type, cross-version or cross-platform format compatibility. An existing initialized destination or a default-constructed destination with live storage shall be admissible for a complete compatible replacement.
An absent or wrong label, failed component extraction, or failed check of 🔗 3. Interval shape and endpoint classification shall return false. Input may have been consumed and the destination may contain partially loaded components. A rollback or usable mathematical interval shall not be assumed. Before subsequent mathematical use, the caller shall establish a valid complete value, for example by a successful compatible replacement. Stream exceptions shall propagate according to the configured mask, with partial state permitted. Metadata/scalar parsing shall retain their own formatting and failure guarantees.
Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.
RATIONALE: A staged low-level loader can preserve complete exported records without promising transactional replacement or validation of all possible raw metadata words.
INTERFACE: Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.
bool ascii_load(std::istream& s);
VERIFICATION_CRITERIA: Check exact same-type record round trips and all metadata/active boundary meanings; load into distinct preceding values and fresh storage. Check each missing/wrong label, each failed/truncated endpoint, suffix preservation, sequential loads, recovery through a complete replacement and exception-enabled input.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc; tests/intervalcodecspec1.cc; tests/inactiveboundcodec.hh.
-
1. Interval types, initial storage and independent value copies UID: PPL-SPEC-000701 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Interval<Boundary, Info> shall own two boundary objects and one metadata object, expose their types as boundary_type and info_type, and use Info to select endpoint openness, special boundary representations and admitted empty/extended values. A metadata-based special-boundary encoding shall not be combined with a boundary type whose numerical limits already provide infinity. Rational_Interval shall use canonical mpq_class boundaries with open endpoints available. Integer_Interval shall use mpz_class boundaries with closed endpoints. Both presets shall admit empty intervals and represent unbounded endpoints through metadata; their concrete intervals shall exclude infinity as an element.
Default construction shall default-construct the owned boundary and metadata objects. It shall not establish a common empty or universe value across all boundary types. Callers shall initialize an interval with a supported construction, assignment or build operation before using its numerical value. Construction from a supported scalar, interval or degenerate element shall have the value meaning of the corresponding assignment operation.
Interval_Singleton<T> and Interval_Like<T> shall have the truth values of Is_Singleton<T>::value and Is_Interval<T>::value. Interval_Source<T> shall classify their union, preserving existing trait specializations and qualifier rules. The default interval classification shall retain implicit const-reference conversions to Interval_Base and exclude inaccessible, ambiguous and explicit-only conversions. These classifications shall not impose Boolean regularity on symbolic types. The forwarding constructor shall participate when overload resolution makes the receiver's existing assign(source) operation available. Sources without an admitted assignment overload shall be excluded. This admission check shall not instantiate the assignment body or extend the underlying endpoint operations' supported combinations. The separate scalar-text constructor shall remain available.
Copy construction and same-type copy assignment of initialized valid intervals shall preserve the represented interval, active boundary values and metadata. Their owned storage shall be independent; changing or destroying one object shall not change the other's value. Same-object assignment shall preserve the value and return that object's reference. Distinct-object copy assignment shall return the destination reference. Destruction shall release the owned boundary and metadata objects. Copying shall require the resources and failure guarantees of their ordinary scalar/metadata copies; no strong rollback guarantee shall be inferred when an underlying copy throws.
Boundary values and metadata shall satisfy their numerical and representation contracts. Source/destination objects shall be live and initialized for any operation that reads their values. Callers shall synchronize overlapping modifications and respect the scalar operations' shared-temporary and FPU prerequisites. Storage construction and same-type copying shall add no library-initialization or numerical-rounding prerequisite.
RATIONALE: Explicit ownership and initial-state rules permit temporary storage without making an uninitialized native endpoint into a usable numerical value. Copies preserve independently mutable interval values.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
template <typename T> concept Interval_Singleton = bool(Is_Singleton<T>::value); template <typename T> concept Interval_Like = bool(Is_Interval<T>::value); template <typename T> concept Interval_Source = bool(Is_Singleton<T>::value || Is_Interval<T>::value); template <typename Boundary, typename Info> class Interval; typedef Interval<mpq_class, Rational_Interval_Info> Rational_Interval; typedef Interval<mpz_class, Integer_Interval_Info> Integer_Interval; Interval(); template <typename T> requires requires (Interval& target, const T& value) { target.assign(value); } explicit Interval(const T& source); Interval(const Interval& source); Interval& operator=(const Interval& source); ~Interval();
VERIFICATION_CRITERIA: Check positive and negative source/constraint admission, trait specializations, implicit versus inaccessible/ambiguous/explicit conversions, forwarding and text constructor participation. Check preset type/policy traits, initialization before native reads, independent copies and assignments, self-assignment, source destruction, open endpoints, empty/universe values and large GMP endpoint allocation. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc; tests/commonhelpersspec1.cc; tests/numericpublic1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
Incoming link from: 4. Interval and scalar view adapters1
2. Interval endpoint and metadata references UID: PPL-SPEC-000702 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For a live interval, mutable lower(), upper() and info() shall return references to its owned lower boundary, upper boundary and metadata objects. Their const overloads shall return const references to those same objects, without copying or changing them. The references shall retain their owner storage identities across value assignments and swaps and shall remain valid until the owner is destroyed.
Callers that read an endpoint shall ensure that its payload is initialized and meaningful for the current representation. A metadata-encoded unbounded endpoint shall not imply a readable numerical payload. Callers that mutate an endpoint or metadata directly shall establish a valid complete representation, including canonical rational values and consistent openness and special-boundary flags, before another interval operation reads it. Direct mutation shall not automatically perform numerical conversion, normalize the interval or repair other fields.
Access itself shall require no library initialization or FPU setup. Reads shall be synchronized with overlapping owner modification; numerical writes shall obey the written scalar's prerequisites.
RATIONALE: Borrowed storage references permit controlled endpoint updates while retaining ownership and making representation responsibilities explicit.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
Boundary& lower(); const Boundary& lower() const; Boundary& upper(); const Boundary& upper() const; Info& info(); const Info& info() const;
VERIFICATION_CRITERIA: Check reference types/address identity, const/mutable correspondence, retained identities after assignments/swaps, valid canonical endpoint mutation and explicit metadata changes without implicit normalization.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
Incoming link from: 5. Compatible interval record loading and partial failure state1
3. Interval shape and endpoint classification UID: PPL-SPEC-000703 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For an initialized valid interval, is_empty() shall report whether its lower/upper endpoint predicates admit no common value; is_singleton() shall report a single admitted value. Openness at equal finite endpoints shall distinguish an empty interval from a closed singleton.
lower_is_open() and upper_is_open() shall report whether the respective endpoint value is excluded under the boundary/metadata policy. The boundary-infinity queries shall identify outward unbounded endpoints. The domain-infimum/supremum queries shall identify the selected numerical domain's least/greatest extent, which may be a finite native limit in a bounded domain. is_bounded() shall return true exactly when neither endpoint is an outward boundary infinity. is_universe() shall return true exactly when the represented interval contains every value of the configured number carrier. Its endpoints shall reach the domain's infimum and supremum, and shall include those extent values whenever they belong to the carrier. Opening a finite domain-limit endpoint, or excluding an infinite endpoint admitted as an element of an extended carrier, shall therefore prevent the universe classification. A bounded numerical domain can have a bounded universe representation.
For policies admitting actual extended infinity values, infinity_sign() shall return 1 when the lower endpoint is reverse positive infinity, -1 when the upper endpoint is reverse negative infinity, and 0 otherwise, checking the lower case first. Ordinary finite intervals and the real-unbounded universe shall return zero.
These queries shall preserve endpoint and metadata values. They shall require initialized valid representations, sufficient comparison resources, synchronization against modification, and the comparisons' scalar/FPU and shared-temporary prerequisites. They shall add no initialization requirement.
RATIONALE: Shape, openness, unboundedness and the selected endpoint domain are separate properties; finite native domain limits must not be confused with infinity.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
bool is_empty() const; bool is_singleton() const; bool lower_is_open() const; bool upper_is_open() const; bool lower_is_boundary_infinity() const; bool upper_is_boundary_infinity() const; bool lower_is_domain_inf() const; bool upper_is_domain_sup() const; bool is_bounded() const; bool is_universe() const; int infinity_sign() const;
VERIFICATION_CRITERIA: Check every open/closed finite endpoint combination, reversed and equal endpoints, empty/singleton values, rays, universe, bounded native domain limits and admitted extended infinity singletons, preserving all inspected values.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
4. Exact interval set comparisons UID: PPL-SPEC-000704 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For initialized valid intervals and admitted scalar singleton operands, contains(y) shall report set inclusion of the argument in the receiving interval. strictly_contains(y) shall report inclusion with unequal represented sets. is_disjoint_from(y) shall report that the two sets have empty intersection. The interval comparison operators == and != shall report represented-set equality and its complement. These operators shall apply when at least one operand is an interval; they shall not change the raw scalar operators' contracts.
Every interval shall contain the empty interval. The empty interval shall strictly contain no interval; a nonempty interval shall strictly contain the empty interval. Empty operands shall be disjoint from all operands. Equal closed endpoints shall have the same singleton meaning regardless of the admitted endpoint storage type. Open/closed contact shall determine whether touching intervals intersect. An interval with integer endpoints shall not thereby discard noninteger interior points.
Mixed representations shall compare their endpoint meanings without changing the operands or narrowing an exact value merely to the other's storage width. Source values shall be canonical and admissible to their policies; comparison resources, shared-temporary serialization, synchronization and any required caller-owned FPU state shall follow the scalar comparison contracts. No additional library initialization shall be required.
RATIONALE: Exact inclusion and disjointness must preserve endpoint topology and set meaning across admitted scalar representations.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
template <typename T> bool contains(const T& y) const; template <typename T> bool strictly_contains(const T& y) const; template <typename T> bool is_disjoint_from(const T& y) const; template <typename T1, typename T2> bool operator==(const T1& x, const T2& y); template <typename T1, typename T2> bool operator!=(const T1& x, const T2& y);
VERIFICATION_CRITERIA: Use independent rational membership predicates for exhaustive finite open/closed interval pairs and scalar points. Check empty identities, proper inclusion, equality symmetry, touching endpoints, rays/universe and mixed rational/integer/native representations.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
Incoming link from: 1. Exact topological closure of boxes1
5. Interval closure and endpoint exclusion UID: PPL-SPEC-000705 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: is_always_topologically_closed() shall return true exactly when the metadata policy cannot store open endpoints. is_topologically_closed() shall return true for that policy, for an empty interval, or when every finite endpoint is closed. An outward infinite endpoint shall not prevent this real-topology closure classification.
topological_closure_assign() shall retain empty intervals and clear openness at each finite endpoint of a nonempty interval when openness is supported. It shall preserve numerical endpoints and outward unbounded endpoints. For ordinary real intervals excluding infinity as an element, the represented result shall be their real topological closure under the admitted endpoint policy. Closure shall be idempotent.
For a nonempty interval with openness support, remove_inf() shall mark its lower endpoint open and remove_sup() its upper endpoint open. These operations shall exclude a currently included finite infimum/supremum; they shall not move the numerical endpoints. Opening an endpoint of a singleton may make it empty. For a policy without openness support both calls shall leave the interval unchanged.
Objects shall be live, initialized and valid, and permit any resulting empty value. Callers shall synchronize modification. The flag operations shall perform no scalar arithmetic or result-handler dispatch; queries shall retain their underlying endpoint-comparison prerequisites.
RATIONALE: Finite openness determines real topological closure. Removing an infimum or supremum is an endpoint-exclusion operation, including when that endpoint is finite.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
static bool is_always_topologically_closed(); bool is_topologically_closed() const; void topological_closure_assign(); void remove_inf(); void remove_sup();
VERIFICATION_CRITERIA: Check all finite endpoint openness combinations, singleton/empty values, rays and universe, numeric endpoint preservation, closure idempotence, finite endpoint exclusion and the closed-only policy no-op.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
6. Interval swap and owned boundary memory UID: PPL-SPEC-000706 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For two initialized valid intervals of the same type, member m_swap and related swap shall exchange both owned boundary values and the metadata as one successful interval value exchange. Same-object swap shall preserve the represented interval. Retained endpoint and metadata references shall remain attached to their original owner storage and observe the exchanged contents. Swap shall require the underlying scalar and metadata swap resources; it shall not promise rollback if one of those operations throws.
For PPL's nonallocating interval metadata policies, external_memory_in_bytes() shall equal the sum of the owned lower and upper scalar external-memory metrics. total_memory_in_bytes() shall equal sizeof(*this) plus that external size. GMP endpoint metrics shall include retained allocated limbs according to their scalar memory contracts; native scalar endpoints shall add no external allocation. These queries shall preserve numerical values, metadata and borrowed storage identities. Their sums shall fit memory_size_type. A user-defined metadata extension that owns additional external allocation shall require its own accounting contract.
Objects shall be live and represent initialized valid intervals. Swap shall support valid metadata-encoded unbounded endpoints without reading an indeterminate inactive native payload as a numerical value. Callers shall synchronize mutation and inspection. Swaps and memory queries shall add no numerical-rounding or library-initialization requirement.
RATIONALE: Endpoint storage and metadata together determine the value. Owned scalar allocation must be counted independently of significant numerical digits.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
void m_swap(Interval& other); template <typename Boundary, typename Info> void swap(Interval<Boundary, Info>& x, Interval<Boundary, Info>& y); memory_size_type external_memory_in_bytes() const; memory_size_type total_memory_in_bytes() const;
VERIFICATION_CRITERIA: Check distinct/self swaps of finite/open, empty and universe intervals, retained storage references, independent later mutation and large GMP allocations. Compare scalar external metrics with interval sums and total object size.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
7. Interval endpoint constraint views UID: PPL-SPEC-000707 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For a nonempty initialized valid interval, lower_constraint() shall return an interval-constraint object with the lower endpoint's relation and cutoff; upper_constraint() shall do the corresponding upper endpoint. A finite open lower endpoint shall use V_GT and a closed lower endpoint V_GE; finite open/closed upper endpoints shall use V_LT/V_LE. A metadata-encoded special unbounded endpoint shall produce an unconstrained V_LGE constraint with no initialized cutoff required.
For an effective numerical cutoff, the returned object shall use the default storage criterion of 🔗 4. Interval constraints retain relation and cutoff ownership. A borrowed cutoff shall refer to that same owned boundary and reflect its later valid numerical changes; an owned cutoff shall retain an independent snapshot. In both cases the returned relation shall be a snapshot of the relation at construction and shall not change when the interval's metadata changes later. Borrowed constraints shall not outlive their interval owner.
These queries shall preserve the interval. The interval shall be nonempty, and callers shall not read an unconstrained returned object's unbound cutoff. Lifetimes, canonical numerical representation, sufficient copy resources, synchronization and comparison prerequisites shall follow 🔗 4. Interval constraints retain relation and cutoff ownership and the interval classification contracts.
RATIONALE: A boundary view combines a relation snapshot with the selected cutoff ownership; relation metadata must not be mistaken for a live link to later topology changes.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
I_Constraint<boundary_type> lower_constraint() const; I_Constraint<boundary_type> upper_constraint() const;
VERIFICATION_CRITERIA: Check each finite open/closed relation, unbounded special endpoints, borrowed GMP addresses and later value changes, independent native cutoff copies, relation snapshots after metadata changes and valid owner lifetimes.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.
-
8. Interpreting logical interval emptiness flags UID: PPL-SPEC-000708 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: check_empty(result) shall interpret the logical shape possibilities of 🔗 1. Interval result possibilities and status-flag set operations. An explicit I_EMPTY shape field shall return true without needing an endpoint emptiness calculation. An explicit I_NOT_EMPTY shape field shall return false. For every other shape field, the query shall report the receiving interval's actual endpoint emptiness. Other status bits shall not change this interpretation.
The input shall use the logical I_Result bit protocol. It shall not be an unrelated scalar Result or an unconverted packing of endpoint result codes. Explicit shape claims shall be supplied consistently with the operation whose result they describe when the caller uses this return value to decide that operation's actual emptiness. This helper shall not validate those claims against the interval's geometry.
The receiving object shall have an initialized valid representation whenever an endpoint calculation is required. The query shall preserve it and retain the scalar comparison, synchronization and resource prerequisites of is_empty(). It shall require no additional initialization.
RATIONALE: A logical result can carry a definite shape or defer the decision to the represented endpoints. Explicit shape claims and scalar endpoint results are different protocols.
INTERFACE: Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.
bool check_empty(I_Result result) const;
VERIFICATION_CRITERIA: Check definite empty/nonempty shape records, uncertain alternative sets, status-only records and combined status flags on empty, finite nonempty and universe intervals, preserving the receiver and comparing deferred answers with independent set emptiness. Check all nine-bit input words and uncertain records produced by scalar assignment and ignored endpoint-extension descriptors on empty and nonempty receivers.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc; tests/intervalresultsspec1.cc.
-
4. Interval and scalar view adapters UID: PPL-SPEC-001642 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For a live initialized interval, f_is_empty, f_is_singleton and infinity_sign shall return the corresponding member query. In Interval_NS, f_lower, f_upper and f_info shall return const references to the interval's owned boundaries and metadata, preserving reference identity and the access conditions of 🔗 2. Interval endpoint and metadata references.
For an admitted singleton scalar x, the two boundary adapters shall return const references to x itself. Its metadata adapter shall return a shared immutable null-information object admitting empty values and infinity, with inexact checking disabled. The overload with bool open shall return independent null-information metadata whose two boundaries have that openness. The scalar empty predicate shall return exactly is_not_a_number(x); its singleton predicate shall negate that result.
is_singleton_integer(x) shall return true exactly when the interval or scalar is a singleton and its lower value is integral. It shall not read a lower payload after a false singleton result. check_empty_arg(x) shall return the empty predicate when the metadata admits emptiness; otherwise the caller shall supply a nonempty argument and the helper shall return false. These adapters shall preserve their arguments and add no allocation, initialization or rounding prerequisites to the selected scalar/member query.
RATIONALE: Generic interval algorithms need borrowed views of actual intervals and singleton scalars without copying endpoints or reading inactive empty payloads.
INTERFACE: Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.
template <typename B, typename I> bool f_is_empty(const Interval<B,I>&); template <typename B, typename I> bool f_is_singleton(const Interval<B,I>&); template <typename B, typename I> int infinity_sign(const Interval<B,I>&); namespace Interval_NS { // Overloads for intervals and admitted singleton scalars: template <typename T> const auto& f_lower(const T&); template <typename T> const auto& f_upper(const T&); template <typename T> const auto& f_info(const T&); template <typename T> Scalar_As_Interval_Info_Open f_info(const T&, bool); } template <typename T> bool is_singleton_integer(const T&); template <typename T> bool check_empty_arg(const T&);
VERIFICATION_CRITERIA: Check reference identity, shared/independent metadata, both openness states, empty/singleton/nonsingleton intervals, integral/fractional scalars, NaN and admitted infinities. Exercise the nonempty-only metadata branch and short-circuiting over empty intervals.
SOURCE: src/Interval_inlines.hh; src/Interval_defs.hh; tests/scalaradaptersspec1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001074 Best bounded-difference enclosure of Cartesian boxes (Specified by)
- PPL-SPEC-001043 Box bounded-integer wrapping, overflow choices and guard refinement (Specified by)
- PPL-SPEC-001021 Single-coordinate affine box image (Specified by)
- PPL-SPEC-001022 Single-coordinate affine box preimage (Specified by)
- PPL-SPEC-001023 Generalized single-coordinate box image (Specified by)
- PPL-SPEC-001024 Generalized single-coordinate box preimage (Specified by)
- PPL-SPEC-001025 Generalized multi-coordinate box image (Specified by)
- PPL-SPEC-001026 Generalized multi-coordinate box preimage (Specified by)
- PPL-SPEC-001027 Bounded affine box image (Specified by)
- PPL-SPEC-001028 Bounded affine box preimage (Specified by)
- PPL-SPEC-001029 Interval-coefficient affine box image (Specified by)
- PPL-SPEC-001034 Threshold box widening and finite stabilization (Specified by)
- PPL-SPEC-001035 Default box widening and precision-sensitive delay tokens (Specified by)
- PPL-SPEC-001036 Box extrapolation with selected limiting constraints (Specified by)
- PPL-SPEC-001037 Box narrowing with complete previous-boundary retention (Specified by)
- PPL-SPEC-001044 Box construction from supported constraints (Specified by)
- PPL-SPEC-001045 Box construction from supported congruences (Specified by)
- PPL-SPEC-001046 Cartesian enclosure of a polyhedral generator system (Specified by)
- PPL-SPEC-001047 Box conversion from bounded-difference shapes (Specified by)
- PPL-SPEC-001048 Box conversion from octagonal shapes (Specified by)
- PPL-SPEC-001049 Complexity-sensitive box conversion from polyhedra (Specified by)
- PPL-SPEC-001050 Cartesian enclosure of a rational grid (Specified by)
- PPL-SPEC-001051 Box conversion from partially reduced products (Specified by)
- PPL-SPEC-000961 Dimension-preserving box coordinate forgetting (Specified by)
- PPL-SPEC-000962 Unrestricted and zero-fixed box coordinate extension (Specified by)
- PPL-SPEC-000963 Ordered Cartesian box concatenation (Specified by)
- PPL-SPEC-000964 Selected-coordinate box projection and compaction (Specified by)
- PPL-SPEC-000965 Trailing-coordinate box projection (Specified by)
- PPL-SPEC-000966 Injective partial box coordinate remapping (Specified by)
- PPL-SPEC-000967 Box coordinate expansion and replica precision (Specified by)
- PPL-SPEC-000968 Box coordinate folding and interval enclosure (Specified by)
- PPL-SPEC-001038 Exact topological closure of boxes (Specified by)
- PPL-SPEC-001039 Least box enclosure of nonnegative real-time progression (Specified by)
- PPL-SPEC-001040 Selected-coordinate integer-point normalization of boxes (Specified by)
- PPL-SPEC-001016 Addition of optimally supported box constraints (Specified by)
- PPL-SPEC-001017 Addition of optimally supported box congruences (Specified by)
- PPL-SPEC-001018 Conservative box refinement by linear constraints (Specified by)
- PPL-SPEC-001019 Conservative box refinement by linear congruences (Specified by)
- PPL-SPEC-001020 Controlled box constraint propagation (Specified by)
- PPL-SPEC-001030 Exact extraction of individual box boundaries (Specified by)
- PPL-SPEC-001031 Constraint and congruence exports of box values (Specified by)
- PPL-SPEC-001032 Affine boundedness, extrema and witnesses on boxes (Specified by)
- PPL-SPEC-001033 Detection of constant affine values and zero frequency (Specified by)
- PPL-SPEC-000973 Box relations with linear constraints (Specified by)
- PPL-SPEC-000974 Box relations with linear congruences (Specified by)
- PPL-SPEC-000975 Box subsumption of geometric generators (Specified by)
- PPL-SPEC-000976 Cartesian box intersection (Specified by)
- PPL-SPEC-000977 Least same-profile box upper bound (Specified by)
- PPL-SPEC-000978 Conditional exact union of boxes (Specified by)
- PPL-SPEC-000979 Same-profile abstract box difference (Specified by)
- PPL-SPEC-000980 Context-preserving box simplification (Specified by)
- PPL-SPEC-000671 Box cached claims and independent status ownership (Specified by)
- PPL-SPEC-000672 Independent cached-status bit updates and queries (Specified by)
- PPL-SPEC-000673 Status consistency query and diagnostic (Specified by)
- PPL-SPEC-000674 Status ASCII export preserves cached claims (Specified by)
- PPL-SPEC-000675 Status ASCII loading and partial rejection state (Specified by)
- PPL-SPEC-000969 Human-readable box presentation (Specified by)
- PPL-SPEC-000970 Reloadable box record export (Specified by)
- PPL-SPEC-000971 Compatible box record loading and failure state (Specified by)
- PPL-SPEC-000972 Owned box memory accounting (Specified by)
- PPL-SPEC-001220 Box representation invariant query (Specified by)
- PPL-SPEC-000951 Cartesian box values, coordinate identity and valid use (Specified by)
- PPL-SPEC-000952 Dimensioned empty and universe box construction (Specified by)
- PPL-SPEC-000953 Owned box copying, assignment and cleanup (Specified by)
- PPL-SPEC-000954 Upward box conversion between interval profiles (Specified by)
- PPL-SPEC-000955 Whole box exchange across different dimensions (Specified by)
- PPL-SPEC-000956 Ambient and affine box dimension queries (Specified by)
- PPL-SPEC-000957 Empty-aware borrowed coordinate interval access (Specified by)
- PPL-SPEC-000958 Explicit coordinate factor replacement (Specified by)
- PPL-SPEC-000959 Exact ordinary box classification (Specified by)
- PPL-SPEC-000960 Box set relations, dimension-sensitive equality and compatible hashes (Specified by)
- PPL-SPEC-001221 Explicit empty box assignment (Specified by)
- PPL-SPEC-001164 Best octagonal enclosure of Cartesian boxes (Specified by)
A positive-dimensional box shall denote the Cartesian product of its coordinate intervals; in zero dimensions the empty box and the universe box shall remain distinct.
The product interpretation explains non-relational approximation and must retain the exceptional zero-dimensional empty set.
Verification covers box value types and their Cartesian and zero-dimensional semantics. Related obligations: 🔗 5. Box intersection and least upper bounds, 🔗 1. Coordinate removal and existential projection, 🔗 2. Distinguished coordinate extensions.
Compare membership with the conjunction of independent coordinate-membership checks. Include an empty coordinate interval, unconstrained coordinates, singleton coordinates and both zero-dimensional cases.
doc/definitions.dox: Intervals and Boxes. src/Box_defs.hh: box constructors and represented sets. src/Box_inlines.hh: emptiness and dimension behavior.
-
Incoming link from: 12. Certified finite scalar embeddings1
3. Best bounded-difference enclosure of Cartesian boxes UID: PPL-SPEC-001074 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: BD_Shape(box,complexity) shall give the least target-profile bounded-difference enclosure containing the Cartesian product represented by box. The result shall be closed: a finite open interval endpoint may determine an included limiting bound.
The exact supremum of a difference xi − xj shall combine the source upper endpoint of coordinate i and lower endpoint of coordinate j before target-profile rounding. An unbounded contributing endpoint shall leave that normal unrestricted. Empty factors shall give empty in the original ambient dimension. The complexity argument shall be ignored for the three declared complexity values.
For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.
The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.
A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].
Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.
RATIONALE: Cartesian independence determines exact difference support, which is converted according to the target numerical profile.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
template <typename Interval> explicit BD_Shape(const Box<Interval>& box, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Compute support from independently specified coordinate intervals, including open, unbounded, singleton and empty factors. Check pairwise differences before rounding, all three complexity arguments, both zero-dimensional values, source independence and output affine dimension. Use rational source intervals and supported target profiles.
SOURCE: src/Shape_Conversion_Support.hh; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/frombox1.cc; tests/BD_Shape/dimensionlimits1.cc; tests/BD_Shape/supportconversion1.cc.
-
3. Box bounded-integer wrapping, overflow choices and guard refinement UID: PPL-SPEC-001043 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: wrap_assign shall interpret the selected coordinates as bounded integers using 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes. It shall conservatively contain every selected concrete result obtained from the receiver's entry integer-valued selected coordinates under the requested overflow interpretation. The represented result shall remain a box, so modular disjunctions and relations may be approximated. Fractional points on selected coordinates may be discarded, and retained interior points need not all be integers.
Without a supplied guard, OVERFLOW_WRAPS shall use modular images; OVERFLOW_IMPOSSIBLE shall intersect each selected factor with the modeled value range. Under OVERFLOW_UNDEFINED, a factor already contained in the rational half-open interval from the modeled minimum through one past its maximum may be retained; a potentially overflowing factor may be forgotten and replaced by the modeled closed integer range. No-overflow factors shall not be discarded merely because another factor can overflow.
A nonnull cs_p shall denote a guard on the resulting coordinates. The completed box shall conservatively contain the guard-filtered selected integer results; it need not satisfy every guard row. In particular, relational rows and rows mentioning unselected coordinates may be ignored by this specialization. Interval rows for selected coordinates may refine their target ranges. A false constant row shall make the result empty. The guarded undefined-overflow path may forget a selected coordinate to universe when overflow is possible; no universal post-guard containment or least-result guarantee shall be inferred.
With an empty selection, no bounded-type limits or residues shall be required. A null guard shall preserve the receiver; a supplied guard shall perform conservative refinement under 🔗 3. Conservative box refinement by linear constraints, which may affect otherwise unselected coordinates. Empty, including a hidden empty factor, shall remain empty. Ambient dimension shall remain unchanged. For a nonempty selection, unselected factor meanings shall remain unchanged unless the entire product becomes empty. A distinct supplied guard and the selection set shall retain their mathematical values. complexity_threshold and wrap_individually shall not change this Box specialization's result.
An excess selected coordinate or guard ambient dimension shall throw std::invalid_argument before receiver modification, including for empty receivers. Guard dimension shall be checked even with an empty selection. Only the named width, representation and overflow attributes shall be admitted; no outcome shall be specified for invalid enum values.
The validity, numerical, lifetime and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Selected modular evaluation shall retain 🔗 2. Interval abstraction of wrapped integer images with refinement's backend prerequisites. Modeled limit construction shall use unbounded integer arithmetic independent of configured Coefficient range; conversion into an endpoint profile shall retain that profile's representability and outward-rounding conditions. A guard shall retain its descriptor context, coefficient-intermediate range and refinement prerequisites; dimension reporting shall retain the initialized context of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Otherwise valid calls shall require no additional library initialization. Underlying resource/numerical failures may leave a partially updated box.
RATIONALE: A Cartesian abstraction can preserve concrete bounded-integer outcomes while losing modular disjunctions and relational guard precision; the overflow interpretation and empty-selection path determine different operations.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
// Member of Box<ITV>: void wrap_assign(const Variables_Set& vars, Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, Bounded_Integer_Type_Overflow o, const Constraint_System* cs_p = nullptr, unsigned complexity_threshold = 16, bool wrap_individually = true);
VERIFICATION_CRITERIA: Compare bounded concrete integer enumeration against exact modular, possible-overflow and impossible-overflow models. Check all widths with GMP limits, native admitted widths, selected/unselected axes, closed/open and fractional factors, full periods, unbounded and lazy-empty values. Exercise all overflow modes, null/empty/false/selected/relational/unselected guards, empty selections, both precision flags and several thresholds, dimension prechecks and preserved source descriptors. Check analytic wide limits and capability independence from configured Coefficient storage.
BIBLIOGRAPHY: SimonK07 | Sections 5.1–5.4, explicit wrapping and guard precision; PDF page indices 7–10 (zero-based).
SOURCE: src/Box_defs.hh; src/Box_templates.hh; tests/Box/wrap1.cc; tests/Box/wraplimits1.cc; tests/Box/wrapguard1.cc; tests/Box/wrapcontracts2.cc;
tests/wrappingspec1.cc; tests/wrappingoracle.hh; tests/wrappingpublic1.cc.
-
Incoming links from: 2. Single-coordinate affine box preimage 3. Generalized single-coordinate box image2
1. Single-coordinate affine box image UID: PPL-SPEC-001021 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a valid coordinate k, dimension-compatible affine expression e and nonzero coefficient d, affine_image(k,e,d) shall enclose every vector obtained from an entry point x by replacing only coordinate k with e(x) ⁄ d. The receiving interval shall be the outward interval evaluation of that affine expression on the entry factors, including its inhomogeneous term and the sign of d. Every other coordinate interval shall retain its entry represented set.
With exact rational endpoint operations and supported openness, the result shall be the least box containing this image. Finite numerical profiles shall retain their delegated outward enclosures, without a general best- approximation claim when intermediate arithmetic is inexact. Dependencies between the replaced coordinate and unchanged coordinates may be lost. The source expression shall remain unchanged.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: A single affine assignment can retain each unchanged coordinate while abstracting the newly introduced correlations into an interval product.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void affine_image(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Derive rational affine ranges and endpoint attainment from independent signed sums. Check constants, self-dependence, positive/negative denominators, fractional extrema, open/unbounded factors, lazy emptiness, dimension errors, explicit/default denominator and unchanged descriptors.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
Incoming link from: 4. Generalized single-coordinate box preimage1
2. Single-coordinate affine box preimage UID: PPL-SPEC-001022 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: With coordinate, expression and denominator admitted by 🔗 1. Single-coordinate affine box image, affine_preimage(k,e,d) shall enclose every vector x whose image under x’k = e(x) ⁄ d, with all other coordinates unchanged, belongs to the entry box.
When the coefficient of xk in e is nonzero, the affine map is invertible. The result shall enclose the interval evaluation of its inverse on the entry box; with exact rational endpoint arithmetic and supported openness this shall be the least box preimage. When that coefficient is zero, the old value of xk is unconstrained by the assignment. The operation need not derive every additional restriction on other coordinates and need not compute the least box preimage, but shall retain every feasible predecessor. At coordinates other than the updated one, the result shall preserve the entry factor restrictions; feasibility filtering may tighten those factors. It may return empty only when no predecessor exists. The source expression shall remain unchanged.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Backward substitution requires existential predecessor semantics; an overwrite cannot retain a constraint on the previous value of its overwritten coordinate.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void affine_preimage(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Use exact predecessor witnesses and independent inverse maps, including positive/negative self coefficients, constants and assignments independent of the old coordinate. Check consistency versus impossibility, conservative noninvertible precision, open bounds, empty/lazy states and input rejection.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
Incoming link from: 4. Generalized single-coordinate box preimage1
3. Generalized single-coordinate box image UID: PPL-SPEC-001023 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a valid coordinate k, dimension-compatible affine expression e, nonzero coefficient d and admitted comparison ⋈ , the variable overload of generalized_affine_image shall enclose every z for which an entry point x satisfies zk ⋈ e(x) ⁄ d and zi = xi for i ≠ k. It shall retain every other coordinate's entry factor. Equality shall have the behavior in 🔗 1. Single-coordinate affine box image. A one-sided relation shall retain the required finite outer bound and remove the opposite finite bound, using outward approximation and supported endpoint openness. With exact rational endpoint operations and supported openness, the result shall be the least Cartesian box for the specified relation: the target factor shall use the exact required extremum and its attainment. This shall not promise the exact relational image or a least result under inexact arithmetic.
The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Generalized assignment describes a relation on the new value of one coordinate, while the other coordinates remain unchanged.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void generalized_affine_image(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator=Coefficient_one());
VERIFICATION_CRITERIA: Check exact rational old/new point pairs for all five admitted symbols, both denominator signs, strict endpoints, self and other-coordinate dependencies, unbounded factors, equality agreement, empty states, disequality rejection and dimension/zero-denominator errors.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
4. Generalized single-coordinate box preimage UID: PPL-SPEC-001024 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For arguments and relation symbols admitted by 🔗 3. Generalized single-coordinate box image, the variable overload of generalized_affine_preimage shall enclose every predecessor x for which some entry-box point z satisfies zk ⋈ e(x) ⁄ d and zi = xi for i ≠ k. The result shall follow existential backward semantics, including reversal of a comparison when algebraically dividing by a negative coefficient. Equality shall retain 🔗 2. Single-coordinate affine box preimage. Noninvertible relations may forget predecessor information and shall not claim a least box result. Only infeasibility of the relation with the entry box shall permit an empty result. Every coordinate other than the updated one shall preserve its entry factor restriction; feasibility filtering may tighten that factor.
The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Backward reasoning must use the primed/unprimed relation and the sign of its coefficients, rather than simply reversing an assignment.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void generalized_affine_preimage(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator=Coefficient_one());
VERIFICATION_CRITERIA: Construct independent rational predecessor/successor witnesses for all admitted relations, negative divisors and self coefficients, zero self coefficient, impossible constants, open bounds and unbounded values. Verify equality agreement and all argument rejections.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
Incoming link from: 6. Generalized multi-coordinate box preimage1
5. Generalized multi-coordinate box image UID: PPL-SPEC-001025 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For dimension-compatible affine expressions l, r and an admitted comparison ⋈ , the expression overload of generalized_affine_image shall enclose every z for which an entry point x satisfies l(z) ⋈ r(x). For each coordinate absent from the homogeneous part of l, zi = xi shall additionally hold. A zero coefficient shall therefore leave a coordinate unchanged, irrespective of its explicit ambient dimension. When the left expression contains a coordinate, factors outside its nonzero support shall retain their entry represented sets. When the left expression is constant, the result may refine these unchanged factors within the entry box to enforce the relation.
Coordinates occurring on the left are updated together. The same coordinate may also occur on the right, where it denotes its entry value. Exchanging the two expressions and reversing the comparison shall not be treated as an equivalent update. An enclosure may lose correlations or retain infeasible points; no least box result shall be promised.
The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.
An expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Primed left-hand coordinates and unprimed right-hand coordinates give an asymmetric simultaneous-update relation.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void generalized_affine_image(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs);
VERIFICATION_CRITERIA: Enumerate independent rational old/new pairs with several left coordinates, shared and disjoint left/right coordinates, constant sides, zero coefficients, every admitted comparison and explicit dimensions. Check unchanged coordinates, sound enclosures, empty states and rejection of incompatible/disequality inputs.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
6. Generalized multi-coordinate box preimage UID: PPL-SPEC-001026 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For the expression relation and admitted arguments in 🔗 5. Generalized multi-coordinate box image, the expression overload of generalized_affine_preimage shall enclose every x for which an entry-box point z satisfies l(z) ⋈ r(x) and zi = xi at every coordinate whose coefficient in l is zero. It shall use the left expression for successor values and the right expression for predecessor values, even when their coordinate sets overlap. At coordinates outside the original left expression's nonzero support, the result shall retain the entry factor restrictions, permitting sound tightening.
The result may lose constraints during existential abstraction and need not be the least box preimage. It shall not exclude a feasible predecessor or make the result empty merely because a relational predecessor set cannot be represented exactly. Const descriptors shall remain unchanged.
The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.
An expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: A simultaneous relation requires existential predecessor abstraction with the original primed-coordinate convention intact.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void generalized_affine_preimage(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs);
VERIFICATION_CRITERIA: Use rational successor witnesses to check predecessor inclusion for shared/disjoint coordinate supports, constant left/right sides, all comparisons and signs, empty and unbounded boxes, preservation of input expressions and dimension/disequality rejection.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
Incoming link from: 8. Bounded affine box preimage1
7. Bounded affine box image UID: PPL-SPEC-001027 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a valid coordinate k, dimension-compatible affine lower and upper expressions l, u, and nonzero coefficient d, bounded_affine_image shall enclose all successor vectors z from entry points x satisfying l(x) ⁄ d ≤ zk ≤ u(x) ⁄ d and zi = xi for i ≠ k. A negative denominator shall keep these divided lower/upper meanings; it shall not silently exchange the supplied expressions.
The operation may refine feasibility of the lower/upper relation before updating the coordinate. Inconsistent divided bounds shall admit no successor, while partial feasibility shall retain all feasible successors. Conservative refinement and interval evaluation may lose precision; no least box enclosure shall be promised. The supplied expressions shall retain their values. Every coordinate other than the updated one shall preserve its entry factor restriction; feasibility filtering may tighten it.
With exact rational interval endpoints and two constant bound expressions, a nonempty input shall produce exactly the divided closed interval at the updated coordinate, retaining the other entry factors, when the divided lower bound does not exceed the divided upper bound. Reversed divided bounds shall produce empty. This special case shall not establish a general least-box guarantee for variable-dependent bounds.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Both bounds refer to the same predecessor state, so their ordering and dependencies must be retained when defining feasible successors.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void bounded_affine_image(Variable var, const Linear_Expression& lb_expr, const Linear_Expression& ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one());
VERIFICATION_CRITERIA: Check independent rational predecessor/successor pairs for both denominator signs, constants, affine bounds with/without the overwritten coordinate, intersecting or contradictory bounds, strict source factors, unbounded values, empty states and invalid arguments.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
8. Bounded affine box preimage UID: PPL-SPEC-001028 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For the bounded affine relation and arguments in 🔗 7. Bounded affine box image, bounded_affine_preimage shall enclose all predecessors x for which an entry-box successor z satisfies l(x) ⁄ d ≤ zk ≤ u(x) ⁄ d and zi = xi for i ≠ k. Both inequalities shall constrain the same successor value. Negative denominators and coefficients shall retain the mathematically required comparison directions. The result may lose precision through existential abstraction and need not be the least box preimage. It shall retain every feasible predecessor; only an infeasible relation may yield empty. Coordinates other than the updated one shall preserve the entry factor restrictions, permitting sound tightening by feasibility filtering.
With exact rational interval endpoints and two constant bound expressions, the result for a nonempty entry box shall be empty exactly when the divided closed interval is empty or has no point in common with the entry target factor. Otherwise, the old target coordinate shall become unconstrained and every other factor shall equal its entry factor. The entry factor's open endpoints shall govern whether a contact point is a common witness. This special case shall not establish a general least-box guarantee.
A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Backward bounded assignment must retain a common successor witness for its lower and upper inequalities.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void bounded_affine_preimage(Variable var, const Linear_Expression& lb_expr, const Linear_Expression& ub_expr, Coefficient_traits::const_reference denominator=Coefficient_one());
VERIFICATION_CRITERIA: Check rational predecessor witnesses against an independent two-inequality model, with positive/negative denominators and coefficients, self/other dependencies, constant and inconsistent bounds, open/unbounded successor factors, empty states and rejection paths.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
9. Interval-coefficient affine box image UID: PPL-SPEC-001029 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a valid coordinate k and dimension-compatible Linear_Form<ITV> with nonempty bounded coefficient intervals, affine_form_image shall require a supported native floating boundary profile. It shall enclose every successor obtained from an entry point x by replacing coordinate k with a value of B + ∑iAixi, where the constant B and coefficients Ai are chosen from the supplied form's intervals. Every other coordinate shall retain its entry factor.
The range shall use outward interval arithmetic on the entry box, including the old value of the replaced coordinate wherever it occurs. Neither successive occurrences nor coordinate choices shall create an exactness claim beyond that interval enclosure. The form shall remain unchanged and an empty box shall remain empty. Dimension checks shall occur even for an empty receiver. An exact-arithmetic boundary profile shall not be an admitted instantiation of this floating-boundary interface.
An expression of greater ambient dimension or an invalid selected coordinate shall throw std::invalid_argument before replacement, including on empty input.
The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: An interval linear form carries an enclosure of possible assignment expressions, whose evaluation must remain sound after projection into a Cartesian domain.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void affine_form_image(Variable var, const Linear_Form<ITV>& lf);
VERIFICATION_CRITERIA: Use exact rational coefficient and coordinate samples under every available native boundary format in its required initialized FPU mode, checking direction preservation. Check constant/trailing dimensions, uncertain signs and zero coefficients, self-dependence, outward non-dyadic bounds, unchanged other factors and form, empty/lazy states, dimension rejection and compile-time boundary admission.
BIBLIOGRAPHY: Mine04 | Section 5, interval linear forms and intervalization (PDF page index 6, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.
-
1. Threshold box widening and finite stabilization UID: PPL-SPEC-001034 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A Cartesian widening needs a sound coordinate rule and a finite endpoint progression under its actual operand order.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T, typename Iterator> requires (std::is_same_v<T, Box<ITV>> && std::is_convertible_v<const ITV&, const Interval_Base&>) void CC76_widening_assign(const T& y, Iterator first, Iterator last);
VERIFICATION_CRITERIA: Independently enumerate nested products with strict/closed endpoints, rays, zero-dimensional values and classified/lazy emptiness. Compute predecessor/successor thresholds from mathematical sets, including exact hits, duplicate thresholds and empty ranges. Exercise pointer, vector and bidirectional-list iterators, self-aliasing, unchanged inputs and ranges, dimensional rejection and ascending recurrences. Inspect the finite-coordinate convergence argument separately from sample iterations.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2, Widening (PDF page index 4, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.
-
2. Default box widening and precision-sensitive delay tokens UID: PPL-SPEC-001035 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A delay budget should preserve precision when widening would lose it, while keeping the number of postponed losses finite.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T> requires (std::is_same_v<T, Box<ITV>> && std::is_convertible_v<const ITV&, const Interval_Base&>) void CC76_widening_assign(const T& y, unsigned* tp = nullptr); void widening_assign(const Box& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Compare the default overload and wrapper with an independent five-threshold model. Check null, zero, one and larger budgets; exact versus strictly enlarging results; repeated calls; empty and zero-dimensional cases; self-aliasing and source preservation. Verify counter changes and ascending histories through budget exhaustion, including arbitrarily many exact calls. Check mismatch rejection before counter replacement.
BIBLIOGRAPHY: BagnaraHRZ05SCP | Section 7, widening with tokens (PDF page index 29, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.
-
3. Box extrapolation with selected limiting constraints UID: PPL-SPEC-001036 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A fixed set of satisfied coordinate limits can recover precision discarded by widening while preserving both input sets.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void limited_CC76_extrapolation_assign(const Box& y, const Constraint_System& cs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Independently select satisfied unary constraints from exact entry products, construct their coordinate enclosure and intersect it with the independently modeled delayed widening. Include equalities, strict and non-strict bounds, scaled rows, ignored relational/constant constraints, violated limits, repeated limits, inexact endpoint conversions and token changes. Check fixed-limit ascending recurrences and the finite candidate-bound argument. Check input preservation, aliasing, classified/lazy empty states, zero dimensions and rejection of dimension errors before mutation. Create lazy empty factors without querying or copying the box before the call. Check strict bounds on empty and zero-dimensional inputs without changing the represented set or counter.
BIBLIOGRAPHY: BagnaraHRZ05SCP | Section 7, fixed finite limiting constraints and convergence caveat (PDF page index 30, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/limitedcc76extrapolation1.cc.
-
4. Box narrowing with complete previous-boundary retention UID: PPL-SPEC-001037 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000445 Narrowing and descending precision recovery (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: Recovering a finite bound from a previously unbounded approximation must preserve the complete boundary of every already finite previous constraint.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T> requires (std::is_same_v<T, Box<ITV>> && std::is_convertible_v<const ITV&, const Interval_Base&>) void CC76_narrowing_assign(const T& y);
VERIFICATION_CRITERIA: Independently choose complete boundary descriptors from nested rational products. Cover every open/closed equality case, strict and unequal finite endpoints, all combinations of unbounded sides, singleton factors, empty/lazy states, zero dimensions and self-aliasing. Check both inclusions, source preservation, dimension rejection before mutation, descending histories and finite-boundary stabilization. Reuse the open-endpoint regression histories as well as fresh independently enumerated cases.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76narrowing1.cc.
-
1. Box construction from supported constraints UID: PPL-SPEC-001044 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000013 Meaning of linear constraints (Specifies)
- PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(cs) shall construct the coordinate enclosure obtained by conjoining the constraints in cs with a universe box of the same ambient dimension, using the admitted row forms and endpoint interpretation in 🔗 1. Addition of optimally supported box constraints. With exact rational endpoints and supported openness, the result shall equal the conjunction of admitted rows. Rounded profiles shall preserve the specified outward endpoint enclosure, without a general optimality claim for inexact arithmetic. An empty system shall produce universe. A constant false row shall produce empty. With exact rational operations, every inconsistent admitted conjunction shall produce empty. Under inexact endpoint conversion, successive row enclosures may lose enough information to leave an inconsistent conjunction undetected.
A non-interval row, or a nontrivial strict inequality when the selected interval policy cannot retain open boundaries, shall throw std::invalid_argument. Rejection shall still occur if an earlier admitted row already made the conjunction empty. Tautological and inconsistent constant rows shall retain their declared meanings.
Construction from an rvalue system shall have the same result and rejection behavior. Its const source shall not be consumed or have its rows removed.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: A coordinate-constraint conjunction directly describes an interval product, but construction must retain row admission and empty-system distinctions.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Constraint_System& cs);
VERIFICATION_CRITERIA: Use an independent rational conjunction model for unary equalities, weak/strict inequalities, scaled rows, contradictions, constants and zero dimensions. Check lvalue/rvalue agreement, source value preservation, finite-profile outward conversion and every unsupported-row rejection, including after a contradiction.
SOURCE: tests/recyclingconstructors1.cc; src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc.
-
2. Box construction from supported congruences UID: PPL-SPEC-001045 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000014 Meaning of linear congruences (Specifies)
- PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(cgs) shall construct the coordinate enclosure obtained by conjoining the congruences in cgs with a universe box, using the admitted forms in 🔗 2. Addition of optimally supported box congruences. Nontrivial unary equalities shall constrain the corresponding coordinate to their rational solution, with target endpoint conversion as declared. Tautological rows shall have no effect and inconsistent rows shall produce empty. An empty system shall produce universe. With exact rational interval endpoints, admitted equalities shall be represented exactly.
A non-interval equality or a nontrivial proper congruence shall throw std::invalid_argument, including after an earlier row has made the conjunction empty. A proper congruence whose meaning is tautological or inconsistent shall retain that meaning instead of being rejected merely because its modulus is nonzero.
Construction from an rvalue system shall have the same result and rejection behavior; its const source shall retain its rows and value.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: A box can express coordinate equalities and the two constant truth values without representing a nontrivial periodic lattice.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Congruence_System& cgs);
VERIFICATION_CRITERIA: Check independent rational solutions of admitted unary equalities, fractions, negative scaling, contradictory coordinates, trivial proper congruences and zero dimensions. Compare both overloads, preserve sources and reject unsupported rows even after inconsistency.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc.
-
3. Cartesian enclosure of a polyhedral generator system UID: PPL-SPEC-001046 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000015 Distinct meanings of geometric generators (Specifies)
- PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(gs) shall contain the polyhedral set generated by gs with the point, closure-point, ray and line meanings in 🔗 1. Generator kinds and numerical prerequisites and 🔗 15. Generator-system hull meaning and construction. For exact rational endpoint operations and supported openness, the result shall be its least Cartesian box.
At a coordinate not made unbounded by directions, the finite extrema shall be those of the generator points and closure points. Such an extremum shall be included exactly when an ordinary point attains it; a closure point alone shall not include that endpoint. A ray with a nonzero component shall remove the bound in that component's sign direction. A line with a nonzero component shall remove both coordinate bounds. Zero components shall not change other factors. Inexact endpoint profiles shall provide outward enclosures of these coordinate ranges.
An empty generator system shall produce empty with the inherited dimension. A nonempty system with no ordinary point shall throw std::invalid_argument. A point in dimension zero shall generate the unique empty tuple. Construction from an rvalue system shall have the same result, rejection and source preservation as ordinary construction.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: Independent coordinate extrema give the Cartesian enclosure of a generated convex set, while closure points distinguish finite excluded endpoints from attained ones.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Generator_System& gs);
VERIFICATION_CRITERIA: Compute exact rational extrema and point attainment independently from raw point/closure-point coordinates and ray/line signs. Include fractions with different divisors, repeated extrema, orthogonal directions, empty and zero-dimensional systems, both overloads, profile conversion and rejection of nonempty systems without a point.
BIBLIOGRAPHY: BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/fromgensys1.cc.
-
4. Box conversion from bounded-difference shapes UID: PPL-SPEC-001047 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(bds,complexity) shall contain the set represented by the bounded-difference shape. Each coordinate shall use the lower and upper unary bounds implied by the source constraints. Nonempty finite extrema shall be included, since the source carrier is topologically closed. Unbounded coordinates shall retain the corresponding unbounded sides. Empty and zero-dimensional sources shall retain their set meanings.
When the source closure and target endpoint operations are exact, including the rational-bound profile, the result shall be the least Cartesian box containing the source. Inexact source closure arithmetic or target endpoint conversion shall retain outward containment without a general best-box guarantee. The selected Complexity_Class value shall not change this constructor's mathematical result or its polynomial closure algorithm; all three declared complexity values shall be admitted.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: Implied unary difference bounds determine the coordinate projections, including bounds that are absent from the original syntactic row list.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T> explicit Box(const BD_Shape<T>& bds, Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
VERIFICATION_CRITERIA: Independently project rational difference-constraint systems, including chains and cycles, to obtain coordinate extrema. Compare fresh/cached sources, empty/universe and zero dimensions, closure-derived bounds, every complexity value and target numeric profiles. Check source value preservation and directed finite conversion.
BIBLIOGRAPHY: BagnaraHZ09FMSD | Section 3.1, unary zero-node encoding and transitive closure (PDF page index 5, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frombdshape1.cc.
-
5. Box conversion from octagonal shapes UID: PPL-SPEC-001048 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000061 Octagonal expressiveness (Specifies)
- PPL-LLR-000062 Conservative octagonal constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(oct,complexity) shall contain the set represented by the octagonal shape. Coordinate bounds shall use the implied unary signed constraints, including the division by two required for bounds on 2*x or -2*x. Nonempty finite extrema shall be included; unbounded sides, empty sources and zero-dimensional set meanings shall be retained.
When source closure arithmetic and target endpoint operations are exact, including the rational-bound profile, the result shall be the least Cartesian box containing the source. Inexact closure or endpoint arithmetic shall retain an outward enclosure without a general optimality promise. The three declared complexity values shall be admitted, and the complexity argument shall not change this constructor's mathematical result or its polynomial closure algorithm.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: Signed-sum constraints imply unary extrema whose factor of two must be preserved when projecting into coordinate intervals.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T> explicit Box(const Octagonal_Shape<T>& oct, Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
VERIFICATION_CRITERIA: Use independent rational projection of signed-sum systems and compare every coordinate extremum, including half-integral bounds. Cover all sign combinations, implied chains, inconsistent and unbounded cases, fresh/cached sources, dimensions, complexity arguments and outward target profiles.
BIBLIOGRAPHY: BagnaraHZ09FMSD | Section 4, signed forms, factor of two and strong closure (PDF page indices 9–10, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frombdshape1.cc.
-
6. Complexity-sensitive box conversion from polyhedra UID: PPL-SPEC-001049 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(ph,complexity) shall contain the source polyhedron under each of ANY_COMPLEXITY, SIMPLEX_COMPLEXITY and POLYNOMIAL_COMPLEXITY. The default shall be ANY_COMPLEXITY. Other complexity codes shall be outside the admitted interface.
With ANY_COMPLEXITY, exact rational endpoint arithmetic and supported openness, the result shall be the least Cartesian box, including endpoint attainment for not necessarily closed polyhedra and exact preservation of emptiness. Inexact target profiles shall retain their declared outward enclosure.
With SIMPLEX_COMPLEXITY and exact rational operations, a nonempty source shall have exact coordinate infima and suprema, but a finite unattained bound may be included. A topologically closed source shall therefore have its least Cartesian box in the exact rational target profile. The operation need not detect an empty not necessarily closed system whose closed relaxation is nonempty. A more precise result obtained from an already available generator representation shall also be admitted.
With POLYNOMIAL_COMPLEXITY, the constructor may use a bounded constraint-propagation computation whose pass budget grows linearly with the space dimension and which stops early when coordinates cease changing. The resulting box shall remain a containing approximation; no general least-box, fixed-point propagation, exact emptiness detection or implementation-specific iteration-count guarantee shall be inferred. Available equivalent source representations may yield different allowed approximations. Each complexity option shall retain the corresponding declared algorithmic complexity bound.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. On success and when construction throws, a source shall retain a valid representation of its unchanged value; logically const normalization may update its caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: A conversion budget may trade optimal coordinate projections for conservative propagation. A dimension-dependent budget accommodates long bound-dependency chains, while a finite cutoff also terminates on asymptotically contracting cycles. Strict endpoint attainment additionally distinguishes open boxes from their closures.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Polyhedron& ph, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Project independently encoded rational closed/NNC polyhedra using exact elimination. Require the least open box for ANY, exact finite extrema with optional endpoint closure for nonempty SIMPLEX inputs, and sound containment for POLYNOMIAL inputs. Include correlated systems, closed-relaxation-only feasibility, cache/representation histories, all complexity values, source preservation and target profile conversion. Include polynomial conversions of long lower/upper bound chains, strict seeds, variable and row permutations, dense and sparse storage, and a rational cycle that cannot reach its fixed point in finitely many propagation passes. Sweep each measured C++ allocation failure position during pending-constraint integration and fresh constraint-backed minimization, including existing and discovered affine equalities, dense and sparse representations, and closed and NNC sources. Check source validity before retrying, unchanged geometry against the entry conjunction, and a successful retry against independently derived exact coordinate bounds.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; src/Polyhedron_defs.hh; src/Polyhedron_nonpublic.cc; src/Polyhedron_minimize_templates.hh; src/Polyhedron_simplify_templates.hh; tests/polyhedronconstraintconversionfailure1.cc; tests/throw_on_allocation.hh; tests/Box/frompolyhedron1.cc; tests/Box/frompolyhedron2.cc.
-
7. Cartesian enclosure of a rational grid UID: PPL-SPEC-001050 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(gr,complexity) shall contain the rational grid. A coordinate whose value is fixed throughout a nonempty grid shall be constrained to that rational value, with target endpoint conversion as specified. If a line or an integer-parameter direction varies that coordinate, its projection shall be unbounded in both directions. Correlations and periodic gaps shall not become additional Cartesian restrictions.
With exact rational interval endpoints the result shall be the least Cartesian box of the grid. Finite inexact target profiles shall provide the outward coordinate enclosure. Empty grids and zero-dimensional empty/universe shall retain their set meanings. All three declared complexity values shall be admitted; the argument shall not change the mathematical result or the polynomial generator-based computation.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: A rational grid coordinate is either fixed or ranges without a finite lower or upper bound; a box cannot retain periodic gaps or cross-coordinate congruences.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Grid& gr, Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
VERIFICATION_CRITERIA: Derive exact coordinate projections from independent rational base points, real line directions and integer parameter directions. Include fractional fixed coordinates, non-axis-aligned generators, finite-index lattice correlations, redundant descriptions, fresh/cached congruence/generator states, empty/zero dimensions, complexity options and outward target conversion.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9–10, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/fromgrid1.cc.
-
8. Box conversion from partially reduced products UID: PPL-SPEC-001051 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000074 Intersection meaning of product domains (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(dp,complexity) shall convert each component domain of dp into the target box profile under the supplied admitted complexity value, then take their same-profile box intersection. The result shall contain every point in the product's represented component intersection. Each component conversion shall retain its own admission, numerical and complexity prerequisites.
Even when both component conversions are individually least, their box intersection need not be the least box of the product: constraints correlating coordinates across components may be lost. No additional reduction or global optimality guarantee shall be inferred. Empty component enclosures shall yield empty; an empty semantic product whose separate component boxes overlap may yield a nonempty approximation. The default complexity value shall be ANY_COMPLEXITY.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: Projecting separate component sets and then intersecting coordinate enclosures is sound, while shared relational information can make the exact product projection smaller.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename D1, typename D2, typename R> explicit Box(const Partially_Reduced_Product<D1,D2,R>& dp, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Independently construct component Cartesian enclosures and intersect them. Include agreeing/conflicting coordinate bounds, relational intersections tighter than the intersection of hulls, empty and zero-dimensional products, several reductions/components, all admitted complexity values and source value preservation.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frompartiallyreducedproduct1.cc.
-
1. Dimension-preserving box coordinate forgetting UID: PPL-SPEC-000961 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a nonempty box, forgetting a selected coordinate shall replace its factor by the selected interval profile's universe, leaving every other factor and the ambient dimension unchanged. Forgetting a set of coordinates shall apply that meaning to all selected positions. The result shall exactly denote existential elimination of those values with the same positions restored as unrestricted coordinates. An empty source shall remain empty, including when emptiness is carried only by a factor being forgotten. Forgetting no coordinates shall preserve the value.
An out-of-dimension variable, or any member of a selected set outside the ambient dimension, shall throw std::invalid_argument. This validation shall apply also to empty boxes. Valid coordinate selections shall use the coordinate identity and lifetime rules for Variable and Variables_Set.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Forgetting values retains coordinate identity and differs from deleting coordinate positions.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void unconstrain(Variable var); void unconstrain(const Variables_Set& vars);
VERIFICATION_CRITERIA: Compare all coordinate subsets of independent small Cartesian products; retain empty sources with a selected or unselected empty factor, zero-dimensional empty/universe, ambient dimensions and untouched factors. Check single-coordinate/set equivalence and invalid selections.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
2. Unrestricted and zero-fixed box coordinate extension UID: PPL-SPEC-000962 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000418 Distinguished coordinate extensions (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Adding m coordinates shall preserve every old coordinate in its original position and append the new coordinates at the highest indices. add_space_dimensions_and_embed(m) shall append unrestricted factors. add_space_dimensions_and_project(m) shall append factors containing exactly zero. Each completed result shall exactly denote the corresponding Cartesian extension. Empty sources shall remain empty, including empty zero-dimensional sources; zero-dimensional universe shall extend to the corresponding unrestricted or zero-fixed product. Adding zero coordinates shall preserve the value.
If the resulting ambient dimension would exceed max_space_dimension(), the operation shall throw std::length_error before attempting coordinate allocation of that size. Successful dimensions shall remain subject to resource availability.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Unrestricted extension and extension fixed to zero represent different sets.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void add_space_dimensions_and_embed(dimension_type m); void add_space_dimensions_and_project(dimension_type m);
VERIFICATION_CRITERIA: Compare literal unrestricted and zero-factor suffixes in dimensions zero through three, nonempty/empty sources and lazy empty factors. Check no-op calls, coordinate order and dimension overflow rejection without large allocation.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
3. Ordered Cartesian box concatenation UID: PPL-SPEC-000963 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: concatenate_assign(y) shall replace the destination by the exact Cartesian product of its entry value and y's entry value, with destination coordinates preceding source coordinates. The ambient dimensions shall add. Either empty operand shall make the result empty. Zero-dimensional universe shall act as the identity on either side; zero-dimensional empty shall retain its empty-set meaning.
A distinct source shall remain unchanged. Self-concatenation shall be admitted and shall use the entry factors twice, with independently mutable factor storage after success. The two tuples in a self-product shall be chosen independently. Dimension overflow shall throw std::length_error; successful dimensions shall remain subject to allocation/resource availability.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Cartesian composition must preserve operand order and separate the values selected for each tuple.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void concatenate_assign(const Box& y);
VERIFICATION_CRITERIA: Compare ordered factor sequences of independently chosen boxes, empty and zero-dimensional operands, lazy emptiness on either side and self-products. Mutate original/appended coordinates after success to check independent storage and retained sources.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
4. Selected-coordinate box projection and compaction UID: PPL-SPEC-000964 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000417 Coordinate removal and existential projection (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: remove_space_dimensions(vars) shall existentially project away exactly the selected coordinates. Surviving factors shall retain their relative order and shall receive contiguous indices starting at zero. The resulting dimension shall be the entry dimension minus the selected set's cardinality. For boxes this projection shall be exact. Empty sources shall remain empty, even if the only empty factor is removed. Removing every coordinate from a nonempty box shall give zero-dimensional universe; removing every coordinate from empty shall give zero-dimensional empty. Removing no coordinates shall preserve the value.
A selected coordinate outside the entry ambient dimension shall throw std::invalid_argument, including for empty inputs.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Existential projection removes positions while preserving the order of surviving coordinates.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void remove_space_dimensions(const Variables_Set& vars);
VERIFICATION_CRITERIA: Enumerate coordinate subsets of independent factor vectors, including removal of every/no coordinate, empty factors at all positions and nonadjacent removed positions. Compare surviving order and zero-dimensional meaning; check invalid selections.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
5. Trailing-coordinate box projection UID: PPL-SPEC-000965 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000417 Coordinate removal and existential projection (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: remove_higher_space_dimensions(d) shall exactly project onto the first d entry coordinates. The ambient dimension shall become d and retained factors shall preserve order and values. An empty source shall remain empty regardless of which factors carried emptiness. Projection to dimension zero shall yield universe exactly for a nonempty source, and empty for an empty source. Requesting the current dimension shall preserve the value.
If d exceeds the entry ambient dimension, the operation shall throw std::invalid_argument. It shall not extend the box.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Trailing projection has the same empty-set semantics as general coordinate removal.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void remove_higher_space_dimensions(dimension_type d);
VERIFICATION_CRITERIA: Compare each prefix dimension against an independent existential projection, including zero/all retained coordinates, empty sources and emptiness stored only in a discarded factor. Check excessive-dimension rejection and agreement with selected-coordinate projection.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
6. Injective partial box coordinate remapping UID: PPL-SPEC-000966 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000419 Coordinate remapping semantics (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For entry ambient dimension n, the supplied mapping shall be a stable injective partial function on indices from zero through n-1, with image exactly the contiguous indices from zero through m-1 for some m no greater than n. The operation shall exactly project away unmapped coordinates and place each retained entry factor at its mapped index. The result shall have dimension m. Empty sources shall remain empty. An empty mapping shall give zero-dimensional universe for a nonempty source and zero-dimensional empty for an empty source. A zero-dimensional source shall retain its value.
The mapping object shall provide the protocol shown below. has_empty_codomain() shall report whether the map is nowhere defined; max_in_codomain() shall return the maximum image when nonempty; maps(i,j) shall report membership in the domain and, on true, assign the image to j. Whenever callbacks are used, the empty-codomain query shall precede the others, and a true result shall preclude maximum/image queries. No callback shall be required for a zero-dimensional source. Values and mapping callbacks shall meet their own resource, lifetime and synchronization prerequisites. A mapping violating the stated mathematical/protocol preconditions shall be outside the contract.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Coordinate remapping combines projection with a specified renaming, without conflating or duplicating coordinates.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
template <typename Partial_Function> void map_space_dimensions(const Partial_Function& pfunc); // Required const operations on the mapping argument: bool has_empty_codomain() const; dimension_type max_in_codomain() const; bool maps(dimension_type i, dimension_type& j) const;
VERIFICATION_CRITERIA: Compare partial injections, permutations, empty maps and removal-plus-permutation against independent factor-index vectors. Exercise callback ordering and short-circuiting with a protocol-checking adapter; retain empty/lazy-empty and zero-dimensional values. Check verified identity maps without temporary C++ allocation, unchanged cached representations and owned capacity after copying and grow/shrink histories. Compare first/last/middle swaps, reversal, cycles and projections against literal coordinate oracles; preserve floating-point mode/flags. Inject every mapping-query exception and check propagation, safe replacement and temporary cleanup.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc. tests/coordinatemappingfixture.hh; tests/Box/mapspacedims1.cc;
-
7. Box coordinate expansion and replica precision UID: PPL-SPEC-000967 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a valid existing coordinate var, expand_space_dimension(var,m) shall append m factors with the entry factor's value. Original coordinates shall retain their values and indices. Each new factor shall own independently mutable storage. The resulting box shall be the least Cartesian interval enclosure, in the selected factor profile, of the coordinate-expansion relation: the original selected value may be chosen independently of the replica value, while all replicas in a concrete expanded tuple use a common selected-factor value. The box enclosure may choose different values for different replicas. No original-to-replica equality shall be imposed. Empty sources shall remain empty. Adding no replicas shall preserve the value.
An out-of-dimension coordinate shall throw std::invalid_argument, including when m is zero or the box is empty. If the final dimension exceeds max_space_dimension(), the operation shall throw std::length_error. Successful dimensions shall remain subject to resource availability.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Box expansion copies admissible coordinate values; the Cartesian representation abstracts relationships among multiple replicas.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void expand_space_dimension(Variable var, dimension_type m);
VERIFICATION_CRITERIA: Compare appended factors against independent entry-factor copies for zero/one/multiple replicas, singleton/nonsingleton factors and empty sources. Include tuples with distinct replica values in the abstract enclosure and distinct original/replica values in the concrete relation. Check storage independence, invalid coordinates and overflow.
BIBLIOGRAPHY: GopanDMDRS04 | Whole work (background on expansion and folding of summarized dimensions).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
8. Box coordinate folding and interval enclosure UID: PPL-SPEC-000968 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a valid destination coordinate dest and selected set vars that excludes it, folding shall replace the destination factor by the least interval of the selected profile containing the union of its entry factor and all selected entry factors. It shall then remove the selected coordinates, compacting the remaining positions in their original order. Other retained factors shall preserve their entry values. This shall be the least box enclosure of the alternatives obtained by choosing either the original destination or one selected coordinate for the surviving destination value. Gaps between those alternatives may be included by the interval hull. Empty sources shall remain empty. An empty selected set shall preserve the value.
An out-of-dimension destination or selected coordinate, or inclusion of the destination in the selected set, shall throw std::invalid_argument. Destination validity shall be required even for an empty selected set and for an empty box.
The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Folding combines coordinate alternatives and removes their positions; interval enclosure makes its precision explicit.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:
void fold_space_dimensions(const Variables_Set& vars, Variable dest);
VERIFICATION_CRITERIA: Compute interval union hulls independently, including disjoint factors, tied extrema with different endpoint openness, unbounded factors, destination shifts after removal and multiple/nonadjacent selected positions. Compare untouched factors, empty/lazy-empty and zero-selection values; check all invalid selection classes.
BIBLIOGRAPHY: GopanDMDRS04 | Whole work (background on expansion and folding of summarized dimensions).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.
-
1. Exact topological closure of boxes UID: PPL-SPEC-001038 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000425 Topological closure and closure approximation (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: topological_closure_assign() shall replace the receiver by its exact topological closure over the ordinary real carrier. It shall include each finite boundary point of a nonempty factor while preserving that boundary's value and retaining unbounded directions. Empty, including a product with an unclassified empty factor, shall remain empty. The ambient dimension shall remain unchanged. The operation shall be idempotent and shall preserve an already closed box. A closed-only interval profile shall not introduce a distinct value merely because no openness bits are stored.
Finite endpoint closure and policy admission shall follow 🔗 5. Interval closure and endpoint exclusion; closing factors shall not turn an empty product into a nonempty one.
The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Exceptions escaping a delegated interval operation may leave a partly updated receiver; no aggregate rollback shall be inferred.
RATIONALE: A finite Cartesian product of nonempty real intervals has the product of their closures; the empty case must be treated separately.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void topological_closure_assign();
VERIFICATION_CRITERIA: Compare exact rational Cartesian closures for strict, closed, half-open, singleton, unbounded, classified and lazy-empty factors in dimensions zero through three. Check containment, endpoint identity, idempotence and ambient dimension. Instantiate open-capable and closed-only numerical profiles; check active native endpoint payloads and valid calls without extra Init.
SOURCE: src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc.
-
2. Least box enclosure of nonnegative real-time progression UID: PPL-SPEC-001039 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For the receiver's entry set X and the argument's entry set Y of the same ambient dimension, time_elapse_assign(y) shall replace the receiver by the least box of its admitted interval profile containing
{x + ty ∣ x ∈ X, y ∈ Y, t ∈ ℝ, t ≥ 0}.The progression parameter shall be one common nonnegative real number for all coordinates. The result shall be the Cartesian enclosure of this progression set; it need not preserve relationships induced by the common time. Where the interval profile can express the exact coordinate ranges, the enclosure shall be exact as a box. Zero time shall preserve every entry receiver point when the direction set is nonempty. If either entry set is empty, the result shall be empty, including in dimension zero. Finite extremal values retained from the receiver shall retain their inclusion or exclusion, and unbounded progression shall be represented as an unbounded coordinate direction.
The ambient dimension shall remain unchanged. A distinct y shall retain its set and dimension; self-aliasing shall use both entry sets. Unequal ambient dimensions shall throw std::invalid_argument before modifying the receiver, including when either operand is empty.
The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Dimension-error reporting shall retain the context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical or allocation exceptions may leave a partly updated receiver; no aggregate rollback shall be inferred.
RATIONALE: A shared progression time can create relations between coordinates even when states and directions are boxes; the least Cartesian enclosure must distinguish that loss of correlation from unsoundness.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void time_elapse_assign(const Box& y);
VERIFICATION_CRITERIA: Construct an independent positive-time homogenized rational constraint system, eliminate state, displacement and time coordinates, and combine its coordinate ranges with zero-time states. Check all signs, zero rates, strict zero endpoints, finite and unbounded directions, fractional states, empty/lazy states, dimension zero, common-time correlation loss, self-aliasing, distinct-source preservation and dimension errors before mutation. Check native endpoint profiles without requiring rounded arithmetic absent from the operation.
BIBLIOGRAPHY: HalbwachsPR97 | Sections 4.3.1–4.3.2, time-elapse operator; PDF page index 20 (zero-based).
SOURCE: src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc; tests/Box/timeelapse1.cc.
-
3. Selected-coordinate integer-point normalization of boxes UID: PPL-SPEC-001040 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: drop_some_non_integer_points(complexity) shall normalize every factor; drop_some_non_integer_points(vars,complexity) shall normalize exactly the selected coordinates. The result shall introduce no point outside the entry box and shall preserve every entry point integral on the selected coordinates. Unselected factors and the ambient dimension shall retain their meanings. An empty selection shall preserve the box; an empty receiver, including a product with a hidden empty factor, shall remain empty. Each admitted complexity argument shall have the same mathematical meaning for these Box operations.
For ordinary real factors satisfying the exact endpoint and unit-adjustment preconditions of 🔗 2. Interval endpoint normalization around integer points, each selected factor shall become the least interval hull of its integer points. A factor with no integer point shall make the product empty. A varying interval between distinct integer endpoints may retain noninteger interior points: the operation shall not change the underlying real carrier into an integer carrier. Selected unbounded directions shall retain their unbounded meaning. Normalization shall be idempotent. Closed factors with integral boundary storage shall already have the required endpoint meaning.
A selected variable outside the receiver dimension shall throw std::invalid_argument before modification, including for empty or closed-only boxes. The selected-coordinate set shall remain unchanged.
The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Dimension-error reporting shall retain the context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical or allocation exceptions may leave a partly updated receiver; no aggregate rollback shall be inferred.
RATIONALE: The Cartesian hull of selected-coordinate integer solutions tightens endpoint ranges while allowing real values between retained integers and leaving unselected coordinates unrestricted.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void drop_some_non_integer_points( Complexity_Class complexity = ANY_COMPLEXITY); void drop_some_non_integer_points( const Variables_Set& vars, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Enumerate independent integer candidates around every finite rational boundary and form their Cartesian interval hull, retaining analytically unbounded tails. Compare all coordinate selections and complexity values; check open integral and fractional endpoints, negative boundaries, no integer solution, unselected fractional factors, empty selection, lazy empty, dimension zero and idempotence. Check selected-source preservation and dimension exceptions, exact native open-capable endpoints and the closed-integral identity path under the delegated range prerequisites.
SOURCE: src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc.
-
1. Addition of optimally supported box constraints UID: PPL-SPEC-001016 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: add_constraint(c) shall admit a dimension-compatible linear constraint with at most one nonzero homogeneous coefficient. A nonconstant strict inequality shall additionally require a profile supporting open endpoints. The successful result shall enclose the intersection of the entry box and the constraint and remain contained in the entry box. With exact admitted endpoints and openness, that intersection shall be represented exactly; otherwise the affected factor shall use its least supported outward interval enclosure. Constant truth or falsity shall leave the value unchanged or make it empty, including the zero-dimensional cases.
A constraint of greater ambient dimension, a non-interval constraint, or an unsupported nonconstant strict inequality shall throw std::invalid_argument. The support checks shall still apply to an empty receiver. add_constraints(cs) shall apply the same obligations to the conjunction of all supplied constraints; a support error may follow earlier successful additions, so the system form shall not promise rollback. System ambient dimension, including unused trailing coordinates, shall be checked before refinement. Const descriptors shall retain their values.
add_recycled_constraints(cs) shall have the same mathematical result and shall leave the supplied mutable system safely destructible on ordinary or exceptional return. can_recycle_constraint_systems() shall return false. No right to reuse a recycled system's prior contents shall be inferred from this capability value.
The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Separable constraints can be enforced directly; unsupported relational information must be distinguished from an accepted conservative refinement.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void add_constraint(const Constraint& c); void add_constraints(const Constraint_System& cs); void add_recycled_constraints(Constraint_System& cs); static bool can_recycle_constraint_systems();
VERIFICATION_CRITERIA: Derive exact intersections for constant and one-coordinate constraints, both coefficient signs, fractional boundaries and all admitted strictness. Check closed-only profiles, non-interval rejection even on empty receivers, unused system dimensions, bulk partial failure, returned capability, recycled lifetime, preserved const donors and resource failure.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.
-
Incoming link from: 2. Box construction from supported congruences1
2. Addition of optimally supported box congruences UID: PPL-SPEC-001017 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: add_congruence(cg) shall admit a dimension-compatible equality congruence with at most one nonzero homogeneous coefficient, and constant tautological or inconsistent proper congruences. An equality shall have the same numerical enclosure as addition of its equivalent linear equality under 🔗 1. Addition of optimally supported box constraints. A tautology shall leave the receiver unchanged; an inconsistency shall make it empty. A nontrivial proper congruence or a relational equality shall throw std::invalid_argument, including when the receiver is already empty.
add_congruences(cgs) shall apply these obligations to the conjunction of its entries. The whole system's ambient dimension shall be checked before addition, even if its nonzero coefficients use fewer dimensions. Any input of greater ambient dimension shall throw std::invalid_argument. A bulk support error may follow earlier changes; no rollback shall be promised. Const congruences and systems shall retain their values.
add_recycled_congruences(cgs) shall give the same mathematical result and leave its supplied mutable system safely destructible on success or exception. can_recycle_congruence_systems() shall return false; the caller shall not rely on a recycled input retaining its prior contents.
The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: An interval product can enforce separable equalities directly but cannot generally express a periodic lattice constraint.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void add_congruence(const Congruence& cg); void add_congruences(const Congruence_System& cgs); void add_recycled_congruences(Congruence_System& cgs); static bool can_recycle_congruence_systems();
VERIFICATION_CRITERIA: Compare supported equalities with exact rational singleton intersections. Exercise true and false constant proper congruences, relational equalities, positive-modulus nontrivial rejection, both coefficient signs, empty/zero-dimensional boxes, system dimension and partial failures, recycled lifetime and const-source preservation.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.
-
3. Conservative box refinement by linear constraints UID: PPL-SPEC-001018 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a dimension-compatible constraint c, refine_with_constraint(c) shall produce a box X’ satisfying X∩{x : c(x)} ⊆ X’ ⊆ X, where X is the receiver's entry set. Unlike optimal addition, refinement shall admit relational constraints and strict constraints under closed-only profiles, using outward supported bounds where necessary. It shall not reject a constraint solely because its exact intersection is not a box.
A constant inconsistency shall make the box empty; a constant tautology shall preserve it. A separable constraint shall refine its affected factor; relational constraints shall propagate necessary coordinate bounds and need not yield the least box enclosure. Empty shall remain empty. refine_with_constraints(cs) shall perform at most one refinement step per constraint in one traversal, stopping early on detected emptiness. The result may depend on traversal order; no fixed-point or least-enclosure guarantee shall be inferred.
Dimension mismatch, including excess system ambient dimension, shall throw std::invalid_argument before replacement. The receiver's ambient dimension and the supplied const descriptors shall remain unchanged.
The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Sound coordinate refinement can use relational information without pretending that a Cartesian box represents its full conjunction exactly.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void refine_with_constraint(const Constraint& c); void refine_with_constraints(const Constraint_System& cs);
VERIFICATION_CRITERIA: Check exact satisfying rational valuations remain enclosed and that results stay within the entry box. Include equality and both inequalities, zero/nonzero coefficient signs, open and closed-only profiles, constants, unbounded factors, empty/lazy states, single-pass systems and order-sensitive examples, preserved descriptors and dimension errors.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc; tests/Box/refinewithconstraints2.cc.
-
4. Conservative box refinement by linear congruences UID: PPL-SPEC-001019 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a dimension-compatible congruence g, refine_with_congruence(g) shall produce X’ with X∩{x : g(x)} ⊆ X’ ⊆ X. An equality congruence shall use the linear-constraint refinement in 🔗 3. Conservative box refinement by linear constraints. A constant inconsistent proper congruence shall make the receiver empty. Other proper congruences may leave its box unchanged, retaining soundness without claiming an explicit lattice representation or periodic endpoint tightening.
refine_with_congruences(cgs) shall refine the conjunction by applying the supported per-entry refinement and may stop when emptiness is detected. It shall not require a fixed point or least box enclosure. Empty shall remain empty and zero-dimensional constants shall retain their logical meaning. Input congruences and systems shall remain unchanged. An input or system ambient dimension larger than the box dimension shall throw std::invalid_argument before replacement; the receiver dimension shall remain unchanged.
The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: A sound periodic-constraint refinement can retain the original interval product when a stronger periodic representation is unavailable.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void refine_with_congruence(const Congruence& cg); void refine_with_congruences(const Congruence_System& cgs);
VERIFICATION_CRITERIA: Check exact equality refinements, constant proper truths/falsities, nontrivial periodic constraints whose satisfying samples are retained, negative affine terms, bulk equalities and periodic combinations, empty/zero-dimensional cases, unused system dimensions and source preservation.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.
-
5. Controlled box constraint propagation UID: PPL-SPEC-001020 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For dimension-compatible linear constraints, propagation shall tighten coordinate bounds without deleting any entry point satisfying the supplied constraint or conjunction, and without enlarging the entry box. It shall accept equality and strict or nonstrict inequality constraints under the selected supported numerical profile, retaining required outward rounding and any openness the profile can represent. Constant contradictions shall make the box empty; tautologies and empty inputs shall retain their set meanings.
propagate_constraint(c) shall perform one propagation step for the constraint. propagate_constraints(cs, max_iterations) shall make at most max_iterations passes when that argument is positive, using each constraint at most once per pass unless emptiness is detected first. A pass leaving every interval unchanged shall terminate propagation early. A finite pass limit shall permit later calls to continue tightening the current box.
Zero, including the default argument, shall mean no pass limit and may lead to nontermination. Even reaching an unchanged pass shall not establish a least box enclosure of the conjunction. Traversal and intermediate rounding may affect the final precision. Greater constraint or system ambient dimension shall throw std::invalid_argument before replacement. The box dimension and const input descriptors shall remain unchanged.
The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.
RATIONALE: Propagation must retain sound bounds while giving callers an explicit finite-work control for recurrences that need not stabilize.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void propagate_constraint(const Constraint& c); void propagate_constraints(const Constraint_System& cs, dimension_type max_iterations=0);
VERIFICATION_CRITERIA: Use independent exact rational satisfying valuations and coordinate limits, all coefficient signs, fractional arithmetic, strict/open bounds, unbounded terms, constants, empty/lazy states and mismatches. Exercise one versus several finite passes, continuation, early stability and empty-system termination. Test unlimited mode only on proven terminating examples; analyze its absence of a general convergence promise. Exercise finite native operands whose intermediate arithmetic overflows to infinity. Check that discarding an unusable infinite candidate retains a sound entry enclosure, including strict and nonstrict numerical result relations.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc. tests/Box/propagateconstraints1.cc; tests/Box/propagateconstraints2.cc; tests/Box/refinewithconstraints2.cc.
-
1. Exact extraction of individual box boundaries UID: PPL-SPEC-001030 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a nonempty receiver and a variable var within its ambient dimension, has_lower_bound(var,n,d,closed) shall return true exactly when that factor has a finite lower boundary. On true, n ⁄ d shall be its exact infimum, with d > 0, coprime numerator and denominator, and denominator one when the numerator is zero. closed shall state whether that boundary belongs to the factor. has_upper_bound shall give the corresponding exact supremum and upper boundary inclusion. On false, all supplied output objects shall retain their values. Numerator and denominator outputs shall be distinct.
These calls shall require the stated nonempty and coordinate-validity preconditions; they shall not promise validation or a specified outcome outside them. The represented box and ambient dimension shall remain unchanged. The profile, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Finite endpoint conversion and coefficient assignment shall retain the selected numerical policy's range and exception conditions; an exception shall not imply rollback of outputs already assigned. Valid use shall impose no additional initialization requirement beyond the selected numerical facilities.
RATIONALE: Exact boundary values and inclusion distinguish an open extremum from an attained coordinate value.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
bool has_lower_bound(Variable var, Coefficient& n, Coefficient& d, bool& closed) const; bool has_upper_bound(Variable var, Coefficient& n, Coefficient& d, bool& closed) const;
VERIFICATION_CRITERIA: Use exact rational factors and independently decoded finite native endpoints. Check positive/negative/zero fractions, canonical signs, both open boundaries, one-sided and fully unbounded factors, unchanged sentinel outputs on false, source preservation and valid use without additional initialization. Exercise selected checked coefficient range failures separately from ordinary false results.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc.
-
2. Constraint and congruence exports of box values UID: PPL-SPEC-001031 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: constraints() shall return an owned, dimension-preserving constraint system whose conjunction denotes exactly the receiver. Finite coordinate boundaries shall retain their exact values and strictness; unconstrained coordinates shall not introduce restrictions. Empty, including an unclassified empty factor, shall export an inconsistent conjunction. Zero-dimensional universe shall export the tautological conjunction and zero-dimensional empty an inconsistent one.
minimized_constraints() shall return an equivalent system, using one equality for a singleton factor and the necessary finite endpoint constraints for a nonsingleton factor. The interface shall not require a particular row order or syntactic scaling.
congruences() and minimized_congruences() shall return owned, dimension-preserving congruence systems containing every receiver point. For a nonempty box, they shall express exactly the affine equalities fixing its singleton coordinates and shall impose no periodic restriction on varying factors. Empty shall export an inconsistent system. The two forms shall have the same mathematical meaning; no extra proper congruence precision shall be inferred from minimization.
The box's set and dimension shall remain unchanged and returned systems shall be independent values. The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Construction of output descriptors shall retain the initialized library and thread context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Coefficient representability, intermediate arithmetic and reported range failures shall follow the configured coefficient profile; resource or numerical exceptions shall not promise a returned partial system.
RATIONALE: A constraint system can describe every coordinate interval exactly, while congruences express only the singleton-coordinate equalities of a nonempty Cartesian box.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
Constraint_System constraints() const; Constraint_System minimized_constraints() const; Congruence_System congruences() const; Congruence_System minimized_congruences() const;
VERIFICATION_CRITERIA: Compare exported constraints with independent Cartesian membership and exact rational elimination. Check singleton equalities and redundant-row freedom without prescribing row order. Evaluate exported congruences on singleton and varying coordinates; include rational singletons, strict intervals, absent trailing coordinates, universe, classified and lazy empty, both zero-dimensional values, owned-result independence and descriptor resource failure.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/constraints1.cc; tests/Box/minconstraints1.cc; tests/Box/congruences1.cc;
-
3. Affine boundedness, extrema and witnesses on boxes UID: PPL-SPEC-001032 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: bounds_from_above(expr) and bounds_from_below(expr) shall decide exactly whether the affine expression's values over the receiver are bounded in the indicated direction. Empty shall be bounded in both directions. Zero coefficients shall not make an otherwise bounded objective unbounded because of unused coordinate factors.
maximize shall return true exactly when the receiver is nonempty and the objective is bounded above. On true, its numerator and positive denominator shall give the exact supremum as a reduced fraction, and maximum shall be true exactly when some receiver point attains it. minimize shall analogously report the exact infimum and attainment. A constant objective on any nonempty box shall be attained, including in zero dimensions. Ordinary false shall preserve every supplied output. Numerator and denominator outputs shall be distinct.
The generator overloads shall additionally return a point in the receiver when the extremum is attained, and a closure point in its topological closure when it is not attained. Its coordinates, including coordinates absent from the expression, shall satisfy the respective membership condition, and its objective value shall equal the reported extremum. Omitted generator coordinates shall have their declared zero-extension meaning. A witness shall not be accepted merely because it gives the correct objective value.
An expression's ambient dimension greater than the box dimension shall throw std::invalid_argument before changing outputs, including for an empty receiver or a constant expression with excess declared dimension. The represented box, its dimension and the supplied expression shall retain their values. The profile, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Expressions and generators shall retain their descriptor prerequisites; creating output generators and reporting dimension errors shall retain the context of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical intermediate and output representability shall follow the selected coefficient profile. Reported allocation or numerical exceptions may leave outputs partly assigned; ordinary false-result preservation shall not imply exception rollback.
RATIONALE: An exact extremum, its attainment and a valid extremizing witness are separate mathematical obligations.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
bool bounds_from_above(const Linear_Expression& expr) const; bool bounds_from_below(const Linear_Expression& expr) const; bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& maximum) const; bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& maximum, Generator& g) const; bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& minimum) const; bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& minimum, Generator& g) const;
VERIFICATION_CRITERIA: Project an independently constrained objective coordinate using exact rational elimination. Cover all coefficient signs, strict and closed boundaries, fractional endpoints, unused bounded and unbounded coordinates, constant objectives, empty and zero-dimensional boxes and lazy emptiness. Check reduced fractions, attainment, every coordinate of point/closure-point witnesses and exact objective evaluation. Verify all false-result sentinels, dimension errors before output replacement and selected numerical/resource failure outcomes.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/max_min1.cc; tests/Box/interval1.cc;
-
4. Detection of constant affine values and zero frequency UID: PPL-SPEC-001033 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: frequency(expr,fn,fd,vn,vd) shall return true exactly when the receiver is nonempty and the expression has one value throughout it. On true, fn and fd shall be zero and one, respectively, while vn/vd shall be that exact value as a reduced fraction with positive denominator. A coordinate with zero expression coefficient shall not prevent constancy even when its factor varies or is unbounded. For boxes this success shall express a unique value, not a nonzero periodic frequency. Empty shall return false. Zero-dimensional universe shall return the expression's constant term with zero frequency.
Ordinary false shall preserve all four supplied output values. Those outputs shall be distinct. Greater expression ambient dimension shall throw std::invalid_argument before output replacement, including when the receiver is empty. The expression and the represented box and its ambient dimension shall retain their values.
The profile, numerical, lifetime and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Expression descriptors and dimension error reporting shall retain their initialized-context prerequisites. Coefficient intermediate and output representability and reported range failures shall follow the configured coefficient profile. Allocation or numerical exceptions may leave output values partly assigned; ordinary false-result preservation shall not imply exception rollback.
RATIONALE: A Cartesian product has a discrete affine image only when the expression is constant on its nonempty factors.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
bool frequency(const Linear_Expression& expr, Coefficient& fn, Coefficient& fd, Coefficient& vn, Coefficient& vd) const;
VERIFICATION_CRITERIA: Use an independent exact objective projection to distinguish singleton ranges from varying and unbounded ranges. Include multiple rational singleton coordinates, negative coefficients, offsets, ignored free coordinates, open intervals, empty/lazy states, zero-dimensional values, source preservation, four unchanged false-result sentinels and excess expression dimension. Check the exact 0/1 frequency and canonical value, plus selected checked arithmetic failures.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/frequency1.cc;
-
1. Box relations with linear constraints UID: PPL-SPEC-000973 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a dimension-compatible constraint with affine expression e(x) and relation e(x) ⋈ 0, relation_with(c) shall report exactly the applicable assertions: is_disjoint() when no represented point satisfies the constraint; is_included() when every represented point satisfies it; strictly_intersects() when some but not all represented points satisfy it; and saturates() when every represented point has e(x) = 0. Saturation shall be independent of whether the inequality is strict.
An empty box shall therefore report disjoint, included and saturating, without strict intersection. A nonempty box lying on an excluded strict boundary shall report disjoint and saturating. The zero-dimensional universe shall use its unique empty tuple, and omitted coefficients shall be zero. A constraint of greater ambient dimension shall throw std::invalid_argument without changing the represented box.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Logical relation assertions distinguish exclusion, implication, partial intersection and boundary equality, including vacuous truths on the empty set.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Constraint& c) const;
VERIFICATION_CRITERIA: Compare the full assertion set with independently derived exact rational affine ranges, signs and endpoint attainment. Include constants, equality and both inequalities, one and several nonzero coefficients, open bounds, unbounded coordinates, zero dimensions, lazy emptiness, dimension mismatch and unchanged mathematical inputs.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations2.cc; tests/Box/relations3.cc.
-
2. Box relations with linear congruences UID: PPL-SPEC-000974 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a dimension-compatible congruence with affine expression e(x) and modulus m, relation_with(cg) shall interpret m = 0 as the equality e(x) = 0, and positive m as membership of e(x) in mℤ. It shall report disjointness, inclusion or strict intersection by the corresponding quantified assertions over the represented box. On a nonempty box, saturates() shall hold when its affine image is a single value satisfying the congruence. An empty box shall report disjoint, included and saturating. The unique zero-dimensional point shall be tested against the constant congruence.
Excluded finite endpoints shall not establish a congruence witness. The first eligible lattice value and all affine-range intermediates shall not be restricted to the configured coefficient range. A congruence whose ambient dimension exceeds the box dimension shall throw std::invalid_argument without changing the represented box.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Congruence relations require actual lattice intersections with the affine range; a rounded bound or an excluded lattice endpoint is insufficient.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Congruence& cg) const;
VERIFICATION_CRITERIA: Use independent integer divisibility and rational affine-image bounds. Check positive moduli, equality congruences, both coefficient signs, constants, open and closed endpoints at lattice values, fractional bounds, unbounded ranges, singleton images, coefficient endpoints, lazy/marked emptiness, zero dimensions and mismatches.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations4.cc.
-
3. Box subsumption of geometric generators UID: PPL-SPEC-000975 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a dimension-compatible geometric generator, relation_with(g) shall return Poly_Gen_Relation::subsumes() exactly when the generator is subsumed, and nothing() otherwise. A point shall be subsumed exactly when its rational coordinates belong to the box. A closure point shall use membership in the topological closure of a nonempty box. Coordinates omitted from the generator shall be zero, including all trailing box coordinates.
A ray shall be subsumed exactly when translating any box point by every nonnegative multiple of its direction remains in the box; a line shall use every real multiple. Zero direction components shall impose no condition; a positive or negative ray component shall require the corresponding upper or lower absence of a finite bound, and a nonzero line component shall require an unconstrained factor. An empty box shall subsume no generator. The zero-dimensional universe shall subsume every admitted zero-dimensional generator. A generator with greater dimension shall throw std::invalid_argument without changing the represented box.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Points, closure points and recession directions express different geometric obligations and must retain their distinct boundary semantics.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
Poly_Gen_Relation relation_with(const Generator& g) const;
VERIFICATION_CRITERIA: Check exact rational point coordinates, divisors, omitted zero coordinates, open/closed finite bounds and closure points on excluded boundaries. Exercise both ray signs, lines, mixed zero/nonzero directions, unbounded coordinates, empty and zero-dimensional boxes, dimension errors and donor preservation.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations2.cc; tests/Box/relations3.cc.
-
Incoming link from: 3. Box extrapolation with selected limiting constraints1
4. Cartesian box intersection UID: PPL-SPEC-000976 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, intersection_assign(y) shall replace the receiver by the exact set intersection of the two entry values, preserving their ambient dimension. Each nonempty result factor shall be the corresponding interval intersection. Empty and universe shall obey the ordinary set identities, including dimension zero. The operation shall admit self-intersection and shall preserve a distinct donor's represented value. Any empty factor shall make the result empty regardless of cached classification.
Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Exact coordinate intersections implement the meet of Cartesian boxes without introducing correlations or losing endpoint openness.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
void intersection_assign(const Box& y);
VERIFICATION_CRITERIA: Derive coordinate intersections independently for all supported endpoint combinations. Include touching open/closed bounds, unbounded factors, empty coordinates in different positions, lazy/marked states, zero dimensions, self-aliasing, donor preservation and mismatched dimensions. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/intersection1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
5. Least same-profile box upper bound UID: PPL-SPEC-000977 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, upper_bound_assign(y) shall replace the receiver by the least box of that profile containing both entry sets. For nonempty operands this shall use the coordinate-wise least interval hulls; endpoint inclusion shall retain every admitted input point. An empty operand shall be neutral, including a lazily empty operand, and the zero-dimensional cases shall retain empty/universe meaning.
The operation shall admit a donor identical to the receiver, preserve the represented value of a distinct donor and keep ambient dimension. Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value. The result need not equal the union.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: The least enclosing Cartesian product may fill gaps or introduce combinations absent from the disjunctive union.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
void upper_bound_assign(const Box& y);
VERIFICATION_CRITERIA: Compare independent coordinate hulls and openness with both input sets, including crossing coordinate choices, contained operands, separated intervals, equal extrema, empty/universe, zero dimensions, lazy state, self-aliasing, preserved donors and mismatches. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperbound1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
6. Conditional exact union of boxes UID: PPL-SPEC-000978 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal dimension, upper_bound_assign_if_exact(y) shall return true exactly when their set-theoretic entry union is representable as a box of that profile. On true it shall replace the receiver by that union. On false the receiver's represented value shall remain unchanged; a partial coordinate hull shall not escape as a failed result. A distinct donor shall remain unchanged in either case.
Exactness shall account for gaps and excluded touching endpoints within a factor, and for incompatible alternatives in different coordinates. Mere intersection or exactness of every separate coordinate hull shall not establish exactness of the Cartesian union. Empty, equal, contained, zero-dimensional and self-aliased operands shall use their set meanings. Dimension mismatch shall throw std::invalid_argument before replacement.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: An exact-union query must distinguish a true disjunction from the potentially larger product of its coordinate hulls.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
bool upper_bound_assign_if_exact(const Box& y);
VERIFICATION_CRITERIA: Independently decide union equality with the Cartesian hull, including one-axis changes, opposite containment directions across axes, separated and touching factors with all openness choices, contained/empty/equal/zero-dimensional states, every rejection position, false-result preservation and self histories.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperboundifexact1.cc.
-
7. Same-profile abstract box difference UID: PPL-SPEC-000979 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000424 Abstract set-difference semantics (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, difference_assign(y) shall replace the receiver by the least box of that profile containing the set-theoretic difference of the two entry values. It may retain removed points when the difference is not itself representable as a box. With exact rational endpoints and supported openness this shall be the Cartesian interval hull of the exact difference.
Empty subtraction, subtraction from empty, self-subtraction, coverage and zero-dimensional cases shall follow their set meanings. Removal of a boundary shall preserve the remaining endpoint's required openness where representable. A difference split into separate pieces shall use their least same-profile enclosure. A distinct donor shall retain its represented value, self-aliasing shall be admitted and ambient dimension shall remain. Dimension mismatch shall throw std::invalid_argument before replacement.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Differences of Cartesian products can be disconnected; their box abstraction must state its precision instead of implying set-theoretic exactness.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
void difference_assign(const Box& y);
VERIFICATION_CRITERIA: Independently derive exact differences and their coordinate projections for zero, one and several dimensions. Cover equality, containment, disjointness, a single non-contained factor, multiple exclusion alternatives, removed open/closed boundaries, interior holes, empty/lazy states, self-subtraction, donor preservation and mismatch.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/difference1.cc.
-
8. Context-preserving box simplification UID: PPL-SPEC-000980 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, let X and Y be the receiver and context entry sets. simplify_using_context_assign(y) shall produce a box X’ with X ⊆ X’ and X’∩Y = X∩Y, keeping ambient dimension. The operation may discard bounds made redundant by the context. It shall not promise a unique or maximally enlarged result.
A false return shall establish X∩Y = ⌀; a true return shall retain the intersection-preservation guarantee without an additional exact nonemptiness claim. Empty contexts and receivers and zero-dimensional values shall follow these set obligations. A distinct context's represented value shall remain unchanged. With the receiver also used as context, entry-value semantics shall still apply. Dimension mismatch shall throw std::invalid_argument before replacement.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Bounds may be removed outside the relevant context while the original constrained intersection and primitive-domain enlargement are preserved.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
bool simplify_using_context_assign(const Box& y);
VERIFICATION_CRITERIA: Check input inclusion and equality of the original/result intersections with an independent product model. Include redundant bounds, disjoint factors at every position, empty and universe contexts, empty receiver, open endpoints, unbounded factors, zero dimensions, self-context and mismatch. Interpret the Boolean using its stated one-sided guarantee.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/simplifyusingcontext1.cc.
-
1. Box cached claims and independent status ownership UID: PPL-SPEC-000671 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Box<ITV>::Status shall own three Boolean claims: emptiness is current, the box is empty, and the box is universe. An empty flag shall establish emptiness only when the current flag is set. A stale empty flag may coexist with a universe claim. Simultaneous current emptiness and universality shall violate the status invariant.
Default construction shall clear all three claims. Copy construction and assignment shall retain the source's claims in an independent owner; assignment shall admit self-assignment and return its target. Later mutation or destruction of either owner shall not change the other's claims. These operations shall not inspect coordinate intervals.
Calls shall use live owners and synchronized access against mutation. The owning box shall establish that its claims agree with its mathematical value. Direct flag updates may create temporary inconsistent claims; validity queries shall admit those states, but a box shall not use them as a valid status. No library/thread initialization or coefficient-constant stage shall be required for status operations alone.
RATIONALE: A cached claim records established knowledge rather than recomputing the Cartesian product; ownership and stale-state meaning must remain explicit.
INTERFACE: Internal nested type in Box_defs.hh / Box_Status_idefs.hh. Names belong to Parma_Polyhedra_Library; unqualified signatures apply to Box<ITV>::Status.
// Internal nested type: Box<ITV>::Status. Status(); Status(const Status& other); Status& operator=(const Status& other);
VERIFICATION_CRITERIA: Check zero construction, all claim vectors, independent copies, self-assignment, source destruction and no-Init operation.
SOURCE: src/Box_defs.hh; src/Box_Status_idefs.hh; src/Box_Status_inlines.hh; src/Box_Status.cc; tests/boxstatusspec1.cc; tests/Box/loadstatus1.cc.
-
2. Independent cached-status bit updates and queries UID: PPL-SPEC-000672 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: The three test_* queries shall return their respective stored Boolean claims without mutation. Each set_* shall set exactly its named claim and each reset_* shall clear exactly its named claim, retaining every other claim. Updates shall not refresh emptiness, inspect coordinates or implicitly reconcile other claims.
For a mask composed of the three named flags, internal test_all(mask) shall report whether every selected flag is set; the zero mask shall return true. test_any(mask) shall report whether any selected flag is set; the zero mask shall return false. Internal set(mask) and reset(mask) shall set or clear exactly the selected flags. Prerequisites and temporary state handling shall follow 🔗 1. Box cached claims and independent status ownership.
RATIONALE: Independent flag operations let box algorithms distinguish invalidated emptiness knowledge from an established mathematical answer.
INTERFACE: Internal nested type in Box_defs.hh / Box_Status_idefs.hh. Names belong to Parma_Polyhedra_Library; unqualified signatures apply to Box<ITV>::Status.
bool test_empty_up_to_date() const; void reset_empty_up_to_date(); void set_empty_up_to_date(); bool test_empty() const; void reset_empty(); void set_empty(); bool test_universe() const; void reset_universe(); void set_universe(); // Private helpers; flags_t is unsigned int. bool test_all(flags_t mask) const; bool test_any(flags_t mask) const; void set(flags_t mask); void reset(flags_t mask);
VERIFICATION_CRITERIA: Exhaust all eight flag vectors, each named update and all eight masks against independent Boolean models; include zero/all masks and preservation of unselected claims.
SOURCE: src/Box_defs.hh; src/Box_Status_idefs.hh; src/Box_Status_inlines.hh; src/Box_Status.cc; tests/boxstatusspec1.cc; tests/Box/loadstatus1.cc.
-
3. Status consistency query and diagnostic UID: PPL-SPEC-000673 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: OK() shall return false exactly when current emptiness and universe are all asserted, and true for every other combination. It shall not refresh claims or change the status.
With assertion diagnostics enabled, the inconsistent case shall write The status asserts emptiness and universality at the same time. followed by a newline to std::cerr. Other cases shall emit no diagnostic; with diagnostics disabled, no case shall emit that diagnostic. Stream failures shall follow the stream's ordinary exception-mask rules. The checker shall admit the temporary states described in 🔗 1. Box cached claims and independent status ownership.
RATIONALE: A stale empty bit is not a contradiction; only an established empty result conflicts with universality.
INTERFACE: Internal nested type in Box_defs.hh / Box_Status_idefs.hh. Names belong to Parma_Polyhedra_Library; unqualified signatures apply to Box<ITV>::Status.
bool OK() const;
VERIFICATION_CRITERIA: Exercise every conjunction, distinguish stale and current emptiness, capture the exact enabled diagnostic and prove unchanged claims in assertions/release modes.
SOURCE: src/Box_defs.hh; src/Box_Status_idefs.hh; src/Box_Status_inlines.hh; src/Box_Status.cc; tests/boxstatusspec1.cc; tests/Box/loadstatus1.cc.
-
Incoming link from: 5. Status ASCII loading and partial rejection state1
4. Status ASCII export preserves cached claims UID: PPL-SPEC-000674 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_dump shall insert the three status fields in this order: EUP for current emptiness, EM for the empty flag and UN for universe. Each field shall consist of + when its claim is set or - when clear, followed by its keyword and one space. With default compatible formatting, the zero status shall therefore emit -EUP -EM -UN followed by one space. The inserted characters and strings shall follow ordinary stream formatting, including any pending width, fill and alignment settings.
The no-argument ascii_dump() shall write that representation to std::cerr. print() shall write No user level output operator defined for Box<ITV>::Status. followed by a newline to std::cerr. Export shall preserve the stored claims, including stale flags, and shall not inspect the box's coordinate payload or refresh its emptiness. Partial output and stream exceptions shall follow ordinary stream rules. Other prerequisites shall follow 🔗 1. Box cached claims and independent status ownership.
RATIONALE: Reloadable box state must retain whether emptiness is known, independently of what the stale empty bit happens to contain.
INTERFACE: Internal nested type in Box_defs.hh / Box_Status_idefs.hh. Names belong to Parma_Polyhedra_Library; unqualified signatures apply to Box<ITV>::Status.
void ascii_dump(std::ostream& stream) const; void ascii_dump() const; void print() const;
VERIFICATION_CRITERIA: Check exact signs, field order and final space for every valid status, ordinary width/fill formatting, source preservation, standard-error output routes and returning/throwing output failures.
SOURCE: src/Box_defs.hh; src/Box_Status_idefs.hh; src/Box_Status_inlines.hh; src/Box_Status.cc; src/globals_defs.hh; tests/boxstatusspec1.cc; tests/Box/loadstatus1.cc.
-
Incoming links from: 2. Reloadable box record export 3. Compatible box record loading and failure state2
5. Status ASCII loading and partial rejection state UID: PPL-SPEC-000675 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_load shall extract three fields in the order and spelling of 🔗 4. Status ASCII export preserves cached claims. Each token shall begin with + or - and contain exactly the corresponding keyword. Extraction shall follow ordinary string rules, including stream width and whitespace settings. A complete consistent triple shall replace all three claims and return true, independently of the destination's previous claims; trailing tokens shall remain available for subsequent extraction.
A missing, malformed or out-of-order token shall return false. Each successfully parsed preceding field shall already have replaced its claim; the rejected field and following claims shall retain their preceding values. A completed triple asserting current emptiness and universality shall be rejected with false. Rollback and status consistency after a failed load shall not be promised; callers shall restore a consistent status before using it as box state. Stream exceptions shall propagate under ordinary exception-mask rules, with preceding field updates retained.
The internal get_field helper shall assign its output Boolean only when it successfully matches the requested signed keyword. It shall preserve that Boolean on rejection. Other prerequisites shall follow 🔗 1. Box cached claims and independent status ownership.
RATIONALE: Replacement loading must clear prior claims when a negative field is read; malformed prefixes need an explicit failure state and must not establish a valid contradictory certificate.
INTERFACE: Internal nested type in Box_defs.hh / Box_Status_idefs.hh. Names belong to Parma_Polyhedra_Library; unqualified signatures apply to Box<ITV>::Status.
bool ascii_load(std::istream& stream); namespace Implementation::Boxes { bool get_field(std::istream& stream, const char* keyword, bool& positive); }
VERIFICATION_CRITERIA: Round-trip every consistent triple through every prior consistent state, preserve trailing framing and check every truncated/malformed prefix. Exercise field signs, keyword mismatches, width/whitespace settings and input exceptions; assess rejection of a completed contradictory triple.
SOURCE: src/Box_defs.hh; src/Box_Status_idefs.hh; src/Box_Status_inlines.hh; src/Box_Status.cc; tests/boxstatusspec1.cc; tests/Box/loadstatus1.cc.
-
1. Human-readable box presentation UID: PPL-SPEC-000969 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: Insertion shall write false for an empty box and true for a universe box. Otherwise, it shall visit every ambient coordinate in increasing index order and write the active variable name, the literal separator " in ", and that coordinate's interval presentation. Consecutive coordinates shall be separated by ", ". Unrestricted factors of a non-universe product shall also be shown. Zero-dimensional empty and universe shall retain their respective words. Successful insertion shall return the supplied stream reference without adding a newline or explicitly flushing it.
Variable names shall follow the active formatter and its live-callback prerequisites in 🔗 7. Active Variable formatter and initialized thread state and 🔗 8. Variable names, formatter dispatch and output failures. Interval presentation shall follow 🔗 2. Readable interval presentation and output delivery, including stream formatting and locale. The display shall not encode a separate ambient-dimension header. print() shall deliver the same display to the current std::cerr without appending a newline.
The represented box value shall remain unchanged; logically const emptiness/universe queries may refresh status. Stream failures shall retain the supplied stream's state and exception-mask behavior. Exceptions escaping the selected formatter, endpoint or stream operations shall propagate with partial output retained; their internal stream handling shall follow the applicable exception mask. Rendering callbacks shall not invalidate or mutate the box or coordinate storage being visited.
The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.
RATIONALE: A readable list of coordinate factors must preserve order and use the configured coordinate names.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
namespace IO_Operators { template <typename ITV> std::ostream& operator<<(std::ostream& s, const Box<ITV>& box); } // Member of Box<ITV>: void print() const;
VERIFICATION_CRITERIA: Check exact words and coordinate order using independent literal intervals, default/custom variable formatters, unrestricted factors, zero-dimensional cases and lazy emptiness. Verify stream identity, no newline, print redirection, source values and partial failure/exception behavior.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.
-
Incoming link from: 3. Compatible box record loading and failure state1
2. Reloadable box record export UID: PPL-SPEC-000970 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: Under compatible machine-output formatting and endpoint serialization prerequisites, ascii_dump(s) shall emit the box status record, the label space_dim, the ambient dimension and a newline, followed by exactly one serialized interval record per coordinate in increasing index order. The status protocol shall follow 🔗 5. Status ASCII loading and partial rejection state; interval records shall follow 🔗 4. Reloadable interval metadata and endpoint export. The record shall retain enough information to reload the same ambient dimension and mathematical Cartesian value with 🔗 3. Compatible box record loading and failure state.
For a box whose status already certifies emptiness, endpoint storage may be inactive. Export shall emit a valid canonical universe interval for each such coordinate without interpreting inactive endpoint payloads. The certified empty status shall preserve the empty Cartesian meaning independently of those replacement records. For other valid status states, coordinate export shall retain the interval serialization's metadata and inactive-payload rules. Export shall preserve the source mathematical value and shall not require first querying its emptiness.
ascii_dump() shall deliver the same record to the current std::cerr. Output shall require sufficient stream resources, compatible numeric formatting/locale and the selected endpoint codec's prerequisites. Stream/endpoint/resource failures shall retain their own state and exception behavior, with no output rollback. The record shall not imply cross-version or different-policy format compatibility.
The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.
RATIONALE: Machine records must preserve dimension and empty-set meaning without reading inactive coordinate payloads.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
// Members of Box<ITV>: void ascii_dump(std::ostream& s) const; void ascii_dump() const;
VERIFICATION_CRITERIA: Round-trip independently modeled empty/universe, zero-dimensional and mixed-factor boxes in classified and unclassified states. Inspect label/count/order and canonical inactive-factor records. Check concatenated records, source preservation, stderr delivery and failing output streams, including native endpoint profiles with inactive storage.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.
-
Incoming link from: 2. Reloadable box record export1
3. Compatible box record loading and failure state UID: PPL-SPEC-000971 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For a complete valid record produced under 🔗 2. Reloadable box record export with compatible status, interval policy, endpoint arithmetic, dimension limits, numeric formatting and locale, ascii_load(s) shall return true and replace the destination by the recorded ambient dimension and mathematical Cartesian value. It shall consume one box record, permitting a following record or suffix to remain in the stream. A previously different destination dimension or value shall not affect a successful result.
Status-field parsing and its outcomes shall follow 🔗 5. Status ASCII loading and partial rejection state. A missing or incorrect space_dim label, an absent, negative-signed or unsupported dimension, or a rejected or truncated coordinate interval record shall return false when stream extraction returns normally. Coordinate loading shall follow 🔗 5. Compatible interval record loading and partial failure state. A completed record that fails the box invariant check shall return false in every build. Stream exception masks and selected endpoint/resource exceptions shall retain their own propagation rules. A complete admissible dimension shall fit the selected box profile and available resources. Use trusted compatible dumps.
Failure may have replaced status and some coordinate records or discarded the previous coordinate sequence. A false return or exception shall not promise rollback or a complete valid mathematical box value. The object shall retain safely destructible owned resources and may be replaced by assignment from a valid box; callers shall establish a valid replacement before mathematical queries or other operations requiring a valid box. Input already consumed shall not be restored. Successful loading shall not transfer ownership of the input stream.
The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.
RATIONALE: Reloadable records need a precise success contract and an explicit partial-update failure state.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
// Member of Box<ITV>: bool ascii_load(std::istream& s);
VERIFICATION_CRITERIA: Load independently generated compatible records into different prior dimensions, check exact mathematical values and repeated/concatenated loading. Exercise incorrect/truncated status, header and endpoint fields, prefixes and exception-enabled streams. Reassign valid values after every failed load before querying; check resource cleanup and successful reuse.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.
-
4. Owned box memory accounting UID: PPL-SPEC-000972 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: external_memory_in_bytes() shall report the sum of the owned coordinate sequence's allocated slot storage and the external memory reported by every live interval element. If K coordinate slots are allocated and n elements are live, slot storage shall contribute K * sizeof(ITV); each live element's external storage shall be counted once, including elements in a logically empty box. Inactive logical factors shall not cause owned allocated storage to disappear from the accounting.
total_memory_in_bytes() shall report sizeof(Box<ITV>) plus that external count. Object/slot sizes shall be those of the selected build and interval profile. The result shall exclude allocator bookkeeping and independently owned library temporaries or other objects. Successful calls shall require each selected interval's memory query to be well-formed and the sum to fit memory_size_type. The queries shall preserve the represented value, ambient dimension and owned storage.
The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.
RATIONALE: Memory reports describe retained owned storage, which can exceed the storage needed for the current mathematical value.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.
// Members of Box<ITV>: memory_size_type external_memory_in_bytes() const; memory_size_type total_memory_in_bytes() const;
VERIFICATION_CRITERIA: Check total/external identity, no endpoint-owned storage for native scalar factors, interval-owned GMP limb storage, retained capacity after dimension removal, copies, empty storage and swaps. Compare independent owned-allocation observations and per-element codec/accounting prerequisites without treating allocator metadata as object storage.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.
-
5. Box representation invariant query UID: PPL-SPEC-001220 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a live, well-owned and safely indexable box whose selected interval operations are admitted, OK() shall check the following representation conditions. If a current nonempty cache claim is present, the coordinate product shall have no empty factor. Unless the box is certified empty, every coordinate factor shall pass its selected interval OK() query. A violation of a checked condition shall return false; passing these checks shall return true. Zero-dimensional empty and universe shall both pass. Certified empty boxes may retain inactive coordinate storage; its interval validity shall not be a condition of this query.
The receiver's mathematical value, dimension, owned coordinate storage and cached claims shall remain unchanged. The query may copy the box and query interval emptiness on that temporary. Allocation or interval-operation exceptions may propagate; discarded query temporaries shall release their owned storage. Debug builds may emit a diagnostic for an inconsistent nonempty claim; exact diagnostic wording shall not be part of the result.
The interval admission and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply to the operations used by the query. Diagnostic use may inspect safely owned but inconsistent cache claims or safely queryable invalid factors. It shall not inspect arbitrary damaged pointers, broken lifetimes or non-indexable fabricated storage. A true result shall not certify arbitrary client preconditions, minimum storage, or that the box is nonempty.
RATIONALE: The Cartesian product is empty exactly when a factor is empty. A cached nonempty claim must agree with that fact. Factors of an explicitly empty box are inactive and need not describe an independent product.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Box<ITV>:
bool OK() const;
VERIFICATION_CRITERIA: Check valid empty, universe, bounded and lazily classified products in zero and positive dimensions, retaining value, cache and storage snapshots. Use the existing narrow status-access fixture to present a safely owned empty factor with a contradictory nonempty cache; require a false result. Use a well-formed diagnostic interval profile to require false when an active factor rejects its own invariant check, and true when the same factor is inactive in a certified empty box. Include successful direct public-header calls without automatic or explicit PPL initialization.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxpublicstatespec1.cc; tests/boxstatepublic1.cc.
-
Incoming links from: 3. Refinement of a floating interval abstract store 3. Box bounded-integer wrapping, overflow choices and guard refinement 1. Single-coordinate affine box image 2. Single-coordinate affine box preimage 3. Generalized single-coordinate box image 4. Generalized single-coordinate box preimage 5. Generalized multi-coordinate box image 6. Generalized multi-coordinate box preimage 7. Bounded affine box image 8. Bounded affine box preimage 9. Interval-coefficient affine box image 1. Threshold box widening and finite stabilization 4. Box narrowing with complete previous-boundary retention 5. Threshold-aware CC76 box convergence certificates 1. Box construction from supported constraints 2. Box construction from supported congruences 3. Cartesian enclosure of a polyhedral generator system 4. Box conversion from bounded-difference shapes 5. Box conversion from octagonal shapes 6. Complexity-sensitive box conversion from polyhedra 7. Cartesian enclosure of a rational grid 8. Box conversion from partially reduced products 1. Dimension-preserving box coordinate forgetting 2. Unrestricted and zero-fixed box coordinate extension 3. Ordered Cartesian box concatenation 4. Selected-coordinate box projection and compaction 5. Trailing-coordinate box projection 6. Injective partial box coordinate remapping 7. Box coordinate expansion and replica precision 8. Box coordinate folding and interval enclosure 4. Box endpoint-distance domain, workspaces and dispatch 1. Exact topological closure of boxes 2. Least box enclosure of nonnegative real-time progression 3. Selected-coordinate integer-point normalization of boxes 1. Addition of optimally supported box constraints 2. Addition of optimally supported box congruences 3. Conservative box refinement by linear constraints 4. Conservative box refinement by linear congruences 5. Controlled box constraint propagation 1. Exact extraction of individual box boundaries 2. Constraint and congruence exports of box values 3. Affine boundedness, extrema and witnesses on boxes 4. Detection of constant affine values and zero frequency 1. Box relations with linear constraints 2. Box relations with linear congruences 3. Box subsumption of geometric generators 4. Cartesian box intersection 5. Least same-profile box upper bound 6. Conditional exact union of boxes 7. Same-profile abstract box difference 8. Context-preserving box simplification 1. Human-readable box presentation 2. Reloadable box record export 3. Compatible box record loading and failure state 4. Owned box memory accounting 5. Box representation invariant query 2. Dimensioned empty and universe box construction 3. Owned box copying, assignment and cleanup 4. Upward box conversion between interval profiles 5. Whole box exchange across different dimensions 6. Ambient and affine box dimension queries 7. Empty-aware borrowed coordinate interval access 8. Explicit coordinate factor replacement 9. Exact ordinary box classification 10. Box set relations, dimension-sensitive equality and compatible hashes 4. Refinement of a floating interval abstract store66
1. Cartesian box values, coordinate identity and valid use UID: PPL-SPEC-000951 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Box<ITV> shall represent a Cartesian product of its coordinate intervals over the ordinary real carrier. A point shall belong exactly when each coordinate belongs to its corresponding factor; distinct coordinates shall impose no additional relationships. An empty factor shall make the product empty. The ambient dimension shall remain part of the value even for an empty box. In dimension zero, universe shall contain the unique empty tuple and shall differ from empty. interval_type shall name ITV; Rational_Box shall select Rational_Interval factors.
Selected interval operations shall be well-formed and their information policy shall admit the required empty, universe and endpoint values. Active numerical payloads shall be initialized and rational payloads canonical. Clients shall retain the selected endpoint operation's finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Basic construction, copying, exchange and valid-coordinate factor access shall require no additional PPL initialization. Reporting dimension-incompatible coordinate arguments shall retain an initialized library/thread context under 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization, including the live coefficient constants used by that reporting path. Other APIs using separately initialized descriptors or facilities shall retain their own prerequisites.
Boxes and borrowed arguments shall remain live throughout a call. Access shall be synchronized against mutation; logically const queries may update cached information and shall be synchronized where those updates could overlap. Cached status shall not change the represented product. Empty boxes may retain inactive coordinate storage; clients shall use the public empty-aware coordinate access contract rather than infer meaningful factors from internal empty storage.
RATIONALE: A box is a dimensioned Cartesian set, so zero-dimensional universe, empty products and inactive empty storage need explicit meanings.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
template <typename ITV> class Box; // Member of Box<ITV>: typedef ITV interval_type; typedef Box<Rational_Interval> Rational_Box;
VERIFICATION_CRITERIA: Compare independent Cartesian membership descriptions, empty factors and zero-dimensional empty/universe; instantiate rational and integral core value operations without automatic or explicit PPL initialization; separately check coordinate-validation outcomes under initialized library/thread context. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
2. Dimensioned empty and universe box construction UID: PPL-SPEC-000952 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Box(d,kind) shall construct a box of ambient dimension d: empty for EMPTY and the complete declared Cartesian carrier for UNIVERSE. Default construction shall give zero-dimensional universe. Each active universe factor shall have the selected interval's universe meaning; custom interval/information constructors shall retain their per-element state rather than be required to share copied identity.
max_space_dimension() shall return the dimension limit of this box profile. Construction above that limit shall throw std::length_error before attempting coordinate storage of that size. Dimensions within the limit shall remain subject to actual allocation/resource availability; the reported limit shall not promise successful allocation. Construction shall not require interpreting inactive interval payloads of an empty box.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Construction must distinguish mathematical dimension validity from physical resource availability.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
explicit Box(dimension_type d=0,Degenerate_Element kind=UNIVERSE); static dimension_type max_space_dimension();
VERIFICATION_CRITERIA: Check default and explicit empty/universe construction in dimensions 0, 1, 2 and larger small cases, exact zero-dimensional meaning and above-limit rejection without allocating at the limit. Reuse custom per-element constructor regressions.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
Incoming links from: 1. Box construction from supported constraints 2. Box construction from supported congruences 3. Cartesian enclosure of a polyhedral generator system 4. Box conversion from bounded-difference shapes 5. Box conversion from octagonal shapes 6. Complexity-sensitive box conversion from polyhedra 7. Cartesian enclosure of a rational grid 8. Box conversion from partially reduced products8
3. Owned box copying, assignment and cleanup UID: PPL-SPEC-000953 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: Same-profile copying shall preserve ambient dimension and represented set while independently owning all mutable coordinate/metadata storage. The copy constructor's complexity argument shall not change that result. Assignment shall replace the receiving value even when dimensions differ and shall return the receiving object; self-assignment shall preserve its value. Destruction shall release owned resources without modifying other live values.
On successful return, subsequent mutation or destruction of either owner shall not change the other owner's represented value. Empty and lazy cached states shall retain correct mathematical meaning after copying/assignment.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Copying a dimensioned product must preserve meaning while retaining independent endpoint ownership.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
Box(const Box& y,Complexity_Class complexity=ANY_COMPLEXITY); Box& operator=(const Box& y); // The implicit destructor releases the owned coordinate representation.
VERIFICATION_CRITERIA: Check copy construction under each complexity argument, assignment between different dimensions, empty/nonempty/lazy states, returned identity and self-assignment. Mutate/destroy donor and receiver independently and check retained endpoint values. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
Incoming links from: 1. Box construction from supported constraints 2. Box construction from supported congruences 3. Cartesian enclosure of a polyhedral generator system 4. Box conversion from bounded-difference shapes 5. Box conversion from octagonal shapes 6. Complexity-sensitive box conversion from polyhedra 7. Cartesian enclosure of a rational grid 8. Box conversion from partially reduced products8
4. Upward box conversion between interval profiles UID: PPL-SPEC-000954 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
STATEMENT: Construction from Box<Other_ITV> shall preserve ambient dimension and enclose every source point under the receiving interval policies. An established empty source shall give empty. For other sources the conversion shall use receiving coordinate enclosures rather than trust cached facts whose validity can change through endpoint conversion. With exactly representable endpoints and supported membership, it shall preserve the represented set exactly. Otherwise endpoint conversion or relaxed openness may enlarge the product. The complexity argument shall not change this profile-conversion result. The separate source shall remain unchanged and the receiving value shall own independent coordinate storage.
Selected source/destination interval assignments shall be well-formed and satisfy their own admitted conversion prerequisites.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Interval conversion can change emptiness knowledge and boundary precision, so the target must reconstruct valid cached meaning.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
template <typename Other_ITV> explicit Box(const Box<Other_ITV>& y, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Check exact same-family profile conversions, fractional outward integral endpoints, relaxed openness, marked and lazily empty sources, empty/universe zero-dimensional values and independent ownership. Compare literal source-point containment and receiving endpoints.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
5. Whole box exchange across different dimensions UID: PPL-SPEC-000955 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: m_swap(y) and free swap(x,y) shall exchange complete box values, including dimensions, coordinate ownership and cached status. Different dimensions and empty/nonempty states shall be permitted. Self-exchange shall preserve the value. References into exchanged coordinate storage shall follow that storage's owner; callers shall not assume a reference continues to identify the original logical coordinate value. Exchange of the standard owned coordinate sequence/status shall not perform per-endpoint numerical conversions or require coefficient range operations.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Whole-owner exchange must retain dimensions and status alongside the factors.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
void m_swap(Box& y); template <typename ITV> void swap(Box<ITV>& x,Box<ITV>& y);
VERIFICATION_CRITERIA: Exchange different dimensions, empty/nonempty values, universe and lazy states through both forms; check both resulting mathematical values, self-exchange and active endpoint reference ownership.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
6. Ambient and affine box dimension queries UID: PPL-SPEC-000956 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
STATEMENT: space_dimension() shall return the ambient coordinate count, including for empty boxes. affine_dimension() shall return zero for empty boxes; otherwise it shall equal the number of nonsingleton coordinate factors over the ordinary real carrier. Both empty and universe in ambient dimension zero shall therefore have affine dimension zero. These queries shall not change the represented set or ambient dimension.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Ambient coordinate count differs from the dimension of a nonempty Cartesian set affine hull.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
dimension_type space_dimension() const; dimension_type affine_dimension() const;
VERIFICATION_CRITERIA: Check independent factor counts over empty, singleton, mixed finite and unbounded products in dimensions 0, 1 and 2; retain ambient dimension on empty boxes and after copying/conversion.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
Incoming links from: 4. Box endpoint-distance domain, workspaces and dispatch 11. Explicit empty box assignment2
7. Empty-aware borrowed coordinate interval access UID: PPL-SPEC-000957 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: get_interval(v) shall return a const interval reference for an existing coordinate. For a nonempty box it shall denote that coordinate's factor. For an empty box it shall denote an empty interval, independently of any inactive internal coordinate payload. Different empty queries may share an internal interval; clients shall not infer distinct ownership or identity from those references.
An out-of-dimension variable shall throw std::invalid_argument before returning a reference, including on an empty box. A reference into an active factor shall require its owning coordinate storage to remain live and free of invalidating owner operations. A shared empty reference shall require its owning library/thread context to remain live. Clients shall not mutate through these const views.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: The public factor view must hide meaningless factor storage in an empty Cartesian product.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
const ITV& get_interval(Variable v) const;
VERIFICATION_CRITERIA: Compare every active factor with literal endpoints, check shared empty denotation in all small positive dimensions, out-of-range rejection on empty/nonempty values and live borrowed-reference histories without invalidating mutations. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
8. Explicit coordinate factor replacement UID: PPL-SPEC-000958 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For a nonempty box, set_interval(v,i) shall replace only the selected factor with the supplied interval's entry value, retaining ambient dimension and the other factors. A resulting empty factor shall make the box empty. The source interval shall remain unchanged; borrowing the same or another active factor as the source shall be permitted without changing its entry value during replacement.
For a one-dimensional empty box, replacing its sole factor shall establish that supplied one-dimensional interval, which may make the box nonempty. For an already empty box of dimension at least two, replacing one factor shall retain the empty box. An out-of-dimension variable shall throw std::invalid_argument without replacing factors. The operation shall update emptiness knowledge as needed so later queries reflect the resulting product.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Factor replacement is a low-level coordinate operation whose one-dimensional empty recovery and higher-dimensional empty behavior must be explicit.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
void set_interval(Variable v,const ITV& i);
VERIFICATION_CRITERIA: Replace each active factor, including same/other-factor source references, preserved other coordinates and empty results. Check one-dimensional empty recovery, higher-dimensional empty retention, invalid variables and subsequent repeated classification queries. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
Incoming link from: 11. Explicit empty box assignment1
9. Exact ordinary box classification UID: PPL-SPEC-000959 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
STATEMENT: The following Boolean queries shall report exact properties of the represented ordinary real Cartesian set. is_empty() shall decide emptiness and is_universe() equality with the ambient universe. is_topologically_closed() shall decide topological closure; is_bounded() shall decide boundedness; is_discrete() shall be true exactly for empty boxes or products of singleton factors. contains_integer_point() shall be true exactly when the product contains an integer-coordinate point. In dimension zero the universe shall be nonempty, closed, bounded, discrete and contain the empty integer tuple; empty shall be closed, bounded, discrete and contain no integer point.
constrains(v) shall be true for empty boxes and, for a nonempty box, exactly when that coordinate's factor differs from universe. A variable outside the ambient dimension shall throw std::invalid_argument. Queries may establish cached facts without changing the mathematical set.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Set classification must retain exact empty and zero-dimensional conventions independently of cached evaluation order.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
bool is_empty() const; bool is_universe() const; bool is_topologically_closed() const; bool is_bounded() const; bool is_discrete() const; bool contains_integer_point() const; bool constrains(Variable v) const;
VERIFICATION_CRITERIA: Compare independent factor/topology/integer-witness models over every small ordinary endpoint topology, empty and unbounded products, rational intervals with no integer witness, all coordinate positions and cached query orders. Check invalid constrains variables.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
10. Box set relations, dimension-sensitive equality and compatible hashes UID: PPL-SPEC-000960 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
STATEMENT: For equal ambient dimensions, contains(y) shall decide Y ⊆ X, strictly_contains(y) proper inclusion and is_disjoint_from(y) empty intersection. Empty sets and zero-dimensional sets shall follow their ordinary set meanings. These methods shall throw std::invalid_argument when ambient dimensions differ, including for empty operands.
Free equality shall be true exactly for boxes with equal dimensions and equal represented sets; different dimensions shall compare unequal without a dimension exception. Free inequality shall negate equality. Equal boxes shall have equal hash_code() values; collisions between unequal boxes shall be permitted. Relations and hashing shall leave mathematical values unchanged and shall not depend on distinct cached evaluation histories.
The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.
RATIONALE: Dimension is part of box identity, while Boolean relation APIs and equality intentionally have different mismatch outcomes.
INTERFACE: Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:
bool contains(const Box& y) const; bool strictly_contains(const Box& y) const; bool is_disjoint_from(const Box& y) const; int32_t hash_code() const; template <typename ITV> bool operator==(const Box<ITV>& x,const Box<ITV>& y); // Inequality uses C++20 rewriting of operator==.
VERIFICATION_CRITERIA: Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare same-dimension Cartesian inclusion/disjointness independently over empty, point, bounded, open and unbounded factors; check operand order, properness, reflexivity and cached histories. Check all dimension-mismatch outcomes and equal-value hash agreement without requiring collision freedom.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.
-
11. Explicit empty box assignment UID: PPL-SPEC-001221 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000312 Independent values after copying domain objects (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: set_empty() shall replace the receiver's entry set X ⊆ Rn by ⌀ ⊆ Rn. It shall preserve the ambient dimension and shall be idempotent, including in dimension zero. Subsequent empty-aware queries and coordinate access shall observe the empty value under 🔗 7. Empty-aware borrowed coordinate interval access and 🔗 9. Exact ordinary box classification.
The operation shall retain the owned coordinate storage and the stored interval objects. Those factors shall become inactive; it shall not need to assign an empty value to each factor or query their numerical payloads. Borrowed references to retained factors shall retain their storage lifetime, but shall not independently denote the current box's factors while the box is empty. Independent copies shall remain unchanged.
The receiver shall have safely owned coordinate storage and externally synchronized access. The operation shall require no numerical arithmetic, no additional PPL initialization, no allocation and no interval-profile callback, and shall not change hardware rounding state.
RATIONALE: Emptiness annihilates a Cartesian product without requiring every retained factor to be rewritten. The ambient dimension and owned storage are independent of the represented set becoming empty.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Box<ITV>:
void set_empty();
VERIFICATION_CRITERIA: Check zero and positive dimensions, empty/universe and finite factor histories, repeated calls and independent copies. Observe empty-aware factor access and retained factor addresses/capacities through the existing narrow fixture. A diagnostic interval profile whose callbacks reject use shall confirm that explicit empty assignment does not inspect or rewrite inactive factors. Check direct public-header use without initialization and unchanged hardware rounding state in an initialized runtime.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxpublicstatespec1.cc; tests/boxstatepublic1.cc.
-
3. Best octagonal enclosure of Cartesian boxes UID: PPL-SPEC-001164 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000061 Octagonal expressiveness (Specifies)
- PPL-LLR-000062 Conservative octagonal constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Octagonal_Shape(box,complexity) shall construct the least target-profile octagonal enclosure of the real Cartesian product represented by box. The source interval endpoint policy shall retain its open/closed meanings. For a nonempty product, an excluded finite endpoint may determine an included limiting bound in the closed result. Any empty factor shall make the result empty in the source ambient dimension; closing endpoints individually shall not turn an empty product into a nonempty one.
For a signed binary normal, its exact support shall combine the two relevant source endpoint contributions before target conversion. The unary support shall be doubled before conversion to its stored target bound. Unbounded contributing endpoints shall leave the corresponding support unrestricted.
For a nonempty source set X, let h(a) = supx ∈ Xa⋅x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤ ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤ ↑ T(h(siei + sjej)). Here ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.
The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee.
The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.
A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.
Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.
RATIONALE: Independent interval supports combine into signed sums and differences. Rounding each coordinate first can lose a binary bound that is representable in the target profile, so optimal conversion depends on exact source combinations.
INTERFACE: Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:
template <typename Interval> explicit Octagonal_Shape(const Box<Interval>& box, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Derive the Cartesian set and signed support sums directly from rational endpoint values and openness. Check every binary sign, unary doubled bounds, empty factors, open touching endpoints, unbounded/free coordinates, fractional endpoint combinations, half-integral target precision, zero dimensions and all three complexity values. Require equality with the independently rounded primitive hull, including cases that distinguish combining source endpoints from first rounding separate unary bounds. Check source denotation, independent storage and failed-construction cleanup.
BIBLIOGRAPHY: BagnaraHZ09FMSD | Section 4, signed-variable and doubled-unary encoding (PDF page index 9, zero-based).
SOURCE: src/Shape_Conversion_Support.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Box_defs.hh; tests/Octagonal_Shape/frombox1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001135 Refinement of a floating interval abstract store (Specified by)
- PPL-SPEC-001136 Export of unary constraints through a destination protocol (Specified by)
- PPL-SPEC-001716 Addition and subtraction of intervals admitting infinity points (Specified by)
- PPL-SPEC-001717 Sign-stable extended interval products and quotients (Specified by)
- PPL-SPEC-001718 Degenerate and singular extended interval products and quotients (Specified by)
- PPL-SPEC-000729 Ordinary interval additive inversion (Specified by)
- PPL-SPEC-000730 Ordinary interval addition and subtraction (Specified by)
- PPL-SPEC-000731 Ordinary interval multiplication (Specified by)
- PPL-SPEC-000732 Ordinary interval division and zero-divisor abstraction (Specified by)
- PPL-SPEC-000733 Ordinary interval arithmetic value operators (Specified by)
- PPL-SPEC-001239 Refinement of a floating interval abstract store (Specified by)
Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, when interval arithmetic reports an enclosure for a supported operation, that enclosure shall contain every defined mathematical result obtained from operand values in the input intervals, including approximation introduced by endpoint arithmetic.
Soundness requires outward enclosure of the entire operand ranges rather than accuracy only at selected endpoints.
Verification covers interval arithmetic and its enclosure and failure contracts. Related obligations: 🔗 3. Conservative directed numerical bounds, 🔗 1. Meaning of successful exact and approximate results.
Use independently computed rational ranges and selected exact operand values for supported operations. Include sign changes, open endpoints, unbounded inputs and inexact endpoint results. Treat invalid-operation and failure outcomes according to their separate contracts.
src/Interval_defs.hh: interval arithmetic contracts. src/Interval_templates.hh: interval operations. src/intervals_defs.hh: interval arithmetic support. src/Rounding_Dir_defs.hh: directed bounds.
-
3. Refinement of a floating interval abstract store UID: PPL-SPEC-001135 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a supported native floating boundary type T and a valid Box<Interval<T,Interval_Info>> store of the same ambient dimension, refine_fp_interval_abstract_store(store) shall intersect the store with the outward Cartesian enclosure of the receiver supplied by the box conversion of 🔗 4. Box conversion from bounded-difference shapes. It shall retain every point of the entry store lying in the source shape and shall introduce no point outside the entry store. The source represented set and both ambient dimensions shall remain unchanged; logically const source closure may refresh caches.
Empty source or empty store shall yield an empty store. Zero-dimensional empty and universe cases shall preserve their distinct meanings. When the source closure and target endpoint arithmetic satisfy the exactness conditions of 🔗 4. Box conversion from bounded-difference shapes, the result shall equal the store's intersection with the least Cartesian enclosure of the source; otherwise outward approximation may retain additional points. Incompatible dimensions shall throw std::invalid_argument without changing the store's represented set.
The selected native format shall satisfy its configured supported-format predicate. The box and interval representation shall retain 🔗 1. Cartesian box values, coordinate identity and valid use and 🔗 4. Box conversion from bounded-difference shapes. Unbounded valid store coordinates are admitted. The initialized numerical runtime and all intermediate policy prerequisites shall hold; the caller shall provide and retain ownership of an upward FPU environment.
The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The borrowed store and its live coordinate objects shall remain valid throughout the call. Recoverable numerical and resource exceptions may leave a partially refined store in the state permitted by its operations; discarded owned temporaries shall be released.
RATIONALE: A relational state can strengthen a separate interval store without discarding a valuation common to both approximations.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.
template <typename Interval_Info> void refine_fp_interval_abstract_store( Box<Interval<T, Interval_Info>>& store) const;
VERIFICATION_CRITERIA: Derive coordinate extrema by exact rational projection of correlated halfspaces, combine them with independently specified input intervals, and compare containment/contraction; check exact Cartesian intersections where 🔗 4. Box conversion from bounded-difference shapes guarantees them. Cover empty and zero-dimensional states, unbounded coordinates, open store boundaries, inexact native bounds, mismatched dimensions, source preservation and allocation failure.
SOURCE: src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh;
-
4. Export of unary constraints through a destination protocol UID: PPL-SPEC-001136 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a destination whose dimension is at least the source dimension, export_interval_constraints(dest) shall restrict the corresponding coordinates using the receiver's unary lower and upper consequences. The destination's remaining coordinates and ambient dimension shall be preserved. Source closure may expose implied unary constraints but shall preserve its represented set.
If D is the entry destination set and H(X) the Cartesian hull of the source's entry set, the completed destination shall contain D∩(H(X)×Rm − n) and be contained in D, where n and m are the source and destination dimensions. When source closure arithmetic and destination restrictions are exact, including exact unbounded rational bounds, the result shall equal that intersection. Rounded closure or destination arithmetic may lose precision; no best-unary-bound promise shall follow in those profiles.
An empty source shall call the destination's emptying operation. A zero-dimensional universe shall contribute no restrictions. Unbounded coordinate sides shall contribute no finite restriction. Each restriction callback shall return false exactly when its destination is empty; a false result shall terminate further restriction calls. No fixed callback count or coordinate order is promised. A destination of smaller dimension shall cause std::invalid_argument before any restrictive callback.
The destination protocol shall implement the indicated conjunctions and preserve coordinates not selected by a callback. Its callbacks shall not invalidate borrowed objects or modify the source being traversed. Callback exceptions may leave a partially restricted destination, with the states and ownership guaranteed by that destination's operations.
The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The destination and its callback environment shall remain live for the call. Discarded owned temporaries shall be released on reported failure.
RATIONALE: The callback protocol supports destinations larger than a same-type box and exposes unary information independently of the native floating-store adapter.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.
template <typename U> void export_interval_constraints(U& dest) const; // Required destination capabilities: dimension_type U::space_dimension() const; void U::set_empty(); bool U::restrict_lower(dimension_type dim, const T& lower); bool U::restrict_upper(dimension_type dim, const T& upper);
VERIFICATION_CRITERIA: Use independent rational coordinate projections and a destination implementation with literal interval semantics. Verify larger dimensions and preserved extra coordinates, implied correlated bounds, empty/zero-dimensional sources, ignored infinite sides, too-small rejection, callback short-circuiting and throwing callbacks without imposing rollback or incidental call order. Include exact rational, rounded native/integer and actual no-FPU configurations.
SOURCE: src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh;
-
1. Addition and subtraction of intervals admitting infinity points UID: PPL-SPEC-001716 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For extended-real entry sets X and Y, add_assign(x,y) and sub_assign(x,y) shall enclose the hull of all their defined extended-real sums and differences. Opposite infinities shall have no sum and equal infinities no difference; these undefined pairs shall contribute no value. With exact endpoint operations and supported membership the enclosure shall be exact. If there is no defined pair, the result shall be empty.
A finite nonempty interval combined with an included infinity singleton shall give the corresponding signed infinity, reversing the right infinity for subtraction. Equal-sign infinity singleton sums and opposite-sign singleton differences shall retain the defined infinity. For rays, a finite extremum shall be attained exactly when its required source extrema are attained; a same-sign infinite sum shall be included if either operand can attain that infinity. Opposite outward rays shall retain every defined finite sum, independently of whether their infinite endpoints are included.
Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.
The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.
INTERFACE: Public header: <ppl.hh>; Interval::add_assign and Interval::sub_assign for compatible extended-real interval operands.
VERIFICATION_CRITERIA: Check finite/infinity singleton permutations, same/opposite infinity pairs, both open/closed finite ray endpoints, included/excluded infinite endpoints, opposite rays and each output alias. Derive expected sets from explicit extended-real pairs rather than applying ordinary-real contracts to infinity.
SOURCE: src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.
-
Incoming link from: 3. Degenerate and singular extended interval products and quotients1
2. Sign-stable extended interval products and quotients UID: PPL-SPEC-001717 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For two nonempty extended-real intervals each wholly strictly positive or wholly strictly negative, mul_assign(x,y) and div_assign(x,y) shall enclose the interval hull of all defined extended-real products or quotients. A zero endpoint may be approached but shall not be included under this sign-stable contract. Infinity divided by infinity shall be undefined and contribute no value; finite values divided by an included infinity shall contribute zero. With exact admitted endpoint operations and supported membership, the resulting enclosure shall be exact for these sign-stable operands.
The signs shall select the mathematical orientation of the result. An infinite product shall be included when an applicable infinite factor is included and a nonzero partner exists. A quotient's zero endpoint shall be included when a finite numerator can be divided by an included infinity; an infinite quotient shall be included when an included infinite numerator has a finite nonzero denominator. Endpoint limits alone shall not establish attainment. These rules shall allow zero and infinity inclusion to vary independently in a ray quotient.
Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.
The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.
INTERFACE: Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for compatible, strictly one-sign extended intervals.
VERIFICATION_CRITERIA: Cross positive/negative rays with bounded nonzero intervals and other rays. Vary finite endpoint openness and infinite endpoint inclusion independently. Compare literal expected sign-oriented sets, zero/infinity attainment and unchanged separate inputs. Exercise exact rational endpoints and admitted receiver aliases; retain zero-crossing divisor tests under their separate ordinary-interval abstraction contract.
SOURCE: src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.
-
3. Degenerate and singular extended interval products and quotients UID: PPL-SPEC-001718 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For initialized, valid intervals over a common extended-real carrier, mul_assign(x,y) and div_assign(x,y) shall enclose every defined extended-real product or quotient of their entry sets. NaN shall not be an interval element. Zero times infinity, infinity divided by infinity and division by zero shall be undefined and shall contribute no value. An empty operand shall yield an empty result.
With exact admitted endpoint operations and supported membership, an infinity singleton multiplied by a finite interval shall yield empty if that interval contains only zero, the appropriately signed infinity if its nonzero elements have one sign, and the interval hull of both infinity points if both signs occur. An included zero shall contribute no extra product. Products of infinity singletons shall retain the product sign. An infinity singleton divided by a finite interval shall have the analogous sign-dependent image of its nonzero denominator elements. Dividing an infinity singleton by another infinity singleton or by a zero singleton shall yield empty. Dividing a nonempty finite interval by an included infinity singleton shall yield the zero singleton.
For a finite strictly positive or strictly negative numerator interval and a one-sided finite denominator interval approaching zero, division shall enclose the correspondingly signed unbounded ray. An infinite bound that arises only as a limit shall be excluded when the receiving policy can express that distinction. For a denominator with both negative and positive finite elements, a conservative universe result shall be permitted, including when the exact quotient has disconnected pieces. When a nonempty finite numerator is divided by a denominator containing zero and values of both signs, the returned I_Result shall include I_SINGULARITIES under 🔗 1. Interval result possibilities and status-flag set operations. A singularity indication shall not assert that an undefined pair has a value.
The source and receiving policies shall admit the required actual infinity points, empty results and finite scalar operations. An excluded infinite endpoint shall denote an unbounded finite extent. Numerical intermediates, resources, canonical-rational values, synchronization, shared temporaries and caller-owned FPU state shall meet the scalar kernels' prerequisites. Inexact arithmetic or an unsupported membership distinction may enlarge the result but shall not exclude defined values. Receiver aliases shall use both entry sets; distinct operands shall remain unchanged. Scalar failures shall retain their own guarantees without a universal rollback promise. Sign-stable cases shall retain 🔗 2. Sign-stable extended interval products and quotients, and ordinary-real interval division shall retain 🔗 4. Ordinary interval division and zero-divisor abstraction.
RATIONALE: Infinity singletons, zero operands and zero-crossing divisors are outside the strictly one-sign operand domain and need explicit defined-pair and conservative-enclosure rules.
INTERFACE: Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for policies admitting actual infinity points.
VERIFICATION_CRITERIA: Compare literal infinity, empty, zero, ray and universe results for both infinity signs and positive, negative, zero, mixed-sign and empty partners. Check finite division by an infinity singleton, infinity divided by infinity, one-sided zero limits and zero-crossing divisors. Repeat with open and closed endpoint policies and available native floating types. Check direct and supported aliased outputs, unchanged separate sources and singularity flags where specified.
SOURCE: src/Interval_inlines.hh; src/Interval_templates.hh; tests/Box/intervalcontracts1.cc.
-
1. Ordinary interval additive inversion UID: PPL-SPEC-000729 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: neg_assign(x) shall replace the receiver by an outward interval enclosure of { − a ∣ a ∈ X}, where X is the source entry set. Empty shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be exact: source upper/lower endpoints shall become negated lower/upper endpoints, with their respective membership interchanged. Unbounded lower/upper extents shall exchange sign and side. An inexact conversion or unsupported openness shall enlarge the result without excluding source images.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Additive inversion reverses endpoint order and membership while remaining safe when the receiver is the source.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From> I_Result neg_assign(const From& x);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare all finite rational endpoint orders/topologies and scalar values with the independent negated endpoint model. Include empty, source/receiver aliasing, rays, universe, same-family integer endpoints and supported directed conversion.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
2. Ordinary interval addition and subtraction UID: PPL-SPEC-000730 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_assign(x,y) shall enclose {a + b ∣ a ∈ X, b ∈ Y}; sub_assign(x,y) shall enclose {a − b ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, these interval images shall be exact. For finite nonempty operands, addition shall use the sums of lower endpoints and upper endpoints. Subtraction shall use the first lower minus second upper endpoint, and first upper minus second lower endpoint. An extremum shall be attained exactly when both required source extrema are attained. Ordinary unbounded extents shall propagate according to these set images. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Addition and subtraction use different endpoint pairings; subtraction must preserve the source entry endpoints under either operand alias.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result add_assign(const From1& x,const From2& y); template <Interval_Source From1, Interval_Source From2> I_Result sub_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare exact rational endpoint/cell models with every finite topology and endpoint order, both operand orders, scalar forms, empty cases and each receiver alias. Check ordinary rays/universe and same-family integral arithmetic and directed integral division.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
3. Ordinary interval multiplication UID: PPL-SPEC-000731 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: mul_assign(x,y) shall enclose {ab ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be the exact interval image. For finite nonempty operands its extrema shall be the least and greatest of the four endpoint products. Endpoint membership shall account for every tied extremizer and for an attained zero in either operand; it shall not infer that zero is excluded merely because one nonzero factor approaches an excluded endpoint. Ordinary unbounded endpoints shall retain their limiting meaning, including a singleton zero multiplied by an unbounded interval. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Multiplication needs sign-sensitive extrema and zero-attainment rules in addition to numerical endpoint products.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result mul_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Independently evaluate all four exact finite endpoint products and tied/zero attainment for every source topology/sign combination. Include both operand orders, scalar forms, empty and zero singletons, each receiver alias and the dedicated ordinary unbounded-zero/ray regressions.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
Incoming links from: 1. Addition and subtraction of intervals admitting infinity points 2. Sign-stable extended interval products and quotients 3. Degenerate and singular extended interval products and quotients 5. Ordinary interval arithmetic value operators 3. Outward endpoint quotients and zero-limit candidates5
4. Ordinary interval division and zero-divisor abstraction UID: PPL-SPEC-000732 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: div_assign(x,y) shall enclose {a ⁄ b ∣ a ∈ X, b ∈ Y, b ≠ 0}. An empty operand or a divisor consisting only of zero shall give empty. A divisor with negative and positive values shall give universe as the specified conservative interval abstraction, including when a tighter interval image could be representable. A divisor with only one nonzero sign, possibly with zero as an endpoint, shall retain every defined quotient; zero-denominator pairs shall not become mathematical results. The negative-and-positive divisor branch shall return I_UNIVERSE | I_SINGULARITIES. It shall not infer exactness of the quotient image from exact assignment of the universe representation.
For finite nonempty operands whose divisor has finite endpoints strictly on one side of zero, exact admitted endpoint operations and supported membership shall give the exact interval image. Its extrema shall be the least/greatest of the four endpoint quotients; attainment shall account for all ties and an attained zero numerator. A one-sided divisor approaching zero may require an unbounded endpoint. Inexact conversion or unsupported openness may enlarge the result.
Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Excluding undefined zero-denominator pairs differs from choosing a conservative universe. A zero numerator has only zero defined quotients, while a numerator and divisor both crossing zero can have every real quotient, so the same conservative branch cannot uniformly certify either exactness or inexactness.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <Interval_Source From1, Interval_Source From2> I_Result div_assign(const From1& x,const From2& y);
VERIFICATION_CRITERIA: Compare four-corner rational quotient extrema and tied/zero attainment for all finite topologies with a divisor bounded away from zero. Check empty/zero divisors, negative/positive divisor signs, strict crossing with a zero numerator, one-sided zero limits, scalar forms and each receiver alias. Check directed integral quotient enclosures. Check result claims for zero, one-sided and crossing numerators over a divisor crossing zero, including both exact and inexact universe images and each receiver alias. Distinguish zero-only and empty divisors from the crossing singularity branch.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.
-
5. Ordinary interval arithmetic value operators UID: PPL-SPEC-000733 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The free binary +, -, * and / operators shall return an independent interval value of the interval operand's boundary/information type, with the corresponding semantics of 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction. They shall support two intervals of that type, an interval followed by an admitted scalar singleton, and a scalar followed by an interval. Operand order shall be preserved for subtraction and division. Separate returned values shall not share mutable owned endpoint storage with their operands.
Operands shall satisfy the corresponding assignment operation's numerical, policy and runtime prerequisites. Operand values shall remain unchanged on successful return. Access shall be synchronized with mutation. Allocation or numerical exceptions shall propagate with the corresponding operation's guarantees. No additional library initialization shall be required.
RATIONALE: Value operators must retain directed assignment semantics, operand order and independent ownership.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:
template <typename B,typename Info> Interval<B,Info> operator+(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator+(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator+(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator-(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator-(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator-(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator*(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator*(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator*(const T& x,const Interval<B,Info>& y); template <typename B,typename Info> Interval<B,Info> operator/(const Interval<B,Info>& x, const Interval<B,Info>& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator/(const Interval<B,Info>& x,const T& y); template <typename B, typename Info, Interval_Singleton T> Interval<B,Info> operator/(const T& x,const Interval<B,Info>& y);
VERIFICATION_CRITERIA: Exercise all twelve overload forms against independent literal rational results, including asymmetric subtraction/division, empty and zero-divisor cases. Mutate/destroy operands and returned values independently to check storage ownership; retain no-initialization and numerical configuration controls.
SOURCE: src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc.
-
4. Refinement of a floating interval abstract store UID: PPL-SPEC-001239 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000023 Sound interval arithmetic (Specifies)
- PPL-LLR-000061 Octagonal expressiveness (Specifies)
- PPL-LLR-000062 Conservative octagonal constants (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a supported native floating boundary type T and a valid Box<Interval<T,Interval_Info>> store of the same ambient dimension, refine_fp_interval_abstract_store(store) shall intersect the store with the outward Cartesian enclosure of the receiver supplied by the box conversion of 🔗 5. Box conversion from octagonal shapes. It shall retain every point of the entry store lying in the source shape and shall introduce no point outside the entry store. The source represented set and both ambient dimensions shall remain unchanged; logically const source closure may refresh caches.
Empty source or empty store shall yield an empty store. Zero-dimensional empty and universe cases shall preserve their distinct meanings. When the source closure and target endpoint arithmetic satisfy the exactness conditions of 🔗 5. Box conversion from octagonal shapes, the result shall equal the store's intersection with the least Cartesian enclosure of the source; otherwise outward approximation may retain additional points. Incompatible dimensions shall throw std::invalid_argument without changing the store's represented set.
The selected native format shall satisfy its configured supported-format predicate. The box and interval representation shall retain 🔗 1. Cartesian box values, coordinate identity and valid use and 🔗 5. Box conversion from octagonal shapes. Unbounded valid store coordinates are admitted. The initialized numerical runtime and all intermediate policy prerequisites shall hold; the caller shall provide and retain ownership of an upward FPU environment.
The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. The borrowed store and its live coordinate objects shall remain valid throughout the call. Recoverable numerical and resource exceptions may leave a partially refined store in the state permitted by its operations; discarded owned temporaries shall be released.
RATIONALE: A relational state can strengthen a separate interval store without discarding a valuation common to both approximations.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>.
template <typename Interval_Info> void refine_fp_interval_abstract_store( Box<Interval<T, Interval_Info>>& store) const;
VERIFICATION_CRITERIA: Derive coordinate extrema by exact rational projection of correlated halfspaces, combine them with independently specified input intervals, and compare containment/contraction; check exact Cartesian intersections where 🔗 5. Box conversion from octagonal shapes guarantees them. Cover empty and zero-dimensional states, unbounded coordinates, open store boundaries, inexact native bounds, mismatched dimensions, source preservation and allocation failure.
BIBLIOGRAPHY: BagnaraHZ09FMSD | Sections 4 and 7 (octagonal representations and outward floating arithmetic).
SOURCE: src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001034 Threshold box widening and finite stabilization (Specified by)
- PPL-SPEC-001035 Default box widening and precision-sensitive delay tokens (Specified by)
- PPL-SPEC-001036 Box extrapolation with selected limiting constraints (Specified by)
- PPL-SPEC-001647 Threshold-aware CC76 box convergence certificates (Specified by)
- PPL-SPEC-000720 Independent outward endpoint extension (Specified by)
- PPL-SPEC-000721 Threshold interval widening and finite stabilization (Specified by)
PPL shall provide interval and box widening facilities. Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, a supported widening shall yield an upper bound of its input sets and shall stabilize its prescribed recurrence on ascending input sequences satisfying the stated ordering, threshold and finite-delay conditions.
Sound enlargement alone is not a widening guarantee; finite convergence is needed for iterative analysis.
Verification covers interval and box widening operations, supported profiles and convergence preconditions. Related obligations: 🔗 6. Compound extrapolation and finite convergence.
Check upper-bound inclusion at each iteration and analyze the convergence argument for each advertised widening. Exercise sequences with expanding finite bounds, finite threshold crossings and exhaustion of any finite delay budget.
CousotC76 | whole work (background) BlanchetCCFMMMR02 | whole work (background)
doc/definitions.dox: Widening and Extrapolation Operators on Boxes; Widening with Tokens. src/Box_defs.hh: interval widening and threshold contracts. src/Interval_defs.hh: interval widening contracts.
-
1. Threshold box widening and finite stabilization UID: PPL-SPEC-001034 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A Cartesian widening needs a sound coordinate rule and a finite endpoint progression under its actual operand order.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T, typename Iterator> requires (std::is_same_v<T, Box<ITV>> && std::is_convertible_v<const ITV&, const Interval_Base&>) void CC76_widening_assign(const T& y, Iterator first, Iterator last);
VERIFICATION_CRITERIA: Independently enumerate nested products with strict/closed endpoints, rays, zero-dimensional values and classified/lazy emptiness. Compute predecessor/successor thresholds from mathematical sets, including exact hits, duplicate thresholds and empty ranges. Exercise pointer, vector and bidirectional-list iterators, self-aliasing, unchanged inputs and ranges, dimensional rejection and ascending recurrences. Inspect the finite-coordinate convergence argument separately from sample iterations.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2, Widening (PDF page index 4, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.
-
2. Default box widening and precision-sensitive delay tokens UID: PPL-SPEC-001035 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A delay budget should preserve precision when widening would lose it, while keeping the number of postponed losses finite.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
template <typename T> requires (std::is_same_v<T, Box<ITV>> && std::is_convertible_v<const ITV&, const Interval_Base&>) void CC76_widening_assign(const T& y, unsigned* tp = nullptr); void widening_assign(const Box& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Compare the default overload and wrapper with an independent five-threshold model. Check null, zero, one and larger budgets; exact versus strictly enlarging results; repeated calls; empty and zero-dimensional cases; self-aliasing and source preservation. Verify counter changes and ascending histories through budget exhaustion, including arbitrarily many exact calls. Check mismatch rejection before counter replacement.
BIBLIOGRAPHY: BagnaraHRZ05SCP | Section 7, widening with tokens (PDF page index 29, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.
-
3. Box extrapolation with selected limiting constraints UID: PPL-SPEC-001036 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: 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.
RATIONALE: A fixed set of satisfied coordinate limits can recover precision discarded by widening while preserving both input sets.
INTERFACE: Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:
void limited_CC76_extrapolation_assign(const Box& y, const Constraint_System& cs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Independently select satisfied unary constraints from exact entry products, construct their coordinate enclosure and intersect it with the independently modeled delayed widening. Include equalities, strict and non-strict bounds, scaled rows, ignored relational/constant constraints, violated limits, repeated limits, inexact endpoint conversions and token changes. Check fixed-limit ascending recurrences and the finite candidate-bound argument. Check input preservation, aliasing, classified/lazy empty states, zero dimensions and rejection of dimension errors before mutation. Create lazy empty factors without querying or copying the box before the call. Check strict bounds on empty and zero-dimensional inputs without changing the represented set or counter.
BIBLIOGRAPHY: BagnaraHRZ05SCP | Section 7, fixed finite limiting constraints and convergence caveat (PDF page index 30, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/limitedcc76extrapolation1.cc.
-
Incoming link from: 7. C generated convergence operations1
5. Threshold-aware CC76 box convergence certificates UID: PPL-SPEC-001647 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: 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.
RATIONALE: If a finite endpoint moves outward, CC76 moves it to a stopping point beyond its previous value or extends it to the carrier extent. The threshold count or the finite-endpoint contribution then drops by at least one, dominating any one-bit openness increase. If the endpoint value does not move, containment permits only unchanged membership or closing an open endpoint. Summing these finite descending ranks supplies a certificate; affine dimension and facet count alone miss movement through stopping points.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.
CC76_Certificate(); template <typename ITV> explicit CC76_Certificate(const Box<ITV>&); CC76_Certificate(const CC76_Certificate&); CC76_Certificate& operator=(const CC76_Certificate&); int compare(const CC76_Certificate&) const; template <typename ITV> int compare(const Box<ITV>&) const; struct Compare { bool operator()(const CC76_Certificate&, const CC76_Certificate&) const; };
VERIFICATION_CRITERIA: Check defaults, copies, assignment and ordering. Distinguish threshold progress from unchanged H79 facets. Enumerate nested rational endpoint cases with strict and closed boundaries on both sides, including within-cell growth, exact hits and becoming unbounded. Include a bounded carrier without a special infinity representation and check extension to both carrier limits. Check a disjunctive ascending history that stabilizes under certified BHZ03 while ordinary joins keep growing, and reject empty construction. Inspect the finite-rank argument independently of these sample histories.
BIBLIOGRAPHY: BagnaraHZ06STTT | Section 2.1, finite convergence certificates; Section 7, Definition 16 and Theorem 3, certificate-based powerset widening. BagnaraHZ06STTTerratum | Corrected figures for the preceding article.
SOURCE: src/CC76_Certificate_types.hh; src/CC76_Certificate_defs.hh; src/CC76_Certificate_inlines.hh; tests/cc76certificatespec1.cc; tests/Box/bhz03widening1.cc.
-
3. Independent outward endpoint extension UID: PPL-SPEC-000720 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000021 Interval boundary membership (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000024 Convergence of interval and box widening (Specifies)
STATEMENT: For a nonempty initialized valid receiver, lower_extend() shall replace its lower endpoint by the lower extent of the receiving carrier, and upper_extend() shall analogously replace its upper endpoint by the upper extent. The other endpoint shall remain unchanged. The result shall contain the entry interval and remain valid under its information policy.
lower_extend(c) shall admit finite relations V_GT, V_GE and V_EQ. It shall replace the lower endpoint by the lesser of its entry endpoint and the cutoff, taking an open cutoff for V_GT and a closed cutoff otherwise. upper_extend(c) shall analogously admit V_LT, V_LE and V_EQ and take the greater endpoint, with an open cutoff for V_LT and a closed cutoff otherwise. Equal limits shall be included when either alternative includes them. Conversion shall be outward when the selected scalar cannot store a cutoff exactly.
For either constrained overload, V_LGE shall perform the corresponding unconstrained extension without reading a cutoff; V_NAN shall preserve the receiver without reading a cutoff. Those unused cutoff values need not be initialized or bound. The ignored V_NAN overload shall also admit an empty valid receiver and preserve it. It shall return I_ANY | I_EXACT | I_UNCHANGED without certifying nonemptiness. The other admitted constrained operations shall require a nonempty receiver. Other relations shall lie outside these endpoint-extension overloads' admitted protocol. Separate cutoff sources shall remain unchanged. Endpoint metadata shall preserve unbounded extent meaning independently of an inactive payload.
Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.
RATIONALE: Endpoint extension must enlarge one side without disturbing the other. Ignoring a descriptor preserves the represented set, including an empty set, without establishing that set's shape.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
I_Result lower_extend(); I_Result upper_extend(); template <Interval_Constraint_Source C> I_Result lower_extend(const C& c); template <Interval_Constraint_Source C> I_Result upper_extend(const C& c);
VERIFICATION_CRITERIA: Check each admitted finite relation against independent minimum/maximum endpoint formulas, including already unbounded sides, inward/no-op cutoffs, equal open/closed limits and both signs. Check unchanged opposite endpoints, nonempty-receiver prerequisites for active extensions, source preservation and unconstrained/no-op relations with unreadable cutoffs. Check ignored descriptors on empty, singleton, proper and universe receivers; verify exact/unchanged claims and defer uncertain emptiness to the actual representation.
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalconstructionspec1.cc; tests/intervalresultsspec1.cc.
-
1. Threshold interval widening and finite stabilization UID: PPL-SPEC-000721 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT: For nonempty intervals with the previous set Y contained in the receiving current set X, CC76_widening_assign(y,first,last) shall replace the receiver by an interval containing X and Y. This interface shall use the same boundary/information type for both operands. The range shall use readable, multipass bidirectional iterators. It shall be finite, sorted in nondecreasing numerical order and stable throughout the call; its finite threshold values shall be exactly representable by the boundary type. Duplicate thresholds and an empty range shall be permitted. The range shall not alias endpoint storage changed by the operation.
A finite upper endpoint that has increased numerically from Y to X shall be replaced by the least threshold not below that endpoint, or by the upper carrier extent when no such threshold exists. A finite lower endpoint that has decreased numerically shall be replaced by the greatest threshold not above it, or by the lower carrier extent when no such threshold exists. A threshold equal to the current endpoint shall be retained. Other finite endpoints shall remain unchanged; an existing unbounded endpoint shall remain unbounded. Finite endpoint openness shall be retained when moving to a threshold. Extending to a carrier extent shall use that policy's unbounded-endpoint representation. Self-aliasing shall preserve the represented set.
For a fixed finite threshold range and an ascending input sequence, the recurrence shall first enclose the previous widened result and the next input, then widen that enclosure against the previous widened result. Starting from a nonempty interval, this recurrence shall stabilize after finitely many changes: each endpoint can pass only through the finite threshold set and its carrier extent; endpoint membership can weaken only finitely often. This guarantee shall require exact admitted comparisons, assignments and a fixed policy/range throughout the recurrence.
Operands shall be live, initialized and valid intervals over the declared ordinary real carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.
RATIONALE: A widening needs both an upper-bound property and a finite-stabilization argument under its actual operand order and threshold discipline.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:
template <Interval_Like From, typename Iterator> void CC76_widening_assign(const From& y, Iterator first, Iterator last);
VERIFICATION_CRITERIA: Enumerate nested ordinary rational intervals, open/closed endpoints, rays, sorted threshold sets with duplicates, exact threshold hits and exhaustion. Check independent predecessor/successor threshold choices, both inclusions, unchanged source/range and self-aliasing. Exercise pointer, vector and bidirectional-list ranges, ascending recurrences and separately inspect the finite-threshold convergence argument.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2 (journal background on PPL widening and convergence). CousotC76 | Whole work (original widening framework).
SOURCE: src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
For compatible boxes with the same supported interval profile, PPL shall provide intersection and upper-bound operations. Under their documented arithmetic preconditions, intersection shall denote the exact set intersection and the upper bound shall denote the least box of that profile containing both inputs.
Box denotation and interval arithmetic do not by themselves establish the behavior of the domain's meet and join.
Verification covers box intersection and upper-bound operations, compatibility conditions and interval-profile restrictions. Related obligations: 🔗 1. Interval boundary membership, 🔗 2. Cartesian meaning of boxes, 🔗 3. Polyhedral intersection and hull, 🔗 3. Grid intersection and grid hull.
Derive products of independent coordinate intersections and interval hulls. Check empty, universe and zero-dimensional inputs, unbounded coordinates and admitted endpoint-openness combinations. Compare the result with the least enclosing box in the same profile rather than with an exact disjunctive union.
src/Box_defs.hh: intersection and smallest containing box contracts. src/Box_templates.hh: box operations. src/Interval_defs.hh: interval intersection and hull.
-
Incoming link from: 3. Box extrapolation with selected limiting constraints1
4. Cartesian box intersection UID: PPL-SPEC-000976 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, intersection_assign(y) shall replace the receiver by the exact set intersection of the two entry values, preserving their ambient dimension. Each nonempty result factor shall be the corresponding interval intersection. Empty and universe shall obey the ordinary set identities, including dimension zero. The operation shall admit self-intersection and shall preserve a distinct donor's represented value. Any empty factor shall make the result empty regardless of cached classification.
Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: Exact coordinate intersections implement the meet of Cartesian boxes without introducing correlations or losing endpoint openness.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
void intersection_assign(const Box& y);
VERIFICATION_CRITERIA: Derive coordinate intersections independently for all supported endpoint combinations. Include touching open/closed bounds, unbounded factors, empty coordinates in different positions, lazy/marked states, zero dimensions, self-aliasing, donor preservation and mismatched dimensions. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/intersection1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
5. Least same-profile box upper bound UID: PPL-SPEC-000977 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal ambient dimension, upper_bound_assign(y) shall replace the receiver by the least box of that profile containing both entry sets. For nonempty operands this shall use the coordinate-wise least interval hulls; endpoint inclusion shall retain every admitted input point. An empty operand shall be neutral, including a lazily empty operand, and the zero-dimensional cases shall retain empty/universe meaning.
The operation shall admit a donor identical to the receiver, preserve the represented value of a distinct donor and keep ambient dimension. Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value. The result need not equal the union.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: The least enclosing Cartesian product may fill gaps or introduce combinations absent from the disjunctive union.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
void upper_bound_assign(const Box& y);
VERIFICATION_CRITERIA: Compare independent coordinate hulls and openness with both input sets, including crossing coordinate choices, contained operands, separated intervals, equal extrema, empty/universe, zero dimensions, lazy state, self-aliasing, preserved donors and mismatches. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperbound1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.
-
6. Conditional exact union of boxes UID: PPL-SPEC-000978 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000416 Box intersection and least upper bounds (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
STATEMENT: For same-profile boxes of equal dimension, upper_bound_assign_if_exact(y) shall return true exactly when their set-theoretic entry union is representable as a box of that profile. On true it shall replace the receiver by that union. On false the receiver's represented value shall remain unchanged; a partial coordinate hull shall not escape as a failed result. A distinct donor shall remain unchanged in either case.
Exactness shall account for gaps and excluded touching endpoints within a factor, and for incompatible alternatives in different coordinates. Mere intersection or exactness of every separate coordinate hull shall not establish exactness of the Cartesian union. Empty, equal, contained, zero-dimensional and self-aliased operands shall use their set meanings. Dimension mismatch shall throw std::invalid_argument before replacement.
The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.
RATIONALE: An exact-union query must distinguish a true disjunction from the potentially larger product of its coordinate hulls.
INTERFACE: Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:
bool upper_bound_assign_if_exact(const Box& y);
VERIFICATION_CRITERIA: Independently decide union equality with the Cartesian hull, including one-axis changes, opposite containment directions across axes, separated and touching factors with all openness choices, contained/empty/equal/zero-dimensional states, every rejection position, false-result preservation and self histories.
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperboundifexact1.cc.