Parma Polyhedra Library requirements
C++ octagonal convergence operators
PPL-SPEC-001214
1. Default octagonal stop points UID: PPL-SPEC-001214 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

CC76_extrapolation_assign(y,tp) shall have the behavior of [LINK: PPL-SPEC-001215] with the finite ordered stop points  − 2,  − 1, 0, 1, 2. These are bounds on the signed forms in that contract: a stop s on a unary form 2xi means xi ≤ s ⁄ 2, while a stop on xi + xj means xi + xj ≤ s. Already representable stop values shall be retained exactly.

The ascending operand order Y ⊆ X, empty and zero-dimensional cases, source preservation and precision-sensitive token rule shall be those of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens. Sharing the default stop-point values between calls shall not affect mathematical results. This convenience overload shall not add a convergence guarantee to CC76 extrapolation.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

The octagonal unary encoding doubles coordinate bounds. Stating the actual stop-point scale prevents a factor-of-two error in clients' expected results.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

void CC76_extrapolation_assign(const Octagonal_Shape& y,
  unsigned* tp = nullptr);
VERIFICATION_CRITERIA:

Compare independent exact support/threshold models with the default overload and explicit five-stop range. Include both unary signs, half-unit boundaries, stable and growing binary bounds, absent stops, source lifetime, self-aliasing, null/zero/positive tokens and empty/zero-dimensional values. Exercise admitted integral and native profiles under their rounding prerequisites.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3.1 and 4, extrapolation and doubled unary octagonal encoding. BagnaraHRZ05SCP | Section 7, precision-sensitive widening delay.

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76extrapolation1.cc.

2. Threshold octagonal extrapolation and precision-sensitive tokens UID: PPL-SPEC-001215 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Let X be the receiver's entry set and Y the argument's entry set, with Y ⊆ X. The explicit-iterator CC76 operator shall produce an octagonal enclosure of X, preserving dimension. An empty argument and zero-dimensional operands shall preserve the receiver's entry set.

For nonempty operands and exact rational support computations, define bZ(v) = sup{v⋅p ∣ p ∈ Z} for the signed forms v ∈ {±2ei,  ±ei±ej (i < j)}. With no delay token, a finite stable bound bX(v) = bY(v) shall be retained. A bound that increased strictly shall be replaced by the least supplied stop point not below bX(v), or removed if no such stop exists. An unbounded form shall remain unbounded. The result shall denote the conjunction of these closed upper bounds. This characterization concerns real-coordinate sets, including when the stored coefficient type is integral.

Other supported profiles shall compare outward closed profile bounds and assign chosen stops outward, preserving every point of X under 🔗 1. Octagonal values, numerical profiles and valid use. Rounded closure shall not be assumed canonical or required to compute exact real supports. General relational CC76 iterations shall carry no finite-stabilization guarantee.

The half-open stop-point range shall use readable multipass forward iterators and finite values sorted in nondecreasing numerical order. Empty ranges and duplicates shall be admitted. Values and iterators shall remain live and stable throughout the call, shall not borrow storage invalidated by the call, and shall support the selected profile's comparisons and outward assignment.

A null token pointer or zero counter shall select the undelayed result. With a positive counter, the receiver shall retain X; exactly one token shall be consumed when the corresponding undelayed result strictly enlarges X, and otherwise none shall be consumed. The counter shall be a live, separately owned, externally synchronized writable unsigned object. Neither the argument's represented value nor the supplied stop-point values shall be changed.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

Scalar thresholds control the loss of signed-form bounds, while the token budget delays only precision-losing steps. Closure may restore discarded relational bounds, so extrapolation must remain distinct from semantic widening.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

template <typename Iterator>
void CC76_extrapolation_assign(const Octagonal_Shape& y,
  Iterator first, Iterator last, unsigned* tp = nullptr);
VERIFICATION_CRITERIA:

Use independent rational elimination to determine every primitive support and a mathematical ordered range to select stops. Cover exact hits, strict changes, stable/unbounded directions, doubled unary and all binary signs, empty/duplicate ranges, pointer and forward iterators, all token states, aliasing, source/range preservation, lazy emptiness and dimension rejection. For rounded profiles assess inclusion separately from exact support precision.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3.1, 4 and 7, extrapolation limits, signed-form encoding and inexact propagation. BagnaraHRZ05SCP | Section 7, widening with tokens.

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76extrapolation1.cc.

PPL-SPEC-001216
3. Semantic octagonal widening and default widening alias UID: PPL-SPEC-001216 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

With argument entry set Y contained in receiver entry set X, BHMZ05_widening_assign shall return an octagonal set containing both, with the same ambient dimension. An empty or singleton argument, or an increase in affine dimension from Y to X, shall retain X. widening_assign shall have the same behavior as BHMZ05_widening_assign with the same argument and token pointer.

For equal positive affine dimension and exact rational support computations, the undelayed result shall implement the semantic standard widening: obtain a nonredundant octagonal inequality description of Y, retain its inequalities satisfied by every point of X, and conjoin the retained inequalities. The affine-dimension guard and strong reduction shall make this result independent of equivalent input descriptions, redundant bounds, representation-only cache changes and choices of a strongly reduced octagonal description. This shall not require a least possible widening.

Supported rounded profiles shall preserve inclusion under the numerical prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use; the exact-support characterization shall apply when the relevant support and reduction calculations are exact. A smaller resulting set shall not be promised than is established by the selected widening and arithmetic profile.

The precision-sensitive token rule in 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens shall apply to this operator's undelayed result. Equal entry sets and self-aliasing shall preserve their set and shall not consume a token.

In a fixed dimension and profile, form an ascending iteration by first constructing an enclosure of the preceding widened result and the next input, then invoking this operator on that enclosure with the preceding result as argument. Under its inclusion and numerical prerequisites, the represented results shall stabilize after finitely many strict changes. A finite initial token budget, without replenishment, shall preserve the convergence guarantee.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

Reducing the previous octagon avoids the interaction between reintroduced entailed constraints and repeated extrapolation. Tokens postpone precision loss while retaining the convergence purpose of the semantic widening.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

void BHMZ05_widening_assign(const Octagonal_Shape& y,
  unsigned* tp = nullptr);
void widening_assign(const Octagonal_Shape& y,
  unsigned* tp = nullptr);
VERIFICATION_CRITERIA:

Derive independent irredundant facet descriptions on low-dimensional sets and retain exactly those facets satisfied by the current set. Check affine subspaces, singletons, dimension increases, stable and growing facets, redundant/cache histories, the default alias, all token states, aliases and empty/zero-dimensional cases. Check inclusion at each step of independent ascending recurrences and inspect the reduction-based stabilization proof; assess rounded profiles without claiming exact canonical closure.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3.3, 4.1-4.2 and 7, reduction choice, semantic octagonal widening and finite-precision qualifications. BagnaraHRZ05SCP | Section 7, finite token budgets and precision-sensitive delay.

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/bhmz05widening1.cc.

PPL-SPEC-001217
4. Limited semantic octagonal extrapolation UID: PPL-SPEC-001217 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

With Y ⊆ X in the ascending operand order, limited_BHMZ05_extrapolation_assign shall improve the semantic widening of 🔗 3. Semantic octagonal widening and default widening alias using selected limits.

The supplied system shall have dimension no greater than the operands and shall contain no strict inequalities. Recognized limits shall be nonstrict unary inequalities and two-coordinate inequalities with equal absolute nonzero coefficients; equalities and other linear forms shall not be used as limiting inequalities. Normalize each recognized inequality to the signed forms of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens, rounding its bound outward in the selected profile. Select only normalized bounds satisfied by the receiver's entry set X. A rounded bound may be weaker than the original constraint; selection shall not promise that the result satisfies the original constraint.

Let L be the conjunction of the selected bounds and W the base operator's delayed or undelayed result. The final result shall denote W∩L, contain X and be contained in W. The base operator shall make its token decision before applying L; a limit that recovers all discarded information shall not refund a token. Positive tokens shall retain X.

An empty argument, empty receiver or zero-dimensional operands shall preserve the receiver's entry set without consuming a token. The supplied constraint system shall retain its value and ownership. Incompatible constraint dimensions and strict inequalities shall throw std::invalid_argument before changing the represented receiver or token counter, including in zero dimensions.

With a fixed finite limiting system, fixed dimension/profile, the admitted normalization and widening prerequisites, and a finite unreplenished token budget, the prescribed ascending recurrence shall retain finite stabilization. Arbitrarily changing the limiting system shall carry no such general guarantee.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

Satisfied supported limits recover selected information after widening; unsupported facets and stronger unrounded constraints cannot silently become extra guarantees of a weakly relational result.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

void limited_BHMZ05_extrapolation_assign(const Octagonal_Shape& y,
  const Constraint_System& cs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA:

Independently normalize recognized limits, determine satisfaction by the entry set, compute the semantic base widening and intersect the models. Cover all signs/scalings, ignored equalities and nonoctagonal rows, unsatisfied limits, outward half-unit integral bounds, tokens decided before limiting, fixed-limit ascending sequences, source preservation, aliases, empty/cache histories and rejected strict/dimension-incompatible systems.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3.3, 4.2 and 7, widening up to bounds, semantic octagonal widening and outward approximation. BagnaraHRZ05SCP | Section 7, fixed finite limiting systems and token delay.

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/limitedbhmz05extrapolation1.cc.

PPL-SPEC-001218
5. Octagonal narrowing and descending operand order UID: PPL-SPEC-001218 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Let X be the receiver's entry set and Y the argument's entry set, with X ⊆ Y. CC76_narrowing_assign shall produce R with X ⊆ R ⊆ Y, preserving ambient dimension. An empty receiver, zero-dimensional operands and self-aliasing shall preserve the receiver's entry set.

For nonempty operands and exact rational support computations, use the signed forms and supports of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens. The result shall be the conjunction whose bound for v is bY(v) when that previous bound is finite and bX(v) otherwise. Thus it may restore a finite previous bound even when the current one is tighter; it shall recover a current bound in a direction where the previous set is unbounded. It shall not simply retain every improvement in the receiver.

Supported rounded profiles shall use their outward closed profile bounds while preserving both inclusions. Keep every finite previous bound even when the corresponding current bound remains infinite in rounded closure. The exact-support characterization shall apply when the corresponding support computations are exact. Under exact support arithmetic in a fixed dimension, descending iteration that passes each result as the next previous argument shall stabilize after finitely many strict changes: a strict step must make a previously unbounded primitive form finite. Finite-carrier profiles shall stabilize under the same descending inclusion and arithmetic conditions. No stabilization guarantee shall be inferred for other operator/profile/iteration combinations without its own justification.

The receiver/argument order shall be the descending order stated above, rather than the ascending order used by widening. A distinct previous argument shall retain its represented value.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

Narrowing restores selected finite restrictions after extrapolation, using the current approximation inside its previous approximation. The descending operand order and finite-previous-bound rule determine its precision.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

void CC76_narrowing_assign(const Octagonal_Shape& y);
VERIFICATION_CRITERIA:

Compute primitive supports independently and apply the finite-previous-bound rule. Check current/result/previous inclusions, unary halves, all binary signs, finite/unbounded directions, affine subspaces, self-aliasing, lazy emptiness and dimension rejection. Exercise descending recurrences and review the finite-status-change proof separately from observed stabilization. Assess admitted rounded cases without assuming exact closure.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3-4 and 7, weakly relational support semantics and finite-precision qualifications (background). CousotC76 | Original widening and narrowing framework (background).

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76narrowing1.cc.

PPL-SPEC-001219
6. Limited threshold octagonal extrapolation UID: PPL-SPEC-001219 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

With Y ⊆ X in the ascending operand order, limited_CC76_extrapolation_assign shall improve the default threshold extrapolation of 🔗 1. Default octagonal stop points using selected limits.

The supplied system shall have dimension no greater than the operands and shall contain no strict inequalities. Recognized limits shall be nonstrict unary inequalities and two-coordinate inequalities with equal absolute nonzero coefficients; equalities and other linear forms shall not be used as limiting inequalities. Normalize each recognized inequality to the signed forms of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens, rounding its bound outward in the selected profile. Select only normalized bounds satisfied by the receiver's entry set X. A rounded bound may be weaker than the original constraint; selection shall not promise that the result satisfies the original constraint.

Let L be the conjunction of the selected bounds and W the base operator's delayed or undelayed result. The final result shall denote W∩L, contain X and be contained in W. The base operator shall make its token decision before applying L; a limit that recovers all discarded information shall not refund a token. Positive tokens shall retain X.

An empty argument, empty receiver or zero-dimensional operands shall preserve the receiver's entry set without consuming a token. The supplied constraint system shall retain its value and ownership. Incompatible constraint dimensions and strict inequalities shall throw std::invalid_argument before changing the represented receiver or token counter, including in zero dimensions.

This limited operator shall not add a general finite-stabilization guarantee to relational CC76 extrapolation, even with a fixed finite limiting system.

The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

RATIONALE:

Limiting constraints and scalar thresholds serve different purposes. Limits can recover satisfied information after threshold extrapolation without turning the underlying CC76 method into a semantic widening.

INTERFACE:

Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

void limited_CC76_extrapolation_assign(const Octagonal_Shape& y,
  const Constraint_System& cs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA:

Use the independent doubled-unary/binary threshold model and independently selected limiting bounds, then compare their conjunction with the result. Include exact and outward-rounded limits, ignored equality/general rows, unsatisfied limits, token consumption before limiting, aliases, source and system preservation, empty/zero-dimensional inputs and all required invalid input rejections.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 3.1, 3.3, 4 and 7, relational extrapolation, limiting bounds and numerical propagation. BagnaraHRZ05SCP | Section 7, widening with tokens and fixed finite limits.

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/limitedcc76extrapolation1.cc.