Parma Polyhedra Library requirements
C++ rational-grid convergence
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): 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.

PPL-SPEC-001308
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): 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.

PPL-SPEC-001309
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): 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.

PPL-SPEC-001310
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): 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.

PPL-SPEC-001311
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): 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.