C++ rational-grid coordinates
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
Parents:
|
|
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. |
Free extension preserves every old-coordinate relation without constraining appended coordinates. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check zero/positive additions on empty, zero-dimensional, point, periodic and continuous grids, both descriptions and dimension-overflow boundaries. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void add_space_dimensions_and_embed(dimension_type m); |
|
|
SW_SPEC
|
2 |
|
|
Parents:
|
|
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. |
The historical project-named interface adds zero coordinates rather than free ones. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check explicit zero-coordinate equations and dimension growth from zero dimensions, empty/periodic/continuous inputs, zero additions and overflow rejection. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void add_space_dimensions_and_project(dimension_type m); |
|
|
SW_SPEC
|
3 |
|
|
Parents:
|
|
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. |
Concatenation combines independent state vectors and must snapshot self input before descriptor growth. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check independent factor membership in both orders, self concatenation, zero-dimensional identities, empty operands, description histories and dimension-sum rejection. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void concatenate_assign(const Grid& y); |
|
|
SW_SPEC
|
4 |
|
|
Parents:
|
|
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. |
Existential elimination must preserve the lattice information among remaining coordinates. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check independent projected generator systems for coupled rational lattices, arbitrary selected subsets, all/none removal, empty inputs and invalid indices. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void remove_space_dimensions(const Variables_Set& vars); |
|
|
SW_SPEC
|
5 |
|
|
Parents:
|
|
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. |
Prefix removal is the ordered special case of existential coordinate projection. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void remove_higher_space_dimensions(dimension_type new_dimension); |
|
|
SW_SPEC
|
6 |
|
|
Parents:
|
|
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. |
Dense injective remapping defines a valid coordinate permutation after projection, without inventing unused output coordinates. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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; |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. template <typename Partial_Function> void map_space_dimensions(const Partial_Function& pfunc); |
|
|
SW_SPEC
|
7 |
|
|
Parents:
|
|
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. |
Conditional replication preserves correlations with the common context while allowing the separate values of a nondeterministic coordinate. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Compare copied congruence equations with independent conditional models; distinguish periodic replicas from equal copies. Include empty, zero replicas, invalid source and dimension overflow. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void expand_space_dimension(Variable var, dimension_type m); |
|
|
SW_SPEC
|
8 |
|
|
Parents:
|
|
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. |
Folding abstracts a choice among source coordinates, rather than adding or identifying all their values. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid. void fold_space_dimensions(const Variables_Set& vars, Variable dest); |