Parma Polyhedra Library requirements
C++ pointset powerset operations

C++ pointset powerset 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-001407
PPL-SPEC-001407
Lifted constraint addition and refinement

Constraint addition and refinement shall apply the corresponding base operation to every disjunct, retaining union semantics and marking reduction unknown. Exact addition shall intersect each disjunct with the admitted constraint conjunction. Refinement shall preserve every point satisfying the input conjunction and satisfy the base precision guarantee, possibly ignoring unsupported restrictions. Topology and dimension rejection shall follow the base operation, including std::invalid_argument for incompatible inputs.

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 with a conjunction distributes over disjunction, while refinement may approximate at base level.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check strict boundaries, equalities, contradictions, unsupported base rows, empty/nonempty collections and invalid arguments.

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

CPP
Public

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

void add_constraint(const Constraint&); void add_constraints(const Constraint_System&);
void refine_with_constraint(const Constraint&);
void refine_with_constraints(const Constraint_System&);
SW_SPEC
2
PPL-SPEC-001408
PPL-SPEC-001408
Lifted congruence addition and refinement

Congruence addition and refinement shall apply the corresponding base operation to every disjunct, preserving union semantics and marking reduction unknown. Exact addition shall intersect with the admitted congruence conjunction; refinement shall be sound with the base precision guarantee. Proper modular restrictions shall not be converted into affine equalities. Dimension or unsupported exact-addition admission shall follow the base exception contract.

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.

Congruences represent residue classes, so interpreting a proper congruence as equality would discard valid points.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check residue classes, equality congruences, contradictory/tautological rows, approximate refinement and dimensional errors.

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

CPP
Public

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

void add_congruence(const Congruence&); void add_congruences(const Congruence_System&);
void refine_with_congruence(const Congruence&);
void refine_with_congruences(const Congruence_System&);
SW_SPEC
3
PPL-SPEC-001409
PPL-SPEC-001409
Lifted cylindrification

unconstrain shall cylindrify each disjunct in the selected coordinates while retaining ambient dimension and mark reduction unknown. The resulting union shall have the base operation's exactness and arithmetic guarantees. An empty variable set shall preserve the value. Out-of-range variables shall 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.

Existential projection followed by unconstrained embedding distributes over finite unions.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check relational disjuncts, scalar/set overload agreement, empty variable sets and invalid 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/argumentadmission1.cc; tests/Powerset/contractvalues1.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 unconstrain(Variable);
void unconstrain(const Variables_Set&);
SW_SPEC
4
PPL-SPEC-001410
PPL-SPEC-001410
Lifted pointset-powerset intersection

Intersection shall collect all pairwise base intersections of the reduced operands, discarding bottom results. It shall represent exact union intersection when the base intersection is exact and otherwise inherit its soundness and precision. Self-intersection shall be supported. Operands shall have the same ambient dimension; mismatch shall 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.

Every point in the intersection belongs to a pair of input disjuncts.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check cross-pair rather than positional overlap, empty operands, self-intersection 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/argumentadmission1.cc; tests/Powerset/intersection1.cc.

CPP
Public

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

void intersection_assign(const Pointset_Powerset&);
SW_SPEC
5
PPL-SPEC-001411
PPL-SPEC-001411
Pointset-powerset set difference

Difference shall subtract each subtrahend disjunct successively. For NNC polyhedra, exact polyhedral partitions shall represent exact set difference, including excluded boundaries. Other supported convex bases shall convert through NNC partitions and inherit conversion precision. Grid subtraction shall return exact finite-coset residues when representable and otherwise a sound finite overapproximation. Empty subtraction shall preserve the minuend; self-subtraction shall give empty. Ambient dimensions shall agree or std::invalid_argument shall be thrown.

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.

Finite disjunction can preserve nonconvex residues that a single convex base element cannot represent.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check interior holes, boundary subtraction, multiple subtrahends, grid finite/infinite residue cases and self-subtraction.

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/difference1.cc; tests/Powerset/gridpartition1.cc.

CPP
Public

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

void difference_assign(const Pointset_Powerset&);
SW_SPEC
6
PPL-SPEC-001412
PPL-SPEC-001412
Meet-preserving powerset context simplification

Context simplification shall preserve the represented intersection with y and leave no more disjuncts than the reduced original receiver. Disjuncts disjoint from the context may be removed; the result need not contain the original union outside that context. A false return shall establish empty intersection, while true need not establish nonemptiness for approximate base simplification. Empty receiver or context shall produce a false return. Dimension mismatch shall 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.

Preservation inside a context allows dropping irrelevant disjuncts and relaxing relevant ones.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check singleton and multiple contexts, empty intersections, cardinality, and independent before/after intersection equality. Include late overlaps after unchanged disjoint prefixes, accumulated simplifications reaching a fixed point, restoring source bounds needed by a later context, empty effective contexts, aliases, and preservation of distinct contexts. Inject allocation failures after a disjunct has been enlarged and check ownership and invalidation of stale reduction certificates. Include an unreduced original pair whose later disjunct strictly contains its predecessor, checking raw result size against the separately reduced original before any result query can canonicalize it.

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/simplifyusingcontext1.cc; tests/powersetcontextfailure1.cc.

CPP
Public

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

bool simplify_using_context_assign(const Pointset_Powerset&);
SW_SPEC
7
PPL-SPEC-001424
PPL-SPEC-001424
Powerset topological closure and time elapse

Topological closure shall close every disjunct; for a finite collection of exact base closures the result shall be the exact closure of the union. Time elapse shall collect all pairwise base time-elapse results, denoting the corresponding union of p + tv for admitted states, velocities and t ≥ 0, with the base precision contract. Empty state or velocity collections shall follow the base time-elapse semantics. Dimension-incompatible time operands shall 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.

Closure distributes over finite unions, while velocities require a cross-product lifting.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check open boundary closure, zero/nonzero velocities, separated disjunct pairs, empty inputs and base approximation. Close an initially reduced antichain whose new boundary makes a disjunct redundant, then request omega-reduction and compare the remaining geometry. Exercise NNC polyhedra and open rational boxes, shared-source preservation, empty and zero-dimensional collections, and exact identity closure for closed polyhedra, grids, BD/octagonal shapes and interval boxes without openness.

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

CPP
Public

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

void topological_closure_assign();
void time_elapse_assign(const Pointset_Powerset&);
SW_SPEC
8
PPL-SPEC-001425
PPL-SPEC-001425
Powerset integer restriction and wrapping

Integer restriction shall apply the selected base tightening to each disjunct, preserve all points integral in the selected coordinates and retain a subset of the old union; no optimality shall be promised. Wrapping shall apply the base bounded-integer conversion to every disjunct with the supplied width, representation, overflow mode, optional constraints and precision controls. It shall inherit 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes and base wrapping semantics, including sound overflow behavior and variable/constraint admission. Reduction shall become unknown after either operation.

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.

Disjunction must retain all selected integral states and all admitted wrapped outcomes.

APPROVED
DOMAIN_COMBINATIONS
IF_CPP
Test, Analysis, Inspection

Check fractional disjuncts, selected versus all coordinates and small-width modular/undefined/impossible overflow controls.

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

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset 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);
void wrap_assign(const Variables_Set&, Bounded_Integer_Type_Width,
                 Bounded_Integer_Type_Representation, Bounded_Integer_Type_Overflow,
                 const Constraint_System* = nullptr, unsigned=16, bool=true);