Parma Polyhedra Library requirements
C++ pointset powerset coordinates

C++ pointset powerset coordinates

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-001420
PPL-SPEC-001420
Pointset-powerset coordinate growth

Embedding shall extend each disjunct with m unconstrained trailing coordinates, denoting S×Rm. Projecting growth shall extend with m zero coordinates, denoting S×{0}m. Empty shall retain empty meaning and acquire the new ambient dimension. Zero growth shall preserve the value. Growth exceeding the structural dimension limit shall throw std::length_error before extent-proportional allocation or dimension arithmetic overflow.

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.

Even an empty collection has an ambient dimension which must be updated and range-checked.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check free versus zero added coordinates, empty collections, zero growth and reserved/overflowing extents.

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/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/spacedims1.cc.

CPP
Public

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

void add_space_dimensions_and_embed(dimension_type);
void add_space_dimensions_and_project(dimension_type);
SW_SPEC
2
PPL-SPEC-001421
PPL-SPEC-001421
Pointset-powerset projection and coordinate mapping

Removal shall existentially project out the selected coordinates of every disjunct and compact remaining indices in order. Higher removal shall retain exactly the requested prefix. Mapping shall use an injective partial map with in-range source dimensions and compact destination range, retaining mapped coordinates and existentially eliminating the others. Empty map shall produce dimension zero. Empty collections shall still acquire the correct result dimension. Invalid removal extents shall throw std::invalid_argument; mapping shall meet 🔗 1. Public partial coordinate-map type and valid use– 🔗 8. Coordinate-map diagnostic printing and output failures and the base map's stated preconditions.

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.

Projection is not setting removed coordinates to zero, and dimension bookkeeping cannot depend on stored nonempty disjuncts.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check sparse projection, permutation/partial/empty maps, fractional witnesses, empty collections and invalid extents.

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/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/spacedims1.cc.

CPP
Public

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

void remove_space_dimensions(const Variables_Set&);
void remove_higher_space_dimensions(dimension_type);
template <typename Partial_Function> void map_space_dimensions(const Partial_Function&);
SW_SPEC
3
PPL-SPEC-001422
PPL-SPEC-001422
Pointset-powerset dimension expansion and folding

Expansion shall add m independent copies of the selected coordinate's base-domain restrictions using the base expansion operation. Folding shall merge selected coordinates into the retained destination by base folding and remove the folded coordinates. They shall lift per disjunct, update ambient dimension and inherit base soundness and precision. Variables shall be in range, fold destination shall be outside the folded set, and growth shall respect structural limits; invalid variables/sets shall throw std::invalid_argument and excessive growth std::length_error.

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 expansion differs from imposing equality between duplicate coordinates; folding may approximate unions of projections.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check relational expansion, independent duplicate values, folding with retained indices, empty sets and invalid dimensions. Fold previously reduced incomparable disjuncts into identical universes, and compare the public universe result with an unreduced-entry control in closed/NNC polyhedra, bounded-difference, octagonal and rational-box powersets.

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/Powerset/argumentadmission1.cc; tests/Powerset/spacedims1.cc.

CPP
Public

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

void expand_space_dimension(Variable, dimension_type);
void fold_space_dimensions(const Variables_Set&, Variable);
SW_SPEC
4
PPL-SPEC-001423
PPL-SPEC-001423
Pointset-powerset concatenation

Concatenation shall collect base concatenations for every pair of reduced disjuncts in receiver-then-argument coordinate order, representing S×T when base concatenation is exact and otherwise its sound base approximation. Empty input shall give empty in the sum dimension. Self-concatenation shall be supported. The sum dimension shall be range-checked without unsigned wraparound; excessive extent shall throw std::length_error.

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.

Cartesian product distributes over both input unions and includes ambient dimensions of empty inputs.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check cross-pair products, coordinate order, empty/self inputs and overflowing sums.

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/Powerset/argumentadmission1.cc; tests/Powerset/cancellation1.cc; tests/powersetinterruptedproducts1.cc; tests/Powerset/concatenate1.cc.

CPP
Public

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

void concatenate_assign(const Pointset_Powerset&);