Parma Polyhedra Library requirements
C++ pointset powerset values

C++ pointset powerset values

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-001392
PPL-SPEC-001392
Dimensioned pointset-powerset construction

Construction from n and kind shall create empty or universe in dimension n. Default shall be the zero-dimensional universe. Empty shall retain its ambient dimension with no disjuncts; universe shall contain a base universe disjunct. max_space_dimension shall report the base structural limit. Requests above that limit or using a reserved dimension shall throw std::length_error before extent-proportional storage. The limit shall not promise allocation success for every admitted dimension.

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.

The ambient space is part of an empty value and remains subject to the same structural limits.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check both kinds in zero/positive dimensions, defaults and oversized/reserved dimensions without large allocation.

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/fromspacedimension1.cc.

CPP
Public

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

explicit Pointset_Powerset(dimension_type n=0, Degenerate_Element kind=UNIVERSE);
static dimension_type max_space_dimension();
dimension_type space_dimension() const;
SW_SPEC
2
PPL-SPEC-001393
PPL-SPEC-001393
Pointset-powerset copying, assignment and exchange

Same-type copying and assignment shall preserve dimension and represented union, including stored decomposition and reduction state, while permitting independent later mutations through copy-on-write disjuncts. Assignment shall return its receiver and support self-assignment. m_swap and swap shall exchange dimension and collection together. The same-type copy complexity argument shall not change exactness. Implicit destruction shall release all owned disjuncts and collection storage.

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.

Exchanging only disjunct storage would separate the collection from its ambient dimension.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check later independent mutation, self-assignment/exchange, unlike dimensions and destruction of a shared owner.

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/disjunct1.cc; tests/Powerset/powerset1.cc; tests/powersetlatticehistories1.cc.

CPP
Public

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

Pointset_Powerset(const Pointset_Powerset&, Complexity_Class=ANY_COMPLEXITY);
Pointset_Powerset& operator=(const Pointset_Powerset&);
void m_swap(Pointset_Powerset&);
template <typename PSET> void swap(Pointset_Powerset<PSET>&, Pointset_Powerset<PSET>&);
SW_SPEC
3
PPL-SPEC-001394
PPL-SPEC-001394
Pointset-powerset construction from descriptor systems

Construction from constraints or congruences shall create the corresponding base-domain value as a singleton disjunct and inherit the system dimension. Source values shall remain unchanged. Admission, arithmetic, topology and exactness shall follow the base constructor; redundant or empty singleton storage may remain until 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.

The singleton construction must preserve base constructor semantics without introducing a hull over unrelated inputs.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check tautological, contradictory and dimensioned systems, strict boundaries and base rejection conditions.

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/fromcongruences1.cc; tests/Powerset/fromconstraints1.cc.

CPP
Public

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

explicit Pointset_Powerset(const Constraint_System&);
explicit Pointset_Powerset(const Congruence_System&);
SW_SPEC
4
PPL-SPEC-001395
PPL-SPEC-001395
Pointset-powerset construction from a simple domain

Construction from a simple domain shall preserve ambient dimension and contain its represented set. A nonempty source shall be converted using the base constructor with its applicable complexity contract and stored as a singleton. Known-empty sources may yield an empty collection. Conversion shall be exact when the destination base conversion is exact; unsupported discrete or relational information may be lost. External source values shall 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.

Converting a single pointset does not require disjunctive approximation beyond its base conversion.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check each source family, empty/universe, fractional/open boundaries, exact conversions and deliberate information loss.

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/frombdshape1.cc; tests/Powerset/frombox1.cc; tests/Powerset/fromgrid1.cc; tests/Powerset/fromoctagonalshape1.cc; tests/Powerset/frompolyhedron1.cc.

CPP
Public

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

explicit Pointset_Powerset(const C_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
explicit Pointset_Powerset(const NNC_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
explicit Pointset_Powerset(const Grid&, Complexity_Class=ANY_COMPLEXITY);
template <typename T> explicit Pointset_Powerset(const BD_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
template <typename T> explicit Pointset_Powerset(const Octagonal_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
template <typename Interval> explicit Pointset_Powerset(const Box<Interval>&, Complexity_Class=ANY_COMPLEXITY);
SW_SPEC
5
PPL-SPEC-001396
PPL-SPEC-001396
Cross-base powerset conversion and assignment

Cross-base construction shall convert each stored source disjunct with the destination base conversion and preserve ambient dimension. The resulting union shall contain the source union and be exact when every base conversion is exact. Assignment shall have the same conversion result and return its receiver. Destination reduction state shall be recomputed when conversion can make previously incomparable disjuncts comparable; a proven exact conversion may retain source reduction state. Neither source decomposition nor reduced cardinality shall be a geometric canonical form.

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.

Approximate conversion can collapse distinctions that justified source nonredundancy.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check closed/NNC conversions in both directions, grid-to-polyhedron loss, exact shape conversions and reduction after comparable images.

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/contractvalues1.cc; tests/Powerset/conversionreduction1.cc.

CPP
Public

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

template <typename QH>
explicit Pointset_Powerset(const Pointset_Powerset<QH>&, Complexity_Class=ANY_COMPLEXITY);
template <typename QH>
Pointset_Powerset& operator=(const Pointset_Powerset<QH>&);
SW_SPEC
6
PPL-SPEC-001397
PPL-SPEC-001397
Pointset-powerset construction from a product

Construction from a product shall convert both reduced component views to the destination base and intersect them, storing the resulting base value as a disjunct unless a known-empty shortcut applies. It shall preserve ambient dimension and overapproximate the product intersection. Exactness shall hold when both conversions and their base intersection are exact.

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 product represents conjunction, so conversion must intersect rather than choose or join its components.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Use products whose components contribute independent restrictions and compare the converted intersection; include known empty.

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/Partially_Reduced_Product/fromproduct1.cc; tests/Powerset/contractvalues1.cc.

CPP
Public

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

template <typename QH1, typename QH2, typename R>
explicit Pointset_Powerset(const Partially_Reduced_Product<QH1,QH2,R>&,
                          Complexity_Class=ANY_COMPLEXITY);
SW_SPEC
7
PPL-SPEC-001398
PPL-SPEC-001398
Insertion of pointset disjuncts

add_disjunct(p) shall add a value copy and represent union with p. It shall require exactly the receiver dimension and throw std::invalid_argument on a mismatch. Duplicates and empty disjuncts may remain stored until reduction; insertion shall mark reduction as unknown. Later mutation of the external source shall not alter the powerset.

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.

Insertion is exact disjunction even when storage contains redundancies.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check source independence, duplicate/empty insertion, arbitrary order and mismatched dimensions.

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/disjunct1.cc.

CPP
Public

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

void add_disjunct(const PSET&);