Parma Polyhedra Library requirements
C++ pip incremental
PPL-SPEC-001486
1. Parametric integer coordinate growth UID: PPL-SPEC-001486 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Growth shall append m_vars new decision variables followed by m_params new parameter coordinates, preserving the indices and meaning of all old coordinates. New coordinates shall initially have only implicit nonnegativity restrictions. Zero/zero growth shall preserve the current state. The sum shall be checked against the remaining supported extent without arithmetic wraparound; overflow shall raise std::length_error before changing dimensions. Subsequent solution queries shall describe the expanded problem with artificial parameter indices adjusted to follow original coordinates.

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

RATIONALE:

Artificial parameter numbering must not displace or reinterpret original problem coordinates when new dimensions are appended.

INTERFACE:

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

void add_space_dimensions_and_embed(dimension_type m_vars,
                                    dimension_type m_params);
VERIFICATION_CRITERIA:

Add either/both coordinate kinds before and after solving, check ordering and renumbering, zero additions, extreme sizes and fresh-problem equivalence.

SOURCE:

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/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem2.cc.

PPL-SPEC-001487
2. Parametric coordinate selection and descriptor views UID: PPL-SPEC-001487 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Parameter addition shall select the supplied indices as parameters and preserve already selected parameters. Incompatible indices shall raise std::invalid_argument. A decision coordinate already processed by the solver shall not be reinterpreted as a parameter; such conversion shall raise std::invalid_argument. Already selected processed parameters may be supplied again. Descriptor access shall expose the parameter subset and const constraints in insertion order; borrowed iterators and views may be invalidated by storage changes or replacement.

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

RATIONALE:

Changing an already solved decision coordinate into a parameter would reinterpret cached tableau and tree coordinates.

INTERFACE:

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

void add_to_parameter_space_dimensions(const Variables_Set&);
const Variables_Set& parameter_space_dimensions() const;
const_iterator constraints_begin() const;
const_iterator constraints_end() const;
VERIFICATION_CRITERIA:

Select fresh coordinates, repeat parameter selections, reject processed decision variables, inspect descriptors and compare valid histories with fresh models. Repeat processed parameter selections and an aliased public parameter view without changing the solved state. Exercise empty requests, multiple processed parameters, a mixed processed/fresh suffix and rejection of processed decision coordinates; retain ordinary fresh-coordinate additions.

SOURCE:

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/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem2.cc; tests/PIP_Problem/pipproblem3.cc.

PPL-SPEC-001488
3. Parametric constraint refinement UID: PPL-SPEC-001488 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

Constraint additions shall conjoin value copies with the current problem. A descriptor dimension greater than the ambient dimension shall raise std::invalid_argument, including an empty system with an incompatible declared extent. Strict inequalities shall be interpreted over nonnegative integers. Subsequent completed queries shall include all added variable and parameter-only constraints; obsolete feasible branches or cached solutions shall not be returned as current. After one or more rows are appended to a problem with a retained feasible solution tree, the next query that needs a solution shall rebuild the result from the complete updated model and its parameter context.

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

RATIONALE:

New parameter-only constraints change the admissible initial context as well as the feasible decision region.

INTERFACE:

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

void add_constraint(const Constraint&);
void add_constraints(const Constraint_System&);
VERIFICATION_CRITERIA:

Add equations, strict and non-strict inequalities, parameter-only contradictions and empty dimensioned systems before/after solving; compare against fresh literal models. After appending rows to a previously solved feasible model, compare the rebuilt solution and parameter context with a fresh equivalent problem. Exercise bulk copies with both row representations. Allocation failure before an append shall retain the prior mathematical rows and cached status; after successful prefix copies, that prefix shall remain valid pending work and support solution queries and retry with the unappended suffix. Empty bulk additions shall not allocate or invalidate cached results.

SOURCE:

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/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc. tests/PIP_Problem/bulkconstraints1.cc; tests/PIP_Problem/bulkparser1.cc.