Parma Polyhedra Library requirements
C++ box closure, time progression and integer-point normalization

C++ box closure, time progression and integer-point normalization

PPL-SPEC-001038
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):
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.

PPL-SPEC-001039
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):
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.

PPL-SPEC-001040
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):
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.