C++ affine-form abstract-store operations
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
|
For a well-formed affine store, discard_occurrences(store, var) shall erase exactly those bindings whose linear form has a coefficient for var unequal to the singleton zero interval. It shall preserve every other key and associated value. An absent coordinate beyond a form's stored dimension shall have zero coefficient as specified by 🔗 6. Dimensions and borrowed coefficient access. An uncertain coefficient containing zero and other values shall count as a dependency. The operation shall accept empty stores and shall not create a binding. Store keys and referenced coordinates shall be valid dimension indices; each form shall meet the interval-coefficient and lifetime prerequisites of 🔗 1. Interval-linear-form meaning and numerical prerequisites. No PPL initialization or native floating-point arithmetic shall be required when the selected exact interval operations require neither. Erasing a binding shall invalidate references to that binding; references to retained bindings shall remain valid. |
Invalidating all possibly dependent expressions prevents a changed program variable from leaving a stale symbolic relationship. |
Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based). |
|
|
|
|
Compare retained keys and literal coefficients for no dependency, consecutive dependencies, uncertain intervals, empty stores and coordinates beyond stored dimensions. |
src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc. |
|
|
Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type. template <typename C> void discard_occurrences( std::map<dimension_type, Linear_Form<C>>& store, Variable var); |
||
|
SW_SPEC
|
2 |
|
|
|
affine_form_image(store, var, form) shall first assign a copy of the entry value of form to the key var.id(), inserting or replacing the binding. It shall then perform the dependency invalidation specified by 🔗 1. Dependency invalidation for var across the resulting store. Consequently, a newly assigned form depending on var shall also be discarded. The input may be a form borrowed from the same store, including the target binding; copying shall use its entry value before any removal can destroy that donor. An independent donor shall remain unchanged. Valid keys, interval operations and lifetimes shall meet 🔗 1. Dependency invalidation. Allocation or coefficient-operation exceptions may propagate; no rollback of the entire store shall be promised, but existing owners shall remain safely destructible. After normal return, every retained binding shall be independent of the assigned coordinate. |
Assignment records the new expression and then conservatively removes relationships that cannot remain valid when the coordinate changes. |
Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based). |
|
|
|
|
Check insertion/replacement, independent inputs, same-store borrowed donors that are removed during invalidation, same-target aliasing and self-dependent assignments; compare all remaining mappings to independent entry-value snapshots. |
src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc. |
|
|
Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type. template <typename C> void affine_form_image( std::map<dimension_type, Linear_Form<C>>& store, Variable var, const Linear_Form<C>& form); |
||
|
SW_SPEC
|
3 |
|
|
|
upper_bound_assign(left, right) shall retain exactly the bindings of left whose keys also occur in right and whose associated linear forms are equal according to 🔗 14. Coefficient equality with implicit trailing zeros. Every other left binding shall be erased. No right-only binding shall be inserted. The retained forms and the right operand shall remain unchanged. Explicit trailing zero coefficients shall not cause mathematically equal forms to be discarded. Joining a store with itself shall preserve all bindings. Both stores shall meet 🔗 1. Dependency invalidation and describe consistent coordinate identities. Coefficient comparison shall be supported for their selected interval type. Empty operands shall be admitted; an empty right operand shall remove every left binding. Exceptions from selected coefficient comparisons may propagate without a whole-store rollback promise; surviving owners shall remain safely destructible. |
Only a symbolic relationship established on both alternatives can survive their conservative join. |
Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based). |
|
|
|
|
Compare independent literal mappings for equal and unequal common bindings, missing right keys, right-only keys, explicit zero tails, empty operands and self-aliasing; retain an independent right snapshot. |
src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc. |
|
|
Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type. template <typename C> void upper_bound_assign( std::map<dimension_type, Linear_Form<C>>& left, const std::map<dimension_type, Linear_Form<C>>& right); |