Parma Polyhedra Library requirements
C++ bounded-difference affine transfers

C++ bounded-difference affine transfers

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-001111
Rational affine image of one coordinate

For an entry shape Xβ€‰βŠ†β€‰β„n , a valid coordinate k , a dimension-compatible integer-coefficient affine expression e and a nonzero coefficient d , affine_image(k,e,d) shall replace the receiver with a bounded-difference shape containing

{yβ€‰βˆˆβ€‰β„nβ€‰βˆ£β€‰βˆƒxβ€‰βˆˆβ€‰X : yk = e(x) ⁄ d ∧ βˆ€i ≠ k,  yi = xi}.

With exact rational boundary arithmetic, constant replacement and assignments xk :  = xj + c , including self translation, shall give the exact image. Other affine expressions may require a conservative bounded-difference enclosure. Rounded profiles shall keep the delegated outward bounds. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

Transporting a correlated state through an assignment requires an old/new-coordinate relation; independent interval evaluation alone loses those correlations.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Project independent old/new halfspaces. Check constant, copy, translation, negation, nonunit scaling and multiple-variable forms; require exact rational equality for constant/copy/translation classes and sound inclusion elsewhere. Include negative denominators, bounded/unbounded sources, latent emptiness, cache histories and unchanged-coordinate constraints.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/affineimage1.cc; tests/BD_Shape/affineimage2.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void affine_image(Variable var, const Linear_Expression& expr,
                  Coefficient_traits::const_reference denominator
                    = Coefficient_one());
SW_SPEC
2
PPL-SPEC-001112
PPL-SPEC-001112
Rational affine preimage of one coordinate

With the coordinate, expression and denominator admitted by πŸ”— 1. Rational affine image of one coordinate , affine_preimage(k,e,d) shall contain every xβ€‰βˆˆβ€‰β„n whose successor, obtained by replacing coordinate k with e(x) ⁄ d , belongs to the entry post-state shape. Expression occurrences of the updated coordinate shall denote its pre-state value.

For xk :  = xj + c , the post-state constraints shall be substituted using that expression. With exact rational boundary arithmetic, both self translation and distinct-coordinate copy plus translation shall give the exact bounded-difference preimage; in the distinct-coordinate case the pre-state xk shall be free. Rounded profiles shall preserve the corresponding outward substitutions and consistency checks. Other transformations shall give sound containing shapes; they need not compute the least bounded-difference enclosure even when the exact preimage is representable, as specified by WR_Affine_Preimage_Precision in the mathematical interface definitions. Invertible transformations shall use the same relational predecessor meaning as noninvertible ones. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

Backward transfer selects predecessors of the postcondition and must distinguish pre-state and post-state occurrences of an assigned variable.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Derive relational predecessors by eliminating new coordinates. Check the documented exact copy-plus-offset substitution with all scalar and difference postconditions, including contradictory consistency tests and fractional offsets. Cover self inverses, constants, noninvertible general maps, negative denominators and bottom. Check soundness rather than universal leastness outside the promised classes.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/affinepreimage1.cc; tests/BD_Shape/negativeselfpreimage1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void affine_preimage(Variable var, const Linear_Expression& expr,
                     Coefficient_traits::const_reference denominator
                       = Coefficient_one());
SW_SPEC
3
PPL-SPEC-001113
PPL-SPEC-001113
Single-coordinate generalized affine image

For β€‰β‹ˆβ€‰β€‰βˆˆβ€‰{ = ,  ≀ ,  β‰₯ } , the variable overload of generalized_affine_image(k,relsym,e,d) shall contain

{yβ€‰βˆ£β€‰βˆƒxβ€‰βˆˆβ€‰X : ykβ€‰β‹ˆβ€‰e(x) ⁄ d ∧ βˆ€i ≠ k,  yi = xi}.

Equality shall have the behavior of πŸ”— 1. Rational affine image of one coordinate . A one-sided relation shall use the indicated quotient, including the sign of the denominator; it shall not silently turn a lower relation into an upper relation. The result may conservatively approximate the affine relation. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

A one-sided update nondeterministically chooses a successor satisfying its affine bound, while leaving all other coordinates framed.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Independently project equality and both non-strict relation directions. Compare equality with1111; include positive/negative denominators, self dependence, distinct-variable dependence, general expressions, unbounded inputs and infeasible relations. Check unchanged-coordinate constraints and rejected strict/disequality symbols.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffineimage1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void generalized_affine_image(
    Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
    Coefficient_traits::const_reference denominator = Coefficient_one());
SW_SPEC
4
PPL-SPEC-001114
PPL-SPEC-001114
Single-coordinate generalized affine preimage

For β€‰β‹ˆβ€‰β€‰βˆˆβ€‰{ = ,  ≀ ,  β‰₯ } , the variable overload of generalized_affine_preimage(k,relsym,e,d) shall contain

{xβ€‰βˆ£β€‰βˆƒyβ€‰βˆˆβ€‰X : ykβ€‰β‹ˆβ€‰e(x) ⁄ d ∧ βˆ€i ≠ k,  yi = xi}.

Equality shall have the behavior and class-specific precision of πŸ”— 2. Rational affine preimage of one coordinate . Other admitted relations may give sound nonleast bounded-difference enclosures according to the documented preimage approximation contract. The denominator sign shall be respected. The relation shall use the same old/new coordinate frame for self-dependent and non-self-dependent expressions. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

A predecessor exists when some framed successor satisfies the postcondition and the selected relation, not when every possible successor does.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Eliminate new coordinates independently, with equality and both inequality directions, sign-normalized denominators, self/non-self dependence and general affine expressions. Check equality delegation, empty postconditions, surviving-coordinate restrictions and invalid symbols.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffinepreimage1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void generalized_affine_preimage(
    Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
    Coefficient_traits::const_reference denominator = Coefficient_one());
SW_SPEC
5
PPL-SPEC-001115
PPL-SPEC-001115
Expression-left generalized affine image

Let l and r be dimension-compatible affine expressions, U the coordinates with nonzero homogeneous coefficient in l , and β€‰β‹ˆβ€‰β€‰βˆˆβ€‰{ = ,  ≀ ,  β‰₯ } . The expression overload of generalized_affine_image(l,relsym,r) shall contain

{yβ€‰βˆ£β€‰βˆƒxβ€‰βˆˆβ€‰X : l(y)β€‰β‹ˆβ€‰r(x) ∧ βˆ€iβ€‰βˆ‰β€‰U,  yi = xi}.

The left expression shall be interpreted in the new state and the right expression in the old state; exchanging them and reversing the relation shall not in general describe the same update. A constant left expression shall be a guard with every coordinate framed. Multiple updated coordinates may lose precision through a sound bounded-difference enclosure. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; lhs and rhs may denote the same live expression.

For a constant left expression, a representable guard shall be added natively. Other guards shall receive one finite pass over native directions formed from each nonzero coefficient and each representable matching pair, in increasing coordinate order. For a guard expression e β‰₯ 0 and such a direction d , the finite infimum of the residual dβ€‰βˆ’β€‰e shall supply d β‰₯ inf(dβ€‰βˆ’β€‰e) . Equality shall also use its finite supremum to supply d ≀ sup(dβ€‰βˆ’β€‰e) . Closure shall propagate earlier deductions before each direction is considered. Residual optimization shall preserve its supported correlations; returned rational bounds shall be inserted directly, without an intermediate scalar-interval conversion. This pass need not reach a fixed point or compute a least abstract intersection. General residuals may require linear programming.

When the homogeneous part of l has two nonzero coefficients and is representable as a bounded-difference expression up to scaling, the finite entry-state supremum of r shall be retained as an upper bound on the new l for EQUAL and LESS_OR_EQUAL. Its finite infimum shall be retained as a lower bound for EQUAL and GREATER_OR_EQUAL. These bounds shall be computed before forgetting updated coordinates and shall also apply to disjoint left/right supports. Rational boundaries shall retain the exact extrema; other boundary profiles shall retain their native outward guarantees. An unbounded direction shall add no finite bound.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

The support of the left expression determines which coordinates are assigned together; all occurrences on the right refer to the entry state.

Finite right-hand ranges are evaluated in the entry shape. Native optimization uses cached bounds for representable objectives and may invoke the linear programming solver for a general right expression. Saving those bounds before projection avoids confusing old and new occurrences of the same coordinate.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Check the retained left-expression ranges against an independently assembled old/new polyhedron followed by projection, and literal rational fixtures. Include positive/negative scaling, arbitrary right expressions, disjoint and overlapping supports, shared expressions, one-sided/unbounded ranges, framed coordinates, dense/sparse expressions and rational/floating/integral bounds.

Use independent old/new relations for constant, single-variable and multi-variable left sides, disjoint/overlapping supports, shared lhs/rhs, all admitted relations and rejected symbols. Check full frame constraints and soundness for approximate general updates rather than imposing an unsupported universal leastness requirement.

tests/generalizedaffineboundsspec1.cc; tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffineimage2.cc; tests/BD_Shape/affinecachereduction1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void generalized_affine_image(const Linear_Expression& lhs,
                              Relation_Symbol relsym,
                              const Linear_Expression& rhs);
SW_SPEC
6
PPL-SPEC-001116
PPL-SPEC-001116
Expression-left generalized affine preimage

With l , r , U and β€‰β‹ˆβ€‰ admitted by πŸ”— 5. Expression-left generalized affine image , the expression overload of generalized_affine_preimage(l,relsym,r) shall contain

{xβ€‰βˆ£β€‰βˆƒyβ€‰βˆˆβ€‰X : l(y)β€‰β‹ˆβ€‰r(x) ∧ βˆ€iβ€‰βˆ‰β€‰U,  yi = xi}.

A constant left expression shall be a guard with every coordinate framed. Other forms may return sound nonleast bounded-difference enclosures as specified by the preimage approximation contract. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; the same live expression may supply both lhs and rhs .

For a left expression with at least two nonzero homogeneous coefficients, the finite target-state infimum of l shall supply the necessary guard r β‰₯ infXl for EQUAL and LESS_OR_EQUAL; the finite supremum shall supply r ≀ supXl for EQUAL and GREATER_OR_EQUAL. These extrema shall be computed before forgetting updated coordinates. The guards shall be refined in the old-state coordinates using the same native native-direction approximation as constant-left images. An unbounded direction shall contribute no finite guard. Existing relational deductions and framed-coordinate constraints shall also be preserved. Rational boundary arithmetic shall use exact extrema; other profiles shall retain their native outward guarantees. These deductions need not give a least preimage enclosure.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

Expression-left backward transfer uses the same transition relation as the forward operation, with the postcondition placed on new coordinates.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Eliminate the new coordinates from relational postconditions for constant/single/multiple left supports, finite and unbounded target lhs ranges, disjoint and overlapping right supports, shared expressions and every admitted relation. Include empty/zero-dimensional guards, incompatibility and rejected symbols; retain every feasible predecessor.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffinepreimage2.cc; tests/BD_Shape/generalizedaffinepreimage3.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void generalized_affine_preimage(const Linear_Expression& lhs,
                                 Relation_Symbol relsym,
                                 const Linear_Expression& rhs);
SW_SPEC
7
PPL-SPEC-001117
PPL-SPEC-001117
Single-coordinate bounded affine image

For admitted coordinate k , dimension-compatible expressions l, u and nonzero denominator d , bounded_affine_image(k,l,u,d) shall contain

{yβ€‰βˆ£β€‰βˆƒxβ€‰βˆˆβ€‰X : l(x) ⁄ d ≀ yk ≀ u(x) ⁄ d ∧ βˆ€i ≠ k,  yi = xi}.

Both bounding expressions shall use the same entry state. A negative common denominator shall preserve the displayed quotient inequalities; the lower and upper argument roles shall not be exchanged merely because the denominator is negative. The bounds may depend on the replaced coordinate. The result may conservatively approximate this simultaneous relation. Constraints involving only unchanged coordinates shall remain valid. Both expressions and the denominator shall remain unchanged; lb_expr and ub_expr may refer to the same live expression.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

Two bounds constrain one nondeterministic assignment in a common old state; sequentially changing the variable would define a different relation.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Project both divided inequalities together. Cover equal and inconsistent bounds, self dependence in zero/one/both bounds, negative denominators, shared bound expressions, unbounded correlated inputs, empty input and invalid dimensions/zero denominators. Check simultaneous-transition soundness and unchanged-coordinate constraints.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/boundedaffineimage1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void bounded_affine_image(
    Variable var, const Linear_Expression& lb_expr,
    const Linear_Expression& ub_expr,
    Coefficient_traits::const_reference denominator = Coefficient_one());
SW_SPEC
8
PPL-SPEC-001118
PPL-SPEC-001118
Single-coordinate bounded affine preimage

With the coordinate, expressions and denominator admitted by πŸ”— 7. Single-coordinate bounded affine image , bounded_affine_preimage(k,l,u,d) shall contain

{xβ€‰βˆ£β€‰βˆƒyβ€‰βˆˆβ€‰X : l(x) ⁄ d ≀ yk ≀ u(x) ⁄ d ∧ βˆ€i ≠ k,  yi = xi}.

The two bounds shall be evaluated in the same pre-state, including when one or both contain xk . The result may be a sound nonleast bounded-difference enclosure under the documented preimage approximation contract. Any auxiliary coordinate used internally shall not remain in a successful result. Constraints involving only unchanged coordinates shall remain valid. Both source expressions and the denominator shall remain unchanged, including shared bound-expression arguments.

The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of πŸ”— 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

Backward bounded transfer must find a single successor satisfying both old-state bounds and the complete postcondition.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP
Test, Analysis, Inspection

Derive predecessors by eliminating new coordinates with both affine bounds present. Include zero/one/both-bound self dependence, constant and inconsistent pairs, positive/negative denominators and shared source expressions. Verify bottom preservation, unchanged-coordinate restrictions, final dimension and ownership when temporary coordinates are used.

tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/boundedaffinepreimage1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

void bounded_affine_preimage(
    Variable var, const Linear_Expression& lb_expr,
    const Linear_Expression& ub_expr,
    Coefficient_traits::const_reference denominator = Coefficient_one());
SW_SPEC
9
PPL-SPEC-001119
PPL-SPEC-001119
Native interval-affine image

For a supported native floating-point boundary type T , a valid coordinate k and a dimension-compatible Linear_Form<Interval<T,Interval_Info>> with bounded coefficient intervals Ai and bounded constant interval B , affine_form_image(k,lf) shall contain every successor

{yβ€‰βˆ£β€‰βˆƒxβ€‰βˆˆβ€‰X,  bβ€‰βˆˆβ€‰B,  aiβ€‰βˆˆβ€‰Ai : yk = b +β€‰β€‰βˆ‘iaixi ∧ βˆ€j ≠ k,  yj = xj}.

Coefficient and constant choices shall be independent as specified by πŸ”— 1. Interval-linear-form meaning and numerical prerequisites . The result shall use outward numerical bounds; interval uncertainty and the restricted difference-bound language may lose precision, without a general least-enclosure guarantee. Constraints involving only unchanged coordinates shall remain valid. The source form and its coefficient intervals shall retain their values. An empty coefficient or constant interval shall make the receiver empty.

The selected native format, interval representation, initialized numerical runtime, caller-owned upward FPU environment and arithmetic/resource prerequisites of πŸ”— 1. Bounded-difference values, numerical profiles and valid use and πŸ”— 1. Interval-linear-form meaning and numerical prerequisites shall hold. Bounded intervals shall satisfy their stored-value and endpoint-access prerequisites. Unbounded coefficients are outside this operation's documented admission. Native availability shall follow the corresponding configured supported-format predicate.

The ambient dimension shall remain unchanged. Empty input shall remain empty after validation. An invalid selected coordinate or a form of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible, without an additional rollback guarantee. Callers shall synchronize shared owners and facilities.

Interval coefficients represent independent uncertainty rather than fixed rational scalars; their choices must be included together with correlated input states.

BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

APPROVED
BOUNDED_DIFFERENCES
IF_CPP, NATIVE_FP_AVAILABLE
Test, Analysis, Inspection

Independently enumerate finite coefficient corners and project each old/new affine relation, then derive the union supports; check conservative inclusion with constant, Β±unit, uncertain-sign and general coefficients, zero tails and unbounded source directions. Include supported formats, caller FPU preservation, source-form preservation, empty input/choice sets, dimension errors and resource failures.

doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh; tests/BD_Shape/affinecachereduction1.cc; tests/BD_Shape/affineunboundedproducts1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc.

CPP
Public

Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

template <typename Interval_Info>
void affine_form_image(
    Variable var, const Linear_Form<Interval<T, Interval_Info>>& lf);