|
|
1
|
|
PPL-LLR-000201
|
|
Explicit C library lifecycle
|
The C interface shall provide explicit initialization and finalization of library state. Repeated initialization without an intervening finalization, and repeated finalization without an intervening initialization, shall report an invalid lifecycle request.
|
C clients need an explicit lifecycle for resources managed by the native library.
|
|
|
APPROVED
|
C_INTERFACE
|
IF_C
|
Test, Review
|
A valid initialization and finalization sequence succeeds; a duplicate request in each state reports the documented invalid-argument outcome; reinitialization after finalization succeeds.
|
interfaces/C/ppl_c_header.h, Library Initialization and Finalization; interfaces/C/ppl_c_implementation_common.cc, library lifecycle operations.
|
|
|
|
|
|
2
|
|
PPL-LLR-000202
|
|
C object ownership and borrowed access
|
The C interface shall distinguish caller-owned objects from borrowed access to an existing object's contents. Creating an owned object shall establish a separate lifetime, whereas obtaining a borrowed handle shall not transfer ownership or extend the owner's lifetime.
|
Handle values alone do not express ownership, and copying a handle must not be mistaken for copying its object.
|
|
|
APPROVED
|
C_INTERFACE
|
IF_C
|
Test, Review
|
Creation, copying and deletion tests establish independent lifetimes for owned copies; accessor tests establish that borrowed results describe the owner's contents; documentation states the owner-lifetime and invalidation preconditions for borrowed results.
|
interfaces/C/ppl_c_header.h, Handle Ownership and Lifetimes; interfaces/C/ppl_interface_generator_c_h_code.m4, borrowed-system and owned-system accessors.
|
|
|
|
|
|
3
|
|
PPL-LLR-000203
|
|
C boundary error reporting
|
The C interface shall report every failure designated by its supported failure model through the corresponding negative error status and invoke the installed error handler with the error category and a textual description. Native C++ exceptions raised by supported operations shall be contained at the C language boundary rather than escaping to the caller.
|
C clients require observable error reporting without reliance on C++ exception handling.
|
|
|
APPROVED
|
C_INTERFACE
|
IF_C
|
Test, Review
|
Exercise the supported failure categories, including invalid arguments, domain and size errors, allocation failure, checked-coefficient overflow, and supported interruptions. Check status categories and handler notifications independently of their descriptions, distinguish successful mathematical results from failures, and inspect exception containment and output-validity rules at the boundary.
|
interfaces/C/ppl_c_header.h, Error Handling; interfaces/C/ppl_c_implementation_common_defs.hh, exception-to-error translation; interfaces/C/ppl_c_implementation_common.cc, error-handler management.
|
|
|
|