Parma Polyhedra Library requirements
C++ pip solving

C++ pip solving

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-001489
PPL-SPEC-001489
Parametric solver outcomes and satisfiability

A completed solve shall return UNFEASIBLE_PIP_PROBLEM for infeasibility and OPTIMIZED_PIP_PROBLEM with a retained tree otherwise. With no big parameter, infeasibility shall mean that no assignment in the initial context has a feasible nonnegative integer decision tuple. With a big parameter, the status shall reflect the sign decisions in 🔗 4. Parametric big-parameter designation. is_satisfiable shall solve as needed and return true exactly for the optimized status. An infeasible subregion of a partly feasible context shall not imply global infeasibility in ordinary mode. Repeated queries may reuse current state without changing the mathematical result.

An integer search over an unbounded parameter context or feasible region may run indefinitely. Configured deterministic weight limits and supported cancellation shall be observed at solver checkpoints under 🔗 1. Optimization and ranking valid use.

Integer compatibility checks used to determine feasibility shall follow 🔗 5. Integer feasibility of parametric compatibility contexts.

Ordinary bounded-coefficient simplex pivots shall preserve the shared rational tableau across both its variable and parameter numerator matrices. When direct arithmetic has not been proved representable, the complete pivot shall be evaluated exactly and the common positive factor of both numerator matrices and their one denominator shall be cancelled before coefficient admission. Rows shall not be scaled independently. Parameter-row and cut-selection scores, including products of residue sums, shall be compared as exact working integers without requiring those comparison-only values to fit a coefficient. Pivot and cut ties shall retain their existing traversal order.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

Every nonempty subset of nonnegative integer tuples has a lexicographic minimum; partly feasible contexts still require symbolic solutions.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Check global and partial feasibility, empty initial contexts, zero coordinates, all parameters, repeated queries and independently enumerated contexts. Check a feasible zero face excluded by the big-parameter sign decisions. Compare fresh ordinary initialization and post-pivot incremental updates against literal optima and bounded integer enumeration, including sparse dimension gaps, strict rows and coefficients larger than a native machine word. Assess the context-feasibility kernels separately under 🔗 5. Integer feasibility of parametric compatibility contexts. Check determinant-minus-one equality and inequality families with literal solutions (1,1) and (0,2), including coefficients whose products exceed a machine word, both representations, both input orders and every cutting/pivot mode. Exercise consecutive nonunit pivots, common-factor cancellation, intervening cuts and subsequent unit pivots. Check independently constrained coordinate ceilings for 16 and 32 unknowns, with compatible upper bounds, across both representations, input orders and every cut and pivot strategy. Check independent GMP arithmetic for working-score multiplication, self aliasing and wide values; use a coupled ceiling example to force an oversized score. Check exact ordering and ties against literal optima. Evaluate symbolic trees with independent unbounded integers. Exercise a deterministic weight limit on a long search over an unbounded parameter context.

src/Exact_Arithmetic.hh; src/PIP_Tree.cc; src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/zerofaces1.cc; tests/PIP_Problem/weightwatch1.cc; tests/pipcolumnsspec1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/initialtableau1.cc. src/PIP_Divisibility.hh; tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc; tests/PIP_Problem/pipboundedpivot1.cc;

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

PIP_Problem_Status solve() const;
bool is_satisfiable() const;
SW_SPEC
2
PPL-SPEC-001490
PPL-SPEC-001490
Parametric solution-tree access

Both accessors shall solve a pending problem as needed and return a borrowed const tree describing its current lexicographic optima. Infeasibility in the selected solve mode shall return a null tree. Interpret a returned tree only at assignments satisfying the initial context and, if a big parameter is designated, the sign assumptions in 🔗 4. Parametric big-parameter designation. On such assignments, every reached feasible leaf shall provide the least decision tuple; a missing branch or a failed leaf guard shall denote infeasibility for that context subset. Mutation, replacement, destruction or a cache-replacing query on the owning problem may invalidate the tree and its derived views.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

The initial context and the guards along a tree path together determine where a symbolic leaf is valid.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Traverse both accessor results with an independent interpreter for guards and artificial parameters; compare feasible leaves and missing branches against bounded enumeration.

src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/zerofaces1.cc; tests/PIP_Problem/initialtableau1.cc. tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc;

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

PIP_Tree solution() const;
PIP_Tree optimizing_solution() const;
SW_SPEC
3
PPL-SPEC-001491
PPL-SPEC-001491
Parametric cutting and pivot controls

Setting a cutting value shall select first-row, deepest-cut or all-cuts generation; setting a pivot value shall select first-row or maximum-column pivot choice. The getter shall report the selected value for a valid control name. Defaults shall be CUTTING_STRATEGY_FIRST and PIVOT_ROW_STRATEGY_FIRST. Unsupported setting values shall raise std::invalid_argument. Heuristic changes may change tree shape and work, while completed solutions shall retain the same context-relative meaning. The maximum-column heuristic shall compare candidate pivot updates by stored row order, then constant/original/artificial parameter column order. These comparisons shall retain exact ordering and ties when intermediate two- or three-factor products exceed the bounded coefficient range.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

Equivalent symbolic solutions can have different trees under different valid search heuristics.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Check defaults, all six cutting/pivot combinations, invalid setting values and literal tree evaluation rather than textual tree equality.

src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem2.cc. tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/compatibilitycandidates1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc; tests/PIP_Problem/pipboundedpivot1.cc;

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

Control_Parameter_Value get_control_parameter(Control_Parameter_Name) const;
void set_control_parameter(Control_Parameter_Value);
SW_SPEC
4
PPL-SPEC-001492

The setter shall designate an existing, not-yet-processed parameter coordinate as the big parameter. A non-parameter or a parameter already processed by the solver shall raise std::invalid_argument. The getter shall return its index, or not_a_dimension() when none is selected. In symbolic sign decisions, a nonzero coefficient of this parameter shall dominate the remaining expression. This convention shall represent an arbitrarily large parameter; concrete finite assignments shall be interpreted only where the result's asymptotic sign conditions hold, accounting for the values of artificial parameters. See 🔗 1. Parametric problem and context interpretation.

The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

A symbolic parameter assumed sufficiently large is not interchangeable with an arbitrary finite input parameter.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Check designation before/after processing, invalid coordinates, copy/exchange/reset, sign-unrestricted encodings and sufficiently large concrete witnesses.

src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem2.cc; tests/PIP_Problem/zerofaces1.cc.

CPP
Public

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

void set_big_parameter_dimension(dimension_type);
dimension_type get_big_parameter_dimension() const;
SW_SPEC
5
PPL-SPEC-001741

A native context shall include a constant column. Each row shall denote an inequality whose constant is in column zero and whose remaining coefficients multiply nonnegative integer coordinates. The affine row value shall be required to be nonnegative. The additional row, when supplied, shall have the same logical width and shall be conjoined with the context. A completed query shall return true exactly when that system has a nonnegative integer solution. A rational solution that fails an integrality constraint shall not justify true. Explicitly stored zeroes and differing physical row capacities shall not alter the result.

The const-input entry points shall preserve the context and any additional row. The destructive entry point may modify and extend its working tableau. A compatibility workspace shall own its scratch storage and shall be noncopyable. Nested queries shall use distinct workspaces. Restoring a context shall replace the logical rows, including zeroing retained coordinates absent from the source. Reuse may retain inactive row allocations and sparse entries holding zero. After failure or interruption, another query shall rebuild or reinitialize the scratch state before relying on it.

When direct bounded arithmetic has not been proved representable, complete rational pivot rows shall be evaluated exactly and the common positive factor of their numerators and denominator shall be cancelled before admission. Comparison-only products shall retain exact order without requiring them to fit a stored coefficient. When a reduced numerator or denominator cannot be stored, the protected entry points and the workspace overload accepting a const context and an additional row shall replay the original unchanged context in owned unbounded rational working storage. Replay shall preserve reconstructed original-variable column order and enforce integer feasibility of those variables using cuts. It shall not widen the public solution-tree coefficient type.

Only the internal working-range condition shall trigger replay. Allocation failures and client abandonment exceptions, including client overflow exceptions, shall propagate. Scratch from an unsuccessful query shall not establish any feasibility result.

Branch and guard pruning depends on integer feasibility of the original parameter context. Ownership and replay must preserve its meaning and the caller's interruption behavior.

APPROVED
PIP_SOLVER
IF_CPP
Test, Analysis, Inspection

Compare the answers with complete bounded integer enumeration and literal integral and half-integral solutions. Use changing dimensions, stored zeroes and varying row capacities. Compare the input rows before and after both native checks and replay. Check reuse of live slots after restoration and zeroing of recycled rows. Exercise pivot reduction across the coefficient boundary and retry the same workspace after allocation and checkpoint failures. Check that a client overflow is propagated once and that nested calls use independent scratch.

src/PIP_Tree_defs.hh, src/PIP_Tree.cc, src/PIP_Compatibility.hh, src/PIP_Exact_Compatibility.cc, tests/PIP_Problem/compatibilityworkspace1.cc, tests/PIP_Problem/exactcontexts1.cc and tests/PIP_Problem/compatibilityzero1.cc.

CPP
Internal

Protected PIP_Tree_Node::compatibility_check overloads and the private PIP_Implementation::Compatibility_Workspace, compatibility_check and exact_compatibility_check declarations in src/PIP_Compatibility.hh. The lower-level mutable overload used by the workspace operates on admitted working storage and may signal that exact replay is needed.