Parma Polyhedra Library requirements
Descriptor comparisons and revised PIP column support

Descriptor comparisons and revised PIP column support

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-001645
PPL-SPEC-001645
Descriptor collection identity and affine comparison

For live valid constraint systems or generator systems, free equality shall compare their retained internal row sequences under 🔗 22. Internal sequence equality and bookkeeping scope: ambient dimension, row count, pending boundary and corresponding row values shall agree. Storage representation, capacity and sorted certificates shall not affect the result. Inequality shall negate equality. These predicates shall preserve their operands. Equality shall not minimize, reorder, remove duplicate rows or decide geometric equivalence of the represented conjunctions or hulls. Row-empty systems shall follow the underlying dimension/boundary rule without an additional topology comparison.

The free compare(x,y) for linear expressions shall forward the zero-extended affine ordering of 🔗 5. Backend equality, comparison and common-variable queries. It shall return -2 or 2 at the first differing homogeneous coefficient, -1 or 1 for a constant-only difference, and zero when all zero-extended coefficients agree. Equal affine values with different declared dimensions may therefore compare as zero. Initialization, coefficient arithmetic, lifetimes and synchronized access shall follow the selected descriptor or expression query.

Stored descriptor sequence identity and zero-extended affine ordering are useful implementation queries with meanings distinct from geometric set equivalence.

APPROVED
GEOMETRIC_DESCRIPTORS
IF_CPP
Test, Analysis, Inspection

Check copied and differently stored collections, differing dimensions, row order/count, duplicate rows and unchanged operands. Compare signed affine vectors, constant-only differences, unequal zero tails and both argument orders against literal expected return codes.

src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; src/Linear_Expression_inlines.hh; tests/descriptorequalityspec1.cc.

CPP
Internal

Names belong to Parma_Polyhedra_Library unless stated otherwise.

bool operator==(const Constraint_System&, const Constraint_System&);
bool operator!=(const Constraint_System&, const Constraint_System&);
bool operator==(const Generator_System&, const Generator_System&);
bool operator!=(const Generator_System&, const Generator_System&);
int compare(const Linear_Expression&, const Linear_Expression&);
SW_SPEC
2
PPL-SPEC-001646
PPL-SPEC-001646
Exact comparison of revised PIP tableau columns

The file-local column_lower helper shall compare two scaled columns of an admitted revised PIP tableau. The equally sized mapping and basis sequences shall enumerate each nonbasic tableau row and each basic variable column once in variable order. Reconstruct column Cj at position k as the matrix entry at mapping[k],j for a nonbasic entry, and as one or zero according as a basic entry maps to j or another column. Compared columns shall be lexicographically positive. Both pivot rows shall be actual rows of that tableau, with strictly positive selected entries pa, pb.

The result shall be true exactly when  − caCja ⁄ pa < lex − cbCjb ⁄ pb, comparing reconstructed components in the stated variable order. The two column indices and pivot rows may coincide; zero and either sign of the costs shall be admitted. No input shall change. Comparisons shall evaluate complete two- and three-factor products exactly without requiring comparison-only products to fit the stored coefficient profile. The normal initialized coefficient/temporary- resource prerequisites shall apply.

Omitting the final reconstructed component shall be permitted when the admitted tableau invariants prove it cannot be the first unequal component. For distinct columns and two nonzero costs, one of their distinct basic unit entries distinguishes them before the final position. With exactly one nonzero cost, its positive pivot entry also appears among the mapped rows, so its basic unit entry and that row cannot both occupy the final position. Two zero costs yield equal vectors. Same-column comparisons shall use the positive-column ratio ordering.

Exact rational column ordering supports pivot selection; its optimized early exits rely on the complete revised-tableau mapping rather than arbitrary unrelated row vectors.

Feautrier88 | Journal background on parametric lexicographic integer programming; the local mapping proof is stated in this contract.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Generate coherent mapped tableaux, retain only lexicographically positive compared columns and positive actual pivots, and compare with independently reconstructed rational full vectors. Exercise reordered mappings, zero/positive/negative costs, same and different columns, equal vectors and late differences. Inspect the proof permitting omission of the final component under the admitted invariants.

src/Exact_Arithmetic.hh; src/PIP_Tree.cc; tests/pipcolumnsspec1.cc.

CPP
Internal

Names belong to Parma_Polyhedra_Library unless stated otherwise.

// File-local helper in src/PIP_Tree.cc, within the PPL namespace:
bool column_lower(const Matrix<PIP_Tree_Node::Row>&,
                  const std::vector<dimension_type>& mapping,
                  const std::vector<bool>& basis,
                  const PIP_Tree_Node::Row& pivot_a, dimension_type ja,
                  const PIP_Tree_Node::Row& pivot_b, dimension_type jb,
                  Coefficient_traits::const_reference ca = -1,
                  Coefficient_traits::const_reference cb = -1);