Parma Polyhedra Library requirements
Native verification support
PPL-SPEC-001719
1. Verification diagnostic routing UID: PPL-SPEC-001719 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

Test verbosity selection shall enable output when the named environment variable exists, where getenv is available; its value need not be nonempty. Otherwise, the configured NOISY and VERY_NOISY fallbacks shall govern the corresponding names. An unrecognized name shall be disabled in that fallback. A disabled noisy stream shall discard characters while reporting successful writes. An enabled stream shall use the supplied stream's buffer. nout and vnout shall select the ordinary and very-noisy channels independently. The C harness query functions shall expose the corresponding Boolean decisions. print_function shall print a nonempty introduction followed by a newline and then delegate to the partial function's print operation. These helpers shall not determine whether a numerical test passed.

RATIONALE:

Diagnostic verbosity must not change a test result or turn discarded output into a stream failure.

INTERFACE:

Native test support in tests/ppl_test.hh, tests/ppl_test.cc and the C test harness.

VERIFICATION_CRITERIA:

Inspect each environment/fallback branch, stream-buffer selection and EOF handling; exercise disabled and enabled channels and an empty/nonempty introduction.

SOURCE:

tests/ppl_test.hh; tests/ppl_test.cc; interfaces/C/tests/ppl_c_test.h; interfaces/C/tests/ppl_c_test.cc.

PPL-SPEC-001720
2. Fatal test-process diagnostics UID: PPL-SPEC-001720 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

set_handlers shall install a terminate handler which reports an uncaught exception and exits unsuccessfully. Where sigaction is available it shall install the selected SIGFPE handler; installation failure shall diagnose and abort. SIGFPE handling shall report the available cause or exception flags and exit unsuccessfully. These are fatal test-process diagnostics, not a recoverable library exception or signal-safety guarantee.

RATIONALE:

Fatal fixture failures must produce a diagnostic and an unsuccessful process result instead of continuing with invalid test state.

INTERFACE:

Test::set_handlers and its private terminate/SIGFPE callbacks.

VERIFICATION_CRITERIA:

Inspect platform branches and unsuccessful exit paths; exercise termination only in subprocesses and preserve the caller process.

SOURCE:

tests/ppl_test.hh; tests/ppl_test.cc.

PPL-SPEC-001721
3. Test file opening and closing UID: PPL-SPEC-001721 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

open shall open the supplied fstream with the requested path and mode. On failure it shall report the path, identify the ordinary read/write modes when recognized, and exit with status 1. close shall call the stream close operation only when its entry Boolean stream state is true; it shall not clear a failed stream or promise to close an already-failed stream. Paths and stream lifetimes shall be valid for the underlying standard-library operations.

RATIONALE:

A fixture must distinguish unusable input files from a failed library operation; the close helper preserves its existing failed-stream semantics.

INTERFACE:

The global open(fstream&, const char*, openmode) and close(fstream&) test helpers.

VERIFICATION_CRITERIA:

Inspect exact mode diagnostics and failed-stream behavior; exercise a valid temporary path and a rejected path in a subprocess.

SOURCE:

tests/files.hh; tests/files.cc.

PPL-SPEC-001722
4. Test user-CPU timing observations UID: PPL-SPEC-001722 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

Where getrusage and timeval are configured, start_clock shall save process user-CPU time for a subsequent print_clock call. print_clock shall print the nonnegative elapsed user time rounded to centiseconds, carrying into the seconds field as needed and restoring the output stream's fill character. A getrusage failure shall diagnose and exit with status 1. Without that configured facility start_clock shall do nothing and print_clock shall emit "(no clock available)". Calls shall be ordered and synchronized appropriately for the configured thread-local or shared saved timestamp. This observation shall not be interpreted as wall-clock time or a performance acceptance test.

RATIONALE:

Timing output is interpretable only when its clock, units and rounding are explicit.

INTERFACE:

start_clock(), print_clock(ostream&) and saved_ru_utime.

VERIFICATION_CRITERIA:

Inspect rounding/carry, failure and unavailable-clock branches; compare output format and restoration of a nondefault fill character.

SOURCE:

utils/timings.hh; utils/timings.cc.

PPL-SPEC-001723
5. Restricted foreign-runtime verification doubles UID: PPL-SPEC-001723 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The OCaml integer fixture shall model only the tagged immediate-integer ABI used by the native conversion helpers. Its selected word types and tag operations shall agree on that encoding. Any attempted heap/custom-block access shall throw logic_error with the fixture diagnostic; it shall not return a plausible heap value. Its unsigned-argument error double shall throw invalid_argument with the supplied message. The fixture shall not claim to implement the OCaml collector, ownership protocol or exception runtime.

The SWI coefficient fixture shall model only the term and initialized-GMP exchange needed by its conversion tests. Its modern extraction double shall leave output untouched and fail when requested; on success it shall copy the selected integer and record the output address. Its legacy extraction double shall perform that copy without a result status. The unification and variable reset doubles shall supply only the successful/no-op behavior used by this fixture, not a complete Prolog term store.

RATIONALE:

Narrow runtime doubles must fail immediately outside their supported subset, so they cannot accidentally validate the complete foreign runtime.

INTERFACE:

The private ABI doubles and state in tests/ocaml_integer_conversion1.cc and tests/swi_coefficient_conversion1.cc.

VERIFICATION_CRITERIA:

Exercise heap-access rejection, tagged-integer boundaries and both modern/legacy coefficient extraction paths. Inspect the deliberately restricted scope of every double.

SOURCE:

tests/ocaml_integer_conversion1.cc; tests/swi_coefficient_conversion1.cc.

PPL-SPEC-001726
6. Compilation-only and unavailable-profile test drivers UID: PPL-SPEC-001726 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

An unavailable-profile test driver shall return the test harness skip status 77 without claiming to execute the disabled threaded verification. Its enabled branch shall retain that branch's actual verification allocations. The C_Expr compilation fixture shall include the authored expression header and provide a successful entry point. Successful compilation establishes only that the selected declarations are well formed in that build; returning zero shall not be treated as a mathematical test of every expression operation.

RATIONALE:

A compile-only or unavailable-profile driver is not evidence that the numerical operation was exercised.

INTERFACE:

The fallback entry points in atomicwatchdogspec1, ownedexpressionthreads1 and threadsafepublic1; tests/Concrete_Expression/C_Expr.cc.

VERIFICATION_CRITERIA:

Inspect conditional branches and exit statuses; compile the C_Expr fixture and verify skipped versus executed tests separately.

SOURCE:

tests/atomicwatchdogspec1.cc; tests/ownedexpressionthreads1.cc; tests/threadsafepublic1.cc; tests/Concrete_Expression/C_Expr.cc.

PPL-SPEC-001736
7. Replacement allocation failure injection UID: PPL-SPEC-001736 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The fixture shall initialize its failure countdown to a disabled state. When a replacement allocation is attempted with a nonnegative countdown, the allocation path shall decrement it. An entry value of zero shall throw std::bad_alloc before requesting storage. An entry value below zero shall leave the countdown unchanged and permit the ordinary replacement allocation path. That path shall request the given byte count, or one byte for a zero-size request. It shall throw std::bad_alloc when allocation fails. Array allocation shall use the same path. A countdown observation shall return the current countdown. Clients shall serialize control and observation of the fixture.

RATIONALE:

A known failing allocation attempt lets the test exercise cleanup and recovery paths without relying on actual resource exhaustion.

INTERFACE:

Test_Allocation::countdown, Test_Allocation::observed_countdown() and the replacement operator new and operator new[] in tests/throw_on_allocation.hh.

VERIFICATION_CRITERIA:

Inspect the initial state and follow negative, positive and zero entry values through the scalar path. Check array delegation and the zero-byte allocation and allocation-failure branches. Inspect the countdown read.

SOURCE:

tests/throw_on_allocation.hh.

PPL-SPEC-001737
8. Replacement allocation observations UID: PPL-SPEC-001737 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The fixture shall initialize its allocation balance to zero. It shall increment the balance for each successful allocation through its replacement and decrement it for each nonnull pointer passed to its replacement deallocator. Sized and array forms shall use the same accounting path. A balance observation shall return the current balance. The balance measures only events that reach the replacements. Counts may include just one end of an allocation lifetime when interposition is incomplete.

The summary shall start with a zero count and zero extrema. Given two balance observations, it shall ignore equal values. Otherwise it shall count the observation and update the minimum and maximum of the signed difference, later minus earlier, over all recorded nonzero differences. The fixture assumes serialized use and representable counts and differences.

RATIONALE:

The test can distinguish an observed cleanup imbalance from an inference about every allocation in a process.

INTERFACE:

Test_Allocation::outstanding, Test_Allocation::observed_outstanding(), Test_Allocation::Balance_Observations and Balance_Observations::record(long, long). The replacement allocation and deallocation entry points supply the measured events.

VERIFICATION_CRITERIA:

Follow successful and failed allocations, null and nonnull deallocation, and the delegates for array and sized operations. Inspect observation reads and check that equal, first nonzero, and subsequent positive or negative differences produce the stated count and extrema.

SOURCE:

tests/throw_on_allocation.hh.

PPL-SPEC-001738
9. Partial-function input and failure-scope fixtures UID: PPL-SPEC-001738 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The reference pair shall hold source and image coordinates as separate dimension indices. The population helper shall insert the supplied pairs in sequence using that coordinate order and the library operation's valid insertion preconditions. The allocation-failure scope shall set the requested countdown at entry and disable injection at destruction, including during exception unwinding. Callers shall use the failure scopes without copying or nesting them.

RATIONALE:

Ordered setup fixes the tested insertion sequence. Disabling injection before the independent oracle runs keeps its own allocations outside the failure being checked.

INTERFACE:

Mapping, populate and Allocation_Failure in tests/partialfunction1.cc.

VERIFICATION_CRITERIA:

Inspect source-to-image insertion and the input iteration order. Follow normal and exceptional exits from the failure scope and locate where the test observes the map after injection has been disabled.

SOURCE:

tests/partialfunction1.cc.

PPL-SPEC-001739
10. Equivalent one-coordinate ranking countdown fixtures UID: PPL-SPEC-001739 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The full fixture shall construct a two-dimensional closed polyhedron describing x ≥ 0,  x’ = x − 1 with after-state coordinate x’ at index zero and before-state coordinate x at index one. For the paired encoding, the guard fixture shall construct a one-dimensional closed polyhedron for x ≥ 0 at index zero. The update fixture shall construct the two-dimensional closed polyhedron for x’ = x − 1 in the same coordinate order as the full fixture. Their aligned conjunction shall equal the full fixture, using the coordinate interpretation in 🔗 1. Transition encoding and ranking interpretation.

RATIONALE:

Equivalent, explicit inputs let the tests validate the two entry points against the same reference transition.

INTERFACE:

ranking_valid_countdown_relation(), ranking_valid_countdown_before() and ranking_valid_countdown_after() in tests/Polyhedron/termination2.cc.

VERIFICATION_CRITERIA:

Inspect the dimensions, coordinate positions and constraints of each fixture. Check that lifting the one-dimensional guard onto the before-state coordinate of the update yields exactly the two-dimensional relation.

SOURCE:

tests/Polyhedron/termination2.cc.

PPL-SPEC-001740
11. IBM hexadecimal rounding reference fixture UID: PPL-SPEC-001740 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The reference quantizer shall model normalized hexadecimal rounding toward zero with six or fourteen stored fraction digits and a radix-16 exponent in the range -64 through 63. It shall use exact rational arithmetic. A magnitude below the smallest normalized value, 16 − 65, shall map to zero. Other inputs shall be within the modeled exponent range. Scaling by a power of 16 and truncating the magnitude to the selected number of hexadecimal digits shall preserve the sign of a nonzero result.

The fixture shall supply the two input intervals and the associated coordinates of each reference to the target-adapted linearizer. It shall decline constant and integer-expression queries. Given a bounded affine form with finite endpoints, the comparison shall evaluate its two coordinate contributions using exact rational conversions of the stored endpoints and check containment of the reference result. The reference quantizer shall not invoke the linearization operation being verified.

RATIONALE:

A reference independent of the linearizer can distinguish observed enclosure from an expected result derived with the same error in the implementation.

INTERFACE:

The internal ITV and Form aliases, power16, exact, hfp_round, Oracle and encloses in tests/Concrete_Expression/ibmroundoff1.cc.

VERIFICATION_CRITERIA:

Compare reference results with literal expectations for both precisions, truncation of both signs, the smallest normalized magnitude and underflow. Inspect exact rational conversion, coordinate association, and interval evaluation for positive and negative inputs. Confirm that the PPL arithmetic tests use the quantizer's result to check the returned form.

SOURCE:

tests/Concrete_Expression/ibmroundoff1.cc.

PPL-SPEC-001742
12. Parametric compatibility verification fixtures UID: PPL-SPEC-001742 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The row and matrix fixtures shall preserve supplied constants, coordinate coefficients and logical widths when constructing variants with different capacities or explicit stored zeroes. The symmetric-equation fixture shall encode each supplied equation by both signs of its row. The protected test accessors shall expose the existing compatibility overloads without solving a public problem. Snapshot comparisons shall serialize source rows or compare their logical contents as appropriate to the test.

A scoped hook shall restore the preceding checkpoint callback on exit, including exceptional exit. The indexed interruption fixtures shall count calls and interrupt at the selected checkpoint. A one-shot client overflow shall disable further callback invocation before throwing. A nested call shall use the supplied inner workspace, context and row and shall suppress recursive reentry of that same hook.

The public-problem setup used with the zero-coordinate cases shall preserve the specified variable order, parameter identities and input-row meanings across variations of representation and insertion order. It shall set the selected solver controls before the assertions evaluate the public result.

RATIONALE:

The tests rely on controlled variations of the same mathematical context and a repeatable distinction between library failure and fixture injection.

INTERFACE:

Private compatibility accessors, coordinate and row setup, observation helpers and checkpoint hooks in the three test files below.

VERIFICATION_CRITERIA:

Compare constructed rows and parameter sets with the stated inputs. Inspect snapshot observers, the scoped callback lifetime and interruption and recursion paths. Review the separate test assertions that determine library results under 🔗 5. Integer feasibility of parametric compatibility contexts.

SOURCE:

tests/PIP_Problem/compatibilityworkspace1.cc, tests/PIP_Problem/exactcontexts1.cc and tests/PIP_Problem/compatibilityzero1.cc.

PPL-SPEC-001743
13. Exact reference calculations for bounded MIP tests UID: PPL-SPEC-001743 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The model helpers shall supply the same affine rows, bounds, integer coordinates and objectives used by their comparison tests. Reference feasibility and objective values shall be computed with exact rational arithmetic independently of the MIP solver. Enumerate the admitted integer coordinates over the models' finite bounds. For a continuous coordinate remaining after the other coordinates are fixed, derive its closed feasible interval and test its endpoints. For the bounded real half-plane models, examine intersections of nonparallel boundary lines and retain only feasible points. In the integer and mixed half-plane cases, enumerate the bounded integer coordinates and use the corresponding feasible interval endpoints when a coordinate remains continuous.

A reference result shall distinguish absence of a feasible point from a feasible exact extremum. The coefficient adapters shall supply exact integer or rational values for the comparisons. An adapter that returns a conversion status shall indicate whether the conversion is exact. A borrowed GMP value shall be used only while its coefficient remains live.

RATIONALE:

Independently derived feasibility and optimum values allow the tests to check the solver's statuses and witnesses without using solver arithmetic as the expected result.

INTERFACE:

The private model, row, exact arithmetic and oracle helpers in tests/MIP_Problem/enumeratedmodels1.cc and MIP_Coefficient_Test::integer in tests/MIP_Problem/coefficient_test.hh.

VERIFICATION_CRITERIA:

Review equivalence of the scalar inequalities and solver inputs for each family, including the parity cut and coordinate padding. Check that the integer bounds, interval endpoints and real vertices cover every family's possible feasibility and extremum outcomes. Inspect exact coefficient conversion and confirm the reference does not call the MIP solver.

SOURCE:

tests/MIP_Problem/enumeratedmodels1.cc and tests/MIP_Problem/coefficient_test.hh.

PPL-SPEC-001744
14. Exact PIP tree interpretation in tests UID: PPL-SPEC-001744 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

The interpreter shall take a live solution tree and supplied finite parameter values in the scope of that tree. It shall read the native guards, artificial-parameter definitions and leaf expressions and evaluate them with unbounded integer arithmetic. It shall append artificial parameters in introduction order using mathematical floor with a positive denominator. It shall require referenced coordinates to be in scope and refuse to interpret an original decision coordinate as a parameter.

A decision shall select its true child only when all local guards hold. A missing node or failed solution guard shall yield false. A feasible solution node shall yield one value per requested decision coordinate in the supplied order. The coefficient-input adapter shall convert to GMP before evaluation and shall require a result representable by the requested answer type. The mode fixture shall call the supplied test with both input representations, both insertion orders and every supported cutting and pivot choice, stopping if the test returns false.

RATIONALE:

The test observer must interpret returned trees with exact arithmetic even when the stored coefficient type is bounded. Separate solver assertions compare those interpreted results with expected tuples and feasibility.

INTERFACE:

PIP_Test_Oracle::affine_value, evaluate_exact, evaluate and for_all_modes in tests/PIP_Problem/pip_test_oracle.hh.

VERIFICATION_CRITERIA:

Inspect the artificial scope and floor calculation, guard tests, branch selection and result order. Check the distinction between evaluation in GMP and conversion of an admitted answer. Inspect the discrete modes passed to the callback and the propagation of a false test result.

SOURCE:

tests/PIP_Problem/pip_test_oracle.hh.

PPL-SPEC-001745
15. MIP regression fixture coefficient-profile handling UID: PPL-SPEC-001745 STATUS: APPROVED COMPONENT: BUILD_DISTRIBUTION APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

A regression fixture shall have a stated coefficient width for completion. GMP and bounded profiles meeting that width shall propagate the callback's Boolean result and exceptions. A narrower checked profile shall preserve a returned Boolean result and propagate exceptions other than arithmetic overflow. It may report an allowed arithmetic overflow with the corresponding diagnostic. A narrower native profile shall record a skip before the fixture callback is invoked. These paths shall retain the distinction between a completed solver result, a checked overflow and a skipped native fixture.

RATIONALE:

A test completion profile limits the expected arithmetic range without converting a wrong numerical result into a successful regression check.

INTERFACE:

MIP_Coefficient_Test::coefficient_case and DO_TEST_COEFFICIENT_PROFILE in tests/MIP_Problem/coefficient_test.hh.

VERIFICATION_CRITERIA:

Exercise false and true callbacks, an overflow and an unrelated exception. Verify callback invocation in the supported and checked cases and its absence for native profiles below the declared width. Inspect diagnostic and harness reporting paths.

SOURCE:

tests/MIP_Problem/coefficient_test.hh and tests/MIP_Problem/enumeratedmodels1.cc.