Parma Polyhedra Library requirements
C++ compound partitions

C++ compound partitions

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-001429
PPL-SPEC-001429
Exact linear polyhedron partitioning

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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&);
SW_SPEC
2
PPL-SPEC-001430
PPL-SPEC-001430
Finite and approximate grid partitioning

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.

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

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

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

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.

CPP
Public

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