-
1. Initialization and finalization lifecycle PPL-LLR-000131 The runtime shall initialize shared library facilities before their first supported use and finalize them after their last supported use. Multiple participating translation units shall not cause premature finalization of shared facilities. Thread-specific numerical state shall be initialized and finalized according to the selected thread-support configuration. Each supported native or binding lifecycle protocol shall define the validity of existing objects and borrowed views across finalization and reinitialization, the permitted order of owned-object and managed cleanup, and the live-thread and interruption-state preconditions for those transitions.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
3. Failure and resource safety PPL-LLR-000133 When a supported recoverable failure is reported through a documented error channel, the library shall release temporary resources it owns and leave surviving objects and outputs in the states permitted by the operation's documented failure guarantee. Failure during construction shall release resources acquired for the object whose construction failed. These obligations shall apply whether failure is reported by an exception, error status or host-language error mechanism.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming links from: 4. Binding interruption support and state changes 1. Explicit C library lifecycle 2. Java library lifecycle 1. Initialization and finalization lifecycle 2. Floating-point rounding-state exchange 4. Cooperative computation abandonment 4. Cooperative computation abandonment 2. Java library initialization and finalization8
6. Thread entry and shared-facility use PPL-LLR-000438 For each supported thread configuration and language interface, the runtime shall provide the required library and thread initialization and finalization protocol. Correctly initialized threads shall use the thread-specific numerical state required by that configuration. Permitted concurrent use, object-sharing conditions and caller synchronization requirements for shared facilities shall be explicit, including restrictions on computational-weight monitoring and watchdog signal ownership.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming link from: 2. Installation of configured public artifacts1
1. Public C++ access to supported facilities PPL-LLR-000311 The public C++ interface shall expose the configured library's supported numerical facilities and their public value types through the documented public headers, preserving the declared numerical meanings and public type contracts of those facilities.
-
7. Access through supported language interfaces PPL-HLR-000007 PPL shall expose its numerical facilities through its C++ interface and expose selected facilities through the supported C, Java, OCaml and Prolog interfaces. Each interface shall preserve the declared semantics of the facilities it exposes.
-
The public C++ header shall establish an initialization owner in each participating translation unit unless PPL_NO_AUTOMATIC_INITIALIZATION is defined before that translation unit first includes <ppl.hh>. The first successfully constructed Init owner shall establish shared library facilities and initialize its calling thread. Additional owners shall retain that initialized lifetime without reinitializing its existing thread state. Destruction of an owner while another owner remains shall preserve the shared facilities. Destruction of the last owner shall finalize the owning thread and release shared initialization facilities.
The first-owner construction and last-owner destruction shall be serialized by the caller and shall occur on the same thread. All other participating threads shall complete their PPL use and thread finalization before last-owner destruction. Every PPL object or borrowed view whose validity depends on the initialized facilities shall cease to be used, and every required owned-object cleanup shall finish, before those facilities are finalized. A later initialized lifetime shall not revive objects or views from an earlier lifetime.
The owner counter, saved-rounding storage, automatic-owner pointers and irrational-precision storage shall be statically zero-initialized. The optional rounding-verifier function pointers shall be statically initialized to their designated probes. Their definitions shall enforce constant initialization with constinit. Runtime owner and thread setup shall establish the numerical state specified by this protocol.
Explicit Init guards shall be used only within this ownership protocol. The number of simultaneously live owners shall remain representable by unsigned int. Callers shall not copy, move or assign Init or Thread_Init guards. Automatic initialization shall not by itself initialize worker threads. Thread entry and exit shall follow 🔗 3. Thread initialization, default state and finalization.
If first-owner construction reports a supported recoverable exception, it shall release resources acquired for the failed construction, restore the preceding variable formatter, irrational precision and rounding state, and leave no initialization owner contributed by the failed construction. If setup replaced a signal handler, failure shall restore its preceding action without discarding the caller's pending notifications or changing the caller's timer.
-
1. Initialization and finalization lifecycle PPL-LLR-000131 The runtime shall initialize shared library facilities before their first supported use and finalize them after their last supported use. Multiple participating translation units shall not cause premature finalization of shared facilities. Thread-specific numerical state shall be initialized and finalized according to the selected thread-support configuration. Each supported native or binding lifecycle protocol shall define the validity of existing objects and borrowed views across finalization and reinitialization, the permitted order of owned-object and managed cleanup, and the live-thread and interruption-state preconditions for those transitions.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
3. Failure and resource safety PPL-LLR-000133 When a supported recoverable failure is reported through a documented error channel, the library shall release temporary resources it owns and leave surviving objects and outputs in the states permitted by the operation's documented failure guarantee. Failure during construction shall release resources acquired for the object whose construction failed. These obligations shall apply whether failure is reported by an exception, error status or host-language error mechanism.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming links from: 4. Binding interruption support and state changes 1. Explicit C library lifecycle 2. Java library lifecycle 1. Initialization and finalization lifecycle 2. Floating-point rounding-state exchange 4. Cooperative computation abandonment 4. Cooperative computation abandonment 2. Java library initialization and finalization8
6. Thread entry and shared-facility use PPL-LLR-000438 For each supported thread configuration and language interface, the runtime shall provide the required library and thread initialization and finalization protocol. Correctly initialized threads shall use the thread-specific numerical state required by that configuration. Permitted concurrent use, object-sharing conditions and caller synchronization requirements for shared facilities shall be explicit, including restrictions on computational-weight monitoring and watchdog signal ownership.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming link from: 2. Installation of configured public artifacts1
1. Public C++ access to supported facilities PPL-LLR-000311 The public C++ interface shall expose the configured library's supported numerical facilities and their public value types through the documented public headers, preserving the declared numerical meanings and public type contracts of those facilities.
-
7. Access through supported language interfaces PPL-HLR-000007 PPL shall expose its numerical facilities through its C++ interface and expose selected facilities through the supported C, Java, OCaml and Prolog interfaces. Each interface shall preserve the declared semantics of the facilities it exposes.
-
When automatic initialization is disabled by PPL_NO_AUTOMATIC_INITIALIZATION before public-header inclusion, initialize() shall acquire one library initialization owner on its first successful call without an existing explicit owner. Repeated calls while that owner exists shall preserve it and its active thread state, rather than acquire additional owners or reset the formatter, numerical constants or precision. finalize() shall release that explicit owner. A call to finalize() shall require an existing explicit owner; a sequence of repeated initialize() calls shall require only one matching finalize().
The explicit owner shall obey the first/last-owner, dependent-object cleanup and same-thread conditions of 🔗 1. Initialization owners and automatic C++ initialization. After successful finalize(), a later initialize() shall establish a fresh initialized lifetime. Supported recoverable failure in initialize() shall release resources acquired for the failed owner and shall permit a later call to attempt initialization afresh.
When the header provides automatic initialization, initialize(), finalize(), thread_initialize() and thread_finalize() shall be no-ops; the automatic owner and explicit Thread_Init guards shall govern those lifetimes instead.
-
1. Initialization and finalization lifecycle PPL-LLR-000131 The runtime shall initialize shared library facilities before their first supported use and finalize them after their last supported use. Multiple participating translation units shall not cause premature finalization of shared facilities. Thread-specific numerical state shall be initialized and finalized according to the selected thread-support configuration. Each supported native or binding lifecycle protocol shall define the validity of existing objects and borrowed views across finalization and reinitialization, the permitted order of owned-object and managed cleanup, and the live-thread and interruption-state preconditions for those transitions.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
3. Failure and resource safety PPL-LLR-000133 When a supported recoverable failure is reported through a documented error channel, the library shall release temporary resources it owns and leave surviving objects and outputs in the states permitted by the operation's documented failure guarantee. Failure during construction shall release resources acquired for the object whose construction failed. These obligations shall apply whether failure is reported by an exception, error status or host-language error mechanism.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming links from: 4. Binding interruption support and state changes 1. Explicit C library lifecycle 2. Java library lifecycle 1. Initialization and finalization lifecycle 2. Floating-point rounding-state exchange 4. Cooperative computation abandonment 4. Cooperative computation abandonment 2. Java library initialization and finalization8
6. Thread entry and shared-facility use PPL-LLR-000438 For each supported thread configuration and language interface, the runtime shall provide the required library and thread initialization and finalization protocol. Correctly initialized threads shall use the thread-specific numerical state required by that configuration. Permitted concurrent use, object-sharing conditions and caller synchronization requirements for shared facilities shall be explicit, including restrictions on computational-weight monitoring and watchdog signal ownership.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming link from: 2. Installation of configured public artifacts1
1. Public C++ access to supported facilities PPL-LLR-000311 The public C++ interface shall expose the configured library's supported numerical facilities and their public value types through the documented public headers, preserving the declared numerical meanings and public type contracts of those facilities.
-
7. Access through supported language interfaces PPL-HLR-000007 PPL shall expose its numerical facilities through its C++ interface and expose selected facilities through the supported C, Java, OCaml and Prolog interfaces. Each interface shall preserve the declared semantics of the facilities it exposes.
-
While a library initialization owner remains alive, each additional thread using PPL thread-specific facilities shall establish exactly one active thread initialization lifetime before those facilities are used. A directly constructed Thread_Init guard shall establish that lifetime and shall finalize it when the guard is destroyed on the same thread. A direct guard shall not overlap an already active PPL thread-initialization lifetime on that thread and shall not be copied, moved or assigned.
In a client compiled with automatic initialization disabled, thread_initialize() shall establish a thread lifetime if none is owned by that entry protocol. Repeated calls while that protocol owns an active lifetime shall preserve its constants, precision and formatter. thread_finalize() shall require and end that protocol-owned active lifetime. Direct guards and these entry points shall not be mixed for the same active lifetime. The thread initialized by the first library owner shall have an active protocol-owned thread lifetime when last-owner destruction begins.
Successful thread initialization shall establish the numerical constants used by expressions, constraints, congruences, generators, their systems and polyhedra, set irrational_precision() to 128, and select Variable::default_output_function as the active variable formatter, as specified by 🔗 7. Active Variable formatter and initialized thread state. When configured rounding control is available, it shall save and replace the calling thread's rounding direction as specified by 🔗 4. Rounding-state exchange during an initialized thread lifetime. In a thread-safe configuration these states shall belong to the calling thread and shall be isolated from the corresponding state of other initialized threads. In a configuration without thread support, clients shall use one initialized thread and shall not create overlapping thread-initialization lifetimes.
Before finalization, all PPL use and required owned-object cleanup depending on that thread's initialized state shall finish. Finalization shall release the thread-owned initialization resources and restore its saved rounding direction when rounding control is configured. Reentry after completed finalization shall establish fresh default state; it shall not revive earlier objects or views. If thread construction reports a supported recoverable exception, resources acquired for the incomplete lifetime shall be released, and the preceding variable formatter, irrational precision and rounding state shall be restored.
-
2. Floating-point rounding-state exchange PPL-LLR-000132 On supported platforms with floating-point rounding control, initialization shall establish the rounding state required by PPL floating-point abstractions and preserve the preceding state for restoration. Restoring that preceding state shall permit the client to resume its own floating-point computations; before further use of affected PPL abstractions, the client shall be able to reestablish the PPL-required state.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming links from: 4. Binding interruption support and state changes 1. Explicit C library lifecycle 2. Java library lifecycle 1. Initialization and finalization lifecycle 2. Floating-point rounding-state exchange 4. Cooperative computation abandonment 4. Cooperative computation abandonment 2. Java library initialization and finalization8
6. Thread entry and shared-facility use PPL-LLR-000438 For each supported thread configuration and language interface, the runtime shall provide the required library and thread initialization and finalization protocol. Correctly initialized threads shall use the thread-specific numerical state required by that configuration. Permitted concurrent use, object-sharing conditions and caller synchronization requirements for shared facilities shall be explicit, including restrictions on computational-weight monitoring and watchdog signal ownership.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming link from: 2. Installation of configured public artifacts1
1. Public C++ access to supported facilities PPL-LLR-000311 The public C++ interface shall expose the configured library's supported numerical facilities and their public value types through the documented public headers, preserving the declared numerical meanings and public type contracts of those facilities.
-
7. Access through supported language interfaces PPL-HLR-000007 PPL shall expose its numerical facilities through its C++ interface and expose selected facilities through the supported C, Java, OCaml and Prolog interfaces. Each interface shall preserve the declared semantics of the facilities it exposes.
-
On a configured platform with floating-point rounding control, successful thread initialization shall save the calling thread's preceding rounding direction and establish upward rounding, the direction used for ROUND_DIRECT computations. During that active thread lifetime, restore_pre_PPL_rounding() shall restore the direction saved at thread initialization, and set_rounding_for_PPL() shall reestablish upward rounding. Repeated calls shall not replace the saved preceding direction. Normal thread finalization shall restore that saved direction.
Each exchange shall affect only the calling thread's rounding direction in a thread-safe configuration. The caller shall invoke these functions within a valid initialized thread lifetime and shall call set_rounding_for_PPL() before resuming PPL computations that require its rounding state after the preceding state has been restored or the client has otherwise changed rounding. The exchange shall not promise preservation or restoration of unrelated floating-point status flags, trap masks or other environment state.
When the selected configuration has no floating-point rounding control, set_rounding_for_PPL() and restore_pre_PPL_rounding() shall perform no rounding-state operation. Their presence shall not make an unsupported floating-point computation supported.
-
Incoming links from: 4. Binding interruption support and state changes 1. Explicit C library lifecycle 2. Java library lifecycle 1. Initialization and finalization lifecycle 2. Floating-point rounding-state exchange 4. Cooperative computation abandonment 4. Cooperative computation abandonment 2. Java library initialization and finalization8
6. Thread entry and shared-facility use PPL-LLR-000438 For each supported thread configuration and language interface, the runtime shall provide the required library and thread initialization and finalization protocol. Correctly initialized threads shall use the thread-specific numerical state required by that configuration. Permitted concurrent use, object-sharing conditions and caller synchronization requirements for shared facilities shall be explicit, including restrictions on computational-weight monitoring and watchdog signal ownership.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
-
Incoming link from: 4. Binding interruption support and state changes1
4. Cooperative computation abandonment PPL-LLR-000134 At documented native abandonment checkpoints, the runtime shall check pending computational-weight thresholds and caller-owned abandonment requests. A pending caller-owned request shall invoke its supplied exception mechanism without clearing that request; the caller shall remain responsible for clearing it. Binding-owned timeout notification and cleanup shall follow the binding's declared interruption protocol. Cancellation latency shall depend on checkpoint placement and computation progress rather than a promised elapsed-time bound.
-
8. Controlled runtime operation and resource use PPL-HLR-000008 PPL shall define its initialization, cleanup, runtime configuration and failure behavior, and shall provide the supported mechanisms for controlling long-running computations, so that clients can use the library without violating its documented object and resource-lifetime rules.
-
Within the library/thread lifecycle of 🔗 3. Thread initialization, default state and finalization, make_interruptible shall return a callable that initializes PPL thread state, registers the calling thread for interruption, invokes the wrapped callable with forwarded arguments and unregisters the thread before finalizing thread state. Return values and exceptions shall propagate to the caller. The registration shall also end during exception unwinding. A registration lifetime shall not overlap another PPL thread-initialization lifetime on the same thread.
interrupt_thread shall serialize lookup against registration and removal. It shall return false when the supplied thread has no active registration. Otherwise it shall replace the thread's registration-scoped request and return true. A null request withdraws that request. Unregistering shall also withdraw the request. Both operations shall leave the separate caller-owned slot in 🔗 7. Caller-owned abandonment request and exception object intact. Acceptance does not guarantee that a checkpoint will occur before normal completion. At an abandonment checkpoint the requested Throwable follows 🔗 8. Cooperative abandonment checkpoint ordering and propagation. A non-null supplied object remains caller-owned and shall outlive all possible accesses by the target thread; requesters shall synchronize its lifetime and any concurrent calls themselves. The registry and its mutex shall remain alive until all registered calls and requesters have completed. Internal registration guards shall not be copied, moved or assigned.