Parma Polyhedra Library requirements
C++ Advanced constraint projection
PPL-SPEC-001685
1. Two-coordinate full-rank equality projection UID: PPL-SPEC-001685 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

try_binary_equality_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators, at least five ambient dimensions, at most 64 stored rows and a nonempty in-range selection. It shall reject bounded coefficient profiles and selections other than two. Let the selected coordinates in ascending order be x, y.

Scan the logical input rows in order. Select the first equality with a nonzero x coefficient. For this row's selected coefficients a, b, scan subsequent equalities for coefficients c, d with ad − bc ≠ 0, using exact GMP arithmetic. Without such a later row, return false. This opportunistic scan need not find an earlier independent row preceding its selected first pivot.

After this rank test, copy the owned rows and eliminate x with that pivot using 🔗 1. Exact equality-pivot elimination. Choose a remaining equality with nonzero y coefficient, preferring 1 or  − 1, and eliminate y with the same kernel. Such a second pivot shall exist. Compact the two coordinates, retaining the other coordinates' order, and swap in a completed same-topology polyhedron. True shall denote the exact projection 🔗 4. Exact polyhedral coordinate deletion, with no increase in logical row count.

False shall preserve all receiver state and allocate no C++ storage. The determinant preflight may allocate GMP temporary storage. Exceptions shall obey 🔗 1. Polyhedral values, coefficient profile and valid use; rejection preservation shall not impose a stronger exceptional-completion guarantee.

RATIONALE:

A nonzero determinant makes the two equations uniquely determine the two selected coordinates for every retained assignment. Eliminating one coordinate leaves a nonzero coefficient for the other in an independent equation. Positive equality substitution preserves every weak or strict relation and yields the exact existential projection. Each pass removes one pivot, so no pair generation or row growth is needed.

INTERFACE:

Private member of Parma_Polyhedra_Library::Polyhedron.

bool try_binary_equality_projection(const Variables_Set& vars);
VERIFICATION_CRITERIA:

Compare literal and independently materialized generator projections through the public API. Cover both pivot signs, nonunit coefficients, independent and dependent cycles, row order, additional inequalities/equalities, strict boundaries, constants, absent columns and noncontiguous coordinates. Check exact rejection state and zero C++ allocation before copying. Exercise owned-row allocation failures, profile selection, cache histories and reload.

BIBLIOGRAPHY:

Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.

PPL-SPEC-001686
2. Bounded coupled two-coordinate pair projection UID: PPL-SPEC-001686 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

try_binary_pair_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators, at least five ambient dimensions, at most 64 stored rows and a nonempty in-range selection. It shall reject bounded coefficient profiles, selections other than two, and any logical equality row. Let x, y be selected in ascending order.

Preflight shall count positive, negative and zero x coefficients. Reject more than 16 positive/negative pairs or more than 64 predicted owned rows. Predict the signs in the next y column: unchanged zero-x rows retain their signs, and a pair ax > 0, bx < 0 has the sign of  − byxa + ayxb. These calculations shall use exact GMP arithmetic. Tautological combinations may be counted conservatively. Reject more than 16 predicted second-column pairs or 64 predicted owned rows. Both checks shall precede scratch-row copying. False shall preserve every receiver field and allocate no C++ storage; GMP preflight temporaries are permitted.

For each selected coordinate, retain its zero-coefficient rows. For every pair ax + r▹0 and  − bx + s▹0, with a, b > 0 and g = gcd(a, b), emit the positive combination (b ⁄ g)r + (a ⁄ g)s. It shall be strict exactly when either input row is strict. Omit tautologies. The conservative preflight shall bound the actual pair and row counts in both passes. At most 32 pairs shall be generated; each scratch vector shall contain at most 64 logical rows.

Compact the selected coordinates only after their coefficients are zero. True shall replace the receiver with the exact projection 🔗 4. Exact polyhedral coordinate deletion, preserving topology and surviving-coordinate order. Only a completed temporary polyhedron shall be swapped in. Common lifetime, arithmetic and exceptional-completion conditions 🔗 1. Polyhedral values, coefficient profile and valid use shall apply without strengthening them to the false-result guarantee.

RATIONALE:

Pairwise lower/upper compatibility is necessary and sufficient for a real coordinate to exist. A strict bound requires strict compatibility in its pair. Positive gcd-reduced combinations preserve these conditions exactly. Their remaining-column signs equal the preflight signs, since division by a positive gcd does not change a sign. Removing tautologies only decreases the predicted counts, proving the second pass's work bounds.

INTERFACE:

Private member of Parma_Polyhedra_Library::Polyhedron.

bool try_binary_pair_projection(const Variables_Set& vars);
VERIFICATION_CRITERIA:

Compare all open/closed input-pair combinations with literal projections and an independent generator route. Cover both signs, zero columns, gcd reduction, tautologies, constant false rows, coupled and noncontiguous coordinates, one-sided passes, exact pair/row limits and conservative rejection. Check unchanged rejection state, zero C++ allocation on rejected preflight and allocation failures after acceptance. Include both matrix layouts and every admitted coefficient profile, preserving the generator fallback elsewhere.

BIBLIOGRAPHY:

Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.

PPL-SPEC-001687
3. Exact one-dimensional continuous LP projection UID: PPL-SPEC-001687 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

try_interval_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators and a nonempty in-range selection. It shall reject bounded coefficient profiles, ambient dimensions outside 10 through 16, selections leaving other than one coordinate, descriptions with fewer than twice the ambient dimension or more than 64 stored rows, and descriptions with any logical equality or strict inequality. These rejections shall preserve all receiver state and allocate no C++ storage. The dispatch in 🔗 2. Bounded exact coupled constraint projection shall invoke it only for necessarily closed receivers; its weak-row computation shall preserve the supplied receiver's topology.

Find the sole surviving original coordinate and construct one continuous MIP_Problem from the original constraint system, with that coordinate as the minimization objective. Select PRICING_TEXTBOOK before solving, so pricing shall use coefficient arithmetic rather than floating-point weights. Do not designate integer coordinates or introduce auxiliary ones.

An infeasible lower solve shall replace the receiver with a same-topology empty polyhedron of dimension one. Otherwise retain a finite exact lower value p ⁄ q as qv ≥ p, and omit an unbounded lower bound. Change the same model to maximization, reusing its feasible state and basis. Its result shall remain feasible. Retain a finite upper value r ⁄ s as sv ≤ r, and omit an unbounded upper bound. Denominators shall be positive. Both finite endpoints shall be included. The completed interval shall be the exact real projection 🔗 4. Exact polyhedral coordinate deletion.

Only a completed same-topology result shall be swapped into the receiver. The dimension, initialization, synchronization, resource and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use and the continuous incremental MIP model shall apply. Exceptions shall not strengthen the common guarantees to the false-result preservation guarantee.

RATIONALE:

A linear image of a convex set on the real line is an interval. For a nonempty rational polyhedron described by weak inequalities, each finite linear-programming extremum is attained. Its exact lower and upper extrema therefore determine the entire closed interval, including singletons, half-lines and the whole line. Two continuous solves can avoid constructing all original generators. Reusing the model avoids rebuilding its constraints and feasible basis, and textbook pricing avoids floating-point weight work.

INTERFACE:

Private member of Parma_Polyhedra_Library::Polyhedron.

bool try_interval_projection(const Variables_Set& vars);
VERIFICATION_CRITERIA:

Compare public projections with literal closed intervals and an independent generator route. Cover finite rational endpoints, one/both unbounded sides, empty sets, singletons, lower-dimensional descriptions and different surviving indices. Check dimension, row-count, selection and relation rejection, closed dispatch versus NNC fallback, exact pricing and both storage layouts. Verify rejection state, zero C++ allocation on rejection, reload, cache histories and allocation failures. Include an interrupted solve, destruction of the failed receiver and a successful retry on an independent copy of the original input, under the common resource contract.

BIBLIOGRAPHY:

Meyer74 | Abstract (existence of finite optima with rational constraint coefficients). Williams86 | Sections on elimination and Fourier's method (exact real projection).

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.