Parma Polyhedra Library requirements
C++ product operations

C++ product 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-001448
PPL-SPEC-001448
Product descriptor addition, refinement and recycling

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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&);
SW_SPEC
2
PPL-SPEC-001449
PPL-SPEC-001449
Product intersection

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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

void intersection_assign(const Partially_Reduced_Product&);
SW_SPEC
3
PPL-SPEC-001450
PPL-SPEC-001450
Product component joins and component exactness

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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&);
SW_SPEC
4
PPL-SPEC-001451
PPL-SPEC-001451
Sound product set difference

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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

void difference_assign(const Partially_Reduced_Product&);
SW_SPEC
5
PPL-SPEC-001461
PPL-SPEC-001461
Product closure and time elapse

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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&);
SW_SPEC
6
PPL-SPEC-001462
PPL-SPEC-001462
Product integer-coordinate tightening

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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);