Parma Polyhedra Library requirements
Byte-stream adapters
  • 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.

    • PPL-HLR-000008
      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.

  • PPL-LLR-000311
    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.

    • PPL-HLR-000007
      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.

PPL-SPEC-001573
1. Callback input protocol, lookahead and single-character putback PPL-SPEC-001573

A c_streambuf shall begin without cached input or unget history and shall release its own buffer state on destruction without owning the derived transport. A read callback shall borrow its output array for that call only, return a count in the requested range, write exactly that prefix and consume the corresponding source prefix. Positive partial results shall have the same remaining logical input and future availability as successive one-byte reads. Zero for a positive request shall be the same failure as a one-byte request in that entry state, without making later transfer availability depend on the requested size. A later client operation may succeed after such refusal.

Peeking shall retain the next byte without logically consuming it; repeated peeks shall return that byte. Single and bulk reads shall consume cached input first and then callbacks until the request is met or the callback returns zero. They shall distinguish every unsigned-byte value from EOF and return the actual count. Counts shall be nonnegative, and positive requests shall have sufficient output storage; a zero request shall access no storage or callback and preserve cached input and unget history.

A successful single or nonempty bulk read shall make its final byte available for one unget. Explicit putback shall instead supply its requested byte. Putback shall fail without changing an already pending byte; no-history unget shall fail without inventing input. Read failure may discard old history. The default callback shall provide no input. Direct streambuf operations shall propagate callback exceptions; partial effects before an exception shall not be rolled back, and a cached byte already transferred need not be restored.

  • 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.

    • PPL-HLR-000008
      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.

  • PPL-LLR-000311
    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.

    • PPL-HLR-000007
      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.

PPL-SPEC-001574
2. Callback output, synchronization and failure propagation PPL-SPEC-001574

A c_streambuf write callback shall borrow its input array only for the call, return a count in the requested range and transfer exactly that prefix. Successive positive partial transfers shall be accepted until the request is complete or zero reports refusal. A callback result of zero for a positive request shall have the same failure and subsequent transfer availability as a one-byte request in that entry state; positive results shall preserve the same subsequent accepted byte sequences as successive one-byte writes. Positive requests shall have sufficient readable storage; counts shall be nonnegative. A zero request shall transfer nothing and call no write callback, admitting a null pointer.

Single-character output shall report the supplied byte on success and EOF on refusal. An overflow request containing EOF shall synchronize, returning non-EOF exactly when synchronization succeeds. sync() shall return the synchronization callback's result. Defaults shall refuse output and report successful synchronization. Output and synchronization shall preserve cached input and unget history. Direct operations shall propagate callback exceptions without promising rollback of previously transferred output. Standard istream/ostream state and exception masks shall govern use through those streams.

  • 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.

    • PPL-HLR-000008
      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.

  • PPL-LLR-000311
    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.

    • PPL-HLR-000007
      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.

PPL-SPEC-001575
3. Borrowed stdio input and putback PPL-SPEC-001575

stdiobuf(file) shall borrow a nonnull open FILE* without closing it on destruction. The caller shall keep it open, provide permissions for requested operations, and observe stdio update-stream sequencing rules. Input shall use the file's byte sequence, distinguish every unsigned byte from EOF, and return the actual number read into the supplied prefix. Bulk counts shall be nonnegative and the supplied output array shall cover the requested count. Peeking shall leave its byte pending in the file through stdio putback. A successful read shall retain its last byte for one unget; a failed read may discard that history. Explicit putback shall request the specified byte even without prior history, using stdio's ungetc result. No-history unget shall fail without inventing a byte. Additional putback capacity beyond stdio's guarantee shall not be required. Input failures shall remain visible through EOF/short counts and the file's stdio state.

  • 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.

    • PPL-HLR-000008
      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.

  • PPL-LLR-000311
    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.

    • PPL-HLR-000007
      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.

PPL-SPEC-001576
4. Borrowed stdio output and synchronization PPL-SPEC-001576

Under the file-lifetime and stdio sequencing conditions in 🔗 3. Borrowed stdio input and putback, bulk output through stdiobuf shall write the supplied byte prefix and return stdio's actual transferred count. Counts shall be nonnegative and the readable input array shall cover the request. Ordinary single-byte overflow shall return the stdio byte-write result. EOF overflow shall flush the file and return non-EOF exactly on success; sync() shall return the result of flushing. The adapter shall not close the file. Failures shall be observable as short counts, EOF or failed synchronization; standard ostream state and exception masks shall apply when used through an ostream. No rollback of transferred bytes shall be required.