C++ bounded-difference refinement and lattice operations
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
add_constraint(c) shall conjoin the admitted closed constraint with the receiver. Admitted nonconstant forms shall be unary bounds or coordinate-difference bounds, including their equality forms with any common nonzero integral scale and sign. Constant tautologies shall have no effect and constant falsehoods shall make the result empty. A nonconstant strict constraint or an unsupported nonconstant linear form shall throw std::invalid_argument; a constant strict tautology or falsehood shall retain its logical meaning.
For each primitive upper inequality, normalization shall divide by the positive coefficient magnitude and choose the least admitted target bound no smaller than the exact rational bound. Equality shall contribute both opposite inequalities with their respective outward bounds. The result shall denote the intersection of the entry set with these normalized target inequalities; for exact representable bounds this shall be the concrete conjunction. Applying outward normalization shall not exclude any entry point satisfying the original constraint.
add_constraints(cs) and add_recycled_constraints(cs) shall conjoin all admitted constraints in the system, with the same normalization and validation rules. Source dimensions at most the receiver dimension shall be admitted; omitted trailing coordinates shall have zero coefficients. A larger single-descriptor or system dimension shall throw std::invalid_argument before changing the receiver's represented set. Rejection of an unsupported single descriptor shall also preserve the receiver's represented set. A system operation that encounters an unsupported descriptor need not roll back preceding additions.
The copying overloads shall preserve their source descriptors. After the recycling overload, the only required property of cs shall be safe destruction, including after an exception. Result storage shall not borrow the input system. These rules shall apply to empty receivers as well as nonempty receivers.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible, except for recycled sources with an explicit destruction-only guarantee. No general rollback guarantee shall be inferred for such failures.
Descriptor admission distinguishes a convex bounded-difference operation from an approximation that silently ignores unsupported forms. Explicit outward scalar bounds separate numerical abstraction from conjunction.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void add_constraint(const Constraint& c); void add_constraints(const Constraint_System& cs); void add_recycled_constraints(Constraint_System& cs);
Normalize raw integer coefficients with GMP rationals; conjoin independent halfspaces with the entry set. Exercise both signs, common scales, equality, exact/inexact bounds, constants, empty receivers, trailing coordinates, copied/recycled batches, invalid dimensions and late unsupported descriptors. Check valid reuse after exceptions and independent result ownership.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/addconstraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
add_congruence(cg) shall admit congruence equalities whose linear form is a unary or coordinate-difference equality, together with constant tautologies and falsehoods. An admitted equality shall conjoin the two opposite outward-normalized inequalities described in 🔗 1. Addition of admitted bounded-difference constraints. A tautology shall have no effect; a falsehood shall make the result empty.
A nontrivial proper congruence or an unsupported nonconstant equality shall throw std::invalid_argument. Periodic spacing shall not be silently removed by an adding operation. add_congruences(cgs) and add_recycled_congruences(cgs) shall apply these admission and conjunction rules to the whole system.
A descriptor or system dimension above the receiver dimension shall throw std::invalid_argument before changing its represented set; smaller dimensions shall use zero trailing coefficients. Rejection of an unsupported single congruence shall preserve the entry set. A system operation need not undo earlier admitted additions if a later congruence is rejected.
The copying overloads shall preserve their source values. After a recycling call, the source system need only remain safely destructible, including after an exception. Result storage shall own its value independently of the source. Admission and dimension checks shall apply to empty receivers too.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible, except for recycled sources with an explicit destruction-only guarantee. No general rollback guarantee shall be inferred for such failures.
A closed convex domain cannot encode nontrivial periodic spacing. An adding operation therefore requires explicit admission rather than treating a periodic descriptor as an unrequested convex approximation.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void add_congruence(const Congruence& cg); void add_congruences(const Congruence_System& cgs); void add_recycled_congruences(Congruence_System& cgs);
Use raw affine equalities and constant modular predicates. Check exact and outward-normalized equality conjunctions, both signs, constant true/false proper congruences, empty receivers, copied/recycled systems, source ownership, invalid dimensions and unsupported periodic or non-difference forms.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/addconstraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
refine_with_constraint(c) and refine_with_constraints(cs) shall refine the receiver using supported unary and coordinate-difference constraints. Supported nonconstant strict inequalities shall first be relaxed to their non-strict counterparts. The resulting supported inequalities and equalities shall be normalized outward as in 🔗 1. Addition of admitted bounded-difference constraints. Unsupported nonconstant linear forms shall be ignored.
Constant descriptors shall retain their exact logical meaning: a false constant constraint, including a strict zero boundary, shall make the result empty; a tautology shall have no effect. Empty receivers shall remain empty. Relaxing a strict boundary shall not be interpreted as an exact test of the original conjunction's feasibility.
A completed result shall contain every entry point satisfying the input descriptors and shall equal the conjunction of the entry set with the supported, relaxed, outward-normalized descriptors. Copying refinement shall preserve the input descriptor or system. A larger descriptor or system dimension shall throw std::invalid_argument without changing the entry set; zero trailing coordinates shall be admitted for smaller source dimensions.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Refinement accepts a wider descriptor language than strict addition. Its explicit ignored-form and strict-boundary rules make the resulting loss of precision predictable.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void refine_with_constraint(const Constraint& c); void refine_with_constraints(const Constraint_System& cs);
Independently filter raw forms, relax strict nonconstant bounds, normalize supported bounds outward and conjoin halfspaces. Include a singleton on a rejected strict boundary, unsupported sums, constant strict falsehoods, exact/inexact equalities, empty receivers, batches, source preservation and incompatible dimensions.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/constraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
refine_with_congruence(cg) and refine_with_congruences(cgs) shall conjoin supported unary or coordinate-difference equalities, with the outward scalar normalization in 🔗 1. Addition of admitted bounded-difference constraints. Unsupported nonconstant equalities shall be ignored.
An inconsistent proper congruence shall make the result empty. Every other proper congruence shall have no effect; in particular, periodic spacing shall not be interpreted as an equality. A constant equality shall retain its exact tautology or falsehood meaning. An empty receiver shall remain empty.
A completed result shall contain all entry points satisfying the supplied congruences, and shall denote precisely the entry set conjoined with the admitted outward-normalized equalities, unless a false constant descriptor makes it empty. The input descriptors shall preserve their values. Source dimensions at most the receiver dimension shall be admitted with zero trailing coordinates; larger dimensions shall throw std::invalid_argument without changing the receiver's represented set.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Equality information can refine a convex difference domain, while periodic information may require a deliberate conservative omission. Constant modular falsehoods still have exact empty-set meaning.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void refine_with_congruence(const Congruence& cg); void refine_with_congruences(const Congruence_System& cgs);
Use independent equality halfspaces and constant modular arithmetic. Check ignored proper periodic predicates, inconsistent proper constants, unsupported sums, positive/negative equality normalization, empty receivers, single/system agreement, descriptor preservation and dimension rejection.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/constraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
var shall be a live valid Variable satisfying 🔗 2. Variable value identity and lifetime operations and 🔗 3. Variable construction, coordinate queries and bounds.
unconstrain(var) shall forget the value of the selected coordinate while preserving ambient dimension and every coordinate's identity. If the entry set is X ⊆ ℝn and var denotes coordinate i, the concrete cylindrification shall be
With exact rational or integral arithmetic, the result shall denote this set exactly. A profile whose computations round may produce a containing bounded-difference enclosure. The operation shall retain the consequences among unselected coordinates that are required by its precision guarantee; merely deleting input rows mentioning var is insufficient.
Empty shall remain empty. A valid selected coordinate of a nonempty set shall become unrestricted rather than being assigned zero or removed. var shall be below space_dimension(); otherwise std::invalid_argument shall be thrown without changing the receiver's represented set.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Existential forgetting preserves coordinate positions and can retain constraints mediated by the forgotten coordinate. It differs from row deletion, zero assignment and coordinate removal.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void unconstrain(Variable var);
Use independent rational elimination while keeping the coordinate slot free. Exercise chains through the forgotten coordinate, retained equalities, singleton/empty/unbounded sets, every selected position, exact and rounded profiles, zero dimension and invalid indices.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/unconstrain1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
vars shall be a live coordinate-valid Variables_Set satisfying [LINK: PPL-SPEC-000021] and 🔗 4. Coordinate-set dimension and maximum dimension, and shall remain unmodified throughout the call.
unconstrain(vars) shall forget all selected values, preserving the ambient dimension and coordinate identities. For the selected index set I, its concrete result shall be
The profile-specific exactness and containment guarantees of [LINK: PPL-SPEC-001094] shall apply to this simultaneous cylindrification. Input order or repeated insertion of an index into Variables_Set shall not change the result's meaning.
An empty selection shall preserve the represented set, including in zero dimensions. Selecting all coordinates of a nonempty shape shall give universe in the same dimension; an empty shape shall remain empty. Any selected index outside the receiver's dimension shall throw std::invalid_argument before changing its represented set. The selector set shall preserve its value and result storage shall not depend on its lifetime.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Simultaneous forgetting must preserve relationships among retained coordinates across several eliminated paths. The empty and full selections distinguish identity from whole-space cylindrification.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void unconstrain(const Variables_Set& vars);
Eliminate selected coordinates independently with exact rationals and leave the original slots unrestricted. Check empty/full/nonadjacent selections, retained mediated differences, repeated selector insertion, all positions, empty and zero-dimensional sets, copied selector lifetime and dimension rejection.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/unconstrain1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
intersection_assign(y) shall replace the receiver by the exact intersection of its entry set with the entry set of y. This set equality shall hold across the admitted numeric profiles under their arithmetic prerequisites; it shall not be reduced to a containment-only guarantee.
The two ambient dimensions shall be equal; otherwise the call shall throw std::invalid_argument without changing either represented set. Smaller-dimensional operands shall not be implicitly embedded. Empty, universe, zero-dimensional and lower-dimensional operands shall obey set intersection. Self-intersection shall preserve the entry set.
A distinct source y shall retain its represented value, and the result shall own its storage independently of that source. Logically const normalization may change representations while preserving represented sets.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Conjunction of bounded differences remains expressible in the domain, so selecting the tighter stored restrictions has an exact set interpretation even when the operand bounds themselves are numerical approximations.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void intersection_assign(const BD_Shape& y);
Conjoin independently specified operand halfspaces and check equality by rational elimination. Cover alternating-path inconsistency, redundant descriptions, singleton intersections, touching bounds, empty/universe/zero dimensions, native and integral profiles, self-aliasing, donor mutation and dimension errors.
BagnaraHZ10CGTA | Section 5.1, graph meet and intersection correspondence (PDF index 16).
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/intersection1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
upper_bound_assign(y) shall replace the receiver by a bounded-difference set containing the union of both entry sets. When the computations use exact arithmetic, this shall be the least bounded-difference enclosure of the union. Rounded computations may produce a less precise containing set.
For the exact-arithmetic guarantee, every supported unary or difference normal shall have the greater of the two source suprema as its bound, with an unbounded source normal producing an unbounded result normal. Every finite result bound shall be closed.
Dimensions shall agree; an incompatible operand shall throw std::invalid_argument without changing either set. Empty shall be an identity, universe absorbing, and self-union an identity. Zero-dimensional values shall preserve the empty/universe distinction. A distinct y shall preserve its represented set and result storage shall be independent of its lifetime.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
A union can be nonconvex or outside the template domain. The least template enclosure is characterized by support maxima, while rounded closure must retain union containment even when its bounds are not minimal.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void upper_bound_assign(const BD_Shape& y);
Compute every primitive support maximum independently and compare the exact-profile result by rational elimination. For rounded profiles require both operand inclusions. Include incomparable correlated shapes, bounded/unbounded normals, all neutral/absorbing cases, redundant histories, aliases and incompatible dimensions.
BagnaraHZ10CGTA | Section 5.1, closed-graph join and pointwise maximum (PDF index 16).
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/upperbound1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000302 Interpretation of sufficient property tests (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
upper_bound_assign_if_exact(y) shall return true only when the receiver's completed represented set is exactly the set-theoretic union of the two entry sets. On false, the receiver shall preserve its entry represented set. A distinct y shall preserve its entry set on either outcome. Closure and reduction may change internal representations without changing these values.
For mpq_class and mpz_class boundary types, the operation shall return true if and only if the union is a bounded-difference shape. A bounded integer or native floating profile may return false when it cannot certify exactness, even if the union is representable. Such a false result shall not imply that the union is unrepresentable.
The dimensions shall be equal; mismatch shall throw std::invalid_argument before changing represented sets. Self-union, empty identities, universe and zero-dimensional cases shall satisfy the same exactness rules. A successful receiver shall own its resulting value independently of a distinct source.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
A certified join distinguishes a representable concrete union from a containing abstract upper bound. Numerical certification may be incomplete while every reported success remains exact.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
bool upper_bound_assign_if_exact(const BD_Shape& y);
Build the support hull independently and decide whether it has a point outside both operands by rational elimination of paired strict complements. Require complete decisions for unbounded exact profiles, unchanged sets on false, exact true results for all profiles, aliases, incompatible dimensions, unbounded correlated sets and cache histories.
BagnaraHZ10CGTA | Section 5.2, Theorem 5.2 (PDF index 16).
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/upperboundifexact1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000302 Interpretation of sufficient property tests (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
integer_upper_bound_assign_if_exact(y) shall be available for an integral boundary type T. Its exactness shall concern integer valuations: on true, every integer point in the resulting shape shall belong to at least one entry operand, and every integer point of either operand shall belong to the result. The result shall be the integer upper bound, namely the least rational bounded-difference enclosure containing those input integer points.
With mpz_class boundaries the decision shall be complete: true shall hold exactly when that integer upper bound introduces no additional integer point. A bounded integral profile may return false if it cannot certify exactness. A false result shall preserve the receiver's entry represented set; it shall not certify a missing integer point for an incomplete profile.
This guarantee shall not identify integer-point union with real set-theoretic union. For example, joining the real singletons at zero and one can be exact for integer points while including nonintegral points between them. Dimensions shall agree, with std::invalid_argument on mismatch before changing represented sets. A distinct source shall preserve its entry set, and self-union/empty/zero-dimensional inputs shall retain their mathematical meanings.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
A gap in a real union can contain no integer point. Integer exactness therefore uses a different decision problem while still returning a real bounded-difference representation.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
bool integer_upper_bound_assign_if_exact(const BD_Shape& y);
For independently bounded integral examples enumerate every integer point in the support hull and compare with both operands, using proven finite coordinate limits. Check adjacent versus separated singletons, multidimensional correlated unions, complete GMP decisions, sound bounded-profile successes, false preservation, aliases and dimension errors. Include a real-inexact/integer-exact counterexample.
BagnaraHZ10CGTA | Section 5.3, Theorem 5.4 and Example 5.5 (PDF indices 19-20).
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/integerupperboundifexact1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000424 Abstract set-difference semantics (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
difference_assign(y) shall replace the receiver by the least target-profile bounded-difference enclosure of the set of entry points absent from y. In an unbounded exact rational profile this shall be the least closed bounded-difference hull of the concrete difference. A finite normal supremum shall use the least admitted outward target bound.
The result may retain removed boundary points or fill a gap between surviving components, as required by closure and convex template abstraction. Removing an equality or a boundary shall not be interpreted as removing its closed convex limit points. If the concrete difference is empty, the result shall be empty; self-subtraction shall therefore be empty.
Dimensions shall agree; mismatch shall throw std::invalid_argument before changing either represented set. Empty/universe and zero-dimensional operands shall obey the same subtraction-and-enclosure meaning. A distinct source shall preserve its represented set, and result ownership shall be independent of its lifetime.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
A concrete difference need not be closed or convex. Taking support over its strict exclusion alternatives defines the least closed template enclosure without incorrectly requiring the result to be disjoint from the removed operand.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
void difference_assign(const BD_Shape& y);
Form each strict complement of the subtrahend's raw halfspaces, intersect with the entry set and take primitive support suprema over feasible alternatives using independent rational elimination. Include equalities, removed boundaries, interior holes, alternating constraints, aliases, empty/universe/zero dimensions, numerical target profiles and mismatch errors. Compare dense and irredundant defining bases, cold and cached histories, and removal that leaves the original closed hull. Include disjointness, interior holes, boundary faces and complementary equality branches, with proper facet cuts as controls; preserve distinct-source geometry and ownership.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/difference1.cc; tests/BD_Shape/dimensioncontracts1.cc.
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000302 Interpretation of sufficient property tests (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
simplify_using_context_assign(y) shall return a bounded-difference simplification R of the entry receiver X using the entry context Y, satisfying
The cardinality of a minimized constraint representation of R shall not exceed that of X. Identity shall be an admitted result; a strict enlargement or decrease in constraints shall not be required on every call. The Boolean result shall satisfy: false implies the entry intersection is empty. A true result may be inconclusive about nonemptiness.
The context shall preserve its entry represented set when it is distinct from the receiver. Self-aliasing shall obey the same meet-preservation and enlargement clauses using the entry value for both operands. Empty receivers, empty contexts, universe, lower-dimensional and zero-dimensional sets shall be admitted.
Dimensions shall agree; mismatch shall throw std::invalid_argument before changing either represented set. Result storage shall remain independent of a distinct context's later lifetime or mutation. Representation-only normalization shall preserve the mathematical entry values.
The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.
Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.
Contextual simplification may discard restrictions supplied by the context while preserving exactly the relevant intersection. Enlargement and constraint-count simplification are separate obligations.
Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
bool simplify_using_context_assign(const BD_Shape& y);
Check enlargement and both intersection inclusions with independent rational halfspaces. Count an independent affine equation basis plus distinct facet faces for the minimized-representation measure. Check false-result disjointness, no required strict progress, empty/disjoint/universal contexts, aliases, exact and rounded profiles, context preservation and dimension errors.
src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/simplifyusingcontext1.cc; tests/BD_Shape/dimensioncontracts1.cc.