Parma Polyhedra Library requirements
C++ bounded-difference evolution and integer restrictions

C++ bounded-difference evolution and integer restrictions

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-001128
PPL-SPEC-001128
Bounded-difference time evolution by nonnegative rates

Let X be the receiver's entry set and Y the rate argument's entry set, of the same ambient dimension n. time_elapse_assign shall replace the receiver by the least bounded-difference enclosure in the selected target profile of

E(X, Y) = {p + λq ∣ p ∈ X,  q ∈ Y,  λ ≥ 0}.

The abstraction and outward profile conversion shall have the meaning and arithmetic prerequisites of 🔗 2. Complexity-sensitive bounded-difference conversion from polyhedra. The carrier shall remain real even when the stored bounds are integers. A nonempty zero-dimensional pair shall remain the nonempty zero-dimensional value. Either empty operand shall make the result empty: a rate witness is required even at zero elapsed time. These meanings shall not depend on whether emptiness was already classified.

For nonempty operands under exact rational arithmetic, each unary or difference normal v shall retain the entry support supp ∈ Xv⋅p precisely when supq ∈ Yv⋅q ≤ 0; a positive or unbounded rate support shall make that result direction unbounded. Already unbounded state supports shall remain unbounded. Different coordinates shall share the same elapsed time; their correlations may be lost only by the stated bounded-difference abstraction.

Self-aliasing shall use both entry values. A distinct rate shape shall remain unchanged. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver or rate value.

The rate argument shall remain live and valid. A distinct rate argument shall preserve its represented value, and result storage shall remain independent of its lifetime.

The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

A rate set controls directions of unbounded evolution; zero elapsed time preserves states only when a rate witness exists. Primitive support bounds distinguish rate direction from independent coordinate translation.

HalbwachsPR97 | Sections 4.3.1–4.3.2, time-elapse operator; PDF page index 20 (zero-based).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Independently project exact rational state and rate supports and derive each retained or infinite result bound. Cross-check a homogenized common-time model on correlated examples. Exercise all rate signs, zero rates, lines, rays, fractional states, empty and lazy-empty operands, dimension zero, self-aliases, cache histories, profile conversions, source preservation and dimension rejection. Inject allocation failures in a separate executable.

src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; src/Polyhedron_public.cc; tests/BD_Shape/timeelapse1.cc.

CPP
Public

Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

void time_elapse_assign(const BD_Shape& y);
SW_SPEC
2
PPL-SPEC-001129
Integer-point restriction on every bounded-difference coordinate

For the receiver's entry set X ⊆ ℝn, drop_some_non_integer_points(complexity) shall produce a bounded-difference set R satisfying

X∩ℤn ⊆ R ⊆ X.

The ambient dimension shall be preserved. An empty receiver shall remain empty, including an unclassified inconsistent system. Zero-dimensional empty and nonempty values shall retain their distinct meanings. Selected complexity classes shall bound permitted algorithmic work without changing which integer points must be preserved.

The result may retain noninteger points. No least-integer-hull, strict precision improvement or removal of every fractional point shall be required. Integer storage of bounds shall not change the represented real carrier. An exact rational description with integral unary and difference bounds already equals the convex hull of its integer points and shall therefore retain its represented set under these inclusions.

Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites.

The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

Integer restriction may improve a real convex abstraction while preserving every integer solution. Integral difference inequalities already define an integral polyhedron, so real interior points can remain.

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Enumerate all integer candidates in independently bounded rational examples and verify their preservation; independently verify result inclusion in the entry halfspaces. Include fractional fixed points, negative and nonadjacent differences, affine equality fibers, unbounded integral rays, cache histories, zero dimensions, all supported complexity choices and admitted exact/inexact profiles. Do not treat an identity result as a failure without a stronger stated guarantee.

src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; tests/BD_Shape/dropsomenonintegerpoints1.cc.

CPP
Public

Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

void drop_some_non_integer_points(
    Complexity_Class complexity = ANY_COMPLEXITY);
SW_SPEC
3
PPL-SPEC-001130
PPL-SPEC-001130
Selected-coordinate integer restriction of bounded-difference values

Let S be the coordinates named by vars and X the receiver's entry set. drop_some_non_integer_points(vars,complexity) shall produce a bounded-difference set R with the same ambient dimension such that

{p ∈ X ∣ pi ∈ ℤ for every i ∈ S} ⊆ R ⊆ X.

Unselected coordinates shall retain their real interpretation. Their bounds may tighten through relations with selected coordinates; their fractional values shall not be discarded solely for being noninteger. An empty selection shall preserve the entry set. Empty, lazy-empty and zero-dimensional meanings shall be preserved. The global overload of 🔗 2. Integer-point restriction on every bounded-difference coordinate shall have the meaning of selecting every coordinate. All admitted complexity choices shall retain this preservation obligation; no least-hull or mandatory strict improvement shall be inferred.

Every selected coordinate shall be within the receiver dimension. An excess coordinate shall throw std::invalid_argument before represented-set modification, including for empty receivers and integral-bound profiles. The valid-use conditions of 🔗 1. Public coordinate-index set and value lifecycle shall govern the selection.

Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites. The selection shall remain live, valid and unchanged throughout the call.

The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

Mixed integer and real modeling requires preserving whole real fibers above selected integer coordinates. Relational propagation may tighten an unselected coordinate without making it integral.

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Independently enumerate selected integer assignments in bounded examples, retain exact rational free-coordinate slices and prove each slice is contained in the result by elimination. Check result inclusion in the entry set separately. Cover empty/full/nonadjacent selections, fractional unselected frames, one-coordinate versus joint restriction, translated equalities, unbounded slices, repeated histories, dimension rejection and preserved selection ownership.

src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; tests/BD_Shape/dropsomenonintegerpoints1.cc.

CPP
Public

Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

void drop_some_non_integer_points(
    const Variables_Set& vars,
    Complexity_Class complexity = ANY_COMPLEXITY);
SW_SPEC
4
PPL-SPEC-001131
PPL-SPEC-001131
Bounded-integer wrapping and guarded evolution of difference shapes

wrap_assign shall interpret widths, representations and overflow modes under 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes. For the receiver's entry set X and selected coordinate set S, the result shall conservatively contain every concrete selected-integer outcome, filtered by a supplied guard on the resulting coordinates. Unselected coordinates of each concrete outcome shall retain their entry values. The returned set shall remain a bounded-difference abstraction; relational implications, modular disjunctions and guard precision may be approximated.

For OVERFLOW_WRAPS, each selected integer shall be reduced to its signed or unsigned residue. OVERFLOW_IMPOSSIBLE shall preserve every transition whose selected input integers are within the modeled machine range and may discard overflowing transitions. OVERFLOW_UNDEFINED shall permit every modeled bounded-integer result after an overflowing arithmetic result; no particular residue shall be selected as its required meaning. Result bounds shall retain the profile's outward-conversion conditions. This arithmetic-result interpretation shall not claim to model other effects of language undefined behavior.

The selection and any nonnull guard shall satisfy their documented coordinate-dependency admission: the guard may use general or strict linear rows, but shall depend only on selected coordinates and its ambient dimension shall not exceed the selection dimension. Each selected coordinate shall be within the receiver dimension. Violating these dimension bounds shall throw std::invalid_argument before represented-set modification, including empty receivers and selections. Nonzero guard coefficients outside the selection shall be outside this contract's admitted inputs. A supplied guard shall use the valid descriptor context of 🔗 1. Constraint relation meaning and numerical prerequisites and 🔗 14. Constraint-system conjunction, construction and shared contradiction.

With an empty selection and null guard the receiver's represented set shall be unchanged. With a supplied dimension-compatible constant guard it shall perform conservative refinement; a false constant shall make the result empty. Empty receivers shall remain empty. Fractional input points on selected coordinates may be discarded, and fractional points may remain inside the result. A lower complexity_threshold or wrap_individually=true may permit less precision, but shall not permit loss of any required concrete outcome. No universal least-hull, progress or monotonic-precision guarantee between different parameter choices shall be inferred.

Only named width, representation and overflow enumerators shall be admitted. Modeled 128-bit widths shall not require a native 128-bit scalar or a 128-bit configured coefficient. Actual intermediate machine-limit, quadrant, translation, conversion and descriptor arithmetic shall satisfy the selected backend's supported range and numerical prerequisites. In particular, a modeled width alone shall not establish that configured Coefficient can compute every intermediate power of two or translation. Variables shall use 🔗 1. Public coordinate-index set and value lifecycle's valid-use conditions.

The selection and any supplied guard shall remain live, valid and unchanged throughout the call. Their independent storage shall remain owned by the caller.

The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

Wrapping interprets equivalence classes of machine integers while a relational abstraction preserves only representable consequences. Guard refinement must concern translated values and must remain sound when precision limits force a coarser result.

SimonK07 | Sections 2.2 and 5.1–5.4, bounded interpretations, explicit wrapping and guard precision; PDF page indices 2 and 7–10 (zero-based).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Independently enumerate selected integer input slices and derive residues with unbounded division and nonnegative remainders. For overflow uncertainty enumerate admitted machine values in small widths and use analytic machine-range models at larger widths. Apply guards to resulting slices, then check inclusion by rational elimination. Cover signed/unsigned, all three overflow choices, all modeled widths including 128 with capable arithmetic, fractional free frames, unbounded inputs, null/strict/constant/relational guards, sparse padded dependencies, both precision flags, several thresholds, ownership and early dimension rejection. Keep generic delegated checks distinct from BD-specific interface checks.

src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; src/wrap_assign.hh; tests/BD_Shape/wrap1.cc.

CPP
Public

Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

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);
SW_SPEC
5
PPL-SPEC-001132
PPL-SPEC-001132
Topological closure identity for bounded-difference values

topological_closure_assign shall preserve the represented set and ambient dimension of every valid bounded-difference value. These values are already topologically closed under 🔗 1. Bounded-difference values, numerical profiles and valid use, including lower-dimensional sets, unbounded sets, universe and empty values in every supported dimension. The operation shall not be interpreted as a demand to run graph shortest-path closure or to change a graph-normalization cache.

An unclassified inconsistent representation shall continue to denote empty; forcing an emptiness query shall not be a precondition for this identity. Storage ownership and validity shall be preserved. No additional numerical rounding setup or library initialization beyond the valid object's existing context shall be required; the caller's FPU rounding direction shall remain unchanged.

Topological closure is a semantic operation on represented points. Closed difference inequalities already express a closed set, independently of whether their graph representation has been normalized.

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Compare exact independent halfspace denotations before and after repeated calls on empty/lazy-empty/universe, affine, bounded and unbounded models. Check dimensions, source lifetime/ownership, numerical profiles and caller-FPU preservation without requiring graph-cache changes.

src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc.

CPP
Public

Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

void topological_closure_assign();