Parma Polyhedra Library requirements
C VALID USE
PPL-SPEC-001514
1. C handles, arguments and successful outcomes UID: PPL-SPEC-001514 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

C clients shall use the installed <ppl_c.h> declarations with compatible native and GMP libraries. Input handles shall denote live objects of the declared type. Mutable handles shall denote writable objects; a borrowed const handle shall not be modified or deleted. Output addresses shall be non-null and writable. Arrays shall contain their declared number of elements; a zero count shall require no element access. Iterators shall have valid positions in the same live container. Caller synchronization, thread entry and floating-point prerequisites shall follow the native operations.

A nonnegative function result shall have the meaning assigned by its operation: zero status, boolean result, enumeration or flags. Negative results shall denote failures. Successful mathematical results shall preserve the corresponding native operation's exactness, approximation direction, inconclusive outcomes and admitted witnesses. Failed operations shall not imply a completed mathematical result or unspecified rollback. Unless explicitly guaranteed, output parameters shall be used only after success.

RATIONALE:

C pointers do not encode ownership, initialization or mathematical result categories.

INTERFACE:

Public header: <ppl_c.h>.

#include <ppl_c.h>
/* Opaque handles: ppl_T_t and ppl_const_T_t. */
VERIFICATION_CRITERIA:

Compile C18 and C++ clients; check status/boolean/enumeration distinctions, live borrowed views, zero-length arrays and native-result comparisons.

SOURCE:

interfaces/C/ppl_c_header.h; interfaces/C/tests/ccontractsspec1.cc.