Parma Polyhedra Library requirements
C++ product operations
PPL-SPEC-001448
1. Product descriptor addition, refinement and recycling UID: PPL-SPEC-001448 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Ordinary addition and refinement shall apply the corresponding operation to both components and mark reduction unknown. The intersection shall retain all source points satisfying the supplied restrictions, with component exactness and admission conditions. Exact-addition members shall require admission by each called component. Recycling shall first refine the nonconsuming component, then pass the system to a component advertising recycling; if neither advertises it, both shall use ordinary addition. The source may be consumed only after the other component has read it. Failure shall not promise rollback of either component or recycled input.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

Information must reach both components before an input system is consumed.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

void add_constraint(const Constraint&); void add_constraints(const Constraint_System&);
void add_congruence(const Congruence&); void add_congruences(const Congruence_System&);
void refine_with_constraint(const Constraint&); void refine_with_constraints(const Constraint_System&);
void refine_with_congruence(const Congruence&); void refine_with_congruences(const Congruence_System&);
void add_recycled_constraints(Constraint_System&);
void add_recycled_congruences(Congruence_System&);
VERIFICATION_CRITERIA:

Check addition/refinement, unsupported rows, recycling into either component and no-recycling paths, source consumption and post-mutation reduction.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/addcongruences1.cc; tests/Partially_Reduced_Product/refinewithcongruences1.cc; tests/Partially_Reduced_Product/refinewithconstraints1.cc.

PPL-SPEC-001449
2. Product intersection UID: PPL-SPEC-001449 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Intersection shall intersect corresponding component pairs and mark reduction unknown. With exact component intersections, associativity of conjunction shall make the result the exact intersection of the represented products; approximate component intersections shall retain their soundness. Self-intersection shall be supported. Components shall have compatible ambient dimensions or throw std::invalid_argument.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

Unlike general images, intersection can be regrouped componentwise without losing cross-component information.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

void intersection_assign(const Partially_Reduced_Product&);
VERIFICATION_CRITERIA:

Independently derive four-way intersections, including independent component restrictions and self-aliasing.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/intersection1.cc.

PPL-SPEC-001450
3. Product component joins and component exactness UID: PPL-SPEC-001450 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Upper bound shall reduce both products, join corresponding components and mark reduction unknown. The resulting intersection shall contain both input products. The conditional member shall return true only if both component joins certify exactness; on false, the represented receiver shall remain unchanged apart from permitted reduction/cache changes. Exactness of each component join shall not imply exact union of the represented products. Self-join shall preserve value; dimension mismatch shall follow component std::invalid_argument admission.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

Intersection of two component unions can include cross-combinations absent from the union of the original products.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

void upper_bound_assign(const Partially_Reduced_Product&);
bool upper_bound_assign_if_exact(const Partially_Reduced_Product&);
VERIFICATION_CRITERIA:

Check both exactness failure paths, source/receiver unchanged controls, lazy policy reapplication and cross-combination precision loss.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/upperbound1.cc.

PPL-SPEC-001451
4. Sound product set difference UID: PPL-SPEC-001451 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Difference shall reduce both operands and form sound approximations of (A1⧵B1)∩A2 and A1∩(A2⧵B2), then take an upper bound of the nonempty alternatives. Known-empty alternatives shall not contribute unrelated nonempty components to that join. The result shall contain the exact product difference; component subtraction and join may lose precision. Self-subtraction shall give empty. Subtracting empty shall preserve the minuend, and empty minuend shall remain empty. Dimension mismatch shall still reach the documented component exception. Mutated alternatives and joins shall be marked for lazy reduction.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

De Morgan expansion makes difference a union of two product alternatives; subtracting both components simultaneously would lose valid states.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

void difference_assign(const Partially_Reduced_Product&);
VERIFICATION_CRITERIA:

Independently enumerate small product differences, both alternatives, empty/self inputs, no-reduction and sharing policies.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/difference1.cc; tests/Partially_Reduced_Product/directproduct3.cc.

PPL-SPEC-001461
5. Product closure and time elapse UID: PPL-SPEC-001461 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Closure shall apply each component's closure. Time elapse shall reduce both products, then time-elapse corresponding component pairs. The resulting intersection shall soundly contain the respective closure or time-elapse set of the original product. Component exactness shall not imply concrete product exactness, since closure or existential elapsed-time witnesses need not commute with intersection. Common ambient dimension and base arithmetic/admission conditions shall apply.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

Independent elapsed-time or limiting witnesses can overapproximate a jointly constrained transition.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

void topological_closure_assign();
void time_elapse_assign(const Partially_Reduced_Product&);
VERIFICATION_CRITERIA:

Check open/closed component boundaries, velocities, different component precision, empty values and sound concrete samples.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/timeelapse1.cc; tests/Partially_Reduced_Product/topclosure1.cc.

PPL-SPEC-001462
6. Product integer-coordinate tightening UID: PPL-SPEC-001462 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Integer tightening shall reduce first, apply the corresponding base restriction to both components and mark reduction unknown. The result shall lie within the old product and retain every old point integral in all selected coordinates. The overload without a variable set shall select all coordinates. The complexity argument shall limit the base algorithms used; no optimal integer hull or complete integer-feasibility decision shall be promised.

The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

RATIONALE:

Each component can tighten safely without proving a complete integer abstraction of their intersection.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

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:

Check partial/all coordinate selection, fractional boundaries, preserved integral points and component-policy reapplication.

SOURCE:

src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/dropsomenonintegerpoints1.cc.