Parma Polyhedra Library requirements
C++ convex-polyhedron evolution

C++ convex-polyhedron evolution

PPL-SPEC-001360
1. Nonnegative polyhedral time elapse
UID: PPL-SPEC-001360
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Ordinary time elapse shall compute the least polyhedron of the receiver's topology containing {p + tq ∣ p ∈ P, q ∈ Q, t ≥ 0}, using the entry receiver P and operand Q. Empty in either operand shall give empty. Dimension and topology shall agree, otherwise std::invalid_argument shall be thrown. A distinct operand shall retain its represented value. The progression scalar shall be real, not integral, and zero time shall be admitted for nonempty operands.

The generator-system overload shall interpret its input as the rate polyhedron described by that system, using the receiver's topology. The rate system shall have the same ambient dimension as the receiver. An empty rate system shall give the empty result. A nonempty system without an included point, or a closed receiver with a user-visible closure point in the system, shall raise std::invalid_argument. These argument checks shall precede updates of the receiver. An independent input generator system shall retain its value and representation. If the input is a borrowed generator view of the receiver, the operation shall read its entry generators before any receiver update; the view shall then follow 🔗 2. Equivalent borrowed polyhedral descriptions. A singleton zero rate shall preserve the receiver's represented set.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

The cone of an NNC rate polyhedron may require a polyhedral enclosure, and closing the result is required by a closed target. Generator input permits a caller that already has a rate description to avoid constructing a rate polyhedron. For nonempty operands, the least polyhedral result is the sum of the initial set and the closed rate cone: every valid strict or nonstrict halfspace must admit nonnegative progression along each rate, and hence along that closed cone.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void time_elapse_assign(const Polyhedron&);
void time_elapse_assign(const Generator_System& rates);
VERIFICATION_CRITERIA:

Check literal rate cones, zero rates, open rate boundaries, original states at zero time, empty operands, self aliasing and compatibility rejection. Compare generator-input results with independently known cones and with the polyhedron-input overload. Cover unpaired NNC points and closure points, rays, lines, latent empty and pending receivers, both cache states, borrowed receiver generators, zero dimensions and validation before receiver updates. Exercise the powerset time-elapse callback with closed, NNC and recursive powerset operands.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/timeelapse1.cc; tests/Polyhedron/timeelapse2.cc; tests/Polyhedron/timeelapsegenerators1.cc.

PPL-SPEC-001361
2. Positive polyhedral time elapse
UID: PPL-SPEC-001361
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Positive time elapse shall compute the least polyhedron of the receiver's topology containing {p + tq ∣ p ∈ P, q ∈ Q, t > 0}. Zero time shall not be introduced merely by the definition; zero rates may nevertheless retain entry states. A closed receiver shall take the closed polyhedral enclosure. Both rate topologies shall be admitted by this variant. Dimensions shall agree, otherwise std::invalid_argument shall be thrown. Empty in either operand shall give empty. A distinct operand shall retain its value.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Strictly positive time can exclude initial boundary states; a closed result necessarily adds their appropriate limits.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

// Members of C_Polyhedron and NNC_Polyhedron:
void positive_time_elapse_assign(const Polyhedron&);
VERIFICATION_CRITERIA:

Check independent positive cones, excluded/retained origins, zero rates, empty and zero-dimensional operands, cross-topology rates and dimension mismatch.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/nncpostimeelapse1.cc.

PPL-SPEC-001362
3. Integer-point-preserving polyhedral restriction
UID: PPL-SPEC-001362
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Restriction shall return a polyhedron contained in the entry receiver that retains every entry point integral in the selected coordinates. The all-coordinate overload shall select all coordinates. Remaining points need not all be integral; no optimality guarantee shall be made, including under ANY_COMPLEXITY. Limited complexity may leave the value unchanged rather than materializing an expensive representation. Empty coordinate selection shall be a no-op. The selection shall contain only valid receiver coordinates.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Rounding individual constraints can remove fractional states without computing the integer hull.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void drop_some_non_integer_points(Complexity_Class=ANY_COMPLEXITY);
void drop_some_non_integer_points(const Variables_Set&,
                                 Complexity_Class=ANY_COMPLEXITY);
VERIFICATION_CRITERIA:

Enumerate bounded integer tuples independently, confirm retention and no enlargement, include subset selection, strict bounds, pending/cache and complexity-policy histories.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/dropsomenonintegerpoints1.cc; tests/Polyhedron/dropsomenonintegerpoints2.cc.

PPL-SPEC-001363
4. Sound bounded-integer wrapping in polyhedra
UID: PPL-SPEC-001363
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

For selected coordinates assumed integral, wrapping shall conservatively represent the outcomes for the selected modeled width and signed or unsigned representation. OVERFLOW_WRAPS shall reduce modulo 2w and choose the representative in the modeled range. OVERFLOW_IMPOSSIBLE shall retain only nonoverflowing outcomes; OVERFLOW_UNDEFINED shall permit arbitrary results on overflowing transitions. Unselected coordinates shall retain their correlations as far as the documented polyhedral abstraction preserves them. Optional constraints shall restrict the output state, may mention only selected coordinates, and may guide the partition of wrapping translations. All selected indices and optional descriptors shall be dimension-compatible; dimension mismatches shall throw std::invalid_argument. The complexity threshold and individual-wrapping flag may trade precision for work; they shall not exclude concrete outcomes.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Modeled machine overflow is distinct from overflow of the coefficients computing a sound enclosure.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void wrap_assign(const Variables_Set&, Bounded_Integer_Type_Width,
    Bounded_Integer_Type_Representation, Bounded_Integer_Type_Overflow,
    const Constraint_System* = nullptr, unsigned complexity_threshold=16,
    bool wrap_individually=true);
VERIFICATION_CRITERIA:

Enumerate small integer input sets and modular representatives, include signed endpoints, cross-coordinate relations, optional constraints, every overflow policy and both wrapping modes.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/wrap1.cc; tests/Polyhedron/wrap2.cc.

PPL-SPEC-001364
5. Exact polyhedral topological closure
UID: PPL-SPEC-001364
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

Closure assignment shall replace the receiver by its exact real topological closure. A closed receiver shall retain its value. NNC closure shall include the missing boundary points while preserving dimension, equalities and recession behavior. Empty and zero-dimensional values shall remain unchanged. Repetition shall be idempotent.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Closure changes membership at limits without changing the affine hull or introducing unrelated points.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void topological_closure_assign();
VERIFICATION_CRITERIA:

Check half-open intervals, lower-dimensional open sets, latent empty strict systems, both representation routes and idempotence. Check generator-derived receivers with both representations minimized before closure, including multiple boundary points that become unsorted on insertion; verify the exact closed generator hull, invariants and idempotence.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/topclosure1.cc.