C++ rational-grid affine transfers
|
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:
|
|
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. |
An affine transformation maps supporting points, integer parameters and real directions exactly; entry scalar capture prevents descriptor invalidation from changing the transformation. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Use independent rational generator transformations for invertible and singular maps, negative denominators, all cache histories, borrowed scalar owners, zero values and dimension rejection. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
2 |
|
|
Parents:
|
|
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. |
Substitution in congruences computes inverse images even when the transformation is singular. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check independently substituted congruences, invertible/singular maps, constants, negative denominators, fractional phases, borrowed scalars and invalid arguments under every cache history. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
3 |
|
|
Parents:
|
|
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. |
An integer target period represents modular nondeterminism; ignoring an ordered bound still gives a sound coarse grid abstraction. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
4 |
|
|
Parents:
|
|
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. |
Inverse modular substitution must retain both denominator and modulus until the induced inverse period has been formed. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
5 |
|
|
Parents:
|
|
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. |
The expression overload is a simultaneous relation, so it must preserve the pre-update meaning of the right-hand side. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
6 |
|
|
Parents:
|
|
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. |
The inverse relation constrains the old right-hand-side value by the possible new left-hand-side values. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
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. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
7 |
|
|
Parents:
|
Incoming link from:
8. Bounded affine preimage abstraction
1 |
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. |
The Grid interface deliberately uses a coarse forgetting operation for bounded assignments. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Check equality with independently projected grids for equal, reversed, constant and variable bounds, either denominator sign, empty inputs and each invalid bound/target/denominator. |
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. |
|
|
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()); |
|
|
SW_SPEC
|
8 |
|
|
Parents:
|
|
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. |
Forgetting the updated coordinate is sound for the bounded preimage even when sharper relational information could be computed. |
BagnaraDHMZ07 | Section 3, grid definitions, representations and operations. |
|
|
|
|
Compare with independent projection and free-coordinate restoration for equal/reversed bounds, singular cases, empty and invalid arguments. |
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. |
|
|
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()); |