Parma Polyhedra Library requirements
C++ octagonal interval-form transfers and refinement

C++ octagonal interval-form transfers and refinement

PPL-SPEC-001236
1. Native interval-affine image
UID: PPL-SPEC-001236
STATUS: APPROVED
COMPONENT: OCTAGONS
APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

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 octagonal 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. Octagonal 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.

RATIONALE:

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

INTERFACE:

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

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

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.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 4 and 7 (journal background on octagonal shapes and floating implementation). Mine04 | Sections 5 and 6.1, Assignments (interval-coefficient affine transfer).

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape1.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

PPL-SPEC-001237
2. Conservative interval-linear-form inequality refinement
UID: PPL-SPEC-001237
STATUS: APPROVED
COMPONENT: OCTAGONS
APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

For a supported native floating boundary type T, let X be the receiver's entry set and let L(x) and R(x) be the real value sets of its dimension-compatible interval linear-form arguments. Coefficient and constant choices shall be independent, including when the same form object is supplied twice. After refine_with_linear_form_inequality, the receiver shall have the same ambient dimension and denote a set Y satisfying

{x ∈ X ∣ ∃l ∈ L(x),  r ∈ R(x) : l ≤ r} ⊆ Y ⊆ X.

Valid empty coefficient or constant intervals shall be admitted; their empty choice set contributes no satisfying valuations, so a general conservative refinement may leave the input unchanged.

The general operation may lose precision. Comparisons involving constants only, including cancellation to a constant comparison, may leave the input unchanged.

For closed nonempty constant intervals and forms having at most one nonzero variable coefficient each, all such coefficients being singleton  + 1 or  − 1, consider a nonconstant comparison reducible to one unary or signed binary octagonal inequality. If the required constant endpoint subtraction and doubled-unary encoding are exact in the selected boundary profile, the result shall equal the intersection of X with that closed inequality, using the lower constant endpoint on the left and upper constant endpoint on the right. Opposite unit coefficients on the same coordinate shall therefore use the corresponding normalized ±2xi cut. All four sign combinations on distinct coordinates shall be covered. This precision clause shall not apply to a constant-only comparison.

Empty input shall remain empty. An argument form whose space dimension exceeds the receiver's shall throw std::invalid_argument before changing the represented set, including on empty input. Successful refinement shall preserve the source forms and leave a valid owned receiver.

The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

RATIONALE:

A floating comparison filters existing correlated states; coefficient uncertainty and outward arithmetic must not discard a satisfying state.

INTERFACE:

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

template <typename Interval_Info>
void refine_with_linear_form_inequality(
    const Linear_Form<Interval<T, Interval_Info>>& left,
    const Linear_Form<Interval<T, Interval_Info>>& right);
VERIFICATION_CRITERIA:

Partition coordinate signs independently, derive exact rational minimum-left/maximum-right affine inequalities, intersect each with the input halfspaces, and check every resulting piece is contained while the result stays inside the input. Cover unit, same-coordinate opposite unit, uncertain-sign, nonunit and sparse multiple-variable forms; exact and genuinely inexact arithmetic; correlations, recession directions, source aliases, bottom, dimension errors and owned-resource failures.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 4 and 7 (domain and floating arithmetic background). Mine04 | Sections 5 and 6.1, Tests (interval linear forms and relational guard abstraction).

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

PPL-SPEC-001238
3. Generalized interval-linear-form comparisons
UID: PPL-SPEC-001238
STATUS: APPROVED
COMPONENT: OCTAGONS
APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

For the form value sets and numerical admission of 🔗 2. Conservative interval-linear-form inequality refinement, generalized_refine_with_linear_form_inequality shall preserve the ambient dimension and denote an enclosure of the input states satisfying its relation, without introducing states outside the input. The two sides shall use independent coefficient choices.

LESS_OR_EQUAL shall apply the left-to-right inequality refinement; GREATER_OR_EQUAL shall apply the reversed refinement. LESS_THAN and GREATER_THAN may use those same closed relaxations of the strict comparisons. EQUAL shall apply both non-strict orientations, retaining all states for which the two form value intervals overlap. NOT_EQUAL shall leave the represented set unchanged. No general least-result claim shall follow from these dispatch rules.

Both arguments shall undergo the documented dimension validation for every named relation, including NOT_EQUAL and empty receivers. Incompatibility shall throw std::invalid_argument before changing the represented set. A Relation_Symbol having the unnamed language-admissible value 0 or 7 shall throw std::runtime_error before mutation. Values outside the C++ enum's valid representation range are outside valid language use. Empty input and source-form values shall be preserved.

The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

RATIONALE:

The relation selects the comparison orientation and its admissible closed relaxation; validation must not depend on the selected dispatch shortcut.

INTERFACE:

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

template <typename Interval_Info>
void generalized_refine_with_linear_form_inequality(
    const Linear_Form<Interval<T, Interval_Info>>& left,
    const Linear_Form<Interval<T, Interval_Info>>& right,
    Relation_Symbol relsym);
VERIFICATION_CRITERIA:

Use the independent sign-partition guard oracle for all six named relations, equality overlap, strict boundary witnesses, shared form objects and disequality identity. Check dispatch against the appropriate basic orientations, source preservation, dimensions on every branch, valid unnamed enum rejection and failure channels.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 4 and 7 (journal background on octagonal shapes and floating implementation). Mine04 | Sections 5 and 6.1, Tests (interval-coefficient guard abstractions).

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

PPL-SPEC-001239
4. Refinement of a floating interval abstract store
UID: PPL-SPEC-001239
STATUS: APPROVED
COMPONENT: OCTAGONS
APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

For a supported native floating boundary type T and a valid Box<Interval<T,Interval_Info>> store of the same ambient dimension, refine_fp_interval_abstract_store(store) shall intersect the store with the outward Cartesian enclosure of the receiver supplied by the box conversion of 🔗 5. Box conversion from octagonal shapes. It shall retain every point of the entry store lying in the source shape and shall introduce no point outside the entry store. The source represented set and both ambient dimensions shall remain unchanged; logically const source closure may refresh caches.

Empty source or empty store shall yield an empty store. Zero-dimensional empty and universe cases shall preserve their distinct meanings. When the source closure and target endpoint arithmetic satisfy the exactness conditions of 🔗 5. Box conversion from octagonal shapes, the result shall equal the store's intersection with the least Cartesian enclosure of the source; otherwise outward approximation may retain additional points. Incompatible dimensions shall throw std::invalid_argument without changing the store's represented set.

The selected native format shall satisfy its configured supported-format predicate. The box and interval representation shall retain 🔗 1. Cartesian box values, coordinate identity and valid use and 🔗 5. Box conversion from octagonal shapes. Unbounded valid store coordinates are admitted. The initialized numerical runtime and all intermediate policy prerequisites shall hold; the caller shall provide and retain ownership of an upward FPU environment.

The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. The borrowed store and its live coordinate objects shall remain valid throughout the call. Recoverable numerical and resource exceptions may leave a partially refined store in the state permitted by its operations; discarded owned temporaries shall be released.

RATIONALE:

A relational state can strengthen a separate interval store without discarding a valuation common to both approximations.

INTERFACE:

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

template <typename Interval_Info>
void refine_fp_interval_abstract_store(
    Box<Interval<T, Interval_Info>>& store) const;
VERIFICATION_CRITERIA:

Derive coordinate extrema by exact rational projection of correlated halfspaces, combine them with independently specified input intervals, and compare containment/contraction; check exact Cartesian intersections where 🔗 5. Box conversion from octagonal shapes guarantees them. Cover empty and zero-dimensional states, unbounded coordinates, open store boundaries, inexact native bounds, mismatched dimensions, source preservation and allocation failure.

BIBLIOGRAPHY:

BagnaraHZ09FMSD | Sections 4 and 7 (octagonal representations and outward floating arithmetic).

SOURCE:

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.