Parma Polyhedra Library requirements
C++ rational-grid evolution

C++ rational-grid evolution

UID:
VERSION:
CLASSIFICATION:
PREFIX:
Type
Level
MID
UID
REFS
Title
Statement
Rationale
Comment
BIBLIOGRAPHY
STATUS
COMPONENT
APPLICABILITY
VERIFICATION_METHODS
VERIFICATION_CRITERIA
SOURCE
LANGUAGE
VISIBILITY
INTERFACE
SW_SPEC
1
PPL-SPEC-001303
PPL-SPEC-001303
Integer-time-elapse grid abstraction

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.

Integer multiples of supporting points become discrete parameters; replacing integer time with real time would unnecessarily lose modular information.

BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

APPROVED
GRIDS
IF_CPP
Test, Analysis, Inspection

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.

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.

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

void time_elapse_assign(const Grid& y);
SW_SPEC
2
PPL-SPEC-001304
PPL-SPEC-001304
Exact integer-coordinate restriction

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.

Coordinate integrality is itself a conjunction of congruences and is exactly representable by grids.

BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

APPROVED
GRIDS
IF_CPP
Test, Analysis, Inspection

Check independently intersected rational cosets with integer coordinate constraints, fractional phases, all/selected/no coordinates, coupled lattices, empty and invalid indices.

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.

CPP
Public

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);
SW_SPEC
3
PPL-SPEC-001305
PPL-SPEC-001305
Bounded-integer wrapping abstraction

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.

A full-period multiple has one machine residue; representing it as an infinite modular coset loses a representable singleton.

BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

APPROVED
GRIDS
IF_CPP
Test, Analysis, Inspection

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.

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.

CPP
Public

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);
SW_SPEC
4
PPL-SPEC-001306
PPL-SPEC-001306
Grid topological closure

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.

A rational grid is a finite-dimensional sum of a real subspace and a discrete lattice; it has no excluded limit points.

BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

APPROVED
GRIDS
IF_CPP
Test, Analysis, Inspection

Check empty, zero-dimensional, discrete, continuous and mixed grids with both descriptions and redundant generators.

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.

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

void topological_closure_assign();