Parma Polyhedra Library requirements
C++ compound partitions
PPL-SPEC-001429
1. Exact linear polyhedron partitioning UID: PPL-SPEC-001429 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

For compatible polyhedra p and q, linear_partition(p,q) shall return first denoting pโˆฉq and a finite NNC-polyhedron powerset second denoting qโงตp. Its nonempty residue pieces shall be pairwise disjoint and disjoint from p. Together with first they shall partition q. Equalities shall split into complementary sides; strict inequalities shall use their non-strict complement. Input values shall remain unchanged. The template base shall admit exact constraint conjunction for the returned first component.

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:

Excluded boundaries require NNC residues even when both inputs are closed.

INTERFACE:

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

template <typename PSET>
std::pair<PSET, Pointset_Powerset<NNC_Polyhedron>>
linear_partition(const PSET&, const PSET&);
VERIFICATION_CRITERIA:

Check interval cuts, equalities, strict boundaries, empty/universe and independent disjointness/union reconstruction.

SOURCE:

src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Polyhedron/linearpartition1.cc; tests/Powerset/difference1.cc.

PPL-SPEC-001430
2. Finite and approximate grid partitioning UID: PPL-SPEC-001430 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

approximate_partition(p,q,finite) shall return the exact grid intersection pโˆฉq as first. When the residue is finitely representable by the procedure, finite shall be true and second shall be a pairwise-disjoint finite grid partition of qโงตp. Otherwise finite shall be false and second shall soundly contain that residue, possibly returning q itself. Failure of an early finite partition shall not omit later input congruences from first. If the full intersection is empty, returning q shall be an exact finite residue. Inputs shall be dimension-compatible and remain unchanged.

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:

A grid complement may require infinitely many cosets; finite approximation must still compute the full intersection exactly.

INTERFACE:

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

std::pair<Grid, Pointset_Powerset<Grid>>
approximate_partition(const Grid&, const Grid&, bool& finite_partition);
VERIFICATION_CRITERIA:

Check even/odd residues, inhomogeneous and rational cosets, equality cuts without finite residue and late contradictions.

SOURCE:

src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Grid/approximatepartition1.cc; tests/Powerset/difference1.cc; tests/Powerset/gridpartition1.cc.