-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001075 Best bounded-difference enclosure of rational grids (Specified by)
- PPL-SPEC-001050 Cartesian enclosure of a rational grid (Specified by)
- PPL-SPEC-001656 Common-modulus normalization of congruence systems (Specified by)
- PPL-SPEC-001287 Exact rational affine image (Specified by)
- PPL-SPEC-001288 Exact rational affine preimage (Specified by)
- PPL-SPEC-001289 Generalized variable affine image (Specified by)
- PPL-SPEC-001290 Generalized variable affine preimage (Specified by)
- PPL-SPEC-001291 Generalized expression affine image (Specified by)
- PPL-SPEC-001292 Generalized expression affine preimage (Specified by)
- PPL-SPEC-001293 Bounded affine image abstraction (Specified by)
- PPL-SPEC-001294 Bounded affine preimage abstraction (Specified by)
- PPL-SPEC-001307 Congruence widening and finite delay (Specified by)
- PPL-SPEC-001308 Generator widening and finite delay (Specified by)
- PPL-SPEC-001309 Representation-selected default grid widening (Specified by)
- PPL-SPEC-001310 Congruence-limited extrapolations (Specified by)
- PPL-SPEC-001311 Grid convergence certificates (Specified by)
- PPL-SPEC-001312 Grid construction from boxes (Specified by)
- PPL-SPEC-001313 Grid construction from bounded-difference shapes (Specified by)
- PPL-SPEC-001314 Grid construction from octagonal shapes (Specified by)
- PPL-SPEC-001315 Grid construction from polyhedra (Specified by)
- PPL-SPEC-001295 Free-coordinate extension (Specified by)
- PPL-SPEC-001296 Zero-coordinate extension (Specified by)
- PPL-SPEC-001297 Ordered Cartesian concatenation (Specified by)
- PPL-SPEC-001298 Selected-coordinate existential projection (Specified by)
- PPL-SPEC-001299 Prefix-coordinate existential projection (Specified by)
- PPL-SPEC-001300 Injective coordinate remapping (Specified by)
- PPL-SPEC-001301 Conditional coordinate replication (Specified by)
- PPL-SPEC-001302 Least-grid folding of coordinate alternatives (Specified by)
- PPL-SPEC-001303 Integer-time-elapse grid abstraction (Specified by)
- PPL-SPEC-001304 Exact integer-coordinate restriction (Specified by)
- PPL-SPEC-001305 Bounded-integer wrapping abstraction (Specified by)
- PPL-SPEC-001306 Grid topological closure (Specified by)
- PPL-SPEC-001271 Copying bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001272 Recycling bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001273 Copying insertion of a single rational-grid generator (Specified by)
- PPL-SPEC-001274 Single congruence addition and refinement (Specified by)
- PPL-SPEC-001275 Copying congruence-system addition and refinement (Specified by)
- PPL-SPEC-001276 Recycling congruence-system addition (Specified by)
- PPL-SPEC-001277 Strict addition of a single linear constraint (Specified by)
- PPL-SPEC-001278 Copying and recycling strict constraint-system addition (Specified by)
- PPL-SPEC-001279 Conservative refinement by linear constraints (Specified by)
- PPL-SPEC-001280 Equality-constraint extraction and minimization (Specified by)
- PPL-SPEC-001251 Exact grid equality and inequality (Specified by)
- PPL-SPEC-001252 Equality-compatible grid hashing (Specified by)
- PPL-SPEC-001253 Exact grid containment (Specified by)
- PPL-SPEC-001254 Exact strict grid containment (Specified by)
- PPL-SPEC-001255 Exact grid disjointness (Specified by)
- PPL-SPEC-001256 Exact grid relation with a congruence (Specified by)
- PPL-SPEC-001257 Exact grid relation with a linear constraint (Specified by)
- PPL-SPEC-001258 Exact grid subsumption of grid generators (Specified by)
- PPL-SPEC-001259 Exact grid subsumption of polyhedral generators (Specified by)
- PPL-SPEC-001265 Exact directional boundedness of affine expressions on grids (Specified by)
- PPL-SPEC-001266 Exact rational-grid supremum and attainment (Specified by)
- PPL-SPEC-001267 Exact rational-grid infimum and attainment (Specified by)
- PPL-SPEC-001268 Point witnesses for rational-grid maximization (Specified by)
- PPL-SPEC-001269 Point witnesses for rational-grid minimization (Specified by)
- PPL-SPEC-001270 Exact affine-image frequency and closest value on rational grids (Specified by)
- PPL-SPEC-001281 Exact rational-grid intersection (Specified by)
- PPL-SPEC-001282 Least containing rational grid (Specified by)
- PPL-SPEC-001283 Conditional exact rational-grid union (Specified by)
- PPL-SPEC-001284 Least-grid abstraction of set difference (Specified by)
- PPL-SPEC-001285 Context-preserving grid simplification (Specified by)
- PPL-SPEC-001286 Coordinate cylindrification (Specified by)
- PPL-SPEC-001607 Grid internal status value ownership and prerequisites (Specified by)
- PPL-SPEC-001608 Grid internal status flag queries and transitions (Specified by)
- PPL-SPEC-001609 Grid internal status consistency predicate (Specified by)
- PPL-SPEC-001610 Grid internal status signed-keyword export (Specified by)
- PPL-SPEC-001611 Grid internal status signed-keyword loading and rejection (Specified by)
- PPL-SPEC-001260 Human-readable rational-grid presentation (Specified by)
- PPL-SPEC-001261 Reloadable rational-grid record export (Specified by)
- PPL-SPEC-001262 Compatible rational-grid record loading and failure state (Specified by)
- PPL-SPEC-001263 Owned rational-grid memory accounting (Specified by)
- PPL-SPEC-001264 Rational-grid representation invariant query (Specified by)
- PPL-SPEC-001241 Rational-grid values, coefficient profile and valid use (Specified by)
- PPL-SPEC-001242 Dimensioned empty and universe grid construction (Specified by)
- PPL-SPEC-001243 Owned grid copying, assignment and destruction (Specified by)
- PPL-SPEC-001244 Whole grid value exchange (Specified by)
- PPL-SPEC-001245 Exact grid construction from congruence systems (Specified by)
- PPL-SPEC-001246 Exact grid construction from generator systems (Specified by)
- PPL-SPEC-001247 Grid construction from equality constraint systems (Specified by)
- PPL-SPEC-001248 Ambient and affine grid dimensions (Specified by)
- PPL-SPEC-001249 Exact foundational grid classification (Specified by)
- PPL-SPEC-001250 Borrowed congruence and generator views of grid values (Specified by)
- PPL-SPEC-001165 Best octagonal enclosure of rational grids (Specified by)
A rational grid shall denote the solutions of a finite system of rational linear congruences, including the empty grid and the universe grid in every supported space dimension.
Grid membership combines affine equalities and periodic restrictions; it is not restricted to the integer points of a convex polyhedron.
Verification covers grid value types, congruence interpretation and distinguished elements. Related obligations: 🔗 11. Preservation of integer points in integer restriction.
Use exact congruence calculations to check affine subspaces, discrete periodic sets, rational offsets and inconsistent systems. Include empty and universe grids in zero dimensions.
BagnaraDHMZ07 | whole work (background)
doc/definitions.dox: Rational Grids; Congruences and Congruence Relations. src/Grid_defs.hh: grid domain semantics.
-
4. Best bounded-difference enclosure of rational grids UID: PPL-SPEC-001075 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: BD_Shape(grid,complexity) shall give the least target-profile bounded-difference enclosure of the entire rational grid. It shall preserve every fixed unary or difference affine value, including values implied by the full congruence system. Equivalent source descriptions shall give mathematically equivalent results in the same target profile.
A supported normal shall have a finite bound exactly when it annihilates every real line, integer parameter and difference between source base points. In that case its value shall equal its value at any source base point, and both signed bounds shall be converted to the target profile. A nonzero response to an integer parameter shall make the normal unbounded in both directions; a periodic restriction shall not become a finite interval or an integer-only coordinate carrier. Empty grids shall remain empty. The complexity argument shall be ignored for the three declared complexity values.
For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.
The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.
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 [LINK: PPL-SPEC-001057].
Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.
RATIONALE: Finite support is determined by the whole affine geometry of a grid. Integer and real unbounded displacements constrain finite support in the same way; periodicity alone does not supply a finite bound.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
explicit BD_Shape(const Grid& grid, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Use raw rational base points, integer parameters and real lines to compute constant or unbounded response for each primitive normal. Include fixed differences, singleton fractions, proper periodic directions, empty/zero dimensions, equivalent congruence/generator descriptions and cache histories, independent output affine dimension and target-profile rounding.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9-10, zero-based). BagnaraDHMZ07 | Section 3, The Generator Representation (PDF page index 7, zero-based).
SOURCE: src/Shape_Conversion_Support.hh; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/fromgrid1.cc; tests/BD_Shape/dimensionlimits1.cc; tests/BD_Shape/supportconversion1.cc.
-
7. Cartesian enclosure of a rational grid UID: PPL-SPEC-001050 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000022 Cartesian meaning of boxes (Specifies)
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Box(gr,complexity) shall contain the rational grid. A coordinate whose value is fixed throughout a nonempty grid shall be constrained to that rational value, with target endpoint conversion as specified. If a line or an integer-parameter direction varies that coordinate, its projection shall be unbounded in both directions. Correlations and periodic gaps shall not become additional Cartesian restrictions.
With exact rational interval endpoints the result shall be the least Cartesian box of the grid. Finite inexact target profiles shall provide the outward coordinate enclosure. Empty grids and zero-dimensional empty/universe shall retain their set meanings. All three declared complexity values shall be admitted; the argument shall not change the mathematical result or the polynomial generator-based computation.
The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.
Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.
RATIONALE: A rational grid coordinate is either fixed or ranges without a finite lower or upper bound; a box cannot retain periodic gaps or cross-coordinate congruences.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:
explicit Box(const Grid& gr, Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
VERIFICATION_CRITERIA: Derive exact coordinate projections from independent rational base points, real line directions and integer parameter directions. Include fractional fixed coordinates, non-axis-aligned generators, finite-index lattice correlations, redundant descriptions, fresh/cached congruence/generator states, empty/zero dimensions, complexity options and outward target conversion.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9–10, zero-based).
SOURCE: src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/fromgrid1.cc.
-
21. Common-modulus normalization of congruence systems UID: PPL-SPEC-001656 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000014 Meaning of linear congruences (Specifies)
- PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For a valid congruence system with positive moduli m1, …, mk, normalize_moduli() shall set every proper row's modulus to L = lcm(m1, …, mk) and multiply its affine expression by L ⁄ mi. It shall preserve row order, row count, ambient dimension, storage representation and the relation denoted by every row. Modulus-zero equalities shall remain unchanged. Empty and equality-only systems shall remain unchanged.
Every evaluated LCM, ratio and coefficient-scaling intermediate shall be representable in the configured coefficient profile. Initialization, lifetime, synchronization and failure guarantees shall follow 🔗 1. Affine congruence meaning and valid numerical use.
RATIONALE: Multiplying the expression and modulus by the same positive factor preserves their integral-quotient relation. A common positive modulus supports joint system transformations without changing the represented grid.
INTERFACE: Internal member of Parma_Polyhedra_Library::Congruence_System:
void normalize_moduli();
VERIFICATION_CRITERIA: Exercise public grid construction and normalization with empty systems, equalities, equal and unequal positive moduli, mixed row orders and both storage representations. Compare independent coordinate-period generator models and preserve copied sources. Include large GMP moduli and bounded profiles within representability limits. Inspect the exact row-scaling loop for order, count and representation preservation.
SOURCE: src/Congruence_System_defs.hh; src/Congruence_System.cc; tests/gridvaluesspec1.cc.
-
1. Exact rational affine image UID: PPL-SPEC-001287 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: affine_image(var, expr, denominator) shall assign the exact image under x’v = e(x) ⁄ d, with all other coordinates unchanged. denominator defaults to one. The entry denominator value shall be used even when borrowed from a receiver-owned congruence or generator. External expression and scalar values shall be preserved. Zero denominator, an invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.
Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: An affine transformation maps supporting points, integer parameters and real directions exactly; entry scalar capture prevents descriptor invalidation from changing the transformation.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void affine_image(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Use independent rational generator transformations for invertible and singular maps, negative denominators, all cache histories, borrowed scalar owners, zero values and dimension rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affineimage1.cc; tests/Grid/affineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
2. Exact rational affine preimage UID: PPL-SPEC-001288 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: affine_preimage(var, expr, denominator) shall assign exactly the set of x whose image under x’v = e(x) ⁄ d, with other coordinates unchanged, belongs to the entry receiver. denominator defaults to one. It shall use the entry denominator value even when borrowed from receiver-owned descriptions, and preserve external inputs. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.
Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Substitution in congruences computes inverse images even when the transformation is singular.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void affine_preimage(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Check independently substituted congruences, invertible/singular maps, constants, negative denominators, fractional phases, borrowed scalars and invalid arguments under every cache history.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affinepreimage1.cc; tests/Grid/affinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
3. Generalized variable affine image UID: PPL-SPEC-001289 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For EQUAL, generalized_affine_image(var, relsym, expr, denominator, modulus) shall assign the exact relational image under x’v = e(x) ⁄ d + mk, k ∈ Z, with other coordinates unchanged. Zero modulus shall mean ordinary affine image; either sign of a nonzero modulus shall denote the same period. Defaults are denominator one and modulus zero. Borrowed scalars shall use their entry values. For an ordered inequality and zero modulus, it shall conservatively cylindrify the target. NOT_EQUAL and ordered relations with nonzero modulus are unsupported and shall throw std::invalid_argument before mutation, including on empty receivers. Zero denominator and dimension errors shall likewise be rejected before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: An integer target period represents modular nondeterminism; ignoring an ordered bound still gives a sound coarse grid abstraction.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_image(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one(), Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Use independent rational image generators plus the target period, signed and zero moduli, singular maps, borrowed denominators/moduli, inequality cylindrification and rejection controls.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage1.cc; tests/Grid/generalizedaffineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
4. Generalized variable affine preimage UID: PPL-SPEC-001290 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generalized_affine_preimage(var, relsym, expr, denominator, modulus) shall assign the exact inverse relational image for the EQUAL relation in [LINK: PPL-SPEC-001289]. Defaults, modulus sign, borrowed entry values and rejection scope shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify the target coordinate of the entry receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Inverse modular substitution must retain both denominator and modulus until the induced inverse period has been formed.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_preimage(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one(), Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Check rational range and congruence substitution independently for unit, negative, nonunit and zero target coefficients, signed moduli, singular preimages, borrowed scalar owners and relation/dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage1.cc; tests/Grid/generalizedaffinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
5. Generalized expression affine image UID: PPL-SPEC-001291 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For EQUAL, generalized_affine_image(lhs, relsym, rhs, modulus) shall assign the exact image of the relation lhs(x’) − rhs(x) ∈ mZ, where the coordinates with nonzero coefficients in lhs may change simultaneously and all other coordinates are unchanged. Zero modulus means equality and is the default; modulus sign is immaterial. Constant lhs shall constrain the old state without assigning a coordinate. The modulus shall use its entry value even if borrowed. Ordered inequalities with zero modulus shall conservatively cylindrify the assigned coordinates. NOT_EQUAL or an ordered relation with nonzero modulus shall throw std::invalid_argument before mutation, including on empty receivers. Excess expression dimensions shall likewise be rejected before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The expression overload is a simultaneous relation, so it must preserve the pre-update meaning of the right-hand side.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_image(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs, Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Check independent projected generator/range calculations for overlapping and disjoint expression supports, constant sides, signed/zero moduli, borrowed moduli, inequality cylindrification and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
6. Generalized expression affine preimage UID: PPL-SPEC-001292 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generalized_affine_preimage(lhs, relsym, rhs, modulus) shall assign the exact inverse relational image of EQUAL as defined in [LINK: PPL-SPEC-001291]. Assigned coordinates are those occurring in lhs; all others are shared between old and new states. Default modulus, sign, borrowed entry-value and rejection rules shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify those coordinates of the entry receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The inverse relation constrains the old right-hand-side value by the possible new left-hand-side values.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_preimage(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs, Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Use independent rational range and congruence calculations for both expression supports, constant cases, signed periods, borrowed moduli, inequalities and dimension/relation rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
Incoming link from: 8. Bounded affine preimage abstraction1
7. Bounded affine image abstraction UID: PPL-SPEC-001293 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: bounded_affine_image(var, lb_expr, ub_expr, denominator) shall return the cylindrification of the entry receiver in var, preserving ambient dimension and its projection on all other coordinates. This is a conservative abstraction of the bounded affine image; it need not detect infeasible bounds or retain equal bounds. The denominator defaults to one. Zero denominator, invalid target or excess dimension of either bound shall throw std::invalid_argument before mutation, including empty.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The Grid interface deliberately uses a coarse forgetting operation for bounded assignments.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void bounded_affine_image(Variable var, const Linear_Expression& lb_expr, const Linear_Expression& ub_expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Check equality with independently projected grids for equal, reversed, constant and variable bounds, either denominator sign, empty inputs and each invalid bound/target/denominator.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/boundedaffineimage1.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
8. Bounded affine preimage abstraction UID: PPL-SPEC-001294 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: bounded_affine_preimage(var, lb_expr, ub_expr, denominator) shall return the cylindrification of the entry receiver in var. It shall preserve dimension and all restrictions among other coordinates, and conservatively contain the concrete bounded-relation preimage. It need not detect infeasible bounds. Default and rejection rules shall be as in 🔗 7. Bounded affine image abstraction.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Forgetting the updated coordinate is sound for the bounded preimage even when sharper relational information could be computed.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void bounded_affine_preimage(Variable var, const Linear_Expression& lb_expr, const Linear_Expression& ub_expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Compare with independent projection and free-coordinate restoration for equal/reversed bounds, singular cases, empty and invalid arguments.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/boundedaffinepreimage1.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
1. Congruence widening and finite delay UID: PPL-SPEC-001307 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: congruence_widening_assign(y,tp) requires Y ⊆ X and shall return a grid containing X, preserving dimension and the operand value. Empty previous, empty current and zero dimensions shall preserve the receiver. After normalization, if the current grid has fewer independent equalities than the previous one, it shall retain the current grid. Otherwise it shall retain all current equalities and the current proper congruences whose corresponding normalized pivot coefficients agree with the previous description, discarding other proper rows. A sequence with fixed coordinate order and finite delay shall stabilize.
With tp null or pointing to zero, the computed widening shall be assigned. With a positive token count, the entry grid shall be retained and one token consumed exactly when the computed widening strictly enlarges it. The token object shall be separate writable storage. Unequal dimensions shall throw std::invalid_argument before mutation. Failure guarantees shall not imply rollback of tokens.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Pivot-stable normalized congruences give a finite descending certificate while retaining modular information. The published paper defines both widenings; the technical report supplies the full congruence-widening proof and certificate discussion.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void congruence_widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check normalized-pivot selection, strict chains, equality-dimension growth, fixed points, zero/positive tokens, empty and zero-dimensional cases, source preservation and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
2. Generator widening and finite delay UID: PPL-SPEC-001308 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generator_widening_assign(y,tp) shall obey the inclusion, dimensions, empty cases and finite-token rules in 🔗 1. Congruence widening and finite delay. It shall normalize generator descriptions. If the current grid has more generators or real lines than the previous grid, it shall retain the current grid. Otherwise it shall retain the supporting point and real lines, retain parameters with unchanged corresponding normalized pivots, and replace changed parameter directions by real lines. With fixed coordinate order and finite delay, increasing iterations shall stabilize.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Promoting changing discrete directions to real directions forces finite progress while preserving the current grid.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generator_widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check independent parameter/line promotion cases and ascending lattice chains, point phases, tokens, generator/congruence caches, zero dimensions and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening2.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Representation-selected default grid widening UID: PPL-SPEC-001309 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: widening_assign(y,tp) shall select congruence widening when both congruence descriptions are current, otherwise generator widening when both generator descriptions are current. For mixed histories it may choose either strategy and normalize the required descriptions. It shall obey the common inclusion, dimension, empty and finite-token rules in 🔗 1. Congruence widening and finite delay. The selected strategy may affect precision; identical output across different cache histories is not required. With fixed coordinate order and finite delay, increasing iterations shall stabilize, including when available descriptions change the selected strategy between calls.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The default strategy exploits available descriptions without promising identical precision from the two distinct widenings.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check each cache-selection route against the corresponding named widening and check containment, tokens, fixed points and convergence on ascending chains.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
4. Congruence-limited extrapolations UID: PPL-SPEC-001310 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000430 Compound extrapolation and finite convergence (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: limited_congruence_extrapolation_assign, limited_generator_extrapolation_assign and limited_extrapolation_assign shall require Y ⊆ X and apply their corresponding named or default widening, then intersect with the supplied limiter congruences satisfied by every entry point of X. Valid equalities already retained by widening need not be inserted redundantly. With an empty limiter they shall have exactly the corresponding widening's mathematical result and token effect. Finite-token behavior shall follow 🔗 1. Congruence widening and finite delay. The result shall contain the entry receiver, preserve ambient dimension and preserve external limiter/operand values. Unequal grid dimensions or excess limiter dimension shall throw std::invalid_argument before mutation. Convergence requires the usual widening iteration and a fixed finite limiter set; changing limiters provide only extrapolation guarantees.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Limiting restores established entry invariants, and an empty limiter must not silently switch the named widening strategy. The report gives the additional extrapolation details.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void limited_congruence_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr); void limited_generator_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr); void limited_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Compare all three variants with their corresponding widenings for empty, satisfied, unsatisfied and mixed limiter rows; check generator-only caches, tokens, ascending chains, empty grids and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/limitedextrapolation1.cc; tests/Grid/limitedextrapolation2.cc; tests/Grid/limitedextrapolation3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
5. Grid convergence certificates UID: PPL-SPEC-001311 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000430 Compound extrapolation and finite convergence (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid_Certificate shall represent the lexicographic pair (e, p): the number of independent equalities and the number of proper congruence rows in a minimal description of a nonempty grid. In positive ambient dimension, p includes the normalization congruence and is one plus the number of independent discrete parameter directions. The grid-taking constructor and grid-taking comparison/stabilization queries require a nonempty grid. Default construction shall represent the zero-dimensional-universe certificate (0, 0); copying and assignment shall preserve the pair.
compare shall return minus one, zero or plus one for a smaller, equal or greater pair. is_stabilizing(gr) shall return exactly whether this pair is strictly greater than gr's pair. Compare shall order greater pairs first. OK() shall return true for certificates constructed through this interface. Computing a certificate may normalize grid caches but shall preserve its mathematical value. The two counts are the finite progress measure for compatible Grid widenings; they do not encode the grid's phase or coefficients.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Finite structural counts support powerset convergence without storing an entire represented grid. The report supplies the certificate construction.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The compiler-supplied copy assignment preserves the certificate counts.
class Grid_Certificate { public: Grid_Certificate(); Grid_Certificate(const Grid& gr); Grid_Certificate(const Grid_Certificate& y); ~Grid_Certificate(); int compare(const Grid_Certificate& y) const; int compare(const Grid& gr) const; bool is_stabilizing(const Grid& gr) const; struct Compare { bool operator()(const Grid_Certificate& x, const Grid_Certificate& y) const; }; bool OK() const; };
VERIFICATION_CRITERIA: Compute equality and parameter ranks independently for empty-excluded product/coupled grids and every cache route. Check defaults, copies, assignment, comparison signs, equal-count distinct grids, reverse ordering and stabilization equivalence.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/certificate1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
1. Grid construction from boxes UID: PPL-SPEC-001312 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid(box,complexity) shall preserve the box's ambient dimension and construct its exact real affine hull as a grid. Empty shall yield empty. Each singleton interval shall fix its coordinate; every non-singleton coordinate shall be free. Open bounds do not add excluded endpoints to a singleton. All complexity choices shall have this meaning, under the source interval's arithmetic conditions and 🔗 1. Rational-grid values, coefficient profile and valid use. The source value shall be preserved. Excess ambient dimension shall throw std::length_error before representation allocation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A Cartesian box contributes only fixed-coordinate equalities to its affine hull.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
template <typename Interval> explicit Grid(const Box<Interval>& box, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Compare rational/open/closed/unbounded and empty boxes with independently selected singleton-coordinate equations, both numerical representations and dimension boundaries. Exercise empty, universe, fixed, mixed and open non-singleton boxes at dimensions 63, 64 and 65 and above, with every complexity choice. Compare each reconstructed minimal representation and subsequent prefix projections with independent fixed-coordinate equations. Check preservation of the source box and of the floating-point rounding mode and exception flags for dyadic floating bounds. Compare canonical endpoint pairs with equal numerators and unequal denominators, different numerators and equal denominators, equal fractions and canonical zero. Check both extracted fractions and the resulting fixed or free coordinate. Check negative integer and dyadic singleton coordinates through positive canonical bound denominators, including preservation of the source box and floating environment. Inspect LCM-scaled anchors before minimizing queries: compare literal primitive coordinates and positive divisors for free, mixed and fixed axes, coprime and nested denominators, and confirm that reading the generator view leaves the serialized representation unchanged.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frombox1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.
-
2. Grid construction from bounded-difference shapes UID: PPL-SPEC-001313 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid(bd,complexity) shall preserve ambient dimension and construct the exact real affine hull of the bounded-difference shape, including empty. It shall retain all implied affine equalities under the source shape's arithmetic preconditions and 🔗 1. Rational-grid values, coefficient profile and valid use, for every complexity choice. The source's mathematical value shall be preserved; closure caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Tight opposite difference bounds identify all affine equalities of a nonempty bounded-difference shape.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
template <typename U> explicit Grid(const BD_Shape<U>& bd, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Use independently known equalities and strict inequalities among rational difference constraints, redundant/latent-empty source descriptions, all complexity values and source preservation.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frombdshape1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.
-
3. Grid construction from octagonal shapes UID: PPL-SPEC-001314 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid(os,complexity) shall preserve ambient dimension and construct the exact real affine hull of the octagonal shape, including empty, under its arithmetic preconditions and 🔗 1. Rational-grid values, coefficient profile and valid use. Every complexity choice shall retain the implied affine equalities. The source's mathematical value shall be preserved; closure caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Tight opposite octagonal bounds determine the affine equalities of the shape.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
template <typename U> explicit Grid(const Octagonal_Shape<U>& os, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Check fixed coordinates, sum/difference equalities, open affine freedom, redundant rows and latent emptiness across complexity choices, source caches and numerical profiles.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/fromoctagonalshape1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.
-
4. Grid construction from polyhedra UID: PPL-SPEC-001315 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid(ph,complexity) shall preserve ambient dimension and contain the polyhedron's real affine hull. With ANY_COMPLEXITY it shall equal that affine hull, including for NNC polyhedra and empty. Restricted complexity may retain only explicit available equalities and may fail to detect latent emptiness, giving a coarser grid. If generators are used, supporting points, closure points, rays and lines shall contribute their real affine span. Marked empty and zero-dimensional empty shall yield empty in every complexity class. The source value shall be preserved, though caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
For a bounded coefficient profile, directions joining rational points shall be computed from complete cross-products of their numerators and divisors, then reduced by a common positive factor before their coefficients are admitted. Constants and NNC epsilon coordinates shall not contribute to these line directions. This projective normalization shall not rescale a lattice parameter.
RATIONALE: An exact affine hull can require constraint minimization; a complexity-limited conversion may conservatively omit hidden equalities.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
explicit Grid(const Polyhedron& ph, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Compare exact conversions with independent affine spans of C/NNC polyhedral generators, hidden equalities and emptiness; check sound limited-complexity outputs, source preservation, dimensions and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frompolyhedron1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.
-
1. Free-coordinate extension UID: PPL-SPEC-001295 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000418 Distinguished coordinate extensions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_space_dimensions_and_embed(m) shall assign G×Rm, placing the new free coordinates after the old ones. Zero additions shall preserve the value and dimension; empty remains empty in the enlarged space. Exceeding max_space_dimension() shall throw std::length_error before mutation, using an overflow-safe dimension check.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Free extension preserves every old-coordinate relation without constraining appended coordinates.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_space_dimensions_and_embed(dimension_type m);
VERIFICATION_CRITERIA: Check zero/positive additions on empty, zero-dimensional, point, periodic and continuous grids, both descriptions and dimension-overflow boundaries.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/addspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
2. Zero-coordinate extension UID: PPL-SPEC-001296 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000418 Distinguished coordinate extensions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_space_dimensions_and_project(m) shall assign G×{0}m, appending the new zero coordinates. A nonempty zero-dimensional grid shall become the origin, and empty shall remain empty. Zero additions are identity. Exceeding max_space_dimension() shall throw std::length_error before mutation, using an overflow-safe dimension check.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The historical project-named interface adds zero coordinates rather than free ones.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_space_dimensions_and_project(dimension_type m);
VERIFICATION_CRITERIA: Check explicit zero-coordinate equations and dimension growth from zero dimensions, empty/periodic/continuous inputs, zero additions and overflow rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/addspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Ordered Cartesian concatenation UID: PPL-SPEC-001297 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
STATEMENT: concatenate_assign(y) shall assign the ordered Cartesian product X×Y in dimension nX + nY. Either empty operand shall make the result empty. Self concatenation shall use the entry value twice. The distinct operand shall retain its mathematical value. A dimension sum beyond max_space_dimension() shall throw std::length_error before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Concatenation combines independent state vectors and must snapshot self input before descriptor growth.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void concatenate_assign(const Grid& y);
VERIFICATION_CRITERIA: Check independent factor membership in both orders, self concatenation, zero-dimensional identities, empty operands, description histories and dimension-sum rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/concatenate1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
4. Selected-coordinate existential projection UID: PPL-SPEC-001298 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000417 Coordinate removal and existential projection (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: remove_space_dimensions(vars) shall assign exact existential projection onto the unselected coordinates, preserving their relative order and renumbering them consecutively. Its dimension shall decrease by the selection size. Empty selection is identity; removing every coordinate yields zero-dimensional universe exactly for nonempty input. Any out-of-range index shall throw std::invalid_argument before mutation, including empty.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Existential elimination must preserve the lattice information among remaining coordinates.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void remove_space_dimensions(const Variables_Set& vars);
VERIFICATION_CRITERIA: Check independent projected generator systems for coupled rational lattices, arbitrary selected subsets, all/none removal, empty inputs and invalid indices.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/removespacedims1.cc; tests/Grid/removespacedims2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
5. Prefix-coordinate existential projection UID: PPL-SPEC-001299 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000417 Coordinate removal and existential projection (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: remove_higher_space_dimensions(new_dimension) shall assign the exact projection onto the prefix of that many coordinates. Equal dimension is identity; zero produces zero-dimensional universe exactly when the entry grid is nonempty. A requested dimension greater than the current dimension shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Prefix removal is the ordered special case of existential coordinate projection.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void remove_higher_space_dimensions(dimension_type new_dimension);
VERIFICATION_CRITERIA: Compare with independent generator truncation and selected-coordinate removal, including latent empty, every prefix and greater-dimension rejection. Compare literal prefix descriptions of equalities, independent residue lattices and coupled modular rows across dense and sparse representations, both minimal systems, each minimal system alone and current nonminimal generators. Check that compatible minimal caches survive projection before querying them again, then reconstruct and compare both representations of the result.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/removespacedims1.cc; tests/Grid/removespacedims2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
6. Injective coordinate remapping UID: PPL-SPEC-001300 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000419 Coordinate remapping semantics (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: map_space_dimensions(pfunc) shall project away unmapped old coordinates and move each retained coordinate to its supplied destination, exactly. The mapping shall be an injection from a subset of old indices onto a dense destination set {0, …, m − 1}, with m ≤ n. An invalid mapping violates the interface precondition; runtime rejection is not guaranteed. Empty image gives zero-dimensional projection. The mapping object shall provide has_empty_codomain(), max_in_codomain() and maps(i,j) with the meanings in 🔗 1. Public partial coordinate-map type and valid use; queries shall preserve the mapping. For positive old dimension the empty-image query precedes other queries; if empty, no maximum or lookup is required. Otherwise the maximum is queried at most once and lookups at most once per old coordinate. Zero old dimension may return without queries.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Dense injective remapping defines a valid coordinate permutation after projection, without inventing unused output coordinates.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
template <typename Partial_Function> void map_space_dimensions(const Partial_Function& pfunc);
VERIFICATION_CRITERIA: Check independent permutations and partial projections, empty/self mappings, zero dimensions, callback counters and both descriptions. Exercise only mappings meeting the dense-image prerequisite. Check verified identity maps without temporary C++ allocation, unchanged cached representations and owned capacity after copying and grow/shrink histories. Compare first/last/middle swaps, reversal, cycles and projections against literal coordinate oracles; preserve floating-point mode/flags. Inject every mapping-query exception and check propagation, safe replacement and temporary cleanup. Enforce at most one lookup per source coordinate, including the first nontrivial cycle after a fixed suffix.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/mapspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc. tests/coordinatemappingfixture.hh;
-
7. Conditional coordinate replication UID: PPL-SPEC-001301 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
STATEMENT: expand_space_dimension(var,m) shall append m independent replicas of the selected coordinate conditioned on the unchanged other coordinates. Every replica, separately substituted for var, shall satisfy the original grid together with those other coordinates; replicas shall not be required to equal one another. Original coordinates retain their meaning. Empty remains empty and zero replicas are identity. An invalid source index shall throw std::invalid_argument; dimension overflow shall throw std::length_error, before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Conditional replication preserves correlations with the common context while allowing the separate values of a nondeterministic coordinate.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void expand_space_dimension(Variable var, dimension_type m);
VERIFICATION_CRITERIA: Compare copied congruence equations with independent conditional models; distinguish periodic replicas from equal copies. Include empty, zero replicas, invalid source and dimension overflow.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/expandspacedim1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
8. Least-grid folding of coordinate alternatives UID: PPL-SPEC-001302 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Specifies)
STATEMENT: fold_space_dimensions(vars,dest) shall form the least grid containing the entry grid and every alternative obtained by assigning dest the old value of one selected source, then existentially project away the selected sources. Remaining coordinates retain their order. The destination shall be a valid unselected coordinate. Invalid destination, invalid source or destination included in the selection shall throw std::invalid_argument before mutation. Empty selection is identity after destination validation; empty remains empty in the reduced space.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Folding abstracts a choice among source coordinates, rather than adding or identifying all their values.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void fold_space_dimensions(const Variables_Set& vars, Variable dest);
VERIFICATION_CRITERIA: Compute independent affine alternatives, their grid hull and projection. Check multiple sources, correlations, empty selection/input and each invalid-selection/destination case. Compare independent entry-grid affine images followed by grid join and projection, with zero/single/multiple noncontiguous sources, different destination positions, dense/sparse rows, rational anchors, destination-only periods or lines, correlations and pending or minimized caches.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/foldspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
1. Integer-time-elapse grid abstraction UID: PPL-SPEC-001303 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: time_elapse_assign(y) shall assign the least grid containing {p + μq ∣ p ∈ X, q ∈ Y, μ ∈ Z}. The multiplier is integer time, including negative integers. Either empty operand shall yield empty. The distinct operand value and receiver dimension shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Integer multiples of supporting points become discrete parameters; replacing integer time with real time would unnecessarily lose modular information.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void time_elapse_assign(const Grid& y);
VERIFICATION_CRITERIA: Construct independent supporting-point/parameter/line hulls for integer time; distinguish fractional/discrete periods from real rays. Include zero dimensions, self operands, empty and dimension rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/timeelapse1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
2. Exact integer-coordinate restriction UID: PPL-SPEC-001304 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: drop_some_non_integer_points(complexity) shall intersect exactly with Zn. The overload with vars shall instead require integrality exactly on those coordinates. Unselected coordinates need not be integral; an empty selection is identity. Every complexity value shall give this exact result. Out-of-range selected indices shall throw std::invalid_argument before mutation, including empty.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Coordinate integrality is itself a conjunction of congruences and is exactly representable by grids.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void drop_some_non_integer_points(Complexity_Class complexity = ANY_COMPLEXITY); void drop_some_non_integer_points(const Variables_Set& vars, Complexity_Class complexity = ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Check independently intersected rational cosets with integer coordinate constraints, fractional phases, all/selected/no coordinates, coupled lattices, empty and invalid indices.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/dropnonintegerpoints1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Bounded-integer wrapping abstraction UID: PPL-SPEC-001305 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: wrap_assign(vars,w,r,o,cs_p,complexity_threshold,wrap_individually) shall conservatively abstract bounded-integer conversion on the selected coordinates, with modulus M = 2w and the signed or unsigned range selected by r. Coordinates supplied as bounded integers are assumed integral. Unselected coordinates and their projection shall be preserved. Empty selections are identity. Any out-of-range selected index, or an optional constraint system of excess dimension, shall throw std::invalid_argument before mutation. The optional constraints and the two precision controls need not improve the result.
For OVERFLOW_WRAPS, a constant integer shall map to its unique in-range residue. A discrete coordinate shall retain its entry period together with period M, except that a period divisible by M shall collapse to the unique in-range residue. Rational periods shall first determine their possible integer residues; no possible integer shall yield empty. A constant noninteger shall yield empty. Real line directions may be retained conservatively. For OVERFLOW_IMPOSSIBLE, no in-range possible integer shall yield empty, one shall fix the coordinate, and multiple values may retain the original periodic abstraction. For OVERFLOW_UNDEFINED, overflow may forget the coordinate's value while retaining integrality; an already representable constant may be retained. No global optimality for correlated coordinates is required.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A full-period multiple has one machine residue; representing it as an infinite modular coset loses a representable singleton.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void wrap_assign(const Variables_Set& vars, Bounded_Integer_Type_Width w, Bounded_Integer_Type_Representation r, Bounded_Integer_Type_Overflow o, const Constraint_System* cs_p = nullptr, unsigned complexity_threshold = 16, bool wrap_individually = true);
VERIFICATION_CRITERIA: Enumerate signed/unsigned rational one-coordinate cosets and integer representatives independently for wrapping and impossible overflow. Check exact/larger/nonmultiple periods, negative phases, constants, continuous directions, correlated untouched coordinates, empty selections and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/wrap1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
4. Grid topological closure UID: PPL-SPEC-001306 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000425 Topological closure and closure approximation (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: topological_closure_assign() shall preserve the receiver's mathematical value and ambient dimension. Every represented rational grid, including empty, is closed in its ambient real topology.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A rational grid is a finite-dimensional sum of a real subspace and a discrete lattice; it has no excluded limit points.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void topological_closure_assign();
VERIFICATION_CRITERIA: Check empty, zero-dimensional, discrete, continuous and mixed grids with both descriptions and redundant generators.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/topclosure1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
Incoming link from: 2. Recycling bulk insertion of rational-grid generators1
1. Copying bulk insertion of rational-grid generators UID: PPL-SPEC-001271 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(input) shall add the input points, parameters and lines to a generator description of the receiver, with the meaning in 🔗 1. Rational-grid values, coefficient profile and valid use. For nonempty G = p + H, input points ri, parameters qj and lines lk shall produce p + H + ∑iZ(ri − p) + ∑jZqj + ∑kRlk. In particular, adding points shall form a grid hull, not a finite union.
A system with no stored rows shall be a no-op. If the receiver is empty and the nonempty input has no point, the operation shall throw std::invalid_argument. Otherwise an empty receiver shall acquire exactly the grid generated by the input. A zero-dimensional point shall turn zero-dimensional empty into universe; zero-dimensional universe shall be preserved. Zero parameters omitted by the generator-system contract shall not constitute stored rows.
The input's value, dimension and storage shall be preserved, including when an exception propagates. A current generator-system view borrowed from the receiver may be supplied: its pre-call generators shall be used as the input, and normal receiver-view invalidation shall apply during mutation.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The copying interface must preserve its source while combining integer displacements and real line directions, including when cached congruences are inconsistent.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(const Grid_Generator_System& input);
VERIFICATION_CRITERIA: Use independent rational coset calculations for points, parameters and lines under invertible coordinate transformations. Cross empty, singleton, periodic and continuous receivers with both descriptions and cache histories. Exercise pending contradictory rows, lower-dimensional inputs, dense/sparse storage, reversed/redundant rows, borrowed self views, unchanged source records, dimension errors, zero dimensions and allocation failures.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
2. Recycling bulk insertion of rational-grid generators UID: PPL-SPEC-001272 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(std::move(input)) and add_recycled_grid_generators(input) shall produce the same mathematical receiver value, ambient dimension and ordinary input-rejection outcomes as 🔗 1. Copying bulk insertion of rational-grid generators. These operations may transfer ownership from the supplied system. The input shall be a separate writable object; it shall not alias receiver-owned storage. After successful or exceptional return the input shall retain ownership sufficient for destruction. Its rows, dimension, storage and suitability for subsequent queries shall not be assumed.
A receiver discovered empty while converting its congruences shall use the same insertion rules as an already marked empty receiver. Nonempty input without a supporting point shall therefore be rejected; input with a point shall establish the generated grid. Conversion shall not leave subsequent normalization dependent on a nonexistent old supporting point.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Recycling changes ownership permissions, while the generated set and empty-grid point requirement remain the same as for copying insertion.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(Grid_Generator_System&& input); void add_recycled_grid_generators(Grid_Generator_System& input);
VERIFICATION_CRITERIA: Check recycling and copying separately against the same independent coset oracle. Include empty inputs, lower-dimensional rows, zero dimensions, systems with no points, latent contradictions, mixed point/parameter/line systems, every observed allocation-failure frontier and destruction of both surviving objects.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc; tests/gridconsuminginsertions1.cc.
-
3. Copying insertion of a single rational-grid generator UID: PPL-SPEC-001273 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generator(g) shall add the pre-call generator value to a generator description of the receiver, preserving its ambient dimension. For nonempty G = p + H, adding a point r shall produce p + H + Z(r − p); adding a parameter q shall produce p + H + Zq; adding a line l shall produce p + H + Rl. Insertion of an already supplied generator shall be mathematically idempotent. A zero parameter shall preserve a nonempty grid.
An empty receiver shall accept a point and become that singleton. A parameter or line supplied to empty shall throw std::invalid_argument, including a zero parameter. Previously undetected inconsistency shall have the same meaning as already marked empty. In zero dimensions a point shall establish universe; a parameter shall preserve universe and be rejected by empty.
Missing coordinates shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including an empty receiver or a zero parameter. Input type and value shall be captured safely when the argument is borrowed from the receiver's generator view. Receiver mutation may invalidate that view according to 🔗 10. Borrowed congruence and generator views of grid values; the external input case shall preserve its source. The result shall not depend on storage, redundant rows or cache history.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. External input descriptors shall retain their value.
RATIONALE: Points, integer parameters and real lines extend a grid in different ways. The copy-taking interface must not inspect a borrowed argument after receiver storage growth invalidates it.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generator(const Grid_Generator& g);
VERIFICATION_CRITERIA: Use independent rational coset calculations for each generator kind. Check empty and latent-empty receivers, zero dimensions and parameters, lower or excess declared dimension, fractional points, storage and cache histories. Insert borrowed points, parameters and lines across storage growth and compare with their pre-call grid. Exercise external-input preservation and every observed allocation-failure frontier, checking surviving ownership.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridsingleinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
Incoming link from: 2. Copying congruence-system addition and refinement1
1. Single congruence addition and refinement UID: PPL-SPEC-001274 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruence(cg) and refine_with_congruence(cg) shall replace the receiver G by G∩{x ∣ cg(x)}. Equalities and proper congruences shall have their meanings in 🔗 1. Rational-grid values, coefficient profile and valid use. Tautologies shall preserve the grid and contradictions shall produce empty. Lower-dimensional rows shall be zero extended; excess declared row dimension shall throw std::invalid_argument before mutation, including for an empty receiver. The external row value shall be preserved.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Adding a congruence is an exact meet, including modular inconsistency that is detected only when descriptions are normalized.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruence(const Congruence& cg); void refine_with_congruence(const Congruence& cg);
VERIFICATION_CRITERIA: Cross equality, proper, tautological and contradictory rows with empty, singleton, periodic and continuous grids, both storage choices, pending contradictions and both cached descriptions. Check lower/excess dimensions and source preservation.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruence1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
Incoming link from: 3. Recycling congruence-system addition1
2. Copying congruence-system addition and refinement UID: PPL-SPEC-001275 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruences(cgs) and refine_with_congruences(cgs) shall intersect the receiver with the conjunction of all input rows, exactly as repeated 🔗 1. Single congruence addition and refinement. An empty system shall preserve the grid. An independently supplied input shall retain its value, declared dimension and storage, including on exceptional return. The receiver's current congruence view may be supplied; its entry value shall be used before invalidation. Excess declared input dimension shall throw std::invalid_argument before mutation, even for no rows or an empty receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Copying a conjunction must not depend on row order, redundancy or whether the source is a receiver-owned current view.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruences(const Congruence_System& cgs); void refine_with_congruences(const Congruence_System& cgs);
VERIFICATION_CRITERIA: Compare bulk and single-row exact meets with independent cosets. Include borrowed self systems, unused declared dimensions, empty systems, contradictions and source records.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Recycling congruence-system addition UID: PPL-SPEC-001276 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruences(std::move(cgs)) and add_recycled_congruences(cgs) shall produce the same mathematical grid and dimension-rejection behavior as 🔗 2. Copying congruence-system addition and refinement. The source shall be a separate writable system without receiver-owned storage. Its storage may be transferred; after successful or exceptional return it shall retain ownership sufficient for destruction, without a guarantee about its rows or suitability for queries.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Recycling changes source ownership permissions without changing conjunction semantics.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruences(Congruence_System&& cgs); void add_recycled_congruences(Congruence_System& cgs);
VERIFICATION_CRITERIA: Check copied and recycled systems against the same independent intersections, including empty, contradictory, lower-dimensional and excess-dimensional systems. Exercise allocation failures and destruction of both objects.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc; tests/gridconsuminginsertions1.cc.
-
Incoming link from: 5. Copying and recycling strict constraint-system addition1
4. Strict addition of a single linear constraint UID: PPL-SPEC-001277 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_constraint(c) shall intersect the receiver exactly with an equality or constant constraint. A constant true inequality shall preserve the grid; a constant false inequality shall produce empty. A nonconstant inequality shall throw std::invalid_argument when processed. An already marked empty receiver may return without processing a dimension-compatible row. Excess declared constraint dimension shall throw std::invalid_argument before mutation, even for empty.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A grid can represent affine equalities and the two constant truth values; a general half-space is not a grid.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_constraint(const Constraint& c);
VERIFICATION_CRITERIA: Check equalities, strict/non-strict constant truth values, nonconstant inequalities, zero dimensions and dimension errors. Distinguish unsupported-row processing from the marked-empty early return.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addconstraint1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc; tests/Grid/addconstraints1.cc.
-
5. Copying and recycling strict constraint-system addition UID: PPL-SPEC-001278 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_constraints(cs) and add_recycled_constraints(cs) shall process the conjunction using the supported-constraint rules in 🔗 4. Strict addition of a single linear constraint. Excess declared system dimension shall throw std::invalid_argument before mutation, even for no rows or empty. Copying shall preserve the source value, dimension and storage. Recycling requires a separate writable source and guarantees its destruction after return; it need not actually transfer its storage. When an unsupported inequality is reached, earlier accepted rows may already have changed the receiver; rollback shall not be assumed.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: System processing preserves exact supported meets but does not offer transactional rejection of a later unsupported row.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_constraints(const Constraint_System& cs); void add_recycled_constraints(Constraint_System& cs);
VERIFICATION_CRITERIA: Check empty and mixed supported systems, row ordering, a later unsupported inequality, source preservation, zero dimensions, excess declared dimensions and allocation failure ownership. Check coefficient storage transfer for an equality when source and destination representations match, and NNC equality rows with hidden epsilon coordinates, including dimension extension.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addconstraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
6. Conservative refinement by linear constraints UID: PPL-SPEC-001279 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: refine_with_constraint(c) and refine_with_constraints(cs) shall intersect with every equality and produce empty for an inconsistent constant constraint. Other inequalities shall be ignored. Thus the result shall contain the concrete constrained set and shall never introduce points outside the entry grid. Input values shall be preserved. Excess declared input dimension shall throw std::invalid_argument before mutation, including an empty receiver or system.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Conservative refinement can ignore unsupported half-spaces while still recognizing a false constant constraint.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void refine_with_constraint(const Constraint& c); void refine_with_constraints(const Constraint_System& cs);
VERIFICATION_CRITERIA: Compare with the conjunction of equalities and constant truth values; cross nonconstant inequalities, inconsistency, dimensions, source storage and cache histories.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/refinewithconstraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
7. Equality-constraint extraction and minimization UID: PPL-SPEC-001280 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: constraints() shall return an independently owned equality-constraint system defining the real affine hull of the receiver. Empty shall yield an inconsistent system, including when emptiness follows from incompatible proper congruences not previously normalized. minimized_constraints() shall return a minimal equality description of the same affine hull. Both shall preserve ambient dimension, receiver value and ownership, while normalization caches may change. The result shall be independent of storage, redundant rows and description history.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Dropping proper congruences is correct only after any latent inconsistency has been resolved.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
Constraint_System constraints() const; Constraint_System minimized_constraints() const;
VERIFICATION_CRITERIA: Use consistent and inconsistent proper congruences, contradictions among equalities, unused coordinates, dense/sparse storage, all addition/refinement routes and both extraction methods. Check returned ownership and affine hulls with an independent equality oracle.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/constraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
Incoming link from: 2. Equality-compatible grid hashing1
1. Exact grid equality and inequality UID: PPL-SPEC-001251 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: operator== shall return true exactly when both ambient dimensions and represented sets agree. Different dimensions shall compare unequal, including empty grids in different dimensions. Inequality expressions shall be the logical negation of equality. Equal-dimensional empty grids shall compare equal, including when inconsistency has not previously been detected. Self comparison shall have the ordinary reflexive result for every admitted value.
The result shall be independent of constructor choice, generator order, redundant descriptors and the current dual-description caches.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Set equality includes periodicity and the ambient coordinate space; matching affine hulls or matching syntactic rows alone do not establish equality.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool operator==(const Grid& left, const Grid& right); // Inequality uses C++20 rewriting of operator==.
VERIFICATION_CRITERIA: Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare independent rational cosets, continuous subspaces, singletons, empty/universe and incompatible dimensions. Use literal generator/congruence models and alternate construction, normalization and reload histories. Include unequal lattices with identical affine hulls and equal values with redundant generators.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
2. Equality-compatible grid hashing UID: PPL-SPEC-001252 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
STATEMENT: hash_code() shall return a value of type int32_t. Equal grid values under 🔗 1. Exact grid equality and inequality shall have equal hashes. Normalization, query history and equivalent descriptions shall not change the hash of an unchanged grid. Hash collisions shall be permitted, including between unequal values of the same dimension. The numerical hash shall not be a persistent identifier or promise a value stable across library versions or configurations.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Hash compatibility permits associative storage without implying that a coarse hash distinguishes different sets.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
int32_t hash_code() const;
VERIFICATION_CRITERIA: Check exact equal-value descriptions before and after each cache transition, copy, assignment and self comparison. Verify the public return type and do not infer inequality from equal hashes.
SOURCE: src/Grid_inlines.hh; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc.
-
3. Exact grid containment UID: PPL-SPEC-001253 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.contains(right) shall return true exactly when γ(right) ⊆ γ(left). Every grid shall contain the empty grid; empty shall contain no nonempty grid; universe shall contain every equal-dimensional grid. Self containment shall hold. Different ambient dimensions shall throw std::invalid_argument before empty, universe or identity shortcuts. Previously undetected inconsistency shall retain the same set meaning.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Containment must respect integer parameter steps and rational offsets, not only affine spans or the presence of individual points.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool contains(const Grid& other) const;
VERIFICATION_CRITERIA: Use exact rational one-dimensional coset divisibility and invertible coupled-coordinate products. Cross all pairs of empty, singleton, periodic and continuous factors; vary representations and query order. Check reflexivity, containment of empty and dimension rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
4. Exact strict grid containment UID: PPL-SPEC-001254 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.strictly_contains(right) shall return true exactly when γ(right) ⊊ γ(left). It shall be false for self comparison and equal sets; a nonempty grid shall strictly contain empty. Different ambient dimensions shall throw std::invalid_argument even when either operand is empty.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Strict containment combines inclusion with semantic inequality; changes only to representation cannot make containment strict.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool strictly_contains(const Grid& other) const;
VERIFICATION_CRITERIA: Use the same independent coset/product inclusion oracle as containment. Check strict chains of periods, fractional shifts, equal alternate representations, self comparison, empty and incompatible dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
5. Exact grid disjointness UID: PPL-SPEC-001255 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.is_disjoint_from(right) shall return true exactly when γ(left)∩γ(right) = ⌀. The result shall be symmetric. Empty shall be disjoint from every grid, including itself; no nonempty grid shall be disjoint from itself. Different ambient dimensions shall throw std::invalid_argument before shortcuts. Success shall preserve both operands even when detecting inconsistent input or incompatible periodic residues.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Intersecting affine hulls do not establish that periodic grids share a point. Rational residue compatibility determines lattice intersection.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool is_disjoint_from(const Grid& other) const;
VERIFICATION_CRITERIA: Use independent rational greatest-common-divisor conditions for cosets, then combine independent coordinates through invertible rational maps. Include fractional periods, incompatible shifts, singleton membership, continuous factors, zero dimensions, symmetry and argument rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
Incoming link from: 7. Exact grid relation with a linear constraint1
6. Exact grid relation with a congruence UID: PPL-SPEC-001256 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(cg) shall classify the grid relative to the solution set of cg. For nonempty grids it shall report exactly one of is_included(), is_disjoint() and strictly_intersects(): respectively all points satisfy cg, no point does, or both satisfying and nonsatisfying points exist. Empty shall report is_included() && is_disjoint() && saturates(). An equality congruence shall additionally report saturates() exactly when the grid is included in its equality hyperplane. For a nonempty positive-dimensional grid and a proper congruence, the returned relation shall consist of the inclusion/disjointness/intersection assertion alone. Zero-dimensional universe shall report is_included() && saturates() for a true constant congruence and is_disjoint() for a false one.
For a nonempty generator description, let S = {a⋅x − b : x ∈ γ(G)}. If a real line has nonzero scalar image, S = R. Otherwise S = s + dZ, where s = a⋅p − b and d ≥ 0 generates the rational subgroup of parameter images and supporting-point differences. This scalar image shall determine equality and periodic intersection without depending on generator order or rational divisor representation.
A congruence dimension greater than the grid dimension shall throw std::invalid_argument before distinguished-value shortcuts. Smaller descriptors shall have zero coefficients in the remaining coordinates.
Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Exact relation queries require rational residue arithmetic, including point offsets, integer combinations of all parameter images and arbitrary real line images. Saturation and periodic inclusion have distinct API assertion conventions.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Congruence& cg) const;
VERIFICATION_CRITERIA: Use the independent integer-scaled scalar-image gcd oracle and all point/parameter/line permutations in the existing relation tests. Include fractional divisors, extra supporting points, proper/equality constants, undetected emptiness, alternate caches, zero dimensions and rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; tests/Grid/relations2.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
7. Exact grid relation with a linear constraint UID: PPL-SPEC-001257 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(c) shall classify all points, no points or a proper nonempty subset of grid points satisfying c using is_included(), is_disjoint() or strictly_intersects(). Empty shall report is_included() && is_disjoint() && saturates(). In every case, saturates() shall be present exactly when every grid point lies on the equality hyperplane obtained from c by replacing its relation with equality. Thus a grid on the boundary of a strict inequality shall report is_disjoint() && saturates().
For nonempty grids, a nonconstant scalar image along any line, parameter or supporting-point displacement shall take values on both sides of every finite halfspace threshold. Otherwise the scalar image shall be constant and its sign shall determine strict/nonstrict satisfaction and saturation. Equality constraints shall use the exact equality-congruence meaning in 🔗 6. Exact grid relation with a congruence.
A constraint dimension greater than the grid dimension shall throw std::invalid_argument before shortcuts; omitted coefficients shall be zero. Strict boundary behavior shall apply also to constant constraints and zero dimensions.
Strict constraints extracted from NNC polyhedra shall retain their mathematical relation when queried against a larger-dimensional grid.
Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Integer displacements still extend in both signs, so a nonconstant linear form on a grid cannot have a one-sided finite extremum. Saturation concerns the boundary hyperplane independently of inequality satisfaction.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Constraint& c) const;
VERIFICATION_CRITERIA: Exercise literal affine annihilators, unbounded parameter/line images, rational supporting points and boundary equalities. Reuse independent strict-boundary and scalar-sign controls, with generator permutations, cache histories, constants, latent empty values and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; tests/Grid/relations3.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
8. Exact grid subsumption of grid generators UID: PPL-SPEC-001258 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(g) for a Grid_Generator shall return Poly_Gen_Relation::subsumes() exactly under the following conditions:
- a point denotes a member of the grid;
- for a parameter q, the grid is nonempty and every integer translate x + zq, for x ∈ γ(G) and z ∈ Z, remains in the grid;
- for a line ℓ, the grid is nonempty and every real translate x + tℓ, for t ∈ R, remains in the grid.
In all other cases it shall return Poly_Gen_Relation::nothing(). In particular, empty shall subsume no generator, including a zero parameter; this shall hold before any earlier query has detected the emptiness. Parameter steps shall use their rational divisors and shall not be confused with arbitrary real line displacements. Zero-dimensional universe shall subsume every admitted zero-dimensional grid generator. A descriptor dimension greater than the grid dimension shall throw std::invalid_argument before empty/universe shortcuts; omitted coordinates shall be zero.
The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Satisfying homogeneous direction equations alone does not establish that the source grid contains a supporting point. Nonempty rational lattices can admit an integer step while rejecting its real line.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Gen_Relation relation_with(const Grid_Generator& g) const;
VERIFICATION_CRITERIA: Use literal congruence membership for points and independent homogeneous conditions for integer parameters and real lines. Include cold inconsistent systems, nonzero directions in otherwise free coordinates, zero parameters, fractional lattice steps, affine obstructions, cache histories and dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
9. Exact grid subsumption of polyhedral generators UID: PPL-SPEC-001259 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(g) for a polyhedral Generator shall return Poly_Gen_Relation::subsumes() exactly when the grid is nonempty and the following corresponding condition holds. Points and closure points shall be tested as rational point members, with the same result for identical coordinates. Lines shall be tested as arbitrary real displacements. A ray shall be subsumed exactly when its direction is an admitted real line direction of the grid; an integer parameter in that direction alone shall not suffice.
It shall return Poly_Gen_Relation::nothing() otherwise, including every empty grid before or after inconsistency detection. Zero-dimensional universe shall subsume every admitted zero-dimensional polyhedral generator. Descriptors of greater dimension than the grid shall throw std::invalid_argument before shortcuts; omitted coordinates shall be zero.
The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Grids are closed, so closure points have ordinary point membership. A nonzero real scalar image along a ray varies continuously and cannot stay in a discrete congruence class; ray subsumption therefore requires a full continuous line direction.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Gen_Relation relation_with(const Generator& g) const;
VERIFICATION_CRITERIA: Cross point/closure-point membership, both orientations of rays and lines, periodic directions lacking continuous freedom, coupled rational coordinates, cold inconsistent grids, free unused coordinates, zero dimensions and argument rejection. Check the same mathematical value after each query.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
1. Exact directional boundedness of affine expressions on grids UID: PPL-SPEC-001265 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: bounds_from_above(expr) and bounds_from_below(expr) shall return true exactly when the expression is bounded in the indicated direction over the grid. Empty shall be bounded in both directions. On a nonempty grid, either both queries shall be true and the expression shall have one constant value, or both shall be false and the expression shall be unbounded in both directions.
For a generator description p + ∑iℤqi + ∑jℝlj and e(x) = a⋅x + b, boundedness shall be equivalent to a⋅qi = 0 and a⋅lj = 0 for every direction, including point differences when the description has more than one generating point. Zero coefficients shall not introduce dependence on unused directions.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: A grid direction is reversible with an integer or real multiplier; a varying affine objective therefore has neither a lower nor an upper bound.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool bounds_from_above(const Linear_Expression& expr) const; bool bounds_from_below(const Linear_Expression& expr) const;
VERIFICATION_CRITERIA: Independently compute scalar images of literal rational generating points, their differences, parameters and lines. Include empty, latent inconsistency, zero-dimensional universe, constant objectives and objectives orthogonal to nontrivial directions. Vary storage and both description/cache histories.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
Incoming link from: 4. Point witnesses for rational-grid maximization1
2. Exact rational-grid supremum and attainment UID: PPL-SPEC-001266 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: maximize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded above. On true, n/d shall be its exact supremum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: The only finite affine supremum of a nonempty grid is its constant objective value; it is always attained.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained) const;
VERIFICATION_CRITERIA: Compare the returned fraction and attainment with exact rational scalar-image calculations. Use signed/fractional points, unused varying coordinates, empty and unbounded cases. Check reduced positive denominators, sentinel preservation on false and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
Incoming link from: 5. Point witnesses for rational-grid minimization1
3. Exact rational-grid infimum and attainment UID: PPL-SPEC-001267 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: minimize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded below. On true, n/d shall be its exact infimum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: Reversibility of every grid direction makes a finite infimum the constant objective value, equal to the supremum.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained) const;
VERIFICATION_CRITERIA: Check exact rational infima and attainment using independent scalar images. Include negative constants, fractional points, non-singleton grids with constant objectives and false/error output sentinels.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
4. Point witnesses for rational-grid maximization UID: PPL-SPEC-001268 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The maximize overload with a Generator output shall obey 🔗 2. Exact rational-grid supremum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned supremum. Its type shall be POINT, not a closure point or a direction. All coordinates, including those absent from the objective, shall satisfy the grid's equalities and periodic restrictions. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness as well as all scalar and attainment outputs.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: A correct objective value alone does not establish membership; the witness must preserve the supporting point and its rational divisor.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained, Generator& witness) const;
VERIFICATION_CRITERIA: Independently check the witness coordinates against literal congruences and recompute its objective. Include rational offsets, nontrivial unused coordinates, zero dimensions, negative constants and preservation of an unrelated ray sentinel on false/error.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
5. Point witnesses for rational-grid minimization UID: PPL-SPEC-001269 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The minimize overload with a Generator output shall obey 🔗 3. Exact rational-grid infimum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned infimum. Its type shall be POINT, not a closure point or a direction. Every coordinate shall satisfy the grid's equalities and periodic restrictions, including coordinates unused by the objective. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness and all scalar and attainment outputs.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: An infimum witness must be a member of the grid, even when the objective ignores coordinates constrained to fractional or periodic values.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained, Generator& witness) const;
VERIFICATION_CRITERIA: Check complete witness membership and objective values independently for both bounded non-singleton grids and singletons. Include zero-dimensional universe and unchanged ray/scalar sentinels after false/error.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
6. Exact affine-image frequency and closest value on rational grids UID: PPL-SPEC-001270 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For the affine image S = {e(x) ∣ x ∈ G}, frequency(expr,fn,fd,vn,vd) shall return false when S is empty or equals ℝ, preserving all four supplied outputs. Otherwise it shall return true and positive denominators, with both fractions reduced. If S = {c}, fn/fd shall be zero over one and vn/vd shall be c. Otherwise S shall be the coset v + dℤ where d = fn ⁄ fd > 0 is its unique positive period generating all differences and v = vn ⁄ vd ∈ S has minimum absolute value. Either sign shall be permitted when two values tie.
A line with nonzero homogeneous objective image shall make the frequency undefined. Otherwise the positive period shall be the rational greatest common divisor of the parameter images and generating-point differences; a zero period shall mean the objective is constant. The objective's constant term shall translate the coset without changing its period. Zero-dimensional universe shall report zero frequency and the constant expression value.
For a bounded coefficient profile, generator scalar products, translated point values, parameter gcds and closest-residue selection shall use exact working integers until both output fractions are reduced. Only the final reduced numerators and denominators shall require coefficient admission. A machine-carrier overflow shall promote the working arithmetic without truncation. Stored grid descriptions remain subject to their profile limits.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: The exact affine image of a rational grid is empty, continuous, a singleton or a rational coset. A closest representative is signed, while the generating period is nonnegative.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool frequency(const Linear_Expression& expr, Coefficient& fn, Coefficient& fd, Coefficient& vn, Coefficient& vd) const;
VERIFICATION_CRITERIA: Compute images from literal generating points, point differences, rational parameters and lines using independent rational gcd arithmetic. Check exact period, coset membership, minimal absolute representative, both tie signs, constant/zero-dimensional cases, undefined continuous images, translations, false/error sentinels and cache/storage independence.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc; tests/exactboundedworking1.cc; src/Linear_Expression.cc; src/Linear_Expression_defs.hh.
-
1. Exact rational-grid intersection UID: PPL-SPEC-001281 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: intersection_assign(y) shall replace X by X∩Y exactly. Empty shall be absorbing, universe neutral and self intersection idempotent. The operand shall retain its mathematical value. Unequal ambient dimensions shall throw std::invalid_argument before receiver mutation, including empty operands.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Congruence conjunction computes the meet of rational grids.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void intersection_assign(const Grid& y);
VERIFICATION_CRITERIA: Use rational CRT intersections and invertible coordinate transformations, including inconsistent offsets, lines, points, self operands, cache histories and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/intersection1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
2. Least containing rational grid UID: PPL-SPEC-001282 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: upper_bound_assign(y) shall replace X by the least rational grid containing X∪Y. Empty shall be neutral and self hull idempotent. For nonempty X = p + HX and Y = q + HY, the result shall be p + HX + HY + Z(q − p). It need not equal the finite union. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
A self join shall preserve the stored descriptions. If the operands have the same ordered generator rows in current generator systems or the same ordered congruence rows in current congruence systems, the join shall keep the existing caches without appending rows or materializing another system.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Joining supporting points adds an integer displacement rather than a real line.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void upper_bound_assign(const Grid& y);
VERIFICATION_CRITERIA: Compute hulls from rational displacement groups and independent generators, including fractional phases, redundant descriptions, self hull, empty and dimension errors. Check stored descriptions before and after self joins and joins with copies without first forcing a normalization.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
3. Conditional exact rational-grid union UID: PPL-SPEC-001283 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: upper_bound_assign_if_exact(y) shall return true exactly when X∪Y is a rational grid. On true it shall assign that exact union. On false it shall preserve the receiver's mathematical value; its caches may change. Empty and contained operands shall succeed. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A hull is an exact union for containment or a compatible two-coset decomposition, but arbitrary unions require disjunctions.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
bool upper_bound_assign_if_exact(const Grid& y);
VERIFICATION_CRITERIA: Check containment, adjacent index-two cosets, incompatible direction groups, continuous/point cases, false-result preservation, self operands and dimensions against independent union criteria.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
4. Least-grid abstraction of set difference UID: PPL-SPEC-001284 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000424 Abstract set-difference semantics (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: difference_assign(y) shall assign the least rational grid containing X⧵Y. Removing a superset shall yield empty; removing disjoint or empty shall preserve X. When the difference is the other coset of an index-two subgroup, that coset shall be retained exactly. In other cases the least grid may be the whole entry receiver. The operand shall retain its value. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Grid difference must distinguish a single remaining coset from a complement whose grid hull is unchanged.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void difference_assign(const Grid& y);
VERIFICATION_CRITERIA: Use exact subgroup-index and phase calculations, index-two complements, partial overlap, continuous and singleton factors, coupled coordinates, empty/self operands and dimension errors. Check exact integer-grid complement cosets, disjoint cosets, equality cuts and singleton factors in different dimensions, both representations and pending or minimized caches. After operand destruction, verify the result, invariants, independent copies and self difference.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/griddifference1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
5. Context-preserving grid simplification UID: PPL-SPEC-001285 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000426 Context-preserving simplification (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: simplify_using_context_assign(y) shall produce X’ satisfying X’∩Y = X∩Y. A false return shall imply X∩Y = ⌀; true need not prove nonemptiness. Simplification may enlarge the receiver and need not be maximal or preserve it outside the context. The operand's mathematical value shall be preserved unless it is the receiver itself. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Only behavior within the context is observable to context-based simplification clients.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
bool simplify_using_context_assign(const Grid& y);
VERIFICATION_CRITERIA: Compare intersections before and after simplification for coupled rational cosets, equality/continuous factors, empty contexts, self context and multiple caches; check false-return soundness and dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/simplifyusingcontext1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
6. Coordinate cylindrification UID: PPL-SPEC-001286 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Specifies)
STATEMENT: unconstrain(var) and unconstrain(vars) shall existentially project the selected coordinates and reintroduce them as unconstrained real coordinates at their original indices. They shall preserve ambient dimension and all correlations among unselected coordinates. Empty remains empty; an empty selection is identity. Any selected index outside the ambient dimension shall throw std::invalid_argument before mutation, including empty receivers.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Forgetting coordinates removes all their restrictions, rather than merely deleting visibly involving rows.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void unconstrain(Variable var); void unconstrain(const Variables_Set& vars);
VERIFICATION_CRITERIA: Compare with independent generator projection plus real coordinate lines, including correlated congruences, all/empty selections, zero dimensions and invalid indices.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/unconstrain1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
1. Grid internal status value ownership and prerequisites UID: PPL-SPEC-001607 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: The nested Status shall own a finite set of named Boolean flags: empty, c_up_to_date, g_up_to_date, c_minimized, g_minimized, sat_c_up_to_date, sat_g_up_to_date, c_pending, g_pending. test_zero_dim_univ() shall recognize the zero flag word; that word shall be the default state. It shall be an encoding predicate, not an independent query of the owning object's dimension or numerical payload. The owning object shall supply that context and establish the truth of its cache claims.
Copy construction and assignment shall preserve all stored flags in an independent value. Assignment shall return its target and admit self-assignment. Mutating or destroying one copy shall not change another. Destruction shall release the status value without destroying an owning domain or its payload. These value operations shall admit any vector of the declared flags, including transient inconsistent combinations used while updating a representation.
Status-only operations shall require live objects and synchronized access against mutation, but no numerical-library/thread initialization or coefficient constant stage. Their selected streams shall remain live. They shall not inspect domain coordinates, reconstruct numerical descriptions or perform coefficient arithmetic. A domain shall use a consistent status whose claims agree with its representation; the local check of 🔗 3. Grid internal status consistency predicate alone shall not certify those numerical facts.
RATIONALE: Cached facts need an independent value and an explicit distinction between status-bit consistency and the truth of claims about a numerical object.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
Status(); Status(const Status&); Status& operator=(const Status&); ~Status();
VERIFICATION_CRITERIA: Check default/copy/assignment, self-assignment, independent mutation and source destruction over every declared flag vector. Use status-only tests without a numerical initialization owner; inspect payload independence.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
2. Grid internal status flag queries and transitions UID: PPL-SPEC-001608 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For a declared mask m and current flag word F, the private test_all(m) shall return (F&m) = m, and test_any(m) shall return (F&m) ≠ 0. The empty mask shall therefore match all and match no individual bit. set(m) shall replace F by F|m; reset(m) shall clear exactly the selected bits. Masks shall contain only the declared flags. Tests shall preserve state.
Each named test_* shall return its stored bit, except the zero-word predicate of 🔗 1. Grid internal status value ownership and prerequisites. set_zero_dim_univ() shall clear all flags. reset_zero_dim_univ() shall replace zero by the empty-only state and preserve every nonzero state. set_empty() shall replace the entire word by the empty-only state; reset_empty() shall clear only the empty bit. Other named setters/resets shall set/clear only the indicated bit, subject to no additional flag dependencies enforced by these individual updates.
Updates shall not generally reconcile other assertions. Transient inconsistent vectors shall remain available to 🔗 3. Grid internal status consistency predicate, but shall not be installed as valid domain state. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
RATIONALE: Representation algorithms need exact local cache updates without implicit numerical recomputation or unrelated changes to known facts.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool test_zero_dim_univ() const; void set_zero_dim_univ(); void reset_zero_dim_univ(); bool test_empty() const; void set_empty(); void reset_empty(); bool test_c_up_to_date() const; void set_c_up_to_date(); void reset_c_up_to_date(); bool test_g_up_to_date() const; void set_g_up_to_date(); void reset_g_up_to_date(); bool test_c_minimized() const; void set_c_minimized(); void reset_c_minimized(); bool test_g_minimized() const; void set_g_minimized(); void reset_g_minimized(); bool test_sat_c_up_to_date() const; void set_sat_c_up_to_date(); void reset_sat_c_up_to_date(); bool test_sat_g_up_to_date() const; void set_sat_g_up_to_date(); void reset_sat_g_up_to_date(); bool test_c_pending() const; void set_c_pending(); void reset_c_pending(); bool test_g_pending() const; void set_g_pending(); void reset_g_pending(); // Private primitives; flags_t is the declared unsigned flag-word type. bool test_all(flags_t mask) const; bool test_any(flags_t mask) const; void set(flags_t mask); void reset(flags_t mask);
VERIFICATION_CRITERIA: Compare all flag words and declared masks against independent set algebra. Check every named update and query, both zero-reset cases, whole-word empty replacement, and independent copies.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
3. Grid internal status consistency predicate UID: PPL-SPEC-001609 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Let E, C, G, MC, MG, SC, SG, PC, PG denote respectively empty, current congruences, current generators, minimized congruences, minimized generators, the two current saturation matrices, pending congruences and pending generators. OK() shall return true exactly for the following consistent combinations of the declared flags:
- The zero word and the empty-only word shall be consistent.
- Empty shall exclude every other flag.
- MC ⇒ C and MG ⇒ G.
- (SC∨SG) ⇒ (C∧G).
- ¬(PC∧PG).
- (PC∨PG) ⇒ (MC∧MG∧(SC∨SG)).
These rules shall admit 28 flag words, including zero.
The result shall be the same with and without assertions. Invalid combinations shall return false; assertion builds shall also write a diagnostic to the current std::cerr. Valid combinations shall not emit that diagnostic. The query shall preserve the flag word. Stream failures shall follow ordinary stream rules. This local predicate shall not inspect the domain payload or certify its ambient dimension, feasibility or cached numerical facts. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
RATIONALE: Cache assertions have logical dependencies. Checking their finite Boolean model must remain distinct from checking the numerical representation.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool OK() const;
VERIFICATION_CRITERIA: Enumerate every flag vector against an independent propositional oracle; check accepted-state counts, source preservation and diagnostic presence in assertion/release builds. Inspect payload independence.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
4. Grid internal status signed-keyword export UID: PPL-SPEC-001610 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_dump(stream) shall write signed keywords in the order ZE EM CM GM CS GS CP GP SC SG. ZE shall be positive exactly for the zero flag word; each other sign shall equal its stored named bit. One space shall separate ZE/EM, CM/GM, CS/GS, CP/GP and SC/SG; two spaces shall separate the successive pairs. The record shall end with a newline and flush. The exact separators shall follow the default stream formatting; caller-selected width/fill/alignment shall retain ordinary character/string insertion behavior.
Export shall preserve the stored flags, including transient inconsistent vectors, without reconciling claims or inspecting numerical payload. Partial output, state flags and exceptions shall follow the selected stream. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
ascii_dump() shall send the same record to std::cerr. print() shall write No user level output operator defined for class Grid::Status. followed by a flushed newline to std::cerr.
RATIONALE: Serialized cache claims and diagnostics must retain the actual flag state without triggering domain normalization.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
void ascii_dump(std::ostream& stream) const; void ascii_dump() const; void print() const;
VERIFICATION_CRITERIA: Check exact field signs/order/separators over every flag word, stream formatting and source preservation. Exercise returning/throwing output failures and the declared stderr routes, including their flush behavior.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
Incoming link from: 3. Compatible rational-grid record loading and failure state1
5. Grid internal status signed-keyword loading and rejection UID: PPL-SPEC-001611 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Grid internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.
For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Grid internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.
The loader shall reset its word to zero before reading the first field. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 3. Compatible rational-grid record loading and failure state.
RATIONALE: The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool ascii_load(std::istream& stream); // Internal helper, in its defining translation unit or implementation namespace: bool get_field(std::istream& stream, const char* keyword, bool& positive);
VERIFICATION_CRITERIA: Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and output preservation of the translation-unit-local parser by inspection. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
1. Human-readable rational-grid presentation UID: PPL-SPEC-001260 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: IO_Operators::operator<<(s, grid) shall write false for empty, true for universe, and a readable congruence description otherwise. Nontrivial output shall denote the same set and coordinate identities as the grid, using the installed variable formatter and descriptor output conventions. It shall return s by reference. Representation normalization shall be permitted, preserving set and ambient dimension. This display shall not promise an ascii_load input format or a fixed order of equivalent rows. Stream failure shall follow the stream's configured state/exception behavior. print() shall send the same readable presentation to std::cerr without adding a newline; it shall have the same source and arithmetic prerequisites.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
RATIONALE: Grid display must distinguish empty, universe and periodic restrictions while allowing normal-form and variable-name changes.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
std::ostream& IO_Operators::operator<<(std::ostream& s, const Grid& grid); void print() const;
VERIFICATION_CRITERIA: Check literal empty/universe and nontrivial equality/proper-congruence displays, custom variable names, return-stream identity, cache histories and stream failures.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
2. Reloadable rational-grid record export UID: PPL-SPEC-001261 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_dump(s) shall export a complete record of ambient dimension, distinguished-value/status information, stored congruence and generator systems with their current-description indicators, and dimension-kind data required by the encoded reduced descriptions. The no-argument overload shall write the same record to std::cerr. Export shall preserve the source value, dimension, stored descriptions, status and ownership.
A compatible complete record shall support the loading contract in 🔗 3. Compatible rational-grid record loading and failure state. The scope shall be the corresponding supported producer/consumer format and representable selected coefficient profile; cross-version compatibility, fixed bytes across equivalent cache histories and compatibility with human-readable presentation shall not be implied. Stream failures and enabled stream exceptions shall propagate through the standard stream mechanism; incomplete output shall not be a complete record.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
The internal status contract shall follow 🔗 4. Grid internal status signed-keyword export.
RATIONALE: Text reproduction must include enough state to recover the mathematical grid without requiring prior normalization.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
void ascii_dump(std::ostream& s) const; void ascii_dump() const;
VERIFICATION_CRITERIA: Round-trip literal rational grids in cold, congruence-only, generator-only and dual-description states, including dense/sparse storage, zero dimensions, empty and retained inactive descriptions. Compare repeated dumps without intervening mutation and exercise stderr and failing streams.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
3. Compatible rational-grid record loading and failure state UID: PPL-SPEC-001262 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_load(s) shall return true on a trusted, compatible complete record produced by 🔗 2. Reloadable rational-grid record export, replacing the receiver's set and ambient dimension. Encoded storage shall be retained for the loaded descriptor systems. Cached normal forms may be invalidated and rebuilt under the current reduction rules; cache reconstruction shall preserve mathematical meaning. Trailing input shall remain available after the complete record.
Malformed or truncated fields, unsupported ambient dimensions, invalid status/descriptor structures, incompatible current-description dimensions and nonempty-state generator descriptions lacking a point shall return false, with and without enabled assertions. For a successful load of a trusted record written by 🔗 2. Reloadable rational-grid record export, the receiver shall meet 🔗 5. Rational-grid representation invariant query. Its current descriptions shall define the same set, and an empty grid shall retain empty congruence and generator views. Structural checks can accept altered records whose descriptions contradict one another or disagree with the status. Further operations require a valid representation.
Stream, allocation and selected numerical exceptions may propagate. After false or an exception, the receiver shall retain ownership sufficient for destruction; rollback and subsequent queries shall not be assumed.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
Storage for serialized dimension kinds shall grow with the accepted entries rather than the declared dimension alone.
The internal status contract shall follow 🔗 5. Grid internal status signed-keyword loading and rejection.
RATIONALE: Loaded status and caches influence later query shortcuts. Successful parsing must not admit mutually contradictory descriptions or a supporting-point-free nonempty representation.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
bool ascii_load(std::istream& s);
VERIFICATION_CRITERIA: Use independent literal round trips and every truncated prefix. Corrupt dimensions, distinguished states, active-description flags, generator topology and point presence. Combine individually valid but different current grids in both inclusion directions, including a proper sublattice with the same affine hull. Check false returns in optimized and assertion-enabled loader builds; exercise throwing streams and allocation failures against the destruction-only guarantee.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
4. Owned rational-grid memory accounting UID: PPL-SPEC-001263 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: external_memory_in_bytes() shall report the owned external storage of the congruence system, generator system and dimension-kind vector. Descriptor system counts shall follow their component contracts; the vector count shall include its retained allocated capacity rather than only its live entries. Inactive or logically empty cached data shall remain counted while owned. Other objects, runtime scratch pools and allocator bookkeeping shall be excluded.
total_memory_in_bytes() shall equal sizeof(Grid) plus that external count. The sums shall fit memory_size_type and use the selected build's sizes. Both queries shall preserve set, ambient dimension, caches, capacity, ownership and lifetimes; the observed storage shall remain unchanged during the query.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
RATIONALE: Logical state changes do not release every retained allocation. Capacity owned by the dimension-kind cache contributes to the object footprint.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
memory_size_type external_memory_in_bytes() const; memory_size_type total_memory_in_bytes() const;
VERIFICATION_CRITERIA: Observe the actual allocation backing the dimension-kind vector and compare the reported count with that allocation plus independently specified descriptor-system counts. Include zero/nonzero dimensions, empty, normalization, dimension shrinkage, reuse and reserved spare capacity. Check total minus external equals sizeof(Grid), source preservation and absence of query allocations.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
Incoming link from: 3. Compatible rational-grid record loading and failure state1
5. Rational-grid representation invariant query UID: PPL-SPEC-001264 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: OK(false) shall return true for an admitted grid whose distinguished state, ambient dimension, status and current descriptions satisfy the representation invariants. OK(true) shall additionally require the grid to be nonempty. The ambient dimension shall be supported and every current system shall be structurally valid and have that dimension.
An empty grid shall have empty generator views and a contradictory congruence view. Zero-dimensional universe shall have no defining congruences and one zero-dimensional point. A nonempty-state current generator system shall contain a point. If both descriptions are current, they shall define the same set, including affine restrictions and discrete periods. A congruence-only description may be inconsistent without already having the empty flag; in that case OK(false) shall be true and OK(true) false.
The query shall preserve the receiver and may use independent temporary normalization to check consistency. It may allocate and propagate supported resource or numerical failures. On an invalid state it may emit diagnostic text; diagnostic wording shall not be a stable interface. The query shall operate only on live, destructible owned structures, not arbitrary invalid addresses or corrupted object representations.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
The internal status contract shall follow 🔗 3. Grid internal status consistency predicate.
RATIONALE: Public invariant checks must recognize states that invalidate the nonempty and dual-description shortcuts used by other operations.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
bool OK(bool check_not_empty = false) const;
VERIFICATION_CRITERIA: Check all valid construction and cache histories against literal grids, including latent emptiness. Use the existing focused test access for owned structural counterexamples, checking missing points, incompatible current descriptions in each direction, and distinguished-state or ambient-dimension mismatch. Verify source preservation and both check_not_empty values.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
Incoming links from: 1. Exact rational affine image 2. Exact rational affine preimage 3. Generalized variable affine image 4. Generalized variable affine preimage 5. Generalized expression affine image 6. Generalized expression affine preimage 7. Bounded affine image abstraction 8. Bounded affine preimage abstraction 1. Congruence widening and finite delay 2. Generator widening and finite delay 3. Representation-selected default grid widening 4. Congruence-limited extrapolations 5. Grid convergence certificates 1. Grid construction from boxes 1. Grid construction from boxes 2. Grid construction from bounded-difference shapes 2. Grid construction from bounded-difference shapes 3. Grid construction from octagonal shapes 3. Grid construction from octagonal shapes 4. Grid construction from polyhedra 1. Free-coordinate extension 2. Zero-coordinate extension 3. Ordered Cartesian concatenation 4. Selected-coordinate existential projection 5. Prefix-coordinate existential projection 6. Injective coordinate remapping 7. Conditional coordinate replication 8. Least-grid folding of coordinate alternatives 1. Integer-time-elapse grid abstraction 2. Exact integer-coordinate restriction 3. Bounded-integer wrapping abstraction 4. Grid topological closure 1. Copying bulk insertion of rational-grid generators 1. Copying bulk insertion of rational-grid generators 2. Recycling bulk insertion of rational-grid generators 3. Copying insertion of a single rational-grid generator 1. Single congruence addition and refinement 1. Single congruence addition and refinement 2. Copying congruence-system addition and refinement 3. Recycling congruence-system addition 4. Strict addition of a single linear constraint 5. Copying and recycling strict constraint-system addition 6. Conservative refinement by linear constraints 7. Equality-constraint extraction and minimization 1. Exact grid equality and inequality 2. Equality-compatible grid hashing 3. Exact grid containment 4. Exact strict grid containment 5. Exact grid disjointness 6. Exact grid relation with a congruence 7. Exact grid relation with a linear constraint 8. Exact grid subsumption of grid generators 9. Exact grid subsumption of polyhedral generators 1. Exact directional boundedness of affine expressions on grids 2. Exact rational-grid supremum and attainment 3. Exact rational-grid infimum and attainment 4. Point witnesses for rational-grid maximization 5. Point witnesses for rational-grid minimization 6. Exact affine-image frequency and closest value on rational grids 1. Exact rational-grid intersection 2. Least containing rational grid 3. Conditional exact rational-grid union 4. Least-grid abstraction of set difference 5. Context-preserving grid simplification 6. Coordinate cylindrification 1. Human-readable rational-grid presentation 2. Reloadable rational-grid record export 3. Compatible rational-grid record loading and failure state 4. Owned rational-grid memory accounting 5. Rational-grid representation invariant query 2. Dimensioned empty and universe grid construction 3. Owned grid copying, assignment and destruction 4. Whole grid value exchange 5. Exact grid construction from congruence systems 6. Exact grid construction from generator systems 6. Exact grid construction from generator systems 7. Grid construction from equality constraint systems 8. Ambient and affine grid dimensions 9. Exact foundational grid classification 10. Borrowed congruence and generator views of grid values80
1. Rational-grid values, coefficient profile and valid use UID: PPL-SPEC-001241 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid shall represent the solutions in Rn of a finite system of rational linear congruences. For integer coefficients after common denominator scaling, a row a⋅x ≡ mb shall mean a⋅x − b ∈ mZ when m > 0, and a⋅x = b when m = 0. Empty and universe shall be distinct in every supported ambient dimension. Coordinates absent from all restrictions shall remain free. The coordinate carrier shall remain real, including when all stored coefficients are integral.
A nonempty rational generator description shall denote p + ∑iziiq + ∑jtjℓj, with rational supporting point p, rational parameter directions qi, rational line directions ℓj, zi ∈ Z and tj ∈ R. Additional supporting points shall contribute their displacements from p as integer parameter directions. Generator insertion order shall not affect this mathematical meaning.
coefficient_type shall be the configured Coefficient. Objects and supplied descriptors shall be live and valid. Coordinate identities and reserved dimension indications shall follow 🔗 1. Coordinate type and reserved dimension index. Library and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall apply. Every coefficient operation, including intermediate calculations, shall meet the selected arithmetic profile's range and resource prerequisites. Exact guarantees shall apply when these preconditions hold; bounded coefficient storage shall not silently turn the grid into an integer-coordinate domain.
When eliminating an equality from a proper congruence, an unrepresentable inhomogeneous difference shall be replaced by an equivalent exact residue modulo the positive row modulus. Range requirements shall continue to apply to modulus scaling and homogeneous coefficients; real coordinates shall not permit reducing homogeneous coefficients modulo that modulus.
Diagonal LCMs used in either description-conversion direction shall be exact even when the working value exceeds the configured coefficient range. Each quotient stored in a destination row shall still fit that range. Cancelling a positive factor shared by proper congruence rows shall include their moduli and stored integrality row, while preserving zero-modulus equalities.
Elimination of a nonzero column between two proper congruences, or between points and parameters, shall store its known zero and positive GCD without requiring cancelling products in that column to fit the coefficient range. Assertion checks of the corresponding Bezout identity shall not add a bounded intermediate-product prerequisite. Non-pivot two-product linear combinations shall be evaluated exactly before applying stored-result range requirements, including when native carrier products overflow. An unrepresentable proper-congruence constant shall use an exact equivalent residue modulo its positive row modulus. Homogeneous coefficients and generator coordinates shall still fit their selected storage; homogeneous terms shall not be reduced modulo a congruence modulus.
Independent objects shall own independent values. Mutation, destruction and operations that may update caches shall be externally synchronized against other uses of the same object. Failed construction shall release the resources acquired by the incomplete object. Failure of an operation on an existing object shall preserve ownership sufficient for safe destruction; rollback or permission for further queries shall require a stronger operation-specific guarantee.
RATIONALE: Congruences describe periodic restrictions over real coordinates. Integer parameters, real line directions and ordinary affine equalities have different meanings. The cited grid-domain paper supplies these definitions.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
class Grid { public: typedef Coefficient coefficient_type; };
VERIFICATION_CRITERIA: Use independent literal congruences and rational point/parameter/line models. Include fractional offsets, continuous directions, discrete periodic sets, multiple supporting points, redundant generators, order permutations, free coordinates and empty/universe in zero dimensions. Inspect configured coefficient admission, initialization and failure ownership. Exercise equality elimination with positive and negative constant differences outside the coefficient range, equal pivot coefficients, and constant products exceeding the native accumulator. Exercise conversion with nonprimitive proper rows, working diagonal LCMs outside the coefficient range, and representable stored quotients in both directions. Eliminate coprime columns with products outside the coefficient range, and verify Bezout identities with large opposing products, in both descriptions and representations. Compare against literal rational generators. Exercise cancellation in non-pivot homogeneous terms, wide modular constant combinations and genuinely unrepresentable stored results. Include large Bezout products exceeding the native carrier.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definition 1 and The Generator Representation (PDF page indices 6–7, zero-based).
SOURCE: tests/recyclingconstructors1.cc; src/Grid_defs.hh; src/Grid_nonpublic.cc; src/Grid_simplify.cc; src/Grid_conversion.cc; src/Linear_Expression_Impl_defs.hh; tests/Grid/congruences1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
2. Dimensioned empty and universe grid construction UID: PPL-SPEC-001242 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid(n,kind) shall construct the selected EMPTY or UNIVERSE value in ambient dimension n. Default construction shall produce the zero-dimensional universe. Zero-dimensional universe shall contain the unique empty tuple; zero-dimensional empty shall contain none.
max_space_dimension() shall report the structural limit for Grid in the selected configuration. Requests above that limit, including the reserved dimension indication, shall throw std::length_error before allocating storage for the requested dimension. The limit shall not promise that actual resources suffice for every smaller request. Failed construction shall release resources acquired by the incomplete object.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Distinguished grid values require an ambient dimension even when there are no points. Structural dimension validation precedes extent-dependent storage.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
explicit Grid(dimension_type n=0, Degenerate_Element kind=UNIVERSE); static dimension_type max_space_dimension();
VERIFICATION_CRITERIA: Check defaults, both distinguished values in zero and positive dimensions, structural bounds and oversized/reserved requests for both kinds. Inject allocation failures into admitted construction and check incomplete-object cleanup.
SOURCE: src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
3. Owned grid copying, assignment and destruction UID: PPL-SPEC-001243 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000312 Independent values after copying domain objects (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Copy construction shall produce an independent grid with the source's represented set and ambient dimension. The three declared complexity values shall not alter ordinary copying. Assignment shall replace the receiver's represented set and dimension with the source's, return a reference to the receiver, and support different dimensions and self-assignment. Mutation or destruction of either independent value shall not change the other value.
Destruction shall release owned resources exactly once. Failed copy construction shall release resources acquired by the incomplete object. Failed assignment shall preserve ownership needed for safe destruction; rollback to the receiver's entry value shall not be required.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Value semantics must be independent of whether congruences, generators or both cached descriptions are current.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
Grid(const Grid& source, Complexity_Class complexity=ANY_COMPLEXITY); Grid& operator=(const Grid& source); ~Grid();
VERIFICATION_CRITERIA: Cross empty, universe, fractional singleton, periodic and continuous grids with different dimensions, self-assignment and all complexity values. Copy before and after each representation is minimized, mutate each object independently, destroy sources, and inject allocation failures without assuming failed-assignment rollback.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
4. Whole grid value exchange UID: PPL-SPEC-001244 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: x.m_swap(y) and swap(x,y) shall exchange the represented grids, ambient dimensions and owned representation state. They shall support self exchange and grids of different dimensions. Subsequent independent mutation shall affect only its selected object. Exchange shall not require grid normalization, coefficient arithmetic or new allocation.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Exchanging ownership can preserve whole values without rebuilding either dual description.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
void m_swap(Grid& other); void swap(Grid& left, Grid& right);
VERIFICATION_CRITERIA: Cross different dimensions, distinguished values and cold/minimized cache histories. Check both forms and self exchange, independent mutation and the absence of allocations while exchange runs.
SOURCE: src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
5. Exact grid construction from congruence systems UID: PPL-SPEC-001245 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Construction from a valid Congruence_System shall inherit its ambient dimension and denote exactly the simultaneous solutions of its rows. Equalities, proper congruences, redundant rows, tautologies and inconsistent systems shall retain their congruence meanings. A system without restrictions shall describe universe in its ambient dimension. Zero-dimensional systems shall give universe or empty according to their constant conditions.
can_recycle_congruence_systems() shall return true.
The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. Both forms shall reject a source dimension above max_space_dimension() with std::length_error before dimension-dependent storage allocation.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Congruence input is an exact defining description, including periodicity that cannot be recovered from an affine hull alone.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
static bool can_recycle_congruence_systems(); explicit Grid(const Congruence_System& source); Grid(Congruence_System&& source);
VERIFICATION_CRITERIA: Evaluate literal congruences independently on rational witnesses. Cross copied and recycled systems, inconsistent nontrivial pairs, zero-dimensional constants, fractional residue classes, redundant rows and ambient free coordinates. Check source preservation for copying and destruction-only cleanup for recycling, including injected failures.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definition 1 (PDF page index 6, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.
-
6. Exact grid construction from generator systems UID: PPL-SPEC-001246 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Construction from a valid Grid_Generator_System shall inherit its ambient dimension and denote its point, integer-parameter and real-line combinations in 🔗 1. Rational-grid values, coefficient profile and valid use. An empty system shall construct an empty grid. A nonempty system without a supporting point shall throw std::invalid_argument. A supporting point in zero dimensions shall construct zero-dimensional universe. Generator insertion order, redundant points and equivalent simultaneous rescaling of generator numerators and divisors shall not change the represented set.
The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. A source dimension above max_space_dimension() shall throw std::length_error before allocating dimension-dependent grid storage.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: A supporting point fixes the affine offset; parameters and lines supply different displacement sets. A collection of directions without a supporting point is not an admitted nonempty constructor input.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
explicit Grid(const Grid_Generator_System& source); Grid(Grid_Generator_System&& source);
VERIFICATION_CRITERIA: Check literal rational point/parameter/line models, repeated and different supporting points, unequal divisors, both constructor forms, free directions, empty and zero-dimensional inputs. Reject line-only and parameter-only systems. Permute generator order and check the value before normalization as well as after each minimized view.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, The Generator Representation and Definition 3 (PDF page index 7, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.
-
7. Grid construction from equality constraint systems UID: PPL-SPEC-001247 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For positive ambient dimension, construction from a Constraint_System shall accept equality rows and denote exactly their common affine subspace. An empty system shall describe universe in its ambient dimension. An inequality row shall throw std::invalid_argument in positive dimension.
In zero dimensions, constant conditions shall instead be evaluated directly: a system whose rows are all satisfied shall construct universe, and any inconsistent row shall construct empty, including an inconsistent constant inequality. Both forms shall inherit the source's ambient dimension.
can_recycle_constraint_systems() shall return true.
The const-reference form shall preserve its source. The non-const rvalue form shall permit source consumption; after successful or exceptional return the source shall require no operation other than destruction. Oversized source dimensions shall throw std::length_error before dimension-dependent grid storage.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Affine equalities are grid congruences with zero modulus. Positive-dimensional inequality systems require a separate conversion policy, while zero-dimensional constraints are constant truth conditions.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
static bool can_recycle_constraint_systems(); explicit Grid(const Constraint_System& source); Grid(Constraint_System&& source);
VERIFICATION_CRITERIA: Check copied and recycled equality systems against independent affine solutions, inconsistent equalities and free coordinates. Check rejection of positive-dimensional strict/nonstrict inequalities. Enumerate constant zero-dimensional truth/falsity conditions, and inject constructor failures while respecting recycled-source destruction-only use. Check coefficient storage transfer for an equality in the destination representation, and conversion of NNC equality rows without retaining the hidden epsilon coordinate as a grid dimension.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.
-
8. Ambient and affine grid dimensions UID: PPL-SPEC-001248 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: space_dimension() shall report the ambient dimension without changing the represented grid. affine_dimension() shall return zero for empty and zero-dimensional grids; otherwise it shall return the dimension of the least affine subspace containing the grid. For a nonempty generator description this shall equal the rational rank of its line directions, parameter directions and supporting-point differences.
The answer shall be independent of the current dual representation, redundant input rows, generator order and prior normalization.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: A periodic full-rank grid is affinely full-dimensional even though it is discrete. Ambient dimension remains meaningful for empty sets.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
dimension_type space_dimension() const; dimension_type affine_dimension() const;
VERIFICATION_CRITERIA: Use independent exact rational elimination on literal direction vectors and point differences. Include singleton, lower-dimensional periodic and continuous values, full-rank discrete grids, empty/universe, redundant systems, both input descriptions and alternate normalization histories.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, generator representation and minimal forms (PDF page indices 7–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.
-
9. Exact foundational grid classification UID: PPL-SPEC-001249 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The following queries shall make exact decisions on admitted grid values:
- is_empty() shall return true exactly for the empty represented set.
- is_universe() shall return true exactly for all of the ambient real coordinate space.
- is_bounded() shall return true exactly for empty or singleton grids.
- is_discrete() shall return true exactly when every represented point is isolated; empty shall be discrete. In a nonempty rational generator description this is equivalent to the absence of nonzero line directions.
- is_topologically_closed() shall return true for every rational grid.
- contains_integer_point() shall return true exactly when the grid intersects Zn; zero-dimensional universe shall contain the integer empty tuple and zero-dimensional empty shall contain none.
- constrains(v) shall return true exactly when independently varying coordinate v can leave the grid. Empty shall constrain every in-range coordinate. An out-of-range coordinate shall throw std::invalid_argument before an empty/universe shortcut.
Answers shall not depend on generator insertion order or whether the current congruence/generator descriptions have been normalized. A periodic restriction shall not be mistaken for an interval bound or a continuous free coordinate.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Nonzero parameter directions give unbounded integer displacements; nonzero line directions give arbitrarily small real displacements. A finite intersection of linear congruence solution sets is closed. These are different properties from whether an integer-coordinate point exists.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
bool is_empty() const; bool is_universe() const; bool is_bounded() const; bool is_discrete() const; bool is_topologically_closed() const; bool contains_integer_point() const; bool constrains(Variable coordinate) const;
VERIFICATION_CRITERIA: Use independently described rational singletons, periodic lattices, continuous lines and affine subspaces, fractional offsets excluding all integer points, inconsistent systems and all zero-dimensional cases. Cross constructor forms, redundant descriptions, all generator permutations and normalization orders. Check coordinate independence using literal line spans and validate out-of-range arguments even for empty and universe.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–7, zero-based).
SOURCE: src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.
-
Incoming links from: 1. Exact rational affine image 2. Exact rational affine preimage 3. Generalized variable affine image 4. Generalized variable affine preimage 5. Generalized expression affine image 6. Generalized expression affine preimage 7. Bounded affine image abstraction 8. Bounded affine preimage abstraction 1. Congruence widening and finite delay 2. Generator widening and finite delay 3. Representation-selected default grid widening 4. Congruence-limited extrapolations 5. Grid convergence certificates 1. Grid construction from boxes 2. Grid construction from bounded-difference shapes 3. Grid construction from octagonal shapes 4. Grid construction from polyhedra 1. Free-coordinate extension 2. Zero-coordinate extension 3. Ordered Cartesian concatenation 4. Selected-coordinate existential projection 5. Prefix-coordinate existential projection 6. Injective coordinate remapping 7. Conditional coordinate replication 8. Least-grid folding of coordinate alternatives 1. Integer-time-elapse grid abstraction 2. Exact integer-coordinate restriction 3. Bounded-integer wrapping abstraction 4. Grid topological closure 1. Copying bulk insertion of rational-grid generators 2. Recycling bulk insertion of rational-grid generators 3. Copying insertion of a single rational-grid generator 1. Single congruence addition and refinement 2. Copying congruence-system addition and refinement 3. Recycling congruence-system addition 4. Strict addition of a single linear constraint 5. Copying and recycling strict constraint-system addition 6. Conservative refinement by linear constraints 7. Equality-constraint extraction and minimization 1. Exact grid equality and inequality 2. Equality-compatible grid hashing 3. Exact grid containment 4. Exact strict grid containment 5. Exact grid disjointness 6. Exact grid relation with a congruence 7. Exact grid relation with a linear constraint 8. Exact grid subsumption of grid generators 9. Exact grid subsumption of polyhedral generators 1. Exact directional boundedness of affine expressions on grids 2. Exact rational-grid supremum and attainment 3. Exact rational-grid infimum and attainment 4. Point witnesses for rational-grid maximization 5. Point witnesses for rational-grid minimization 6. Exact affine-image frequency and closest value on rational grids 1. Exact rational-grid intersection 2. Least containing rational grid 3. Conditional exact rational-grid union 4. Least-grid abstraction of set difference 5. Context-preserving grid simplification 6. Coordinate cylindrification60
10. Borrowed congruence and generator views of grid values UID: PPL-SPEC-001250 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Borrowed congruence and grid-generator accessors shall require an lvalue receiver, with corresponding const && overloads deleted. Returned references shall not extend the receiver's lifetime. Constraint extraction returns an independent value and shall remain available on temporary grids.
congruences() and grid_generators() shall return valid descriptions of the receiver's exact represented grid in the same ambient dimension. If the required description is stale, it shall be computed without changing the grid's mathematical meaning.
minimized_congruences() and minimized_grid_generators() shall additionally supply the corresponding minimized triangular representations. Required administrative integrality rows may remain in congruence storage. These interfaces shall not promise a unique physical row order or byte-identical records across equivalent descriptions.
Returned references shall borrow receiver-owned storage. Their use shall require the receiver to remain live and no intervening operation capable of replacing or normalizing the borrowed representation. Iterators and row references shall obey the same condition. An independently copied returned system shall remain independent of later receiver mutation or destruction. Empty and zero-dimensional values shall retain their exact distinguished meanings in both descriptions.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
Before aligning proper-congruence moduli in a bounded profile, simplification shall remove each row's redundant sign, constant-residue and common-factor scaling. A tautological constant row shall retain a nonzero integrality representative. Alignment shall preserve the same rational satisfying set.
For a bounded discrete generator system, elimination may temporarily cancel the common positive factor of every coupled point/parameter coordinate and divisor, restoring that physical scale after reduction. The resulting strong form shall retain its previous storage scale. Lines shall not be rescaled by this operation, and integer-parameter periods shall not change. Centered coordinate reduction shall also accept a positive pivot at the profile's largest admissible coefficient without overflowing the half-pivot calculation. For a least signed pivot input, Bezout computation shall own its working magnitudes and admit only the completed positive gcd and signed coefficients; an unrepresentable input magnitude alone shall not cause arithmetic failure.
During triangular conversion, the selected coordinate's scaling and exact division shall be fused; an unrepresentable product immediately cancelled by that division shall not be stored. Other coupled point/parameter or proper- congruence rows shall receive the required common scale. Independent line or equality scales shall remain independent. Complete column differences shall be evaluated exactly. If an inverse-column working value exceeds the coefficient range, conversion shall replay the complete triangular inverse using independently owned unbounded integers. Later exact divisions shall precede admission of destination coefficients. Final unrepresentable entries shall still raise the configured range exception, including in native coefficient profiles. Replay shall preserve the source rows, their dimension kinds and the distinct coupled or independent row scales.
RATIONALE: Clients need exact dual views while ownership and normalization invalidate physical observations independently of mathematical value.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
const Congruence_System& congruences() const &; const Congruence_System& minimized_congruences() const &; const Grid_Generator_System& grid_generators() const &; const Grid_Generator_System& minimized_grid_generators() const &;
VERIFICATION_CRITERIA: Exercise both conversion directions with the literal lattice x = 1 ⁄ 60 + z ⁄ 3, y = 1 ⁄ 2 + 2w ⁄ 5, c = − 1 ⁄ 3 for independent integers z, w. Check its equivalent congruences, positive and negative periods, rejected supporting points, both representations and row orders, and unchanged independent input systems.
Compare exported congruences with literal rational membership conditions and generated points/directions. Alternate the four accessors after each input form and verify dimensions, value preservation and admissible minimal forms. Reject borrowing from temporary grids while admitting independent constraint extraction from them. Copy borrowed systems, mutate or destroy the owner, and check the copied systems independently. Exercise empty, redundant and inconsistent inputs.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definitions 2–3, Propositions 1–3 and Double Description (PDF page indices 7–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_conversion.cc; src/Grid_simplify.cc; tests/Grid/gridboundedconversion1.cc; tests/exactboundedworking1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
4. Best octagonal enclosure of rational grids UID: PPL-SPEC-001165 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000061 Octagonal expressiveness (Specifies)
- PPL-LLR-000062 Conservative octagonal constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: 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.
RATIONALE: 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.
INTERFACE: Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:
explicit Octagonal_Shape(const Grid& grid, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: 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.
BIBLIOGRAPHY: 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).
SOURCE: 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.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001075 Best bounded-difference enclosure of rational grids (Specified by)
- PPL-SPEC-001271 Copying bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001272 Recycling bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001273 Copying insertion of a single rational-grid generator (Specified by)
- PPL-SPEC-001280 Equality-constraint extraction and minimization (Specified by)
- PPL-SPEC-001251 Exact grid equality and inequality (Specified by)
- PPL-SPEC-001253 Exact grid containment (Specified by)
- PPL-SPEC-001254 Exact strict grid containment (Specified by)
- PPL-SPEC-001255 Exact grid disjointness (Specified by)
- PPL-SPEC-001256 Exact grid relation with a congruence (Specified by)
- PPL-SPEC-001257 Exact grid relation with a linear constraint (Specified by)
- PPL-SPEC-001258 Exact grid subsumption of grid generators (Specified by)
- PPL-SPEC-001259 Exact grid subsumption of polyhedral generators (Specified by)
- PPL-SPEC-001265 Exact directional boundedness of affine expressions on grids (Specified by)
- PPL-SPEC-001266 Exact rational-grid supremum and attainment (Specified by)
- PPL-SPEC-001267 Exact rational-grid infimum and attainment (Specified by)
- PPL-SPEC-001268 Point witnesses for rational-grid maximization (Specified by)
- PPL-SPEC-001269 Point witnesses for rational-grid minimization (Specified by)
- PPL-SPEC-001270 Exact affine-image frequency and closest value on rational grids (Specified by)
- PPL-SPEC-001607 Grid internal status value ownership and prerequisites (Specified by)
- PPL-SPEC-001608 Grid internal status flag queries and transitions (Specified by)
- PPL-SPEC-001609 Grid internal status consistency predicate (Specified by)
- PPL-SPEC-001610 Grid internal status signed-keyword export (Specified by)
- PPL-SPEC-001611 Grid internal status signed-keyword loading and rejection (Specified by)
- PPL-SPEC-001260 Human-readable rational-grid presentation (Specified by)
- PPL-SPEC-001261 Reloadable rational-grid record export (Specified by)
- PPL-SPEC-001262 Compatible rational-grid record loading and failure state (Specified by)
- PPL-SPEC-001263 Owned rational-grid memory accounting (Specified by)
- PPL-SPEC-001264 Rational-grid representation invariant query (Specified by)
- PPL-SPEC-001241 Rational-grid values, coefficient profile and valid use (Specified by)
- PPL-SPEC-001245 Exact grid construction from congruence systems (Specified by)
- PPL-SPEC-001246 Exact grid construction from generator systems (Specified by)
- PPL-SPEC-001248 Ambient and affine grid dimensions (Specified by)
- PPL-SPEC-001249 Exact foundational grid classification (Specified by)
- PPL-SPEC-001250 Borrowed congruence and generator views of grid values (Specified by)
- PPL-SPEC-001165 Best octagonal enclosure of rational grids (Specified by)
Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, successful conversion between a grid's congruence description and its generator description shall preserve the represented grid, with grid parameters retaining integer displacement and grid lines retaining arbitrary real displacement.
The two descriptions must agree on periodicity as well as affine geometry.
Verification covers grid representation conversion and generator interpretation. Related obligations: 🔗 3. Preservation by representation-only changes, 🔗 4. Sound conversion between numerical abstractions.
Independently derive dual descriptions of rational grids containing points, periodic parameters and continuous directions. Check conversion in both directions, redundant descriptions and grids without generating points.
BagnaraDHMZ07 | whole work (background)
doc/definitions.dox: Points, Parameters and Lines; The Grid Generator Representation; Minimized Grid Representations. src/Grid_defs.hh: grid representations. src/Grid_conversion.cc: representation conversion.
-
4. Best bounded-difference enclosure of rational grids UID: PPL-SPEC-001075 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000051 Bounded-difference expressiveness (Specifies)
- PPL-LLR-000052 Conservative bounded-difference constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: BD_Shape(grid,complexity) shall give the least target-profile bounded-difference enclosure of the entire rational grid. It shall preserve every fixed unary or difference affine value, including values implied by the full congruence system. Equivalent source descriptions shall give mathematically equivalent results in the same target profile.
A supported normal shall have a finite bound exactly when it annihilates every real line, integer parameter and difference between source base points. In that case its value shall equal its value at any source base point, and both signed bounds shall be converted to the target profile. A nonzero response to an integer parameter shall make the normal unbounded in both directions; a periodic restriction shall not become a finite interval or an integer-only coordinate carrier. Empty grids shall remain empty. The complexity argument shall be ignored for the three declared complexity values.
For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.
The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.
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 [LINK: PPL-SPEC-001057].
Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.
RATIONALE: Finite support is determined by the whole affine geometry of a grid. Integer and real unbounded displacements constrain finite support in the same way; periodicity alone does not supply a finite bound.
INTERFACE: Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:
explicit BD_Shape(const Grid& grid, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: Use raw rational base points, integer parameters and real lines to compute constant or unbounded response for each primitive normal. Include fixed differences, singleton fractions, proper periodic directions, empty/zero dimensions, equivalent congruence/generator descriptions and cache histories, independent output affine dimension and target-profile rounding.
BIBLIOGRAPHY: BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9-10, zero-based). BagnaraDHMZ07 | Section 3, The Generator Representation (PDF page index 7, zero-based).
SOURCE: src/Shape_Conversion_Support.hh; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/fromgrid1.cc; tests/BD_Shape/dimensionlimits1.cc; tests/BD_Shape/supportconversion1.cc.
-
Incoming link from: 2. Recycling bulk insertion of rational-grid generators1
1. Copying bulk insertion of rational-grid generators UID: PPL-SPEC-001271 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(input) shall add the input points, parameters and lines to a generator description of the receiver, with the meaning in 🔗 1. Rational-grid values, coefficient profile and valid use. For nonempty G = p + H, input points ri, parameters qj and lines lk shall produce p + H + ∑iZ(ri − p) + ∑jZqj + ∑kRlk. In particular, adding points shall form a grid hull, not a finite union.
A system with no stored rows shall be a no-op. If the receiver is empty and the nonempty input has no point, the operation shall throw std::invalid_argument. Otherwise an empty receiver shall acquire exactly the grid generated by the input. A zero-dimensional point shall turn zero-dimensional empty into universe; zero-dimensional universe shall be preserved. Zero parameters omitted by the generator-system contract shall not constitute stored rows.
The input's value, dimension and storage shall be preserved, including when an exception propagates. A current generator-system view borrowed from the receiver may be supplied: its pre-call generators shall be used as the input, and normal receiver-view invalidation shall apply during mutation.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The copying interface must preserve its source while combining integer displacements and real line directions, including when cached congruences are inconsistent.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(const Grid_Generator_System& input);
VERIFICATION_CRITERIA: Use independent rational coset calculations for points, parameters and lines under invertible coordinate transformations. Cross empty, singleton, periodic and continuous receivers with both descriptions and cache histories. Exercise pending contradictory rows, lower-dimensional inputs, dense/sparse storage, reversed/redundant rows, borrowed self views, unchanged source records, dimension errors, zero dimensions and allocation failures.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
2. Recycling bulk insertion of rational-grid generators UID: PPL-SPEC-001272 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(std::move(input)) and add_recycled_grid_generators(input) shall produce the same mathematical receiver value, ambient dimension and ordinary input-rejection outcomes as 🔗 1. Copying bulk insertion of rational-grid generators. These operations may transfer ownership from the supplied system. The input shall be a separate writable object; it shall not alias receiver-owned storage. After successful or exceptional return the input shall retain ownership sufficient for destruction. Its rows, dimension, storage and suitability for subsequent queries shall not be assumed.
A receiver discovered empty while converting its congruences shall use the same insertion rules as an already marked empty receiver. Nonempty input without a supporting point shall therefore be rejected; input with a point shall establish the generated grid. Conversion shall not leave subsequent normalization dependent on a nonexistent old supporting point.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Recycling changes ownership permissions, while the generated set and empty-grid point requirement remain the same as for copying insertion.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(Grid_Generator_System&& input); void add_recycled_grid_generators(Grid_Generator_System& input);
VERIFICATION_CRITERIA: Check recycling and copying separately against the same independent coset oracle. Include empty inputs, lower-dimensional rows, zero dimensions, systems with no points, latent contradictions, mixed point/parameter/line systems, every observed allocation-failure frontier and destruction of both surviving objects.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc; tests/gridconsuminginsertions1.cc.
-
3. Copying insertion of a single rational-grid generator UID: PPL-SPEC-001273 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generator(g) shall add the pre-call generator value to a generator description of the receiver, preserving its ambient dimension. For nonempty G = p + H, adding a point r shall produce p + H + Z(r − p); adding a parameter q shall produce p + H + Zq; adding a line l shall produce p + H + Rl. Insertion of an already supplied generator shall be mathematically idempotent. A zero parameter shall preserve a nonempty grid.
An empty receiver shall accept a point and become that singleton. A parameter or line supplied to empty shall throw std::invalid_argument, including a zero parameter. Previously undetected inconsistency shall have the same meaning as already marked empty. In zero dimensions a point shall establish universe; a parameter shall preserve universe and be rejected by empty.
Missing coordinates shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including an empty receiver or a zero parameter. Input type and value shall be captured safely when the argument is borrowed from the receiver's generator view. Receiver mutation may invalidate that view according to 🔗 10. Borrowed congruence and generator views of grid values; the external input case shall preserve its source. The result shall not depend on storage, redundant rows or cache history.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. External input descriptors shall retain their value.
RATIONALE: Points, integer parameters and real lines extend a grid in different ways. The copy-taking interface must not inspect a borrowed argument after receiver storage growth invalidates it.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generator(const Grid_Generator& g);
VERIFICATION_CRITERIA: Use independent rational coset calculations for each generator kind. Check empty and latent-empty receivers, zero dimensions and parameters, lower or excess declared dimension, fractional points, storage and cache histories. Insert borrowed points, parameters and lines across storage growth and compare with their pre-call grid. Exercise external-input preservation and every observed allocation-failure frontier, checking surviving ownership.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridsingleinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
7. Equality-constraint extraction and minimization UID: PPL-SPEC-001280 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: constraints() shall return an independently owned equality-constraint system defining the real affine hull of the receiver. Empty shall yield an inconsistent system, including when emptiness follows from incompatible proper congruences not previously normalized. minimized_constraints() shall return a minimal equality description of the same affine hull. Both shall preserve ambient dimension, receiver value and ownership, while normalization caches may change. The result shall be independent of storage, redundant rows and description history.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Dropping proper congruences is correct only after any latent inconsistency has been resolved.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
Constraint_System constraints() const; Constraint_System minimized_constraints() const;
VERIFICATION_CRITERIA: Use consistent and inconsistent proper congruences, contradictions among equalities, unused coordinates, dense/sparse storage, all addition/refinement routes and both extraction methods. Check returned ownership and affine hulls with an independent equality oracle.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/constraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
Incoming link from: 2. Equality-compatible grid hashing1
1. Exact grid equality and inequality UID: PPL-SPEC-001251 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: operator== shall return true exactly when both ambient dimensions and represented sets agree. Different dimensions shall compare unequal, including empty grids in different dimensions. Inequality expressions shall be the logical negation of equality. Equal-dimensional empty grids shall compare equal, including when inconsistency has not previously been detected. Self comparison shall have the ordinary reflexive result for every admitted value.
The result shall be independent of constructor choice, generator order, redundant descriptors and the current dual-description caches.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Set equality includes periodicity and the ambient coordinate space; matching affine hulls or matching syntactic rows alone do not establish equality.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool operator==(const Grid& left, const Grid& right); // Inequality uses C++20 rewriting of operator==.
VERIFICATION_CRITERIA: Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare independent rational cosets, continuous subspaces, singletons, empty/universe and incompatible dimensions. Use literal generator/congruence models and alternate construction, normalization and reload histories. Include unequal lattices with identical affine hulls and equal values with redundant generators.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
3. Exact grid containment UID: PPL-SPEC-001253 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.contains(right) shall return true exactly when γ(right) ⊆ γ(left). Every grid shall contain the empty grid; empty shall contain no nonempty grid; universe shall contain every equal-dimensional grid. Self containment shall hold. Different ambient dimensions shall throw std::invalid_argument before empty, universe or identity shortcuts. Previously undetected inconsistency shall retain the same set meaning.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Containment must respect integer parameter steps and rational offsets, not only affine spans or the presence of individual points.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool contains(const Grid& other) const;
VERIFICATION_CRITERIA: Use exact rational one-dimensional coset divisibility and invertible coupled-coordinate products. Cross all pairs of empty, singleton, periodic and continuous factors; vary representations and query order. Check reflexivity, containment of empty and dimension rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
4. Exact strict grid containment UID: PPL-SPEC-001254 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.strictly_contains(right) shall return true exactly when γ(right) ⊊ γ(left). It shall be false for self comparison and equal sets; a nonempty grid shall strictly contain empty. Different ambient dimensions shall throw std::invalid_argument even when either operand is empty.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Strict containment combines inclusion with semantic inequality; changes only to representation cannot make containment strict.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool strictly_contains(const Grid& other) const;
VERIFICATION_CRITERIA: Use the same independent coset/product inclusion oracle as containment. Check strict chains of periods, fractional shifts, equal alternate representations, self comparison, empty and incompatible dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
5. Exact grid disjointness UID: PPL-SPEC-001255 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For equal-dimensional grids, left.is_disjoint_from(right) shall return true exactly when γ(left)∩γ(right) = ⌀. The result shall be symmetric. Empty shall be disjoint from every grid, including itself; no nonempty grid shall be disjoint from itself. Different ambient dimensions shall throw std::invalid_argument before shortcuts. Success shall preserve both operands even when detecting inconsistent input or incompatible periodic residues.
The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Intersecting affine hulls do not establish that periodic grids share a point. Rational residue compatibility determines lattice intersection.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
bool is_disjoint_from(const Grid& other) const;
VERIFICATION_CRITERIA: Use independent rational greatest-common-divisor conditions for cosets, then combine independent coordinates through invertible rational maps. Include fractional periods, incompatible shifts, singleton membership, continuous factors, zero dimensions, symmetry and argument rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
Incoming link from: 7. Exact grid relation with a linear constraint1
6. Exact grid relation with a congruence UID: PPL-SPEC-001256 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(cg) shall classify the grid relative to the solution set of cg. For nonempty grids it shall report exactly one of is_included(), is_disjoint() and strictly_intersects(): respectively all points satisfy cg, no point does, or both satisfying and nonsatisfying points exist. Empty shall report is_included() && is_disjoint() && saturates(). An equality congruence shall additionally report saturates() exactly when the grid is included in its equality hyperplane. For a nonempty positive-dimensional grid and a proper congruence, the returned relation shall consist of the inclusion/disjointness/intersection assertion alone. Zero-dimensional universe shall report is_included() && saturates() for a true constant congruence and is_disjoint() for a false one.
For a nonempty generator description, let S = {a⋅x − b : x ∈ γ(G)}. If a real line has nonzero scalar image, S = R. Otherwise S = s + dZ, where s = a⋅p − b and d ≥ 0 generates the rational subgroup of parameter images and supporting-point differences. This scalar image shall determine equality and periodic intersection without depending on generator order or rational divisor representation.
A congruence dimension greater than the grid dimension shall throw std::invalid_argument before distinguished-value shortcuts. Smaller descriptors shall have zero coefficients in the remaining coordinates.
Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Exact relation queries require rational residue arithmetic, including point offsets, integer combinations of all parameter images and arbitrary real line images. Saturation and periodic inclusion have distinct API assertion conventions.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Congruence& cg) const;
VERIFICATION_CRITERIA: Use the independent integer-scaled scalar-image gcd oracle and all point/parameter/line permutations in the existing relation tests. Include fractional divisors, extra supporting points, proper/equality constants, undetected emptiness, alternate caches, zero dimensions and rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; tests/Grid/relations2.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
7. Exact grid relation with a linear constraint UID: PPL-SPEC-001257 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(c) shall classify all points, no points or a proper nonempty subset of grid points satisfying c using is_included(), is_disjoint() or strictly_intersects(). Empty shall report is_included() && is_disjoint() && saturates(). In every case, saturates() shall be present exactly when every grid point lies on the equality hyperplane obtained from c by replacing its relation with equality. Thus a grid on the boundary of a strict inequality shall report is_disjoint() && saturates().
For nonempty grids, a nonconstant scalar image along any line, parameter or supporting-point displacement shall take values on both sides of every finite halfspace threshold. Otherwise the scalar image shall be constant and its sign shall determine strict/nonstrict satisfaction and saturation. Equality constraints shall use the exact equality-congruence meaning in 🔗 6. Exact grid relation with a congruence.
A constraint dimension greater than the grid dimension shall throw std::invalid_argument before shortcuts; omitted coefficients shall be zero. Strict boundary behavior shall apply also to constant constraints and zero dimensions.
Strict constraints extracted from NNC polyhedra shall retain their mathematical relation when queried against a larger-dimensional grid.
Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Integer displacements still extend in both signs, so a nonconstant linear form on a grid cannot have a one-sided finite extremum. Saturation concerns the boundary hyperplane independently of inequality satisfaction.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Con_Relation relation_with(const Constraint& c) const;
VERIFICATION_CRITERIA: Exercise literal affine annihilators, unbounded parameter/line images, rational supporting points and boundary equalities. Reuse independent strict-boundary and scalar-sign controls, with generator permutations, cache histories, constants, latent empty values and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; tests/Grid/relations3.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
8. Exact grid subsumption of grid generators UID: PPL-SPEC-001258 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(g) for a Grid_Generator shall return Poly_Gen_Relation::subsumes() exactly under the following conditions:
- a point denotes a member of the grid;
- for a parameter q, the grid is nonempty and every integer translate x + zq, for x ∈ γ(G) and z ∈ Z, remains in the grid;
- for a line ℓ, the grid is nonempty and every real translate x + tℓ, for t ∈ R, remains in the grid.
In all other cases it shall return Poly_Gen_Relation::nothing(). In particular, empty shall subsume no generator, including a zero parameter; this shall hold before any earlier query has detected the emptiness. Parameter steps shall use their rational divisors and shall not be confused with arbitrary real line displacements. Zero-dimensional universe shall subsume every admitted zero-dimensional grid generator. A descriptor dimension greater than the grid dimension shall throw std::invalid_argument before empty/universe shortcuts; omitted coordinates shall be zero.
The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Satisfying homogeneous direction equations alone does not establish that the source grid contains a supporting point. Nonempty rational lattices can admit an integer step while rejecting its real line.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Gen_Relation relation_with(const Grid_Generator& g) const;
VERIFICATION_CRITERIA: Use literal congruence membership for points and independent homogeneous conditions for integer parameters and real lines. Include cold inconsistent systems, nonzero directions in otherwise free coordinates, zero parameters, fractional lattice steps, affine obstructions, cache histories and dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
9. Exact grid subsumption of polyhedral generators UID: PPL-SPEC-001259 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: relation_with(g) for a polyhedral Generator shall return Poly_Gen_Relation::subsumes() exactly when the grid is nonempty and the following corresponding condition holds. Points and closure points shall be tested as rational point members, with the same result for identical coordinates. Lines shall be tested as arbitrary real displacements. A ray shall be subsumed exactly when its direction is an admitted real line direction of the grid; an integer parameter in that direction alone shall not suffice.
It shall return Poly_Gen_Relation::nothing() otherwise, including every empty grid before or after inconsistency detection. Zero-dimensional universe shall subsume every admitted zero-dimensional polyhedral generator. Descriptors of greater dimension than the grid shall throw std::invalid_argument before shortcuts; omitted coordinates shall be zero.
The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.
RATIONALE: Grids are closed, so closure points have ordinary point membership. A nonzero real scalar image along a ray varies continuously and cannot stay in a discrete congruence class; ray subsumption therefore requires a full continuous line direction.
INTERFACE: Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:
Poly_Gen_Relation relation_with(const Generator& g) const;
VERIFICATION_CRITERIA: Cross point/closure-point membership, both orientations of rays and lines, periodic directions lacking continuous freedom, coupled rational coordinates, cold inconsistent grids, free unused coordinates, zero dimensions and argument rejection. Check the same mathematical value after each query.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.
-
1. Exact directional boundedness of affine expressions on grids UID: PPL-SPEC-001265 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: bounds_from_above(expr) and bounds_from_below(expr) shall return true exactly when the expression is bounded in the indicated direction over the grid. Empty shall be bounded in both directions. On a nonempty grid, either both queries shall be true and the expression shall have one constant value, or both shall be false and the expression shall be unbounded in both directions.
For a generator description p + ∑iℤqi + ∑jℝlj and e(x) = a⋅x + b, boundedness shall be equivalent to a⋅qi = 0 and a⋅lj = 0 for every direction, including point differences when the description has more than one generating point. Zero coefficients shall not introduce dependence on unused directions.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: A grid direction is reversible with an integer or real multiplier; a varying affine objective therefore has neither a lower nor an upper bound.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool bounds_from_above(const Linear_Expression& expr) const; bool bounds_from_below(const Linear_Expression& expr) const;
VERIFICATION_CRITERIA: Independently compute scalar images of literal rational generating points, their differences, parameters and lines. Include empty, latent inconsistency, zero-dimensional universe, constant objectives and objectives orthogonal to nontrivial directions. Vary storage and both description/cache histories.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
Incoming link from: 4. Point witnesses for rational-grid maximization1
2. Exact rational-grid supremum and attainment UID: PPL-SPEC-001266 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: maximize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded above. On true, n/d shall be its exact supremum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: The only finite affine supremum of a nonempty grid is its constant objective value; it is always attained.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained) const;
VERIFICATION_CRITERIA: Compare the returned fraction and attainment with exact rational scalar-image calculations. Use signed/fractional points, unused varying coordinates, empty and unbounded cases. Check reduced positive denominators, sentinel preservation on false and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
Incoming link from: 5. Point witnesses for rational-grid minimization1
3. Exact rational-grid infimum and attainment UID: PPL-SPEC-001267 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: minimize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded below. On true, n/d shall be its exact infimum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: Reversibility of every grid direction makes a finite infimum the constant objective value, equal to the supremum.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained) const;
VERIFICATION_CRITERIA: Check exact rational infima and attainment using independent scalar images. Include negative constants, fractional points, non-singleton grids with constant objectives and false/error output sentinels.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
4. Point witnesses for rational-grid maximization UID: PPL-SPEC-001268 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The maximize overload with a Generator output shall obey 🔗 2. Exact rational-grid supremum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned supremum. Its type shall be POINT, not a closure point or a direction. All coordinates, including those absent from the objective, shall satisfy the grid's equalities and periodic restrictions. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness as well as all scalar and attainment outputs.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: A correct objective value alone does not establish membership; the witness must preserve the supporting point and its rational divisor.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool maximize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained, Generator& witness) const;
VERIFICATION_CRITERIA: Independently check the witness coordinates against literal congruences and recompute its objective. Include rational offsets, nontrivial unused coordinates, zero dimensions, negative constants and preservation of an unrelated ray sentinel on false/error.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
5. Point witnesses for rational-grid minimization UID: PPL-SPEC-001269 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The minimize overload with a Generator output shall obey 🔗 3. Exact rational-grid infimum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned infimum. Its type shall be POINT, not a closure point or a direction. Every coordinate shall satisfy the grid's equalities and periodic restrictions, including coordinates unused by the objective. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness and all scalar and attainment outputs.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: An infimum witness must be a member of the grid, even when the objective ignores coordinates constrained to fractional or periodic values.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool minimize(const Linear_Expression& expr, Coefficient& n, Coefficient& d, bool& attained, Generator& witness) const;
VERIFICATION_CRITERIA: Check complete witness membership and objective values independently for both bounded non-singleton grids and singletons. Include zero-dimensional universe and unchanged ray/scalar sentinels after false/error.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.
-
6. Exact affine-image frequency and closest value on rational grids UID: PPL-SPEC-001270 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For the affine image S = {e(x) ∣ x ∈ G}, frequency(expr,fn,fd,vn,vd) shall return false when S is empty or equals ℝ, preserving all four supplied outputs. Otherwise it shall return true and positive denominators, with both fractions reduced. If S = {c}, fn/fd shall be zero over one and vn/vd shall be c. Otherwise S shall be the coset v + dℤ where d = fn ⁄ fd > 0 is its unique positive period generating all differences and v = vn ⁄ vd ∈ S has minimum absolute value. Either sign shall be permitted when two values tie.
A line with nonzero homogeneous objective image shall make the frequency undefined. Otherwise the positive period shall be the rational greatest common divisor of the parameter images and generating-point differences; a zero period shall mean the objective is constant. The objective's constant term shall translate the coset without changing its period. Zero-dimensional universe shall report zero frequency and the constant expression value.
For a bounded coefficient profile, generator scalar products, translated point values, parameter gcds and closest-residue selection shall use exact working integers until both output fractions are reduced. Only the final reduced numerators and denominators shall require coefficient admission. A machine-carrier overflow shall promote the working arithmetic without truncation. Stored grid descriptions remain subject to their profile limits.
An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.
RATIONALE: The exact affine image of a rational grid is empty, continuous, a singleton or a rational coset. A closest representative is signed, while the generating period is nonnegative.
INTERFACE: Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.
bool frequency(const Linear_Expression& expr, Coefficient& fn, Coefficient& fd, Coefficient& vn, Coefficient& vd) const;
VERIFICATION_CRITERIA: Compute images from literal generating points, point differences, rational parameters and lines using independent rational gcd arithmetic. Check exact period, coset membership, minimal absolute representative, both tie signs, constant/zero-dimensional cases, undefined continuous images, translations, false/error sentinels and cache/storage independence.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc; tests/exactboundedworking1.cc; src/Linear_Expression.cc; src/Linear_Expression_defs.hh.
-
1. Grid internal status value ownership and prerequisites UID: PPL-SPEC-001607 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: The nested Status shall own a finite set of named Boolean flags: empty, c_up_to_date, g_up_to_date, c_minimized, g_minimized, sat_c_up_to_date, sat_g_up_to_date, c_pending, g_pending. test_zero_dim_univ() shall recognize the zero flag word; that word shall be the default state. It shall be an encoding predicate, not an independent query of the owning object's dimension or numerical payload. The owning object shall supply that context and establish the truth of its cache claims.
Copy construction and assignment shall preserve all stored flags in an independent value. Assignment shall return its target and admit self-assignment. Mutating or destroying one copy shall not change another. Destruction shall release the status value without destroying an owning domain or its payload. These value operations shall admit any vector of the declared flags, including transient inconsistent combinations used while updating a representation.
Status-only operations shall require live objects and synchronized access against mutation, but no numerical-library/thread initialization or coefficient constant stage. Their selected streams shall remain live. They shall not inspect domain coordinates, reconstruct numerical descriptions or perform coefficient arithmetic. A domain shall use a consistent status whose claims agree with its representation; the local check of 🔗 3. Grid internal status consistency predicate alone shall not certify those numerical facts.
RATIONALE: Cached facts need an independent value and an explicit distinction between status-bit consistency and the truth of claims about a numerical object.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
Status(); Status(const Status&); Status& operator=(const Status&); ~Status();
VERIFICATION_CRITERIA: Check default/copy/assignment, self-assignment, independent mutation and source destruction over every declared flag vector. Use status-only tests without a numerical initialization owner; inspect payload independence.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
2. Grid internal status flag queries and transitions UID: PPL-SPEC-001608 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: For a declared mask m and current flag word F, the private test_all(m) shall return (F&m) = m, and test_any(m) shall return (F&m) ≠ 0. The empty mask shall therefore match all and match no individual bit. set(m) shall replace F by F|m; reset(m) shall clear exactly the selected bits. Masks shall contain only the declared flags. Tests shall preserve state.
Each named test_* shall return its stored bit, except the zero-word predicate of 🔗 1. Grid internal status value ownership and prerequisites. set_zero_dim_univ() shall clear all flags. reset_zero_dim_univ() shall replace zero by the empty-only state and preserve every nonzero state. set_empty() shall replace the entire word by the empty-only state; reset_empty() shall clear only the empty bit. Other named setters/resets shall set/clear only the indicated bit, subject to no additional flag dependencies enforced by these individual updates.
Updates shall not generally reconcile other assertions. Transient inconsistent vectors shall remain available to 🔗 3. Grid internal status consistency predicate, but shall not be installed as valid domain state. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
RATIONALE: Representation algorithms need exact local cache updates without implicit numerical recomputation or unrelated changes to known facts.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool test_zero_dim_univ() const; void set_zero_dim_univ(); void reset_zero_dim_univ(); bool test_empty() const; void set_empty(); void reset_empty(); bool test_c_up_to_date() const; void set_c_up_to_date(); void reset_c_up_to_date(); bool test_g_up_to_date() const; void set_g_up_to_date(); void reset_g_up_to_date(); bool test_c_minimized() const; void set_c_minimized(); void reset_c_minimized(); bool test_g_minimized() const; void set_g_minimized(); void reset_g_minimized(); bool test_sat_c_up_to_date() const; void set_sat_c_up_to_date(); void reset_sat_c_up_to_date(); bool test_sat_g_up_to_date() const; void set_sat_g_up_to_date(); void reset_sat_g_up_to_date(); bool test_c_pending() const; void set_c_pending(); void reset_c_pending(); bool test_g_pending() const; void set_g_pending(); void reset_g_pending(); // Private primitives; flags_t is the declared unsigned flag-word type. bool test_all(flags_t mask) const; bool test_any(flags_t mask) const; void set(flags_t mask); void reset(flags_t mask);
VERIFICATION_CRITERIA: Compare all flag words and declared masks against independent set algebra. Check every named update and query, both zero-reset cases, whole-word empty replacement, and independent copies.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
3. Grid internal status consistency predicate UID: PPL-SPEC-001609 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT: Let E, C, G, MC, MG, SC, SG, PC, PG denote respectively empty, current congruences, current generators, minimized congruences, minimized generators, the two current saturation matrices, pending congruences and pending generators. OK() shall return true exactly for the following consistent combinations of the declared flags:
- The zero word and the empty-only word shall be consistent.
- Empty shall exclude every other flag.
- MC ⇒ C and MG ⇒ G.
- (SC∨SG) ⇒ (C∧G).
- ¬(PC∧PG).
- (PC∨PG) ⇒ (MC∧MG∧(SC∨SG)).
These rules shall admit 28 flag words, including zero.
The result shall be the same with and without assertions. Invalid combinations shall return false; assertion builds shall also write a diagnostic to the current std::cerr. Valid combinations shall not emit that diagnostic. The query shall preserve the flag word. Stream failures shall follow ordinary stream rules. This local predicate shall not inspect the domain payload or certify its ambient dimension, feasibility or cached numerical facts. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
RATIONALE: Cache assertions have logical dependencies. Checking their finite Boolean model must remain distinct from checking the numerical representation.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool OK() const;
VERIFICATION_CRITERIA: Enumerate every flag vector against an independent propositional oracle; check accepted-state counts, source preservation and diagnostic presence in assertion/release builds. Inspect payload independence.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
4. Grid internal status signed-keyword export UID: PPL-SPEC-001610 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_dump(stream) shall write signed keywords in the order ZE EM CM GM CS GS CP GP SC SG. ZE shall be positive exactly for the zero flag word; each other sign shall equal its stored named bit. One space shall separate ZE/EM, CM/GM, CS/GS, CP/GP and SC/SG; two spaces shall separate the successive pairs. The record shall end with a newline and flush. The exact separators shall follow the default stream formatting; caller-selected width/fill/alignment shall retain ordinary character/string insertion behavior.
Export shall preserve the stored flags, including transient inconsistent vectors, without reconciling claims or inspecting numerical payload. Partial output, state flags and exceptions shall follow the selected stream. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply.
ascii_dump() shall send the same record to std::cerr. print() shall write No user level output operator defined for class Grid::Status. followed by a flushed newline to std::cerr.
RATIONALE: Serialized cache claims and diagnostics must retain the actual flag state without triggering domain normalization.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
void ascii_dump(std::ostream& stream) const; void ascii_dump() const; void print() const;
VERIFICATION_CRITERIA: Check exact field signs/order/separators over every flag word, stream formatting and source preservation. Exercise returning/throwing output failures and the declared stderr routes, including their flush behavior.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
Incoming link from: 3. Compatible rational-grid record loading and failure state1
5. Grid internal status signed-keyword loading and rejection UID: PPL-SPEC-001611 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Grid internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.
For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Grid internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.
The loader shall reset its word to zero before reading the first field. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 3. Compatible rational-grid record loading and failure state.
RATIONALE: The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.
INTERFACE: Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.
bool ascii_load(std::istream& stream); // Internal helper, in its defining translation unit or implementation namespace: bool get_field(std::istream& stream, const char* keyword, bool& positive);
VERIFICATION_CRITERIA: Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and output preservation of the translation-unit-local parser by inspection. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.
SOURCE: src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.
-
1. Human-readable rational-grid presentation UID: PPL-SPEC-001260 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: IO_Operators::operator<<(s, grid) shall write false for empty, true for universe, and a readable congruence description otherwise. Nontrivial output shall denote the same set and coordinate identities as the grid, using the installed variable formatter and descriptor output conventions. It shall return s by reference. Representation normalization shall be permitted, preserving set and ambient dimension. This display shall not promise an ascii_load input format or a fixed order of equivalent rows. Stream failure shall follow the stream's configured state/exception behavior. print() shall send the same readable presentation to std::cerr without adding a newline; it shall have the same source and arithmetic prerequisites.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
RATIONALE: Grid display must distinguish empty, universe and periodic restrictions while allowing normal-form and variable-name changes.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
std::ostream& IO_Operators::operator<<(std::ostream& s, const Grid& grid); void print() const;
VERIFICATION_CRITERIA: Check literal empty/universe and nontrivial equality/proper-congruence displays, custom variable names, return-stream identity, cache histories and stream failures.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
2. Reloadable rational-grid record export UID: PPL-SPEC-001261 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_dump(s) shall export a complete record of ambient dimension, distinguished-value/status information, stored congruence and generator systems with their current-description indicators, and dimension-kind data required by the encoded reduced descriptions. The no-argument overload shall write the same record to std::cerr. Export shall preserve the source value, dimension, stored descriptions, status and ownership.
A compatible complete record shall support the loading contract in 🔗 3. Compatible rational-grid record loading and failure state. The scope shall be the corresponding supported producer/consumer format and representable selected coefficient profile; cross-version compatibility, fixed bytes across equivalent cache histories and compatibility with human-readable presentation shall not be implied. Stream failures and enabled stream exceptions shall propagate through the standard stream mechanism; incomplete output shall not be a complete record.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
The internal status contract shall follow 🔗 4. Grid internal status signed-keyword export.
RATIONALE: Text reproduction must include enough state to recover the mathematical grid without requiring prior normalization.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
void ascii_dump(std::ostream& s) const; void ascii_dump() const;
VERIFICATION_CRITERIA: Round-trip literal rational grids in cold, congruence-only, generator-only and dual-description states, including dense/sparse storage, zero dimensions, empty and retained inactive descriptions. Compare repeated dumps without intervening mutation and exercise stderr and failing streams.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
3. Compatible rational-grid record loading and failure state UID: PPL-SPEC-001262 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
- PPL-LLR-000446 Reloadable textual representations (Specifies)
STATEMENT: ascii_load(s) shall return true on a trusted, compatible complete record produced by 🔗 2. Reloadable rational-grid record export, replacing the receiver's set and ambient dimension. Encoded storage shall be retained for the loaded descriptor systems. Cached normal forms may be invalidated and rebuilt under the current reduction rules; cache reconstruction shall preserve mathematical meaning. Trailing input shall remain available after the complete record.
Malformed or truncated fields, unsupported ambient dimensions, invalid status/descriptor structures, incompatible current-description dimensions and nonempty-state generator descriptions lacking a point shall return false, with and without enabled assertions. For a successful load of a trusted record written by 🔗 2. Reloadable rational-grid record export, the receiver shall meet 🔗 5. Rational-grid representation invariant query. Its current descriptions shall define the same set, and an empty grid shall retain empty congruence and generator views. Structural checks can accept altered records whose descriptions contradict one another or disagree with the status. Further operations require a valid representation.
Stream, allocation and selected numerical exceptions may propagate. After false or an exception, the receiver shall retain ownership sufficient for destruction; rollback and subsequent queries shall not be assumed.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
Storage for serialized dimension kinds shall grow with the accepted entries rather than the declared dimension alone.
The internal status contract shall follow 🔗 5. Grid internal status signed-keyword loading and rejection.
RATIONALE: Loaded status and caches influence later query shortcuts. Successful parsing must not admit mutually contradictory descriptions or a supporting-point-free nonempty representation.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
bool ascii_load(std::istream& s);
VERIFICATION_CRITERIA: Use independent literal round trips and every truncated prefix. Corrupt dimensions, distinguished states, active-description flags, generator topology and point presence. Combine individually valid but different current grids in both inclusion directions, including a proper sublattice with the same affine hull. Check false returns in optimized and assertion-enabled loader builds; exercise throwing streams and allocation failures against the destruction-only guarantee.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
4. Owned rational-grid memory accounting UID: PPL-SPEC-001263 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: external_memory_in_bytes() shall report the owned external storage of the congruence system, generator system and dimension-kind vector. Descriptor system counts shall follow their component contracts; the vector count shall include its retained allocated capacity rather than only its live entries. Inactive or logically empty cached data shall remain counted while owned. Other objects, runtime scratch pools and allocator bookkeeping shall be excluded.
total_memory_in_bytes() shall equal sizeof(Grid) plus that external count. The sums shall fit memory_size_type and use the selected build's sizes. Both queries shall preserve set, ambient dimension, caches, capacity, ownership and lifetimes; the observed storage shall remain unchanged during the query.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
RATIONALE: Logical state changes do not release every retained allocation. Capacity owned by the dimension-kind cache contributes to the object footprint.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
memory_size_type external_memory_in_bytes() const; memory_size_type total_memory_in_bytes() const;
VERIFICATION_CRITERIA: Observe the actual allocation backing the dimension-kind vector and compare the reported count with that allocation plus independently specified descriptor-system counts. Include zero/nonzero dimensions, empty, normalization, dimension shrinkage, reuse and reserved spare capacity. Check total minus external equals sizeof(Grid), source preservation and absence of query allocations.
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
Incoming link from: 3. Compatible rational-grid record loading and failure state1
5. Rational-grid representation invariant query UID: PPL-SPEC-001264 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: OK(false) shall return true for an admitted grid whose distinguished state, ambient dimension, status and current descriptions satisfy the representation invariants. OK(true) shall additionally require the grid to be nonempty. The ambient dimension shall be supported and every current system shall be structurally valid and have that dimension.
An empty grid shall have empty generator views and a contradictory congruence view. Zero-dimensional universe shall have no defining congruences and one zero-dimensional point. A nonempty-state current generator system shall contain a point. If both descriptions are current, they shall define the same set, including affine restrictions and discrete periods. A congruence-only description may be inconsistent without already having the empty flag; in that case OK(false) shall be true and OK(true) false.
The query shall preserve the receiver and may use independent temporary normalization to check consistency. It may allocate and propagate supported resource or numerical failures. On an invalid state it may emit diagnostic text; diagnostic wording shall not be a stable interface. The query shall operate only on live, destructible owned structures, not arbitrary invalid addresses or corrupted object representations.
The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.
The internal status contract shall follow 🔗 3. Grid internal status consistency predicate.
RATIONALE: Public invariant checks must recognize states that invalidate the nonempty and dual-description shortcuts used by other operations.
INTERFACE: Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.
bool OK(bool check_not_empty = false) const;
VERIFICATION_CRITERIA: Check all valid construction and cache histories against literal grids, including latent emptiness. Use the existing focused test access for owned structural counterexamples, checking missing points, incompatible current descriptions in each direction, and distinguished-state or ambient-dimension mismatch. Verify source preservation and both check_not_empty values.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.
-
Incoming links from: 1. Exact rational affine image 2. Exact rational affine preimage 3. Generalized variable affine image 4. Generalized variable affine preimage 5. Generalized expression affine image 6. Generalized expression affine preimage 7. Bounded affine image abstraction 8. Bounded affine preimage abstraction 1. Congruence widening and finite delay 2. Generator widening and finite delay 3. Representation-selected default grid widening 4. Congruence-limited extrapolations 5. Grid convergence certificates 1. Grid construction from boxes 1. Grid construction from boxes 2. Grid construction from bounded-difference shapes 2. Grid construction from bounded-difference shapes 3. Grid construction from octagonal shapes 3. Grid construction from octagonal shapes 4. Grid construction from polyhedra 1. Free-coordinate extension 2. Zero-coordinate extension 3. Ordered Cartesian concatenation 4. Selected-coordinate existential projection 5. Prefix-coordinate existential projection 6. Injective coordinate remapping 7. Conditional coordinate replication 8. Least-grid folding of coordinate alternatives 1. Integer-time-elapse grid abstraction 2. Exact integer-coordinate restriction 3. Bounded-integer wrapping abstraction 4. Grid topological closure 1. Copying bulk insertion of rational-grid generators 1. Copying bulk insertion of rational-grid generators 2. Recycling bulk insertion of rational-grid generators 3. Copying insertion of a single rational-grid generator 1. Single congruence addition and refinement 1. Single congruence addition and refinement 2. Copying congruence-system addition and refinement 3. Recycling congruence-system addition 4. Strict addition of a single linear constraint 5. Copying and recycling strict constraint-system addition 6. Conservative refinement by linear constraints 7. Equality-constraint extraction and minimization 1. Exact grid equality and inequality 2. Equality-compatible grid hashing 3. Exact grid containment 4. Exact strict grid containment 5. Exact grid disjointness 6. Exact grid relation with a congruence 7. Exact grid relation with a linear constraint 8. Exact grid subsumption of grid generators 9. Exact grid subsumption of polyhedral generators 1. Exact directional boundedness of affine expressions on grids 2. Exact rational-grid supremum and attainment 3. Exact rational-grid infimum and attainment 4. Point witnesses for rational-grid maximization 5. Point witnesses for rational-grid minimization 6. Exact affine-image frequency and closest value on rational grids 1. Exact rational-grid intersection 2. Least containing rational grid 3. Conditional exact rational-grid union 4. Least-grid abstraction of set difference 5. Context-preserving grid simplification 6. Coordinate cylindrification 1. Human-readable rational-grid presentation 2. Reloadable rational-grid record export 3. Compatible rational-grid record loading and failure state 4. Owned rational-grid memory accounting 5. Rational-grid representation invariant query 2. Dimensioned empty and universe grid construction 3. Owned grid copying, assignment and destruction 4. Whole grid value exchange 5. Exact grid construction from congruence systems 6. Exact grid construction from generator systems 6. Exact grid construction from generator systems 7. Grid construction from equality constraint systems 8. Ambient and affine grid dimensions 9. Exact foundational grid classification 10. Borrowed congruence and generator views of grid values80
1. Rational-grid values, coefficient profile and valid use UID: PPL-SPEC-001241 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid shall represent the solutions in Rn of a finite system of rational linear congruences. For integer coefficients after common denominator scaling, a row a⋅x ≡ mb shall mean a⋅x − b ∈ mZ when m > 0, and a⋅x = b when m = 0. Empty and universe shall be distinct in every supported ambient dimension. Coordinates absent from all restrictions shall remain free. The coordinate carrier shall remain real, including when all stored coefficients are integral.
A nonempty rational generator description shall denote p + ∑iziiq + ∑jtjℓj, with rational supporting point p, rational parameter directions qi, rational line directions ℓj, zi ∈ Z and tj ∈ R. Additional supporting points shall contribute their displacements from p as integer parameter directions. Generator insertion order shall not affect this mathematical meaning.
coefficient_type shall be the configured Coefficient. Objects and supplied descriptors shall be live and valid. Coordinate identities and reserved dimension indications shall follow 🔗 1. Coordinate type and reserved dimension index. Library and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall apply. Every coefficient operation, including intermediate calculations, shall meet the selected arithmetic profile's range and resource prerequisites. Exact guarantees shall apply when these preconditions hold; bounded coefficient storage shall not silently turn the grid into an integer-coordinate domain.
When eliminating an equality from a proper congruence, an unrepresentable inhomogeneous difference shall be replaced by an equivalent exact residue modulo the positive row modulus. Range requirements shall continue to apply to modulus scaling and homogeneous coefficients; real coordinates shall not permit reducing homogeneous coefficients modulo that modulus.
Diagonal LCMs used in either description-conversion direction shall be exact even when the working value exceeds the configured coefficient range. Each quotient stored in a destination row shall still fit that range. Cancelling a positive factor shared by proper congruence rows shall include their moduli and stored integrality row, while preserving zero-modulus equalities.
Elimination of a nonzero column between two proper congruences, or between points and parameters, shall store its known zero and positive GCD without requiring cancelling products in that column to fit the coefficient range. Assertion checks of the corresponding Bezout identity shall not add a bounded intermediate-product prerequisite. Non-pivot two-product linear combinations shall be evaluated exactly before applying stored-result range requirements, including when native carrier products overflow. An unrepresentable proper-congruence constant shall use an exact equivalent residue modulo its positive row modulus. Homogeneous coefficients and generator coordinates shall still fit their selected storage; homogeneous terms shall not be reduced modulo a congruence modulus.
Independent objects shall own independent values. Mutation, destruction and operations that may update caches shall be externally synchronized against other uses of the same object. Failed construction shall release the resources acquired by the incomplete object. Failure of an operation on an existing object shall preserve ownership sufficient for safe destruction; rollback or permission for further queries shall require a stronger operation-specific guarantee.
RATIONALE: Congruences describe periodic restrictions over real coordinates. Integer parameters, real line directions and ordinary affine equalities have different meanings. The cited grid-domain paper supplies these definitions.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
class Grid { public: typedef Coefficient coefficient_type; };
VERIFICATION_CRITERIA: Use independent literal congruences and rational point/parameter/line models. Include fractional offsets, continuous directions, discrete periodic sets, multiple supporting points, redundant generators, order permutations, free coordinates and empty/universe in zero dimensions. Inspect configured coefficient admission, initialization and failure ownership. Exercise equality elimination with positive and negative constant differences outside the coefficient range, equal pivot coefficients, and constant products exceeding the native accumulator. Exercise conversion with nonprimitive proper rows, working diagonal LCMs outside the coefficient range, and representable stored quotients in both directions. Eliminate coprime columns with products outside the coefficient range, and verify Bezout identities with large opposing products, in both descriptions and representations. Compare against literal rational generators. Exercise cancellation in non-pivot homogeneous terms, wide modular constant combinations and genuinely unrepresentable stored results. Include large Bezout products exceeding the native carrier.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definition 1 and The Generator Representation (PDF page indices 6–7, zero-based).
SOURCE: tests/recyclingconstructors1.cc; src/Grid_defs.hh; src/Grid_nonpublic.cc; src/Grid_simplify.cc; src/Grid_conversion.cc; src/Linear_Expression_Impl_defs.hh; tests/Grid/congruences1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
5. Exact grid construction from congruence systems UID: PPL-SPEC-001245 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Construction from a valid Congruence_System shall inherit its ambient dimension and denote exactly the simultaneous solutions of its rows. Equalities, proper congruences, redundant rows, tautologies and inconsistent systems shall retain their congruence meanings. A system without restrictions shall describe universe in its ambient dimension. Zero-dimensional systems shall give universe or empty according to their constant conditions.
can_recycle_congruence_systems() shall return true.
The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. Both forms shall reject a source dimension above max_space_dimension() with std::length_error before dimension-dependent storage allocation.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Congruence input is an exact defining description, including periodicity that cannot be recovered from an affine hull alone.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
static bool can_recycle_congruence_systems(); explicit Grid(const Congruence_System& source); Grid(Congruence_System&& source);
VERIFICATION_CRITERIA: Evaluate literal congruences independently on rational witnesses. Cross copied and recycled systems, inconsistent nontrivial pairs, zero-dimensional constants, fractional residue classes, redundant rows and ambient free coordinates. Check source preservation for copying and destruction-only cleanup for recycling, including injected failures.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definition 1 (PDF page index 6, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.
-
6. Exact grid construction from generator systems UID: PPL-SPEC-001246 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Construction from a valid Grid_Generator_System shall inherit its ambient dimension and denote its point, integer-parameter and real-line combinations in 🔗 1. Rational-grid values, coefficient profile and valid use. An empty system shall construct an empty grid. A nonempty system without a supporting point shall throw std::invalid_argument. A supporting point in zero dimensions shall construct zero-dimensional universe. Generator insertion order, redundant points and equivalent simultaneous rescaling of generator numerators and divisors shall not change the represented set.
The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. A source dimension above max_space_dimension() shall throw std::length_error before allocating dimension-dependent grid storage.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: A supporting point fixes the affine offset; parameters and lines supply different displacement sets. A collection of directions without a supporting point is not an admitted nonempty constructor input.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
explicit Grid(const Grid_Generator_System& source); Grid(Grid_Generator_System&& source);
VERIFICATION_CRITERIA: Check literal rational point/parameter/line models, repeated and different supporting points, unequal divisors, both constructor forms, free directions, empty and zero-dimensional inputs. Reject line-only and parameter-only systems. Permute generator order and check the value before normalization as well as after each minimized view.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, The Generator Representation and Definition 3 (PDF page index 7, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.
-
8. Ambient and affine grid dimensions UID: PPL-SPEC-001248 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: space_dimension() shall report the ambient dimension without changing the represented grid. affine_dimension() shall return zero for empty and zero-dimensional grids; otherwise it shall return the dimension of the least affine subspace containing the grid. For a nonempty generator description this shall equal the rational rank of its line directions, parameter directions and supporting-point differences.
The answer shall be independent of the current dual representation, redundant input rows, generator order and prior normalization.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: A periodic full-rank grid is affinely full-dimensional even though it is discrete. Ambient dimension remains meaningful for empty sets.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
dimension_type space_dimension() const; dimension_type affine_dimension() const;
VERIFICATION_CRITERIA: Use independent exact rational elimination on literal direction vectors and point differences. Include singleton, lower-dimensional periodic and continuous values, full-rank discrete grids, empty/universe, redundant systems, both input descriptions and alternate normalization histories.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, generator representation and minimal forms (PDF page indices 7–8, zero-based).
SOURCE: src/Grid_inlines.hh; src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.
-
9. Exact foundational grid classification UID: PPL-SPEC-001249 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The following queries shall make exact decisions on admitted grid values:
- is_empty() shall return true exactly for the empty represented set.
- is_universe() shall return true exactly for all of the ambient real coordinate space.
- is_bounded() shall return true exactly for empty or singleton grids.
- is_discrete() shall return true exactly when every represented point is isolated; empty shall be discrete. In a nonempty rational generator description this is equivalent to the absence of nonzero line directions.
- is_topologically_closed() shall return true for every rational grid.
- contains_integer_point() shall return true exactly when the grid intersects Zn; zero-dimensional universe shall contain the integer empty tuple and zero-dimensional empty shall contain none.
- constrains(v) shall return true exactly when independently varying coordinate v can leave the grid. Empty shall constrain every in-range coordinate. An out-of-range coordinate shall throw std::invalid_argument before an empty/universe shortcut.
Answers shall not depend on generator insertion order or whether the current congruence/generator descriptions have been normalized. A periodic restriction shall not be mistaken for an interval bound or a continuous free coordinate.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
RATIONALE: Nonzero parameter directions give unbounded integer displacements; nonzero line directions give arbitrarily small real displacements. A finite intersection of linear congruence solution sets is closed. These are different properties from whether an integer-coordinate point exists.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
bool is_empty() const; bool is_universe() const; bool is_bounded() const; bool is_discrete() const; bool is_topologically_closed() const; bool contains_integer_point() const; bool constrains(Variable coordinate) const;
VERIFICATION_CRITERIA: Use independently described rational singletons, periodic lattices, continuous lines and affine subspaces, fractional offsets excluding all integer points, inconsistent systems and all zero-dimensional cases. Cross constructor forms, redundant descriptions, all generator permutations and normalization orders. Check coordinate independence using literal line spans and validate out-of-range arguments even for empty and universe.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–7, zero-based).
SOURCE: src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.
-
Incoming links from: 1. Exact rational affine image 2. Exact rational affine preimage 3. Generalized variable affine image 4. Generalized variable affine preimage 5. Generalized expression affine image 6. Generalized expression affine preimage 7. Bounded affine image abstraction 8. Bounded affine preimage abstraction 1. Congruence widening and finite delay 2. Generator widening and finite delay 3. Representation-selected default grid widening 4. Congruence-limited extrapolations 5. Grid convergence certificates 1. Grid construction from boxes 2. Grid construction from bounded-difference shapes 3. Grid construction from octagonal shapes 4. Grid construction from polyhedra 1. Free-coordinate extension 2. Zero-coordinate extension 3. Ordered Cartesian concatenation 4. Selected-coordinate existential projection 5. Prefix-coordinate existential projection 6. Injective coordinate remapping 7. Conditional coordinate replication 8. Least-grid folding of coordinate alternatives 1. Integer-time-elapse grid abstraction 2. Exact integer-coordinate restriction 3. Bounded-integer wrapping abstraction 4. Grid topological closure 1. Copying bulk insertion of rational-grid generators 2. Recycling bulk insertion of rational-grid generators 3. Copying insertion of a single rational-grid generator 1. Single congruence addition and refinement 2. Copying congruence-system addition and refinement 3. Recycling congruence-system addition 4. Strict addition of a single linear constraint 5. Copying and recycling strict constraint-system addition 6. Conservative refinement by linear constraints 7. Equality-constraint extraction and minimization 1. Exact grid equality and inequality 2. Equality-compatible grid hashing 3. Exact grid containment 4. Exact strict grid containment 5. Exact grid disjointness 6. Exact grid relation with a congruence 7. Exact grid relation with a linear constraint 8. Exact grid subsumption of grid generators 9. Exact grid subsumption of polyhedral generators 1. Exact directional boundedness of affine expressions on grids 2. Exact rational-grid supremum and attainment 3. Exact rational-grid infimum and attainment 4. Point witnesses for rational-grid maximization 5. Point witnesses for rational-grid minimization 6. Exact affine-image frequency and closest value on rational grids 1. Exact rational-grid intersection 2. Least containing rational grid 3. Conditional exact rational-grid union 4. Least-grid abstraction of set difference 5. Context-preserving grid simplification 6. Coordinate cylindrification60
10. Borrowed congruence and generator views of grid values UID: PPL-SPEC-001250 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Borrowed congruence and grid-generator accessors shall require an lvalue receiver, with corresponding const && overloads deleted. Returned references shall not extend the receiver's lifetime. Constraint extraction returns an independent value and shall remain available on temporary grids.
congruences() and grid_generators() shall return valid descriptions of the receiver's exact represented grid in the same ambient dimension. If the required description is stale, it shall be computed without changing the grid's mathematical meaning.
minimized_congruences() and minimized_grid_generators() shall additionally supply the corresponding minimized triangular representations. Required administrative integrality rows may remain in congruence storage. These interfaces shall not promise a unique physical row order or byte-identical records across equivalent descriptions.
Returned references shall borrow receiver-owned storage. Their use shall require the receiver to remain live and no intervening operation capable of replacing or normalizing the borrowed representation. Iterators and row references shall obey the same condition. An independently copied returned system shall remain independent of later receiver mutation or destruction. Empty and zero-dimensional values shall retain their exact distinguished meanings in both descriptions.
The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.
Before aligning proper-congruence moduli in a bounded profile, simplification shall remove each row's redundant sign, constant-residue and common-factor scaling. A tautological constant row shall retain a nonzero integrality representative. Alignment shall preserve the same rational satisfying set.
For a bounded discrete generator system, elimination may temporarily cancel the common positive factor of every coupled point/parameter coordinate and divisor, restoring that physical scale after reduction. The resulting strong form shall retain its previous storage scale. Lines shall not be rescaled by this operation, and integer-parameter periods shall not change. Centered coordinate reduction shall also accept a positive pivot at the profile's largest admissible coefficient without overflowing the half-pivot calculation. For a least signed pivot input, Bezout computation shall own its working magnitudes and admit only the completed positive gcd and signed coefficients; an unrepresentable input magnitude alone shall not cause arithmetic failure.
During triangular conversion, the selected coordinate's scaling and exact division shall be fused; an unrepresentable product immediately cancelled by that division shall not be stored. Other coupled point/parameter or proper- congruence rows shall receive the required common scale. Independent line or equality scales shall remain independent. Complete column differences shall be evaluated exactly. If an inverse-column working value exceeds the coefficient range, conversion shall replay the complete triangular inverse using independently owned unbounded integers. Later exact divisions shall precede admission of destination coefficients. Final unrepresentable entries shall still raise the configured range exception, including in native coefficient profiles. Replay shall preserve the source rows, their dimension kinds and the distinct coupled or independent row scales.
RATIONALE: Clients need exact dual views while ownership and normalization invalidate physical observations independently of mathematical value.
INTERFACE: Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:
const Congruence_System& congruences() const &; const Congruence_System& minimized_congruences() const &; const Grid_Generator_System& grid_generators() const &; const Grid_Generator_System& minimized_grid_generators() const &;
VERIFICATION_CRITERIA: Exercise both conversion directions with the literal lattice x = 1 ⁄ 60 + z ⁄ 3, y = 1 ⁄ 2 + 2w ⁄ 5, c = − 1 ⁄ 3 for independent integers z, w. Check its equivalent congruences, positive and negative periods, rejected supporting points, both representations and row orders, and unchanged independent input systems.
Compare exported congruences with literal rational membership conditions and generated points/directions. Alternate the four accessors after each input form and verify dimensions, value preservation and admissible minimal forms. Reject borrowing from temporary grids while admitting independent constraint extraction from them. Copy borrowed systems, mutate or destroy the owner, and check the copied systems independently. Exercise empty, redundant and inconsistent inputs.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, Definitions 2–3, Propositions 1–3 and Double Description (PDF page indices 7–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_conversion.cc; src/Grid_simplify.cc; tests/Grid/gridboundedconversion1.cc; tests/exactboundedworking1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.
-
4. Best octagonal enclosure of rational grids UID: PPL-SPEC-001165 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000061 Octagonal expressiveness (Specifies)
- PPL-LLR-000062 Conservative octagonal constants (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: 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.
RATIONALE: 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.
INTERFACE: Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:
explicit Octagonal_Shape(const Grid& grid, Complexity_Class complexity=ANY_COMPLEXITY);
VERIFICATION_CRITERIA: 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.
BIBLIOGRAPHY: 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).
SOURCE: 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.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001271 Copying bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001272 Recycling bulk insertion of rational-grid generators (Specified by)
- PPL-SPEC-001273 Copying insertion of a single rational-grid generator (Specified by)
- PPL-SPEC-001274 Single congruence addition and refinement (Specified by)
- PPL-SPEC-001275 Copying congruence-system addition and refinement (Specified by)
- PPL-SPEC-001276 Recycling congruence-system addition (Specified by)
- PPL-SPEC-001281 Exact rational-grid intersection (Specified by)
- PPL-SPEC-001282 Least containing rational grid (Specified by)
- PPL-SPEC-001283 Conditional exact rational-grid union (Specified by)
Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, for dimension-compatible grids, a successful intersection shall denote their exact set intersection and a successful grid hull shall denote the least rational grid containing both inputs.
The least containing grid can include points absent from the union, so the hull must not be interpreted as exact disjunction.
Verification covers grid intersection and hull operations. Related obligations: 🔗 8. Abstract set-difference semantics.
Compute simple periodic intersections and containing grids by exact arithmetic on residues and rational generators. Include incompatible periods, shifted grids, continuous directions and empty operands.
doc/definitions.dox: Rational Grids; Operations on Rational Grids. src/Grid_defs.hh: intersection and upper-bound contracts.
-
Incoming link from: 2. Recycling bulk insertion of rational-grid generators1
1. Copying bulk insertion of rational-grid generators UID: PPL-SPEC-001271 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(input) shall add the input points, parameters and lines to a generator description of the receiver, with the meaning in 🔗 1. Rational-grid values, coefficient profile and valid use. For nonempty G = p + H, input points ri, parameters qj and lines lk shall produce p + H + ∑iZ(ri − p) + ∑jZqj + ∑kRlk. In particular, adding points shall form a grid hull, not a finite union.
A system with no stored rows shall be a no-op. If the receiver is empty and the nonempty input has no point, the operation shall throw std::invalid_argument. Otherwise an empty receiver shall acquire exactly the grid generated by the input. A zero-dimensional point shall turn zero-dimensional empty into universe; zero-dimensional universe shall be preserved. Zero parameters omitted by the generator-system contract shall not constitute stored rows.
The input's value, dimension and storage shall be preserved, including when an exception propagates. A current generator-system view borrowed from the receiver may be supplied: its pre-call generators shall be used as the input, and normal receiver-view invalidation shall apply during mutation.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The copying interface must preserve its source while combining integer displacements and real line directions, including when cached congruences are inconsistent.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(const Grid_Generator_System& input);
VERIFICATION_CRITERIA: Use independent rational coset calculations for points, parameters and lines under invertible coordinate transformations. Cross empty, singleton, periodic and continuous receivers with both descriptions and cache histories. Exercise pending contradictory rows, lower-dimensional inputs, dense/sparse storage, reversed/redundant rows, borrowed self views, unchanged source records, dimension errors, zero dimensions and allocation failures.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
2. Recycling bulk insertion of rational-grid generators UID: PPL-SPEC-001272 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generators(std::move(input)) and add_recycled_grid_generators(input) shall produce the same mathematical receiver value, ambient dimension and ordinary input-rejection outcomes as 🔗 1. Copying bulk insertion of rational-grid generators. These operations may transfer ownership from the supplied system. The input shall be a separate writable object; it shall not alias receiver-owned storage. After successful or exceptional return the input shall retain ownership sufficient for destruction. Its rows, dimension, storage and suitability for subsequent queries shall not be assumed.
A receiver discovered empty while converting its congruences shall use the same insertion rules as an already marked empty receiver. Nonempty input without a supporting point shall therefore be rejected; input with a point shall establish the generated grid. Conversion shall not leave subsequent normalization dependent on a nonexistent old supporting point.
The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Recycling changes ownership permissions, while the generated set and empty-grid point requirement remain the same as for copying insertion.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generators(Grid_Generator_System&& input); void add_recycled_grid_generators(Grid_Generator_System& input);
VERIFICATION_CRITERIA: Check recycling and copying separately against the same independent coset oracle. Include empty inputs, lower-dimensional rows, zero dimensions, systems with no points, latent contradictions, mixed point/parameter/line systems, every observed allocation-failure frontier and destruction of both surviving objects.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc; tests/gridconsuminginsertions1.cc.
-
3. Copying insertion of a single rational-grid generator UID: PPL-SPEC-001273 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000042 Equivalent grid representations (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000303 Preservation by representation-only changes (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_grid_generator(g) shall add the pre-call generator value to a generator description of the receiver, preserving its ambient dimension. For nonempty G = p + H, adding a point r shall produce p + H + Z(r − p); adding a parameter q shall produce p + H + Zq; adding a line l shall produce p + H + Rl. Insertion of an already supplied generator shall be mathematically idempotent. A zero parameter shall preserve a nonempty grid.
An empty receiver shall accept a point and become that singleton. A parameter or line supplied to empty shall throw std::invalid_argument, including a zero parameter. Previously undetected inconsistency shall have the same meaning as already marked empty. In zero dimensions a point shall establish universe; a parameter shall preserve universe and be rejected by empty.
Missing coordinates shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including an empty receiver or a zero parameter. Input type and value shall be captured safely when the argument is borrowed from the receiver's generator view. Receiver mutation may invalidate that view according to 🔗 10. Borrowed congruence and generator views of grid values; the external input case shall preserve its source. The result shall not depend on storage, redundant rows or cache history.
The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. External input descriptors shall retain their value.
RATIONALE: Points, integer parameters and real lines extend a grid in different ways. The copy-taking interface must not inspect a borrowed argument after receiver storage growth invalidates it.
INTERFACE: Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.
void add_grid_generator(const Grid_Generator& g);
VERIFICATION_CRITERIA: Use independent rational coset calculations for each generator kind. Check empty and latent-empty receivers, zero dimensions and parameters, lower or excess declared dimension, fractional points, storage and cache histories. Insert borrowed points, parameters and lines across storage growth and compare with their pre-call grid. Exercise external-input preservation and every observed allocation-failure frontier, checking surviving ownership.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).
SOURCE: src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridsingleinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.
-
Incoming link from: 2. Copying congruence-system addition and refinement1
1. Single congruence addition and refinement UID: PPL-SPEC-001274 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruence(cg) and refine_with_congruence(cg) shall replace the receiver G by G∩{x ∣ cg(x)}. Equalities and proper congruences shall have their meanings in 🔗 1. Rational-grid values, coefficient profile and valid use. Tautologies shall preserve the grid and contradictions shall produce empty. Lower-dimensional rows shall be zero extended; excess declared row dimension shall throw std::invalid_argument before mutation, including for an empty receiver. The external row value shall be preserved.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Adding a congruence is an exact meet, including modular inconsistency that is detected only when descriptions are normalized.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruence(const Congruence& cg); void refine_with_congruence(const Congruence& cg);
VERIFICATION_CRITERIA: Cross equality, proper, tautological and contradictory rows with empty, singleton, periodic and continuous grids, both storage choices, pending contradictions and both cached descriptions. Check lower/excess dimensions and source preservation.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruence1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
Incoming link from: 3. Recycling congruence-system addition1
2. Copying congruence-system addition and refinement UID: PPL-SPEC-001275 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruences(cgs) and refine_with_congruences(cgs) shall intersect the receiver with the conjunction of all input rows, exactly as repeated 🔗 1. Single congruence addition and refinement. An empty system shall preserve the grid. An independently supplied input shall retain its value, declared dimension and storage, including on exceptional return. The receiver's current congruence view may be supplied; its entry value shall be used before invalidation. Excess declared input dimension shall throw std::invalid_argument before mutation, even for no rows or an empty receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Copying a conjunction must not depend on row order, redundancy or whether the source is a receiver-owned current view.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruences(const Congruence_System& cgs); void refine_with_congruences(const Congruence_System& cgs);
VERIFICATION_CRITERIA: Compare bulk and single-row exact meets with independent cosets. Include borrowed self systems, unused declared dimensions, empty systems, contradictions and source records.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Recycling congruence-system addition UID: PPL-SPEC-001276 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000421 Constraint and congruence refinement (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: add_congruences(std::move(cgs)) and add_recycled_congruences(cgs) shall produce the same mathematical grid and dimension-rejection behavior as 🔗 2. Copying congruence-system addition and refinement. The source shall be a separate writable system without receiver-owned storage. Its storage may be transferred; after successful or exceptional return it shall retain ownership sufficient for destruction, without a guarantee about its rows or suitability for queries.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Recycling changes source ownership permissions without changing conjunction semantics.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void add_congruences(Congruence_System&& cgs); void add_recycled_congruences(Congruence_System& cgs);
VERIFICATION_CRITERIA: Check copied and recycled systems against the same independent intersections, including empty, contradictory, lower-dimensional and excess-dimensional systems. Exercise allocation failures and destruction of both objects.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc; tests/gridconsuminginsertions1.cc.
-
1. Exact rational-grid intersection UID: PPL-SPEC-001281 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: intersection_assign(y) shall replace X by X∩Y exactly. Empty shall be absorbing, universe neutral and self intersection idempotent. The operand shall retain its mathematical value. Unequal ambient dimensions shall throw std::invalid_argument before receiver mutation, including empty operands.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Congruence conjunction computes the meet of rational grids.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void intersection_assign(const Grid& y);
VERIFICATION_CRITERIA: Use rational CRT intersections and invertible coordinate transformations, including inconsistent offsets, lines, points, self operands, cache histories and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/intersection1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
2. Least containing rational grid UID: PPL-SPEC-001282 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: upper_bound_assign(y) shall replace X by the least rational grid containing X∪Y. Empty shall be neutral and self hull idempotent. For nonempty X = p + HX and Y = q + HY, the result shall be p + HX + HY + Z(q − p). It need not equal the finite union. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
A self join shall preserve the stored descriptions. If the operands have the same ordered generator rows in current generator systems or the same ordered congruence rows in current congruence systems, the join shall keep the existing caches without appending rows or materializing another system.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Joining supporting points adds an integer displacement rather than a real line.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void upper_bound_assign(const Grid& y);
VERIFICATION_CRITERIA: Compute hulls from rational displacement groups and independent generators, including fractional phases, redundant descriptions, self hull, empty and dimension errors. Check stored descriptions before and after self joins and joins with copies without first forcing a normalization.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
3. Conditional exact rational-grid union UID: PPL-SPEC-001283 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000043 Grid intersection and grid hull (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: upper_bound_assign_if_exact(y) shall return true exactly when X∪Y is a rational grid. On true it shall assign that exact union. On false it shall preserve the receiver's mathematical value; its caches may change. Empty and contained operands shall succeed. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: A hull is an exact union for containment or a compatible two-coset decomposition, but arbitrary unions require disjunctions.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
bool upper_bound_assign_if_exact(const Grid& y);
VERIFICATION_CRITERIA: Check containment, adjacent index-two cosets, incompatible direction groups, continuous/point cases, false-result preservation, self operands and dimensions against independent union criteria.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001287 Exact rational affine image (Specified by)
- PPL-SPEC-001288 Exact rational affine preimage (Specified by)
- PPL-SPEC-001289 Generalized variable affine image (Specified by)
- PPL-SPEC-001290 Generalized variable affine preimage (Specified by)
- PPL-SPEC-001291 Generalized expression affine image (Specified by)
- PPL-SPEC-001292 Generalized expression affine preimage (Specified by)
Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, for a valid deterministic rational affine transformation, successful grid image and inverse-image operations shall denote the exact image and exact inverse image of the input grid under that transformation.
Affine transformations must preserve the appropriate combination of equalities, periods and continuous directions.
Verification covers grid affine-image and inverse-image operations, retaining this exactness requirement. Related obligations: 🔗 6. Sound affine forward and backward transfers.
Compute images and preimages independently from rational congruences and generators. Include rational scaling, translations, constant assignments, noninvertible maps and empty grids.
BagnaraDHMZ07 | whole work (background)
doc/definitions.dox: Affine Images and Preimages for Grids. src/Grid_defs.hh: affine image and preimage contracts.
-
1. Exact rational affine image UID: PPL-SPEC-001287 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: affine_image(var, expr, denominator) shall assign the exact image under x’v = e(x) ⁄ d, with all other coordinates unchanged. denominator defaults to one. The entry denominator value shall be used even when borrowed from a receiver-owned congruence or generator. External expression and scalar values shall be preserved. Zero denominator, an invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.
Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: An affine transformation maps supporting points, integer parameters and real directions exactly; entry scalar capture prevents descriptor invalidation from changing the transformation.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void affine_image(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Use independent rational generator transformations for invertible and singular maps, negative denominators, all cache histories, borrowed scalar owners, zero values and dimension rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affineimage1.cc; tests/Grid/affineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
2. Exact rational affine preimage UID: PPL-SPEC-001288 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: affine_preimage(var, expr, denominator) shall assign exactly the set of x whose image under x’v = e(x) ⁄ d, with other coordinates unchanged, belongs to the entry receiver. denominator defaults to one. It shall use the entry denominator value even when borrowed from receiver-owned descriptions, and preserve external inputs. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.
Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Substitution in congruences computes inverse images even when the transformation is singular.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void affine_preimage(Variable var, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one());
VERIFICATION_CRITERIA: Check independently substituted congruences, invertible/singular maps, constants, negative denominators, fractional phases, borrowed scalars and invalid arguments under every cache history.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affinepreimage1.cc; tests/Grid/affinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
3. Generalized variable affine image UID: PPL-SPEC-001289 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For EQUAL, generalized_affine_image(var, relsym, expr, denominator, modulus) shall assign the exact relational image under x’v = e(x) ⁄ d + mk, k ∈ Z, with other coordinates unchanged. Zero modulus shall mean ordinary affine image; either sign of a nonzero modulus shall denote the same period. Defaults are denominator one and modulus zero. Borrowed scalars shall use their entry values. For an ordered inequality and zero modulus, it shall conservatively cylindrify the target. NOT_EQUAL and ordered relations with nonzero modulus are unsupported and shall throw std::invalid_argument before mutation, including on empty receivers. Zero denominator and dimension errors shall likewise be rejected before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: An integer target period represents modular nondeterminism; ignoring an ordered bound still gives a sound coarse grid abstraction.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_image(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one(), Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Use independent rational image generators plus the target period, signed and zero moduli, singular maps, borrowed denominators/moduli, inequality cylindrification and rejection controls.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage1.cc; tests/Grid/generalizedaffineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
4. Generalized variable affine preimage UID: PPL-SPEC-001290 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generalized_affine_preimage(var, relsym, expr, denominator, modulus) shall assign the exact inverse relational image for the EQUAL relation in [LINK: PPL-SPEC-001289]. Defaults, modulus sign, borrowed entry values and rejection scope shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify the target coordinate of the entry receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Inverse modular substitution must retain both denominator and modulus until the induced inverse period has been formed.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_preimage(Variable var, Relation_Symbol relsym, const Linear_Expression& expr, Coefficient_traits::const_reference denominator = Coefficient_one(), Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Check rational range and congruence substitution independently for unit, negative, nonunit and zero target coefficients, signed moduli, singular preimages, borrowed scalar owners and relation/dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage1.cc; tests/Grid/generalizedaffinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
5. Generalized expression affine image UID: PPL-SPEC-001291 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: For EQUAL, generalized_affine_image(lhs, relsym, rhs, modulus) shall assign the exact image of the relation lhs(x’) − rhs(x) ∈ mZ, where the coordinates with nonzero coefficients in lhs may change simultaneously and all other coordinates are unchanged. Zero modulus means equality and is the default; modulus sign is immaterial. Constant lhs shall constrain the old state without assigning a coordinate. The modulus shall use its entry value even if borrowed. Ordered inequalities with zero modulus shall conservatively cylindrify the assigned coordinates. NOT_EQUAL or an ordered relation with nonzero modulus shall throw std::invalid_argument before mutation, including on empty receivers. Excess expression dimensions shall likewise be rejected before mutation.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The expression overload is a simultaneous relation, so it must preserve the pre-update meaning of the right-hand side.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_image(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs, Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Check independent projected generator/range calculations for overlapping and disjoint expression supports, constant sides, signed/zero moduli, borrowed moduli, inequality cylindrification and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
6. Generalized expression affine preimage UID: PPL-SPEC-001292 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000044 Rational affine transformations of grids (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000422 Sound affine forward and backward transfers (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generalized_affine_preimage(lhs, relsym, rhs, modulus) shall assign the exact inverse relational image of EQUAL as defined in [LINK: PPL-SPEC-001291]. Assigned coordinates are those occurring in lhs; all others are shared between old and new states. Default modulus, sign, borrowed entry-value and rejection rules shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify those coordinates of the entry receiver.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The inverse relation constrains the old right-hand-side value by the possible new left-hand-side values.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generalized_affine_preimage(const Linear_Expression& lhs, Relation_Symbol relsym, const Linear_Expression& rhs, Coefficient_traits::const_reference modulus = Coefficient_zero());
VERIFICATION_CRITERIA: Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.
Use independent rational range and congruence calculations for both expression supports, constant cases, signed periods, borrowed moduli, inequalities and dimension/relation rejection.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.
SOURCE: tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.
-
2. Primitive numerical abstractions UID: PPL-HLR-000002 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Child): - PPL-LLR-000051 Bounded-difference expressiveness (Refined by)
- PPL-LLR-000052 Conservative bounded-difference constants (Refined by)
- PPL-LLR-000053 Bounded-difference intersection and upper bounds (Refined by)
- PPL-LLR-000054 Bounded-difference widening guarantees (Refined by)
- PPL-LLR-000417 Coordinate removal and existential projection (Refined by)
- PPL-LLR-000418 Distinguished coordinate extensions (Refined by)
- PPL-LLR-000419 Coordinate remapping semantics (Refined by)
- PPL-LLR-000420 Sound conversion between numerical abstractions (Refined by)
- PPL-LLR-000421 Constraint and congruence refinement (Refined by)
- PPL-LLR-000422 Sound affine forward and backward transfers (Refined by)
- PPL-LLR-000423 Domain-specific time-elapse abstraction (Refined by)
- PPL-LLR-000424 Abstract set-difference semantics (Refined by)
- PPL-LLR-000425 Topological closure and closure approximation (Refined by)
- PPL-LLR-000426 Context-preserving simplification (Refined by)
- PPL-LLR-000427 Preservation of integer points in integer restriction (Refined by)
- PPL-LLR-000428 Modeled bounded-integer arithmetic and wrapping (Refined by)
- PPL-LLR-000431 Mathematical query capabilities and logical outcomes (Refined by)
- PPL-LLR-000432 Directional bounds, extrema and attainment (Refined by)
- PPL-LLR-000443 Dimension-preserving coordinate forgetting (Refined by)
- PPL-LLR-000444 Concatenation, coordinate expansion and folding (Refined by)
- PPL-LLR-000445 Narrowing and descending precision recovery (Refined by)
- PPL-LLR-000446 Reloadable textual representations (Refined by)
- PPL-LLR-000041 Rational-grid meaning (Refined by)
- PPL-LLR-000042 Equivalent grid representations (Refined by)
- PPL-LLR-000043 Grid intersection and grid hull (Refined by)
- PPL-LLR-000044 Rational affine transformations of grids (Refined by)
- PPL-LLR-000433 Rational-grid widening facilities (Refined by)
- PPL-LLR-000021 Interval boundary membership (Refined by)
- PPL-LLR-000022 Cartesian meaning of boxes (Refined by)
- PPL-LLR-000023 Sound interval arithmetic (Refined by)
- PPL-LLR-000024 Convergence of interval and box widening (Refined by)
- PPL-LLR-000416 Box intersection and least upper bounds (Refined by)
- PPL-LLR-000061 Octagonal expressiveness (Refined by)
- PPL-LLR-000062 Conservative octagonal constants (Refined by)
- PPL-LLR-000063 Octagonal intersection and upper bounds (Refined by)
- PPL-LLR-000064 Preservation of integer points during octagonal refinement (Refined by)
- PPL-LLR-000065 Octagonal widening guarantees (Refined by)
- PPL-LLR-000031 Closed and non-necessarily-closed polyhedra (Refined by)
- PPL-LLR-000032 Equivalent polyhedral representations (Refined by)
- PPL-LLR-000033 Polyhedral intersection and hull (Refined by)
- PPL-LLR-000034 Rational affine transformations of polyhedra (Refined by)
- PPL-LLR-000035 Polyhedral widening guarantees (Refined by)
- PPL-LLR-000447 Exact polyhedral Minkowski addition (Refined by)
- PPL-LLR-000448 HPW01 closed-polyhedron extrapolation (Refined by)
- PPL-LLR-000449 Bounded Chvatal half-pair refinement (Refined by)
- PPL-LLR-000450 HH95 closed-polyhedron edge extrapolation (Refined by)
- PPL-LLR-000453 Selected-coordinate polyhedral integer witnesses (Refined by)
- PPL-LLR-000454 Constraint-description polyhedral envelope (Refined by)
- PPL-LLR-000455 Tight enclosing bounds in selected polyhedral directions (Refined by)
STATEMENT: PPL shall provide intervals and boxes, closed and not necessarily closed convex polyhedra, grids, bounded difference shapes, and octagonal shapes, together with operations whose semantic effects and precision guarantees are defined for each abstraction.
RATIONALE: Clients need alternative numerical representations with different expressiveness and computation costs.
VERIFICATION_CRITERIA: Review that each abstraction has a mathematical interpretation and defined operations; check representative exact results and conservative approximations, including empty and zero-dimensional cases.
BIBLIOGRAPHY: BagnaraHZ08SCP | Whole work (background on the library's numerical abstractions and design).
SOURCE: doc/definitions.dox: Semantic_Geometric_Descriptors, Intervals_and_Boxes, Weakly_Relational_Shapes, convex_polys, sect_rational_grids.
- PPL-SPEC-001307 Congruence widening and finite delay (Specified by)
- PPL-SPEC-001308 Generator widening and finite delay (Specified by)
- PPL-SPEC-001309 Representation-selected default grid widening (Specified by)
- PPL-SPEC-001310 Congruence-limited extrapolations (Specified by)
- PPL-SPEC-001311 Grid convergence certificates (Specified by)
- PPL-SPEC-001463 Product component widening and convergence scope (Specified by)
PPL shall provide widening facilities for rational grids. Assuming all intermediate calculations satisfy the selected arithmetic profile's documented preconditions, a supported widening shall contain its input grids and shall stabilize its prescribed iteration on ascending sequences satisfying the stated inclusion and finite-delay conditions.
Grid joins alone do not ensure finite stabilization of ascending iterations. Congruence- and generator-based widening need the same stated soundness and convergence obligations.
The cited proceedings article provides background on the grid construction.
Verification covers grid widening operations, representation choices and inclusion or delay preconditions. Related obligations: 🔗 1. Rational-grid meaning, 🔗 2. Equivalent grid representations, 🔗 3. Grid intersection and grid hull, 🔗 6. Compound extrapolation and finite convergence.
Review the convergence argument for each supported grid widening and check containment during independently described ascending iterations. Include changing periods, affine equalities, empty and universe grids, alternate representations and exhaustion of a finite delay budget.
BagnaraDHMZ07 | Whole work (background on grid operations).
doc/definitions.dox: Grid Widening Operators; Grid Widening with Tokens. src/Grid_defs.hh: congruence, generator and default grid widening. src/Grid_widenings.cc: supported grid widening algorithms.
-
1. Congruence widening and finite delay UID: PPL-SPEC-001307 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: congruence_widening_assign(y,tp) requires Y ⊆ X and shall return a grid containing X, preserving dimension and the operand value. Empty previous, empty current and zero dimensions shall preserve the receiver. After normalization, if the current grid has fewer independent equalities than the previous one, it shall retain the current grid. Otherwise it shall retain all current equalities and the current proper congruences whose corresponding normalized pivot coefficients agree with the previous description, discarding other proper rows. A sequence with fixed coordinate order and finite delay shall stabilize.
With tp null or pointing to zero, the computed widening shall be assigned. With a positive token count, the entry grid shall be retained and one token consumed exactly when the computed widening strictly enlarges it. The token object shall be separate writable storage. Unequal dimensions shall throw std::invalid_argument before mutation. Failure guarantees shall not imply rollback of tokens.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Pivot-stable normalized congruences give a finite descending certificate while retaining modular information. The published paper defines both widenings; the technical report supplies the full congruence-widening proof and certificate discussion.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void congruence_widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check normalized-pivot selection, strict chains, equality-dimension growth, fixed points, zero/positive tokens, empty and zero-dimensional cases, source preservation and dimension errors.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
2. Generator widening and finite delay UID: PPL-SPEC-001308 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: generator_widening_assign(y,tp) shall obey the inclusion, dimensions, empty cases and finite-token rules in 🔗 1. Congruence widening and finite delay. It shall normalize generator descriptions. If the current grid has more generators or real lines than the previous grid, it shall retain the current grid. Otherwise it shall retain the supporting point and real lines, retain parameters with unchanged corresponding normalized pivots, and replace changed parameter directions by real lines. With fixed coordinate order and finite delay, increasing iterations shall stabilize.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Promoting changing discrete directions to real directions forces finite progress while preserving the current grid.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void generator_widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check independent parameter/line promotion cases and ascending lattice chains, point phases, tokens, generator/congruence caches, zero dimensions and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening2.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
3. Representation-selected default grid widening UID: PPL-SPEC-001309 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: widening_assign(y,tp) shall select congruence widening when both congruence descriptions are current, otherwise generator widening when both generator descriptions are current. For mixed histories it may choose either strategy and normalize the required descriptions. It shall obey the common inclusion, dimension, empty and finite-token rules in 🔗 1. Congruence widening and finite delay. The selected strategy may affect precision; identical output across different cache histories is not required. With fixed coordinate order and finite delay, increasing iterations shall stabilize, including when available descriptions change the selected strategy between calls.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: The default strategy exploits available descriptions without promising identical precision from the two distinct widenings.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void widening_assign(const Grid& y, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Check each cache-selection route against the corresponding named widening and check containment, tokens, fixed points and convergence on ascending chains.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
4. Congruence-limited extrapolations UID: PPL-SPEC-001310 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000430 Compound extrapolation and finite convergence (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: limited_congruence_extrapolation_assign, limited_generator_extrapolation_assign and limited_extrapolation_assign shall require Y ⊆ X and apply their corresponding named or default widening, then intersect with the supplied limiter congruences satisfied by every entry point of X. Valid equalities already retained by widening need not be inserted redundantly. With an empty limiter they shall have exactly the corresponding widening's mathematical result and token effect. Finite-token behavior shall follow 🔗 1. Congruence widening and finite delay. The result shall contain the entry receiver, preserve ambient dimension and preserve external limiter/operand values. Unequal grid dimensions or excess limiter dimension shall throw std::invalid_argument before mutation. Convergence requires the usual widening iteration and a fixed finite limiter set; changing limiters provide only extrapolation guarantees.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Limiting restores established entry invariants, and an empty limiter must not silently switch the named widening strategy. The report gives the additional extrapolation details.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.
void limited_congruence_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr); void limited_generator_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr); void limited_extrapolation_assign(const Grid& y, const Congruence_System& cgs, unsigned* tp = nullptr);
VERIFICATION_CRITERIA: Compare all three variants with their corresponding widenings for empty, satisfied, unsatisfied and mixed limiter rows; check generator-only caches, tokens, ascending chains, empty grids and invalid dimensions.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/limitedextrapolation1.cc; tests/Grid/limitedextrapolation2.cc; tests/Grid/limitedextrapolation3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
5. Grid convergence certificates UID: PPL-SPEC-001311 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000041 Rational-grid meaning (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000430 Compound extrapolation and finite convergence (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: Grid_Certificate shall represent the lexicographic pair (e, p): the number of independent equalities and the number of proper congruence rows in a minimal description of a nonempty grid. In positive ambient dimension, p includes the normalization congruence and is one plus the number of independent discrete parameter directions. The grid-taking constructor and grid-taking comparison/stabilization queries require a nonempty grid. Default construction shall represent the zero-dimensional-universe certificate (0, 0); copying and assignment shall preserve the pair.
compare shall return minus one, zero or plus one for a smaller, equal or greater pair. is_stabilizing(gr) shall return exactly whether this pair is strictly greater than gr's pair. Compare shall order greater pairs first. OK() shall return true for certificates constructed through this interface. Computing a certificate may normalize grid caches but shall preserve its mathematical value. The two counts are the finite progress measure for compatible Grid widenings; they do not encode the grid's phase or coefficients.
The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.
RATIONALE: Finite structural counts support powerset convergence without storing an entire represented grid. The report supplies the certificate construction.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The compiler-supplied copy assignment preserves the certificate counts.
class Grid_Certificate { public: Grid_Certificate(); Grid_Certificate(const Grid& gr); Grid_Certificate(const Grid_Certificate& y); ~Grid_Certificate(); int compare(const Grid_Certificate& y) const; int compare(const Grid& gr) const; bool is_stabilizing(const Grid& gr) const; struct Compare { bool operator()(const Grid_Certificate& x, const Grid_Certificate& y) const; }; bool OK() const; };
VERIFICATION_CRITERIA: Compute equality and parameter ranks independently for empty-excluded product/coupled grids and every cache route. Check defaults, copies, assignment, comparison signs, equal-count distinct grids, reverse ordering and stabilization equivalence.
BIBLIOGRAPHY: BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).
SOURCE: src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/certificate1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.
-
1. Product component widening and convergence scope UID: PPL-SPEC-001463 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): - PPL-LLR-000074 Intersection meaning of product domains (Specifies)
- PPL-LLR-000133 Failure and resource safety (Specifies)
- PPL-LLR-000301 Meaning of successful exact and approximate results (Specifies)
- PPL-LLR-000311 Public C++ access to supported facilities (Specifies)
- PPL-LLR-000430 Compound extrapolation and finite convergence (Specifies)
- PPL-LLR-000433 Rational-grid widening facilities (Specifies)
- PPL-LLR-000442 Explicit numerical operation contracts (Specifies)
STATEMENT: The set represented by y shall be contained in the set represented by the receiver. Default widening shall reduce both operands and mark the receiver's reduction unknown. If a reduced receiver component does not contain the corresponding reduced component of y, replace that receiver component with their upper bound before component widening. Both default component widenings shall receive the same optional token budget. The resulting intersection shall contain both input products.
widening_assign_with(y, widening1, widening2, tokens) shall perform the same input reductions and receiver reduction-state invalidation. The reduced component pairs shall already meet the selected preconditions. It shall invoke widening1 on the first pair of components before invoking widening2 on the second pair. Both shall receive the same optional token pointer. Callables shall be forwarded with their supplied value categories, without copying or storing them. They shall meet the selected component widening's preconditions and preserve its ambient dimension and upper-bound guarantees.
If a component callable throws, the exception shall propagate, subsequent callables shall not be invoked, and earlier component and token effects shall remain. The receiver shall be marked for lazy reduction. No whole-operation rollback shall be promised. The existing widening_assign member shall remain unambiguous when taking its address.
For direct and smash policies, the component convergence guarantees shall be preserved under their iteration and finite-delay conditions. For information- sharing policies, this operation shall be treated as componentwise extrapolation unless a separate combined convergence proof is supplied: reduction between iterations can restore discarded bounds. To use component convergence with sharing operations, a separate direct-product widening history shall remain free of sharing reduction, with reduced copies used for information exchange.
The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.
RATIONALE: Restoring a discarded constraint through another component can prevent finite stabilization. Caller-selected component widenings expose the component domains' precision choices without changing the default operation or storing additional state in the product.
INTERFACE: Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.
void widening_assign(const Partially_Reduced_Product&, unsigned* tokens=nullptr); template <typename Widening1, typename Widening2> void widening_assign_with(const Partially_Reduced_Product&, Widening1&&, Widening2&&, unsigned* tokens=nullptr);
VERIFICATION_CRITERIA: Check upper-bound inclusion, shared token changes, direct/smash stabilization, and default widening after a join that leaves incomparable reduced components; review history separation. Compare selected component algorithms with independent component calls using the same token budget. Check lvalue and rvalue noncopyable callables, component invocation order, exceptions in either callable, deferred reduction after exceptions, default member-address compatibility and self-aliasing.
SOURCE: src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/widening1.cc; tests/Partially_Reduced_Product/selectedwidenings1.cc.