Parma Polyhedra Library requirements
C++ octagonal geometric conversions

C++ octagonal geometric conversions

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-001162
Closed octagonal support hull of geometric generators

Octagonal_Shape(gs) shall construct the least target-profile octagonal enclosure of the convex set generated by gs. Its closed boundaries shall include finite limiting points supplied only as closure points. Ordinary points and closure points shall contribute their actual rational coordinates to support extrema, with the generator meanings in 🔗 1. Generator kinds and numerical prerequisites and 🔗 2. Construction of nonzero lines and rays. A ray shall make a normal unbounded exactly when its scalar product with that normal is positive; a line shall do so exactly when that scalar product is nonzero. A zero directional product shall retain any finite bound on that normal.

An empty generator system shall construct empty in its declared dimension. A nonempty generator system shall contain an ordinary point; otherwise the constructor shall throw std::invalid_argument. Divisors, zero trailing coordinates and ambient dimension shall retain their generator-system meanings.

For a nonempty source set X, let h(a) = supx ∈ Xaâ‹…x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

Signed support extrema determine the closed octagonal hull. A closure point can determine such an extremum without being an ordinary generated point; directional signs determine whether a finite supporting inequality survives.

BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4, closure points and extended generator semantics. BagnaraHZ09FMSD | Section 4, signed-variable encoding and doubled unary bounds (PDF page index 9, zero-based).

APPROVED
OCTAGONS
IF_CPP
Test, Analysis, Inspection

Compute support independently from raw rational point/closure-point coordinates and ray/line dot products for every signed primitive normal. Check unequal point divisors, all four binary signs, zero and nonzero directional products, unequal-speed rays and lines, repeated extrema, trailing zero coordinates and independent affine dimension. Include empty systems in zero and positive dimensions, point-free nonempty rejection, half-integral unary bounds, positive/negative inexact target conversion and source-lifetime independence. Inject admitted allocation failures and check incomplete-object cleanup and source-set preservation. Check literal support entries for dense and sparse systems at dimensions 0, 1, 2, 63, 64, 65 and 128, including implicit zero tails, dyadic coordinates, origin and fully populated points, closure-first updates and repeated points. Exercise exact, integral and native boundaries, source lifetime independence and unchanged native floating state. Bound additional C++ allocation against independently constructed matrix storage, including value-returning coefficient traits, and sweep observed allocation failures after numeric-pool warmup; require incomplete-result cleanup and unchanged source values. Compare every stored support bound for positive and negative first, middle and last coordinate lines and rays, zero-coordinate rows, equal/opposite pairs and fixed nonzero point coordinates in dense and sparse storage. Exercise exact, integral and native boundaries and require finite bounds for zero directional products. Retain the selected coefficient profile's admitted arithmetic and failure behavior.

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; tests/Octagonal_Shape/fromgensys1.cc; tests/Octagonal_Shape/dimensionlimits1.cc. tests/generatorconstructionfixture.hh; tests/generatorconstructionallocationsspec1.cc.

CPP
Public

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

explicit Octagonal_Shape(const Generator_System& gs);
SW_SPEC
2
PPL-SPEC-001163
PPL-SPEC-001163
Complexity-sensitive octagonal conversion from polyhedra

Octagonal_Shape(ph,complexity) shall construct an octagonal set containing the source closed or not necessarily closed polyhedron. The default ANY_COMPLEXITY and the explicit SIMPLEX_COMPLEXITY and POLYNOMIAL_COMPLEXITY values shall be admitted.

ANY_COMPLEXITY shall produce the least target-profile octagonal enclosure and shall detect an empty source exactly. For a nonempty source, strict finite boundaries shall contribute their limiting suprema to the closed result. Primitive bounds shall use the exact signed supports and target normalization in 🔗 1. Closed octagonal support hull of geometric generators, including doubling a unary support before rounding. This guarantee shall not depend on an equivalent source constraint/generator representation or cache history.

SIMPLEX_COMPLEXITY shall give the same primitive support bounds for every nonempty source. It may use the closed relaxation obtained by replacing each strict source row by its weak counterpart. Therefore an empty not necessarily closed source whose closed relaxation is nonempty need not be detected as empty. An already available valid generator representation may give the stronger exact-empty result without exceeding the selected complexity class.

POLYNOMIAL_COMPLEXITY shall preserve containment while respecting its polynomial complexity bound. It may conservatively extract and propagate supported information without a universal least-enclosure, exact-emptiness, mandatory-progress or particular iteration fixed-point guarantee. Equivalent source representation/cache histories may yield different permitted conservative enclosures. Each complexity option shall respect its declared algorithmic complexity bound.

The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction, subject to the stated complexity-dependent emptiness guarantees.

Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

Optimal projection onto a fixed family of signed normals and conservative constraint extraction have different complexity costs. Closing a nonempty strict polyhedron preserves its finite support suprema, while closing an inconsistent strict conjunction can change emptiness.

BagnaraHZ05FAC | Sections 4 and 4.1, Definition 4.1, Definition 4.2 and Theorem 4.4, NNC polyhedra and their generators. BagnaraHZ09FMSD | Section 4, octagonal normal family and coherent signed encoding (PDF page indices 8–10, zero-based).

APPROVED
OCTAGONS
IF_CPP
Test, Analysis, Inspection

Use independent rational elimination of arbitrary closed and strict source halfspaces to decide source feasibility and each octagonal support. Compare ANY with the least target-profile hull; require the same bounds for nonempty SIMPLEX sources, and containment for POLYNOMIAL. Separately model closed relaxations of empty strict systems. Include relational non-octagonal rows, all primitive signs, finite unattained limits, universe/empty and zero dimensions, source generators already computed, new pending constraints, minimized constraints, target profiles and source-set preservation. Allocation failures shall check owned cleanup without assuming source-cache rollback.

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Polyhedron_defs.hh; src/MIP_Problem_defs.hh; tests/Octagonal_Shape/frompolyhedron1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

CPP
Public

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

explicit Octagonal_Shape(const Polyhedron& ph,
                         Complexity_Class complexity=ANY_COMPLEXITY);
SW_SPEC
3
PPL-SPEC-001164
PPL-SPEC-001164
Best octagonal enclosure of Cartesian boxes

Octagonal_Shape(box,complexity) shall construct the least target-profile octagonal enclosure of the real Cartesian product represented by box. The source interval endpoint policy shall retain its open/closed meanings. For a nonempty product, an excluded finite endpoint may determine an included limiting bound in the closed result. Any empty factor shall make the result empty in the source ambient dimension; closing endpoints individually shall not turn an empty product into a nonempty one.

For a signed binary normal, its exact support shall combine the two relevant source endpoint contributions before target conversion. The unary support shall be doubled before conversion to its stored target bound. Unbounded contributing endpoints shall leave the corresponding support unrestricted.

For a nonempty source set X, let h(a) = supx ∈ Xaâ‹…x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee.

The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

Independent interval supports combine into signed sums and differences. Rounding each coordinate first can lose a binary bound that is representable in the target profile, so optimal conversion depends on exact source combinations.

BagnaraHZ09FMSD | Section 4, signed-variable and doubled-unary encoding (PDF page index 9, zero-based).

APPROVED
OCTAGONS
IF_CPP
Test, Analysis, Inspection

Derive the Cartesian set and signed support sums directly from rational endpoint values and openness. Check every binary sign, unary doubled bounds, empty factors, open touching endpoints, unbounded/free coordinates, fractional endpoint combinations, half-integral target precision, zero dimensions and all three complexity values. Require equality with the independently rounded primitive hull, including cases that distinguish combining source endpoints from first rounding separate unary bounds. Check source denotation, independent storage and failed-construction cleanup.

src/Shape_Conversion_Support.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Box_defs.hh; tests/Octagonal_Shape/frombox1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

CPP
Public

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

template <typename Interval>
explicit Octagonal_Shape(const Box<Interval>& box,
                         Complexity_Class complexity=ANY_COMPLEXITY);
SW_SPEC
4
PPL-SPEC-001165
PPL-SPEC-001165
Best octagonal enclosure of rational grids

Octagonal_Shape(grid,complexity) shall construct the least target-profile octagonal enclosure of the entire rational grid. The constructed octagonal set shall have the real carrier in 🔗 1. Octagonal values, numerical profiles and valid use and shall enclose every source grid point under its line and integer-parameter semantics. Integral target bound storage shall not change that result carrier.

For a nonempty grid, a signed primitive normal shall have a finite supremum exactly when it annihilates every line direction, every integer-parameter direction and every difference between its generating base points. In that case the normal shall be constant with its value at any base point. Otherwise its support shall be unbounded in both signs. Implied signed equalities shall be retained whether or not they appear as individual rows of a chosen congruence basis. Periodic restrictions that do not imply such an equality shall impose no finite bound.

For a nonempty source set X, let h(a) = supx ∈ Xaâ‹…x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

An empty grid shall give empty in its original ambient dimension. The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee.

The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

The convex enclosure of an unbounded affine lattice retains its constant linear forms. A particular congruence basis must not conceal a signed equality that the whole grid entails.

BagnaraHZ08SCP | Section 2.4, equation (1) and the rational parameter representation (PDF page indices 9–10, zero-based). BagnaraDHMZ07 | Section 3, The Generator Representation, real lines, integer parameters and generating points (PDF page index 7, zero-based). BagnaraHZ09FMSD | Section 4, octagonal signed normal family (PDF page index 9, zero-based).

APPROVED
OCTAGONS
IF_CPP
Test, Analysis, Inspection

Use raw rational base points, integer parameters and real lines. Independently compute dot products for all signed primitive normals, including consequences of combinations of non-octagonal congruences. Include fractional constants, skew parameters, multiple generating points, free axes, nonadjacent signed relations, empty/zero dimensions and every complexity value. Compare the least target-profile hull across equivalent grid bases and normalization histories; check source preservation, ownership and resource-failure cleanup.

src/Shape_Conversion_Support.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Grid_defs.hh; tests/Octagonal_Shape/fromgrid1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

CPP
Public

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

explicit Octagonal_Shape(const Grid& grid,
                         Complexity_Class complexity=ANY_COMPLEXITY);
SW_SPEC
5
PPL-SPEC-001166
PPL-SPEC-001166
Best octagonal enclosure of bounded-difference shapes

Octagonal_Shape(bd,complexity) shall construct the least target-profile octagonal enclosure of the real set represented by bd at entry. Signed sum and difference supports shall include all consequences of the source bounded-difference conjunction, including signed sums obtained by combining source unary restrictions. Source and target numerical profiles may differ; integer source bounds shall still describe real coordinates.

The constructor shall preserve empty and zero-dimensional source meanings. The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee. Equivalent source descriptions and normalization histories shall not discard a supported relation.

For a nonempty source set X, let h(a) = supx ∈ Xaâ‹…x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

Bounded differences are an octagonal subclass, but changing the bound profile can alter the best representable signed sums. Optimal conversion depends on the complete source set before rounding target constants.

BagnaraHZ09FMSD | Section 3.1, bounded-difference encoding, and Section 4, signed-variable octagonal encoding (PDF page indices 5 and 9, zero-based).

APPROVED
OCTAGONS
IF_CPP
Test, Analysis, Inspection

Decode independently supplied bounded-difference halfspaces and use rational elimination to compute all octagonal supports. Include correlated chains, signed sums implied by unary bounds, fractions, integral and native source profiles, half-integral target bounds, all three complexity values and source closure/cache histories. Require the least target-profile enclosure, not only containment. Preserve empty/zero dimensions, source denotation and independent lifetime; verify construction cleanup after admitted resource failures.

src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/BD_Shape_defs.hh; tests/Octagonal_Shape/frombdshape1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

CPP
Public

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

template <typename U>
explicit Octagonal_Shape(const BD_Shape<U>& bd,
                         Complexity_Class complexity=ANY_COMPLEXITY);