Parma Polyhedra Library requirements
C++ interval widening and context operations

C++ interval widening and context operations

UID:
VERSION:
CLASSIFICATION:
PREFIX:
Type
Level
MID
UID
REFS
Title
Statement
Rationale
Comment
BIBLIOGRAPHY
STATUS
COMPONENT
APPLICABILITY
VERIFICATION_METHODS
VERIFICATION_CRITERIA
SOURCE
LANGUAGE
VISIBILITY
INTERFACE
SW_SPEC
1
PPL-SPEC-000721
Threshold interval widening and finite stabilization

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.

A widening needs both an upper-bound property and a finite-stabilization argument under its actual operand order and threshold discipline.

BagnaraHZ08SCP | Section 2 (journal background on PPL widening and convergence). CousotC76 | Whole work (original widening framework).

APPROVED
INTERVALS_BOXES
IF_CPP
Test, Analysis, Inspection

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.

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.

CPP
Public

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);
SW_SPEC
2
PPL-SPEC-000722
PPL-SPEC-000722
Meet-preserving interval context simplification

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.

Context simplification can remove bounds while preserving precisely the information relevant inside the context.

APPROVED
INTERVALS_BOXES
IF_CPP
Test, Analysis, Inspection

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.

src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.

CPP
Public

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

template <Interval_Like From>
bool
simplify_using_context_assign(const From& y);
SW_SPEC
3
PPL-SPEC-000723
PPL-SPEC-000723
Interval construction disjoint from a supplied context

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.

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.

APPROVED
INTERVALS_BOXES
IF_CPP
Test, Analysis, Inspection

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.

src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.

CPP
Public

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

template <Interval_Like From>
void
empty_intersection_assign(const From& y);