Parma Polyhedra Library requirements
Runtime low-level requirements
1. Initialization and finalization lifecycle UID: PPL-LLR-000131 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis RELATIONS (Parent): RELATIONS (Child): STATEMENT:

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.

RATIONALE:

Numerical constants, resource handlers, and per-thread state must be available throughout the supported lifetime of library objects. Library-level transitions and object-level cleanup are related but distinct: a new period of initialization does not by itself establish validity of an old handle or view.

COMMENT:

Verification covers native shared-facility initialization and finalization ownership, including coordination across translation units and the effects of lifecycle transitions on object and view validity. Lifecycle checks and initialization-path analysis verify availability over supported use periods. Interface-specific lifecycle entry protocols remain in their binding requirements; their object-lifetime rules and cleanup order must account for these transitions. Thread-specific protocols are complemented by 🔗 6. Thread entry and shared-facility use, and binding interruption state is covered by 🔗 4. Binding interruption support and state changes. No automatic stale-handle checks, prompt managed cleanup or detection of every invalid lifecycle use is implied.

VERIFICATION_CRITERIA:

Inspect initialization ownership and counter transitions. Exercise clients using several translation units, repeated object lifetimes, and supported thread configurations. Confirm that finalization occurs after the last participating initialization owner and that per-thread initialization establishes usable numerical state. Review native and binding protocols for the validity of owned objects and borrowed views, explicit and managed cleanup ordering, active threads and pending interruptions at finalization and reinitialization. Check permitted lifecycle sequences and cleanup effects without treating a stale handle as revived by reinitialization or requiring automatic diagnosis of use outside the stated preconditions.

SOURCE:

src/Init_defs.hh: initialization-counter and thread-initialization contracts. src/Init.cc and src/initializer.hh: first-owner initialization, last-owner finalization, and thread-specific initialization. tests/Polyhedron/threadsafe1.cc and tests/Polyhedron/threadsafe2.cc: thread-specific use scenarios.

PPL-LLR-000132
2. Floating-point rounding-state exchange UID: PPL-LLR-000132 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis RELATIONS (Parent): RELATIONS (Child): STATEMENT:

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.

RATIONALE:

The library and its client may require different floating-point environments, so ownership of rounding state must be explicit.

COMMENT:

Verification covers saving, establishing and restoring floating-point rounding state on supported platforms. Rounding-state tests and platform-path inspection verify the exchange. Clients must reestablish the PPL-required state before further affected PPL computations. Per-thread state ownership follows 🔗 6. Thread entry and shared-facility use; native floating-point availability alone does not imply that every platform provides every rounding-control facility.

VERIFICATION_CRITERIA:

Start from each supported rounding direction, initialize the runtime, exchange between the saved and PPL-required states, and check both the rounding state and representative directed-rounding computations. Inspect supported thread configurations for correct per-thread saved state. Treat platforms without rounding control according to their documented configuration restrictions.

SOURCE:

src/Init_defs.hh: rounding setup, restoration, and client-use preconditions. src/Init_inlines.hh: platform-conditional rounding exchange. src/Init.cc: saved thread rounding state and initialization/finalization changes.

  • PPL-SPEC-001518
    4. C rounding and irrational precision controls UID: PPL-SPEC-001518 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Rounding controls shall apply the native PPL rounding mode or restore the calling thread's saved preceding mode. The precision query shall assign the current irrational-result precision, and setting shall apply the native admission and precision semantics. These controls shall not change exact integer or rational values. Calls involving floating arithmetic shall satisfy the applicable native rounding and thread-entry prerequisites.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C forwarding must retain thread-local numerical prerequisites.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_rounding_for_PPL(void);
    int ppl_restore_pre_PPL_rounding(void);
    int ppl_irrational_precision(unsigned *p);
    int ppl_set_irrational_precision(unsigned p);
    
    VERIFICATION_CRITERIA:

    Check precision round trips, invalid settings where supported and rounding restoration/control in configured floating-point environments.

    SOURCE:

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

  • 4. Rounding-state exchange during an initialized thread lifetime UID: PPL-SPEC-000034 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    A client may need its own rounding direction between PPL computations. Saving once per thread lifetime gives restoration a stable meaning across repeated exchanges.

    INTERFACE:

    Public rounding exchange declarations:

    namespace Parma_Polyhedra_Library {
      void set_rounding_for_PPL();
      void restore_pre_PPL_rounding();
    }
    

    Availability of platform rounding control is selected by the configured PPL_CAN_CONTROL_FPU value.

    VERIFICATION_CRITERIA:

    For every supported incoming rounding direction, initialize the thread, check upward rounding and a representative upward-rounded computation, exchange to the saved direction and back repeatedly, and confirm restoration after finalization. Include nested library owners to ensure that they do not replace the saved direction. In a thread-safe configuration check worker restoration and isolation from the calling thread. Compile and inspect the no-control configuration so that no unsupported rounding-control operation is introduced. Keep rounding direction checks distinct from claims about the complete floating-point environment. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Init_defs.hh and src/Init_inlines.hh: rounding-exchange interface. src/Init.cc: saving, establishing and restoring thread rounding direction. tests/initialization1.cc: repeated lifetimes and direction exchanges. tests/initialization2.cc: restoration by a direct worker guard. tests/initialization3.cc: restoration after failed thread construction. tests/initialization4.cc: restoration after native rounding state changes. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

3. Failure and resource safety UID: PPL-LLR-000133 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis RELATIONS (Parent): RELATIONS (Child): STATEMENT:

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.

RATIONALE:

Clients must be able to recover from reported failures without leaking library-owned resources or relying on stronger object-state guarantees than the operation provides.

COMMENT:

Verification covers resource ownership, construction cleanup, output validity and surviving-object state for each supported recoverable failure path, including binding conversion failures. Failure injection and direct ownership/invariant analysis verify the allocated contracts. Failure-state guarantees are operation-specific. Failure-state guarantees do not imply universal rollback, strong exception safety, recovery from undefined behavior, or recovery after process termination.

VERIFICATION_CRITERIA:

Use allocation-failure injection and supported numerical or interruption failures to inspect temporary-resource cleanup, surviving object invariants, and output ownership and validity through the supported reporting channels. Check operations with a documented unchanged-state guarantee against that promise and other operations against their documented valid-state or destruction-only guarantee. Include failed construction or wrapper creation after partial acquisition and repeated cleanup after failure.

SOURCE:

doc/definitions.dox: main-feature exception-safety claim and the destruction-only postcondition for recycled constraint or congruence systems after successful or exceptional return. src/Threshold_Watcher_defs.hh and src/Threshold_Watcher_inlines.hh: failed-construction cleanup and preservation of existing pending watchers. src/Watchdog_defs.hh and src/Watchdog_inlines.hh: ownership of handlers, failed-construction cleanup, and documented exceptional paths. src/CO_Tree_templates.hh: partial-construction cleanup on exceptions.

  • PPL-SPEC-001554
    1. C generated domain values and conversions UID: PPL-SPEC-001554 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Domain constructors, copying, assignment, exchange, deletion and recycling shall preserve the corresponding native domain values, topology and complexity-policy guarantees. Each successful new result shall be independently owned. Borrowed inputs shall obey their documented lifetime and mutation restrictions. Failure cleanup shall not leak partially acquired owned results.

    Complexity-taking constructors shall accept the public polynomial, simplex and any-complexity selectors. An unrecognized selector shall report PPL_ERROR_INVALID_ARGUMENT without constructing a result or changing the output handle.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_delete_Polyhedron(ppl_const_Polyhedron_t ph);
    int ppl_new_C_Polyhedron_from_space_dimension(ppl_Polyhedron_t *pph,
                                                  ppl_dimension_type d, int empty);
    int ppl_new_NNC_Polyhedron_from_space_dimension(ppl_Polyhedron_t *pph,
                                                    ppl_dimension_type d,
                                                    int empty);
    int ppl_new_C_Polyhedron_from_C_Polyhedron(ppl_Polyhedron_t *pph,
                                               ppl_const_Polyhedron_t ph);
    int ppl_new_NNC_Polyhedron_from_C_Polyhedron(ppl_Polyhedron_t *pph,
                                                 ppl_const_Polyhedron_t ph);
    int ppl_new_C_Polyhedron_from_NNC_Polyhedron(ppl_Polyhedron_t *pph,
                                                 ppl_const_Polyhedron_t ph);
    int ppl_new_NNC_Polyhedron_from_NNC_Polyhedron(ppl_Polyhedron_t *pph,
                                                   ppl_const_Polyhedron_t ph);
    int ppl_new_C_Polyhedron_from_Grid(ppl_Polyhedron_t *pph, ppl_const_Grid_t ph);
    int ppl_new_NNC_Polyhedron_from_Grid(ppl_Polyhedron_t *pph,
                                         ppl_const_Grid_t ph);
    int ppl_new_C_Polyhedron_from_Rational_Box(ppl_Polyhedron_t *pph,
                                               ppl_const_Rational_Box_t ph);
    int ppl_new_NNC_Polyhedron_from_Rational_Box(ppl_Polyhedron_t *pph,
                                                 ppl_const_Rational_Box_t ph);
    int ppl_new_C_Polyhedron_from_BD_Shape_mpz_class(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_mpz_class(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_C_Polyhedron_from_BD_Shape_mpq_class(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_mpq_class(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_mpz_class(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_mpz_class(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_mpq_class(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_mpq_class(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_C_Polyhedron_from_Double_Box(ppl_Polyhedron_t *pph,
                                             ppl_const_Double_Box_t ph);
    int ppl_new_NNC_Polyhedron_from_Double_Box(ppl_Polyhedron_t *pph,
                                               ppl_const_Double_Box_t ph);
    int ppl_new_C_Polyhedron_from_BD_Shape_double(ppl_Polyhedron_t *pph,
                                                  ppl_const_BD_Shape_double_t ph);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_double(ppl_Polyhedron_t *pph,
                                                    ppl_const_BD_Shape_double_t ph);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_double(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_double(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_C_Polyhedron_from_C_Polyhedron_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_C_Polyhedron_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_NNC_Polyhedron_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_NNC_Polyhedron_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_Grid_with_complexity(ppl_Polyhedron_t *pph,
                                                       ppl_const_Grid_t ph,
                                                       int complexity);
    int ppl_new_NNC_Polyhedron_from_Grid_with_complexity(ppl_Polyhedron_t *pph,
                                                         ppl_const_Grid_t ph,
                                                         int complexity);
    int ppl_new_C_Polyhedron_from_Rational_Box_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_Rational_Box_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_BD_Shape_mpz_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_mpz_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_BD_Shape_mpq_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_mpq_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_C_Polyhedron_from_Double_Box_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_Double_Box_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_BD_Shape_double_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_NNC_Polyhedron_from_BD_Shape_double_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_C_Polyhedron_from_Octagonal_Shape_double_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_NNC_Polyhedron_from_Octagonal_Shape_double_with_complexity(
        ppl_Polyhedron_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_C_Polyhedron_from_Constraint_System(
        ppl_Polyhedron_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_NNC_Polyhedron_from_Constraint_System(
        ppl_Polyhedron_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_C_Polyhedron_from_Congruence_System(
        ppl_Polyhedron_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_NNC_Polyhedron_from_Congruence_System(
        ppl_Polyhedron_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_C_Polyhedron_from_Generator_System(ppl_Polyhedron_t *pph,
                                                   ppl_const_Generator_System_t cs);
    int ppl_new_NNC_Polyhedron_from_Generator_System(
        ppl_Polyhedron_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_C_Polyhedron_recycle_Constraint_System(ppl_Polyhedron_t *pph,
                                                       ppl_Constraint_System_t cs);
    int ppl_new_NNC_Polyhedron_recycle_Constraint_System(
        ppl_Polyhedron_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_C_Polyhedron_recycle_Congruence_System(ppl_Polyhedron_t *pph,
                                                       ppl_Congruence_System_t cs);
    int ppl_new_NNC_Polyhedron_recycle_Congruence_System(
        ppl_Polyhedron_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_C_Polyhedron_recycle_Generator_System(ppl_Polyhedron_t *pph,
                                                      ppl_Generator_System_t cs);
    int ppl_new_NNC_Polyhedron_recycle_Generator_System(ppl_Polyhedron_t *pph,
                                                        ppl_Generator_System_t cs);
    int ppl_assign_C_Polyhedron_from_C_Polyhedron(ppl_Polyhedron_t dst,
                                                  ppl_const_Polyhedron_t src);
    int ppl_assign_NNC_Polyhedron_from_NNC_Polyhedron(ppl_Polyhedron_t dst,
                                                      ppl_const_Polyhedron_t src);
    int ppl_delete_Grid(ppl_const_Grid_t ph);
    int ppl_new_Grid_from_space_dimension(ppl_Grid_t *pph, ppl_dimension_type d,
                                          int empty);
    int ppl_new_Grid_from_C_Polyhedron(ppl_Grid_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Grid_from_NNC_Polyhedron(ppl_Grid_t *pph,
                                         ppl_const_Polyhedron_t ph);
    int ppl_new_Grid_from_Grid(ppl_Grid_t *pph, ppl_const_Grid_t ph);
    int ppl_new_Grid_from_Rational_Box(ppl_Grid_t *pph,
                                       ppl_const_Rational_Box_t ph);
    int ppl_new_Grid_from_BD_Shape_mpz_class(ppl_Grid_t *pph,
                                             ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Grid_from_BD_Shape_mpq_class(ppl_Grid_t *pph,
                                             ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Grid_from_Octagonal_Shape_mpz_class(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Grid_from_Octagonal_Shape_mpq_class(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Grid_from_Double_Box(ppl_Grid_t *pph, ppl_const_Double_Box_t ph);
    int ppl_new_Grid_from_BD_Shape_double(ppl_Grid_t *pph,
                                          ppl_const_BD_Shape_double_t ph);
    int ppl_new_Grid_from_Octagonal_Shape_double(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Grid_from_C_Polyhedron_with_complexity(ppl_Grid_t *pph,
                                                       ppl_const_Polyhedron_t ph,
                                                       int complexity);
    int ppl_new_Grid_from_NNC_Polyhedron_with_complexity(ppl_Grid_t *pph,
                                                         ppl_const_Polyhedron_t ph,
                                                         int complexity);
    int ppl_new_Grid_from_Grid_with_complexity(ppl_Grid_t *pph, ppl_const_Grid_t ph,
                                               int complexity);
    int ppl_new_Grid_from_Rational_Box_with_complexity(ppl_Grid_t *pph,
                                                       ppl_const_Rational_Box_t ph,
                                                       int complexity);
    int ppl_new_Grid_from_BD_Shape_mpz_class_with_complexity(
        ppl_Grid_t *pph, ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Grid_from_BD_Shape_mpq_class_with_complexity(
        ppl_Grid_t *pph, ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Grid_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Grid_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Grid_from_Double_Box_with_complexity(ppl_Grid_t *pph,
                                                     ppl_const_Double_Box_t ph,
                                                     int complexity);
    int ppl_new_Grid_from_BD_Shape_double_with_complexity(
        ppl_Grid_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_Grid_from_Octagonal_Shape_double_with_complexity(
        ppl_Grid_t *pph, ppl_const_Octagonal_Shape_double_t ph, int complexity);
    int ppl_new_Grid_from_Constraint_System(ppl_Grid_t *pph,
                                            ppl_const_Constraint_System_t cs);
    int ppl_new_Grid_from_Congruence_System(ppl_Grid_t *pph,
                                            ppl_const_Congruence_System_t cs);
    int ppl_new_Grid_recycle_Constraint_System(ppl_Grid_t *pph,
                                               ppl_Constraint_System_t cs);
    int ppl_new_Grid_recycle_Congruence_System(ppl_Grid_t *pph,
                                               ppl_Congruence_System_t cs);
    int ppl_assign_Grid_from_Grid(ppl_Grid_t dst, ppl_const_Grid_t src);
    int ppl_delete_Rational_Box(ppl_const_Rational_Box_t ph);
    int ppl_new_Rational_Box_from_space_dimension(ppl_Rational_Box_t *pph,
                                                  ppl_dimension_type d, int empty);
    int ppl_new_Rational_Box_from_C_Polyhedron(ppl_Rational_Box_t *pph,
                                               ppl_const_Polyhedron_t ph);
    int ppl_new_Rational_Box_from_NNC_Polyhedron(ppl_Rational_Box_t *pph,
                                                 ppl_const_Polyhedron_t ph);
    int ppl_new_Rational_Box_from_Grid(ppl_Rational_Box_t *pph,
                                       ppl_const_Grid_t ph);
    int ppl_new_Rational_Box_from_Rational_Box(ppl_Rational_Box_t *pph,
                                               ppl_const_Rational_Box_t ph);
    int ppl_new_Rational_Box_from_BD_Shape_mpz_class(
        ppl_Rational_Box_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Rational_Box_from_BD_Shape_mpq_class(
        ppl_Rational_Box_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Rational_Box_from_Octagonal_Shape_mpz_class(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Rational_Box_from_Octagonal_Shape_mpq_class(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Rational_Box_from_Double_Box(ppl_Rational_Box_t *pph,
                                             ppl_const_Double_Box_t ph);
    int ppl_new_Rational_Box_from_BD_Shape_double(ppl_Rational_Box_t *pph,
                                                  ppl_const_BD_Shape_double_t ph);
    int ppl_new_Rational_Box_from_Octagonal_Shape_double(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Rational_Box_from_C_Polyhedron_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_Rational_Box_from_NNC_Polyhedron_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_Rational_Box_from_Grid_with_complexity(ppl_Rational_Box_t *pph,
                                                       ppl_const_Grid_t ph,
                                                       int complexity);
    int ppl_new_Rational_Box_from_Rational_Box_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_Rational_Box_from_BD_Shape_mpz_class_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Rational_Box_from_BD_Shape_mpq_class_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Rational_Box_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Rational_Box_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Rational_Box_from_Double_Box_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_Rational_Box_from_BD_Shape_double_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_Rational_Box_from_Octagonal_Shape_double_with_complexity(
        ppl_Rational_Box_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_Rational_Box_from_Constraint_System(
        ppl_Rational_Box_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_Rational_Box_from_Congruence_System(
        ppl_Rational_Box_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_Rational_Box_from_Generator_System(ppl_Rational_Box_t *pph,
                                                   ppl_const_Generator_System_t cs);
    int ppl_new_Rational_Box_recycle_Constraint_System(ppl_Rational_Box_t *pph,
                                                       ppl_Constraint_System_t cs);
    int ppl_new_Rational_Box_recycle_Congruence_System(ppl_Rational_Box_t *pph,
                                                       ppl_Congruence_System_t cs);
    int ppl_new_Rational_Box_recycle_Generator_System(ppl_Rational_Box_t *pph,
                                                      ppl_Generator_System_t cs);
    int ppl_assign_Rational_Box_from_Rational_Box(ppl_Rational_Box_t dst,
                                                  ppl_const_Rational_Box_t src);
    int ppl_delete_BD_Shape_mpz_class(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_mpz_class_from_space_dimension(
        ppl_BD_Shape_mpz_class_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_BD_Shape_mpz_class_from_C_Polyhedron(ppl_BD_Shape_mpz_class_t *pph,
                                                     ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_mpz_class_from_NNC_Polyhedron(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Grid(ppl_BD_Shape_mpz_class_t *pph,
                                             ppl_const_Grid_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Rational_Box(ppl_BD_Shape_mpz_class_t *pph,
                                                     ppl_const_Rational_Box_t ph);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_mpz_class(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_mpq_class(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_mpz_class(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_mpq_class(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Double_Box(ppl_BD_Shape_mpz_class_t *pph,
                                                   ppl_const_Double_Box_t ph);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_double(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_double(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_BD_Shape_mpz_class_from_C_Polyhedron_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_mpz_class_from_NNC_Polyhedron_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Grid_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Rational_Box_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Double_Box_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_BD_Shape_mpz_class_from_BD_Shape_double_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_BD_Shape_double_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Octagonal_Shape_double_with_complexity(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpz_class_from_Constraint_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_BD_Shape_mpz_class_from_Congruence_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_BD_Shape_mpz_class_from_Generator_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_BD_Shape_mpz_class_recycle_Constraint_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_BD_Shape_mpz_class_recycle_Congruence_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_BD_Shape_mpz_class_recycle_Generator_System(
        ppl_BD_Shape_mpz_class_t *pph, ppl_Generator_System_t cs);
    int ppl_assign_BD_Shape_mpz_class_from_BD_Shape_mpz_class(
        ppl_BD_Shape_mpz_class_t dst, ppl_const_BD_Shape_mpz_class_t src);
    int ppl_delete_BD_Shape_mpq_class(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_mpq_class_from_space_dimension(
        ppl_BD_Shape_mpq_class_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_BD_Shape_mpq_class_from_C_Polyhedron(ppl_BD_Shape_mpq_class_t *pph,
                                                     ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_mpq_class_from_NNC_Polyhedron(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Grid(ppl_BD_Shape_mpq_class_t *pph,
                                             ppl_const_Grid_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Rational_Box(ppl_BD_Shape_mpq_class_t *pph,
                                                     ppl_const_Rational_Box_t ph);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_mpz_class(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_mpq_class(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_mpz_class(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_mpq_class(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Double_Box(ppl_BD_Shape_mpq_class_t *pph,
                                                   ppl_const_Double_Box_t ph);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_double(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_double(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_BD_Shape_mpq_class_from_C_Polyhedron_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_mpq_class_from_NNC_Polyhedron_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Grid_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Rational_Box_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Double_Box_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_BD_Shape_mpq_class_from_BD_Shape_double_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_BD_Shape_double_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Octagonal_Shape_double_with_complexity(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_BD_Shape_mpq_class_from_Constraint_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_BD_Shape_mpq_class_from_Congruence_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_BD_Shape_mpq_class_from_Generator_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_BD_Shape_mpq_class_recycle_Constraint_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_BD_Shape_mpq_class_recycle_Congruence_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_BD_Shape_mpq_class_recycle_Generator_System(
        ppl_BD_Shape_mpq_class_t *pph, ppl_Generator_System_t cs);
    int ppl_assign_BD_Shape_mpq_class_from_BD_Shape_mpq_class(
        ppl_BD_Shape_mpq_class_t dst, ppl_const_BD_Shape_mpq_class_t src);
    int ppl_delete_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_space_dimension(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_Octagonal_Shape_mpz_class_from_C_Polyhedron(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_NNC_Polyhedron(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Grid(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Grid_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Rational_Box(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Rational_Box_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_mpz_class(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_mpq_class(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_mpz_class(
        ppl_Octagonal_Shape_mpz_class_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_mpq_class(
        ppl_Octagonal_Shape_mpz_class_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Double_Box(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Double_Box_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_double(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_double(
        ppl_Octagonal_Shape_mpz_class_t *pph,
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_mpz_class_from_C_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_NNC_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Grid_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Rational_Box_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Rational_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Double_Box_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Double_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_BD_Shape_double_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_BD_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Octagonal_Shape_double_with_complexity(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpz_class_from_Constraint_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_mpz_class_from_Congruence_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_mpz_class_from_Generator_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_Octagonal_Shape_mpz_class_recycle_Constraint_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_mpz_class_recycle_Congruence_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_mpz_class_recycle_Generator_System(
        ppl_Octagonal_Shape_mpz_class_t *pph, ppl_Generator_System_t cs);
    int ppl_assign_Octagonal_Shape_mpz_class_from_Octagonal_Shape_mpz_class(
        ppl_Octagonal_Shape_mpz_class_t dst,
        ppl_const_Octagonal_Shape_mpz_class_t src);
    int ppl_delete_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_space_dimension(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_Octagonal_Shape_mpq_class_from_C_Polyhedron(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_NNC_Polyhedron(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Grid(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Grid_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Rational_Box(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Rational_Box_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_mpz_class(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_mpq_class(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_mpz_class(
        ppl_Octagonal_Shape_mpq_class_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_mpq_class(
        ppl_Octagonal_Shape_mpq_class_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Double_Box(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Double_Box_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_double(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_double(
        ppl_Octagonal_Shape_mpq_class_t *pph,
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_mpq_class_from_C_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_NNC_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Grid_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Rational_Box_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Rational_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Double_Box_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Double_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_BD_Shape_double_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_BD_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Octagonal_Shape_double_with_complexity(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_mpq_class_from_Constraint_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_mpq_class_from_Congruence_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_mpq_class_from_Generator_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_Octagonal_Shape_mpq_class_recycle_Constraint_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_mpq_class_recycle_Congruence_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_mpq_class_recycle_Generator_System(
        ppl_Octagonal_Shape_mpq_class_t *pph, ppl_Generator_System_t cs);
    int ppl_assign_Octagonal_Shape_mpq_class_from_Octagonal_Shape_mpq_class(
        ppl_Octagonal_Shape_mpq_class_t dst,
        ppl_const_Octagonal_Shape_mpq_class_t src);
    int ppl_delete_Constraints_Product_C_Polyhedron_Grid(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_space_dimension(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_dimension_type d,
        int empty);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_C_Polyhedron(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Polyhedron_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_NNC_Polyhedron(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Polyhedron_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Grid(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_const_Grid_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Rational_Box(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Rational_Box_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_mpz_class(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_mpq_class(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_mpz_class(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_mpq_class(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Double_Box(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Double_Box_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_double(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_double_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_double(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Constraints_Product_C_Polyhedron_Grid(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_C_Polyhedron_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_NNC_Polyhedron_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Grid_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_const_Grid_t ph,
        int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Rational_Box_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_mpz_class_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_mpq_class_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Double_Box_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph, ppl_const_Double_Box_t ph,
        int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_BD_Shape_double_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Octagonal_Shape_double_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Octagonal_Shape_double_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Constraints_Product_C_Polyhedron_Grid_with_complexity(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph, int complexity);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Constraint_System(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Constraint_System_t cs);
    int ppl_new_Constraints_Product_C_Polyhedron_Grid_from_Congruence_System(
        ppl_Constraints_Product_C_Polyhedron_Grid_t *pph,
        ppl_const_Congruence_System_t cs);
    int ppl_delete_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_space_dimension(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph,
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_Pointset_Powerset_C_Polyhedron_with_complexity(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph,
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, int complexity);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_C_Polyhedron_with_complexity(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_Constraint_System(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph,
        ppl_const_Constraint_System_t cs);
    int ppl_new_Pointset_Powerset_C_Polyhedron_from_Congruence_System(
        ppl_Pointset_Powerset_C_Polyhedron_t *pph,
        ppl_const_Congruence_System_t cs);
    int ppl_delete_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_space_dimension(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph, ppl_dimension_type d,
        int empty);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_Pointset_Powerset_NNC_Polyhedron(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_NNC_Polyhedron(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_Pointset_Powerset_NNC_Polyhedron_with_complexity(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, int complexity);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_NNC_Polyhedron_with_complexity(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_Constraint_System(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph,
        ppl_const_Constraint_System_t cs);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_from_Congruence_System(
        ppl_Pointset_Powerset_NNC_Polyhedron_t *pph,
        ppl_const_Congruence_System_t cs);
    int ppl_delete_Double_Box(ppl_const_Double_Box_t ph);
    int ppl_new_Double_Box_from_space_dimension(ppl_Double_Box_t *pph,
                                                ppl_dimension_type d, int empty);
    int ppl_new_Double_Box_from_C_Polyhedron(ppl_Double_Box_t *pph,
                                             ppl_const_Polyhedron_t ph);
    int ppl_new_Double_Box_from_NNC_Polyhedron(ppl_Double_Box_t *pph,
                                               ppl_const_Polyhedron_t ph);
    int ppl_new_Double_Box_from_Grid(ppl_Double_Box_t *pph, ppl_const_Grid_t ph);
    int ppl_new_Double_Box_from_Rational_Box(ppl_Double_Box_t *pph,
                                             ppl_const_Rational_Box_t ph);
    int ppl_new_Double_Box_from_BD_Shape_mpz_class(
        ppl_Double_Box_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Double_Box_from_BD_Shape_mpq_class(
        ppl_Double_Box_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Double_Box_from_Octagonal_Shape_mpz_class(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Double_Box_from_Octagonal_Shape_mpq_class(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Double_Box_from_Double_Box(ppl_Double_Box_t *pph,
                                           ppl_const_Double_Box_t ph);
    int ppl_new_Double_Box_from_BD_Shape_double(ppl_Double_Box_t *pph,
                                                ppl_const_BD_Shape_double_t ph);
    int ppl_new_Double_Box_from_Octagonal_Shape_double(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Double_Box_from_C_Polyhedron_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_Double_Box_from_NNC_Polyhedron_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_Double_Box_from_Grid_with_complexity(ppl_Double_Box_t *pph,
                                                     ppl_const_Grid_t ph,
                                                     int complexity);
    int ppl_new_Double_Box_from_Rational_Box_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_Double_Box_from_BD_Shape_mpz_class_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_new_Double_Box_from_BD_Shape_mpq_class_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_new_Double_Box_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Double_Box_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Double_Box_from_Double_Box_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_Double_Box_from_BD_Shape_double_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_Double_Box_from_Octagonal_Shape_double_with_complexity(
        ppl_Double_Box_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_Double_Box_from_Constraint_System(ppl_Double_Box_t *pph,
                                                  ppl_const_Constraint_System_t cs);
    int ppl_new_Double_Box_from_Congruence_System(ppl_Double_Box_t *pph,
                                                  ppl_const_Congruence_System_t cs);
    int ppl_new_Double_Box_from_Generator_System(ppl_Double_Box_t *pph,
                                                 ppl_const_Generator_System_t cs);
    int ppl_new_Double_Box_recycle_Constraint_System(ppl_Double_Box_t *pph,
                                                     ppl_Constraint_System_t cs);
    int ppl_new_Double_Box_recycle_Congruence_System(ppl_Double_Box_t *pph,
                                                     ppl_Congruence_System_t cs);
    int ppl_new_Double_Box_recycle_Generator_System(ppl_Double_Box_t *pph,
                                                    ppl_Generator_System_t cs);
    int ppl_assign_Double_Box_from_Double_Box(ppl_Double_Box_t dst,
                                              ppl_const_Double_Box_t src);
    int ppl_delete_BD_Shape_double(ppl_const_BD_Shape_double_t ph);
    int ppl_new_BD_Shape_double_from_space_dimension(ppl_BD_Shape_double_t *pph,
                                                     ppl_dimension_type d,
                                                     int empty);
    int ppl_new_BD_Shape_double_from_C_Polyhedron(ppl_BD_Shape_double_t *pph,
                                                  ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_double_from_NNC_Polyhedron(ppl_BD_Shape_double_t *pph,
                                                    ppl_const_Polyhedron_t ph);
    int ppl_new_BD_Shape_double_from_Grid(ppl_BD_Shape_double_t *pph,
                                          ppl_const_Grid_t ph);
    int ppl_new_BD_Shape_double_from_Rational_Box(ppl_BD_Shape_double_t *pph,
                                                  ppl_const_Rational_Box_t ph);
    int ppl_new_BD_Shape_double_from_BD_Shape_mpz_class(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_double_from_BD_Shape_mpq_class(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_mpz_class(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_mpq_class(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_BD_Shape_double_from_Double_Box(ppl_BD_Shape_double_t *pph,
                                                ppl_const_Double_Box_t ph);
    int ppl_new_BD_Shape_double_from_BD_Shape_double(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_double(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_BD_Shape_double_from_C_Polyhedron_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_NNC_Polyhedron_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Polyhedron_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_Grid_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_Rational_Box_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Rational_Box_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_BD_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_double_from_BD_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_BD_Shape_double_from_Double_Box_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Double_Box_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_BD_Shape_double_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_BD_Shape_double_t ph, int complexity);
    int ppl_new_BD_Shape_double_from_Octagonal_Shape_double_with_complexity(
        ppl_BD_Shape_double_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_BD_Shape_double_from_Constraint_System(
        ppl_BD_Shape_double_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_BD_Shape_double_from_Congruence_System(
        ppl_BD_Shape_double_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_BD_Shape_double_from_Generator_System(
        ppl_BD_Shape_double_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_BD_Shape_double_recycle_Constraint_System(
        ppl_BD_Shape_double_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_BD_Shape_double_recycle_Congruence_System(
        ppl_BD_Shape_double_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_BD_Shape_double_recycle_Generator_System(ppl_BD_Shape_double_t *pph,
                                                         ppl_Generator_System_t cs);
    int ppl_assign_BD_Shape_double_from_BD_Shape_double(
        ppl_BD_Shape_double_t dst, ppl_const_BD_Shape_double_t src);
    int ppl_delete_Octagonal_Shape_double(ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_double_from_space_dimension(
        ppl_Octagonal_Shape_double_t *pph, ppl_dimension_type d, int empty);
    int ppl_new_Octagonal_Shape_double_from_C_Polyhedron(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_double_from_NNC_Polyhedron(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Polyhedron_t ph);
    int ppl_new_Octagonal_Shape_double_from_Grid(ppl_Octagonal_Shape_double_t *pph,
                                                 ppl_const_Grid_t ph);
    int ppl_new_Octagonal_Shape_double_from_Rational_Box(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Rational_Box_t ph);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_mpz_class(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_mpq_class(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_mpz_class(
        ppl_Octagonal_Shape_double_t *pph,
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_mpq_class(
        ppl_Octagonal_Shape_double_t *pph,
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Octagonal_Shape_double_from_Double_Box(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Double_Box_t ph);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_double(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_double(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Octagonal_Shape_double_from_C_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_NNC_Polyhedron_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Polyhedron_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Grid_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Grid_t ph, int complexity);
    int ppl_new_Octagonal_Shape_double_from_Rational_Box_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Rational_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_mpz_class_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpz_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_mpq_class_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Octagonal_Shape_mpq_class_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Double_Box_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Double_Box_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_BD_Shape_double_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_BD_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Octagonal_Shape_double_with_complexity(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Octagonal_Shape_double_t ph,
        int complexity);
    int ppl_new_Octagonal_Shape_double_from_Constraint_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_double_from_Congruence_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_double_from_Generator_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_const_Generator_System_t cs);
    int ppl_new_Octagonal_Shape_double_recycle_Constraint_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_Constraint_System_t cs);
    int ppl_new_Octagonal_Shape_double_recycle_Congruence_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_Congruence_System_t cs);
    int ppl_new_Octagonal_Shape_double_recycle_Generator_System(
        ppl_Octagonal_Shape_double_t *pph, ppl_Generator_System_t cs);
    int ppl_assign_Octagonal_Shape_double_from_Octagonal_Shape_double(
        ppl_Octagonal_Shape_double_t dst, ppl_const_Octagonal_Shape_double_t src);
    
    int ppl_new_Grid_from_Grid_Generator_System(
        ppl_Grid_t *pph, ppl_const_Grid_Generator_System_t cs);
    int ppl_new_Grid_recycle_Grid_Generator_System(ppl_Grid_t *pph,
                                                   ppl_Grid_Generator_System_t cs);
    
    VERIFICATION_CRITERIA:

    Check all selected domain constructors, conversion direction, copy/exchange independence, consuming/recycling inputs and allocation failures.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/domains.c; interfaces/C/tests/polyhedra.c.

  • PPL-SPEC-001555
    2. C generated domain observations UID: PPL-SPEC-001555 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Predicates, containment/equality, dimension and relation queries shall return the corresponding native outcomes or flags. Bounds, optimization and frequency functions shall assign their native exact or sound values and admitted witnesses only when their operation reports success. Caller-supplied coefficient/witness outputs shall obey native nonaliasing restrictions. False or inconclusive results shall not be interpreted as a numerical proof beyond the native contract.

    The selected-coordinate integer-point query shall decide existence with exactly the listed coordinates integral and all others real. An empty list shall test ordinary feasibility. Out-of-space indices shall be rejected and the represented input shall be preserved, as specified in 🔗 1. Selected-coordinate integer-point existence.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_contains_integer_point_in_dimensions(
        ppl_const_Polyhedron_t ph, const ppl_dimension_type ds[], size_t n);
    int ppl_Polyhedron_space_dimension(ppl_const_Polyhedron_t ph,
                                       ppl_dimension_type *m);
    int ppl_Polyhedron_affine_dimension(ppl_const_Polyhedron_t ph,
                                        ppl_dimension_type *m);
    int ppl_Polyhedron_relation_with_Constraint(ppl_const_Polyhedron_t ph,
                                                ppl_const_Constraint_t c);
    int ppl_Polyhedron_relation_with_Generator(ppl_const_Polyhedron_t ph,
                                               ppl_const_Generator_t c);
    int ppl_Polyhedron_relation_with_Congruence(ppl_const_Polyhedron_t ph,
                                                ppl_const_Congruence_t c);
    int ppl_Polyhedron_is_empty(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_is_universe(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_is_bounded(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_contains_integer_point(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_is_topologically_closed(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_is_discrete(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_bounds_from_above(ppl_const_Polyhedron_t ph,
                                         ppl_const_Linear_Expression_t le);
    int ppl_Polyhedron_bounds_from_below(ppl_const_Polyhedron_t ph,
                                         ppl_const_Linear_Expression_t le);
    int ppl_Polyhedron_maximize(ppl_const_Polyhedron_t ph,
                                ppl_const_Linear_Expression_t le,
                                ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                int *poptimum);
    int ppl_Polyhedron_minimize(ppl_const_Polyhedron_t ph,
                                ppl_const_Linear_Expression_t le,
                                ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                int *poptimum);
    int ppl_Polyhedron_maximize_with_point(ppl_const_Polyhedron_t ph,
                                           ppl_const_Linear_Expression_t le,
                                           ppl_Coefficient_t ext_n,
                                           ppl_Coefficient_t ext_d, int *poptimum,
                                           ppl_Generator_t point);
    int ppl_Polyhedron_minimize_with_point(ppl_const_Polyhedron_t ph,
                                           ppl_const_Linear_Expression_t le,
                                           ppl_Coefficient_t ext_n,
                                           ppl_Coefficient_t ext_d, int *poptimum,
                                           ppl_Generator_t point);
    int ppl_Polyhedron_frequency(ppl_const_Polyhedron_t ph,
                                 ppl_const_Linear_Expression_t le,
                                 ppl_Coefficient_t ext_fn, ppl_Coefficient_t ext_fd,
                                 ppl_Coefficient_t ext_vn,
                                 ppl_Coefficient_t ext_vd);
    int ppl_Polyhedron_contains_Polyhedron(ppl_const_Polyhedron_t x,
                                           ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_strictly_contains_Polyhedron(ppl_const_Polyhedron_t x,
                                                    ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_is_disjoint_from_Polyhedron(ppl_const_Polyhedron_t x,
                                                   ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_OK(ppl_const_Polyhedron_t ph);
    int ppl_Polyhedron_constrains(ppl_Polyhedron_t ph, ppl_dimension_type var);
    int ppl_Polyhedron_external_memory_in_bytes(ppl_const_Polyhedron_t ps,
                                                size_t *sz);
    int ppl_Polyhedron_total_memory_in_bytes(ppl_const_Polyhedron_t ps, size_t *sz);
    int ppl_Grid_space_dimension(ppl_const_Grid_t ph, ppl_dimension_type *m);
    int ppl_Grid_affine_dimension(ppl_const_Grid_t ph, ppl_dimension_type *m);
    int ppl_Grid_relation_with_Constraint(ppl_const_Grid_t ph,
                                          ppl_const_Constraint_t c);
    int ppl_Grid_relation_with_Generator(ppl_const_Grid_t ph,
                                         ppl_const_Generator_t c);
    int ppl_Grid_relation_with_Congruence(ppl_const_Grid_t ph,
                                          ppl_const_Congruence_t c);
    int ppl_Grid_is_empty(ppl_const_Grid_t ph);
    int ppl_Grid_is_universe(ppl_const_Grid_t ph);
    int ppl_Grid_is_bounded(ppl_const_Grid_t ph);
    int ppl_Grid_contains_integer_point(ppl_const_Grid_t ph);
    int ppl_Grid_is_topologically_closed(ppl_const_Grid_t ph);
    int ppl_Grid_is_discrete(ppl_const_Grid_t ph);
    int ppl_Grid_bounds_from_above(ppl_const_Grid_t ph,
                                   ppl_const_Linear_Expression_t le);
    int ppl_Grid_bounds_from_below(ppl_const_Grid_t ph,
                                   ppl_const_Linear_Expression_t le);
    int ppl_Grid_maximize(ppl_const_Grid_t ph, ppl_const_Linear_Expression_t le,
                          ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                          int *poptimum);
    int ppl_Grid_minimize(ppl_const_Grid_t ph, ppl_const_Linear_Expression_t le,
                          ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                          int *poptimum);
    int ppl_Grid_maximize_with_point(ppl_const_Grid_t ph,
                                     ppl_const_Linear_Expression_t le,
                                     ppl_Coefficient_t ext_n,
                                     ppl_Coefficient_t ext_d, int *poptimum,
                                     ppl_Generator_t point);
    int ppl_Grid_minimize_with_point(ppl_const_Grid_t ph,
                                     ppl_const_Linear_Expression_t le,
                                     ppl_Coefficient_t ext_n,
                                     ppl_Coefficient_t ext_d, int *poptimum,
                                     ppl_Generator_t point);
    int ppl_Grid_frequency(ppl_const_Grid_t ph, ppl_const_Linear_Expression_t le,
                           ppl_Coefficient_t ext_fn, ppl_Coefficient_t ext_fd,
                           ppl_Coefficient_t ext_vn, ppl_Coefficient_t ext_vd);
    int ppl_Grid_contains_Grid(ppl_const_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_strictly_contains_Grid(ppl_const_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_is_disjoint_from_Grid(ppl_const_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_OK(ppl_const_Grid_t ph);
    int ppl_Grid_constrains(ppl_Grid_t ph, ppl_dimension_type var);
    int ppl_Grid_external_memory_in_bytes(ppl_const_Grid_t ps, size_t *sz);
    int ppl_Grid_total_memory_in_bytes(ppl_const_Grid_t ps, size_t *sz);
    int ppl_Rational_Box_space_dimension(ppl_const_Rational_Box_t ph,
                                         ppl_dimension_type *m);
    int ppl_Rational_Box_affine_dimension(ppl_const_Rational_Box_t ph,
                                          ppl_dimension_type *m);
    int ppl_Rational_Box_relation_with_Constraint(ppl_const_Rational_Box_t ph,
                                                  ppl_const_Constraint_t c);
    int ppl_Rational_Box_relation_with_Generator(ppl_const_Rational_Box_t ph,
                                                 ppl_const_Generator_t c);
    int ppl_Rational_Box_relation_with_Congruence(ppl_const_Rational_Box_t ph,
                                                  ppl_const_Congruence_t c);
    int ppl_Rational_Box_is_empty(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_is_universe(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_is_bounded(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_contains_integer_point(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_is_topologically_closed(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_is_discrete(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_bounds_from_above(ppl_const_Rational_Box_t ph,
                                           ppl_const_Linear_Expression_t le);
    int ppl_Rational_Box_bounds_from_below(ppl_const_Rational_Box_t ph,
                                           ppl_const_Linear_Expression_t le);
    int ppl_Rational_Box_maximize(ppl_const_Rational_Box_t ph,
                                  ppl_const_Linear_Expression_t le,
                                  ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                  int *poptimum);
    int ppl_Rational_Box_minimize(ppl_const_Rational_Box_t ph,
                                  ppl_const_Linear_Expression_t le,
                                  ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                  int *poptimum);
    int ppl_Rational_Box_maximize_with_point(ppl_const_Rational_Box_t ph,
                                             ppl_const_Linear_Expression_t le,
                                             ppl_Coefficient_t ext_n,
                                             ppl_Coefficient_t ext_d, int *poptimum,
                                             ppl_Generator_t point);
    int ppl_Rational_Box_minimize_with_point(ppl_const_Rational_Box_t ph,
                                             ppl_const_Linear_Expression_t le,
                                             ppl_Coefficient_t ext_n,
                                             ppl_Coefficient_t ext_d, int *poptimum,
                                             ppl_Generator_t point);
    int ppl_Rational_Box_frequency(ppl_const_Rational_Box_t ph,
                                   ppl_const_Linear_Expression_t le,
                                   ppl_Coefficient_t ext_fn,
                                   ppl_Coefficient_t ext_fd,
                                   ppl_Coefficient_t ext_vn,
                                   ppl_Coefficient_t ext_vd);
    int ppl_Rational_Box_contains_Rational_Box(ppl_const_Rational_Box_t x,
                                               ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_strictly_contains_Rational_Box(ppl_const_Rational_Box_t x,
                                                        ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_is_disjoint_from_Rational_Box(ppl_const_Rational_Box_t x,
                                                       ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_OK(ppl_const_Rational_Box_t ph);
    int ppl_Rational_Box_constrains(ppl_Rational_Box_t ph, ppl_dimension_type var);
    int ppl_Rational_Box_external_memory_in_bytes(ppl_const_Rational_Box_t ps,
                                                  size_t *sz);
    int ppl_Rational_Box_total_memory_in_bytes(ppl_const_Rational_Box_t ps,
                                               size_t *sz);
    int ppl_BD_Shape_mpz_class_space_dimension(ppl_const_BD_Shape_mpz_class_t ph,
                                               ppl_dimension_type *m);
    int ppl_BD_Shape_mpz_class_affine_dimension(ppl_const_BD_Shape_mpz_class_t ph,
                                                ppl_dimension_type *m);
    int ppl_BD_Shape_mpz_class_relation_with_Constraint(
        ppl_const_BD_Shape_mpz_class_t ph, ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpz_class_relation_with_Generator(
        ppl_const_BD_Shape_mpz_class_t ph, ppl_const_Generator_t c);
    int ppl_BD_Shape_mpz_class_relation_with_Congruence(
        ppl_const_BD_Shape_mpz_class_t ph, ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpz_class_is_empty(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_is_universe(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_is_bounded(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_contains_integer_point(
        ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_is_topologically_closed(
        ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_is_discrete(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_bounds_from_above(ppl_const_BD_Shape_mpz_class_t ph,
                                                 ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_mpz_class_bounds_from_below(ppl_const_BD_Shape_mpz_class_t ph,
                                                 ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_mpz_class_maximize(ppl_const_BD_Shape_mpz_class_t ph,
                                        ppl_const_Linear_Expression_t le,
                                        ppl_Coefficient_t ext_n,
                                        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_mpz_class_minimize(ppl_const_BD_Shape_mpz_class_t ph,
                                        ppl_const_Linear_Expression_t le,
                                        ppl_Coefficient_t ext_n,
                                        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_mpz_class_maximize_with_point(
        ppl_const_BD_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_BD_Shape_mpz_class_minimize_with_point(
        ppl_const_BD_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_BD_Shape_mpz_class_frequency(ppl_const_BD_Shape_mpz_class_t ph,
                                         ppl_const_Linear_Expression_t le,
                                         ppl_Coefficient_t ext_fn,
                                         ppl_Coefficient_t ext_fd,
                                         ppl_Coefficient_t ext_vn,
                                         ppl_Coefficient_t ext_vd);
    int ppl_BD_Shape_mpz_class_contains_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_strictly_contains_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_is_disjoint_from_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_OK(ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_constrains(ppl_BD_Shape_mpz_class_t ph,
                                          ppl_dimension_type var);
    int ppl_BD_Shape_mpz_class_external_memory_in_bytes(
        ppl_const_BD_Shape_mpz_class_t ps, size_t *sz);
    int ppl_BD_Shape_mpz_class_total_memory_in_bytes(
        ppl_const_BD_Shape_mpz_class_t ps, size_t *sz);
    int ppl_BD_Shape_mpq_class_space_dimension(ppl_const_BD_Shape_mpq_class_t ph,
                                               ppl_dimension_type *m);
    int ppl_BD_Shape_mpq_class_affine_dimension(ppl_const_BD_Shape_mpq_class_t ph,
                                                ppl_dimension_type *m);
    int ppl_BD_Shape_mpq_class_relation_with_Constraint(
        ppl_const_BD_Shape_mpq_class_t ph, ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpq_class_relation_with_Generator(
        ppl_const_BD_Shape_mpq_class_t ph, ppl_const_Generator_t c);
    int ppl_BD_Shape_mpq_class_relation_with_Congruence(
        ppl_const_BD_Shape_mpq_class_t ph, ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpq_class_is_empty(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_is_universe(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_is_bounded(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_contains_integer_point(
        ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_is_topologically_closed(
        ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_is_discrete(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_bounds_from_above(ppl_const_BD_Shape_mpq_class_t ph,
                                                 ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_mpq_class_bounds_from_below(ppl_const_BD_Shape_mpq_class_t ph,
                                                 ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_mpq_class_maximize(ppl_const_BD_Shape_mpq_class_t ph,
                                        ppl_const_Linear_Expression_t le,
                                        ppl_Coefficient_t ext_n,
                                        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_mpq_class_minimize(ppl_const_BD_Shape_mpq_class_t ph,
                                        ppl_const_Linear_Expression_t le,
                                        ppl_Coefficient_t ext_n,
                                        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_mpq_class_maximize_with_point(
        ppl_const_BD_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_BD_Shape_mpq_class_minimize_with_point(
        ppl_const_BD_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_BD_Shape_mpq_class_frequency(ppl_const_BD_Shape_mpq_class_t ph,
                                         ppl_const_Linear_Expression_t le,
                                         ppl_Coefficient_t ext_fn,
                                         ppl_Coefficient_t ext_fd,
                                         ppl_Coefficient_t ext_vn,
                                         ppl_Coefficient_t ext_vd);
    int ppl_BD_Shape_mpq_class_contains_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_strictly_contains_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_is_disjoint_from_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_OK(ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_constrains(ppl_BD_Shape_mpq_class_t ph,
                                          ppl_dimension_type var);
    int ppl_BD_Shape_mpq_class_external_memory_in_bytes(
        ppl_const_BD_Shape_mpq_class_t ps, size_t *sz);
    int ppl_BD_Shape_mpq_class_total_memory_in_bytes(
        ppl_const_BD_Shape_mpq_class_t ps, size_t *sz);
    int ppl_Octagonal_Shape_mpz_class_space_dimension(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_mpz_class_affine_dimension(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_mpz_class_relation_with_Constraint(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpz_class_relation_with_Generator(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Generator_t c);
    int ppl_Octagonal_Shape_mpz_class_relation_with_Congruence(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpz_class_is_empty(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_is_universe(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_is_bounded(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_contains_integer_point(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_is_topologically_closed(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_is_discrete(
        ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_bounds_from_above(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_mpz_class_bounds_from_below(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_mpz_class_maximize(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_mpz_class_minimize(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_mpz_class_maximize_with_point(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_mpz_class_minimize_with_point(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_mpz_class_frequency(
        ppl_const_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_fn, ppl_Coefficient_t ext_fd,
        ppl_Coefficient_t ext_vn, ppl_Coefficient_t ext_vd);
    int ppl_Octagonal_Shape_mpz_class_contains_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t x,
        ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_strictly_contains_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t x,
        ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_is_disjoint_from_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t x,
        ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_OK(ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_constrains(ppl_Octagonal_Shape_mpz_class_t ph,
                                                 ppl_dimension_type var);
    int ppl_Octagonal_Shape_mpz_class_external_memory_in_bytes(
        ppl_const_Octagonal_Shape_mpz_class_t ps, size_t *sz);
    int ppl_Octagonal_Shape_mpz_class_total_memory_in_bytes(
        ppl_const_Octagonal_Shape_mpz_class_t ps, size_t *sz);
    int ppl_Octagonal_Shape_mpq_class_space_dimension(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_mpq_class_affine_dimension(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_mpq_class_relation_with_Constraint(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpq_class_relation_with_Generator(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Generator_t c);
    int ppl_Octagonal_Shape_mpq_class_relation_with_Congruence(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpq_class_is_empty(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_is_universe(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_is_bounded(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_contains_integer_point(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_is_topologically_closed(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_is_discrete(
        ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_bounds_from_above(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_mpq_class_bounds_from_below(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_mpq_class_maximize(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_mpq_class_minimize(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_mpq_class_maximize_with_point(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_mpq_class_minimize_with_point(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_mpq_class_frequency(
        ppl_const_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_fn, ppl_Coefficient_t ext_fd,
        ppl_Coefficient_t ext_vn, ppl_Coefficient_t ext_vd);
    int ppl_Octagonal_Shape_mpq_class_contains_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t x,
        ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_strictly_contains_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t x,
        ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_is_disjoint_from_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t x,
        ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_OK(ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_constrains(ppl_Octagonal_Shape_mpq_class_t ph,
                                                 ppl_dimension_type var);
    int ppl_Octagonal_Shape_mpq_class_external_memory_in_bytes(
        ppl_const_Octagonal_Shape_mpq_class_t ps, size_t *sz);
    int ppl_Octagonal_Shape_mpq_class_total_memory_in_bytes(
        ppl_const_Octagonal_Shape_mpq_class_t ps, size_t *sz);
    int ppl_Constraints_Product_C_Polyhedron_Grid_space_dimension(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_dimension_type *m);
    int ppl_Constraints_Product_C_Polyhedron_Grid_affine_dimension(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_dimension_type *m);
    int ppl_Constraints_Product_C_Polyhedron_Grid_relation_with_Constraint(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Constraint_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_relation_with_Generator(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Generator_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_relation_with_Congruence(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Congruence_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_empty(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_universe(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_bounded(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_topologically_closed(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_discrete(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_bounds_from_above(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Constraints_Product_C_Polyhedron_Grid_bounds_from_below(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Constraints_Product_C_Polyhedron_Grid_maximize(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Constraints_Product_C_Polyhedron_Grid_minimize(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Constraints_Product_C_Polyhedron_Grid_maximize_with_point(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Constraints_Product_C_Polyhedron_Grid_minimize_with_point(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Constraints_Product_C_Polyhedron_Grid_contains_Constraints_Product_C_Polyhedron_Grid(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_strictly_contains_Constraints_Product_C_Polyhedron_Grid(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_is_disjoint_from_Constraints_Product_C_Polyhedron_Grid(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_OK(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_constrains(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var);
    int ppl_Constraints_Product_C_Polyhedron_Grid_external_memory_in_bytes(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ps, size_t *sz);
    int ppl_Constraints_Product_C_Polyhedron_Grid_total_memory_in_bytes(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t ps, size_t *sz);
    int ppl_Pointset_Powerset_C_Polyhedron_space_dimension(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type *m);
    int ppl_Pointset_Powerset_C_Polyhedron_affine_dimension(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type *m);
    int ppl_Pointset_Powerset_C_Polyhedron_relation_with_Constraint(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_relation_with_Generator(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Generator_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_relation_with_Congruence(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_is_empty(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_is_universe(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_is_bounded(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_contains_integer_point(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_is_topologically_closed(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_is_discrete(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_bounds_from_above(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Pointset_Powerset_C_Polyhedron_bounds_from_below(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Pointset_Powerset_C_Polyhedron_maximize(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Pointset_Powerset_C_Polyhedron_minimize(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Pointset_Powerset_C_Polyhedron_maximize_with_point(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Pointset_Powerset_C_Polyhedron_minimize_with_point(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Pointset_Powerset_C_Polyhedron_contains_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_strictly_contains_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_is_disjoint_from_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_OK(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_constrains(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var);
    int ppl_Pointset_Powerset_C_Polyhedron_external_memory_in_bytes(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ps, size_t *sz);
    int ppl_Pointset_Powerset_C_Polyhedron_total_memory_in_bytes(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ps, size_t *sz);
    int ppl_Pointset_Powerset_NNC_Polyhedron_space_dimension(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type *m);
    int ppl_Pointset_Powerset_NNC_Polyhedron_affine_dimension(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type *m);
    int ppl_Pointset_Powerset_NNC_Polyhedron_relation_with_Constraint(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_relation_with_Generator(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Generator_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_relation_with_Congruence(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_empty(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_universe(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_bounded(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_contains_integer_point(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_topologically_closed(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_discrete(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_bounds_from_above(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Pointset_Powerset_NNC_Polyhedron_bounds_from_below(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le);
    int ppl_Pointset_Powerset_NNC_Polyhedron_maximize(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Pointset_Powerset_NNC_Polyhedron_minimize(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Pointset_Powerset_NNC_Polyhedron_maximize_with_point(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Pointset_Powerset_NNC_Polyhedron_minimize_with_point(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t le, ppl_Coefficient_t ext_n,
        ppl_Coefficient_t ext_d, int *poptimum, ppl_Generator_t point);
    int ppl_Pointset_Powerset_NNC_Polyhedron_contains_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_strictly_contains_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_is_disjoint_from_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_OK(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_constrains(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var);
    int ppl_Pointset_Powerset_NNC_Polyhedron_external_memory_in_bytes(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ps, size_t *sz);
    int ppl_Pointset_Powerset_NNC_Polyhedron_total_memory_in_bytes(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ps, size_t *sz);
    int ppl_Double_Box_space_dimension(ppl_const_Double_Box_t ph,
                                       ppl_dimension_type *m);
    int ppl_Double_Box_affine_dimension(ppl_const_Double_Box_t ph,
                                        ppl_dimension_type *m);
    int ppl_Double_Box_relation_with_Constraint(ppl_const_Double_Box_t ph,
                                                ppl_const_Constraint_t c);
    int ppl_Double_Box_relation_with_Generator(ppl_const_Double_Box_t ph,
                                               ppl_const_Generator_t c);
    int ppl_Double_Box_relation_with_Congruence(ppl_const_Double_Box_t ph,
                                                ppl_const_Congruence_t c);
    int ppl_Double_Box_is_empty(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_is_universe(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_is_bounded(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_contains_integer_point(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_is_topologically_closed(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_is_discrete(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_bounds_from_above(ppl_const_Double_Box_t ph,
                                         ppl_const_Linear_Expression_t le);
    int ppl_Double_Box_bounds_from_below(ppl_const_Double_Box_t ph,
                                         ppl_const_Linear_Expression_t le);
    int ppl_Double_Box_maximize(ppl_const_Double_Box_t ph,
                                ppl_const_Linear_Expression_t le,
                                ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                int *poptimum);
    int ppl_Double_Box_minimize(ppl_const_Double_Box_t ph,
                                ppl_const_Linear_Expression_t le,
                                ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d,
                                int *poptimum);
    int ppl_Double_Box_maximize_with_point(ppl_const_Double_Box_t ph,
                                           ppl_const_Linear_Expression_t le,
                                           ppl_Coefficient_t ext_n,
                                           ppl_Coefficient_t ext_d, int *poptimum,
                                           ppl_Generator_t point);
    int ppl_Double_Box_minimize_with_point(ppl_const_Double_Box_t ph,
                                           ppl_const_Linear_Expression_t le,
                                           ppl_Coefficient_t ext_n,
                                           ppl_Coefficient_t ext_d, int *poptimum,
                                           ppl_Generator_t point);
    int ppl_Double_Box_frequency(ppl_const_Double_Box_t ph,
                                 ppl_const_Linear_Expression_t le,
                                 ppl_Coefficient_t ext_fn, ppl_Coefficient_t ext_fd,
                                 ppl_Coefficient_t ext_vn,
                                 ppl_Coefficient_t ext_vd);
    int ppl_Double_Box_contains_Double_Box(ppl_const_Double_Box_t x,
                                           ppl_const_Double_Box_t y);
    int ppl_Double_Box_strictly_contains_Double_Box(ppl_const_Double_Box_t x,
                                                    ppl_const_Double_Box_t y);
    int ppl_Double_Box_is_disjoint_from_Double_Box(ppl_const_Double_Box_t x,
                                                   ppl_const_Double_Box_t y);
    int ppl_Double_Box_OK(ppl_const_Double_Box_t ph);
    int ppl_Double_Box_constrains(ppl_Double_Box_t ph, ppl_dimension_type var);
    int ppl_Double_Box_external_memory_in_bytes(ppl_const_Double_Box_t ps,
                                                size_t *sz);
    int ppl_Double_Box_total_memory_in_bytes(ppl_const_Double_Box_t ps, size_t *sz);
    int ppl_BD_Shape_double_space_dimension(ppl_const_BD_Shape_double_t ph,
                                            ppl_dimension_type *m);
    int ppl_BD_Shape_double_affine_dimension(ppl_const_BD_Shape_double_t ph,
                                             ppl_dimension_type *m);
    int ppl_BD_Shape_double_relation_with_Constraint(ppl_const_BD_Shape_double_t ph,
                                                     ppl_const_Constraint_t c);
    int ppl_BD_Shape_double_relation_with_Generator(ppl_const_BD_Shape_double_t ph,
                                                    ppl_const_Generator_t c);
    int ppl_BD_Shape_double_relation_with_Congruence(ppl_const_BD_Shape_double_t ph,
                                                     ppl_const_Congruence_t c);
    int ppl_BD_Shape_double_is_empty(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_is_universe(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_is_bounded(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_contains_integer_point(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_is_topologically_closed(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_is_discrete(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_bounds_from_above(ppl_const_BD_Shape_double_t ph,
                                              ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_double_bounds_from_below(ppl_const_BD_Shape_double_t ph,
                                              ppl_const_Linear_Expression_t le);
    int ppl_BD_Shape_double_maximize(ppl_const_BD_Shape_double_t ph,
                                     ppl_const_Linear_Expression_t le,
                                     ppl_Coefficient_t ext_n,
                                     ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_double_minimize(ppl_const_BD_Shape_double_t ph,
                                     ppl_const_Linear_Expression_t le,
                                     ppl_Coefficient_t ext_n,
                                     ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_BD_Shape_double_maximize_with_point(ppl_const_BD_Shape_double_t ph,
                                                ppl_const_Linear_Expression_t le,
                                                ppl_Coefficient_t ext_n,
                                                ppl_Coefficient_t ext_d,
                                                int *poptimum,
                                                ppl_Generator_t point);
    int ppl_BD_Shape_double_minimize_with_point(ppl_const_BD_Shape_double_t ph,
                                                ppl_const_Linear_Expression_t le,
                                                ppl_Coefficient_t ext_n,
                                                ppl_Coefficient_t ext_d,
                                                int *poptimum,
                                                ppl_Generator_t point);
    int ppl_BD_Shape_double_frequency(ppl_const_BD_Shape_double_t ph,
                                      ppl_const_Linear_Expression_t le,
                                      ppl_Coefficient_t ext_fn,
                                      ppl_Coefficient_t ext_fd,
                                      ppl_Coefficient_t ext_vn,
                                      ppl_Coefficient_t ext_vd);
    int ppl_BD_Shape_double_contains_BD_Shape_double(ppl_const_BD_Shape_double_t x,
                                                     ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_strictly_contains_BD_Shape_double(
        ppl_const_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_is_disjoint_from_BD_Shape_double(
        ppl_const_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_OK(ppl_const_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_constrains(ppl_BD_Shape_double_t ph,
                                       ppl_dimension_type var);
    int ppl_BD_Shape_double_external_memory_in_bytes(ppl_const_BD_Shape_double_t ps,
                                                     size_t *sz);
    int ppl_BD_Shape_double_total_memory_in_bytes(ppl_const_BD_Shape_double_t ps,
                                                  size_t *sz);
    int ppl_Octagonal_Shape_double_space_dimension(
        ppl_const_Octagonal_Shape_double_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_double_affine_dimension(
        ppl_const_Octagonal_Shape_double_t ph, ppl_dimension_type *m);
    int ppl_Octagonal_Shape_double_relation_with_Constraint(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_double_relation_with_Generator(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Generator_t c);
    int ppl_Octagonal_Shape_double_relation_with_Congruence(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_double_is_empty(ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_is_universe(
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_is_bounded(
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_contains_integer_point(
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_is_topologically_closed(
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_is_discrete(
        ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_bounds_from_above(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_double_bounds_from_below(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t le);
    int ppl_Octagonal_Shape_double_maximize(ppl_const_Octagonal_Shape_double_t ph,
                                            ppl_const_Linear_Expression_t le,
                                            ppl_Coefficient_t ext_n,
                                            ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_double_minimize(ppl_const_Octagonal_Shape_double_t ph,
                                            ppl_const_Linear_Expression_t le,
                                            ppl_Coefficient_t ext_n,
                                            ppl_Coefficient_t ext_d, int *poptimum);
    int ppl_Octagonal_Shape_double_maximize_with_point(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_double_minimize_with_point(
        ppl_const_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t le,
        ppl_Coefficient_t ext_n, ppl_Coefficient_t ext_d, int *poptimum,
        ppl_Generator_t point);
    int ppl_Octagonal_Shape_double_frequency(ppl_const_Octagonal_Shape_double_t ph,
                                             ppl_const_Linear_Expression_t le,
                                             ppl_Coefficient_t ext_fn,
                                             ppl_Coefficient_t ext_fd,
                                             ppl_Coefficient_t ext_vn,
                                             ppl_Coefficient_t ext_vd);
    int ppl_Octagonal_Shape_double_contains_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_strictly_contains_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_is_disjoint_from_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_OK(ppl_const_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_constrains(ppl_Octagonal_Shape_double_t ph,
                                              ppl_dimension_type var);
    int ppl_Octagonal_Shape_double_external_memory_in_bytes(
        ppl_const_Octagonal_Shape_double_t ps, size_t *sz);
    int ppl_Octagonal_Shape_double_total_memory_in_bytes(
        ppl_const_Octagonal_Shape_double_t ps, size_t *sz);
    int ppl_Polyhedron_equals_Polyhedron(ppl_const_Polyhedron_t x,
                                         ppl_const_Polyhedron_t y);
    int ppl_Grid_equals_Grid(ppl_const_Grid_t x, ppl_const_Grid_t y);
    int ppl_Rational_Box_has_upper_bound(ppl_Rational_Box_t ps,
                                         ppl_dimension_type var,
                                         ppl_Coefficient_t ext_n,
                                         ppl_Coefficient_t ext_d, int *pclosed);
    int ppl_Rational_Box_has_lower_bound(ppl_Rational_Box_t ps,
                                         ppl_dimension_type var,
                                         ppl_Coefficient_t ext_n,
                                         ppl_Coefficient_t ext_d, int *pclosed);
    int ppl_Rational_Box_equals_Rational_Box(ppl_const_Rational_Box_t x,
                                             ppl_const_Rational_Box_t y);
    int ppl_BD_Shape_mpz_class_equals_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpq_class_equals_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpz_class_equals_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t x,
        ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpq_class_equals_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t x,
        ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_equals_Constraints_Product_C_Polyhedron_Grid(
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_geometrically_equals_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_equals_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_geometrically_equals_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_equals_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Double_Box_has_upper_bound(ppl_Double_Box_t ps, ppl_dimension_type var,
                                       ppl_Coefficient_t ext_n,
                                       ppl_Coefficient_t ext_d, int *pclosed);
    int ppl_Double_Box_has_lower_bound(ppl_Double_Box_t ps, ppl_dimension_type var,
                                       ppl_Coefficient_t ext_n,
                                       ppl_Coefficient_t ext_d, int *pclosed);
    int ppl_Double_Box_equals_Double_Box(ppl_const_Double_Box_t x,
                                         ppl_const_Double_Box_t y);
    int ppl_BD_Shape_double_equals_BD_Shape_double(ppl_const_BD_Shape_double_t x,
                                                   ppl_const_BD_Shape_double_t y);
    int ppl_Octagonal_Shape_double_equals_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    
    int ppl_Pointset_Powerset_C_Polyhedron_geometrically_covers_Pointset_Powerset_C_Polyhedron(
        ppl_const_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_size(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ps, size_t *sz);
    int ppl_Pointset_Powerset_NNC_Polyhedron_geometrically_covers_Pointset_Powerset_NNC_Polyhedron(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_size(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ps, size_t *sz);
    int ppl_Grid_relation_with_Grid_Generator(ppl_const_Grid_t ph,
                                              ppl_const_Grid_Generator_t c);
    
    VERIFICATION_CRITERIA:

    Compare literal empty/universe, containment, relation flags and bounded/unbounded optimization/frequency results for configured arithmetic types.

    SOURCE:

    interfaces/C/tests/newoperations.c; interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/domains.c; interfaces/C/tests/polyhedra.c.

  • PPL-SPEC-001556
    3. C generated system extraction ownership UID: PPL-SPEC-001556 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Polyhedron constraint/generator and Grid congruence/grid-generator getters shall return borrowed native systems, including minimized getters, with the documented owner-call invalidation rules. Getters designated to construct an independent system for other domains shall transfer an owned system. Successful extraction shall preserve the corresponding native mathematical meaning and approximation direction. Independent copies shall remain valid after domain mutation or destruction.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_get_constraints(ppl_const_Polyhedron_t ph,
                                       ppl_const_Constraint_System_t *pcs);
    int ppl_Polyhedron_get_generators(ppl_const_Polyhedron_t ph,
                                      ppl_const_Generator_System_t *pcs);
    int ppl_Polyhedron_get_minimized_constraints(
        ppl_const_Polyhedron_t ph, ppl_const_Constraint_System_t *pcs);
    int ppl_Polyhedron_get_minimized_generators(ppl_const_Polyhedron_t ph,
                                                ppl_const_Generator_System_t *pcs);
    int ppl_Grid_get_congruences(ppl_const_Grid_t ph,
                                 ppl_const_Congruence_System_t *pcs);
    int ppl_Grid_get_grid_generators(ppl_const_Grid_t ph,
                                     ppl_const_Grid_Generator_System_t *pcs);
    int ppl_Grid_get_minimized_congruences(ppl_const_Grid_t ph,
                                           ppl_const_Congruence_System_t *pcs);
    int ppl_Grid_get_minimized_grid_generators(
        ppl_const_Grid_t ph, ppl_const_Grid_Generator_System_t *pcs);
    int ppl_new_Congruence_System_from_Polyhedron(ppl_Congruence_System_t *pcs,
                                                  ppl_const_Polyhedron_t ph);
    int ppl_new_Congruence_System_from_Polyhedron_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Polyhedron_t ph);
    int ppl_new_Constraint_System_from_Grid(ppl_Constraint_System_t *pcs,
                                            ppl_const_Grid_t ph);
    int ppl_new_Constraint_System_from_Grid_minimized(ppl_Constraint_System_t *pcs,
                                                      ppl_const_Grid_t ph);
    int ppl_new_Constraint_System_from_Rational_Box(ppl_Constraint_System_t *pcs,
                                                    ppl_const_Rational_Box_t ph);
    int ppl_new_Congruence_System_from_Rational_Box(ppl_Congruence_System_t *pcs,
                                                    ppl_const_Rational_Box_t ph);
    int ppl_new_Constraint_System_from_Rational_Box_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_Rational_Box_t ph);
    int ppl_new_Congruence_System_from_Rational_Box_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Rational_Box_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_mpz_class(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_mpz_class(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_mpz_class_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_mpz_class_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_mpz_class_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_mpq_class(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_mpq_class(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_mpq_class_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_mpq_class_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_mpq_class_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_mpz_class(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_mpz_class(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_mpz_class_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_mpz_class_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_mpz_class_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_mpq_class(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_mpq_class(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_mpq_class_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_mpq_class_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_mpq_class_t ph);
    int ppl_new_Constraint_System_from_Double_Box(ppl_Constraint_System_t *pcs,
                                                  ppl_const_Double_Box_t ph);
    int ppl_new_Congruence_System_from_Double_Box(ppl_Congruence_System_t *pcs,
                                                  ppl_const_Double_Box_t ph);
    int ppl_new_Constraint_System_from_Double_Box_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_Double_Box_t ph);
    int ppl_new_Congruence_System_from_Double_Box_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Double_Box_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_double(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_double(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Constraint_System_from_BD_Shape_double_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Congruence_System_from_BD_Shape_double_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_BD_Shape_double_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_double(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_double(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Constraint_System_from_Octagonal_Shape_double_minimized(
        ppl_Constraint_System_t *pcs, ppl_const_Octagonal_Shape_double_t ph);
    int ppl_new_Congruence_System_from_Octagonal_Shape_double_minimized(
        ppl_Congruence_System_t *pcs, ppl_const_Octagonal_Shape_double_t ph);
    
    VERIFICATION_CRITERIA:

    Check borrowed identity and zero-copy behavior, independently owned extractions, native representation meaning and owner lifetime histories.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/domains.c.

  • PPL-SPEC-001557
    4. C generated domain transformations UID: PPL-SPEC-001557 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint/congruence insertion, intersection, upper bounds, differences, simplification and other selected set transformations shall forward the corresponding native value and approximation contracts. Boolean exactness outcomes shall retain their native meaning. Dimension, topology, inclusion and ownership preconditions shall apply to the corresponding native arguments; designated admission failures shall be translated.

    Integer-point refinement operations shall accept the public polynomial, simplex and any-complexity selectors. An unrecognized selector shall report PPL_ERROR_INVALID_ARGUMENT and leave the receiver unchanged.

    Minkowski addition shall preserve the exact closed/NNC value contract in 🔗 1. Exact Minkowski sum of polyhedra. Generator-based time elapse shall preserve 🔗 1. Nonnegative polyhedral time elapse, including matching system dimension and borrowed receiver input. HH95, HPW01 and bounded Chvatal refinement shall require closed operands and reject NNC handles before a derived-class cast. Their native contracts in 🔗 1. HH95 closed-polyhedron edge extrapolation, 🔗 1. HPW01 closed-polyhedron extrapolation and 🔗 1. Bounded Chvatal half-pair refinement shall apply, including the pair-budget scope. These entry points shall be generated only with the Polyhedron interface.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_minkowski_sum_assign(ppl_Polyhedron_t lhs,
                                            ppl_const_Polyhedron_t rhs);
    int ppl_Polyhedron_time_elapse_assign_with_generators(
        ppl_Polyhedron_t ph, ppl_const_Generator_System_t rates);
    int ppl_C_Polyhedron_HH95_extrapolation_assign(ppl_Polyhedron_t lhs,
                                                  ppl_const_Polyhedron_t rhs);
    int ppl_C_Polyhedron_HPW01_extrapolation_assign(ppl_Polyhedron_t lhs,
                                                   ppl_const_Polyhedron_t rhs);
    int ppl_C_Polyhedron_refine_with_chvatal_cuts(ppl_Polyhedron_t ph,
                                                 ppl_dimension_type budget);
    int ppl_Polyhedron_topological_closure_assign(ppl_Polyhedron_t ph);
    int ppl_Polyhedron_add_constraint(ppl_Polyhedron_t ph,
                                      ppl_const_Constraint_t c);
    int ppl_Polyhedron_add_congruence(ppl_Polyhedron_t ph,
                                      ppl_const_Congruence_t c);
    int ppl_Polyhedron_add_generator(ppl_Polyhedron_t ph, ppl_const_Generator_t c);
    int ppl_Polyhedron_add_constraints(ppl_Polyhedron_t ph,
                                       ppl_const_Constraint_System_t cs);
    int ppl_Polyhedron_add_congruences(ppl_Polyhedron_t ph,
                                       ppl_const_Congruence_System_t cs);
    int ppl_Polyhedron_add_generators(ppl_Polyhedron_t ph,
                                      ppl_const_Generator_System_t cs);
    int ppl_Polyhedron_refine_with_constraint(ppl_Polyhedron_t ph,
                                              ppl_const_Constraint_t c);
    int ppl_Polyhedron_refine_with_congruence(ppl_Polyhedron_t ph,
                                              ppl_const_Congruence_t c);
    int ppl_Polyhedron_refine_with_constraints(ppl_Polyhedron_t ph,
                                               ppl_const_Constraint_System_t cs);
    int ppl_Polyhedron_refine_with_congruences(ppl_Polyhedron_t ph,
                                               ppl_const_Congruence_System_t cs);
    int ppl_Polyhedron_intersection_assign(ppl_Polyhedron_t x,
                                           ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_upper_bound_assign(ppl_Polyhedron_t x,
                                          ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_difference_assign(ppl_Polyhedron_t x,
                                         ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_concatenate_assign(ppl_Polyhedron_t x,
                                          ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_time_elapse_assign(ppl_Polyhedron_t x,
                                          ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_poly_hull_assign(ppl_Polyhedron_t x,
                                        ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_poly_difference_assign(ppl_Polyhedron_t x,
                                              ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_upper_bound_assign_if_exact(ppl_Polyhedron_t x,
                                                   ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_poly_hull_assign_if_exact(ppl_Polyhedron_t x,
                                                 ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_positive_time_elapse_assign(ppl_Polyhedron_t x,
                                                   ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_simplify_using_context_assign(ppl_Polyhedron_t x,
                                                     ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_drop_some_non_integer_points(ppl_Polyhedron_t ph,
                                                    int complexity);
    int ppl_Polyhedron_drop_some_non_integer_points_2(ppl_Polyhedron_t ph,
                                                      ppl_dimension_type ds[],
                                                      size_t n, int complexity);
    int ppl_Polyhedron_add_recycled_constraints(ppl_Polyhedron_t ph,
                                                ppl_Constraint_System_t cs);
    int ppl_Polyhedron_add_recycled_congruences(ppl_Polyhedron_t ph,
                                                ppl_Congruence_System_t cs);
    int ppl_Polyhedron_add_recycled_generators(ppl_Polyhedron_t ph,
                                               ppl_Generator_System_t cs);
    int ppl_Grid_topological_closure_assign(ppl_Grid_t ph);
    int ppl_Grid_add_constraint(ppl_Grid_t ph, ppl_const_Constraint_t c);
    int ppl_Grid_add_congruence(ppl_Grid_t ph, ppl_const_Congruence_t c);
    int ppl_Grid_add_grid_generator(ppl_Grid_t ph, ppl_const_Grid_Generator_t c);
    int ppl_Grid_add_constraints(ppl_Grid_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Grid_add_congruences(ppl_Grid_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Grid_add_grid_generators(ppl_Grid_t ph,
                                     ppl_const_Grid_Generator_System_t cs);
    int ppl_Grid_refine_with_constraint(ppl_Grid_t ph, ppl_const_Constraint_t c);
    int ppl_Grid_refine_with_congruence(ppl_Grid_t ph, ppl_const_Congruence_t c);
    int ppl_Grid_refine_with_constraints(ppl_Grid_t ph,
                                         ppl_const_Constraint_System_t cs);
    int ppl_Grid_refine_with_congruences(ppl_Grid_t ph,
                                         ppl_const_Congruence_System_t cs);
    int ppl_Grid_intersection_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_upper_bound_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_difference_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_concatenate_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_time_elapse_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_upper_bound_assign_if_exact(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_simplify_using_context_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_drop_some_non_integer_points(ppl_Grid_t ph, int complexity);
    int ppl_Grid_drop_some_non_integer_points_2(ppl_Grid_t ph,
                                                ppl_dimension_type ds[], size_t n,
                                                int complexity);
    int ppl_Grid_add_recycled_constraints(ppl_Grid_t ph,
                                          ppl_Constraint_System_t cs);
    int ppl_Grid_add_recycled_congruences(ppl_Grid_t ph,
                                          ppl_Congruence_System_t cs);
    int ppl_Grid_add_recycled_grid_generators(ppl_Grid_t ph,
                                              ppl_Grid_Generator_System_t cs);
    int ppl_Rational_Box_topological_closure_assign(ppl_Rational_Box_t ph);
    int ppl_Rational_Box_add_constraint(ppl_Rational_Box_t ph,
                                        ppl_const_Constraint_t c);
    int ppl_Rational_Box_add_congruence(ppl_Rational_Box_t ph,
                                        ppl_const_Congruence_t c);
    int ppl_Rational_Box_add_constraints(ppl_Rational_Box_t ph,
                                         ppl_const_Constraint_System_t cs);
    int ppl_Rational_Box_add_congruences(ppl_Rational_Box_t ph,
                                         ppl_const_Congruence_System_t cs);
    int ppl_Rational_Box_refine_with_constraint(ppl_Rational_Box_t ph,
                                                ppl_const_Constraint_t c);
    int ppl_Rational_Box_refine_with_congruence(ppl_Rational_Box_t ph,
                                                ppl_const_Congruence_t c);
    int ppl_Rational_Box_refine_with_constraints(ppl_Rational_Box_t ph,
                                                 ppl_const_Constraint_System_t cs);
    int ppl_Rational_Box_refine_with_congruences(ppl_Rational_Box_t ph,
                                                 ppl_const_Congruence_System_t cs);
    int ppl_Rational_Box_intersection_assign(ppl_Rational_Box_t x,
                                             ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_upper_bound_assign(ppl_Rational_Box_t x,
                                            ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_difference_assign(ppl_Rational_Box_t x,
                                           ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_concatenate_assign(ppl_Rational_Box_t x,
                                            ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_time_elapse_assign(ppl_Rational_Box_t x,
                                            ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_upper_bound_assign_if_exact(ppl_Rational_Box_t x,
                                                     ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_simplify_using_context_assign(ppl_Rational_Box_t x,
                                                       ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_drop_some_non_integer_points(ppl_Rational_Box_t ph,
                                                      int complexity);
    int ppl_Rational_Box_drop_some_non_integer_points_2(ppl_Rational_Box_t ph,
                                                        ppl_dimension_type ds[],
                                                        size_t n, int complexity);
    int ppl_Rational_Box_add_recycled_constraints(ppl_Rational_Box_t ph,
                                                  ppl_Constraint_System_t cs);
    int ppl_Rational_Box_add_recycled_congruences(ppl_Rational_Box_t ph,
                                                  ppl_Congruence_System_t cs);
    int ppl_BD_Shape_mpz_class_topological_closure_assign(
        ppl_BD_Shape_mpz_class_t ph);
    int ppl_BD_Shape_mpz_class_add_constraint(ppl_BD_Shape_mpz_class_t ph,
                                              ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpz_class_add_congruence(ppl_BD_Shape_mpz_class_t ph,
                                              ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpz_class_add_constraints(ppl_BD_Shape_mpz_class_t ph,
                                               ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_add_congruences(ppl_BD_Shape_mpz_class_t ph,
                                               ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_mpz_class_refine_with_constraint(ppl_BD_Shape_mpz_class_t ph,
                                                      ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpz_class_refine_with_congruence(ppl_BD_Shape_mpz_class_t ph,
                                                      ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpz_class_refine_with_constraints(
        ppl_BD_Shape_mpz_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_refine_with_congruences(
        ppl_BD_Shape_mpz_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_mpz_class_intersection_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_upper_bound_assign(ppl_BD_Shape_mpz_class_t x,
                                                  ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_difference_assign(ppl_BD_Shape_mpz_class_t x,
                                                 ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_concatenate_assign(ppl_BD_Shape_mpz_class_t x,
                                                  ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_time_elapse_assign(ppl_BD_Shape_mpz_class_t x,
                                                  ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_upper_bound_assign_if_exact(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_simplify_using_context_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_drop_some_non_integer_points(
        ppl_BD_Shape_mpz_class_t ph, int complexity);
    int ppl_BD_Shape_mpz_class_drop_some_non_integer_points_2(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_BD_Shape_mpz_class_add_recycled_constraints(ppl_BD_Shape_mpz_class_t ph,
                                                        ppl_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_add_recycled_congruences(ppl_BD_Shape_mpz_class_t ph,
                                                        ppl_Congruence_System_t cs);
    int ppl_BD_Shape_mpq_class_topological_closure_assign(
        ppl_BD_Shape_mpq_class_t ph);
    int ppl_BD_Shape_mpq_class_add_constraint(ppl_BD_Shape_mpq_class_t ph,
                                              ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpq_class_add_congruence(ppl_BD_Shape_mpq_class_t ph,
                                              ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpq_class_add_constraints(ppl_BD_Shape_mpq_class_t ph,
                                               ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_add_congruences(ppl_BD_Shape_mpq_class_t ph,
                                               ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_mpq_class_refine_with_constraint(ppl_BD_Shape_mpq_class_t ph,
                                                      ppl_const_Constraint_t c);
    int ppl_BD_Shape_mpq_class_refine_with_congruence(ppl_BD_Shape_mpq_class_t ph,
                                                      ppl_const_Congruence_t c);
    int ppl_BD_Shape_mpq_class_refine_with_constraints(
        ppl_BD_Shape_mpq_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_refine_with_congruences(
        ppl_BD_Shape_mpq_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_mpq_class_intersection_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_upper_bound_assign(ppl_BD_Shape_mpq_class_t x,
                                                  ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_difference_assign(ppl_BD_Shape_mpq_class_t x,
                                                 ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_concatenate_assign(ppl_BD_Shape_mpq_class_t x,
                                                  ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_time_elapse_assign(ppl_BD_Shape_mpq_class_t x,
                                                  ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_upper_bound_assign_if_exact(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_simplify_using_context_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_drop_some_non_integer_points(
        ppl_BD_Shape_mpq_class_t ph, int complexity);
    int ppl_BD_Shape_mpq_class_drop_some_non_integer_points_2(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_BD_Shape_mpq_class_add_recycled_constraints(ppl_BD_Shape_mpq_class_t ph,
                                                        ppl_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_add_recycled_congruences(ppl_BD_Shape_mpq_class_t ph,
                                                        ppl_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_topological_closure_assign(
        ppl_Octagonal_Shape_mpz_class_t ph);
    int ppl_Octagonal_Shape_mpz_class_add_constraint(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpz_class_add_congruence(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpz_class_add_constraints(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_add_congruences(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_refine_with_constraint(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpz_class_refine_with_congruence(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpz_class_refine_with_constraints(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_refine_with_congruences(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_intersection_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_upper_bound_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_difference_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_concatenate_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_time_elapse_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_upper_bound_assign_if_exact(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_simplify_using_context_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_drop_some_non_integer_points(
        ppl_Octagonal_Shape_mpz_class_t ph, int complexity);
    int ppl_Octagonal_Shape_mpz_class_drop_some_non_integer_points_2(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_Octagonal_Shape_mpz_class_add_recycled_constraints(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_add_recycled_congruences(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_topological_closure_assign(
        ppl_Octagonal_Shape_mpq_class_t ph);
    int ppl_Octagonal_Shape_mpq_class_add_constraint(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpq_class_add_congruence(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpq_class_add_constraints(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_add_congruences(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_refine_with_constraint(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_mpq_class_refine_with_congruence(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_mpq_class_refine_with_constraints(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_refine_with_congruences(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_intersection_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_upper_bound_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_difference_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_concatenate_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_time_elapse_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_upper_bound_assign_if_exact(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_simplify_using_context_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_drop_some_non_integer_points(
        ppl_Octagonal_Shape_mpq_class_t ph, int complexity);
    int ppl_Octagonal_Shape_mpq_class_drop_some_non_integer_points_2(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_Octagonal_Shape_mpq_class_add_recycled_constraints(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_add_recycled_congruences(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_Congruence_System_t cs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_topological_closure_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_constraint(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_const_Constraint_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_congruence(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_const_Congruence_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_constraints(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Constraint_System_t cs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_congruences(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Congruence_System_t cs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_refine_with_constraint(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_const_Constraint_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_refine_with_congruence(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_const_Congruence_t c);
    int ppl_Constraints_Product_C_Polyhedron_Grid_refine_with_constraints(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Constraint_System_t cs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_refine_with_congruences(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Congruence_System_t cs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_intersection_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_upper_bound_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_difference_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_concatenate_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_time_elapse_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_upper_bound_assign_if_exact(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_drop_some_non_integer_points(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, int complexity);
    int ppl_Constraints_Product_C_Polyhedron_Grid_drop_some_non_integer_points_2(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type ds[],
        size_t n, int complexity);
    int ppl_Pointset_Powerset_C_Polyhedron_topological_closure_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_pairwise_reduce(
        ppl_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_omega_reduce(
        ppl_Pointset_Powerset_C_Polyhedron_t ph);
    int ppl_Pointset_Powerset_C_Polyhedron_add_constraint(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_add_congruence(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_add_constraints(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Pointset_Powerset_C_Polyhedron_add_congruences(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Pointset_Powerset_C_Polyhedron_refine_with_constraint(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_refine_with_congruence(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_C_Polyhedron_refine_with_constraints(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Pointset_Powerset_C_Polyhedron_refine_with_congruences(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Pointset_Powerset_C_Polyhedron_intersection_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_difference_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_concatenate_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_time_elapse_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_upper_bound_assign_if_exact(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_simplify_using_context_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_drop_some_non_integer_points(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, int complexity);
    int ppl_Pointset_Powerset_C_Polyhedron_drop_some_non_integer_points_2(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_Pointset_Powerset_NNC_Polyhedron_topological_closure_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_pairwise_reduce(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_omega_reduce(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_constraint(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_congruence(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_constraints(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Constraint_System_t cs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_congruences(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Congruence_System_t cs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_refine_with_constraint(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Constraint_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_refine_with_congruence(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_const_Congruence_t c);
    int ppl_Pointset_Powerset_NNC_Polyhedron_refine_with_constraints(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Constraint_System_t cs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_refine_with_congruences(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Congruence_System_t cs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_intersection_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_upper_bound_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_difference_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_concatenate_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_time_elapse_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_upper_bound_assign_if_exact(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_simplify_using_context_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_drop_some_non_integer_points(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, int complexity);
    int ppl_Pointset_Powerset_NNC_Polyhedron_drop_some_non_integer_points_2(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type ds[],
        size_t n, int complexity);
    int ppl_Double_Box_topological_closure_assign(ppl_Double_Box_t ph);
    int ppl_Double_Box_add_constraint(ppl_Double_Box_t ph,
                                      ppl_const_Constraint_t c);
    int ppl_Double_Box_add_congruence(ppl_Double_Box_t ph,
                                      ppl_const_Congruence_t c);
    int ppl_Double_Box_add_constraints(ppl_Double_Box_t ph,
                                       ppl_const_Constraint_System_t cs);
    int ppl_Double_Box_add_congruences(ppl_Double_Box_t ph,
                                       ppl_const_Congruence_System_t cs);
    int ppl_Double_Box_refine_with_constraint(ppl_Double_Box_t ph,
                                              ppl_const_Constraint_t c);
    int ppl_Double_Box_refine_with_congruence(ppl_Double_Box_t ph,
                                              ppl_const_Congruence_t c);
    int ppl_Double_Box_refine_with_constraints(ppl_Double_Box_t ph,
                                               ppl_const_Constraint_System_t cs);
    int ppl_Double_Box_refine_with_congruences(ppl_Double_Box_t ph,
                                               ppl_const_Congruence_System_t cs);
    int ppl_Double_Box_intersection_assign(ppl_Double_Box_t x,
                                           ppl_const_Double_Box_t y);
    int ppl_Double_Box_upper_bound_assign(ppl_Double_Box_t x,
                                          ppl_const_Double_Box_t y);
    int ppl_Double_Box_difference_assign(ppl_Double_Box_t x,
                                         ppl_const_Double_Box_t y);
    int ppl_Double_Box_concatenate_assign(ppl_Double_Box_t x,
                                          ppl_const_Double_Box_t y);
    int ppl_Double_Box_time_elapse_assign(ppl_Double_Box_t x,
                                          ppl_const_Double_Box_t y);
    int ppl_Double_Box_upper_bound_assign_if_exact(ppl_Double_Box_t x,
                                                   ppl_const_Double_Box_t y);
    int ppl_Double_Box_simplify_using_context_assign(ppl_Double_Box_t x,
                                                     ppl_const_Double_Box_t y);
    int ppl_Double_Box_drop_some_non_integer_points(ppl_Double_Box_t ph,
                                                    int complexity);
    int ppl_Double_Box_drop_some_non_integer_points_2(ppl_Double_Box_t ph,
                                                      ppl_dimension_type ds[],
                                                      size_t n, int complexity);
    int ppl_Double_Box_add_recycled_constraints(ppl_Double_Box_t ph,
                                                ppl_Constraint_System_t cs);
    int ppl_Double_Box_add_recycled_congruences(ppl_Double_Box_t ph,
                                                ppl_Congruence_System_t cs);
    int ppl_BD_Shape_double_topological_closure_assign(ppl_BD_Shape_double_t ph);
    int ppl_BD_Shape_double_add_constraint(ppl_BD_Shape_double_t ph,
                                           ppl_const_Constraint_t c);
    int ppl_BD_Shape_double_add_congruence(ppl_BD_Shape_double_t ph,
                                           ppl_const_Congruence_t c);
    int ppl_BD_Shape_double_add_constraints(ppl_BD_Shape_double_t ph,
                                            ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_double_add_congruences(ppl_BD_Shape_double_t ph,
                                            ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_double_refine_with_constraint(ppl_BD_Shape_double_t ph,
                                                   ppl_const_Constraint_t c);
    int ppl_BD_Shape_double_refine_with_congruence(ppl_BD_Shape_double_t ph,
                                                   ppl_const_Congruence_t c);
    int ppl_BD_Shape_double_refine_with_constraints(
        ppl_BD_Shape_double_t ph, ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_double_refine_with_congruences(
        ppl_BD_Shape_double_t ph, ppl_const_Congruence_System_t cs);
    int ppl_BD_Shape_double_intersection_assign(ppl_BD_Shape_double_t x,
                                                ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_upper_bound_assign(ppl_BD_Shape_double_t x,
                                               ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_difference_assign(ppl_BD_Shape_double_t x,
                                              ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_concatenate_assign(ppl_BD_Shape_double_t x,
                                               ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_time_elapse_assign(ppl_BD_Shape_double_t x,
                                               ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_upper_bound_assign_if_exact(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_simplify_using_context_assign(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_drop_some_non_integer_points(ppl_BD_Shape_double_t ph,
                                                         int complexity);
    int ppl_BD_Shape_double_drop_some_non_integer_points_2(ppl_BD_Shape_double_t ph,
                                                           ppl_dimension_type ds[],
                                                           size_t n,
                                                           int complexity);
    int ppl_BD_Shape_double_add_recycled_constraints(ppl_BD_Shape_double_t ph,
                                                     ppl_Constraint_System_t cs);
    int ppl_BD_Shape_double_add_recycled_congruences(ppl_BD_Shape_double_t ph,
                                                     ppl_Congruence_System_t cs);
    int ppl_Octagonal_Shape_double_topological_closure_assign(
        ppl_Octagonal_Shape_double_t ph);
    int ppl_Octagonal_Shape_double_add_constraint(ppl_Octagonal_Shape_double_t ph,
                                                  ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_double_add_congruence(ppl_Octagonal_Shape_double_t ph,
                                                  ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_double_add_constraints(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_double_add_congruences(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_double_refine_with_constraint(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Constraint_t c);
    int ppl_Octagonal_Shape_double_refine_with_congruence(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Congruence_t c);
    int ppl_Octagonal_Shape_double_refine_with_constraints(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_double_refine_with_congruences(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Congruence_System_t cs);
    int ppl_Octagonal_Shape_double_intersection_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_upper_bound_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_difference_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_concatenate_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_time_elapse_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_upper_bound_assign_if_exact(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_simplify_using_context_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_drop_some_non_integer_points(
        ppl_Octagonal_Shape_double_t ph, int complexity);
    int ppl_Octagonal_Shape_double_drop_some_non_integer_points_2(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type ds[], size_t n,
        int complexity);
    int ppl_Octagonal_Shape_double_add_recycled_constraints(
        ppl_Octagonal_Shape_double_t ph, ppl_Constraint_System_t cs);
    int ppl_Octagonal_Shape_double_add_recycled_congruences(
        ppl_Octagonal_Shape_double_t ph, ppl_Congruence_System_t cs);
    
    int ppl_Polyhedron_unconstrain_space_dimension(ppl_Polyhedron_t ph,
                                                   ppl_dimension_type var);
    int ppl_Polyhedron_unconstrain_space_dimensions(ppl_Polyhedron_t ph,
                                                    ppl_dimension_type ds[],
                                                    size_t n);
    int ppl_Grid_unconstrain_space_dimension(ppl_Grid_t ph, ppl_dimension_type var);
    int ppl_Grid_unconstrain_space_dimensions(ppl_Grid_t ph,
                                              ppl_dimension_type ds[], size_t n);
    int ppl_Rational_Box_unconstrain_space_dimension(ppl_Rational_Box_t ph,
                                                     ppl_dimension_type var);
    int ppl_Rational_Box_unconstrain_space_dimensions(ppl_Rational_Box_t ph,
                                                      ppl_dimension_type ds[],
                                                      size_t n);
    int ppl_BD_Shape_mpz_class_unconstrain_space_dimension(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type var);
    int ppl_BD_Shape_mpz_class_unconstrain_space_dimensions(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_BD_Shape_mpq_class_unconstrain_space_dimension(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type var);
    int ppl_BD_Shape_mpq_class_unconstrain_space_dimensions(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Octagonal_Shape_mpz_class_unconstrain_space_dimension(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var);
    int ppl_Octagonal_Shape_mpz_class_unconstrain_space_dimensions(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Octagonal_Shape_mpq_class_unconstrain_space_dimension(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var);
    int ppl_Octagonal_Shape_mpq_class_unconstrain_space_dimensions(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Constraints_Product_C_Polyhedron_Grid_unconstrain_space_dimension(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var);
    int ppl_Constraints_Product_C_Polyhedron_Grid_unconstrain_space_dimensions(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type ds[],
        size_t n);
    int ppl_Pointset_Powerset_C_Polyhedron_unconstrain_space_dimension(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var);
    int ppl_Pointset_Powerset_C_Polyhedron_unconstrain_space_dimensions(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Pointset_Powerset_NNC_Polyhedron_unconstrain_space_dimension(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var);
    int ppl_Pointset_Powerset_NNC_Polyhedron_unconstrain_space_dimensions(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type ds[],
        size_t n);
    int ppl_Double_Box_unconstrain_space_dimension(ppl_Double_Box_t ph,
                                                   ppl_dimension_type var);
    int ppl_Double_Box_unconstrain_space_dimensions(ppl_Double_Box_t ph,
                                                    ppl_dimension_type ds[],
                                                    size_t n);
    int ppl_BD_Shape_double_unconstrain_space_dimension(ppl_BD_Shape_double_t ph,
                                                        ppl_dimension_type var);
    int ppl_BD_Shape_double_unconstrain_space_dimensions(ppl_BD_Shape_double_t ph,
                                                         ppl_dimension_type ds[],
                                                         size_t n);
    int ppl_Octagonal_Shape_double_unconstrain_space_dimension(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type var);
    int ppl_Octagonal_Shape_double_unconstrain_space_dimensions(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type ds[], size_t n);
    
    VERIFICATION_CRITERIA:

    Compare independent mathematical oracles and fresh native models, exactness booleans, empty operands, aliases and rejected dimensions.

    SOURCE:

    interfaces/interfaced_polyhedra.hh; interfaces/C/tests/newoperations.c; interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/domains.c; interfaces/C/tests/polyhedra.c; interfaces/C/tests/powersets.c.

  • PPL-SPEC-001558
    5. C generated affine transformations UID: PPL-SPEC-001558 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Affine image/preimage and generalized/bounded families shall interpret expression coefficients, denominator, relation symbol and affected coordinates exactly as the corresponding native operation. Pointer parameters shall denote live expressions and coefficient objects, with native supported aliasing and nonzero-denominator rules. Successful results shall preserve the native exactness or sound enclosure guarantee.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_affine_image(ppl_Polyhedron_t ph, ppl_dimension_type var,
                                    ppl_const_Linear_Expression_t le,
                                    ppl_const_Coefficient_t d);
    int ppl_Polyhedron_affine_preimage(ppl_Polyhedron_t ph, ppl_dimension_type var,
                                       ppl_const_Linear_Expression_t le,
                                       ppl_const_Coefficient_t d);
    int ppl_Polyhedron_bounded_affine_image(ppl_Polyhedron_t ph,
                                            ppl_dimension_type var,
                                            ppl_const_Linear_Expression_t lb,
                                            ppl_const_Linear_Expression_t ub,
                                            ppl_const_Coefficient_t d);
    int ppl_Polyhedron_bounded_affine_preimage(ppl_Polyhedron_t ph,
                                               ppl_dimension_type var,
                                               ppl_const_Linear_Expression_t lb,
                                               ppl_const_Linear_Expression_t ub,
                                               ppl_const_Coefficient_t d);
    int ppl_Polyhedron_generalized_affine_image(
        ppl_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Polyhedron_generalized_affine_preimage(
        ppl_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Polyhedron_generalized_affine_image_lhs_rhs(
        ppl_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Polyhedron_generalized_affine_preimage_lhs_rhs(
        ppl_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Grid_affine_image(ppl_Grid_t ph, ppl_dimension_type var,
                              ppl_const_Linear_Expression_t le,
                              ppl_const_Coefficient_t d);
    int ppl_Grid_affine_preimage(ppl_Grid_t ph, ppl_dimension_type var,
                                 ppl_const_Linear_Expression_t le,
                                 ppl_const_Coefficient_t d);
    int ppl_Grid_bounded_affine_image(ppl_Grid_t ph, ppl_dimension_type var,
                                      ppl_const_Linear_Expression_t lb,
                                      ppl_const_Linear_Expression_t ub,
                                      ppl_const_Coefficient_t d);
    int ppl_Grid_bounded_affine_preimage(ppl_Grid_t ph, ppl_dimension_type var,
                                         ppl_const_Linear_Expression_t lb,
                                         ppl_const_Linear_Expression_t ub,
                                         ppl_const_Coefficient_t d);
    int ppl_Grid_generalized_affine_image(ppl_Grid_t ph, ppl_dimension_type var,
                                          enum ppl_enum_Constraint_Type relsym,
                                          ppl_const_Linear_Expression_t le,
                                          ppl_const_Coefficient_t d);
    int ppl_Grid_generalized_affine_preimage(ppl_Grid_t ph, ppl_dimension_type var,
                                             enum ppl_enum_Constraint_Type relsym,
                                             ppl_const_Linear_Expression_t le,
                                             ppl_const_Coefficient_t d);
    int ppl_Grid_generalized_affine_image_lhs_rhs(
        ppl_Grid_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Grid_generalized_affine_preimage_lhs_rhs(
        ppl_Grid_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Grid_generalized_affine_image_with_congruence(
        ppl_Grid_t ph, ppl_dimension_type var, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d,
        ppl_const_Coefficient_t m);
    int ppl_Grid_generalized_affine_preimage_with_congruence(
        ppl_Grid_t ph, ppl_dimension_type var, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d,
        ppl_const_Coefficient_t m);
    int ppl_Grid_generalized_affine_image_lhs_rhs_with_congruence(
        ppl_Grid_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs,
        ppl_const_Coefficient_t m);
    int ppl_Grid_generalized_affine_preimage_lhs_rhs_with_congruence(
        ppl_Grid_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs,
        ppl_const_Coefficient_t m);
    int ppl_Rational_Box_affine_image(ppl_Rational_Box_t ph, ppl_dimension_type var,
                                      ppl_const_Linear_Expression_t le,
                                      ppl_const_Coefficient_t d);
    int ppl_Rational_Box_affine_preimage(ppl_Rational_Box_t ph,
                                         ppl_dimension_type var,
                                         ppl_const_Linear_Expression_t le,
                                         ppl_const_Coefficient_t d);
    int ppl_Rational_Box_bounded_affine_image(ppl_Rational_Box_t ph,
                                              ppl_dimension_type var,
                                              ppl_const_Linear_Expression_t lb,
                                              ppl_const_Linear_Expression_t ub,
                                              ppl_const_Coefficient_t d);
    int ppl_Rational_Box_bounded_affine_preimage(ppl_Rational_Box_t ph,
                                                 ppl_dimension_type var,
                                                 ppl_const_Linear_Expression_t lb,
                                                 ppl_const_Linear_Expression_t ub,
                                                 ppl_const_Coefficient_t d);
    int ppl_Rational_Box_generalized_affine_image(
        ppl_Rational_Box_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Rational_Box_generalized_affine_preimage(
        ppl_Rational_Box_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Rational_Box_generalized_affine_image_lhs_rhs(
        ppl_Rational_Box_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Rational_Box_generalized_affine_preimage_lhs_rhs(
        ppl_Rational_Box_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_mpz_class_affine_image(ppl_BD_Shape_mpz_class_t ph,
                                            ppl_dimension_type var,
                                            ppl_const_Linear_Expression_t le,
                                            ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_affine_preimage(ppl_BD_Shape_mpz_class_t ph,
                                               ppl_dimension_type var,
                                               ppl_const_Linear_Expression_t le,
                                               ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_bounded_affine_image(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_bounded_affine_preimage(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_generalized_affine_image(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_generalized_affine_preimage(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpz_class_generalized_affine_image_lhs_rhs(
        ppl_BD_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_mpz_class_generalized_affine_preimage_lhs_rhs(
        ppl_BD_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_mpq_class_affine_image(ppl_BD_Shape_mpq_class_t ph,
                                            ppl_dimension_type var,
                                            ppl_const_Linear_Expression_t le,
                                            ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_affine_preimage(ppl_BD_Shape_mpq_class_t ph,
                                               ppl_dimension_type var,
                                               ppl_const_Linear_Expression_t le,
                                               ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_bounded_affine_image(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_bounded_affine_preimage(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_generalized_affine_image(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_generalized_affine_preimage(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_mpq_class_generalized_affine_image_lhs_rhs(
        ppl_BD_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_mpq_class_generalized_affine_preimage_lhs_rhs(
        ppl_BD_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_mpz_class_affine_image(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_affine_preimage(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_bounded_affine_image(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_bounded_affine_preimage(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_generalized_affine_image(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_generalized_affine_preimage(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpz_class_generalized_affine_image_lhs_rhs(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_mpz_class_generalized_affine_preimage_lhs_rhs(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_mpq_class_affine_image(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_affine_preimage(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_bounded_affine_image(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_bounded_affine_preimage(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_generalized_affine_image(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_generalized_affine_preimage(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_mpq_class_generalized_affine_image_lhs_rhs(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_mpq_class_generalized_affine_preimage_lhs_rhs(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_affine_image(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_affine_preimage(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_bounded_affine_image(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_bounded_affine_preimage(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_generalized_affine_image(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_generalized_affine_preimage(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_generalized_affine_image_lhs_rhs(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t rhs);
    int ppl_Constraints_Product_C_Polyhedron_Grid_generalized_affine_preimage_lhs_rhs(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph,
        ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t rhs);
    int ppl_Pointset_Powerset_C_Polyhedron_affine_image(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_affine_preimage(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_bounded_affine_image(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_bounded_affine_preimage(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_generalized_affine_image(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_generalized_affine_preimage(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_generalized_affine_image_lhs_rhs(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Pointset_Powerset_C_Polyhedron_generalized_affine_preimage_lhs_rhs(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_affine_image(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_affine_preimage(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t le, ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_bounded_affine_image(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_bounded_affine_preimage(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_generalized_affine_image(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_generalized_affine_preimage(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_generalized_affine_image_lhs_rhs(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t rhs);
    int ppl_Pointset_Powerset_NNC_Polyhedron_generalized_affine_preimage_lhs_rhs(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph,
        ppl_const_Linear_Expression_t lhs, enum ppl_enum_Constraint_Type relsym,
        ppl_const_Linear_Expression_t rhs);
    int ppl_Double_Box_affine_image(ppl_Double_Box_t ph, ppl_dimension_type var,
                                    ppl_const_Linear_Expression_t le,
                                    ppl_const_Coefficient_t d);
    int ppl_Double_Box_affine_preimage(ppl_Double_Box_t ph, ppl_dimension_type var,
                                       ppl_const_Linear_Expression_t le,
                                       ppl_const_Coefficient_t d);
    int ppl_Double_Box_bounded_affine_image(ppl_Double_Box_t ph,
                                            ppl_dimension_type var,
                                            ppl_const_Linear_Expression_t lb,
                                            ppl_const_Linear_Expression_t ub,
                                            ppl_const_Coefficient_t d);
    int ppl_Double_Box_bounded_affine_preimage(ppl_Double_Box_t ph,
                                               ppl_dimension_type var,
                                               ppl_const_Linear_Expression_t lb,
                                               ppl_const_Linear_Expression_t ub,
                                               ppl_const_Coefficient_t d);
    int ppl_Double_Box_generalized_affine_image(
        ppl_Double_Box_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Double_Box_generalized_affine_preimage(
        ppl_Double_Box_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Double_Box_generalized_affine_image_lhs_rhs(
        ppl_Double_Box_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Double_Box_generalized_affine_preimage_lhs_rhs(
        ppl_Double_Box_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_double_affine_image(ppl_BD_Shape_double_t ph,
                                         ppl_dimension_type var,
                                         ppl_const_Linear_Expression_t le,
                                         ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_affine_preimage(ppl_BD_Shape_double_t ph,
                                            ppl_dimension_type var,
                                            ppl_const_Linear_Expression_t le,
                                            ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_bounded_affine_image(ppl_BD_Shape_double_t ph,
                                                 ppl_dimension_type var,
                                                 ppl_const_Linear_Expression_t lb,
                                                 ppl_const_Linear_Expression_t ub,
                                                 ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_bounded_affine_preimage(
        ppl_BD_Shape_double_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_generalized_affine_image(
        ppl_BD_Shape_double_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_generalized_affine_preimage(
        ppl_BD_Shape_double_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_BD_Shape_double_generalized_affine_image_lhs_rhs(
        ppl_BD_Shape_double_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_BD_Shape_double_generalized_affine_preimage_lhs_rhs(
        ppl_BD_Shape_double_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_double_affine_image(ppl_Octagonal_Shape_double_t ph,
                                                ppl_dimension_type var,
                                                ppl_const_Linear_Expression_t le,
                                                ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_affine_preimage(ppl_Octagonal_Shape_double_t ph,
                                                   ppl_dimension_type var,
                                                   ppl_const_Linear_Expression_t le,
                                                   ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_bounded_affine_image(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_bounded_affine_preimage(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type var,
        ppl_const_Linear_Expression_t lb, ppl_const_Linear_Expression_t ub,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_generalized_affine_image(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_generalized_affine_preimage(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type var,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t le,
        ppl_const_Coefficient_t d);
    int ppl_Octagonal_Shape_double_generalized_affine_image_lhs_rhs(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    int ppl_Octagonal_Shape_double_generalized_affine_preimage_lhs_rhs(
        ppl_Octagonal_Shape_double_t ph, ppl_const_Linear_Expression_t lhs,
        enum ppl_enum_Constraint_Type relsym, ppl_const_Linear_Expression_t rhs);
    
    VERIFICATION_CRITERIA:

    Check borrowed scalars/expressions, zero and negative denominators where admitted, dimension guards and literal image/preimage sets.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/polyhedra.c.

  • PPL-SPEC-001559
    6. C generated dimension arrays and maps UID: PPL-SPEC-001559 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Dimension growth, projection/removal, expansion/folding and coordinate maps shall preserve native coordinate meanings. Counted dimension lists shall form sets where the native interface accepts sets. Map arrays shall associate source index i with entry i, using the published non-dimension sentinel for undefined entries. Entries outside the supplied array shall be undefined. Map emptiness and maximum codomain shall have finite partial-map meanings; valid maps shall satisfy the native dimension-map admission rules.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_add_space_dimensions_and_embed(ppl_Polyhedron_t ph,
                                                      ppl_dimension_type d);
    int ppl_Polyhedron_add_space_dimensions_and_project(ppl_Polyhedron_t ph,
                                                        ppl_dimension_type d);
    int ppl_Polyhedron_remove_space_dimensions(ppl_Polyhedron_t ph,
                                               ppl_dimension_type ds[], size_t n);
    int ppl_Polyhedron_remove_higher_space_dimensions(ppl_Polyhedron_t ph,
                                                      ppl_dimension_type d);
    int ppl_Polyhedron_expand_space_dimension(ppl_Polyhedron_t ph,
                                              ppl_dimension_type d,
                                              ppl_dimension_type m);
    int ppl_Polyhedron_fold_space_dimensions(ppl_Polyhedron_t ph,
                                             ppl_dimension_type ds[], size_t n,
                                             ppl_dimension_type d);
    int ppl_Polyhedron_map_space_dimensions(ppl_Polyhedron_t ph,
                                            ppl_dimension_type maps[], size_t n);
    int ppl_Grid_add_space_dimensions_and_embed(ppl_Grid_t ph,
                                                ppl_dimension_type d);
    int ppl_Grid_add_space_dimensions_and_project(ppl_Grid_t ph,
                                                  ppl_dimension_type d);
    int ppl_Grid_remove_space_dimensions(ppl_Grid_t ph, ppl_dimension_type ds[],
                                         size_t n);
    int ppl_Grid_remove_higher_space_dimensions(ppl_Grid_t ph,
                                                ppl_dimension_type d);
    int ppl_Grid_expand_space_dimension(ppl_Grid_t ph, ppl_dimension_type d,
                                        ppl_dimension_type m);
    int ppl_Grid_fold_space_dimensions(ppl_Grid_t ph, ppl_dimension_type ds[],
                                       size_t n, ppl_dimension_type d);
    int ppl_Grid_map_space_dimensions(ppl_Grid_t ph, ppl_dimension_type maps[],
                                      size_t n);
    int ppl_Rational_Box_add_space_dimensions_and_embed(ppl_Rational_Box_t ph,
                                                        ppl_dimension_type d);
    int ppl_Rational_Box_add_space_dimensions_and_project(ppl_Rational_Box_t ph,
                                                          ppl_dimension_type d);
    int ppl_Rational_Box_remove_space_dimensions(ppl_Rational_Box_t ph,
                                                 ppl_dimension_type ds[], size_t n);
    int ppl_Rational_Box_remove_higher_space_dimensions(ppl_Rational_Box_t ph,
                                                        ppl_dimension_type d);
    int ppl_Rational_Box_expand_space_dimension(ppl_Rational_Box_t ph,
                                                ppl_dimension_type d,
                                                ppl_dimension_type m);
    int ppl_Rational_Box_fold_space_dimensions(ppl_Rational_Box_t ph,
                                               ppl_dimension_type ds[], size_t n,
                                               ppl_dimension_type d);
    int ppl_Rational_Box_map_space_dimensions(ppl_Rational_Box_t ph,
                                              ppl_dimension_type maps[], size_t n);
    int ppl_BD_Shape_mpz_class_add_space_dimensions_and_embed(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpz_class_add_space_dimensions_and_project(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpz_class_remove_space_dimensions(ppl_BD_Shape_mpz_class_t ph,
                                                       ppl_dimension_type ds[],
                                                       size_t n);
    int ppl_BD_Shape_mpz_class_remove_higher_space_dimensions(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpz_class_expand_space_dimension(ppl_BD_Shape_mpz_class_t ph,
                                                      ppl_dimension_type d,
                                                      ppl_dimension_type m);
    int ppl_BD_Shape_mpz_class_fold_space_dimensions(ppl_BD_Shape_mpz_class_t ph,
                                                     ppl_dimension_type ds[],
                                                     size_t n,
                                                     ppl_dimension_type d);
    int ppl_BD_Shape_mpz_class_map_space_dimensions(ppl_BD_Shape_mpz_class_t ph,
                                                    ppl_dimension_type maps[],
                                                    size_t n);
    int ppl_BD_Shape_mpq_class_add_space_dimensions_and_embed(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpq_class_add_space_dimensions_and_project(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpq_class_remove_space_dimensions(ppl_BD_Shape_mpq_class_t ph,
                                                       ppl_dimension_type ds[],
                                                       size_t n);
    int ppl_BD_Shape_mpq_class_remove_higher_space_dimensions(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_mpq_class_expand_space_dimension(ppl_BD_Shape_mpq_class_t ph,
                                                      ppl_dimension_type d,
                                                      ppl_dimension_type m);
    int ppl_BD_Shape_mpq_class_fold_space_dimensions(ppl_BD_Shape_mpq_class_t ph,
                                                     ppl_dimension_type ds[],
                                                     size_t n,
                                                     ppl_dimension_type d);
    int ppl_BD_Shape_mpq_class_map_space_dimensions(ppl_BD_Shape_mpq_class_t ph,
                                                    ppl_dimension_type maps[],
                                                    size_t n);
    int ppl_Octagonal_Shape_mpz_class_add_space_dimensions_and_embed(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpz_class_add_space_dimensions_and_project(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpz_class_remove_space_dimensions(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Octagonal_Shape_mpz_class_remove_higher_space_dimensions(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpz_class_expand_space_dimension(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Octagonal_Shape_mpz_class_fold_space_dimensions(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n,
        ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpz_class_map_space_dimensions(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type maps[], size_t n);
    int ppl_Octagonal_Shape_mpq_class_add_space_dimensions_and_embed(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpq_class_add_space_dimensions_and_project(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpq_class_remove_space_dimensions(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Octagonal_Shape_mpq_class_remove_higher_space_dimensions(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpq_class_expand_space_dimension(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Octagonal_Shape_mpq_class_fold_space_dimensions(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n,
        ppl_dimension_type d);
    int ppl_Octagonal_Shape_mpq_class_map_space_dimensions(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type maps[], size_t n);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_space_dimensions_and_embed(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_add_space_dimensions_and_project(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_remove_space_dimensions(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type ds[],
        size_t n);
    int ppl_Constraints_Product_C_Polyhedron_Grid_remove_higher_space_dimensions(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_expand_space_dimension(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Constraints_Product_C_Polyhedron_Grid_fold_space_dimensions(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type ds[],
        size_t n, ppl_dimension_type d);
    int ppl_Constraints_Product_C_Polyhedron_Grid_map_space_dimensions(
        ppl_Constraints_Product_C_Polyhedron_Grid_t ph, ppl_dimension_type maps[],
        size_t n);
    int ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_embed(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_C_Polyhedron_add_space_dimensions_and_project(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_C_Polyhedron_remove_space_dimensions(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Pointset_Powerset_C_Polyhedron_remove_higher_space_dimensions(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_C_Polyhedron_expand_space_dimension(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Pointset_Powerset_C_Polyhedron_fold_space_dimensions(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type ds[], size_t n,
        ppl_dimension_type d);
    int ppl_Pointset_Powerset_C_Polyhedron_map_space_dimensions(
        ppl_Pointset_Powerset_C_Polyhedron_t ph, ppl_dimension_type maps[],
        size_t n);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_space_dimensions_and_embed(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_space_dimensions_and_project(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_remove_space_dimensions(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type ds[],
        size_t n);
    int ppl_Pointset_Powerset_NNC_Polyhedron_remove_higher_space_dimensions(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_expand_space_dimension(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Pointset_Powerset_NNC_Polyhedron_fold_space_dimensions(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type ds[],
        size_t n, ppl_dimension_type d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_map_space_dimensions(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ph, ppl_dimension_type maps[],
        size_t n);
    int ppl_Double_Box_add_space_dimensions_and_embed(ppl_Double_Box_t ph,
                                                      ppl_dimension_type d);
    int ppl_Double_Box_add_space_dimensions_and_project(ppl_Double_Box_t ph,
                                                        ppl_dimension_type d);
    int ppl_Double_Box_remove_space_dimensions(ppl_Double_Box_t ph,
                                               ppl_dimension_type ds[], size_t n);
    int ppl_Double_Box_remove_higher_space_dimensions(ppl_Double_Box_t ph,
                                                      ppl_dimension_type d);
    int ppl_Double_Box_expand_space_dimension(ppl_Double_Box_t ph,
                                              ppl_dimension_type d,
                                              ppl_dimension_type m);
    int ppl_Double_Box_fold_space_dimensions(ppl_Double_Box_t ph,
                                             ppl_dimension_type ds[], size_t n,
                                             ppl_dimension_type d);
    int ppl_Double_Box_map_space_dimensions(ppl_Double_Box_t ph,
                                            ppl_dimension_type maps[], size_t n);
    int ppl_BD_Shape_double_add_space_dimensions_and_embed(ppl_BD_Shape_double_t ph,
                                                           ppl_dimension_type d);
    int ppl_BD_Shape_double_add_space_dimensions_and_project(
        ppl_BD_Shape_double_t ph, ppl_dimension_type d);
    int ppl_BD_Shape_double_remove_space_dimensions(ppl_BD_Shape_double_t ph,
                                                    ppl_dimension_type ds[],
                                                    size_t n);
    int ppl_BD_Shape_double_remove_higher_space_dimensions(ppl_BD_Shape_double_t ph,
                                                           ppl_dimension_type d);
    int ppl_BD_Shape_double_expand_space_dimension(ppl_BD_Shape_double_t ph,
                                                   ppl_dimension_type d,
                                                   ppl_dimension_type m);
    int ppl_BD_Shape_double_fold_space_dimensions(ppl_BD_Shape_double_t ph,
                                                  ppl_dimension_type ds[], size_t n,
                                                  ppl_dimension_type d);
    int ppl_BD_Shape_double_map_space_dimensions(ppl_BD_Shape_double_t ph,
                                                 ppl_dimension_type maps[],
                                                 size_t n);
    int ppl_Octagonal_Shape_double_add_space_dimensions_and_embed(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_double_add_space_dimensions_and_project(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_double_remove_space_dimensions(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type ds[], size_t n);
    int ppl_Octagonal_Shape_double_remove_higher_space_dimensions(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type d);
    int ppl_Octagonal_Shape_double_expand_space_dimension(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type d,
        ppl_dimension_type m);
    int ppl_Octagonal_Shape_double_fold_space_dimensions(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type ds[], size_t n,
        ppl_dimension_type d);
    int ppl_Octagonal_Shape_double_map_space_dimensions(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type maps[], size_t n);
    
    VERIFICATION_CRITERIA:

    Check empty and sparse maps, reserved entries, reordered coordinates, duplicate dimension selections, valid codomain maxima and native growth limits.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/polyhedra.c.

  • PPL-SPEC-001560
    7. C generated convergence operations UID: PPL-SPEC-001560 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Selected widening, extrapolation and narrowing functions shall apply their corresponding native operators and preconditions. Optional token pointers shall be forwarded with native token-update meaning; convenience forms shall have the same effect as their tokenless native form. Constraints limiting or bounding extrapolation shall retain their native role. These operations shall not be reinterpreted as exact joins or intersections.

    The Rational_Box powerset BHZ03_CC76_CC76 function shall use the default CC76 stopping points and tokenless certificate contract of 🔗 5. Threshold-aware CC76 box convergence certificates. It shall be available when the powerset interface is selected, even when the separate Rational_Box interface is not selected. Other box types shall remain excluded unless separately certified for export.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_BHRZ03_widening_assign_with_tokens(ppl_Polyhedron_t x,
                                                          ppl_const_Polyhedron_t y,
                                                          unsigned *tp);
    int ppl_Polyhedron_H79_widening_assign_with_tokens(ppl_Polyhedron_t x,
                                                       ppl_const_Polyhedron_t y,
                                                       unsigned *tp);
    int ppl_Polyhedron_BHRZ03_widening_assign(ppl_Polyhedron_t x,
                                              ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_H79_widening_assign(ppl_Polyhedron_t x,
                                           ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_widening_assign_with_tokens(ppl_Polyhedron_t x,
                                                   ppl_const_Polyhedron_t y,
                                                   unsigned *tp);
    int ppl_Polyhedron_widening_assign(ppl_Polyhedron_t x,
                                       ppl_const_Polyhedron_t y);
    int ppl_Polyhedron_limited_BHRZ03_extrapolation_assign_with_tokens(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign_with_tokens(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Polyhedron_limited_H79_extrapolation_assign_with_tokens(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Polyhedron_bounded_H79_extrapolation_assign_with_tokens(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Polyhedron_limited_BHRZ03_extrapolation_assign(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Polyhedron_bounded_BHRZ03_extrapolation_assign(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Polyhedron_limited_H79_extrapolation_assign(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Polyhedron_bounded_H79_extrapolation_assign(
        ppl_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Grid_congruence_widening_assign_with_tokens(ppl_Grid_t x,
                                                        ppl_const_Grid_t y,
                                                        unsigned *tp);
    int ppl_Grid_generator_widening_assign_with_tokens(ppl_Grid_t x,
                                                       ppl_const_Grid_t y,
                                                       unsigned *tp);
    int ppl_Grid_congruence_widening_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_generator_widening_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_widening_assign_with_tokens(ppl_Grid_t x, ppl_const_Grid_t y,
                                             unsigned *tp);
    int ppl_Grid_widening_assign(ppl_Grid_t x, ppl_const_Grid_t y);
    int ppl_Grid_limited_congruence_extrapolation_assign_with_tokens(
        ppl_Grid_t x, ppl_const_Grid_t y, ppl_const_Congruence_System_t cs,
        unsigned *tp);
    int ppl_Grid_limited_generator_extrapolation_assign_with_tokens(
        ppl_Grid_t x, ppl_const_Grid_t y, ppl_const_Congruence_System_t cs,
        unsigned *tp);
    int ppl_Grid_limited_congruence_extrapolation_assign(
        ppl_Grid_t x, ppl_const_Grid_t y, ppl_const_Congruence_System_t cs);
    int ppl_Grid_limited_generator_extrapolation_assign(
        ppl_Grid_t x, ppl_const_Grid_t y, ppl_const_Congruence_System_t cs);
    int ppl_Rational_Box_CC76_widening_assign_with_tokens(
        ppl_Rational_Box_t x, ppl_const_Rational_Box_t y, unsigned *tp);
    int ppl_Rational_Box_CC76_widening_assign(ppl_Rational_Box_t x,
                                              ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_widening_assign_with_tokens(ppl_Rational_Box_t x,
                                                     ppl_const_Rational_Box_t y,
                                                     unsigned *tp);
    int ppl_Rational_Box_widening_assign(ppl_Rational_Box_t x,
                                         ppl_const_Rational_Box_t y);
    int ppl_Rational_Box_limited_CC76_extrapolation_assign_with_tokens(
        ppl_Rational_Box_t x, ppl_const_Rational_Box_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Rational_Box_limited_CC76_extrapolation_assign(
        ppl_Rational_Box_t x, ppl_const_Rational_Box_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Rational_Box_CC76_narrowing_assign(ppl_Rational_Box_t x,
                                               ppl_const_Rational_Box_t y);
    int ppl_BD_Shape_mpz_class_BHMZ05_widening_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpz_class_H79_widening_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpz_class_BHMZ05_widening_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_H79_widening_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_widening_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpz_class_widening_assign(ppl_BD_Shape_mpz_class_t x,
                                               ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpz_class_limited_H79_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpz_class_limited_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpz_class_limited_BHMZ05_extrapolation_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_limited_H79_extrapolation_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_limited_CC76_extrapolation_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpz_class_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpz_class_CC76_extrapolation_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpz_class_CC76_narrowing_assign(
        ppl_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y);
    int ppl_BD_Shape_mpq_class_BHMZ05_widening_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpq_class_H79_widening_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpq_class_BHMZ05_widening_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_H79_widening_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_widening_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpq_class_widening_assign(ppl_BD_Shape_mpq_class_t x,
                                               ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpq_class_limited_H79_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpq_class_limited_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_mpq_class_limited_BHMZ05_extrapolation_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_limited_H79_extrapolation_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_limited_CC76_extrapolation_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_mpq_class_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y, unsigned *tp);
    int ppl_BD_Shape_mpq_class_CC76_extrapolation_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_BD_Shape_mpq_class_CC76_narrowing_assign(
        ppl_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpz_class_BHMZ05_widening_assign_with_tokens(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpz_class_BHMZ05_widening_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_widening_assign_with_tokens(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpz_class_widening_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_mpz_class_limited_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_mpz_class_limited_BHMZ05_extrapolation_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_limited_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpz_class_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpz_class_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpz_class_CC76_narrowing_assign(
        ppl_Octagonal_Shape_mpz_class_t x, ppl_const_Octagonal_Shape_mpz_class_t y);
    int ppl_Octagonal_Shape_mpq_class_BHMZ05_widening_assign_with_tokens(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpq_class_BHMZ05_widening_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_widening_assign_with_tokens(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpq_class_widening_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_mpq_class_limited_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_mpq_class_limited_BHMZ05_extrapolation_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_limited_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_mpq_class_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_mpq_class_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Octagonal_Shape_mpq_class_CC76_narrowing_assign(
        ppl_Octagonal_Shape_mpq_class_t x, ppl_const_Octagonal_Shape_mpq_class_t y);
    int ppl_Constraints_Product_C_Polyhedron_Grid_widening_assign_with_tokens(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y, unsigned *tp);
    int ppl_Constraints_Product_C_Polyhedron_Grid_widening_assign(
        ppl_Constraints_Product_C_Polyhedron_Grid_t x,
        ppl_const_Constraints_Product_C_Polyhedron_Grid_t y);
    int ppl_Pointset_Powerset_Rational_Box_BHZ03_CC76_CC76_widening_assign(
        ppl_Pointset_Powerset_Rational_Box_t x,
        ppl_const_Pointset_Powerset_Rational_Box_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_BHZ03_BHRZ03_BHRZ03_widening_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_BHZ03_H79_H79_widening_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_BGP99_BHRZ03_extrapolation_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y, unsigned disjuncts);
    int ppl_Pointset_Powerset_C_Polyhedron_BGP99_H79_extrapolation_assign(
        ppl_Pointset_Powerset_C_Polyhedron_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_t y, unsigned disjuncts);
    int ppl_Pointset_Powerset_NNC_Polyhedron_BHZ03_BHRZ03_BHRZ03_widening_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_BHZ03_H79_H79_widening_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_BGP99_BHRZ03_extrapolation_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y, unsigned disjuncts);
    int ppl_Pointset_Powerset_NNC_Polyhedron_BGP99_H79_extrapolation_assign(
        ppl_Pointset_Powerset_NNC_Polyhedron_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t y, unsigned disjuncts);
    int ppl_Double_Box_CC76_widening_assign_with_tokens(ppl_Double_Box_t x,
                                                        ppl_const_Double_Box_t y,
                                                        unsigned *tp);
    int ppl_Double_Box_CC76_widening_assign(ppl_Double_Box_t x,
                                            ppl_const_Double_Box_t y);
    int ppl_Double_Box_widening_assign_with_tokens(ppl_Double_Box_t x,
                                                   ppl_const_Double_Box_t y,
                                                   unsigned *tp);
    int ppl_Double_Box_widening_assign(ppl_Double_Box_t x,
                                       ppl_const_Double_Box_t y);
    int ppl_Double_Box_limited_CC76_extrapolation_assign_with_tokens(
        ppl_Double_Box_t x, ppl_const_Double_Box_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Double_Box_limited_CC76_extrapolation_assign(
        ppl_Double_Box_t x, ppl_const_Double_Box_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Double_Box_CC76_narrowing_assign(ppl_Double_Box_t x,
                                             ppl_const_Double_Box_t y);
    int ppl_BD_Shape_double_BHMZ05_widening_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y, unsigned *tp);
    int ppl_BD_Shape_double_H79_widening_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y, unsigned *tp);
    int ppl_BD_Shape_double_BHMZ05_widening_assign(ppl_BD_Shape_double_t x,
                                                   ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_H79_widening_assign(ppl_BD_Shape_double_t x,
                                                ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_widening_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y, unsigned *tp);
    int ppl_BD_Shape_double_widening_assign(ppl_BD_Shape_double_t x,
                                            ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_double_limited_H79_extrapolation_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_double_limited_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_BD_Shape_double_limited_BHMZ05_extrapolation_assign(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_double_limited_H79_extrapolation_assign(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_double_limited_CC76_extrapolation_assign(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_BD_Shape_double_CC76_extrapolation_assign_with_tokens(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y, unsigned *tp);
    int ppl_BD_Shape_double_CC76_extrapolation_assign(
        ppl_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y);
    int ppl_BD_Shape_double_CC76_narrowing_assign(ppl_BD_Shape_double_t x,
                                                  ppl_const_BD_Shape_double_t y);
    int ppl_Octagonal_Shape_double_BHMZ05_widening_assign_with_tokens(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_double_BHMZ05_widening_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_widening_assign_with_tokens(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_double_widening_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_limited_BHMZ05_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_double_limited_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        ppl_const_Constraint_System_t cs, unsigned *tp);
    int ppl_Octagonal_Shape_double_limited_BHMZ05_extrapolation_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_double_limited_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        ppl_const_Constraint_System_t cs);
    int ppl_Octagonal_Shape_double_CC76_extrapolation_assign_with_tokens(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        unsigned *tp);
    int ppl_Octagonal_Shape_double_CC76_extrapolation_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    int ppl_Octagonal_Shape_double_CC76_narrowing_assign(
        ppl_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y);
    
    VERIFICATION_CRITERIA:

    Exercise ascending powerset-box histories, finite stabilization, geometric coverage and source preservation, including an isolated powerset selection.

    Compare native and C histories, token effects, stable limits, empty/universe arguments and required inclusion/dimension conditions.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc.

  • PPL-SPEC-001561
    8. C finite-disjunction ownership and traversal UID: PPL-SPEC-001561 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Generated powerset iterator objects shall own only positions in a live disjunction. Disjunct getters shall return borrowed const disjuncts; adding shall copy the supplied value. Single/range removal shall use valid positions and native invalidation rules. Disjunct iteration shall preserve the native representation and shall not assert a canonical or pairwise-disjoint decomposition.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_new_Pointset_Powerset_C_Polyhedron_iterator(
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t *pit);
    int ppl_new_Pointset_Powerset_C_Polyhedron_const_iterator(
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t *pit);
    int ppl_new_Pointset_Powerset_C_Polyhedron_iterator_from_iterator(
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t *px,
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t y);
    int ppl_new_Pointset_Powerset_C_Polyhedron_const_iterator_from_const_iterator(
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t *px,
        ppl_const_Pointset_Powerset_C_Polyhedron_const_iterator_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_begin(
        ppl_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_begin(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_end(
        ppl_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_end(
        ppl_const_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_equal_test(
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_equal_test(
        ppl_const_Pointset_Powerset_C_Polyhedron_const_iterator_t x,
        ppl_const_Pointset_Powerset_C_Polyhedron_const_iterator_t y);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_increment(
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_increment(
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_decrement(
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_decrement(
        ppl_Pointset_Powerset_C_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_iterator_dereference(
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t ps,
        ppl_const_Polyhedron_t *d);
    int ppl_Pointset_Powerset_C_Polyhedron_const_iterator_dereference(
        ppl_const_Pointset_Powerset_C_Polyhedron_const_iterator_t ps,
        ppl_const_Polyhedron_t *d);
    int ppl_delete_Pointset_Powerset_C_Polyhedron_iterator(
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t psit);
    int ppl_delete_Pointset_Powerset_C_Polyhedron_const_iterator(
        ppl_const_Pointset_Powerset_C_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_C_Polyhedron_add_disjunct(
        ppl_Pointset_Powerset_C_Polyhedron_t ps, ppl_const_Polyhedron_t d);
    int ppl_Pointset_Powerset_C_Polyhedron_drop_disjunct(
        ppl_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t cit,
        ppl_Pointset_Powerset_C_Polyhedron_iterator_t it);
    int ppl_Pointset_Powerset_C_Polyhedron_drop_disjuncts(
        ppl_Pointset_Powerset_C_Polyhedron_t ps,
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t first,
        ppl_const_Pointset_Powerset_C_Polyhedron_iterator_t last);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_iterator(
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t *pit);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_const_iterator(
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t *pit);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_iterator_from_iterator(
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t *px,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t y);
    int ppl_new_Pointset_Powerset_NNC_Polyhedron_const_iterator_from_const_iterator(
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t *px,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_const_iterator_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_begin(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_begin(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_end(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_end(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_equal_test(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_equal_test(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_const_iterator_t x,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_const_iterator_t y);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_increment(
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_increment(
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_decrement(
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_decrement(
        ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_iterator_dereference(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t ps,
        ppl_const_Polyhedron_t *d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_const_iterator_dereference(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_const_iterator_t ps,
        ppl_const_Polyhedron_t *d);
    int ppl_delete_Pointset_Powerset_NNC_Polyhedron_iterator(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t psit);
    int ppl_delete_Pointset_Powerset_NNC_Polyhedron_const_iterator(
        ppl_const_Pointset_Powerset_NNC_Polyhedron_const_iterator_t psit);
    int ppl_Pointset_Powerset_NNC_Polyhedron_add_disjunct(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ps, ppl_const_Polyhedron_t d);
    int ppl_Pointset_Powerset_NNC_Polyhedron_drop_disjunct(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t cit,
        ppl_Pointset_Powerset_NNC_Polyhedron_iterator_t it);
    int ppl_Pointset_Powerset_NNC_Polyhedron_drop_disjuncts(
        ppl_Pointset_Powerset_NNC_Polyhedron_t ps,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t first,
        ppl_const_Pointset_Powerset_NNC_Polyhedron_iterator_t last);
    
    VERIFICATION_CRITERIA:

    Check independent added values, borrowed traversal, empty/nonempty begin/end, copy/assignment and removal/invalidation histories.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/powersets.c.

  • PPL-SPEC-001562
    9. C partition result ownership UID: PPL-SPEC-001562 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Partition functions shall produce the corresponding native intersection and finite-disjunction remainder, including the native finiteness/exactness indicator where provided. Successful output handles shall denote independently owned results. Results shall be published only after all required owned outputs have been acquired; failure shall release partial results and preserve output handle values. Output addresses shall be distinct as required.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_linear_partition(
        ppl_const_Polyhedron_t x, ppl_const_Polyhedron_t y,
        ppl_Polyhedron_t *p_inters, ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_Rational_Box_linear_partition(
        ppl_const_Rational_Box_t x, ppl_const_Rational_Box_t y,
        ppl_Rational_Box_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_BD_Shape_mpz_class_linear_partition(
        ppl_const_BD_Shape_mpz_class_t x, ppl_const_BD_Shape_mpz_class_t y,
        ppl_BD_Shape_mpz_class_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_BD_Shape_mpq_class_linear_partition(
        ppl_const_BD_Shape_mpq_class_t x, ppl_const_BD_Shape_mpq_class_t y,
        ppl_BD_Shape_mpq_class_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_Octagonal_Shape_mpz_class_linear_partition(
        ppl_const_Octagonal_Shape_mpz_class_t x,
        ppl_const_Octagonal_Shape_mpz_class_t y,
        ppl_Octagonal_Shape_mpz_class_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_Octagonal_Shape_mpq_class_linear_partition(
        ppl_const_Octagonal_Shape_mpq_class_t x,
        ppl_const_Octagonal_Shape_mpq_class_t y,
        ppl_Octagonal_Shape_mpq_class_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_Double_Box_linear_partition(
        ppl_const_Double_Box_t x, ppl_const_Double_Box_t y,
        ppl_Double_Box_t *p_inters, ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_BD_Shape_double_linear_partition(
        ppl_const_BD_Shape_double_t x, ppl_const_BD_Shape_double_t y,
        ppl_BD_Shape_double_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    int ppl_Octagonal_Shape_double_linear_partition(
        ppl_const_Octagonal_Shape_double_t x, ppl_const_Octagonal_Shape_double_t y,
        ppl_Octagonal_Shape_double_t *p_inters,
        ppl_Pointset_Powerset_NNC_Polyhedron_t *p_rest);
    
    VERIFICATION_CRITERIA:

    Check literal partitions and their union/disjointness guarantees, indicator meaning, independent destruction and failure at each acquisition frontier.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/partitions.c.

  • PPL-SPEC-001563
    10. C affine-ranking outcomes and coefficient spaces UID: PPL-SPEC-001563 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Generated termination tests and one/all-ranking functions shall preserve the selected native MS/PR method, including the coordinate interpretation in 🔗 1. Transition encoding and ranking interpretation, normalization and strictness conventions. A false test or witness result shall remain inconclusive about termination. Successful witnesses shall satisfy the native ranking obligations; all-ranking outputs shall represent the native coefficient space, including universe for empty transitions. Paired input dimensions and selected output types shall satisfy native and binding-generation dependencies.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_termination_test_MS_C_Polyhedron(ppl_const_Polyhedron_t pset);
    int ppl_termination_test_PR_C_Polyhedron(ppl_const_Polyhedron_t pset);
    int ppl_termination_test_MS_NNC_Polyhedron(ppl_const_Polyhedron_t pset);
    int ppl_termination_test_PR_NNC_Polyhedron(ppl_const_Polyhedron_t pset);
    int ppl_one_affine_ranking_function_MS_C_Polyhedron(ppl_const_Polyhedron_t pset,
                                                        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_C_Polyhedron(ppl_const_Polyhedron_t pset,
                                                        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_MS_NNC_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_NNC_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_C_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_C_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_MS_NNC_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_NNC_Polyhedron(
        ppl_const_Polyhedron_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_C_Polyhedron_2(ppl_const_Polyhedron_t pset_before,
                                               ppl_const_Polyhedron_t pset_after);
    int ppl_termination_test_PR_C_Polyhedron_2(ppl_const_Polyhedron_t pset_before,
                                               ppl_const_Polyhedron_t pset_after);
    int ppl_termination_test_MS_NNC_Polyhedron_2(ppl_const_Polyhedron_t pset_before,
                                                 ppl_const_Polyhedron_t pset_after);
    int ppl_termination_test_PR_NNC_Polyhedron_2(ppl_const_Polyhedron_t pset_before,
                                                 ppl_const_Polyhedron_t pset_after);
    int ppl_one_affine_ranking_function_MS_C_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_C_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_MS_NNC_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_NNC_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_C_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_C_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_MS_NNC_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_NNC_Polyhedron_2(
        ppl_const_Polyhedron_t pset_before, ppl_const_Polyhedron_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Grid(ppl_const_Grid_t pset);
    int ppl_termination_test_PR_Grid(ppl_const_Grid_t pset);
    int ppl_one_affine_ranking_function_MS_Grid(ppl_const_Grid_t pset,
                                                ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Grid(ppl_const_Grid_t pset,
                                                ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Grid(ppl_const_Grid_t pset,
                                                 ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Grid(ppl_const_Grid_t pset,
                                                 ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Grid_2(ppl_const_Grid_t pset_before,
                                       ppl_const_Grid_t pset_after);
    int ppl_termination_test_PR_Grid_2(ppl_const_Grid_t pset_before,
                                       ppl_const_Grid_t pset_after);
    int ppl_one_affine_ranking_function_MS_Grid_2(ppl_const_Grid_t pset_before,
                                                  ppl_const_Grid_t pset_after,
                                                  ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Grid_2(ppl_const_Grid_t pset_before,
                                                  ppl_const_Grid_t pset_after,
                                                  ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Grid_2(ppl_const_Grid_t pset_before,
                                                   ppl_const_Grid_t pset_after,
                                                   ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Grid_2(ppl_const_Grid_t pset_before,
                                                   ppl_const_Grid_t pset_after,
                                                   ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Rational_Box(ppl_const_Rational_Box_t pset);
    int ppl_termination_test_PR_Rational_Box(ppl_const_Rational_Box_t pset);
    int ppl_one_affine_ranking_function_MS_Rational_Box(
        ppl_const_Rational_Box_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Rational_Box(
        ppl_const_Rational_Box_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Rational_Box(
        ppl_const_Rational_Box_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Rational_Box(
        ppl_const_Rational_Box_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Rational_Box_2(ppl_const_Rational_Box_t pset_before,
                                               ppl_const_Rational_Box_t pset_after);
    int ppl_termination_test_PR_Rational_Box_2(ppl_const_Rational_Box_t pset_before,
                                               ppl_const_Rational_Box_t pset_after);
    int ppl_one_affine_ranking_function_MS_Rational_Box_2(
        ppl_const_Rational_Box_t pset_before, ppl_const_Rational_Box_t pset_after,
        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Rational_Box_2(
        ppl_const_Rational_Box_t pset_before, ppl_const_Rational_Box_t pset_after,
        ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Rational_Box_2(
        ppl_const_Rational_Box_t pset_before, ppl_const_Rational_Box_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Rational_Box_2(
        ppl_const_Rational_Box_t pset_before, ppl_const_Rational_Box_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset);
    int ppl_termination_test_PR_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset);
    int ppl_one_affine_ranking_function_MS_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_mpz_class(
        ppl_const_BD_Shape_mpz_class_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after);
    int ppl_termination_test_PR_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after);
    int ppl_one_affine_ranking_function_MS_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_mpz_class_2(
        ppl_const_BD_Shape_mpz_class_t pset_before,
        ppl_const_BD_Shape_mpz_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset);
    int ppl_termination_test_PR_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset);
    int ppl_one_affine_ranking_function_MS_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_mpq_class(
        ppl_const_BD_Shape_mpq_class_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after);
    int ppl_termination_test_PR_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after);
    int ppl_one_affine_ranking_function_MS_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_mpq_class_2(
        ppl_const_BD_Shape_mpq_class_t pset_before,
        ppl_const_BD_Shape_mpq_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset);
    int ppl_termination_test_PR_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_mpz_class(
        ppl_const_Octagonal_Shape_mpz_class_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after);
    int ppl_termination_test_PR_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_mpz_class_2(
        ppl_const_Octagonal_Shape_mpz_class_t pset_before,
        ppl_const_Octagonal_Shape_mpz_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset);
    int ppl_termination_test_PR_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_mpq_class(
        ppl_const_Octagonal_Shape_mpq_class_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after);
    int ppl_termination_test_PR_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_mpq_class_2(
        ppl_const_Octagonal_Shape_mpq_class_t pset_before,
        ppl_const_Octagonal_Shape_mpq_class_t pset_after, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Double_Box(ppl_const_Double_Box_t pset);
    int ppl_termination_test_PR_Double_Box(ppl_const_Double_Box_t pset);
    int ppl_one_affine_ranking_function_MS_Double_Box(ppl_const_Double_Box_t pset,
                                                      ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Double_Box(ppl_const_Double_Box_t pset,
                                                      ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Double_Box(ppl_const_Double_Box_t pset,
                                                       ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Double_Box(ppl_const_Double_Box_t pset,
                                                       ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Double_Box_2(ppl_const_Double_Box_t pset_before,
                                             ppl_const_Double_Box_t pset_after);
    int ppl_termination_test_PR_Double_Box_2(ppl_const_Double_Box_t pset_before,
                                             ppl_const_Double_Box_t pset_after);
    int ppl_one_affine_ranking_function_MS_Double_Box_2(
        ppl_const_Double_Box_t pset_before, ppl_const_Double_Box_t pset_after,
        ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Double_Box_2(
        ppl_const_Double_Box_t pset_before, ppl_const_Double_Box_t pset_after,
        ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Double_Box_2(
        ppl_const_Double_Box_t pset_before, ppl_const_Double_Box_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Double_Box_2(
        ppl_const_Double_Box_t pset_before, ppl_const_Double_Box_t pset_after,
        ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_double(ppl_const_BD_Shape_double_t pset);
    int ppl_termination_test_PR_BD_Shape_double(ppl_const_BD_Shape_double_t pset);
    int ppl_one_affine_ranking_function_MS_BD_Shape_double(
        ppl_const_BD_Shape_double_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_double(
        ppl_const_BD_Shape_double_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_double(
        ppl_const_BD_Shape_double_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_double(
        ppl_const_BD_Shape_double_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after);
    int ppl_termination_test_PR_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after);
    int ppl_one_affine_ranking_function_MS_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_BD_Shape_double_2(
        ppl_const_BD_Shape_double_t pset_before,
        ppl_const_BD_Shape_double_t pset_after, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset);
    int ppl_termination_test_PR_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_double(
        ppl_const_Octagonal_Shape_double_t pset, ppl_Polyhedron_t ph);
    int ppl_termination_test_MS_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after);
    int ppl_termination_test_PR_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after);
    int ppl_one_affine_ranking_function_MS_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after, ppl_Generator_t point);
    int ppl_one_affine_ranking_function_PR_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after, ppl_Generator_t point);
    int ppl_all_affine_ranking_functions_MS_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after, ppl_Polyhedron_t ph);
    int ppl_all_affine_ranking_functions_PR_Octagonal_Shape_double_2(
        ppl_const_Octagonal_Shape_double_t pset_before,
        ppl_const_Octagonal_Shape_double_t pset_after, ppl_Polyhedron_t ph);
    
    VERIFICATION_CRITERIA:

    Compare full ranking spaces and independently checked witnesses, vacuous paired inputs, strict boundaries, unsupported dimensions and selected-domain generation.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc.

  • PPL-SPEC-001564
    11. C bounded integer wrapping UID: PPL-SPEC-001564 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Generated wrap functions shall interpret the selected coordinate set, width, signedness, overflow mode, guard system, complexity threshold and individual/joint option as the corresponding native bounded-integer wrapping operation. Width and representation shall define the same finite integer range; permitted approximations shall remain sound. The guard argument shall address a readable constraint-system handle. A null handle stored at that address shall denote absent guards; the address itself shall be non-null.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Generated forwarding must retain the native mathematical and ownership contract.

    INTERFACE:

    Public header: <ppl_c.h>. The concrete domain names below are available when their corresponding domain types and dependencies are selected.

    int ppl_Polyhedron_wrap_assign(
        ppl_Polyhedron_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_Grid_wrap_assign(ppl_Grid_t ph, ppl_dimension_type ds[], size_t n,
                             enum ppl_enum_Bounded_Integer_Type_Width w,
                             enum ppl_enum_Bounded_Integer_Type_Representation r,
                             enum ppl_enum_Bounded_Integer_Type_Overflow o,
                             const ppl_const_Constraint_System_t *pcs,
                             unsigned complexity_threshold, int wrap_individually);
    int ppl_Rational_Box_wrap_assign(
        ppl_Rational_Box_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_BD_Shape_mpz_class_wrap_assign(
        ppl_BD_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_BD_Shape_mpq_class_wrap_assign(
        ppl_BD_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_Octagonal_Shape_mpz_class_wrap_assign(
        ppl_Octagonal_Shape_mpz_class_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_Octagonal_Shape_mpq_class_wrap_assign(
        ppl_Octagonal_Shape_mpq_class_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_Double_Box_wrap_assign(
        ppl_Double_Box_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_BD_Shape_double_wrap_assign(
        ppl_BD_Shape_double_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    int ppl_Octagonal_Shape_double_wrap_assign(
        ppl_Octagonal_Shape_double_t ph, ppl_dimension_type ds[], size_t n,
        enum ppl_enum_Bounded_Integer_Type_Width w,
        enum ppl_enum_Bounded_Integer_Type_Representation r,
        enum ppl_enum_Bounded_Integer_Type_Overflow o,
        const ppl_const_Constraint_System_t *pcs, unsigned complexity_threshold,
        int wrap_individually);
    
    VERIFICATION_CRITERIA:

    Check width/sign/overflow combinations, exact modular witnesses, absent/present guards, supported integer-coordinate selections and native soundness conditions.

    SOURCE:

    interfaces/C/ppl_interface_generator_c_cc_code.m4; interfaces/C/ppl_interface_generator_c_h_code.m4; interfaces/C/tests/ccontractsspec1.cc.

  • PPL-SPEC-001539
    1. C mixed integer problem values UID: PPL-SPEC-001539 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    MIP constructors shall create an owned trivial, copied or constraint/objective/mode problem with the corresponding native MIP_Problem meaning. Copied constraints and objectives shall remain independent of later source mutations. Assignment shall replace the problem; deletion shall release owned state. A failed constructor shall leave its output handle unchanged and release acquired resources. The accepted mode shall select the published minimization value or maximization behavior.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C solver objects require independent native lifetimes.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_MIP_Problem_from_space_dimension(ppl_MIP_Problem_t *pmip,
                                                 ppl_dimension_type d);
    int ppl_new_MIP_Problem(ppl_MIP_Problem_t *pmip, ppl_dimension_type d,
                            ppl_const_Constraint_System_t cs,
                            ppl_const_Linear_Expression_t le, int m);
    int ppl_new_MIP_Problem_from_MIP_Problem(ppl_MIP_Problem_t *pmip,
                                             ppl_const_MIP_Problem_t mip);
    int ppl_assign_MIP_Problem_from_MIP_Problem(ppl_MIP_Problem_t dst,
                                                ppl_const_MIP_Problem_t src);
    int ppl_delete_MIP_Problem(ppl_const_MIP_Problem_t mip);
    
    VERIFICATION_CRITERIA:

    Check each constructor, real/integer feasibility distinctions, source mutation, owned copy histories and construction failure cleanup.

    SOURCE:

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

  • PPL-SPEC-001540
    2. C mixed integer descriptors and borrowing UID: PPL-SPEC-001540 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    MIP queries shall report ambient dimension, integer-coordinate count/list, constraint count and optimization mode. Constraint-at-index and objective getters shall return borrowed const views of the stored problem. An admitted strict inequality shall appear as the equivalent closed row under the declared integrality restrictions. Indexed constraints shall follow native insertion order and reject out-of-range indices. The caller shall supply output arrays large enough for the separately queried count. Borrowed descriptors shall not be deleted or mutated and shall remain valid only under the accessor's owner-lifetime/invalidation rules.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Canonical admitted descriptors must remain distinct from the transformed simplex representation. Integer-supported strict rows use the closed storage described by 🔗 1. Integer-supported strict MIP admission.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_MIP_Problem_space_dimension(ppl_const_MIP_Problem_t mip,
                                        ppl_dimension_type *m);
    int ppl_MIP_Problem_number_of_integer_space_dimensions(
        ppl_const_MIP_Problem_t mip, ppl_dimension_type *m);
    int ppl_MIP_Problem_integer_space_dimensions(ppl_const_MIP_Problem_t mip,
                                                 ppl_dimension_type ds[]);
    int ppl_MIP_Problem_number_of_constraints(ppl_const_MIP_Problem_t mip,
                                              ppl_dimension_type *m);
    int ppl_MIP_Problem_constraint_at_index(ppl_const_MIP_Problem_t mip,
                                            ppl_dimension_type i,
                                            ppl_const_Constraint_t *pc);
    int ppl_MIP_Problem_objective_function(ppl_const_MIP_Problem_t mip,
                                           ppl_const_Linear_Expression_t *ple);
    int ppl_MIP_Problem_optimization_mode(ppl_const_MIP_Problem_t mip);
    
    VERIFICATION_CRITERIA:

    Compare exact descriptors and index lists after additions, copy and solving; exercise first/last/rejected indices and valid borrowed inspection.

    SOURCE:

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

  • PPL-SPEC-001541
    3. C mixed integer incremental updates UID: PPL-SPEC-001541 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    MIP clear, dimension growth, integer-coordinate selection, constraint additions and objective/mode replacement shall forward the corresponding native updates, including integer-supported strict admission under 🔗 1. Integer-supported strict MIP admission. Counted dimension arrays shall identify selected coordinates, with duplicates having set semantics. Completed later queries shall describe the updated problem; native admission errors shall retain their categories. Clear shall restore the zero-dimensional trivial problem.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Incremental C solving must agree with rebuilding the same native model.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_MIP_Problem_clear(ppl_MIP_Problem_t mip);
    int ppl_MIP_Problem_add_space_dimensions_and_embed(ppl_MIP_Problem_t mip,
                                                       ppl_dimension_type d);
    int ppl_MIP_Problem_add_to_integer_space_dimensions(ppl_MIP_Problem_t mip,
                                                        ppl_dimension_type ds[],
                                                        size_t n);
    int ppl_MIP_Problem_add_constraint(ppl_MIP_Problem_t mip,
                                       ppl_const_Constraint_t c);
    int ppl_MIP_Problem_add_constraints(ppl_MIP_Problem_t mip,
                                        ppl_const_Constraint_System_t cs);
    int ppl_MIP_Problem_set_objective_function(ppl_MIP_Problem_t mip,
                                               ppl_const_Linear_Expression_t le);
    int ppl_MIP_Problem_set_optimization_mode(ppl_MIP_Problem_t mip, int mode);
    
    VERIFICATION_CRITERIA:

    Compare independent fresh models after each update, including new integer coordinates, free dimensions, contradictory cuts and objective reversal.

    SOURCE:

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

  • PPL-SPEC-001542
    4. C mixed integer solution outcomes and witnesses UID: PPL-SPEC-001542 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Satisfiability shall return the native boolean result. Solve shall return the published infeasible, unbounded or optimized status. Feasible/optimizing point getters shall return borrowed native point witnesses and reject requests for unavailable witnesses; their output handles shall remain unchanged on failure. Objective evaluation and optimum queries shall assign exact numerator/positive denominator values to existing coefficient objects under native admission and nonaliasing prerequisites. Solver-computing calls may invalidate earlier borrowed witnesses.

    The standalone strict mixed-integer query shall decide the exact feasibility contract in 🔗 1. Exact strict mixed-integer feasibility using its explicit ambient dimension. Unused coordinates and empty systems shall retain that dimension. Out-of-space rows or integer coordinates shall be rejected. Constraint-system dimension completion shall occur on a copy, preserving the input and its metadata. The standalone query shall remain available with no selected domain interface.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A borrowed witness and a status have distinct ownership and mathematical roles.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_is_mixed_integer_satisfiable(ppl_dimension_type dimension,
                                         ppl_const_Constraint_System_t cs,
                                         const ppl_dimension_type integers[],
                                         size_t n);
    int ppl_MIP_Problem_is_satisfiable(ppl_const_MIP_Problem_t mip);
    int ppl_MIP_Problem_solve(ppl_const_MIP_Problem_t mip);
    int ppl_MIP_Problem_evaluate_objective_function(ppl_const_MIP_Problem_t mip,
                                                    ppl_const_Generator_t g,
                                                    ppl_Coefficient_t num,
                                                    ppl_Coefficient_t den);
    int ppl_MIP_Problem_feasible_point(ppl_const_MIP_Problem_t mip,
                                       ppl_const_Generator_t *pg);
    int ppl_MIP_Problem_optimizing_point(ppl_const_MIP_Problem_t mip,
                                         ppl_const_Generator_t *pg);
    int ppl_MIP_Problem_optimal_value(ppl_const_MIP_Problem_t mip,
                                      ppl_Coefficient_t num, ppl_Coefficient_t den);
    
    VERIFICATION_CRITERIA:

    Check all three solve outcomes, exact rational objectives, mixed integrality, witness satisfaction, failure outputs and repeated/incremental solving.

    SOURCE:

    interfaces/interfaced_polyhedra.hh; interfaces/C/tests/newoperations.c; interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/tests/ccontractsspec1.cc.

  • PPL-SPEC-001543
    5. C mixed integer controls, validity and memory UID: PPL-SPEC-001543 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Control functions shall use the published native pricing names/values and return or apply the corresponding supported strategy. Validity shall return the native invariant result. Memory queries shall assign native total/external estimates to the caller's size_t outputs. Pricing shall affect the search strategy without changing the exact successful mathematical result.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Heuristic controls and storage estimates must not weaken numerical guarantees.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_MIP_Problem_OK(ppl_const_MIP_Problem_t mip);
    int ppl_MIP_Problem_get_control_parameter(ppl_const_MIP_Problem_t mip,
                                              int name);
    int ppl_MIP_Problem_set_control_parameter(ppl_MIP_Problem_t mip, int value);
    int ppl_MIP_Problem_total_memory_in_bytes(ppl_const_MIP_Problem_t mip,
                                              size_t *sz);
    int ppl_MIP_Problem_external_memory_in_bytes(ppl_const_MIP_Problem_t mip,
                                                 size_t *sz);
    
    VERIFICATION_CRITERIA:

    Exercise supported pricing values against independently known optima and inspect validity and memory across copy, pending and solved states.

    SOURCE:

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

  • PPL-SPEC-001519
    1. C variable formatting and callback failures UID: PPL-SPEC-001519 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The C formatter getter and setter shall expose and replace the calling thread's variable-output callback. The supplied callback shall be callable, return normally and return a borrowed NUL-terminated representation, or null to signal failure. The default callback shall use the native letter-and-quotient naming convention.

    Direct variable output and object output containing a variable shall use that callback. A null callback result shall make the enclosing C output operation report PPL_STDIO_ERROR and notify the installed error handler. Failed formatting shall not be reported as successful output with the variable silently omitted.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A missing variable can change the meaning of a displayed constraint or expression.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_io_print_variable(ppl_dimension_type var);
    int ppl_io_fprint_variable(FILE *stream, ppl_dimension_type var);
    int ppl_io_asprint_variable(char **strp, ppl_dimension_type var);
    int ppl_io_set_variable_output_function(
        ppl_io_variable_output_function_type *p);
    int ppl_io_get_variable_output_function(
        ppl_io_variable_output_function_type **pp);
    
    VERIFICATION_CRITERIA:

    Check default and custom names, borrowed callback strings, null callback results in direct and composite output, and errno/error-handler propagation.

    SOURCE:

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

  • PPL-SPEC-001520
    2. C textual output and allocated buffers UID: PPL-SPEC-001520 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The ppl_io_print_T and ppl_io_fprint_T families shall write the native human-readable representation to standard output or the supplied live FILE. ppl_io_asprint_T shall allocate a NUL-terminated buffer containing that representation, store its address and transfer ownership to the caller for free. On a reported allocation or I/O failure no completed representation shall be promised; partial external stream output may already exist. Formatting shall remain distinct from reloadable serialization. Buffered C streams remain subject to the caller's later flushing and closing errors.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A C client needs explicit buffer ownership and observable write failures.

    INTERFACE:

    Public header: <ppl_c.h>.

    /* T ranges over exposed C object types. */
    int ppl_io_print_T(ppl_const_T_t x);
    int ppl_io_fprint_T(FILE *file, ppl_const_T_t x);
    int ppl_io_asprint_T(char **result, ppl_const_T_t x);
    
    VERIFICATION_CRITERIA:

    Compare buffered and file output, exercise callback and writable-stream failures, inject allocation failure and release every successful buffer.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common_defs.hh; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/cerrorsspec1.cc.

  • PPL-SPEC-001521
    3. C line wrapping and pointer failure result UID: PPL-SPEC-001521 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ppl_io_wrap_string shall apply native byte-oriented line wrapping through the first NUL byte, with the supplied indentation and preferred line lengths. Its successful result shall be a caller-owned NUL-terminated malloc buffer released with free. Preferred widths shall guide separator selection without splitting unbroken words. Native C++ exceptions and failure to allocate the final C buffer shall produce null and the corresponding error-handler notification. Successful wrapping shall preserve the native text and separator rules.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    The pointer-returning utility must still contain failures at the C boundary.

    INTERFACE:

    Public header: <ppl_c.h>.

    char *ppl_io_wrap_string(const char *src, unsigned indent_depth,
                             unsigned preferred_first_line_length,
                             unsigned preferred_line_length);
    
    VERIFICATION_CRITERIA:

    Compare exact text for empty input, commas, newlines, indentation and long words; inject string construction and final-buffer allocation failures.

    SOURCE:

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

  • PPL-SPEC-001522
    4. C reloadable FILE representations UID: PPL-SPEC-001522 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For types with ASCII operations, ppl_T_ascii_dump shall write the native reloadable representation to a live FILE. ppl_T_ascii_load shall replace the mutable owned object's value when the native loader succeeds. A native false result or detected stream failure shall report PPL_STDIO_ERROR and notify the error handler. Loading supports trusted records written by the corresponding native dumper in a compatible build. Native failure-state guarantees shall apply. A failed load may leave a partially replaced object whose ownership permits destruction. Rollback and further queries shall not be assumed. Borrowed objects shall not be loaded into.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C serialization must expose the native parser outcome without changing ownership.

    INTERFACE:

    Public header: <ppl_c.h>.

    /* T ranges over types exposing the native operations. */
    int ppl_T_ascii_dump(ppl_const_T_t x, FILE *file);
    int ppl_T_ascii_load(ppl_T_t x, FILE *file);
    
    VERIFICATION_CRITERIA:

    Round-trip descriptor, system, optimizer and generated-domain values through files, test malformed and truncated input and populated destinations, and verify destruction after rejected loads.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common_defs.hh; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/cerrorsspec1.cc.

  • PPL-SPEC-001544
    1. C parametric problem values and ownership UID: PPL-SPEC-001544 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP constructors shall create independent owned trivial, copied or constraint-range problems with the selected parameter coordinates. Range and counted-array arguments shall be valid during construction. Assignment shall replace native problem/tree state and rebind its owned nodes to the destination. Deletion shall release owned trees and problem data. Failed construction shall preserve its output handle and release acquired resources.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A copied parametric problem owns another tree rather than borrowing the source tree.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_PIP_Problem_from_space_dimension(ppl_PIP_Problem_t *ppip,
                                                 ppl_dimension_type d);
    int ppl_new_PIP_Problem_from_PIP_Problem(ppl_PIP_Problem_t *ppip,
                                             ppl_const_PIP_Problem_t pip);
    int ppl_assign_PIP_Problem_from_PIP_Problem(ppl_PIP_Problem_t dst,
                                                ppl_const_PIP_Problem_t src);
    int ppl_new_PIP_Problem_from_constraints(
        ppl_PIP_Problem_t *ppip, ppl_dimension_type d,
        ppl_Constraint_System_const_iterator_t first,
        ppl_Constraint_System_const_iterator_t last, size_t n,
        ppl_dimension_type ds[]);
    int ppl_delete_PIP_Problem(ppl_const_PIP_Problem_t pip);
    
    VERIFICATION_CRITERIA:

    Check zero/nonzero dimensions, parameter selection, copied solved/pending problems, independent destruction and rejected construction.

    SOURCE:

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

  • PPL-SPEC-001545
    2. C parametric descriptors and parameter lists UID: PPL-SPEC-001545 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP descriptor queries shall expose native dimension, parameter-coordinate count/list and original constraint count. Constraint-at-index shall return the corresponding borrowed input constraint and reject an out-of-range index without changing the output handle. Output arrays shall have sufficient capacity for their separately queried count. Read-only metadata inspection shall follow the documented safe borrowing rules.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Clients require original parameter identities and constraints independent of solver transformations.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Problem_space_dimension(ppl_const_PIP_Problem_t pip,
                                        ppl_dimension_type *m);
    int ppl_PIP_Problem_number_of_parameter_space_dimensions(
        ppl_const_PIP_Problem_t pip, ppl_dimension_type *m);
    int ppl_PIP_Problem_parameter_space_dimensions(ppl_const_PIP_Problem_t pip,
                                                   ppl_dimension_type ds[]);
    int ppl_PIP_Problem_number_of_constraints(ppl_const_PIP_Problem_t pip,
                                              ppl_dimension_type *m);
    int ppl_PIP_Problem_constraint_at_index(ppl_const_PIP_Problem_t pip,
                                            ppl_dimension_type i,
                                            ppl_const_Constraint_t *pc);
    
    VERIFICATION_CRITERIA:

    Compare parameter arrays, original constraint order and borrowed values before and after solving and dimension changes.

    SOURCE:

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

  • PPL-SPEC-001546
    3. C parametric incremental updates UID: PPL-SPEC-001546 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP clear, variable/parameter growth, parameter-coordinate selection and constraint additions shall have native PIP_Problem effects and admission rules. Variables shall be appended before newly appended parameters. Selected dimensions shall be interpreted as a set. Existing processed decision variables shall not be reinterpreted as parameters. An empty constraint system shall still retain its declared dimension for compatibility checks. Later completed solution queries shall refer to the updated input and initial context.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Parameter identity and dimension admission govern subsequent piecewise solutions.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Problem_clear(ppl_PIP_Problem_t pip);
    int ppl_PIP_Problem_add_space_dimensions_and_embed(
        ppl_PIP_Problem_t pip, ppl_dimension_type pip_vars,
        ppl_dimension_type pip_params);
    int ppl_PIP_Problem_add_to_parameter_space_dimensions(ppl_PIP_Problem_t pip,
                                                          ppl_dimension_type ds[],
                                                          size_t n);
    int ppl_PIP_Problem_add_constraint(ppl_PIP_Problem_t pip,
                                       ppl_const_Constraint_t c);
    int ppl_PIP_Problem_add_constraints(ppl_PIP_Problem_t pip,
                                        ppl_const_Constraint_System_t cs);
    
    VERIFICATION_CRITERIA:

    Compare fresh and incremental models, floor-term renumbering, duplicate selections, dimension overflow and incompatible empty systems.

    SOURCE:

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

  • PPL-SPEC-001547
    4. C parametric outcomes and borrowed solution trees UID: PPL-SPEC-001547 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP satisfiability and solve shall return native boolean/status outcomes in the selected mode, including the big-parameter convention in 🔗 1. Parametric problem and context interpretation. Solution accessors shall return a borrowed root owned by the problem, or null as a successful result for infeasibility in that mode. The solution shall retain native nonnegative-integer, initial-context and lexicographic semantics within the declared assignment scope. Tree handles shall not be modified or deleted. Operations that compute or replace problem/tree state may invalidate them; documented read-only traversal and metadata queries shall remain permitted. Failed access shall preserve its output handle.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A null solution root represents a mathematical outcome and is distinct from a negative failure status.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Problem_is_satisfiable(ppl_const_PIP_Problem_t pip);
    int ppl_PIP_Problem_solve(ppl_const_PIP_Problem_t pip);
    int ppl_PIP_Problem_solution(ppl_const_PIP_Problem_t pip,
                                 ppl_const_PIP_Tree_Node_t *pip_tree);
    int ppl_PIP_Problem_optimizing_solution(ppl_const_PIP_Problem_t pip,
                                            ppl_const_PIP_Tree_Node_t *pip_tree);
    
    VERIFICATION_CRITERIA:

    Evaluate returned trees independently over bounded parameter contexts, including infeasible regions, floor terms, copies and incremental changes.

    SOURCE:

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

  • PPL-SPEC-001548
    5. C parametric controls, big parameter and memory UID: PPL-SPEC-001548 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP cutting/pivot controls and big-parameter selection shall forward native admission and stored values. A designated big parameter shall remain an admitted parameter coordinate and shall select the asymptotic interpretation in 🔗 1. Parametric problem and context interpretation. Native validity and memory results shall be returned or assigned without changing their meaning.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C controls must preserve context and asymptotic meaning.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Problem_get_big_parameter_dimension(ppl_const_PIP_Problem_t pip,
                                                    ppl_dimension_type *pd);
    int ppl_PIP_Problem_total_memory_in_bytes(ppl_const_PIP_Problem_t pip,
                                              size_t *sz);
    int ppl_PIP_Problem_external_memory_in_bytes(ppl_const_PIP_Problem_t pip,
                                                 size_t *sz);
    int ppl_PIP_Problem_OK(ppl_const_PIP_Problem_t pip);
    int ppl_PIP_Problem_set_big_parameter_dimension(ppl_PIP_Problem_t pip,
                                                    ppl_dimension_type d);
    int ppl_PIP_Problem_get_control_parameter(ppl_const_PIP_Problem_t pip,
                                              int name);
    int ppl_PIP_Problem_set_control_parameter(ppl_PIP_Problem_t pip, int value);
    
    VERIFICATION_CRITERIA:

    Check all supported control choices against literal piecewise solutions, big-parameter histories, invalid native requests and memory/validity queries.

    SOURCE:

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

  • PPL-SPEC-001549
    6. C solution-tree kind, guards, children and values UID: PPL-SPEC-001549 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Tree-kind accessors shall return an alias of the input node for a matching kind and null for a different kind, without transferring ownership. Decision-child access shall select the requested boolean branch and return null for an absent branch. Guard getters shall return borrowed native constraint systems. Solution-coordinate getters shall return borrowed native affine expressions for decision coordinates, with native domain/index errors for invalid queries. Null handles shall be tested before further use. Traversal and independent coordinate queries shall not invalidate other documented read-only tree views.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Safe traversal depends on distinguishing successful absent nodes from errors.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Tree_Node_as_solution(ppl_const_PIP_Tree_Node_t spip_tree,
                                      ppl_const_PIP_Solution_Node_t *dpip_tree);
    int ppl_PIP_Tree_Node_as_decision(ppl_const_PIP_Tree_Node_t spip_tree,
                                      ppl_const_PIP_Decision_Node_t *dpip_tree);
    int ppl_PIP_Tree_Node_get_constraints(ppl_const_PIP_Tree_Node_t pip_tree,
                                          ppl_const_Constraint_System_t *pcs);
    int ppl_PIP_Tree_Node_OK(ppl_const_PIP_Tree_Node_t pip);
    int ppl_PIP_Solution_Node_OK(ppl_const_PIP_Solution_Node_t pip_sol);
    int ppl_PIP_Solution_Node_get_parametric_values(
        ppl_const_PIP_Solution_Node_t pip_sol, ppl_dimension_type var,
        ppl_const_Linear_Expression_t *le);
    int ppl_PIP_Decision_Node_OK(ppl_const_PIP_Decision_Node_t pip_dec);
    int ppl_PIP_Decision_Node_get_child_node(ppl_const_PIP_Decision_Node_t pip_dec,
                                             int b,
                                             ppl_const_PIP_Tree_Node_t *pip_tree);
    
    VERIFICATION_CRITERIA:

    Traverse both branch kinds and absent branches, evaluate guards and leaf expressions over admitted contexts, and check invalid coordinate queries and unchanged failure outputs.

    SOURCE:

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

  • PPL-SPEC-001550
    7. C artificial-parameter expression and coefficient queries UID: PPL-SPEC-001550 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The artificial-parameter input handle shall borrow an element of the owning tree. Expression access shall copy its affine numerator into the caller's existing expression object. That copy shall remain independent of the tree. Coefficient, constant and denominator queries shall assign their stored native values to existing coefficient objects. The artificial value shall remain the mathematical floor of the numerator divided by its positive denominator, including negative numerators. These accessors shall not normalize or replace the source representation or transfer ownership of the artificial parameter.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    The denominator is separate from an inherited affine numerator.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Artificial_Parameter_get_Linear_Expression(
        ppl_const_Artificial_Parameter_t ap, ppl_Linear_Expression_t le);
    int ppl_Artificial_Parameter_coefficient(ppl_const_Artificial_Parameter_t ap,
                                             ppl_dimension_type var,
                                             ppl_Coefficient_t n);
    int ppl_Artificial_Parameter_inhomogeneous_term(
        ppl_const_Artificial_Parameter_t ap, ppl_Coefficient_t n);
    int ppl_Artificial_Parameter_denominator(ppl_const_Artificial_Parameter_t ap,
                                             ppl_Coefficient_t n);
    
    VERIFICATION_CRITERIA:

    Check copied numerator dimensions and exact coefficients, independence after tree destruction, source preservation, positive denominators and independent floor evaluation for generated parameters.

    SOURCE:

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

  • PPL-SPEC-001551
    8. C artificial-parameter sequence traversal UID: PPL-SPEC-001551 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Allocated artificial-parameter iterators shall own only their iterator storage. Node begin/end shall position them in that node's local ordered sequence; equality, increment and dereference shall use valid positions in the same live sequence. Dereference shall return a borrowed artificial parameter tied to the owning problem/tree. Copying positions shall not copy parameters or extend tree lifetime; deleting positions shall not delete tree contents. Count shall report the local sequence length.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Local artificial parameters have an order and a lifetime inherited from the solution tree.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_PIP_Tree_Node_number_of_artificials(ppl_const_PIP_Tree_Node_t pip_tree,
                                                ppl_dimension_type *m);
    int ppl_PIP_Tree_Node_begin(
        ppl_const_PIP_Tree_Node_t pip_tree,
        ppl_Artificial_Parameter_Sequence_const_iterator_t pit);
    int ppl_PIP_Tree_Node_end(
        ppl_const_PIP_Tree_Node_t pip_tree,
        ppl_Artificial_Parameter_Sequence_const_iterator_t pit);
    int ppl_new_Artificial_Parameter_Sequence_const_iterator(
        ppl_Artificial_Parameter_Sequence_const_iterator_t *papit);
    int ppl_new_Artificial_Parameter_Sequence_const_iterator_from_Artificial_Parameter_Sequence_const_iterator(
        ppl_Artificial_Parameter_Sequence_const_iterator_t *papit,
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit);
    int ppl_assign_Artificial_Parameter_Sequence_const_iterator_from_Artificial_Parameter_Sequence_const_iterator(
        ppl_Artificial_Parameter_Sequence_const_iterator_t dst,
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t src);
    int ppl_delete_Artificial_Parameter_Sequence_const_iterator(
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit);
    int ppl_Artificial_Parameter_Sequence_const_iterator_dereference(
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t apit,
        ppl_const_Artificial_Parameter_t *pap);
    int ppl_Artificial_Parameter_Sequence_const_iterator_increment(
        ppl_Artificial_Parameter_Sequence_const_iterator_t apit);
    int ppl_Artificial_Parameter_Sequence_const_iterator_equal_test(
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t x,
        ppl_const_Artificial_Parameter_Sequence_const_iterator_t y);
    
    VERIFICATION_CRITERIA:

    Traverse empty/nonempty local sequences, compare/copy/assign iterator positions and inspect borrowed parameters without invalidating the tree.

    SOURCE:

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

  • PPL-SPEC-001515
    1. C library and thread lifecycle UID: PPL-SPEC-001515 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ppl_initialize shall initialize native library state, published symbolic constants and the calling thread's C variable formatter. ppl_finalize shall release C-owned interruption objects and its native library-initialization owner and restore the preceding native variable formatter. Initialization and finalization shall return zero on success and invalid-argument status for duplicate lifecycle requests. Reinitialization after a completed finalization shall succeed. Independently owned client objects shall be released before finalization.

    New participating threads shall enter and leave using the thread functions in supported configurations. The initializing thread shall use the library lifecycle rather than duplicate thread entry or exit. Thread finalization shall restore that thread's preceding native formatter. Shared lifecycle and interruption ownership shall obey the native synchronization prerequisites.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Binding-owned timers must not survive the library state on which their callbacks depend.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_initialize(void);
    int ppl_finalize(void);
    int ppl_thread_initialize(void);
    int ppl_thread_finalize(void);
    
    VERIFICATION_CRITERIA:

    Check initialize/finalize/reinitialize sequences, duplicate calls, thread entry where configured, formatter restoration and finalization with armed C interruption facilities.

    SOURCE:

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

  • PPL-SPEC-001516
    2. C failures and installed error notification UID: PPL-SPEC-001516 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported native exceptions shall be contained at the C boundary and translated to the corresponding negative category: allocation, invalid argument, domain, size, logic, checked arithmetic overflow, internal runtime error, other standard exception, unexpected exception or interruption. The installed non-null error handler shall receive that category and a description exactly once for each reported failure, including directly detected I/O, buffer-allocation and unsupported-operation failures. Its description shall be borrowed only during the callback. A null handler shall disable notification. Handlers shall return normally and obey synchronization and reentrancy prerequisites.

    ppl_set_error_handler shall replace the calling thread's handler where thread-local state is configured. Direct C I/O errors shall preserve their errno detail across notification. Pointer-returning text wrapping shall use null on failure, with handler notification, rather than allowing a C++ exception to escape.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    An error status and its callback are two observations of the same failed operation.

    INTERFACE:

    Public header: <ppl_c.h>.

    enum ppl_enum_error_code {
    
      PPL_ERROR_OUT_OF_MEMORY = -2,
    
      PPL_ERROR_INVALID_ARGUMENT = -3,
    
      PPL_ERROR_DOMAIN_ERROR = -4,
    
      PPL_ERROR_LENGTH_ERROR = -5,
    
      PPL_ARITHMETIC_OVERFLOW = -6,
    
      PPL_STDIO_ERROR = -7,
    
      PPL_ERROR_INTERNAL_ERROR = -8,
    
      PPL_ERROR_UNKNOWN_STANDARD_EXCEPTION = -9,
    
      PPL_ERROR_UNEXPECTED_ERROR = -10,
    
      PPL_TIMEOUT_EXCEPTION = -11,
    
      PPL_ERROR_LOGIC_ERROR = -12
    };
    int ppl_set_error_handler(void (*h)(enum ppl_enum_error_code code,
                                        const char *description));
    
    VERIFICATION_CRITERIA:

    Check every supported category, callback counts, null-handler operation, errno preservation and native exception containment; inject both C++ allocation and output-buffer allocation failures.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/ppl_c_implementation_common_defs.hh; interfaces/C/tests/ccontractsspec1.cc; interfaces/C/tests/partitions.c; interfaces/C/tests/polyhedra.c; interfaces/C/tests/cerrorsspec1.cc.

  • PPL-SPEC-001517
    3. C version, dimensions and published constants UID: PPL-SPEC-001517 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Version and banner accessors shall expose the built library's version components and borrowed static strings. Dimension accessors shall assign the native maximum extent and reserved non-dimension sentinel without changing them numerically. Initialization shall publish relation flags, complexity classes, optimizer statuses, modes and controls corresponding to the native values. Callers shall use these symbolic values in the operations that accept them. Version component functions shall return their nonnegative component directly.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C clients require values matching the library they actually link.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_version_major(void);
    int ppl_version_minor(void);
    int ppl_version_revision(void);
    int ppl_version_beta(void);
    int ppl_version(const char **p);
    int ppl_banner(const char **p);
    int ppl_max_space_dimension(ppl_dimension_type *m);
    int ppl_not_a_dimension(ppl_dimension_type *m);
    
    VERIFICATION_CRITERIA:

    Compare version components and strings, extent/sentinel values, and initialized symbolic values with independently observed operation outcomes.

    SOURCE:

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

  • PPL-SPEC-001518
    4. C rounding and irrational precision controls UID: PPL-SPEC-001518 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Rounding controls shall apply the native PPL rounding mode or restore the calling thread's saved preceding mode. The precision query shall assign the current irrational-result precision, and setting shall apply the native admission and precision semantics. These controls shall not change exact integer or rational values. Calls involving floating arithmetic shall satisfy the applicable native rounding and thread-entry prerequisites.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C forwarding must retain thread-local numerical prerequisites.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_rounding_for_PPL(void);
    int ppl_restore_pre_PPL_rounding(void);
    int ppl_irrational_precision(unsigned *p);
    int ppl_set_irrational_precision(unsigned p);
    
    VERIFICATION_CRITERIA:

    Check precision round trips, invalid settings where supported and rounding restoration/control in configured floating-point environments.

    SOURCE:

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

  • PPL-SPEC-001552
    5. C signal timeout lifecycle UID: PPL-SPEC-001552 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported signal-timeout requests shall arm the native watchdog for the positive centisecond duration under its thread/signal ownership prerequisites. Replacing a timeout shall cancel the preceding signal timeout before admitting and arming its replacement; failure after cancellation shall not restore the old one. Reset shall release the C-owned signal watchdog and its binding-owned notification state. A delivered signal interruption shall report the timeout category and release that signal timeout before notification. Thread-safe C configurations shall reject the unsupported request without arming it. C library finalization shall release any remaining C-owned signal watchdog before native watchdog finalization.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A C-owned timer must have a finite lifetime and a distinct interruption outcome.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_timeout(unsigned csecs);
    int ppl_reset_timeout(void);
    
    VERIFICATION_CRITERIA:

    Check supported/unsupported requests, invalid and excessive durations, replacement/reset effects, timeout translation and finalization with an armed timer.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/tests/watchdog1.c; interfaces/C/tests/cerrorsspec1.cc.

  • PPL-SPEC-001553
    6. C deterministic timeout lifecycle UID: PPL-SPEC-001553 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported deterministic requests shall use the native positive scaled computational-weight increment, its admitted circular threshold domain and cooperative checkpoints. Replacing shall cancel the preceding deterministic setting before admitting the replacement; reset shall release its C-owned watcher and notification state. A deterministic interruption shall release that deterministic watcher before reporting the timeout category. It shall not remain active merely because the signal-timeout cleanup path was selected instead. Reset shall clear only the C-owned deterministic request and preserve unrelated borrowed interruption requests. In thread-safe C configurations, each initialized thread shall own its independent watcher, threshold queue, checker and budget counter. Setting, canceling or expiring one thread's budget shall not alter another's. Thread and library finalization shall release the calling thread's remaining C-owned deterministic state before native teardown; a later thread session shall inherit no pending C deterministic timeout.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    An observed timeout must not repeatedly poison independent later computations.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_deterministic_timeout(unsigned long unscaled_weight,
                                      unsigned scale);
    int ppl_reset_deterministic_timeout(void);
    
    VERIFICATION_CRITERIA:

    Force a threshold crossing, check exactly one translated notification, then run an independent query without an explicit client reset; check invalid/replacement/reset/finalization transitions. Exercise simultaneous thread budgets, cross-module native/C watchers, unrelated borrowed requests and finalization/reentry with a pending budget.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/tests/weightwatch1.c; interfaces/C/tests/cerrorsspec1.cc; interfaces/C/tests/deterministictimeouts1.cc.

  • PPL-SPEC-001534
    1. C constraint systems UID: PPL-SPEC-001534 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The Constraint_System functions shall construct independent empty, copied, single-element or dedicated canonical native systems as exposed. Insertion shall copy the supplied constraint with the native system's topology and dimension rules. The represented condition after insertion shall be the conjunction of the previous condition and the inserted constraint. Assignment, clear and deletion shall have the native value and ownership effects. Dimension, emptiness and validity queries shall expose the native result. Begin/end operations shall position caller-owned iterators in the live system; dereferenced elements shall remain borrowed from that system and shall not be deleted or mutated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Systems own elements, while traversal only borrows them.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Constraint_System(ppl_Constraint_System_t *pcs);
    int ppl_new_Constraint_System_zero_dim_empty(ppl_Constraint_System_t *pcs);
    int ppl_new_Constraint_System_from_Constraint(ppl_Constraint_System_t *pcs,
                                                  ppl_const_Constraint_t c);
    int ppl_new_Constraint_System_from_Constraint_System(
        ppl_Constraint_System_t *pcs, ppl_const_Constraint_System_t cs);
    int ppl_assign_Constraint_System_from_Constraint_System(
        ppl_Constraint_System_t dst, ppl_const_Constraint_System_t src);
    int ppl_delete_Constraint_System(ppl_const_Constraint_System_t cs);
    int ppl_Constraint_System_space_dimension(ppl_const_Constraint_System_t cs,
                                              ppl_dimension_type *m);
    int ppl_Constraint_System_empty(ppl_const_Constraint_System_t cs);
    int ppl_Constraint_System_has_strict_inequalities(
        ppl_const_Constraint_System_t cs);
    int ppl_Constraint_System_begin(ppl_const_Constraint_System_t cs,
                                    ppl_Constraint_System_const_iterator_t cit);
    int ppl_Constraint_System_end(ppl_const_Constraint_System_t cs,
                                  ppl_Constraint_System_const_iterator_t cit);
    int ppl_Constraint_System_OK(ppl_const_Constraint_System_t cs);
    int ppl_Constraint_System_clear(ppl_Constraint_System_t cs);
    int ppl_Constraint_System_insert_Constraint(ppl_Constraint_System_t cs,
                                                ppl_const_Constraint_t c);
    
    VERIFICATION_CRITERIA:

    Check insertion and copy independence, empty and canonical systems, declared dimensions, native iterator filtering and destruction/invalidation histories.

    SOURCE:

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

  • PPL-SPEC-001535
    2. C generator systems UID: PPL-SPEC-001535 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The Generator_System functions shall construct independent empty, copied, single-element or dedicated canonical native systems as exposed. Insertion shall copy the supplied element with the native system's topology and dimension rules. Assignment, clear and deletion shall have the native value and ownership effects. Dimension, emptiness and validity queries shall expose the native result. Begin/end operations shall position caller-owned iterators in the live system; dereferenced elements shall remain borrowed from that system and shall not be deleted or mutated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Systems own elements, while traversal only borrows them.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Generator_System(ppl_Generator_System_t *pgs);
    int ppl_new_Generator_System_zero_dim_univ(ppl_Generator_System_t *pgs);
    int ppl_new_Generator_System_from_Generator(ppl_Generator_System_t *pgs,
                                                ppl_const_Generator_t g);
    int ppl_new_Generator_System_from_Generator_System(
        ppl_Generator_System_t *pgs, ppl_const_Generator_System_t gs);
    int ppl_assign_Generator_System_from_Generator_System(
        ppl_Generator_System_t dst, ppl_const_Generator_System_t src);
    int ppl_delete_Generator_System(ppl_const_Generator_System_t gs);
    int ppl_Generator_System_space_dimension(ppl_const_Generator_System_t gs,
                                             ppl_dimension_type *m);
    int ppl_Generator_System_empty(ppl_const_Generator_System_t gs);
    int ppl_Generator_System_begin(ppl_const_Generator_System_t gs,
                                   ppl_Generator_System_const_iterator_t git);
    int ppl_Generator_System_end(ppl_const_Generator_System_t gs,
                                 ppl_Generator_System_const_iterator_t git);
    int ppl_Generator_System_OK(ppl_const_Generator_System_t gs);
    int ppl_Generator_System_clear(ppl_Generator_System_t gs);
    int ppl_Generator_System_insert_Generator(ppl_Generator_System_t gs,
                                              ppl_const_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check insertion and copy independence, empty and canonical systems, declared dimensions, native iterator filtering and destruction/invalidation histories.

    SOURCE:

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

  • PPL-SPEC-001536
    3. C congruence systems UID: PPL-SPEC-001536 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The Congruence_System functions shall construct independent empty, copied, single-element or dedicated canonical native systems as exposed. Insertion shall copy the supplied congruence with the native system's dimension rules. The represented condition after insertion shall be the conjunction of the previous condition and the inserted congruence. Assignment, clear and deletion shall have the native value and ownership effects. Dimension, emptiness and validity queries shall expose the native result. Begin/end operations shall position caller-owned iterators in the live system; dereferenced elements shall remain borrowed from that system and shall not be deleted or mutated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Systems own elements, while traversal only borrows them.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Congruence_System(ppl_Congruence_System_t *pcs);
    int ppl_new_Congruence_System_zero_dim_empty(ppl_Congruence_System_t *pcs);
    int ppl_new_Congruence_System_from_Congruence(ppl_Congruence_System_t *pcs,
                                                  ppl_const_Congruence_t c);
    int ppl_new_Congruence_System_from_Congruence_System(
        ppl_Congruence_System_t *pcs, ppl_const_Congruence_System_t cs);
    int ppl_assign_Congruence_System_from_Congruence_System(
        ppl_Congruence_System_t dst, ppl_const_Congruence_System_t src);
    int ppl_delete_Congruence_System(ppl_const_Congruence_System_t cs);
    int ppl_Congruence_System_space_dimension(ppl_const_Congruence_System_t cs,
                                              ppl_dimension_type *m);
    int ppl_Congruence_System_empty(ppl_const_Congruence_System_t cs);
    int ppl_Congruence_System_begin(ppl_const_Congruence_System_t cs,
                                    ppl_Congruence_System_const_iterator_t cit);
    int ppl_Congruence_System_end(ppl_const_Congruence_System_t cs,
                                  ppl_Congruence_System_const_iterator_t cit);
    int ppl_Congruence_System_OK(ppl_const_Congruence_System_t cs);
    int ppl_Congruence_System_clear(ppl_Congruence_System_t cs);
    int ppl_Congruence_System_insert_Congruence(ppl_Congruence_System_t cs,
                                                ppl_const_Congruence_t c);
    
    VERIFICATION_CRITERIA:

    Check insertion and copy independence, empty and canonical systems, declared dimensions, native iterator filtering and destruction/invalidation histories.

    SOURCE:

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

  • PPL-SPEC-001537
    4. C grid generator systems UID: PPL-SPEC-001537 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The Grid_Generator_System functions shall construct independent empty, copied, single-element or dedicated canonical native systems as exposed. Insertion shall copy the supplied element with the native system's topology and dimension rules. Assignment, clear and deletion shall have the native value and ownership effects. Dimension, emptiness and validity queries shall expose the native result. Begin/end operations shall position caller-owned iterators in the live system; dereferenced elements shall remain borrowed from that system and shall not be deleted or mutated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Systems own elements, while traversal only borrows them.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Grid_Generator_System(ppl_Grid_Generator_System_t *pgs);
    int ppl_new_Grid_Generator_System_zero_dim_univ(
        ppl_Grid_Generator_System_t *pgs);
    int ppl_new_Grid_Generator_System_from_Grid_Generator(
        ppl_Grid_Generator_System_t *pgs, ppl_const_Grid_Generator_t g);
    int ppl_new_Grid_Generator_System_from_Grid_Generator_System(
        ppl_Grid_Generator_System_t *pgs, ppl_const_Grid_Generator_System_t gs);
    int ppl_assign_Grid_Generator_System_from_Grid_Generator_System(
        ppl_Grid_Generator_System_t dst, ppl_const_Grid_Generator_System_t src);
    int ppl_delete_Grid_Generator_System(ppl_const_Grid_Generator_System_t gs);
    int ppl_Grid_Generator_System_space_dimension(
        ppl_const_Grid_Generator_System_t gs, ppl_dimension_type *m);
    int ppl_Grid_Generator_System_empty(ppl_const_Grid_Generator_System_t gs);
    int ppl_Grid_Generator_System_begin(
        ppl_const_Grid_Generator_System_t gs,
        ppl_Grid_Generator_System_const_iterator_t git);
    int ppl_Grid_Generator_System_end(
        ppl_const_Grid_Generator_System_t gs,
        ppl_Grid_Generator_System_const_iterator_t git);
    int ppl_Grid_Generator_System_OK(ppl_const_Grid_Generator_System_t gs);
    int ppl_Grid_Generator_System_clear(ppl_Grid_Generator_System_t gs);
    int ppl_Grid_Generator_System_insert_Grid_Generator(
        ppl_Grid_Generator_System_t gs, ppl_const_Grid_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check insertion and copy independence, empty and canonical systems, declared dimensions, native iterator filtering and destruction/invalidation histories.

    SOURCE:

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

  • PPL-SPEC-001538
    5. C descriptor-system iterator lifetimes UID: PPL-SPEC-001538 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Iterator constructors shall allocate caller-owned iterator positions; copying and assignment shall copy positions without copying or extending the lifetime of their system or elements. Begin/end shall position them in the supplied live system. Equality shall compare valid positions in that same system. Increment shall advance a valid non-end position; dereference shall return a borrowed const element at a dereferenceable position. Mutation, replacement or destruction of the owning system shall obey the native invalidation rules. Iterator deletion shall release only iterator storage.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    An allocated iterator does not acquire ownership of its range.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Constraint_System_const_iterator(
        ppl_Constraint_System_const_iterator_t *pcit);
    int ppl_new_Constraint_System_const_iterator_from_Constraint_System_const_iterator(
        ppl_Constraint_System_const_iterator_t *pcit,
        ppl_const_Constraint_System_const_iterator_t cit);
    int ppl_assign_Constraint_System_const_iterator_from_Constraint_System_const_iterator(
        ppl_Constraint_System_const_iterator_t dst,
        ppl_const_Constraint_System_const_iterator_t src);
    int ppl_delete_Constraint_System_const_iterator(
        ppl_const_Constraint_System_const_iterator_t cit);
    int ppl_Constraint_System_const_iterator_dereference(
        ppl_const_Constraint_System_const_iterator_t cit,
        ppl_const_Constraint_t *pc);
    int ppl_Constraint_System_const_iterator_increment(
        ppl_Constraint_System_const_iterator_t cit);
    int ppl_Constraint_System_const_iterator_equal_test(
        ppl_const_Constraint_System_const_iterator_t x,
        ppl_const_Constraint_System_const_iterator_t y);
    int ppl_new_Generator_System_const_iterator(
        ppl_Generator_System_const_iterator_t *pgit);
    int ppl_new_Generator_System_const_iterator_from_Generator_System_const_iterator(
        ppl_Generator_System_const_iterator_t *pgit,
        ppl_const_Generator_System_const_iterator_t git);
    int ppl_assign_Generator_System_const_iterator_from_Generator_System_const_iterator(
        ppl_Generator_System_const_iterator_t dst,
        ppl_const_Generator_System_const_iterator_t src);
    int ppl_delete_Generator_System_const_iterator(
        ppl_const_Generator_System_const_iterator_t git);
    int ppl_Generator_System_const_iterator_dereference(
        ppl_const_Generator_System_const_iterator_t git, ppl_const_Generator_t *pg);
    int ppl_Generator_System_const_iterator_increment(
        ppl_Generator_System_const_iterator_t git);
    int ppl_Generator_System_const_iterator_equal_test(
        ppl_const_Generator_System_const_iterator_t x,
        ppl_const_Generator_System_const_iterator_t y);
    int ppl_new_Congruence_System_const_iterator(
        ppl_Congruence_System_const_iterator_t *pcit);
    int ppl_new_Congruence_System_const_iterator_from_Congruence_System_const_iterator(
        ppl_Congruence_System_const_iterator_t *pcit,
        ppl_const_Congruence_System_const_iterator_t cit);
    int ppl_assign_Congruence_System_const_iterator_from_Congruence_System_const_iterator(
        ppl_Congruence_System_const_iterator_t dst,
        ppl_const_Congruence_System_const_iterator_t src);
    int ppl_delete_Congruence_System_const_iterator(
        ppl_const_Congruence_System_const_iterator_t cit);
    int ppl_Congruence_System_const_iterator_dereference(
        ppl_const_Congruence_System_const_iterator_t cit,
        ppl_const_Congruence_t *pc);
    int ppl_Congruence_System_const_iterator_increment(
        ppl_Congruence_System_const_iterator_t cit);
    int ppl_Congruence_System_const_iterator_equal_test(
        ppl_const_Congruence_System_const_iterator_t x,
        ppl_const_Congruence_System_const_iterator_t y);
    int ppl_new_Grid_Generator_System_const_iterator(
        ppl_Grid_Generator_System_const_iterator_t *pgit);
    int ppl_new_Grid_Generator_System_const_iterator_from_Grid_Generator_System_const_iterator(
        ppl_Grid_Generator_System_const_iterator_t *pgit,
        ppl_const_Grid_Generator_System_const_iterator_t git);
    int ppl_assign_Grid_Generator_System_const_iterator_from_Grid_Generator_System_const_iterator(
        ppl_Grid_Generator_System_const_iterator_t dst,
        ppl_const_Grid_Generator_System_const_iterator_t src);
    int ppl_delete_Grid_Generator_System_const_iterator(
        ppl_const_Grid_Generator_System_const_iterator_t git);
    int ppl_Grid_Generator_System_const_iterator_dereference(
        ppl_const_Grid_Generator_System_const_iterator_t git,
        ppl_const_Grid_Generator_t *pg);
    int ppl_Grid_Generator_System_const_iterator_increment(
        ppl_Grid_Generator_System_const_iterator_t git);
    int ppl_Grid_Generator_System_const_iterator_equal_test(
        ppl_const_Grid_Generator_System_const_iterator_t x,
        ppl_const_Grid_Generator_System_const_iterator_t y);
    
    VERIFICATION_CRITERIA:

    Traverse empty/nonempty systems, copy/assign positions and compare begin/end, then release iterators independently of borrowed elements.

    SOURCE:

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

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

  • PPL-SPEC-001523
    1. C coefficient ownership, conversion and bounds UID: PPL-SPEC-001523 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Coefficient creation shall produce independent caller-owned zero, GMP-integer or copied values. Assignment and conversion to or from initialized mpz_t objects shall preserve the mathematical integer for every admitted value. For checked coefficient profiles, conversion from GMP with an out-of-range value shall report PPL_ARITHMETIC_OVERFLOW. Deletion shall release owned coefficients. The boundedness predicate shall identify the configured coefficient representation. Minimum/maximum queries shall assign bounds and return true for bounded coefficients, and return false without modifying the output for unbounded coefficients. OK shall report the coefficient representation's admitted validity.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Host GMP values and library coefficients require exact conversion with explicit ownership.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Coefficient(ppl_Coefficient_t *pc);
    int ppl_new_Coefficient_from_mpz_t(ppl_Coefficient_t *pc, mpz_t z);
    int ppl_new_Coefficient_from_Coefficient(ppl_Coefficient_t *pc,
                                             ppl_const_Coefficient_t c);
    int ppl_assign_Coefficient_from_mpz_t(ppl_Coefficient_t dst, mpz_t z);
    int ppl_assign_Coefficient_from_Coefficient(ppl_Coefficient_t dst,
                                                ppl_const_Coefficient_t src);
    int ppl_delete_Coefficient(ppl_const_Coefficient_t c);
    int ppl_Coefficient_to_mpz_t(ppl_const_Coefficient_t c, mpz_t z);
    int ppl_Coefficient_OK(ppl_const_Coefficient_t c);
    int ppl_Coefficient_is_bounded(void);
    int ppl_Coefficient_min(mpz_t min);
    int ppl_Coefficient_max(mpz_t max);
    int ppl_multiply_Linear_Expression_by_Coefficient(ppl_Linear_Expression_t le,
                                                      ppl_const_Coefficient_t n);
    
    VERIFICATION_CRITERIA:

    Check signed and large integers, copy/assignment independence, configured bounds, round trips and bounded overflow where configured.

    SOURCE:

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

  • PPL-SPEC-001524
    2. C affine expression values and updates UID: PPL-SPEC-001524 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expression construction shall produce independent zero, dimensioned, copied or descriptor-derived native affine expressions. Assignment, coefficient additions, constant additions, expression addition/subtraction and scaling shall have the corresponding native affine meaning and retain native dimension/admission rules. Source handles shall remain valid during operations; owned results shall be independently deletable. Mutations shall not alter an independent source copy.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C expression operations must preserve affine algebra and dimensions.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Linear_Expression(ppl_Linear_Expression_t *ple);
    int ppl_new_Linear_Expression_with_dimension(ppl_Linear_Expression_t *ple,
                                                 ppl_dimension_type d);
    int ppl_new_Linear_Expression_from_Linear_Expression(
        ppl_Linear_Expression_t *ple, ppl_const_Linear_Expression_t le);
    int ppl_new_Linear_Expression_from_Constraint(ppl_Linear_Expression_t *ple,
                                                  ppl_const_Constraint_t c);
    int ppl_new_Linear_Expression_from_Generator(ppl_Linear_Expression_t *ple,
                                                 ppl_const_Generator_t g);
    int ppl_new_Linear_Expression_from_Congruence(ppl_Linear_Expression_t *ple,
                                                  ppl_const_Congruence_t c);
    int ppl_new_Linear_Expression_from_Grid_Generator(ppl_Linear_Expression_t *ple,
                                                      ppl_const_Grid_Generator_t g);
    int ppl_assign_Linear_Expression_from_Linear_Expression(
        ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src);
    int ppl_delete_Linear_Expression(ppl_const_Linear_Expression_t le);
    int ppl_Linear_Expression_all_homogeneous_terms_are_zero(
        ppl_const_Linear_Expression_t le);
    int ppl_Linear_Expression_add_to_coefficient(ppl_Linear_Expression_t le,
                                                 ppl_dimension_type var,
                                                 ppl_const_Coefficient_t n);
    int ppl_Linear_Expression_add_to_inhomogeneous(ppl_Linear_Expression_t le,
                                                   ppl_const_Coefficient_t n);
    int ppl_add_Linear_Expression_to_Linear_Expression(
        ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src);
    int ppl_subtract_Linear_Expression_from_Linear_Expression(
        ppl_Linear_Expression_t dst, ppl_const_Linear_Expression_t src);
    
    VERIFICATION_CRITERIA:

    Compare literal coefficient vectors and constants after each constructor and arithmetic update, including cancellation, zero scaling, borrowed input conversion and rejected dimensions.

    SOURCE:

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

  • PPL-SPEC-001525
    3. C affine expression queries UID: PPL-SPEC-001525 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expression dimension and coefficient queries shall assign the corresponding native extent, selected coefficient or constant. Zero tests and validity tests shall return boolean results. Query outputs shall be live writable coefficient objects rather than newly allocated handles. Indexed access shall observe native index admission and virtual zero coefficients where provided.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Queries distinguish assigning an existing coefficient from creating another owned object.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Linear_Expression_space_dimension(ppl_const_Linear_Expression_t le,
                                              ppl_dimension_type *m);
    int ppl_Linear_Expression_coefficient(ppl_const_Linear_Expression_t le,
                                          ppl_dimension_type var,
                                          ppl_Coefficient_t n);
    int ppl_Linear_Expression_inhomogeneous_term(ppl_const_Linear_Expression_t le,
                                                 ppl_Coefficient_t n);
    int ppl_Linear_Expression_OK(ppl_const_Linear_Expression_t le);
    int ppl_Linear_Expression_is_zero(ppl_const_Linear_Expression_t le);
    
    VERIFICATION_CRITERIA:

    Check exact coefficients/constants, zero expressions, padded dimensions, range admission and query-output reuse.

    SOURCE:

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

  • PPL-SPEC-001526
    4. C linear constraint values UID: PPL-SPEC-001526 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Creation shall copy inputs into an independent owned Constraint representing the supplied affine expression compared with zero using the requested supported relation, including strict relations. Dedicated zero-dimensional constructors shall provide the corresponding native canonical objects. Copying and assignment shall preserve native value and dimension; deletion shall release owned storage. An unsupported relation code shall report PPL_ERROR_INVALID_ARGUMENT. Native dimension and size failures shall be translated by the C failure protocol.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Descriptor conversion must preserve its geometric or arithmetic meaning.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Constraint(ppl_Constraint_t *pc, ppl_const_Linear_Expression_t le,
                           enum ppl_enum_Constraint_Type rel);
    int ppl_new_Constraint_zero_dim_false(ppl_Constraint_t *pc);
    int ppl_new_Constraint_zero_dim_positivity(ppl_Constraint_t *pc);
    int ppl_new_Constraint_from_Constraint(ppl_Constraint_t *pc,
                                           ppl_const_Constraint_t c);
    int ppl_assign_Constraint_from_Constraint(ppl_Constraint_t dst,
                                              ppl_const_Constraint_t src);
    int ppl_delete_Constraint(ppl_const_Constraint_t c);
    
    VERIFICATION_CRITERIA:

    Check each supported kind, exact coefficients and normalization, empty/universe canonical descriptors, source independence and native admission failures.

    SOURCE:

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

  • PPL-SPEC-001527
    5. C linear constraint queries UID: PPL-SPEC-001527 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Queries shall report the native Constraint relation type, dimension, variable coefficients and inhomogeneous term. Validity queries shall return a boolean outcome. Coefficient and inhomogeneous-term outputs shall assign existing writable coefficient objects. Native argument failures shall be translated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C query results need the same interpretation as their native descriptor.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Constraint_space_dimension(ppl_const_Constraint_t c,
                                       ppl_dimension_type *m);
    int ppl_Constraint_type(ppl_const_Constraint_t c);
    int ppl_Constraint_coefficient(ppl_const_Constraint_t c, ppl_dimension_type var,
                                   ppl_Coefficient_t n);
    int ppl_Constraint_inhomogeneous_term(ppl_const_Constraint_t c,
                                          ppl_Coefficient_t n);
    int ppl_Constraint_OK(ppl_const_Constraint_t c);
    
    VERIFICATION_CRITERIA:

    Check each kind against literal descriptors, normalized ratios or congruences, output reuse and rejected inappropriate queries.

    SOURCE:

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

  • PPL-SPEC-001528
    6. C polyhedral generator values UID: PPL-SPEC-001528 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Creation shall copy inputs into an independent owned Generator representing the requested line, ray, point or closure point with the native direction or divisor semantics. Dedicated zero-dimensional constructors shall provide the corresponding native canonical objects. Copying and assignment shall preserve native value and dimension; deletion shall release owned storage. Invalid kinds, undefined divisors and dimension/size violations designated by the native operation shall be reported through the C failure protocol.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Descriptor conversion must preserve its geometric or arithmetic meaning.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Generator(ppl_Generator_t *pg, ppl_const_Linear_Expression_t le,
                          enum ppl_enum_Generator_Type t,
                          ppl_const_Coefficient_t d);
    int ppl_new_Generator_zero_dim_point(ppl_Generator_t *pg);
    int ppl_new_Generator_zero_dim_closure_point(ppl_Generator_t *pg);
    int ppl_new_Generator_from_Generator(ppl_Generator_t *pg,
                                         ppl_const_Generator_t g);
    int ppl_assign_Generator_from_Generator(ppl_Generator_t dst,
                                            ppl_const_Generator_t src);
    int ppl_delete_Generator(ppl_const_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check each supported kind, exact coefficients and normalization, empty/universe canonical descriptors, source independence and native admission failures.

    SOURCE:

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

  • PPL-SPEC-001529
    7. C polyhedral generator queries UID: PPL-SPEC-001529 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Queries shall report the native Generator kind, dimension and variable coefficients. Divisor queries shall report the native divisor for a point or closure point and shall report PPL_ERROR_INVALID_ARGUMENT for a line or ray. Validity queries shall return a boolean outcome. Coefficient and divisor outputs shall assign existing writable coefficient objects. Native argument failures shall be translated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C query results need the same interpretation as their native descriptor.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Generator_space_dimension(ppl_const_Generator_t g,
                                      ppl_dimension_type *m);
    int ppl_Generator_type(ppl_const_Generator_t g);
    int ppl_Generator_coefficient(ppl_const_Generator_t g, ppl_dimension_type var,
                                  ppl_Coefficient_t n);
    int ppl_Generator_divisor(ppl_const_Generator_t g, ppl_Coefficient_t n);
    int ppl_Generator_OK(ppl_const_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check each kind against literal descriptors, normalized ratios or congruences, output reuse and rejected inappropriate queries.

    SOURCE:

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

  • PPL-SPEC-001530
    8. C rational congruence values UID: PPL-SPEC-001530 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Creation shall copy inputs into an independent owned Congruence representing the supplied affine expression and modulus, with modulus zero denoting equality and native normalization of nonzero moduli. Dedicated zero-dimensional constructors shall provide the corresponding native canonical objects. Copying and assignment shall preserve native value and dimension; deletion shall release owned storage. Native dimension and size failures shall be translated by the C failure protocol.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Descriptor conversion must preserve its geometric or arithmetic meaning.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Congruence(ppl_Congruence_t *pc, ppl_const_Linear_Expression_t le,
                           ppl_const_Coefficient_t m);
    int ppl_new_Congruence_zero_dim_false(ppl_Congruence_t *pc);
    int ppl_new_Congruence_zero_dim_integrality(ppl_Congruence_t *pc);
    int ppl_new_Congruence_from_Congruence(ppl_Congruence_t *pc,
                                           ppl_const_Congruence_t c);
    int ppl_assign_Congruence_from_Congruence(ppl_Congruence_t dst,
                                              ppl_const_Congruence_t src);
    int ppl_delete_Congruence(ppl_const_Congruence_t c);
    
    VERIFICATION_CRITERIA:

    Check each supported kind, exact coefficients and normalization, empty/universe canonical descriptors, source independence and native admission failures.

    SOURCE:

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

  • PPL-SPEC-001531
    9. C rational congruence queries UID: PPL-SPEC-001531 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Queries shall report the native Congruence dimension, variable coefficients, inhomogeneous term and modulus. Validity queries shall return a boolean outcome. Coefficient, inhomogeneous-term and modulus outputs shall assign existing writable coefficient objects. Native argument failures shall be translated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C query results need the same interpretation as their native descriptor.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Congruence_space_dimension(ppl_const_Congruence_t c,
                                       ppl_dimension_type *m);
    int ppl_Congruence_coefficient(ppl_const_Congruence_t c, ppl_dimension_type var,
                                   ppl_Coefficient_t n);
    int ppl_Congruence_inhomogeneous_term(ppl_const_Congruence_t c,
                                          ppl_Coefficient_t n);
    int ppl_Congruence_modulus(ppl_const_Congruence_t c, ppl_Coefficient_t m);
    int ppl_Congruence_OK(ppl_const_Congruence_t c);
    
    VERIFICATION_CRITERIA:

    Check each kind against literal descriptors, normalized ratios or congruences, output reuse and rejected inappropriate queries.

    SOURCE:

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

  • PPL-SPEC-001532
    10. C grid generator values UID: PPL-SPEC-001532 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Creation shall copy inputs into an independent owned Grid_Generator representing the requested line, parameter or point with the native direction and divisor semantics. Dedicated zero-dimensional constructors shall provide the corresponding native canonical objects. Copying and assignment shall preserve native value and dimension; deletion shall release owned storage. Invalid kinds, undefined divisors and dimension/size violations designated by the native operation shall be reported through the C failure protocol.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Descriptor conversion must preserve its geometric or arithmetic meaning.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_new_Grid_Generator(ppl_Grid_Generator_t *pg,
                               ppl_const_Linear_Expression_t le,
                               enum ppl_enum_Grid_Generator_Type t,
                               ppl_const_Coefficient_t d);
    int ppl_new_Grid_Generator_zero_dim_point(ppl_Grid_Generator_t *pg);
    int ppl_new_Grid_Generator_from_Grid_Generator(ppl_Grid_Generator_t *pg,
                                                   ppl_const_Grid_Generator_t g);
    int ppl_assign_Grid_Generator_from_Grid_Generator(
        ppl_Grid_Generator_t dst, ppl_const_Grid_Generator_t src);
    int ppl_delete_Grid_Generator(ppl_const_Grid_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check each supported kind, exact coefficients and normalization, empty/universe canonical descriptors, source independence and native admission failures.

    SOURCE:

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

  • PPL-SPEC-001533
    11. C grid generator queries UID: PPL-SPEC-001533 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Queries shall report the native Grid_Generator kind, dimension and variable coefficients. Divisor queries shall report the native divisor for a point or parameter and shall report PPL_ERROR_INVALID_ARGUMENT for a line. Validity queries shall return a boolean outcome. Coefficient and divisor outputs shall assign existing writable coefficient objects. Native argument failures shall be translated.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C query results need the same interpretation as their native descriptor.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_Grid_Generator_space_dimension(ppl_const_Grid_Generator_t g,
                                           ppl_dimension_type *m);
    int ppl_Grid_Generator_type(ppl_const_Grid_Generator_t g);
    int ppl_Grid_Generator_coefficient(ppl_const_Grid_Generator_t g,
                                       ppl_dimension_type var, ppl_Coefficient_t n);
    int ppl_Grid_Generator_divisor(ppl_const_Grid_Generator_t g,
                                   ppl_Coefficient_t n);
    int ppl_Grid_Generator_OK(ppl_const_Grid_Generator_t g);
    
    VERIFICATION_CRITERIA:

    Check each kind against literal descriptors, normalized ratios or congruences, output reuse and rejected inappropriate queries.

    SOURCE:

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

  • 1. Transition encoding and ranking interpretation UID: PPL-SPEC-001506 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A single transition input of dimension 2n shall place after-state coordinates x’ in indices 0, …, n − 1 and before-state coordinates x in indices n, …, 2n − 1. An odd dimension shall raise std::invalid_argument. Paired inputs shall have dimensions n and 2n; otherwise they shall raise std::invalid_argument before analysis. The first input shall restrict before states in its own indices 0, …, n − 1; the second shall use the single-input ordering. Their aligned conjunction shall define the analyzed relation. For paired inputs, emptiness of the conjunction shall be determined with strict rows intact before relaxation. If the exact conjunction is empty, the paired Boolean tests shall succeed and the paired witness operations shall return an admissible coefficient point of dimension n + 1.

    The input type shall provide supported minimized linear constraints. Numerical guarantees shall concern the rational transition approximation defined by those constraints, with sound positive conclusions for every represented concrete transition. A coefficient point of dimension n + 1 shall encode f(x) = c + ∑iaixi with slopes in indices 0, …, n − 1 and constant c at index n. A ranking argument shall require a finite uniform lower bound and a uniform decrease δ > 0 over transitions. Strict positivity at individual transitions alone shall not replace uniform decrease. Input mathematical values shall remain unchanged. Separate outputs shall not alias one another or the inputs.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A ranking for a misaligned relation proves nothing about the intended loop; uniform decrease and a lower bound rule out infinite transition sequences.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET> bool termination_test_MS(const PSET&);
    template<class PSET> bool termination_test_PR(const PSET&);
    
    VERIFICATION_CRITERIA:

    Compare single and paired encodings, independently decoded coefficients, coordinate permutations, odd or mismatched dimensions, zero dimensions and discrete input relaxations. Check a conjunction made empty only by strict boundaries through paired Boolean, witness and coefficient-space calls.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001507
    2. MS termination test outcomes UID: PPL-SPEC-001507 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A completed true result shall certify an affine ranking for the analyzed transition approximation under 🔗 1. Transition encoding and ranking interpretation. False shall mean that this test is inconclusive about termination. It shall not mean that the loop has an infinite execution, even for an exact input relation. Single and paired forms shall use the same coordinate convention and preserve input values. Resource or arithmetic exceptions shall not constitute a true result.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Affine rankings are sufficient arguments but do not characterize all terminating programs.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET> bool termination_test_MS(const PSET&);
    template<class PSET> bool termination_test_MS_2(const PSET& before,
                                                 const PSET& after);
    
    VERIFICATION_CRITERIA:

    Check decreasing rational loops, stuttering and bidirectional relations, empty relations and terminating loops with no affine ranking; compare equivalent encodings.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001508
    3. MS affine ranking witnesses UID: PPL-SPEC-001508 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On true, the output shall be assigned a point of dimension n + 1 encoding an affine function satisfying the MS nonnegative and unit-decrease ranking obligations over the analyzed approximation. No particular witness shall be selected. On false, no witness value shall be promised and termination shall remain inconclusive. The layout and dimension admission rules in 🔗 1. Transition encoding and ranking interpretation shall apply.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A returned coefficient point must substantiate the positive ranking claim rather than merely carry a success flag.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET>
    bool one_affine_ranking_function_MS(const PSET&, Generator& mu);
    template<class PSET>
    bool one_affine_ranking_function_MS_2(const PSET& before,
                                        const PSET& after, Generator& mu);
    
    VERIFICATION_CRITERIA:

    Independently minimize the lower-bound and decrease expressions over original rational transition constraints; check dimension/constant placement, strict and empty relations and false-output admission.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001509
    4. Normalized MS affine ranking spaces UID: PPL-SPEC-001509 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The output shall replace its prior value with a closed polyhedron of dimension n + 1 containing exactly the affine coefficient tuples that satisfy f(x) ≥ 0 and f(x) − f(x’) ≥ 1 on every rational transition described by the input constraints. For an empty relation it shall be universe, including an empty conjunction of individually nonempty paired inputs. Strict constraints shall be preserved when establishing that emptiness; for nonempty relations these weak ranking obligations also hold on the closure. An empty output shall mean no normalized affine ranking exists and shall not establish nontermination.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Universal transition obligations are vacuous on empty relations; relaxing strict constraints too early can incorrectly create obligations.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET>
    void all_affine_ranking_functions_MS(const PSET&, C_Polyhedron& mu_space);
    template<class PSET>
    void all_affine_ranking_functions_MS_2(const PSET& before, const PSET& after,
                                         C_Polyhedron& mu_space);
    
    VERIFICATION_CRITERIA:

    Check exact coefficient-space inequalities for rational translations and bounded boxes, explicit/latent/paired strict emptiness, generator directions and fresh output replacement.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001510
    5. MS affine quasi-ranking spaces UID: PPL-SPEC-001510 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The two distinct outputs shall be closed polyhedra of dimension n + 1. The decreasing space shall contain exactly tuples satisfying f(x) − f(x’) ≥ 1 on every analyzed rational transition, with unrestricted additive constant. The bounded space shall contain exactly tuples satisfying f(x) ≥ 0 on every such before state. It shall use that nonnegative normalization rather than accept every arbitrary finite lower bound.

    Their intersection shall equal the normalized MS ranking space. Empty relations shall yield universe in both outputs; the zero function shall always belong to the bounded space. Strict boundaries and paired conjunction emptiness shall be handled as in 🔗 4. Normalized MS affine ranking spaces. Neither an empty decreasing space nor an empty intersection shall establish nontermination.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Lower-bound and decrease obligations can be represented separately and recombined by intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET>
    void all_affine_quasi_ranking_functions_MS(const PSET&,
        C_Polyhedron& decreasing, C_Polyhedron& bounded);
    template<class PSET>
    void all_affine_quasi_ranking_functions_MS_2(const PSET& before,
        const PSET& after, C_Polyhedron& decreasing, C_Polyhedron& bounded);
    
    VERIFICATION_CRITERIA:

    Check independent literal coefficient spaces, free constants, zero membership, intersection equality, strict empty conjunctions and output dimensions.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001511
    6. PR termination test outcomes UID: PPL-SPEC-001511 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A completed true result shall certify an affine ranking with a finite lower bound and uniformly positive decrease over the analyzed transition approximation. For the paired form both obligations apply to the aligned conjunction, including bounds implied by the transition description. False shall be inconclusive about termination. Unit decrease and nonnegative normalization shall not be required for the PR certificate. The coordinate and valid-use rules in 🔗 1. Transition encoding and ranking interpretation shall apply to both the single and paired forms.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Positive scaling and additive shifts preserve a ranking argument but change its normalization.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET> bool termination_test_PR(const PSET&);
    template<class PSET> bool termination_test_PR_2(const PSET& before,
                                                 const PSET& after);
    
    VERIFICATION_CRITERIA:

    Check descending and ascending guarded rays with negative state bounds, rational steps, stuttering, empty relations and equivalent single/paired encodings.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001512
    7. PR affine ranking witnesses UID: PPL-SPEC-001512 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On true, the output shall be assigned a point of dimension n + 1 encoding an affine function with a finite uniform lower bound and uniformly positive decrease over the analyzed approximation. Its constant coordinate shall follow 🔗 1. Transition encoding and ranking interpretation; no nonnegative normalization or particular witness shall be required. On false, no output value shall be promised and termination shall remain inconclusive.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A zero additive constant can still be a valid PR ranking when the function has a negative finite lower bound.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET>
    bool one_affine_ranking_function_PR(const PSET&, Generator& mu);
    template<class PSET>
    bool one_affine_ranking_function_PR_2(const PSET& before,
                                        const PSET& after, Generator& mu);
    
    VERIFICATION_CRITERIA:

    Independently establish finite lower bound and strictly positive minimum decrease, including rational steps, negative states and constant layout; check false cases separately.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001513
    8. PR affine ranking spaces UID: PPL-SPEC-001513 STATUS: APPROVED COMPONENT: TERMINATION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The output shall replace its prior value with an NNC polyhedron of dimension n + 1 describing the affine coefficient tuples with a finite lower bound and a uniform decrease δ > 0 over the rational relation defined by the input constraints. For the paired form both obligations apply to the same aligned conjunction. In particular, the lower bound may follow from the transition description. The additive constant shall be unrestricted. No unit-decrease or nonnegative normalization shall be imposed. For an empty relation the space shall be universe, including empty aligned conjunctions of individually nonempty paired inputs. Strict boundaries shall not be discarded before establishing such emptiness. An empty output shall exclude rankings of this form and shall not establish nontermination.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    The positive-decrease space can have strict coefficient boundaries and differs from the closed normalized MS space.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template<class PSET>
    void all_affine_ranking_functions_PR(const PSET&, NNC_Polyhedron& mu_space);
    template<class PSET>
    void all_affine_ranking_functions_PR_2(const PSET& before, const PSET& after,
                                         NNC_Polyhedron& mu_space);
    
    VERIFICATION_CRITERIA:

    Compare full coefficient spaces for guarded rational translations, positive scaling and free constants; check stuttering, explicit/latent/paired strict emptiness and output replacement.

    BIBLIOGRAPHY:

    BagnaraMPZ12IC | Sections 3–5; journal article author manuscript, ranking conditions and the two synthesis methods.

    SOURCE:

    src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/Polyhedron/rankingpairs1.cc; tests/Polyhedron/termination1.cc; tests/Polyhedron/termination2.cc.

  • PPL-SPEC-001590
    1. Fatal unreachable and assertion diagnostics UID: PPL-SPEC-001590 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The default library definitions of ppl_unreachable, ppl_unreachable_msg and ppl_assertion_failed shall call abort and shall not return. With ordinary functioning diagnostic output, ppl_unreachable_msg shall first write to std::cerr the file, line, function and supplied latent-fault message; ppl_assertion_failed shall write the same location plus the supplied failed-assertion text. The message-free helper shall add no diagnostic output. Non-null live null-terminated text arguments shall be required. Diagnostic stream failures shall retain the stream's ordinary failure/exception behavior; output failure shall not be interpreted as successful continuation.

    Where the build supports weak replacement of these definitions, a client replacement shall retain the declared nonreturning interface and own its replacement behavior. The default abort behavior shall apply when no such replacement is linked.

    RATIONALE:

    A violated internal invariant needs a terminating diagnostic path rather than a numerical result that could be mistaken for successful computation.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    [[noreturn]] void ppl_unreachable();
    [[noreturn]] void ppl_unreachable_msg(
        const char* msg, const char* file, unsigned int line,
        const char* function);
    [[noreturn]] void ppl_assertion_failed(
        const char* assertion_text, const char* file, unsigned int line,
        const char* function);
    
    VERIFICATION_CRITERIA:

    In isolated processes, check SIGABRT and exact diagnostic text for each default helper, including the silent helper. Distinguish return, exceptions and unrelated signals from the required abort; disable core-file creation.

    SOURCE:

    src/assertions.hh; src/assertions.cc; tests/assertionsspec1.cc; tests/assertionmacroexpressionspec1.cc.

  • PPL-SPEC-001591
    2. Enabled and disabled assertion evaluation UID: PPL-SPEC-001591 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With NDEBUG absent, PPL_ASSERT(cond) and PPL_EXPECT(cond) shall evaluate the condition once and invoke the assertion-failure diagnostic when false. An ordinary assertion shall preserve computational weight; the additional weight check enabled by PPL_DEBUG_PPL_ASSERT shall diagnose a weight-changing condition. PPL_ASSERT_HEAVY and PPL_EXPECT_HEAVY shall evaluate their condition once under the assertion weight guard, suppressing instrumentation weight additions according to 🔗 6. Assertion-scope instrumentation suppression. A true assertion shall continue normally. A thrown condition exception shall propagate, with the heavy guard's assertion-state restoration on scope exit. Direct mutations of the weight variable shall retain their ordinary effects; the guard shall not provide numerical rollback.

    With NDEBUG defined, all four macros shall omit condition evaluation, including its side effects. Macro use shall provide a condition meaningful in an enabled build and satisfy the shared-weight synchronization conditions of the selected runtime profile.

    RATIONALE:

    Debug checks must have controlled evaluation and weight effects, and their removal must not be relied on to perform required production work.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    PPL_ASSERT(cond);
    PPL_ASSERT_HEAVY(cond);
    PPL_EXPECT(cond);
    PPL_EXPECT_HEAVY(cond);
    
    VERIFICATION_CRITERIA:

    Compile enabled and NDEBUG clients. Count condition evaluations, check ordinary/heavy weight effects and exception restoration, and check failure diagnostics in isolated processes without changing the library configuration.

    SOURCE:

    src/assertions.hh; src/assertions.cc; tests/assertionsspec1.cc; tests/assertionmacroexpressionspec1.cc.

  • PPL-SPEC-001592
    3. Unreachable macro diagnostic selection UID: PPL-SPEC-001592 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    PPL_UNREACHABLE_MSG(msg) shall invoke the message-bearing unreachable helper when NDEBUG is absent, supplying the macro invocation's file, line and function. With NDEBUG defined, it shall invoke the message-free helper and shall not evaluate the message expression. PPL_UNREACHABLE shall supply the literal message unreachable in an enabled build. Neither macro shall continue through the default helper. The helper and client-replacement conditions of 🔗 1. Fatal unreachable and assertion diagnostics shall apply.

    RATIONALE:

    The unreachable marker retains fail-fast behavior in optimized builds while allowing debug builds to identify the failed internal assumption.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    PPL_UNREACHABLE_MSG(msg);
    PPL_UNREACHABLE;
    
    VERIFICATION_CRITERIA:

    Use isolated enabled and NDEBUG clients to check abort behavior, invocation location and exact debug message; verify message-expression side effects occur only in the enabled form.

    SOURCE:

    src/assertions.hh; src/assertions.cc; tests/assertionsspec1.cc; tests/assertionmacroexpressionspec1.cc.

  • PPL-SPEC-001593
    4. Containment queries on independent value copies UID: PPL-SPEC-001593 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    copy_contains(x,y) shall invoke contains on its by-value argument copies and return that query's Boolean result. The type shall provide value copies on which contains can operate without mutating either original or shared caller-owned storage. Under that precondition, the helper shall preserve the two original objects, including mutable representation caches. The type's copying and containment contracts shall otherwise apply. Copy or query exceptions may propagate; argument-copy resources shall be released during normal completion and unwinding. The template shall require valid copyable argument values and the corresponding contains operation, plus the type's initialization, numerical and synchronization prerequisites.

    RATIONALE:

    Checking containment inside an assertion must not normalize or otherwise change the original values through logically const cache updates.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    template <typename T>
    bool copy_contains(T x_copy, T y_copy);
    
    VERIFICATION_CRITERIA:

    Check contained and noncontained polyhedra against independent geometry; compare both original serialized states before and after the copy query. Use a recording value type to check copy/query exception identity and resource release without mutation of either original.

    SOURCE:

    src/assertions.hh; src/assertions.cc; tests/assertionsspec1.cc; tests/assertionmacroexpressionspec1.cc.

  • 1. Rational affine image of one coordinate UID: PPL-SPEC-001111 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an entry shape X ⊆ ℝn , a valid coordinate k , a dimension-compatible integer-coefficient affine expression e and a nonzero coefficient d , affine_image(k,e,d) shall replace the receiver with a bounded-difference shape containing

    {y ∈ ℝn ∣ ∃x ∈ X : yk = e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    With exact rational boundary arithmetic, constant replacement and assignments xk :  = xj + c , including self translation, shall give the exact image. Other affine expressions may require a conservative bounded-difference enclosure. Rounded profiles shall keep the delegated outward bounds. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Transporting a correlated state through an assignment requires an old/new-coordinate relation; independent interval evaluation alone loses those correlations.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void affine_image(Variable var, const Linear_Expression& expr,
                      Coefficient_traits::const_reference denominator
                        = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Project independent old/new halfspaces. Check constant, copy, translation, negation, nonunit scaling and multiple-variable forms; require exact rational equality for constant/copy/translation classes and sound inclusion elsewhere. Include negative denominators, bounded/unbounded sources, latent emptiness, cache histories and unchanged-coordinate constraints.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/affineimage1.cc; tests/BD_Shape/affineimage2.cc.

  • PPL-SPEC-001112
    2. Rational affine preimage of one coordinate UID: PPL-SPEC-001112 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With the coordinate, expression and denominator admitted by 🔗 1. Rational affine image of one coordinate , affine_preimage(k,e,d) shall contain every x ∈ ℝn whose successor, obtained by replacing coordinate k with e(x) ⁄ d , belongs to the entry post-state shape. Expression occurrences of the updated coordinate shall denote its pre-state value.

    For xk :  = xj + c , the post-state constraints shall be substituted using that expression. With exact rational boundary arithmetic, both self translation and distinct-coordinate copy plus translation shall give the exact bounded-difference preimage; in the distinct-coordinate case the pre-state xk shall be free. Rounded profiles shall preserve the corresponding outward substitutions and consistency checks. Other transformations shall give sound containing shapes; they need not compute the least bounded-difference enclosure even when the exact preimage is representable, as specified by WR_Affine_Preimage_Precision in the mathematical interface definitions. Invertible transformations shall use the same relational predecessor meaning as noninvertible ones. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Backward transfer selects predecessors of the postcondition and must distinguish pre-state and post-state occurrences of an assigned variable.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void affine_preimage(Variable var, const Linear_Expression& expr,
                         Coefficient_traits::const_reference denominator
                           = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Derive relational predecessors by eliminating new coordinates. Check the documented exact copy-plus-offset substitution with all scalar and difference postconditions, including contradictory consistency tests and fractional offsets. Cover self inverses, constants, noninvertible general maps, negative denominators and bottom. Check soundness rather than universal leastness outside the promised classes.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/affinepreimage1.cc; tests/BD_Shape/negativeselfpreimage1.cc.

  • PPL-SPEC-001113
    3. Single-coordinate generalized affine image UID: PPL-SPEC-001113 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For  ⋈  ∈ { = ,  ≤ ,  ≥ } , the variable overload of generalized_affine_image(k,relsym,e,d) shall contain

    {y ∣ ∃x ∈ X : yk ⋈ e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Equality shall have the behavior of 🔗 1. Rational affine image of one coordinate . A one-sided relation shall use the indicated quotient, including the sign of the denominator; it shall not silently turn a lower relation into an upper relation. The result may conservatively approximate the affine relation. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    A one-sided update nondeterministically chooses a successor satisfying its affine bound, while leaving all other coordinates framed.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void generalized_affine_image(
        Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Independently project equality and both non-strict relation directions. Compare equality with1111; include positive/negative denominators, self dependence, distinct-variable dependence, general expressions, unbounded inputs and infeasible relations. Check unchanged-coordinate constraints and rejected strict/disequality symbols.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffineimage1.cc.

  • PPL-SPEC-001114
    4. Single-coordinate generalized affine preimage UID: PPL-SPEC-001114 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For  ⋈  ∈ { = ,  ≤ ,  ≥ } , the variable overload of generalized_affine_preimage(k,relsym,e,d) shall contain

    {x ∣ ∃y ∈ X : yk ⋈ e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Equality shall have the behavior and class-specific precision of 🔗 2. Rational affine preimage of one coordinate . Other admitted relations may give sound nonleast bounded-difference enclosures according to the documented preimage approximation contract. The denominator sign shall be respected. The relation shall use the same old/new coordinate frame for self-dependent and non-self-dependent expressions. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    A predecessor exists when some framed successor satisfies the postcondition and the selected relation, not when every possible successor does.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void generalized_affine_preimage(
        Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Eliminate new coordinates independently, with equality and both inequality directions, sign-normalized denominators, self/non-self dependence and general affine expressions. Check equality delegation, empty postconditions, surviving-coordinate restrictions and invalid symbols.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffinepreimage1.cc.

  • PPL-SPEC-001115
    5. Expression-left generalized affine image UID: PPL-SPEC-001115 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let l and r be dimension-compatible affine expressions, U the coordinates with nonzero homogeneous coefficient in l , and  ⋈  ∈ { = ,  ≤ ,  ≥ } . The expression overload of generalized_affine_image(l,relsym,r) shall contain

    {y ∣ ∃x ∈ X : l(y) ⋈ r(x) ∧ ∀i ∉ U,  yi = xi}.

    The left expression shall be interpreted in the new state and the right expression in the old state; exchanging them and reversing the relation shall not in general describe the same update. A constant left expression shall be a guard with every coordinate framed. Multiple updated coordinates may lose precision through a sound bounded-difference enclosure. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; lhs and rhs may denote the same live expression.

    For a constant left expression, a representable guard shall be added natively. Other guards shall receive one finite pass over native directions formed from each nonzero coefficient and each representable matching pair, in increasing coordinate order. For a guard expression e ≥ 0 and such a direction d , the finite infimum of the residual d − e shall supply d ≥ inf(d − e) . Equality shall also use its finite supremum to supply d ≤ sup(d − e) . Closure shall propagate earlier deductions before each direction is considered. Residual optimization shall preserve its supported correlations; returned rational bounds shall be inserted directly, without an intermediate scalar-interval conversion. This pass need not reach a fixed point or compute a least abstract intersection. General residuals may require linear programming.

    When the homogeneous part of l has two nonzero coefficients and is representable as a bounded-difference expression up to scaling, the finite entry-state supremum of r shall be retained as an upper bound on the new l for EQUAL and LESS_OR_EQUAL. Its finite infimum shall be retained as a lower bound for EQUAL and GREATER_OR_EQUAL. These bounds shall be computed before forgetting updated coordinates and shall also apply to disjoint left/right supports. Rational boundaries shall retain the exact extrema; other boundary profiles shall retain their native outward guarantees. An unbounded direction shall add no finite bound.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    The support of the left expression determines which coordinates are assigned together; all occurrences on the right refer to the entry state.

    Finite right-hand ranges are evaluated in the entry shape. Native optimization uses cached bounds for representable objectives and may invoke the linear programming solver for a general right expression. Saving those bounds before projection avoids confusing old and new occurrences of the same coordinate.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void generalized_affine_image(const Linear_Expression& lhs,
                                  Relation_Symbol relsym,
                                  const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Check the retained left-expression ranges against an independently assembled old/new polyhedron followed by projection, and literal rational fixtures. Include positive/negative scaling, arbitrary right expressions, disjoint and overlapping supports, shared expressions, one-sided/unbounded ranges, framed coordinates, dense/sparse expressions and rational/floating/integral bounds.

    Use independent old/new relations for constant, single-variable and multi-variable left sides, disjoint/overlapping supports, shared lhs/rhs, all admitted relations and rejected symbols. Check full frame constraints and soundness for approximate general updates rather than imposing an unsupported universal leastness requirement.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/generalizedaffineboundsspec1.cc; tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffineimage2.cc; tests/BD_Shape/affinecachereduction1.cc.

  • PPL-SPEC-001116
    6. Expression-left generalized affine preimage UID: PPL-SPEC-001116 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With l , r , U and  ⋈  admitted by 🔗 5. Expression-left generalized affine image , the expression overload of generalized_affine_preimage(l,relsym,r) shall contain

    {x ∣ ∃y ∈ X : l(y) ⋈ r(x) ∧ ∀i ∉ U,  yi = xi}.

    A constant left expression shall be a guard with every coordinate framed. Other forms may return sound nonleast bounded-difference enclosures as specified by the preimage approximation contract. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; the same live expression may supply both lhs and rhs .

    For a left expression with at least two nonzero homogeneous coefficients, the finite target-state infimum of l shall supply the necessary guard r ≥ infXl for EQUAL and LESS_OR_EQUAL; the finite supremum shall supply r ≤ supXl for EQUAL and GREATER_OR_EQUAL. These extrema shall be computed before forgetting updated coordinates. The guards shall be refined in the old-state coordinates using the same native native-direction approximation as constant-left images. An unbounded direction shall contribute no finite guard. Existing relational deductions and framed-coordinate constraints shall also be preserved. Rational boundary arithmetic shall use exact extrema; other profiles shall retain their native outward guarantees. These deductions need not give a least preimage enclosure.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Expression-left backward transfer uses the same transition relation as the forward operation, with the postcondition placed on new coordinates.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void generalized_affine_preimage(const Linear_Expression& lhs,
                                     Relation_Symbol relsym,
                                     const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Eliminate the new coordinates from relational postconditions for constant/single/multiple left supports, finite and unbounded target lhs ranges, disjoint and overlapping right supports, shared expressions and every admitted relation. Include empty/zero-dimensional guards, incompatibility and rejected symbols; retain every feasible predecessor.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/generalizedaffinepreimage2.cc; tests/BD_Shape/generalizedaffinepreimage3.cc.

  • PPL-SPEC-001117
    7. Single-coordinate bounded affine image UID: PPL-SPEC-001117 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted coordinate k , dimension-compatible expressions l, u and nonzero denominator d , bounded_affine_image(k,l,u,d) shall contain

    {y ∣ ∃x ∈ X : l(x) ⁄ d ≤ yk ≤ u(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Both bounding expressions shall use the same entry state. A negative common denominator shall preserve the displayed quotient inequalities; the lower and upper argument roles shall not be exchanged merely because the denominator is negative. The bounds may depend on the replaced coordinate. The result may conservatively approximate this simultaneous relation. Constraints involving only unchanged coordinates shall remain valid. Both expressions and the denominator shall remain unchanged; lb_expr and ub_expr may refer to the same live expression.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Two bounds constrain one nondeterministic assignment in a common old state; sequentially changing the variable would define a different relation.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void bounded_affine_image(
        Variable var, const Linear_Expression& lb_expr,
        const Linear_Expression& ub_expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Project both divided inequalities together. Cover equal and inconsistent bounds, self dependence in zero/one/both bounds, negative denominators, shared bound expressions, unbounded correlated inputs, empty input and invalid dimensions/zero denominators. Check simultaneous-transition soundness and unchanged-coordinate constraints.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/boundedaffineimage1.cc.

  • PPL-SPEC-001118
    8. Single-coordinate bounded affine preimage UID: PPL-SPEC-001118 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With the coordinate, expressions and denominator admitted by 🔗 7. Single-coordinate bounded affine image , bounded_affine_preimage(k,l,u,d) shall contain

    {x ∣ ∃y ∈ X : l(x) ⁄ d ≤ yk ≤ u(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    The two bounds shall be evaluated in the same pre-state, including when one or both contain xk . The result may be a sound nonleast bounded-difference enclosure under the documented preimage approximation contract. Any auxiliary coordinate used internally shall not remain in a successful result. Constraints involving only unchanged coordinates shall remain valid. Both source expressions and the denominator shall remain unchanged, including shared bound-expression arguments.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Backward bounded transfer must find a single successor satisfying both old-state bounds and the complete postcondition.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    void bounded_affine_preimage(
        Variable var, const Linear_Expression& lb_expr,
        const Linear_Expression& ub_expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Derive predecessors by eliminating new coordinates with both affine bounds present. Include zero/one/both-bound self dependence, constant and inconsistent pairs, positive/negative denominators and shared source expressions. Verify bottom preservation, unchanged-coordinate restrictions, final dimension and ownership when temporary coordinates are used.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/BD_Shape/boundedaffinepreimage1.cc.

  • PPL-SPEC-001119
    9. Native interval-affine image UID: PPL-SPEC-001119 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating-point boundary type T , a valid coordinate k and a dimension-compatible Linear_Form<Interval<T,Interval_Info>> with bounded coefficient intervals Ai and bounded constant interval B , affine_form_image(k,lf) shall contain every successor

    {y ∣ ∃x ∈ X,  b ∈ B,  ai ∈ Ai : yk = b +  ∑iaixi ∧ ∀j ≠ k,  yj = xj}.

    Coefficient and constant choices shall be independent as specified by 🔗 1. Interval-linear-form meaning and numerical prerequisites . The result shall use outward numerical bounds; interval uncertainty and the restricted difference-bound language may lose precision, without a general least-enclosure guarantee. Constraints involving only unchanged coordinates shall remain valid. The source form and its coefficient intervals shall retain their values. An empty coefficient or constant interval shall make the receiver empty.

    The selected native format, interval representation, initialized numerical runtime, caller-owned upward FPU environment and arithmetic/resource prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use and 🔗 1. Interval-linear-form meaning and numerical prerequisites shall hold. Bounded intervals shall satisfy their stored-value and endpoint-access prerequisites. Unbounded coefficients are outside this operation's documented admission. Native availability shall follow the corresponding configured supported-format predicate.

    The ambient dimension shall remain unchanged. Empty input shall remain empty after validation. An invalid selected coordinate or a form of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible, without an additional rollback guarantee. Callers shall synchronize shared owners and facilities.

    RATIONALE:

    Interval coefficients represent independent uncertainty rather than fixed rational scalars; their choices must be included together with correlated input states.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::BD_Shape<T>:

    template <typename Interval_Info>
    void affine_form_image(
        Variable var, const Linear_Form<Interval<T, Interval_Info>>& lf);
    
    VERIFICATION_CRITERIA:

    Independently enumerate finite coefficient corners and project each old/new affine relation, then derive the union supports; check conservative inclusion with constant, ±unit, uncertain-sign and general coefficients, zero tails and unbounded source directions. Include supported formats, caller FPU preservation, source-form preservation, empty input/choice sets, dimension errors and resource failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (bounded-difference shape semantics and floating-point implementation background).

    SOURCE:

    doc/definitions.dox; src/BD_Shape_defs.hh; src/BD_Shape_templates.hh; tests/bdshapeaffinespec1.cc; tests/bdshapeaffineoracle.hh; tests/bdshapeaffineallocationsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffinepublic1.cc; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh; tests/BD_Shape/affinecachereduction1.cc; tests/BD_Shape/affineunboundedproducts1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc.

  • 1. Threshold bounded-difference extrapolation and precision-sensitive tokens UID: PPL-SPEC-001120 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let Y be the argument's entry set and X the receiver's entry set, with Y ⊆ X. The explicit-iterator CC76_extrapolation_assign shall produce a bounded-difference enclosure of X, preserving the ambient dimension. An empty argument shall leave the receiver's represented set unchanged. Empty and universe in zero dimensions shall retain their distinct meanings; self-aliasing shall preserve the represented set.

    For nonempty operands under unbounded exact arithmetic, let bZ(v) = sup{v⋅p ∣ p ∈ Z} for each unary or coordinate-difference normal v. With no available delay token, a stable finite bound bX(v) = bY(v) shall be retained. An increasing bound bX(v) > bY(v) shall move to the least supplied threshold not below bX(v), or become unbounded when there is no such threshold. An already unbounded bound shall remain unbounded. The result shall be the conjunction of these closed upper inequalities. General closed bounded-difference iterations of this extrapolation shall not carry a finite-stabilization guarantee.

    Other supported profiles shall apply this comparison-and-threshold rule to an outward closed bound representation preserving the entry sets under [LINK: PPL-SPEC-001056]. Assigning a selected threshold shall round outward in the selected profile. This shall not exclude any point of X; rounded closure shall not be required to supply exact support values.

    The half-open threshold range shall use readable multipass forward iterators. Its values shall be finite, sorted in nondecreasing numerical order and stable throughout the call. Empty ranges and duplicate values shall be admitted. Comparison with the selected coefficient type and outward assignment to that type shall satisfy their numerical contracts. The range shall not borrow storage invalidated or modified by the call.

    A null token pointer or a zero counter shall select the undelayed result. With a positive counter the receiver's represented set shall remain X; the counter shall decrease by exactly one if the corresponding undelayed result strictly enlarges X, and otherwise remain unchanged. The counter shall be a live, separately owned, externally synchronized writable unsigned object. The argument, range and any distinct source value shall remain unchanged.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    Scalar stop points control the loss of individual difference bounds. Closing a relational representation can recover discarded information, so this extrapolation must remain distinct from a proven semantic widening.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    template <typename Iterator>
    void CC76_extrapolation_assign(const BD_Shape& y,
      Iterator first, Iterator last, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Compute exact primitive support bounds with independent rational elimination and select thresholds from mathematical ordered sets. Exercise strict changes, stable and unbounded bounds, exact hits, empty/duplicate ranges, pointer/vector/forward-list iterators, source/range ownership, all token states, self-aliasing, classified and lazy emptiness and dimension rejection. For rounded profiles check containment and defined outward assignment without assuming a canonical closure.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, Definition 2 and the following convergence discussion (PDF index 5). BagnaraHRZ05SCP | Section 7, widening with tokens (PDF index 29).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/cc76extrapolation1.cc.

  • PPL-SPEC-001121
    2. Default bounded-difference stop points UID: PPL-SPEC-001121 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    CC76_extrapolation_assign(y,tp) shall have the behavior of [LINK: PPL-SPEC-001120] with the ordered mathematical stop points  − 2,  − 1, 0, 1, 2, interpreted through the selected profile's outward bound operations. Stop points already exactly representable shall retain their values. A stop point below every admitted finite bound shall not create an extra restriction.

    The mathematical operand order, compatible dimensions, source preservation, aliases, empty/zero-dimensional cases and precision-sensitive token rule shall be those of 🔗 1. Threshold bounded-difference extrapolation and precision-sensitive tokens. A positive token counter shall retain the receiver's entry set and shall be decremented only for an undelayed strict enlargement. Sharing the default stop-point objects among calls shall not change represented results or token decisions.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    A fixed default threshold set makes the convenience overload predictable while retaining the same delay policy and relational convergence limits as the explicit overload.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void CC76_extrapolation_assign(const BD_Shape& y,
      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Compare against the independent five-stop transition model and the explicit overload. Include exact hits, changes beyond the last stop point, both unary directions, differences, repeated token use, null/zero counters, aliases, empty/lazy/zero-dimensional cases, selected integral/native profiles and required rounding-state preservation.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, Definition 2 and extrapolation versus widening (PDF index 5). BagnaraHRZ05SCP | Section 7, widening with tokens (PDF index 29).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/cc76extrapolation1.cc.

  • PPL-SPEC-001122
    3. Semantic bounded-difference widening UID: PPL-SPEC-001122 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With argument entry set Y contained in receiver entry set X, BHMZ05_widening_assign shall produce a bounded-difference set containing both. An empty argument, a singleton argument, or an increase of affine dimension from Y to X shall retain X.

    For equal positive affine dimension under unbounded exact arithmetic, the undelayed result shall be the semantic standard widening: choose a nonredundant bounded-difference inequality description of Y, retain the inequalities satisfied by all points of X, and conjoin them. Equivalent descriptions, redundant bounds, closure/reduction histories and choices of an irredundant basis shall not change the represented result. This shall not require a least widening or strict precision loss at every call. Supported rounded arithmetic shall preserve inclusion and the stated semantic and convergence obligations under 🔗 1. Bounded-difference values, numerical profiles and valid use.

    The token rule shall be the precision-sensitive rule of [LINK: PPL-SPEC-001120], using this operator's undelayed result. Self-aliasing shall retain the entry set and not consume a token.

    For a fixed dimension and profile, an ascending iteration shall first enclose the preceding widened result and the next input, then apply this operator with that enclosure as receiver and the preceding result as argument. Under its inclusion and arithmetic prerequisites, the represented results shall stabilize after finitely many strict changes. A finite initial token budget, without replenishment, shall preserve this guarantee.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    Removing redundant restrictions before testing stability prevents closure from defeating widening. The affine-dimension guard gives a semantic operation independent of a chosen graph basis.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void BHMZ05_widening_assign(const BD_Shape& y,
      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Build an irredundant description by independent halfspace implication, filter it by the current set and compare exact results by rational elimination. Include full-dimensional and affine sets, changing affine dimension, stable facets, redundancy/order/cache histories, all token outcomes, source preservation and aliases. Check upper-bound inclusions throughout representative ascending recurrences and inspect the finite-convergence argument separately.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2-3.3, Definition 3; Section 4.2, Definition 11, Theorem 2 and the explicit BDS extension (PDF indices 6-7 and 14). BagnaraHZ09FMSD | Appendix A.4, Proposition 1 (PDF index 38). BagnaraHRZ05SCP | Section 7, widening with tokens (PDF index 29).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/bhmz05widening1.cc.

  • PPL-SPEC-001123
    4. Limited semantic bounded-difference extrapolation UID: PPL-SPEC-001123 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Y ⊆ X, limited_BHMZ05_extrapolation_assign shall combine the semantic widening of 🔗 3. Semantic bounded-difference widening with selected limiting bounds.

    The limiting system shall have dimension at most the common operand dimension and contain no strict inequality; larger dimensions and any strict row shall throw std::invalid_argument before changing the receiver or token counter, including empty and zero-dimensional cases.

    For nonempty positive-dimensional exact-profile operands, selection shall use the entry receiver X. Recognized nonconstant rows shall be unary bounds or differences with opposite coefficients of equal magnitude. Normalize every recognized inequality outward in the selected coefficient profile. A recognized equality shall contribute both normalized opposite inequalities together only when both hold throughout X. A recognized inequality shall be selected when its normalized bound holds throughout X. Unsupported forms shall be ignored. Constant tautologies shall impose no restriction and false constants shall not be selected on a nonempty receiver.

    Let L be the bounded-difference conjunction of the selected normalized bounds. With rounded closure the eligibility test may use its sound outward profile bounds as in 🔗 1. Bounded-difference values, numerical profiles and valid use; selection shall remain sound for X. The original, unnormalized limiting constraints need not all hold in the result. Selected inequalities can be weaker after outward scalar normalization.

    Let W be the delayed or undelayed base widening result, with its token decision made before applying L. The result shall denote W∩L; it shall contain X and be contained in W. Positive available tokens shall therefore retain X, while their consumption shall follow the undelayed base widening rather than the final limited result.

    An empty previous argument, an empty receiver or zero-dimensional operands shall retain the receiver's entry set without consuming a token. A distinct argument and the supplied system shall retain their represented values; self-aliasing shall be admitted.

    A fixed finite limiting system, fixed dimension/profile, admitted exact comparisons and normalization, and a finite unreplenished token budget shall retain finite stabilization in the prescribed ascending recurrence. Arbitrarily replacing the limiting system shall carry no general convergence guarantee.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    Satisfied normalized limits can recover selected information after a widening without turning unsupported relational rows into undocumented facets.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void limited_BHMZ05_extrapolation_assign(const BD_Shape& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Independently select normalized recognized bounds, compute the base semantic widening and intersect both models. Cover scalings/signs, equalities selected as a pair, ignored general linear rows, exact/inexact scalar bounds, duplicate systems, finite-limit recurrences, tokens consumed before limiting, source ownership, empty/cache histories, strict rejection and incompatible dimensions.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2-3.3 and Section 4.2, semantic widening and its BDS extension (PDF indices 6-7 and 14). BagnaraHRZ05SCP | Section 7, tokens and widening up to a fixed finite constraint set (PDF indices 29-30).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/limitedbhmz05extrapolation1.cc; tests/BD_Shape/limitedcc76extrapolation1.cc.

  • PPL-SPEC-001124
    5. Bounded-difference narrowing and descending operand order UID: PPL-SPEC-001124 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let X be the receiver's entry set and Y the argument's entry set, with X ⊆ Y. CC76_narrowing_assign shall replace the receiver with a shape representing R, satisfying X ⊆ R ⊆ Y, preserving dimension and coordinate identities. An empty receiver shall stay empty, and zero-dimensional values and self-aliasing shall preserve their entry meanings.

    For nonempty operands under unbounded exact arithmetic, use the primitive unary/difference support bounds bX(v) and bY(v) defined in 🔗 1. Threshold bounded-difference extrapolation and precision-sensitive tokens. The result shall be the conjunction whose bound for v is bY(v) when that previous bound is finite, and otherwise bX(v). Thus a finite previous bound shall be retained even if the current bound is tighter; an infinite previous bound shall allow recovery of the current bound.

    Supported rounded profiles shall use their outward closed profile bounds while preserving both set inclusions. The result shall not be required to retain every improvement of the current iterate. For fixed dimension under unbounded exact arithmetic, descending iteration using each result as the next previous argument shall stabilize after finitely many strict changes: a strict narrowing step must introduce a previously absent finite primitive bound. Finite-carrier profiles shall retain stabilization under the same inclusion and arithmetic conditions.

    The order of receiver and argument shall follow the descending inclusion above, rather than the ascending inclusion used by widening. A distinct previous argument shall retain its represented value.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    Restoring a finite previous restriction and accepting a new restriction where the previous bound was infinite are different from simply intersecting the two operands. The descending operand order is part of the interface.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void CC76_narrowing_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Compute both complete primitive support tables independently and apply the finite-previous-bound rule. Verify current/result/previous inclusions, finite/unbounded directions, restored relational bounds, lower-dimensional sets, aliases, lazy emptiness, dimension rejection, exact and native/integral profiles. Check descending recurrences and inspect the finite-status-change proof independently of sample stabilization.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1-3.2, bounded-difference graph and shape semantics (PDF indices 5-6).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/cc76narrowing1.cc.

  • PPL-SPEC-001125
    6. Limited threshold bounded-difference extrapolation UID: PPL-SPEC-001125 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Y ⊆ X, limited_CC76_extrapolation_assign shall combine the default threshold extrapolation of 🔗 2. Default bounded-difference stop points with selected limiting bounds.

    The limiting system shall have dimension at most the common operand dimension and contain no strict inequality; larger dimensions and any strict row shall throw std::invalid_argument before changing the receiver or token counter, including empty and zero-dimensional cases.

    For nonempty positive-dimensional exact-profile operands, selection shall use the entry receiver X. Recognized nonconstant rows shall be unary bounds or differences with opposite coefficients of equal magnitude. Normalize every recognized inequality outward in the selected coefficient profile. A recognized equality shall contribute both normalized opposite inequalities together only when both hold throughout X. A recognized inequality shall be selected when its normalized bound holds throughout X. Unsupported forms shall be ignored. Constant tautologies shall impose no restriction and false constants shall not be selected on a nonempty receiver.

    Let L be the bounded-difference conjunction of the selected normalized bounds. With rounded closure the eligibility test may use its sound outward profile bounds as in 🔗 1. Bounded-difference values, numerical profiles and valid use; selection shall remain sound for X. The original, unnormalized limiting constraints need not all hold in the result. Selected inequalities can be weaker after outward scalar normalization.

    Let W be that default extrapolation, including its token decision before applying the limits. The result shall denote W∩L, containing X and contained in W. Positive tokens shall retain X and be consumed according to the undelayed base extrapolation, even if limiting would restore the lost information.

    An empty argument, an empty receiver or zero-dimensional operands shall retain the entry receiver set and counter. The supplied system and distinct argument shall retain their values; self-aliasing shall be admitted. This operation remains a relational extrapolation without a general finite-stabilization guarantee for arbitrary closed-shape iterations.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    The limiting construction has the same recognized descriptor fragment as limited semantic widening, but does not upgrade threshold graph extrapolation into a general widening.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void limited_CC76_extrapolation_assign(const BD_Shape& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Use the independent default-threshold model and normalized-limit selection, then compare the resulting intersection. Check unsupported constraints, scaled/equality limits, outward conversion, finite hits and rays, positive/zero/null counters, base-loss versus final-loss decisions, empty/cache histories, aliases, strict rows and dimension rejection.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1 and 3.3, graph extrapolation and limiting precision (PDF indices 5 and 7). BagnaraHRZ05SCP | Section 7, tokens and fixed limiting systems (PDF indices 29-30).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/limitedcc76extrapolation1.cc; tests/BD_Shape/cc76extrapolation1.cc.

  • 7. Polyhedral standard widening of bounded-difference values UID: PPL-SPEC-001126 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Y ⊆ X, H79_widening_assign shall compute the standard H79 widening of the closed polyhedra denoted by the entry operands and convert the result to the selected bounded-difference profile. The conversion shall follow 🔗 2. Complexity-sensitive bounded-difference conversion from polyhedra. widening_assign shall have the same mathematical result and token behavior.

    The result shall contain both entry sets. With exact representable arithmetic, the standard widening result for bounded-difference inputs shall retain its mathematical meaning. Supported rounded conversion shall be conservative under 🔗 1. Bounded-difference values, numerical profiles and valid use. On nonempty equal-affine-dimension operands, the standard polyhedral result shall be characterized by retaining from an irredundant inequality description of Y precisely the inequalities satisfied throughout X.

    The precision-sensitive token policy of 🔗 1. Threshold bounded-difference extrapolation and precision-sensitive tokens shall be applied to the intermediate polyhedral widening before conversion. A positive counter shall retain the receiver's entry set and decrease only for a strict undelayed widening enlargement. Empty previous arguments, self-aliasing and zero-dimensional values shall retain their usual upper-bound meanings.

    For fixed dimension/profile and a finite unreplenished initial token budget, the prescribed ascending recurrence shall stabilize under its mathematical inclusion and arithmetic prerequisites. Convergence shall not depend on a redundant source description or on when closure/export queries were performed. No least-widening or strict-progress requirement shall be inferred.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    The standard semantic widening is defined on represented polyhedra. Conversion back to a bounded-difference value must preserve its soundness and distinguish numerical abstraction from the widening decision.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void H79_widening_assign(const BD_Shape& y,
      unsigned* tp = nullptr);
    void widening_assign(const BD_Shape& y,
      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    For equal affine dimension independently form and filter an irredundant description. For affine-dimension changes independently construct current supporting faces of the previous set, test their emptiness and compute their exact affine dimensions to distinguish facets and equalities from smaller faces. Check exact rational results, numeric inclusions, the public alias, affine-dimension changes, empty/universe/lazy/zero-dimensional values, representations and source preservation. Exercise tokens and representative converging recurrences; inspect the semantic-convergence and conversion argument separately.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.2, closure under standard widening; Appendix A.4, Proposition 1 (PDF indices 6 and 38). BagnaraHRZ05SCP | Section 7, widening with tokens (PDF index 29).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/Polyhedron_widenings.cc; doc/definitions.dox (user-manual section BD_H79_Standard_Widening); tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/h79widening1.cc; tests/BD_Shape/closure1.cc.

  • PPL-SPEC-001127
    8. Polyhedral limited extrapolation of bounded-difference values UID: PPL-SPEC-001127 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Y ⊆ X, limited_H79_extrapolation_assign shall first interpret the entry sets as closed polyhedra, compute polyhedral limited H79 extrapolation using the supplied constraint system, and convert that result under 🔗 2. Complexity-sensitive bounded-difference conversion from polyhedra. The system dimension shall not exceed the common operand dimension and shall contain no strict row; invalid dimensions or strictness shall throw std::invalid_argument before changing receiver or counter, including empty and zero-dimensional cases.

    For nonempty positive-dimensional inputs, every supplied non-strict constraint satisfied by the entry receiver shall be eligible for the intermediate polyhedral intersection. General linear forms shall be admitted; selection shall not be restricted to unary and coordinate-difference rows. The intermediate result shall be the base H79 widening intersected with the selected constraints. Its token decision shall precede that intersection and follow 🔗 7. Polyhedral standard widening of bounded-difference values.

    The final bounded-difference result shall contain X. Facets outside the domain and outward scalar conversion may prevent that result from satisfying the original limiting constraints. For example, a selected two-variable sum can influence the intermediate polyhedron even though it is absent from the final template description.

    An empty previous argument, an empty receiver or zero-dimensional operands shall retain the receiver's entry set and counter. A distinct argument and the supplied system shall preserve their values, and self-aliasing shall be admitted. A fixed finite limiting system and finite unreplenished token budget shall preserve finite stabilization under the standard polyhedral widening's ascending recurrence and arithmetic prerequisites. Arbitrarily changing the limiting system shall carry no general convergence guarantee.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. All operands shall remain live and valid; the stated entry-set inclusion shall be a mathematical caller precondition. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver set or supplied token counter. A distinct argument shall preserve its represented value. Result storage shall remain independent of the source lifetime.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general rollback guarantee shall be required for such failures.

    RATIONALE:

    General limiting facets can affect the intermediate polyhedron before template abstraction. Treating them as ignored rows or demanding every facet survive conversion would give different contracts.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void limited_H79_extrapolation_assign(const BD_Shape& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Independently filter raw general halfspaces by exact implication, intersect them with the standard widening model and project every primitive bounded-difference support. Include a triangle from a non-difference sum limit, selected/rejected equalities, normalization/scaling, tokens consumed before limiting, fixed-limit recurrences, aliases, lazy emptiness, strict rejection, all dimension checks and exact versus outward numerical conversion.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.2 and Appendix A.4, standard widening semantics (PDF indices 6 and 38). BagnaraHRZ05SCP | Section 7, widening up to a fixed finite constraint set (PDF index 30).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/Polyhedron_widenings.cc; doc/definitions.dox (user-manual section BD_H79_Standard_Widening); tests/bdshapeconvergencespec1.cc; tests/bdshapeconvergenceoracle.hh; tests/bdshapeconvergencefailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapeconvergencepublic1.cc; tests/BD_Shape/limitedh79extrapolation1.cc; tests/BD_Shape/limitedcc76extrapolation1.cc.

  • PPL-SPEC-001072
    1. Closed bounded-difference support hull of geometric generators UID: PPL-SPEC-001072 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(gs) shall give the least target-profile bounded-difference enclosure of the convex set generated by gs. The constructor shall close finite excluded boundaries: points and closure points shall both contribute their actual rational coordinates to support extrema. A ray shall make a normal unbounded exactly when its scalar product with that normal is positive; a line shall do so when that scalar product is nonzero. A zero directional product shall not remove a finite bound.

    An empty generator system shall construct empty in its declared dimension. A nonempty generator system shall contain an ordinary point; otherwise the constructor shall throw std::invalid_argument. Rational point and closure-point divisors, zero trailing coordinates and the distinction between rays and lines shall retain the meanings in 🔗 1. Generator kinds and numerical prerequisites and [LINK: PPL-SPEC-000182].

    For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.

    The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].

    Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.

    RATIONALE:

    A closed relational enclosure depends on support in every admitted normal, including differences; separate coordinate bounds do not determine that enclosure after numerical rounding.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    explicit BD_Shape(const Generator_System& gs);
    
    VERIFICATION_CRITERIA:

    Compute rational support directly from raw point and closure-point coordinates and direction signs. Check every unary/difference bound and independently computed affine dimension, empty and zero dimensions, fractional divisors, repeated extrema, missing trailing coordinates and invalid point-free systems. Exercise admitted integer and native target profiles with independent outward-bound models. Check literal support entries for dense and sparse systems at dimensions 0, 1, 2, 63, 64, 65 and 128, including implicit zero tails, dyadic coordinates, origin and fully populated points, closure-first updates and repeated points. Exercise exact, integral and native boundaries, source lifetime independence and unchanged native floating state. Bound additional C++ allocation against independently constructed matrix storage, including value-returning coefficient traits, and sweep observed allocation failures after numeric-pool warmup; require incomplete-result cleanup and unchanged source values. Compare every stored support bound for positive and negative first, middle and last coordinate lines and rays, zero-coordinate rows, equal/opposite pairs and fixed nonzero point coordinates in dense and sparse storage. Exercise exact, integral and native boundaries and require finite bounds for zero directional products. Retain the selected coefficient profile's admitted arithmetic and failure behavior.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/fromgensys1.cc; tests/BD_Shape/dimensionlimits1.cc. tests/generatorconstructionfixture.hh; tests/generatorconstructionallocationsspec1.cc.

  • 2. Complexity-sensitive bounded-difference conversion from polyhedra UID: PPL-SPEC-001073 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(ph,complexity) shall contain the source polyhedron for ANY_COMPLEXITY, SIMPLEX_COMPLEXITY and POLYNOMIAL_COMPLEXITY. The default shall be ANY_COMPLEXITY; other complexity codes shall be outside the admitted interface.

    ANY_COMPLEXITY shall give the least target-profile bounded-difference enclosure, including exact detection of an empty source. Strict source boundaries shall become included whenever they determine finite limiting bounds of the closed result.

    SIMPLEX_COMPLEXITY shall give the same exact primitive suprema for a nonempty source, with target bounds converted outward according to the selected profile. It need not detect an empty not necessarily closed system whose closed relaxation is nonempty. A more precise result obtained from an already available generator representation shall also be admitted.

    POLYNOMIAL_COMPLEXITY may use conservative bounded-difference extraction and propagation from source constraints. It shall preserve containment, without a general best-enclosure, exact-emptiness or particular fixed-point iteration guarantee. Equivalent source cache and representation histories may produce different allowed conservative results. Every option shall respect its declared algorithmic complexity bound.

    The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].

    Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.

    RATIONALE:

    Optimal support projection and polynomial conservative extraction offer different precision contracts; closing a nonempty strict polyhedron preserves its finite support suprema.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    explicit BD_Shape(const Polyhedron& ph,
                      Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use exact rational elimination of independently supplied closed/NNC halfspaces. Require the best closed difference hull for ANY, best primitive bounds for nonempty SIMPLEX sources, and source containment for POLYNOMIAL. Include strict endpoint limits, closed-relaxation-only feasibility, cache and representation histories, all three complexity codes, target profiles, independent affine dimension and const-source preservation.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/frompolyhedron1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001074
    3. Best bounded-difference enclosure of Cartesian boxes UID: PPL-SPEC-001074 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(box,complexity) shall give the least target-profile bounded-difference enclosure containing the Cartesian product represented by box. The result shall be closed: a finite open interval endpoint may determine an included limiting bound.

    The exact supremum of a difference xi − xj shall combine the source upper endpoint of coordinate i and lower endpoint of coordinate j before target-profile rounding. An unbounded contributing endpoint shall leave that normal unrestricted. Empty factors shall give empty in the original ambient dimension. The complexity argument shall be ignored for the three declared complexity values.

    For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.

    The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].

    Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.

    RATIONALE:

    Cartesian independence determines exact difference support, which is converted according to the target numerical profile.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    template <typename Interval>
    explicit BD_Shape(const Box<Interval>& box,
                      Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Compute support from independently specified coordinate intervals, including open, unbounded, singleton and empty factors. Check pairwise differences before rounding, all three complexity arguments, both zero-dimensional values, source independence and output affine dimension. Use rational source intervals and supported target profiles.

    SOURCE:

    src/Shape_Conversion_Support.hh; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/frombox1.cc; tests/BD_Shape/dimensionlimits1.cc; tests/BD_Shape/supportconversion1.cc.

  • PPL-SPEC-001075
    4. Best bounded-difference enclosure of rational grids UID: PPL-SPEC-001075 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(grid,complexity) shall give the least target-profile bounded-difference enclosure of the entire rational grid. It shall preserve every fixed unary or difference affine value, including values implied by the full congruence system. Equivalent source descriptions shall give mathematically equivalent results in the same target profile.

    A supported normal shall have a finite bound exactly when it annihilates every real line, integer parameter and difference between source base points. In that case its value shall equal its value at any source base point, and both signed bounds shall be converted to the target profile. A nonzero response to an integer parameter shall make the normal unbounded in both directions; a periodic restriction shall not become a finite interval or an integer-only coordinate carrier. Empty grids shall remain empty. The complexity argument shall be ignored for the three declared complexity values.

    For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.

    The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].

    Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.

    RATIONALE:

    Finite support is determined by the whole affine geometry of a grid. Integer and real unbounded displacements constrain finite support in the same way; periodicity alone does not supply a finite bound.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    explicit BD_Shape(const Grid& grid,
                      Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use raw rational base points, integer parameters and real lines to compute constant or unbounded response for each primitive normal. Include fixed differences, singleton fractions, proper periodic directions, empty/zero dimensions, equivalent congruence/generator descriptions and cache histories, independent output affine dimension and target-profile rounding.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9-10, zero-based). BagnaraDHMZ07 | Section 3, The Generator Representation (PDF page index 7, zero-based).

    SOURCE:

    src/Shape_Conversion_Support.hh; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/fromgrid1.cc; tests/BD_Shape/dimensionlimits1.cc; tests/BD_Shape/supportconversion1.cc.

  • PPL-SPEC-001076
    5. Best bounded-difference enclosure of octagonal shapes UID: PPL-SPEC-001076 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(os,complexity) shall give the least target-profile bounded-difference enclosure of the set represented by octagon. Unary and difference suprema shall include consequences of signed-sum constraints and their combinations. Nonempty source sets shall not lose an admitted supported relation through a change in source description or normalization history.

    The constructor shall preserve empty and zero-dimensional meanings and shall convert finite bounds outward to the target profile. The source and target numerical profiles may differ. The complexity argument shall be ignored for the three declared complexity values.

    For each supported unary or difference normal, a finite source supremum shall yield the least bound representable by the target profile that is no smaller than that supremum. An unbounded source normal shall impose no finite restriction. Consequently an unbounded exact rational target shall give the least closed bounded-difference enclosure. A rounded profile shall give the least enclosure expressible with its admitted bounds.

    The result shall inherit the source's ambient dimension and own its storage independently of the source, as in 🔗 3. Owned bounded-difference copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented value. Later source mutation or destruction shall not affect the result.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in [LINK: PPL-SPEC-001057].

    Source objects shall be live, valid and synchronized throughout the call. The source-domain arithmetic and target numerical profile shall satisfy their range, rounding, resource and initialization prerequisites. The supported profile and runtime conditions in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply, including the required initialized native floating environment. Underlying numerical or allocation failures may propagate. Failure during construction shall release resources owned by the incomplete result; no general source-cache rollback guarantee shall be inferred.

    RATIONALE:

    The bounded-difference hull of an octagon depends on all source signed forms, including restrictions exposed only by their combined consequences.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    template <typename U>
    explicit BD_Shape(const Octagonal_Shape<U>& os,
                      Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Compute all target-normal extrema by independent rational elimination of raw octagonal rows. Include each signed-sum orientation, unary halves, correlated faces, strict containment of a source octagon by its hull, empty/zero dimensions, source and target profile changes, cache histories and independent output affine dimension.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1 and 4, bounded-difference and octagonal forms and closure.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeconversionsspec1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeconversionspublic1.cc; tests/BD_Shape/fromoctagonalshape1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001102
    1. Unrestricted bounded-difference coordinate extension UID: PPL-SPEC-001102 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_space_dimensions_and_embed(m) shall change an entry value X ⊆ ℝn into exactly X×ℝm in dimension n + m. Original coordinates shall keep their indices and relationships. The fresh coordinates shall have indices n, …, n + m − 1 and be unrestricted; no fresh-to-original or fresh-to-fresh equality shall be imposed. Empty input shall remain empty in the new ambient dimension. Zero-dimensional universe shall extend to universe. Adding zero coordinates shall preserve the value.

    A requested final dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix. The rejection shall include counts whose mathematical sum with the current dimension exceeds the range of dimension_type; arithmetic wraparound shall not turn an excessive extension into a successful smaller one.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    A rejected dimension request shall preserve the represented entry set and ambient dimension.

    RATIONALE:

    Unrestricted extension is an ordered Cartesian product with free axes, distinct from adjoining zero-valued coordinates.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void add_space_dimensions_and_embed(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare independently lifted input halfspaces with all fresh coefficients zero. Include zero/one/multiple fresh coordinates, coupled old coordinates, empty/universe and both zero-dimensional values, cache histories, supported profiles, zero-count identity and oversized-count rejection. Check reduced and unreduced histories, repeated embedding, cached-record reload, independent lifted rows and resource failures during cache extension.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/addspacedims1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001103
    2. Zero-fixed bounded-difference coordinate extension UID: PPL-SPEC-001103 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_space_dimensions_and_project(m) shall change an entry value X ⊆ ℝn into exactly X×{0}m in dimension n + m. Original coordinates shall keep their indices and relationships. Every fresh coordinate, with index n, …, n + m − 1, shall equal zero. Empty input shall remain empty in the new dimension; zero-dimensional universe shall extend to the origin. Adding zero coordinates shall preserve the value.

    A requested final dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix. The rejection shall include a mathematical sum outside dimension_type's range, without accepting its wrapped value.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    A rejected dimension request shall preserve the represented entry set and ambient dimension.

    RATIONALE:

    Zero-fixed extension preserves the old set while adding a distinguished origin in the new coordinates.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void add_space_dimensions_and_project(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Adjoin independent zero equations to lifted halfspaces; verify all unary and difference supports, old/fresh coupling, multiple zeros, empty and zero-dimensional cases, zero-count identity, cache histories and oversized-count rejection.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/addspacedims1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001104
    3. Ordered Cartesian concatenation of bounded-difference values UID: PPL-SPEC-001104 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    concatenate_assign(other) shall replace an entry value X ⊆ ℝn with exactly X×Y ⊆ ℝn + m, where Y ⊆ ℝm is other's entry value. The first n coordinates shall belong to X, followed by Y's coordinates in their original order. Cross-block consequences shall follow from Cartesian independence, rather than identifying coordinates with equal indices in the two operands.

    An empty operand shall give empty in dimension n + m. Zero-dimensional universe shall be an identity on either side; zero-dimensional empty shall be an annihilator while retaining the sum dimension. Self concatenation shall use two independent copies of the entry value. A requested sum dimension above max_space_dimension() shall throw std::length_error.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. A distinct other shall retain its represented entry value; logically const cache normalization may change its storage. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Concatenation composes independently chosen valuations in a fixed coordinate order, including when the two source references coincide.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void concatenate_assign(const BD_Shape& other);
    
    VERIFICATION_CRITERIA:

    Compare disjointly lifted operand halfspaces, mixed dimensions, both zero-dimensional values, all empty positions, coupled operands, cross-block supports, repeated composition and self concatenation. Check a distinct right operand remains equivalent to its entry value and verify the dimension limit.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/concatenate1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • 4. Existential bounded-difference coordinate removal UID: PPL-SPEC-001105 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_space_dimensions(vars) shall existentially remove exactly the entry coordinates in vars. Remaining coordinates shall be compacted in ascending original-index order. remove_higher_space_dimensions(k) shall existentially remove the suffix with indices k, …, n − 1, retaining the original prefix order. Removal shall retain all implied relations among survivors, including relations whose proof uses removed coordinates.

    With exact computational arithmetic, both operations shall give the exact existential projection, which is bounded-difference representable. Rounded computational profiles shall give a sound projection with the closure precision admitted by 🔗 1. Bounded-difference values, numerical profiles and valid use. Removing no coordinates shall preserve the entry value; removing every coordinate shall give zero-dimensional universe exactly when the entry value is nonempty, otherwise zero-dimensional empty. Empty inputs shall retain emptiness in the reduced dimension.

    An element of vars outside the entry dimension, or k greater than that dimension, shall throw std::invalid_argument. Empty selections and a suffix length of zero shall also apply to zero-dimensional values.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. The supplied Variables_Set shall retain its own valid-use contract and shall remain unchanged. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Projection must preserve paths and equalities through eliminated coordinates, rather than simply deleting their explicitly stored restrictions.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void remove_space_dimensions(const Variables_Set& vars);
    void remove_higher_space_dimensions(dimension_type k);
    
    VERIFICATION_CRITERIA:

    Eliminate selected columns from raw rational halfspaces independently, compact survivors and compare all primitive supports. Include nonadjacent selections, implied surviving relations, equalities, all/none removal, empty/lazy-empty and universe, cached/uncached descriptions, repeated removal and invalid dimensions.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/removespacedims1.cc; tests/BD_Shape/addspacedims1.cc.

  • PPL-SPEC-001106
    5. Injective partial remapping of bounded-difference coordinates UID: PPL-SPEC-001106 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    map_space_dimensions(mapping) shall existentially discard every entry coordinate outside the mapping domain and place each surviving coordinate i at target index f(i). For a positive-dimensional receiver, the admitted mapping shall be a partial injection from the entry indices 0, …, n − 1, with image exactly 0, …, m − 1 for some m ≤ n. The result shall have dimension m; an empty mapping shall project to the zero-dimensional value.

    With exact computational arithmetic, the result shall equal the projected and relabeled entry set. Rounded profiles shall retain the projection precision of 🔗 4. Existential bounded-difference coordinate removal. Empty and universe values shall retain those meanings in the mapped dimension. An identity mapping shall preserve the value; a permutation shall retain all renamed relations.

    The mapping type shall supply logically const has_empty_codomain(), max_in_codomain() and maps(i,j) queries with the meanings of [LINK: PPL-SPEC-000004], 🔗 5. Exact empty-codomain query and 🔗 6. Largest image and defined empty-map failure. A zero-dimensional input shall remain unchanged and require no mapping query; mapping-value restrictions shall apply only to positive-dimensional receivers. Otherwise has_empty_codomain() shall be queried first; when true, neither remaining query shall be called. When false, the maximum shall be queried before mappings are consumed. Queries shall describe one stable mapping throughout the call. No specific number or order of individual maps queries shall be required. Violating injectivity, source bounds, contiguous image or query consistency shall be outside the admitted interface.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. The supplied mapping shall remain live and describe a stable partial function. Exceptions escaping its queries shall propagate. After a query exception, destruction shall release owned storage, and assigning a complete valid value to the destination shall be supported before further geometric use. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Mapping combines existential projection with a permutation; its query protocol also permits lightweight user-supplied mapping objects.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    template <typename Partial_Function>
    void map_space_dimensions(const Partial_Function& mapping);
    

    The admitted Partial_Function type shall provide these const queries:

    bool has_empty_codomain() const;
    dimension_type max_in_codomain() const;
    bool maps(dimension_type source, dimension_type& target) const;
    
    VERIFICATION_CRITERIA:

    Independently eliminate and permute coordinates for every small contiguous-image injection, including nonadjacent domains, permutations, empty and identity maps, implied relations, empty/zero-dimensional and cached values. Use a custom query recorder to verify mandatory ordering and forbidden queries after an empty answer, and check source mapping preservation. Check verified identity maps without temporary C++ allocation, unchanged cached representations and owned capacity after copying and grow/shrink histories. Compare first/last/middle swaps, reversal, cycles and projections against literal coordinate oracles; preserve floating-point mode/flags. Inject every mapping-query exception and check propagation, safe replacement and temporary cleanup.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/mapspacedims1.cc. tests/coordinatemappingfixture.hh;

  • PPL-SPEC-001107
    6. Bounded-difference coordinate expansion by independent fibers UID: PPL-SPEC-001107 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an existing coordinate v < n, expand_space_dimension(var,m) shall append m coordinates in positions n, …, n + m − 1 and retain original coordinate positions. Let X ⊆ ℝn be the entry set and let u[v ← a] denote replacing coordinate v of the old-coordinate prefix of u by a. The declared bounded-difference result shall be the independent-fiber relation

    {u ∈ ℝn + m  ∣ (u0, …, un − 1) ∈ X ∧n + m − 1⋀j = nu[v ← uj] ∈ X}.

    Thus every replica shall reproduce the selected coordinate's restrictions against retained original coordinates. Neither equality with the original selected coordinate nor equality among replicas shall be imposed unless implied by those restrictions. This result shall contain the generic common-replica coordinate-expansion relation of 🔗 2. Concatenation, coordinate expansion and folding. Each new coordinate shall have independently owned storage.

    The relation above is itself bounded-difference representable. Exact copying of admitted entry bounds shall preserve it; any delegated computational rounding shall retain the supported numerical guarantees of [LINK: PPL-SPEC-001056]. Empty input shall remain empty. Adding zero replicas shall preserve the value after checking that var is an existing coordinate. An invalid coordinate shall throw std::invalid_argument even for zero replicas or empty input. A final dimension above max_space_dimension() shall throw std::length_error.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. The supplied Variable shall retain its own valid-use contract. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Independent fibers preserve relationships with retained coordinates while allowing distinct choices for the original selected coordinate and its replicas.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void expand_space_dimension(Variable var, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Generate each replica relation by independently substituting its coordinate into source halfspaces. Check all primitive supports and common-replica containment separately, multiple replicas with distinct values, source/retained correlations, forced equalities, empty/universe, zero replicas and invalid/oversized requests.

    BIBLIOGRAPHY:

    GopanDMDRS04 | Sections 4.3 and 4.5, expansion and weakly relational implementation (author PDF page indices 7-9, zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/expandspacedim1.cc; tests/BD_Shape/dimensioncontracts1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001108
    7. Alternative-coordinate folding of bounded-difference values UID: PPL-SPEC-001108 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    fold_space_dimensions(vars,dest) shall combine the alternatives obtained by keeping the original destination value or replacing it by the value of any entry coordinate in vars, then remove every folded coordinate. Surviving indices, including the destination's new index, shall be compacted in ascending original order. Other surviving coordinates shall keep their entry meanings within each alternative.

    With exact computational arithmetic, the result shall be the least bounded-difference enclosure of that union of alternatives. In particular, its unary and difference bounds shall be the corresponding suprema over all alternatives. Rounded profiles shall retain a sound enclosure and their admitted closure and numerical precision under 🔗 1. Bounded-difference values, numerical profiles and valid use. The union need not be convex or itself bounded-difference representable. Empty input shall remain empty in the reduced dimension. Empty vars shall preserve the value after validating the destination coordinate.

    The destination and every folded coordinate shall be inside the entry space, and the destination shall not belong to vars. An invalid coordinate or selection containing the destination shall throw std::invalid_argument. The Variables_Set selection shall remain unchanged.

    The supported coefficient profiles, real-set interpretation, initialized runtime, numerical-intermediate, FPU, resource and synchronization conditions of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. The supplied Variable and Variables_Set shall retain their own valid-use contracts. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Folding joins alternative destination values and then projects away source axes; it is neither simultaneous equality nor an injective renaming.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::BD_Shape<T>:

    void fold_space_dimensions(const Variables_Set& vars, Variable dest);
    
    VERIFICATION_CRITERIA:

    Project each destination-substitution alternative independently and maximize each supported normal over the alternatives. Include multiple folded coordinates, destination before/between/after removed indices, coupled/empty/universe and zero selections, representation histories, rounded profiles and all invalid selections.

    BIBLIOGRAPHY:

    GopanDMDRS04 | Sections 4.2 and 4.5, folding and weakly relational implementation (author PDF page indices 6-9, zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateoracle.hh; tests/bdshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/bdshapecoordinatespublic1.cc; tests/BD_Shape/foldspacedims1.cc; tests/BD_Shape/expandspacedim1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001655
    8. Extension of bounded-difference redundancy bitmaps UID: PPL-SPEC-001655 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Implementation::extend_bd_redundancy shall require a live valid square Bit_Matrix with n rows and new_rows representing N ≥ n in dimension_type. For an extent supported by the matrix row and bit-index types, it shall return true, set both dimensions to N, preserve each entry (i, j) with i, j < n, and set every other entry to one. A one bit denotes a redundant bound. No coefficient arithmetic shall be performed. An unsupported extent shall return false without changing the bitmap.

    Allocation failures may propagate and leave a partially extended bitmap; owned resources shall remain safely destructible, without a rollback or valid-cache guarantee. The caller shall clear the reduction certificate before a potentially failing extension and restore it only on success. Initialization, lifetime and synchronized access shall follow the bitmap and bounded-difference value contracts.

    RATIONALE:

    Free coordinate extension adds isolated graph vertices. Every newly introduced bound is infinite and redundant, while the old selected basis continues to represent exactly the original restrictions.

    INTERFACE:

    Internal source header: BD_Shape_templates.hh; namespace Parma_Polyhedra_Library::Implementation:

    bool extend_bd_redundancy(Bit_Matrix& redundancy,
                              dimension_type new_rows);
    
    VERIFICATION_CRITERIA:

    Compare arbitrary old bit patterns and all newly introduced entries across zero sizes, unchanged extents and bit-word boundaries. Check unsupported extent rejection with unchanged input, public free embedding with cached and uncached histories, reloadable representations and allocation failure ownership.

    SOURCE:

    src/BD_Shape_templates.hh; tests/bdshapecoordinatesspec1.cc; tests/bdshapecoordinateallocationsspec1.cc.

  • 1. Rectilinear distance of bounded-difference closed-bound tables UID: PPL-SPEC-001142 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 4. Bounded-difference distance normalization, boundaries and workspaces, the three rectilinear_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For finite corresponding differences, the exact distance shall be ∑i ≠ jdij, with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001145].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 17. Rectilinear distance between bound-entry arrays.

    RATIONALE:

    The sum of absolute corresponding bound changes compares the selected graph-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute primitive suprema independently from rational conjunctions and compare all three overload forms with exact bound-array norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For rectilinear results compare the independent sum of absolute entry differences, including translated operands and differently signed entries.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/bdshapedistancespec1.cc; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapedistancepublic1.cc; tests/shapemetricboundaries1.cc.

  • 2. Euclidean distance of bounded-difference closed-bound tables UID: PPL-SPEC-001143 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 4. Bounded-difference distance normalization, boundaries and workspaces, the three euclidean_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For finite corresponding differences, the exact distance shall be √(∑i ≠ jd 2ij), with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001145].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 18. Euclidean distance between bound-entry arrays.

    Rational square-root enclosure shall retain 🔗 2. Finite rational square root at the selected irrational precision and the calling precision of 🔗 3. Selection and ownership of irrational rational precision, which shall remain stable throughout the dependent call.

    RATIONALE:

    The square root of the sum of squared bound changes compares the selected graph-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute primitive suprema independently from rational conjunctions and compare all three overload forms with exact bound-array norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For Euclidean results compare exact rational squares and test rational precision, rather than using a rounded reference square root.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/bdshapedistancespec1.cc; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapedistancepublic1.cc; tests/shapemetricboundaries1.cc.

  • 3. Maximum-coordinate distance of bounded-difference closed-bound tables UID: PPL-SPEC-001144 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 4. Bounded-difference distance normalization, boundaries and workspaces, the three l_infinity_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For finite corresponding differences, the exact distance shall be maxi ≠ jdij, with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001145].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 19. Maximum-coordinate distance between bound-entry arrays.

    RATIONALE:

    The largest absolute corresponding bound change compares the selected graph-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute primitive suprema independently from rational conjunctions and compare all three overload forms with exact bound-array norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For maximum-coordinate results identify the exact greatest absolute entry difference independently and exercise both first and later maximum updates.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/bdshapedistancespec1.cc; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapedistancepublic1.cc; tests/shapemetricboundaries1.cc.

  • 4. Bounded-difference distance normalization, boundaries and workspaces UID: PPL-SPEC-001145 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty shape of ambient dimension n, let z0 = 0 and zi = xi − 1 for 1 ≤ i ≤ n. Position (i, j) of its square bound table shall describe zj − zi ≤ bij. A positive-infinite bound shall impose no restriction. Distance tuples shall include every ordered off-diagonal position. Matching positive-infinite diagonal sentinels shall contribute zero.

    The selected tables shall be those used after the call's required shortest-path normalization. When closure arithmetic is exact under its range prerequisites, finite entries shall be the primitive suprema of the represented set, with infinity for unbounded forms. Rounded or saturating closure shall retain 🔗 1. Bounded-difference values, numerical profiles and valid use; its tables need not be canonical, idempotent or invariant across alternative source descriptions. The distance shall be computed from the selected tables, as retained in compatible post-call records of 🔗 2. Reloadable bounded-difference record export, rather than being a point-set or Hausdorff distance. Normalization shall preserve each source's represented set and ambient dimension.

    Different ambient dimensions shall return false before modifying the result or supplied workspaces. False shall assign no distance for that incompatible pair. Dimension-compatible two-empty shapes shall have distance zero; exactly one empty shape shall have positive-infinite distance. In dimension zero, two universe shapes shall also have distance zero. These rules shall apply to logically empty sources whose emptiness has not yet been classified. Equal dimensions shall return true on successful numerical completion, with the value specified by 🔗 1. Rectilinear distance of bounded-difference closed-bound tables, [LINK: PPL-SPEC-001143] or 🔗 3. Maximum-coordinate distance of bounded-difference closed-bound tables.

    The overload without an explicit temporary type shall use three Checked_Number<To,Extended_Number_Policy> workspaces. The overload with an explicit scalar Temp argument shall instead use three Checked_Number<Temp,Extended_Number_Policy> workspaces. The supplied-workspace overload shall use the actual type of its three references, which may be an admitted raw or checked numeric type. The supported operation, rounding, representation and overlap conditions of 🔗 20. Distance scratch storage, admissible overlaps and numeric conditions shall apply to the selected metric specializations, subject to the public source-storage condition below.

    Calls evaluating finite entry differences shall use ROUND_DOWN or ROUND_UP, optionally combined with ROUND_STRICT_RELATION. They shall not require finite source conversions to be exact merely to establish the requested directed bound. Paths performing only exact zero or positive-infinity assignments shall admit directions valid for those selected scalar assignments. An output profile shall support positive infinity whenever that outcome is reachable. Every conversion, difference, sum, square, square root and final assignment shall satisfy its selected backend's arithmetic, range, numerical-failure, resource, initialization and nontrapping prerequisites. Native arithmetic shall retain configured support and the initialized caller-owned FPU conditions; the call shall preserve caller rounding. Rational square-root precision shall remain stable throughout a dependent call.

    Sources shall be live valid objects under 🔗 1. Bounded-difference values, numerical profiles and valid use. The same shape may be supplied for both operands. The three mutable supplied workspaces shall be live, pairwise distinct, and disjoint from source-owned storage. Their entry values need not be initialized when overwritten before reading. The result shall have live assignable storage disjoint from source-owned storage, but may overlap any one supplied workspace or its compatible underlying raw storage. When the result overlaps a workspace, its mathematical value shall still use source values on entry. No workspace entry value shall be required when overwritten before reading. Callers shall preserve object/storage lifetimes and synchronize source access, including logically const cache updates.

    Numerical and recoverable resource failures shall retain their selected propagation channels and permitted partial result/workspace states; no aggregate rollback guarantee shall be inferred. Discarded owned temporaries shall be released, while reusable numerical cache storage shall retain its own lifetime and cleanup contract. Ordinary dimension mismatch shall retain the stronger unchanged-output/workspace guarantee above. Otherwise valid calls shall require no additional library initialization beyond their selected representation, numerical and thread runtime prerequisites.

    RATIONALE:

    A bound-array metric needs an explicit normalization convention, source carrier and numeric protocol. Exact semantic support tuples and rounded representation tuples have different invariance properties, while their empty/dimension outcomes and storage obligations remain explicit.

    INTERFACE:

    Public header: <ppl.hh>. This protocol applies to all nine free function overloads declared in 🔗 1. Rectilinear distance of bounded-difference closed-bound tables, 🔗 2. Euclidean distance of bounded-difference closed-bound tables and 🔗 3. Maximum-coordinate distance of bounded-difference closed-bound tables, in Parma_Polyhedra_Library. Their result, shape, rounding and optional three-workspace parameters retain those exact signatures.

    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const BD_Shape<T>& x, const BD_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Verify independent rational support closure, rounded selected-table norms and before/after denotation equality separately. Cover all nine forms, cold/classified/reduced histories, lazy emptiness, zero dimensions, one-sided infinities, mismatched dimensions and unchanged sentinels. Test same-owner inputs, result aliases to each raw/checked workspace, different temporary/result profiles, required initialized native modes and caller-mode preservation. Measure and exercise meaningful allocation/cleanup paths, distinguishing C++ new/new[] observation from backend GMP allocation failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, difference constraints, unary zero-node encoding and transitive closure (PDF page index 5, zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/bdshapedistancespec1.cc; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/bdshapedistancepublic1.cc; tests/shapemetricboundaries1.cc; tests/bdshapedistancefailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001128
    1. Bounded-difference time evolution by nonnegative rates UID: PPL-SPEC-001128 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let X be the receiver's entry set and Y the rate argument's entry set, of the same ambient dimension n. time_elapse_assign shall replace the receiver by the least bounded-difference enclosure in the selected target profile of

    E(X, Y) = {p + λq ∣ p ∈ X,  q ∈ Y,  λ ≥ 0}.

    The abstraction and outward profile conversion shall have the meaning and arithmetic prerequisites of 🔗 2. Complexity-sensitive bounded-difference conversion from polyhedra. The carrier shall remain real even when the stored bounds are integers. A nonempty zero-dimensional pair shall remain the nonempty zero-dimensional value. Either empty operand shall make the result empty: a rate witness is required even at zero elapsed time. These meanings shall not depend on whether emptiness was already classified.

    For nonempty operands under exact rational arithmetic, each unary or difference normal v shall retain the entry support supp ∈ Xv⋅p precisely when supq ∈ Yv⋅q ≤ 0; a positive or unbounded rate support shall make that result direction unbounded. Already unbounded state supports shall remain unbounded. Different coordinates shall share the same elapsed time; their correlations may be lost only by the stated bounded-difference abstraction.

    Self-aliasing shall use both entry values. A distinct rate shape shall remain unchanged. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver or rate value.

    The rate argument shall remain live and valid. A distinct rate argument shall preserve its represented value, and result storage shall remain independent of its lifetime.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    A rate set controls directions of unbounded evolution; zero elapsed time preserves states only when a rate witness exists. Primitive support bounds distinguish rate direction from independent coordinate translation.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void time_elapse_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Independently project exact rational state and rate supports and derive each retained or infinite result bound. Cross-check a homogenized common-time model on correlated examples. Exercise all rate signs, zero rates, lines, rays, fractional states, empty and lazy-empty operands, dimension zero, self-aliases, cache histories, profile conversions, source preservation and dimension rejection. Inject allocation failures in a separate executable.

    BIBLIOGRAPHY:

    HalbwachsPR97 | Sections 4.3.1–4.3.2, time-elapse operator; PDF page index 20 (zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; src/Polyhedron_public.cc; tests/BD_Shape/timeelapse1.cc.

  • 2. Integer-point restriction on every bounded-difference coordinate UID: PPL-SPEC-001129 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the receiver's entry set X ⊆ ℝn, drop_some_non_integer_points(complexity) shall produce a bounded-difference set R satisfying

    X∩ℤn ⊆ R ⊆ X.

    The ambient dimension shall be preserved. An empty receiver shall remain empty, including an unclassified inconsistent system. Zero-dimensional empty and nonempty values shall retain their distinct meanings. Selected complexity classes shall bound permitted algorithmic work without changing which integer points must be preserved.

    The result may retain noninteger points. No least-integer-hull, strict precision improvement or removal of every fractional point shall be required. Integer storage of bounds shall not change the represented real carrier. An exact rational description with integral unary and difference bounds already equals the convex hull of its integer points and shall therefore retain its represented set under these inclusions.

    Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Integer restriction may improve a real convex abstraction while preserving every integer solution. Integral difference inequalities already define an integral polyhedron, so real interior points can remain.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void drop_some_non_integer_points(
        Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Enumerate all integer candidates in independently bounded rational examples and verify their preservation; independently verify result inclusion in the entry halfspaces. Include fractional fixed points, negative and nonadjacent differences, affine equality fibers, unbounded integral rays, cache histories, zero dimensions, all supported complexity choices and admitted exact/inexact profiles. Do not treat an identity result as a failure without a stronger stated guarantee.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; tests/BD_Shape/dropsomenonintegerpoints1.cc.

  • PPL-SPEC-001130
    3. Selected-coordinate integer restriction of bounded-difference values UID: PPL-SPEC-001130 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let S be the coordinates named by vars and X the receiver's entry set. drop_some_non_integer_points(vars,complexity) shall produce a bounded-difference set R with the same ambient dimension such that

    {p ∈ X ∣ pi ∈ ℤ for every i ∈ S} ⊆ R ⊆ X.

    Unselected coordinates shall retain their real interpretation. Their bounds may tighten through relations with selected coordinates; their fractional values shall not be discarded solely for being noninteger. An empty selection shall preserve the entry set. Empty, lazy-empty and zero-dimensional meanings shall be preserved. The global overload of 🔗 2. Integer-point restriction on every bounded-difference coordinate shall have the meaning of selecting every coordinate. All admitted complexity choices shall retain this preservation obligation; no least-hull or mandatory strict improvement shall be inferred.

    Every selected coordinate shall be within the receiver dimension. An excess coordinate shall throw std::invalid_argument before represented-set modification, including for empty receivers and integral-bound profiles. The valid-use conditions of 🔗 1. Public coordinate-index set and value lifecycle shall govern the selection.

    Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites. The selection shall remain live, valid and unchanged throughout the call.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Mixed integer and real modeling requires preserving whole real fibers above selected integer coordinates. Relational propagation may tighten an unselected coordinate without making it integral.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void drop_some_non_integer_points(
        const Variables_Set& vars,
        Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Independently enumerate selected integer assignments in bounded examples, retain exact rational free-coordinate slices and prove each slice is contained in the result by elimination. Check result inclusion in the entry set separately. Cover empty/full/nonadjacent selections, fractional unselected frames, one-coordinate versus joint restriction, translated equalities, unbounded slices, repeated histories, dimension rejection and preserved selection ownership.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; tests/BD_Shape/dropsomenonintegerpoints1.cc.

  • PPL-SPEC-001131
    4. Bounded-integer wrapping and guarded evolution of difference shapes UID: PPL-SPEC-001131 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    wrap_assign shall interpret widths, representations and overflow modes under 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes. For the receiver's entry set X and selected coordinate set S, the result shall conservatively contain every concrete selected-integer outcome, filtered by a supplied guard on the resulting coordinates. Unselected coordinates of each concrete outcome shall retain their entry values. The returned set shall remain a bounded-difference abstraction; relational implications, modular disjunctions and guard precision may be approximated.

    For OVERFLOW_WRAPS, each selected integer shall be reduced to its signed or unsigned residue. OVERFLOW_IMPOSSIBLE shall preserve every transition whose selected input integers are within the modeled machine range and may discard overflowing transitions. OVERFLOW_UNDEFINED shall permit every modeled bounded-integer result after an overflowing arithmetic result; no particular residue shall be selected as its required meaning. Result bounds shall retain the profile's outward-conversion conditions. This arithmetic-result interpretation shall not claim to model other effects of language undefined behavior.

    The selection and any nonnull guard shall satisfy their documented coordinate-dependency admission: the guard may use general or strict linear rows, but shall depend only on selected coordinates and its ambient dimension shall not exceed the selection dimension. Each selected coordinate shall be within the receiver dimension. Violating these dimension bounds shall throw std::invalid_argument before represented-set modification, including empty receivers and selections. Nonzero guard coefficients outside the selection shall be outside this contract's admitted inputs. A supplied guard shall use the valid descriptor context of 🔗 1. Constraint relation meaning and numerical prerequisites and 🔗 14. Constraint-system conjunction, construction and shared contradiction.

    With an empty selection and null guard the receiver's represented set shall be unchanged. With a supplied dimension-compatible constant guard it shall perform conservative refinement; a false constant shall make the result empty. Empty receivers shall remain empty. Fractional input points on selected coordinates may be discarded, and fractional points may remain inside the result. A lower complexity_threshold or wrap_individually=true may permit less precision, but shall not permit loss of any required concrete outcome. No universal least-hull, progress or monotonic-precision guarantee between different parameter choices shall be inferred.

    Only named width, representation and overflow enumerators shall be admitted. Modeled 128-bit widths shall not require a native 128-bit scalar or a 128-bit configured coefficient. Actual intermediate machine-limit, quadrant, translation, conversion and descriptor arithmetic shall satisfy the selected backend's supported range and numerical prerequisites. In particular, a modeled width alone shall not establish that configured Coefficient can compute every intermediate power of two or translation. Variables shall use 🔗 1. Public coordinate-index set and value lifecycle's valid-use conditions.

    The selection and any supplied guard shall remain live, valid and unchanged throughout the call. Their independent storage shall remain owned by the caller.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership, remain valid and safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Wrapping interprets equivalence classes of machine integers while a relational abstraction preserves only representable consequences. Guard refinement must concern translated values and must remain sound when precision limits force a coarser result.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void wrap_assign(const Variables_Set& vars,
                     Bounded_Integer_Type_Width w,
                     Bounded_Integer_Type_Representation r,
                     Bounded_Integer_Type_Overflow o,
                     const Constraint_System* cs_p = nullptr,
                     unsigned complexity_threshold = 16,
                     bool wrap_individually = true);
    
    VERIFICATION_CRITERIA:

    Independently enumerate selected integer input slices and derive residues with unbounded division and nonnegative remainders. For overflow uncertainty enumerate admitted machine values in small widths and use analytic machine-range models at larger widths. Apply guards to resulting slices, then check inclusion by rational elimination. Cover signed/unsigned, all three overflow choices, all modeled widths including 128 with capable arithmetic, fractional free frames, unbounded inputs, null/strict/constant/relational guards, sparse padded dependencies, both precision flags, several thresholds, ownership and early dimension rejection. Keep generic delegated checks distinct from BD-specific interface checks.

    BIBLIOGRAPHY:

    SimonK07 | Sections 2.2 and 5.1–5.4, bounded interpretations, explicit wrapping and guard precision; PDF page indices 2 and 7–10 (zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc; src/wrap_assign.hh; tests/BD_Shape/wrap1.cc.

  • PPL-SPEC-001132
    5. Topological closure identity for bounded-difference values UID: PPL-SPEC-001132 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    topological_closure_assign shall preserve the represented set and ambient dimension of every valid bounded-difference value. These values are already topologically closed under 🔗 1. Bounded-difference values, numerical profiles and valid use, including lower-dimensional sets, unbounded sets, universe and empty values in every supported dimension. The operation shall not be interpreted as a demand to run graph shortest-path closure or to change a graph-normalization cache.

    An unclassified inconsistent representation shall continue to denote empty; forcing an emptiness query shall not be a precondition for this identity. Storage ownership and validity shall be preserved. No additional numerical rounding setup or library initialization beyond the valid object's existing context shall be required; the caller's FPU rounding direction shall remain unchanged.

    RATIONALE:

    Topological closure is a semantic operation on represented points. Closed difference inequalities already express a closed set, independently of whether their graph representation has been normalized.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void topological_closure_assign();
    
    VERIFICATION_CRITERIA:

    Compare exact independent halfspace denotations before and after repeated calls on empty/lazy-empty/universe, affine, bounded and unbounded models. Check dimensions, source lifetime/ownership, numerical profiles and caller-FPU preservation without requiring graph-cache changes.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeevolutionspec1.cc; tests/bdshapeevolutionoracle.hh; tests/bdshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/bdshapeevolutionpublic1.cc.

  • PPL-SPEC-001133
    1. Conservative interval-linear-form inequality refinement UID: PPL-SPEC-001133 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating boundary type T, let X be the receiver's entry set and let L(x) and R(x) be the real value sets of its dimension-compatible interval linear-form arguments. Coefficient and constant choices shall be independent, including when the same form object is supplied twice. After refine_with_linear_form_inequality, the receiver shall have the same ambient dimension and denote a set Y satisfying

    {x ∈ X ∣ ∃l ∈ L(x),  r ∈ R(x) : l ≤ r} ⊆ Y ⊆ X.

    Valid empty coefficient or constant intervals shall be admitted; their empty choice set contributes no satisfying valuations, so a general conservative refinement may leave the input unchanged.

    The general operation may lose precision. Comparisons involving constants only, including cancellation to a constant comparison, may leave the input unchanged.

    For closed nonempty constant intervals and forms having at most one nonzero variable coefficient each, all such coefficients being singleton  + 1 or  − 1, consider a nonconstant comparison reducible to one unary or coordinate-difference inequality. If the required constant endpoint subtraction and any normalization by 2 are exact in the selected boundary profile, the result shall equal the intersection of X with that closed inequality, using the lower constant endpoint on the left and upper constant endpoint on the right. Opposite unit coefficients on the same coordinate shall therefore use the corresponding normalized ±2xi cut. This precision clause shall not apply to opposite-sign coefficients on distinct coordinates or to a constant-only comparison.

    Empty input shall remain empty. An argument form whose space dimension exceeds the receiver's shall throw std::invalid_argument before changing the represented set, including on empty input. Successful refinement shall preserve the source forms and leave a valid owned receiver.

    The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

    RATIONALE:

    A floating comparison filters existing correlated states; coefficient uncertainty and outward arithmetic must not discard a satisfying state.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    template <typename Interval_Info>
    void refine_with_linear_form_inequality(
        const Linear_Form<Interval<T, Interval_Info>>& left,
        const Linear_Form<Interval<T, Interval_Info>>& right);
    
    VERIFICATION_CRITERIA:

    Partition coordinate signs independently, derive exact rational minimum-left/maximum-right affine inequalities, intersect each with the input halfspaces, and check every resulting piece is contained while the result stays inside the input. Cover unit, same-coordinate opposite unit, uncertain-sign, nonunit and sparse multiple-variable forms; exact and genuinely inexact arithmetic; correlations, recession directions, source aliases, bottom, dimension errors and owned-resource failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.2 and 7 (domain and floating arithmetic background). Mine04 | Sections 5 and 6.1, Tests (interval linear forms and relational guard abstraction).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/octagonalshapeintervalformspec1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh; tests/BD_Shape/affineunboundedproducts1.cc.

  • PPL-SPEC-001134
    2. Generalized interval-linear-form comparisons UID: PPL-SPEC-001134 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the form value sets and numerical admission of 🔗 1. Conservative interval-linear-form inequality refinement, generalized_refine_with_linear_form_inequality shall preserve the ambient dimension and denote an enclosure of the input states satisfying its relation, without introducing states outside the input. The two sides shall use independent coefficient choices.

    LESS_OR_EQUAL shall apply the left-to-right inequality refinement; GREATER_OR_EQUAL shall apply the reversed refinement. LESS_THAN and GREATER_THAN may use those same closed relaxations of the strict comparisons. EQUAL shall apply both non-strict orientations, retaining all states for which the two form value intervals overlap. NOT_EQUAL shall leave the represented set unchanged. No general least-result claim shall follow from these dispatch rules.

    Both arguments shall undergo the documented dimension validation for every named relation, including NOT_EQUAL and empty receivers. Incompatibility shall throw std::invalid_argument before changing the represented set. A Relation_Symbol having the unnamed language-admissible value 0 or 7 shall throw std::runtime_error before mutation. Values outside the C++ enum's valid representation range are outside valid language use. Empty input and source-form values shall be preserved.

    The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

    RATIONALE:

    The relation selects the comparison orientation and its admissible closed relaxation; validation must not depend on the selected dispatch shortcut.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    template <typename Interval_Info>
    void generalized_refine_with_linear_form_inequality(
        const Linear_Form<Interval<T, Interval_Info>>& left,
        const Linear_Form<Interval<T, Interval_Info>>& right,
        Relation_Symbol relsym);
    
    VERIFICATION_CRITERIA:

    Use the independent sign-partition guard oracle for all six named relations, equality overlap, strict boundary witnesses, shared form objects and disequality identity. Check dispatch against the appropriate basic orientations, source preservation, dimensions on every branch, valid unnamed enum rejection and failure channels.

    BIBLIOGRAPHY:

    Mine04 | Sections 5 and 6.1, Tests (interval-coefficient guard abstractions).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/octagonalshapeintervalformspec1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh;

  • PPL-SPEC-001135
    3. Refinement of a floating interval abstract store UID: PPL-SPEC-001135 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating boundary type T and a valid Box<Interval<T,Interval_Info>> store of the same ambient dimension, refine_fp_interval_abstract_store(store) shall intersect the store with the outward Cartesian enclosure of the receiver supplied by the box conversion of 🔗 4. Box conversion from bounded-difference shapes. It shall retain every point of the entry store lying in the source shape and shall introduce no point outside the entry store. The source represented set and both ambient dimensions shall remain unchanged; logically const source closure may refresh caches.

    Empty source or empty store shall yield an empty store. Zero-dimensional empty and universe cases shall preserve their distinct meanings. When the source closure and target endpoint arithmetic satisfy the exactness conditions of 🔗 4. Box conversion from bounded-difference shapes, the result shall equal the store's intersection with the least Cartesian enclosure of the source; otherwise outward approximation may retain additional points. Incompatible dimensions shall throw std::invalid_argument without changing the store's represented set.

    The selected native format shall satisfy its configured supported-format predicate. The box and interval representation shall retain 🔗 1. Cartesian box values, coordinate identity and valid use and 🔗 4. Box conversion from bounded-difference shapes. Unbounded valid store coordinates are admitted. The initialized numerical runtime and all intermediate policy prerequisites shall hold; the caller shall provide and retain ownership of an upward FPU environment.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The borrowed store and its live coordinate objects shall remain valid throughout the call. Recoverable numerical and resource exceptions may leave a partially refined store in the state permitted by its operations; discarded owned temporaries shall be released.

    RATIONALE:

    A relational state can strengthen a separate interval store without discarding a valuation common to both approximations.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    template <typename Interval_Info>
    void refine_fp_interval_abstract_store(
        Box<Interval<T, Interval_Info>>& store) const;
    
    VERIFICATION_CRITERIA:

    Derive coordinate extrema by exact rational projection of correlated halfspaces, combine them with independently specified input intervals, and compare containment/contraction; check exact Cartesian intersections where 🔗 4. Box conversion from bounded-difference shapes guarantees them. Cover empty and zero-dimensional states, unbounded coordinates, open store boundaries, inexact native bounds, mismatched dimensions, source preservation and allocation failure.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh;

  • PPL-SPEC-001136
    4. Export of unary constraints through a destination protocol UID: PPL-SPEC-001136 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a destination whose dimension is at least the source dimension, export_interval_constraints(dest) shall restrict the corresponding coordinates using the receiver's unary lower and upper consequences. The destination's remaining coordinates and ambient dimension shall be preserved. Source closure may expose implied unary constraints but shall preserve its represented set.

    If D is the entry destination set and H(X) the Cartesian hull of the source's entry set, the completed destination shall contain D∩(H(X)×Rm − n) and be contained in D, where n and m are the source and destination dimensions. When source closure arithmetic and destination restrictions are exact, including exact unbounded rational bounds, the result shall equal that intersection. Rounded closure or destination arithmetic may lose precision; no best-unary-bound promise shall follow in those profiles.

    An empty source shall call the destination's emptying operation. A zero-dimensional universe shall contribute no restrictions. Unbounded coordinate sides shall contribute no finite restriction. Each restriction callback shall return false exactly when its destination is empty; a false result shall terminate further restriction calls. No fixed callback count or coordinate order is promised. A destination of smaller dimension shall cause std::invalid_argument before any restrictive callback.

    The destination protocol shall implement the indicated conjunctions and preserve coordinates not selected by a callback. Its callbacks shall not invalidate borrowed objects or modify the source being traversed. Callback exceptions may leave a partially restricted destination, with the states and ownership guaranteed by that destination's operations.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The destination and its callback environment shall remain live for the call. Discarded owned temporaries shall be released on reported failure.

    RATIONALE:

    The callback protocol supports destinations larger than a same-type box and exposes unary information independently of the native floating-store adapter.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    template <typename U>
    void export_interval_constraints(U& dest) const;
    
    // Required destination capabilities:
    dimension_type U::space_dimension() const;
    void U::set_empty();
    bool U::restrict_lower(dimension_type dim, const T& lower);
    bool U::restrict_upper(dimension_type dim, const T& upper);
    
    VERIFICATION_CRITERIA:

    Use independent rational coordinate projections and a destination implementation with literal interval semantics. Verify larger dimensions and preserved extra coordinates, implied correlated bounds, empty/zero-dimensional sources, ignored infinite sides, too-small rejection, callback short-circuiting and throwing callbacks without imposing rollback or incidental call order. Include exact rational, rounded native/integer and actual no-FPU configurations.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; tests/bdshapefiltersspec1.cc; tests/bdshapefiltersfailure1.cc; tests/bdshapefiltersoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Concrete_Expression/bdshape2.cc; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Interval_defs.hh;

  • 1. Addition of admitted bounded-difference constraints UID: PPL-SPEC-001090 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraint(c) shall conjoin the admitted closed constraint with the receiver. Admitted nonconstant forms shall be unary bounds or coordinate-difference bounds, including their equality forms with any common nonzero integral scale and sign. Constant tautologies shall have no effect and constant falsehoods shall make the result empty. A nonconstant strict constraint or an unsupported nonconstant linear form shall throw std::invalid_argument; a constant strict tautology or falsehood shall retain its logical meaning.

    For each primitive upper inequality, normalization shall divide by the positive coefficient magnitude and choose the least admitted target bound no smaller than the exact rational bound. Equality shall contribute both opposite inequalities with their respective outward bounds. The result shall denote the intersection of the entry set with these normalized target inequalities; for exact representable bounds this shall be the concrete conjunction. Applying outward normalization shall not exclude any entry point satisfying the original constraint.

    add_constraints(cs) and add_recycled_constraints(cs) shall conjoin all admitted constraints in the system, with the same normalization and validation rules. Source dimensions at most the receiver dimension shall be admitted; omitted trailing coordinates shall have zero coefficients. A larger single-descriptor or system dimension shall throw std::invalid_argument before changing the receiver's represented set. Rejection of an unsupported single descriptor shall also preserve the receiver's represented set. A system operation that encounters an unsupported descriptor need not roll back preceding additions.

    The copying overloads shall preserve their source descriptors. After the recycling overload, the only required property of cs shall be safe destruction, including after an exception. Result storage shall not borrow the input system. These rules shall apply to empty receivers as well as nonempty receivers.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible, except for recycled sources with an explicit destruction-only guarantee. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Descriptor admission distinguishes a convex bounded-difference operation from an approximation that silently ignores unsupported forms. Explicit outward scalar bounds separate numerical abstraction from conjunction.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void add_constraint(const Constraint& c);
    void add_constraints(const Constraint_System& cs);
    void add_recycled_constraints(Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Normalize raw integer coefficients with GMP rationals; conjoin independent halfspaces with the entry set. Exercise both signs, common scales, equality, exact/inexact bounds, constants, empty receivers, trailing coordinates, copied/recycled batches, invalid dimensions and late unsupported descriptors. Check valid reuse after exceptions and independent result ownership.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/addconstraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001091
    2. Addition of bounded-difference congruences UID: PPL-SPEC-001091 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruence(cg) shall admit congruence equalities whose linear form is a unary or coordinate-difference equality, together with constant tautologies and falsehoods. An admitted equality shall conjoin the two opposite outward-normalized inequalities described in 🔗 1. Addition of admitted bounded-difference constraints. A tautology shall have no effect; a falsehood shall make the result empty.

    A nontrivial proper congruence or an unsupported nonconstant equality shall throw std::invalid_argument. Periodic spacing shall not be silently removed by an adding operation. add_congruences(cgs) and add_recycled_congruences(cgs) shall apply these admission and conjunction rules to the whole system.

    A descriptor or system dimension above the receiver dimension shall throw std::invalid_argument before changing its represented set; smaller dimensions shall use zero trailing coefficients. Rejection of an unsupported single congruence shall preserve the entry set. A system operation need not undo earlier admitted additions if a later congruence is rejected.

    The copying overloads shall preserve their source values. After a recycling call, the source system need only remain safely destructible, including after an exception. Result storage shall own its value independently of the source. Admission and dimension checks shall apply to empty receivers too.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible, except for recycled sources with an explicit destruction-only guarantee. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    A closed convex domain cannot encode nontrivial periodic spacing. An adding operation therefore requires explicit admission rather than treating a periodic descriptor as an unrequested convex approximation.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void add_congruence(const Congruence& cg);
    void add_congruences(const Congruence_System& cgs);
    void add_recycled_congruences(Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Use raw affine equalities and constant modular predicates. Check exact and outward-normalized equality conjunctions, both signs, constant true/false proper congruences, empty receivers, copied/recycled systems, source ownership, invalid dimensions and unsupported periodic or non-difference forms.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/addconstraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001092
    3. Conservative constraint refinement UID: PPL-SPEC-001092 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_constraint(c) and refine_with_constraints(cs) shall refine the receiver using supported unary and coordinate-difference constraints. Supported nonconstant strict inequalities shall first be relaxed to their non-strict counterparts. The resulting supported inequalities and equalities shall be normalized outward as in 🔗 1. Addition of admitted bounded-difference constraints. Unsupported nonconstant linear forms shall be ignored.

    Constant descriptors shall retain their exact logical meaning: a false constant constraint, including a strict zero boundary, shall make the result empty; a tautology shall have no effect. Empty receivers shall remain empty. Relaxing a strict boundary shall not be interpreted as an exact test of the original conjunction's feasibility.

    A completed result shall contain every entry point satisfying the input descriptors and shall equal the conjunction of the entry set with the supported, relaxed, outward-normalized descriptors. Copying refinement shall preserve the input descriptor or system. A larger descriptor or system dimension shall throw std::invalid_argument without changing the entry set; zero trailing coordinates shall be admitted for smaller source dimensions.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Refinement accepts a wider descriptor language than strict addition. Its explicit ignored-form and strict-boundary rules make the resulting loss of precision predictable.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void refine_with_constraint(const Constraint& c);
    void refine_with_constraints(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Independently filter raw forms, relax strict nonconstant bounds, normalize supported bounds outward and conjoin halfspaces. Include a singleton on a rejected strict boundary, unsupported sums, constant strict falsehoods, exact/inexact equalities, empty receivers, batches, source preservation and incompatible dimensions.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/constraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001093
    4. Conservative congruence refinement UID: PPL-SPEC-001093 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_congruence(cg) and refine_with_congruences(cgs) shall conjoin supported unary or coordinate-difference equalities, with the outward scalar normalization in 🔗 1. Addition of admitted bounded-difference constraints. Unsupported nonconstant equalities shall be ignored.

    An inconsistent proper congruence shall make the result empty. Every other proper congruence shall have no effect; in particular, periodic spacing shall not be interpreted as an equality. A constant equality shall retain its exact tautology or falsehood meaning. An empty receiver shall remain empty.

    A completed result shall contain all entry points satisfying the supplied congruences, and shall denote precisely the entry set conjoined with the admitted outward-normalized equalities, unless a false constant descriptor makes it empty. The input descriptors shall preserve their values. Source dimensions at most the receiver dimension shall be admitted with zero trailing coordinates; larger dimensions shall throw std::invalid_argument without changing the receiver's represented set.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Equality information can refine a convex difference domain, while periodic information may require a deliberate conservative omission. Constant modular falsehoods still have exact empty-set meaning.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void refine_with_congruence(const Congruence& cg);
    void refine_with_congruences(const Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Use independent equality halfspaces and constant modular arithmetic. Check ignored proper periodic predicates, inconsistent proper constants, unsupported sums, positive/negative equality normalization, empty receivers, single/system agreement, descriptor preservation and dimension rejection.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/constraints1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001094
    5. Forgetting one coordinate without removing it UID: PPL-SPEC-001094 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    var shall be a live valid Variable satisfying 🔗 2. Variable value identity and lifetime operations and 🔗 3. Variable construction, coordinate queries and bounds.

    unconstrain(var) shall forget the value of the selected coordinate while preserving ambient dimension and every coordinate's identity. If the entry set is X ⊆ ℝn and var denotes coordinate i, the concrete cylindrification shall be

    {z ∈ ℝn ∣ ∃x ∈ X : ∀j ≠ i,  zj = xj}.

    With exact rational or integral arithmetic, the result shall denote this set exactly. A profile whose computations round may produce a containing bounded-difference enclosure. The operation shall retain the consequences among unselected coordinates that are required by its precision guarantee; merely deleting input rows mentioning var is insufficient.

    Empty shall remain empty. A valid selected coordinate of a nonempty set shall become unrestricted rather than being assigned zero or removed. var shall be below space_dimension(); otherwise std::invalid_argument shall be thrown without changing the receiver's represented set.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Existential forgetting preserves coordinate positions and can retain constraints mediated by the forgotten coordinate. It differs from row deletion, zero assignment and coordinate removal.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void unconstrain(Variable var);
    
    VERIFICATION_CRITERIA:

    Use independent rational elimination while keeping the coordinate slot free. Exercise chains through the forgotten coordinate, retained equalities, singleton/empty/unbounded sets, every selected position, exact and rounded profiles, zero dimension and invalid indices.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/unconstrain1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001095
    6. Forgetting a coordinate set simultaneously UID: PPL-SPEC-001095 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    vars shall be a live coordinate-valid Variables_Set satisfying [LINK: PPL-SPEC-000021] and 🔗 4. Coordinate-set dimension and maximum dimension, and shall remain unmodified throughout the call.

    unconstrain(vars) shall forget all selected values, preserving the ambient dimension and coordinate identities. For the selected index set I, its concrete result shall be

    {z ∈ ℝn ∣ ∃x ∈ X : ∀j ∉ I,  zj = xj}.

    The profile-specific exactness and containment guarantees of [LINK: PPL-SPEC-001094] shall apply to this simultaneous cylindrification. Input order or repeated insertion of an index into Variables_Set shall not change the result's meaning.

    An empty selection shall preserve the represented set, including in zero dimensions. Selecting all coordinates of a nonempty shape shall give universe in the same dimension; an empty shape shall remain empty. Any selected index outside the receiver's dimension shall throw std::invalid_argument before changing its represented set. The selector set shall preserve its value and result storage shall not depend on its lifetime.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Simultaneous forgetting must preserve relationships among retained coordinates across several eliminated paths. The empty and full selections distinguish identity from whole-space cylindrification.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void unconstrain(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Eliminate selected coordinates independently with exact rationals and leave the original slots unrestricted. Check empty/full/nonadjacent selections, retained mediated differences, repeated selector insertion, all positions, empty and zero-dimensional sets, copied selector lifetime and dimension rejection.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/unconstrain1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001096
    7. Exact intersection of compatible shapes UID: PPL-SPEC-001096 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    intersection_assign(y) shall replace the receiver by the exact intersection of its entry set with the entry set of y. This set equality shall hold across the admitted numeric profiles under their arithmetic prerequisites; it shall not be reduced to a containment-only guarantee.

    The two ambient dimensions shall be equal; otherwise the call shall throw std::invalid_argument without changing either represented set. Smaller-dimensional operands shall not be implicitly embedded. Empty, universe, zero-dimensional and lower-dimensional operands shall obey set intersection. Self-intersection shall preserve the entry set.

    A distinct source y shall retain its represented value, and the result shall own its storage independently of that source. Logically const normalization may change representations while preserving represented sets.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Conjunction of bounded differences remains expressible in the domain, so selecting the tighter stored restrictions has an exact set interpretation even when the operand bounds themselves are numerical approximations.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void intersection_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Conjoin independently specified operand halfspaces and check equality by rational elimination. Cover alternating-path inconsistency, redundant descriptions, singleton intersections, touching bounds, empty/universe/zero dimensions, native and integral profiles, self-aliasing, donor mutation and dimension errors.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 5.1, graph meet and intersection correspondence (PDF index 16).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/intersection1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001097
    8. Conservative and exact-arithmetic upper bounds UID: PPL-SPEC-001097 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign(y) shall replace the receiver by a bounded-difference set containing the union of both entry sets. When the computations use exact arithmetic, this shall be the least bounded-difference enclosure of the union. Rounded computations may produce a less precise containing set.

    For the exact-arithmetic guarantee, every supported unary or difference normal shall have the greater of the two source suprema as its bound, with an unbounded source normal producing an unbounded result normal. Every finite result bound shall be closed.

    Dimensions shall agree; an incompatible operand shall throw std::invalid_argument without changing either set. Empty shall be an identity, universe absorbing, and self-union an identity. Zero-dimensional values shall preserve the empty/universe distinction. A distinct y shall preserve its represented set and result storage shall be independent of its lifetime.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    A union can be nonconvex or outside the template domain. The least template enclosure is characterized by support maxima, while rounded closure must retain union containment even when its bounds are not minimal.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void upper_bound_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Compute every primitive support maximum independently and compare the exact-profile result by rational elimination. For rounded profiles require both operand inclusions. Include incomparable correlated shapes, bounded/unbounded normals, all neutral/absorbing cases, redundant histories, aliases and incompatible dimensions.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 5.1, closed-graph join and pointwise maximum (PDF index 16).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/upperbound1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001098
    9. Certified set-theoretic union UID: PPL-SPEC-001098 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign_if_exact(y) shall return true only when the receiver's completed represented set is exactly the set-theoretic union of the two entry sets. On false, the receiver shall preserve its entry represented set. A distinct y shall preserve its entry set on either outcome. Closure and reduction may change internal representations without changing these values.

    For mpq_class and mpz_class boundary types, the operation shall return true if and only if the union is a bounded-difference shape. A bounded integer or native floating profile may return false when it cannot certify exactness, even if the union is representable. Such a false result shall not imply that the union is unrepresentable.

    The dimensions shall be equal; mismatch shall throw std::invalid_argument before changing represented sets. Self-union, empty identities, universe and zero-dimensional cases shall satisfy the same exactness rules. A successful receiver shall own its resulting value independently of a distinct source.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    A certified join distinguishes a representable concrete union from a containing abstract upper bound. Numerical certification may be incomplete while every reported success remains exact.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    bool upper_bound_assign_if_exact(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Build the support hull independently and decide whether it has a point outside both operands by rational elimination of paired strict complements. Require complete decisions for unbounded exact profiles, unchanged sets on false, exact true results for all profiles, aliases, incompatible dimensions, unbounded correlated sets and cache histories.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 5.2, Theorem 5.2 (PDF index 16).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/upperboundifexact1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001099
    10. Certified integer-point union UID: PPL-SPEC-001099 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    integer_upper_bound_assign_if_exact(y) shall be available for an integral boundary type T. Its exactness shall concern integer valuations: on true, every integer point in the resulting shape shall belong to at least one entry operand, and every integer point of either operand shall belong to the result. The result shall be the integer upper bound, namely the least rational bounded-difference enclosure containing those input integer points.

    With mpz_class boundaries the decision shall be complete: true shall hold exactly when that integer upper bound introduces no additional integer point. A bounded integral profile may return false if it cannot certify exactness. A false result shall preserve the receiver's entry represented set; it shall not certify a missing integer point for an incomplete profile.

    This guarantee shall not identify integer-point union with real set-theoretic union. For example, joining the real singletons at zero and one can be exact for integer points while including nonintegral points between them. Dimensions shall agree, with std::invalid_argument on mismatch before changing represented sets. A distinct source shall preserve its entry set, and self-union/empty/zero-dimensional inputs shall retain their mathematical meanings.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    A gap in a real union can contain no integer point. Integer exactness therefore uses a different decision problem while still returning a real bounded-difference representation.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    bool integer_upper_bound_assign_if_exact(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    For independently bounded integral examples enumerate every integer point in the support hull and compare with both operands, using proven finite coordinate limits. Check adjacent versus separated singletons, multidimensional correlated unions, complete GMP decisions, sound bounded-profile successes, false preservation, aliases and dimension errors. Include a real-inexact/integer-exact counterexample.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 5.3, Theorem 5.4 and Example 5.5 (PDF indices 19-20).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/integerupperboundifexact1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001100
    11. Least closed bounded-difference abstraction of subtraction UID: PPL-SPEC-001100 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    difference_assign(y) shall replace the receiver by the least target-profile bounded-difference enclosure of the set of entry points absent from y. In an unbounded exact rational profile this shall be the least closed bounded-difference hull of the concrete difference. A finite normal supremum shall use the least admitted outward target bound.

    The result may retain removed boundary points or fill a gap between surviving components, as required by closure and convex template abstraction. Removing an equality or a boundary shall not be interpreted as removing its closed convex limit points. If the concrete difference is empty, the result shall be empty; self-subtraction shall therefore be empty.

    Dimensions shall agree; mismatch shall throw std::invalid_argument before changing either represented set. Empty/universe and zero-dimensional operands shall obey the same subtraction-and-enclosure meaning. A distinct source shall preserve its represented set, and result ownership shall be independent of its lifetime.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    A concrete difference need not be closed or convex. Taking support over its strict exclusion alternatives defines the least closed template enclosure without incorrectly requiring the result to be disjoint from the removed operand.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    void difference_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Form each strict complement of the subtrahend's raw halfspaces, intersect with the entry set and take primitive support suprema over feasible alternatives using independent rational elimination. Include equalities, removed boundaries, interior holes, alternating constraints, aliases, empty/universe/zero dimensions, numerical target profiles and mismatch errors. Compare dense and irredundant defining bases, cold and cached histories, and removal that leaves the original closed hull. Include disjointness, interior holes, boundary faces and complementary equality branches, with proper facet cuts as controls; preserve distinct-source geometry and ownership.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/difference1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • PPL-SPEC-001101
    12. Meet-preserving simplification in a context UID: PPL-SPEC-001101 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    simplify_using_context_assign(y) shall return a bounded-difference simplification R of the entry receiver X using the entry context Y, satisfying

    X ⊆ R,   R∩Y = X∩Y.

    The cardinality of a minimized constraint representation of R shall not exceed that of X. Identity shall be an admitted result; a strict enlargement or decrease in constraints shall not be required on every call. The Boolean result shall satisfy: false implies the entry intersection is empty. A true result may be inconclusive about nonemptiness.

    The context shall preserve its entry represented set when it is distinct from the receiver. Self-aliasing shall obey the same meet-preservation and enlargement clauses using the entry value for both operands. Empty receivers, empty contexts, universe, lower-dimensional and zero-dimensional sets shall be admitted.

    Dimensions shall agree; mismatch shall throw std::invalid_argument before changing either represented set. Result storage shall remain independent of a distinct context's later lifetime or mutation. Representation-only normalization shall preserve the mathematical entry values.

    The supported-profile, initialization, rounding, range and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply to the receiver and input values. All operands shall be live and valid throughout the call. Every intermediate numerical operation shall satisfy its selected arithmetic contract. Ambient dimension and coordinate identities shall be preserved unless the operation explicitly changes coordinate values.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Temporary resources owned by the operation shall be released. Surviving objects shall retain valid ownership and remain valid and safely destructible. No general rollback guarantee shall be inferred for such failures.

    RATIONALE:

    Contextual simplification may discard restrictions supplied by the context while preserving exactly the relevant intersection. Enlargement and constraint-count simplification are separate obligations.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for BD_Shape<T> in Parma_Polyhedra_Library:

    bool simplify_using_context_assign(const BD_Shape& y);
    
    VERIFICATION_CRITERIA:

    Check enlargement and both intersection inclusions with independent rational halfspaces. Count an independent affine equation basis plus distinct facet faces for the minimized-representation measure. Check false-result disjointness, no required strict progress, empty/disjoint/universal contexts, aliases, exact and rounded profiles, context preservation and dimension errors.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapeoperationsspec1.cc; tests/bdshapeoperationoracle.hh; tests/bdshapeoperationsfailure1.cc; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapeoperationspublic1.cc; tests/BD_Shape/simplifyusingcontext1.cc; tests/BD_Shape/dimensioncontracts1.cc.

  • 5. BD_Shape<T> internal status signed-keyword loading and rejection UID: PPL-SPEC-001616 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. BD_Shape internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.

    For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. BD_Shape internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.

    The BD loader shall accumulate fields in a local candidate. Lexical rejection, input exceptions and a contradictory ZE marker shall leave the prior word unchanged. After a complete canonical marker/word pair, it shall install that word and return its consistency result; a false consistency result may thus leave inconsistent loaded flags. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. BD_Shape internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 3. Compatible bounded-difference record loading and failure state.

    RATIONALE:

    The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.

    INTERFACE:

    Internal nested type BD_Shape<T>::Status in BDS_Status_idefs.hh, included through BD_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.

    bool ascii_load(std::istream& stream);
    // Internal helper, in its defining translation unit or implementation namespace:
    bool get_field(std::istream& stream, const char* keyword, bool& positive);
    
    VERIFICATION_CRITERIA:

    Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and get_field output preservation. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.

    SOURCE:

    src/BD_Shape_defs.hh; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/BDS_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.

  • PPL-SPEC-001137
    1. Human-readable bounded-difference presentation UID: PPL-SPEC-001137 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Stream insertion shall write true for a universe shape and false for an empty shape, including their zero-dimensional forms. Otherwise it shall list unary and coordinate-difference constraints in the upper triangular pair order of coordinates 0, …, n, with index 0 denoting the constant origin. Two opposite finite bounds that are additive inverses shall be displayed as one equality; other finite sides shall be displayed as non-strict inequalities. Positive-infinite sides shall not be displayed. Consecutive constraints shall be separated by ", " and no ambient-dimension header shall be inserted.

    A unary equality shall use variable = value; an upper unary bound shall use variable <= value. A lower unary bound shall use variable >= value for signed or unbounded coefficients. For unsigned integer coefficients it shall use -variable <= value, retaining the stored nonnegative constant without numerical negation. Difference constraints shall use the orientation giving the selected nonnegative constant where available, retaining the corresponding relation and value. Variable names shall follow the active formatter and its live-callback prerequisites in 🔗 7. Active Variable formatter and initialized thread state and 🔗 8. Variable names, formatter dispatch and output failures. Bound values shall follow the admitted mathematical numeric stream output of 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration.

    Insertion shall return the supplied stream reference without adding a newline or explicitly flushing it. print() shall deliver the same presentation to the current std::cerr. Display shall preserve the represented set and dimension; its const classification may refresh representation caches. Stream and formatter failures shall retain their applicable state, exception-mask and partial-output behavior. Rendering callbacks shall not mutate or invalidate traversed source objects.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The borrowed stream and any output callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

    RATIONALE:

    A readable constraint list must retain relation directions, variable identities and mathematical values while remaining distinct from a reloadable record.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    namespace IO_Operators {
      template <typename T>
      std::ostream& operator<<(std::ostream& stream, const BD_Shape<T>& value);
    }
    // Member of BD_Shape<T>:
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check literal ordered strings for universe/empty, unary and difference equalities, both inequality orientations/signs, unsigned lower bounds including zero, infinite sides, zero constants, custom formatters and source/cache histories. Independently check that displayed unsigned inequalities denote the source set. Verify stream identity, no newline, stderr forwarding, locale/formatting, failed output buffers and throwing formatters.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_templates.hh; src/Bit_Matrix_defs.hh; src/Bit_Matrix.cc; src/globals_defs.hh; tests/bdshapetextspec1.cc; tests/bdshapefiltersoracle.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/BD_Shape/ascii_dump_load1.cc; tests/BD_Shape/writebdshape1.cc;

  • 2. Reloadable bounded-difference record export UID: PPL-SPEC-001138 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid admitted source, ascii_dump(stream) shall write its status fields, a newline, its square difference-bound matrix record, a newline, and its redundancy-bit matrix record of 🔗 12. ASCII representation and loading. Status fields shall identify the stored ZE, EM, SPC and SPR conditions in that order, using + or - prefixes. The bound-matrix dimension shall be one greater than the ambient dimension, including zero-dimensional shapes. The export shall write the stored redundancy matrix when reduction is certified, and a zero-row, zero-column redundancy matrix otherwise.

    The matrix payload and mathematical numeric formatting shall follow 🔗 11. Reloadable ASCII records for admitted bound values, including exact finite native decimal values and admitted positive infinities. Compatible status, matrix, numeric policy, locale and version conventions shall retain enough information for 🔗 3. Compatible bounded-difference record loading and failure state to restore the same mathematical set and ambient dimension. Neither native object bytes nor a floating zero sign is part of this mathematical round-trip guarantee.

    Export shall preserve the source value and ownership without requiring an initial emptiness, closure or reduction query. ascii_dump() shall send the same record to the current std::cerr. Output failure shall follow the stream's selected state and exception behavior, retaining partial output and without certifying successful delivery.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The borrowed stream and any output callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

    The internal status contract shall follow 🔗 4. BD_Shape internal status signed-keyword export.

    RATIONALE:

    A complete stored record includes dimension, numerical constraints and the status needed for continued use, not only a human-readable constraint list.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    void ascii_dump(std::ostream& stream) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Inspect independent status/size/row framing for empty, universe and correlated shapes in unclosed, closed and reduced states. Round-trip exact rational/integer/native records, signed zeros and infinities, verify source preservation, concatenation/suffixes and stderr forwarding, and test output failures without assuming transactional delivery.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_templates.hh; src/Bit_Matrix_defs.hh; src/Bit_Matrix.cc; src/globals_defs.hh; tests/bdshapetextspec1.cc; tests/bdshapefiltersoracle.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/BD_Shape/ascii_dump_load1.cc; tests/BD_Shape/writebdshape1.cc;

  • 3. Compatible bounded-difference record loading and failure state UID: PPL-SPEC-001139 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a complete valid record of 🔗 2. Reloadable bounded-difference record export under compatible representation, numeric formatting, profile, locale and resource conditions, ascii_load(stream) shall return true and replace any valid receiver by the recorded ambient dimension and mathematical set. The previous receiver's dimension, emptiness and cache flags shall not affect the result. All serialized status conditions shall replace their previous conditions. One complete record shall be consumed while a following record or suffix remains available after permitted separating whitespace.

    Status-word rejection, a truncated or rejected bound matrix, or a truncated or rejected redundancy matrix shall return false when the component extractions return normally. An unsupported decoded bound-matrix row count shall return false before resizing or requesting storage for that extent, as specified by 🔗 12. Exact ASCII input, forbidden payloads and failure state. A zero-row bound matrix shall be rejected. When reduction certification is present, its matrix shall have the same row and column counts as the bound matrix. When reduction is uncertified, the loader shall consume the redundancy matrix without retaining its storage. That includes inactive matrices written by earlier compatible PPL versions. Inconsistent serialized status conditions shall be rejected. Numerical payload rejection shall retain 🔗 12. Exact ASCII input, forbidden payloads and failure state. Stream masks, numerical policy and recoverable resource exceptions shall retain their own propagation channels.

    The successful restoration guarantee assumes a trusted, complete and dump-compatible record. The loaded matrix, status, and retained closure and reduction information shall satisfy 🔗 5. Bounded-difference representation invariant query. If these checks detect an inconsistency, the loader shall return false in every build. Semantic queries or further shape operations require a complete valid representation.

    Rounded or bounded coefficient profiles may discard serialized reduction certification and recheck a serialized closed feasibility cache, preserving the stored matrix's exact represented set. This cache repair shall not alter the semantic meaning or ambient dimension of a compatible record.

    A false return or exception may leave replaced status or partially loaded matrices. It shall not promise rollback or a complete mathematical value. The receiver shall retain safely destructible ownership and may be replaced by a complete valid assignment before semantic queries or operations requiring a valid shape. Consumed input shall not be restored, and the library shall not take ownership of the stream.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. The borrowed stream and any output callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

    The internal status contract shall follow 🔗 5. BD_Shape internal status signed-keyword loading and rejection.

    RATIONALE:

    A compatible valid dump establishes the recorded value independently of prior receiver state. Local rejection checks protect basic representation structure without requiring general cache recomputation on every assertion-disabled load. Debug invariant diagnostics and partial input failure retain their separate failure channels. Admission of the decoded square extent requires both supported row and column counts before resizing.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    bool ascii_load(std::istream& stream);
    
    VERIFICATION_CRITERIA:

    Load valid producer records into receivers of different dimensions, empty/nonempty and cache states; check exact independent set/dimension equality and suffix framing. Exercise each truncated/malformed status and component boundary, zero-row bound matrices, mismatched certified reduction dimensions, forbidden/inexact numeric values, configured stream exceptions and allocation frontiers. Check arbitrary semantic cache inconsistencies separately as debug invariant diagnostics, without requiring their rejection as a release parse guarantee. Reassign after failed loads before semantic queries; verify destruction and reuse. Replace only the nested bound-matrix row count by the reserved non-dimension in otherwise valid empty and universe records at zero and small dimensions. Check rational, integer and floating bound types, rejection without a size-allocation exception and complete reload with preserved following input.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_templates.hh; src/Bit_Matrix_defs.hh; src/Bit_Matrix.cc; src/globals_defs.hh; tests/bdshapetextspec1.cc; tests/bdshapefiltersoracle.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/BD_Shape/ascii_dump_load1.cc; tests/BD_Shape/writebdshape1.cc;

  • PPL-SPEC-001140
    4. Owned bounded-difference memory accounting UID: PPL-SPEC-001140 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall report the owned external storage of the difference-bound matrix plus that of the redundancy-bit matrix, counting live selected coefficient payloads and retained capacities according to 🔗 14. Matrix container and coefficient memory accounting and 🔗 13. Invariant, ordering and allocated-memory queries. Logically empty or currently inactive cache content shall not make owned allocated storage disappear from the count. Independently owned runtime temporaries, other objects and allocator bookkeeping shall be excluded.

    total_memory_in_bytes() shall equal sizeof(BD_Shape<T>) plus the external count. Sizes shall be those of the selected build/profile and the sum shall fit memory_size_type. The selected live coefficient and bit-row memory hooks shall be well-formed. Both queries shall preserve the source set, dimension, caches, ownership and lifetimes.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. Live owned storage shall remain unchanged during either query.

    RATIONALE:

    Storage retained by matrices and caches can exceed that suggested by the mathematical dimension or emptiness of the current value.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Compare total/external identity and independent owned-allocation observations for native matrices without a reduction cache; separately account for live rational coefficient and bit-row payloads. Cover copies, assignment, exchange, growth/removal, empty values and retained cache capacities without counting allocator metadata or shared scratch.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_templates.hh; src/Bit_Matrix_defs.hh; src/Bit_Matrix.cc; src/globals_defs.hh; tests/bdshapetextspec1.cc; tests/bdshapefiltersoracle.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/BD_Shape/ascii_dump_load1.cc; tests/BD_Shape/writebdshape1.cc;

  • 5. Bounded-difference representation invariant query UID: PPL-SPEC-001141 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live, well-owned and safely indexable representation whose selected scalar operations are admitted, OK() shall check the matrix's storage and coefficient validity and the status-condition compatibility. Certified empty representations shall retain their inactive-geometric-data admission. A nonempty representation shall reject a stored negative-infinite bound or a diagonal entry other than positive infinity.

    For exact unbounded coefficient profiles, certified closure shall be checked against recomputation and certified reduction against the corresponding canonical reduction mask, including rejection of an essential positive- infinite edge. Rounded or bounded profiles shall use the selected exact graph semantic invariant for a certified reduction, without requiring floating closure to be idempotent. A violation of a checked invariant shall return false; passing those checks shall return true. The query shall preserve the receiver's represented set, dimension and ownership.

    The query may copy matrices, recompute derived data in temporary objects, and report resource or numerical exceptions through their selected channels. Debug builds may emit invariant-failure diagnostics to std::cerr; no fixed diagnostic wording is part of the result. A true result is not an emptiness, semantic equality or minimal-storage answer. The query shall not be a corruption scanner for arbitrary pointers, broken object lifetimes or non-indexable fabricated storage.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Bounded-difference values, numerical profiles and valid use shall hold. Discarded owned query temporaries shall be released on reported failure.

    The internal status contract shall follow 🔗 3. BD_Shape internal status consistency predicate.

    RATIONALE:

    Representation checks need to distinguish valid rounded caches from exact canonical forms and remain separate from mathematical property queries.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member signatures apply to BD_Shape<T> except the indicated free operator and destination capabilities.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check true on ordinary public histories across supported profiles. Using the existing friend fixture, create safe owned invariant negatives for selected status conditions, non-infinite diagonals, forbidden bounds and incoherent closure/reduction caches, then restore valid ownership before reuse. Observe source preservation and allowed diagnostics/exceptions; do not fabricate unsafe pointers or out-of-range storage.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; doc/definitions.dox; tests/bdshapefiltertextpublic1.cc; src/BDS_Status_idefs.hh; src/BDS_Status_inlines.hh; src/DB_Matrix_defs.hh; src/DB_Matrix_templates.hh; src/Bit_Matrix_defs.hh; src/Bit_Matrix.cc; src/globals_defs.hh; tests/bdshapetextspec1.cc; tests/bdshapefiltersoracle.hh; tests/bdshapeaffineoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/BD_Shape/ascii_dump_load1.cc; tests/BD_Shape/writebdshape1.cc;

  • PPL-SPEC-001056
    1. Bounded-difference values, numerical profiles and valid use UID: PPL-SPEC-001056 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape<T> shall represent a topologically closed subset of the real coordinate space Rn as a finite conjunction of unary inequalities ±xi ≤ c and difference inequalities xi − xj ≤ c, with distinct empty and universe values in every supported ambient dimension. A coordinate absent from all restrictions shall remain unrestricted. Rational bounds shall not change the coordinate carrier into a rational-only or integer-only set.

    The coefficient base T shall select the supported bounded integer, supported native floating, GMP integer or GMP rational profile. The exposed coefficient_type_base shall be T; coefficient_type shall additionally represent positive infinity and provide the declared rounding-aware bound operations. A positive-infinite bound shall impose no inequality. Integer-bound profiles shall still describe real points, rather than only integer points. Finite bounds and all intermediate arithmetic shall obey the selected profile's range and rounding prerequisites; an outwardly rounded bound shall not exclude points satisfying the admitted source constraint.

    Objects and supplied descriptors shall be live, well formed and externally synchronized. Coordinate identities and the reserved dimension indication shall follow 🔗 1. Coordinate type and reserved dimension index. Descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall apply where used. Native floating operations shall require their configured support and the initialized rounding environment prescribed by the numerical facilities. Mutation, destruction and operations that may update caches shall not race with another use of the same object.

    For profiles whose arithmetic rounds or saturates, shortest-path closure shall preserve the represented set through outward derived bounds without promising canonical, idempotent or maximally precise closure. Guarantees stated for unbounded exact coefficient arithmetic shall remain distinct from allowed rounded approximations.

    RATIONALE:

    A bounded-difference value is relational over real coordinates even when its stored bound type is integral; numerical representation and closure precision are separate obligations.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    template <typename T> class BD_Shape;
    typedef T coefficient_type_base;
    typedef N coefficient_type;
    
    VERIFICATION_CRITERIA:

    Use independent rational conjunctions to check unary/difference expressiveness, real fractional witnesses in integral-bound profiles, empty/universe and unconstrained coordinates. Inspect supported type/extension definitions and exercise exact rational, integral and configured native profiles under their runtime prerequisites.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, difference constraints, unary zero-node encoding and transitive closure (PDF page index 5, zero-based).

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc.

  • PPL-SPEC-001057
    2. Dimensioned empty and universe bounded-difference construction UID: PPL-SPEC-001057 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(d,kind) shall construct the specified EMPTY or UNIVERSE value with ambient dimension d. Default construction shall give zero-dimensional universe. Zero-dimensional universe shall contain the unique empty tuple; zero-dimensional empty shall contain none.

    max_space_dimension() shall return the selected profile's structural dimension limit. A requested dimension above that limit shall throw std::length_error before attempting the corresponding matrix storage, including when adding the internal zero coordinate would overflow the dimension type. A dimension within that limit shall remain subject to actual resource availability; the reported limit shall not promise allocation success.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Mathematical ambient dimension and storage limits must remain distinct, including at the extra zero-coordinate boundary.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit BD_Shape(dimension_type d=0, Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check default and explicit empty/universe construction in zero and small positive dimensions. Reject above-limit and unsigned-boundary requests without allocating at the limit; preserve the zero-dimensional meanings.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/fromspacedim1.cc; tests/BD_Shape/maxspacedim1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • 3. Owned bounded-difference copying, assignment and cleanup UID: PPL-SPEC-001058 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary copying shall create an independent shape with the source's represented set and ambient dimension. Copy assignment shall replace the target's value and dimension with the source's, including across different dimensions. Source mutation or destruction shall not change an independent copy; target mutation shall not change the source. Self-assignment shall preserve the value. The ordinary copy constructor's complexity argument shall be ignored for the three declared complexity values.

    Destruction shall release resources owned by that shape exactly once. Assignment shall return a reference to the receiver. Failed construction shall release its acquired resources; failed assignment shall not imply a rollback guarantee.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Value ownership must hold independently of closure/reduction cache state and coordinate count.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    BD_Shape(const BD_Shape& y, Complexity_Class complexity=ANY_COMPLEXITY);
    BD_Shape& operator=(const BD_Shape& y);
    ~BD_Shape();
    
    VERIFICATION_CRITERIA:

    Compare independent mathematical values after copy/assignment, self-assignment, source destruction and separate mutations. Exercise fresh/closed/reduced, empty/universe, zero dimensions and allocation failures with cleanup and retry.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001059
    4. Outward conversion between bounded-difference coefficient profiles UID: PPL-SPEC-001059 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape<T>(y) for another supported coefficient base shall inherit the source's ambient dimension and contain every source point. Each finite source bound shall be converted outward under the destination profile's declared operations; positive-infinite bounds shall remain unrestricted. Exact representable source bounds shall retain their values; inexact conversion may lose precision. Empty and zero-dimensional source meanings shall be preserved.

    The source may undergo logically const closure before conversion; this shall preserve its represented set. The three declared complexity arguments shall not change the conversion. The new shape shall own independent storage. Exact representability of every stored input bound shall not by itself promise stronger subsequent rounded-closure guarantees.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    Coefficient conversion must enclose the source while preserving independent value ownership.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    template <typename U>
    explicit BD_Shape(const BD_Shape<U>& y,
                      Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Normalize rational source rows independently; compare rational/integral/native conversions on signed fractional and exactly representable bounds, infinite sides, emptiness, dimensions and source/cache histories. Verify containment and separate source/target mutation.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001060
    5. Whole bounded-difference value exchange UID: PPL-SPEC-001060 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    m_swap and free swap shall exchange the two complete represented values and ambient dimensions, including empty/universe and different dimensions. A self-swap shall preserve the value. Exchanged ownership and all cache metadata shall remain associated with the corresponding value; neither operation shall require equal dimensions.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Storage and derived metadata must move together when exchanging whole values.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    void m_swap(BD_Shape& y);
    template <typename T> void swap(BD_Shape<T>& x, BD_Shape<T>& y);
    
    VERIFICATION_CRITERIA:

    Check literal source/target values before and after both swaps and self-swaps across unequal dimensions, emptiness and fresh/closed/reduced cache histories; mutate and destroy the exchanged owners independently.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc.

  • PPL-SPEC-001061
    6. Bounded-difference construction from supported constraints UID: PPL-SPEC-001061 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(cs) shall start from universe in the system's ambient dimension and conjoin every admitted constraint. Nontrivial admitted rows shall be nonstrict unary constraints or two-coordinate differences with equal-magnitude opposite coefficients; equalities shall impose both directions. Constant tautologies shall have no effect and constant falsehood shall produce empty. An empty system shall produce universe.

    A nontrivial strict inequality, a row with more than two nonzero variable coefficients, or a two-variable row with unequal-magnitude or same-sign coefficients shall throw std::invalid_argument, including after an earlier contradiction. Supported unary/difference bounds not exactly representable in the selected profile shall be rounded outward to the best admitted bound; with unbounded exact rational arithmetic, the result shall equal the admitted conjunction. The source rows and represented conjunction shall remain unchanged. can_recycle_constraint_systems() shall return false.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    Syntactic bounded-difference admission and outward bound normalization determine the meaning of a directly supplied conjunction.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit BD_Shape(const Constraint_System& cs);
    static bool can_recycle_constraint_systems();
    
    VERIFICATION_CRITERIA:

    Use independent rational unary/difference conjunctions, negative/fractional scaling, equalities, constants, contradictions, strict/relational rejection and zero dimensions. Check const-source preservation and that can_recycle_constraint_systems returns false.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001062
    7. Bounded-difference construction from supported congruences UID: PPL-SPEC-001062 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    BD_Shape(cgs) shall inherit the system's ambient dimension and conjoin its admitted equalities and constant truth values. Nontrivial equality rows shall be expressible as unary or equal-magnitude opposite-coefficient differences. A nontrivial proper congruence or unsupported equality shall throw std::invalid_argument, including after an earlier inconsistency. Constant proper congruences shall retain their tautological or inconsistent meaning. An empty system shall produce universe.

    Exact rational coefficient arithmetic shall represent admitted equalities exactly. Other profiles shall retain the declared outward bound conversion on both equality directions. The const source shall retain its rows and value. can_recycle_congruence_systems() shall return false.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    A closed difference domain can retain affine equalities and constant truth values without representing nontrivial periodic residue classes.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit BD_Shape(const Congruence_System& cgs);
    static bool can_recycle_congruence_systems();
    
    VERIFICATION_CRITERIA:

    Check independently solved rational unary/difference equalities, negative scaling, constants, contradictions, proper-congruence rejection and unsupported equalities, including after falsehood; compare profiles and preserve sources.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001063
    8. Ambient and affine dimension of bounded-difference values UID: PPL-SPEC-001063 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall return the ambient coordinate count independently of emptiness, boundedness or affine constraints. affine_dimension() shall return zero for empty and otherwise the dimension of the smallest affine subspace containing the represented set. Both zero-dimensional values shall have affine dimension zero. Implicit unary/difference equalities and relationally redundant descriptions shall be included in this determination; stored rounded entries shall not be assumed to certify an equality unless the represented set satisfies it.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Ambient coordinate identity and the dimension of the represented affine hull describe different properties.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Compute rational affine-hull ranks independently from exact implied equalities. Include fixed coordinates, difference-linked free coordinates, redundant chains, full-dimensional, empty and zero-dimensional values and rounded/native equality histories.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/affinedimension1.cc.

  • PPL-SPEC-001064
    9. Owned constraint and affine-equality exports of bounded-difference values UID: PPL-SPEC-001064 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    constraints() shall return an owned, dimension-preserving constraint system whose conjunction denotes the receiver. minimized_constraints() shall additionally provide an irredundant defining conjunction: removing any emitted nontrivial row shall enlarge the represented set. No unique row order or unique equality basis shall be required. Exported finite bounds shall have their exact stored mathematical values; no integer-bound profile shall silently change real coordinates into integer coordinates.

    congruences() and minimized_congruences() shall return owned equality congruences defining the receiver's affine hull, retaining the same ambient and affine dimensions. They shall not replace the represented inequalities or invent periodic restrictions. Their nonempty equality system shall be a basis of the affine restrictions; empty shall export inconsistency. Zero-dimensional universe shall export a tautological conjunction; zero-dimensional empty shall export an inconsistent one.

    Exported descriptors shall remain usable and independent after source mutation or destruction. Source normalization shall preserve its represented value; canonical row order or a particular redundant basis shall not be inferred beyond the declared minimization result.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Geometric defining inequalities and affine-hull equalities convey distinct information and need independent ownership.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Constraint_System constraints() const;
    Constraint_System minimized_constraints() const;
    Congruence_System congruences() const;
    Congruence_System minimized_congruences() const;
    
    VERIFICATION_CRITERIA:

    Compare exported inequality conjunctions with independent rational source sets and equality spans with independently computed affine hulls. Include implicit equalities, redundant rows, empty/zero dimensions, exact native endpoints and lifetime/mutation independence.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/constraints1.cc; tests/BD_Shape/minconstraints1.cc; tests/BD_Shape/congruences1.cc.

  • PPL-SPEC-001065
    10. Ordinary classification of bounded-difference values UID: PPL-SPEC-001065 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The ordinary classification calls shall report their named mathematical properties of the represented set: emptiness, universe, discreteness, topological closure, boundedness and existence of an integer point. Every bounded-difference value shall be topologically closed. A nonempty convex value shall be discrete exactly when it is a singleton; empty shall be discrete and bounded. Zero-dimensional universe shall be nonempty, universe, bounded, discrete and contain its integer empty tuple; zero-dimensional empty shall contain no integer point.

    constrains(var) shall report whether the represented set imposes a restriction on that coordinate, including relational restrictions; empty shall constrain each valid coordinate. A variable outside the ambient dimension shall throw std::invalid_argument. These decisions shall not confuse stored integer bounds with an integer-only carrier.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Closed convex geometry, lattice witnesses and syntactic bound types must remain separate classifications.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool is_empty() const;
    bool is_universe() const;
    bool is_discrete() const;
    bool is_topologically_closed() const;
    bool is_bounded() const;
    bool contains_integer_point() const;
    bool constrains(Variable var) const;
    
    VERIFICATION_CRITERIA:

    Use independent rational feasibility, affine dimension, recession directions and integer witness models. Include fractional singletons without integer points, nonempty integral-bound shapes, relational restrictions, free axes, emptiness, zero dimensions and invalid variables.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/empty1.cc; tests/BD_Shape/universe1.cc; tests/BD_Shape/discrete1.cc; tests/BD_Shape/bounded1.cc; tests/BD_Shape/containsintegerpoint1.cc; tests/BD_Shape/constrains1.cc.

  • PPL-SPEC-001066
    11. Bounded-difference set relations, equality and compatible hashes UID: PPL-SPEC-001066 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For dimension-compatible operands, contains, strictly_contains and is_disjoint_from shall report mathematical set containment, proper containment and empty intersection. Equal nonempty or empty sets shall not strictly contain each other; every nonempty value shall strictly contain empty. The zero-dimensional values shall obey the same set rules. Dimension-incompatible relation calls shall throw std::invalid_argument.

    Equality shall require equal ambient dimensions and equal represented sets; inequality shall be its logical complement. Different redundant/closure descriptions of the same set shall compare equal. Equal values shall have equal hash codes; collisions between unequal values shall be permitted. hash_code shall not modify the represented set.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Set relations and hash compatibility must depend on values rather than redundant matrix descriptions.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool contains(const BD_Shape& y) const;
    bool strictly_contains(const BD_Shape& y) const;
    bool is_disjoint_from(const BD_Shape& y) const;
    int32_t hash_code() const;
    template <typename T> bool operator==(const BD_Shape<T>& x,const BD_Shape<T>& y);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Determine inclusion and disjointness by independent exact rational implication/feasibility. Cover equivalent redundant systems, strict inclusion, empty/zero dimensions, different dimensions, self relations and equal-value hash compatibility across cache histories.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/contains1.cc; tests/BD_Shape/disjoint1.cc; tests/BD_Shape/equality1.cc; tests/BD_Shape/semanticqueries1.cc.

  • PPL-SPEC-001067
    12. Relations between bounded-difference values and linear constraints UID: PPL-SPEC-001067 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(c) shall return the Poly_Con_Relation flags describing the whole represented set relative to the constraint: inclusion, disjointness, saturation when its affine expression vanishes throughout the set and strict intersection as defined by 🔗 1. Constraint-relation assertion values and named factories. The supplied row need not have bounded-difference syntax. A constraint within the ambient dimension shall not alter the represented set. A descriptor dimension above the receiver's shall throw std::invalid_argument. Empty and constant-row cases shall retain their set-theoretic flag combinations.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    A restricted representation can still answer semantic queries about arbitrary linear halfspaces and hyperplanes.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Constraint& c) const;
    
    VERIFICATION_CRITERIA:

    Project arbitrary rational affine forms independently and derive every relation flag from the attained range. Include unary, difference and general correlated forms, weak/strict/equality relations, constants, empty/zero dimensions and incompatible descriptors.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/relations1.cc; tests/BD_Shape/relations2.cc; tests/BD_Shape/relations3.cc; tests/BD_Shape/relations4.cc.

  • PPL-SPEC-001068
    13. Relations between bounded-difference values and linear congruences UID: PPL-SPEC-001068 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(cg) shall classify the represented set relative to the congruence using the declared Poly_Con_Relation semantics. Modulus zero shall mean equality. For a proper modulus, inclusion shall require every source point to satisfy the residue condition; disjointness shall mean no source point does. For a nonempty receiver, saturation shall mean that the affine image consists of one value belonging to the eligible modulus lattice; the value need not be zero. These tests shall use the real convex source set rather than treating integer bounds as integer coordinates. Arbitrary admitted affine congruence syntax shall be queryable even when it is not representable by a bounded-difference value. Descriptor dimension above the receiver's shall throw std::invalid_argument.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    A query can test periodic conditions without adding their nonconvex solution set to the representation.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Congruence& cg) const;
    
    VERIFICATION_CRITERIA:

    Combine independent rational affine ranges with exact integer-multiple tests. Check constant satisfied/unsatisfied residues, equality modulus, ranges meeting or avoiding residue levels, continuous nonconstant ranges, empty/zero dimensions and dimension rejection.

    SOURCE:

    src/Shape_Congruence_Queries.hh; tests/shapeconstantqueryspec1.cc; src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/relations1.cc; tests/BD_Shape/relations2.cc; tests/BD_Shape/relations3.cc; tests/BD_Shape/relations4.cc; tests/BD_Shape/semanticqueries1.cc; tests/shapequerycertificatespec1.cc.

  • PPL-SPEC-001069
    14. Subsumption of geometric generators by bounded-difference values UID: PPL-SPEC-001069 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(g) shall return Poly_Gen_Relation::subsumes() exactly when the represented set subsumes the generator under 🔗 6. Generator-relation assertion values and named factories. An ordinary point or closure point shall use its rational coordinates; closure points shall obey the same membership test because this domain is closed. A ray shall satisfy every represented homogeneous direction inequality, and a line shall satisfy each corresponding homogeneous equality. Empty shall subsume no generator. A generator dimension above the receiver's shall throw std::invalid_argument; a lower-dimensional generator shall have zero additional coordinates.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Point membership and recession directions require different homogeneous tests; closedness identifies point and closure-point membership.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Gen_Relation relation_with(const Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Check independent rational point substitution and homogeneous ray/line evaluation against source inequalities. Include divisor signs/canonical values, relational restrictions, zero trailing coordinates, empty/zero dimensions and incompatible descriptors. Exercise pairs with two infinite bounds, either one-sided finite bound, two finite bounds and equalities, for all four generator kinds and both descriptor representations against literal substitution.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/relations1.cc; tests/BD_Shape/relations2.cc; tests/BD_Shape/relations3.cc; tests/BD_Shape/relations4.cc.

  • PPL-SPEC-001070
    15. Affine boundedness, extrema and witnesses on bounded-difference values UID: PPL-SPEC-001070 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounds_from_above and bounds_from_below shall decide whether the supplied affine form has a finite corresponding bound on the receiver, and shall return true in both directions for empty, including zero-dimensional empty. Zero-dimensional universe shall likewise bound every admitted constant form. The form's dimension shall not exceed the receiver's; otherwise these calls and extrema overloads shall throw std::invalid_argument.

    For nonempty shapes and unbounded exact bound arithmetic, extrema calls shall return true exactly when the requested extremum is finite, and shall return its exact rational value with positive canonical denominator. Every finite extremum of this closed polyhedral set shall be attained. On false, supplied outputs shall retain their entry values.

    For bound profiles whose closure arithmetic rounds or overflows, the overload without a witness may use an outward closure bound for bounded-difference objectives: its returned maximum value shall be an upper approximation of the true supremum and its returned minimum a lower approximation of the true infimum. Overflow may prevent detecting a finite bound. General affine objectives and witness overloads shall use the represented constraint set's exact optimization contract. The attainment flag shall concern the actual extremum, rather than certify attainment of an approximate numerical bound.

    On successful witness calls, g shall identify an ordinary point in the represented set attaining the returned exact extremum. Constant affine forms and zero-dimensional values shall retain their exact meanings. Numerator/denominator output objects shall be distinct; the witness and scalar outputs shall obey their ordinary ownership and range prerequisites.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    Exact extrema of a represented set differ from inexpensive rounded closure estimates, and an approximate bound is not an optimizing witness.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool bounds_from_above(const Linear_Expression& expr) const;
    bool bounds_from_below(const Linear_Expression& expr) const;
    bool maximize(const Linear_Expression& expr,Coefficient& n,Coefficient& d,bool& maximum) const;
    bool maximize(const Linear_Expression& expr,Coefficient& n,Coefficient& d,bool& maximum,Generator& g) const;
    bool minimize(const Linear_Expression& expr,Coefficient& n,Coefficient& d,bool& minimum) const;
    bool minimize(const Linear_Expression& expr,Coefficient& n,Coefficient& d,bool& minimum,Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Use independent rational projection of an added affine-result coordinate to derive extrema/unboundedness. Verify witness membership and objective value separately; include correlated general forms, difference fast paths, constants, empty/zero dimensions, unchanged false outputs, denominator normalization and rounded/native profile enclosures.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/max_min1.cc.

  • PPL-SPEC-001071
    16. Constant affine values and zero frequency on bounded-difference sets UID: PPL-SPEC-001071 STATUS: APPROVED COMPONENT: BOUNDED_DIFFERENCES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    frequency(expr,fn,fd,vn,vd) shall return true exactly when the nonempty receiver assigns one unique real value to the affine expression. On true, fn/fd shall be 0/1 and vn/vd shall be that exact constant with positive canonical denominator. Nonconstant and empty cases shall return false and leave all four outputs unchanged. Constant expressions and zero-dimensional universe shall follow the same rule. An expression dimension above the receiver's shall throw std::invalid_argument. The four scalar output objects shall be pairwise distinct.

    The validity, lifetime, arithmetic, range, rounding and synchronization prerequisites in 🔗 1. Bounded-difference values, numerical profiles and valid use shall apply. Logically const normalization may update caches but shall preserve the represented set and ambient dimension. Underlying supported numerical or allocation failures may propagate through their declared channels. Failure during construction shall release resources owned by the incomplete shape. Failure of a mutating operation shall retain the ownership needed for safe destruction; a general rollback guarantee shall not be inferred.

    RATIONALE:

    A convex real set supports a single affine value or a continuum, rather than a nonzero lattice frequency.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for BD_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool frequency(const Linear_Expression& expr,Coefficient& fn,Coefficient& fd,
                   Coefficient& vn,Coefficient& vd) const;
    
    VERIFICATION_CRITERIA:

    Determine constancy by independent rational affine ranges/equality spans. Include correlated fixed differences on unbounded sets, fractional constants, free directions, empty/zero dimensions, negative/zero values, canonical outputs, unchanged sentinels and dimension rejection. Include sparse expressions with zero gaps, cancellations caused by successive substitutions, both expression representations and expressions with fewer declared dimensions than the receiver.

    SOURCE:

    src/BD_Shape_defs.hh; src/BD_Shape_inlines.hh; src/BD_Shape_templates.hh; tests/bdshapevaluesspec1.cc; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/bdshapevaluespublic1.cc; tests/BD_Shape/frequency1.cc; tests/BD_Shape/sparsefrequency1.cc.

  • PPL-SPEC-000461
    1. Rectangular Boolean values and valid internal use UID: PPL-SPEC-000461 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Bit_Matrix shall own a rectangular Boolean array B with r rows and c columns. Its stored row i shall represent exactly {j ∣ 0 ≤ j < c∧Bij} under 🔗 1. Finite bit-set row values and valid use. Set bits outside the declared column range shall violate the matrix invariant, even though the corresponding Bit_Row value alone is valid.

    Operations shall require live valid objects and indices, counts and capacity calculations within their supported representable and storage limits, with sufficient resources. Callers shall prevent concurrent access conflicting with mutation. No library or thread initialization object or coefficient-constant stage shall be required. Allocation or interruption failure shall not constitute a successful matrix result. Failed C++ construction shall release resources owned by its incomplete object. Surviving owners shall remain destructible; rollback shall apply only where the individual contract promises it. Ordinary allocation-failure recovery shall not be promised for fatal GMP allocation failure.

    RATIONALE:

    Incidence and saturation matrices need explicit coordinate meaning and width invariants independent of the configured coefficient type.

    INTERFACE:

    Internal source header: Bit_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Bit_Matrix.

    class Bit_Matrix;
    
    VERIFICATION_CRITERIA:

    Compare all entries and both extents with independent Boolean arrays, exercise row-width checks, preserve separate lifetimes, and run without initialization in threaded and non-thread-safe configurations. Inject observable C++ allocation failures during construction.

    SOURCE:

    src/Bit_Matrix_defs.hh; src/Bit_Matrix_inlines.hh; src/Bit_Matrix.cc; tests/bitmatrixspec1.cc; tests/matrix1.cc; tests/bitmatrixmemory1.cc.

  • PPL-SPEC-000463
    3. Owned copies, assignment, exchange and lifetime UID: PPL-SPEC-000463 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Copy construction and assignment shall preserve both source extents and all entries while establishing independent storage. Assignment shall return its target and admit self-assignment. A copy shall remain usable after source mutation or destruction. Copying an rvalue through these copy interfaces shall preserve its source. Destruction shall release the row-vector storage and the bit storage owned by its rows.

    Member and free swaps shall exchange complete shapes and row contents, including storage ownership, and admit self-swap. The resulting owners shall remain independent.

    RATIONALE:

    Copied saturation data and temporary transposition results require separate ownership without accidental sharing.

    INTERFACE:

    Internal source header: Bit_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Bit_Matrix.

    Bit_Matrix(const Bit_Matrix& y);
    Bit_Matrix& operator=(const Bit_Matrix& y);
    ~Bit_Matrix();
    void m_swap(Bit_Matrix& y);
    void swap(Bit_Matrix& x, Bit_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Check copy and assignment for empty, zero-width and populated shapes, self-assignment, source destruction, rvalue copying, independent mutations, self/member/free swaps and observable copy-construction allocation failure.

    SOURCE:

    src/Bit_Matrix_defs.hh; src/Bit_Matrix_inlines.hh; src/Bit_Matrix.cc; tests/bitmatrixspec1.cc; tests/matrix1.cc; tests/bitmatrixmemory1.cc.

  • PPL-SPEC-000467
    7. Transposition and transposed assignment UID: PPL-SPEC-000467 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Transposition of a shape r×c shall produce shape c×r and satisfy B’ji = Bij at every original coordinate. Transposed assignment shall replace its target with the transpose of the source, preserving a distinct source. It shall also admit the source being its target. A recoverable failure before the replacement is installed shall preserve the target. Zero extents shall be exchanged exactly, and transposing twice shall restore the original shape and entries.

    RATIONALE:

    Transposition exchanges incidence coordinates and needs a complete temporary owner for safe replacement and self-aliasing.

    INTERFACE:

    Internal source header: Bit_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Bit_Matrix.

    void transpose();
    void transpose_assign(const Bit_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Check rectangular, square, empty-row and empty-column shapes, individual true coordinates across limb boundaries, double transpose, distinct/source-target aliases and observable allocation failure before replacement.

    SOURCE:

    src/Bit_Matrix_defs.hh; src/Bit_Matrix_inlines.hh; src/Bit_Matrix.cc; tests/bitmatrixspec1.cc; tests/matrix1.cc; tests/bitmatrixmemory1.cc.

  • PPL-SPEC-000472
    12. ASCII representation and loading UID: PPL-SPEC-000472 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With decimal numeric formatting and numeric Boolean output selected on the stream, ASCII output shall emit the decimal row count, x and decimal column count, followed in row-major order by each entry as 0 or 1. Whitespace shall separate these tokens; each row shall have its own output line. No-argument output shall use the library diagnostic-output destination std::cerr. print() shall emit a diagnostic to std::cerr identifying that no user-level output operator is defined for Bit_Matrix.

    With decimal numeric input formatting, admissible dimensions and resources, loading shall read the shape header and exactly that many integer entry tokens, replace the target's complete shape and entries, and return true. Zero entry tokens shall denote false and nonzero integer tokens true. Invalid header tokens, invalid integer tokens or premature end of input shall return false; the target shall remain a live valid matrix, without a promise to preserve its preceding shape or entries. Tokens following a complete representation shall remain available to the caller. Successful dump/load round trips shall preserve both extents and every entry.

    RATIONALE:

    Reloadable matrix data needs explicit shape, Boolean interpretation and failure-state rules.

    INTERFACE:

    Internal source header: Bit_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Bit_Matrix.

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    void print() const;
    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Check exact dump tokens and lines, round trips of zero and rectangular shapes, replacement of old true bits by false, nonzero integer entry interpretation, trailing tokens, each malformed header category and truncation at every token boundary.

    SOURCE:

    src/Bit_Matrix_defs.hh; src/Bit_Matrix_inlines.hh; src/Bit_Matrix.cc; tests/bitmatrixspec1.cc; tests/matrix1.cc; tests/bitmatrixmemory1.cc.

  • PPL-SPEC-000473
    13. Invariant, ordering and allocated-memory queries UID: PPL-SPEC-000473 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For live rows with valid bit-row storage, OK() shall return true exactly when every row is valid and no row has a set position at or beyond the declared column count. In builds with assertions enabled, check_sorted() shall return true exactly when the stored rows are nondecreasing under their comparison order; duplicates shall be allowed.

    External memory shall equal the allocated row-vector capacity in bytes plus the external memory owned by each live bit row. Total memory shall add sizeof(Bit_Matrix). These queries shall describe allocated storage, including unused capacity retained after shrinkage, and shall preserve the matrix.

    RATIONALE:

    Validity, sortedness and allocated capacity are distinct properties that algorithms and storage diagnostics inspect.

    INTERFACE:

    Internal source header: Bit_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Bit_Matrix.

    bool OK() const;
    #ifndef NDEBUG
    bool check_sorted() const;
    #endif
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check valid and temporarily out-of-width rows, all adjacent-order outcomes and duplicates, memory identities and row-storage lower bounds through growth and shrinkage; compare exact row-vector payload with the allocation recorder in bitmatrixmemory1.

    SOURCE:

    src/Bit_Matrix_defs.hh; src/Bit_Matrix_inlines.hh; src/Bit_Matrix.cc; tests/bitmatrixspec1.cc; tests/matrix1.cc; tests/bitmatrixmemory1.cc.

  • PPL-SPEC-001043
    3. Box bounded-integer wrapping, overflow choices and guard refinement UID: PPL-SPEC-001043 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    wrap_assign shall interpret the selected coordinates as bounded integers using 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes. It shall conservatively contain every selected concrete result obtained from the receiver's entry integer-valued selected coordinates under the requested overflow interpretation. The represented result shall remain a box, so modular disjunctions and relations may be approximated. Fractional points on selected coordinates may be discarded, and retained interior points need not all be integers.

    Without a supplied guard, OVERFLOW_WRAPS shall use modular images; OVERFLOW_IMPOSSIBLE shall intersect each selected factor with the modeled value range. Under OVERFLOW_UNDEFINED, a factor already contained in the rational half-open interval from the modeled minimum through one past its maximum may be retained; a potentially overflowing factor may be forgotten and replaced by the modeled closed integer range. No-overflow factors shall not be discarded merely because another factor can overflow.

    A nonnull cs_p shall denote a guard on the resulting coordinates. The completed box shall conservatively contain the guard-filtered selected integer results; it need not satisfy every guard row. In particular, relational rows and rows mentioning unselected coordinates may be ignored by this specialization. Interval rows for selected coordinates may refine their target ranges. A false constant row shall make the result empty. The guarded undefined-overflow path may forget a selected coordinate to universe when overflow is possible; no universal post-guard containment or least-result guarantee shall be inferred.

    With an empty selection, no bounded-type limits or residues shall be required. A null guard shall preserve the receiver; a supplied guard shall perform conservative refinement under 🔗 3. Conservative box refinement by linear constraints, which may affect otherwise unselected coordinates. Empty, including a hidden empty factor, shall remain empty. Ambient dimension shall remain unchanged. For a nonempty selection, unselected factor meanings shall remain unchanged unless the entire product becomes empty. A distinct supplied guard and the selection set shall retain their mathematical values. complexity_threshold and wrap_individually shall not change this Box specialization's result.

    An excess selected coordinate or guard ambient dimension shall throw std::invalid_argument before receiver modification, including for empty receivers. Guard dimension shall be checked even with an empty selection. Only the named width, representation and overflow attributes shall be admitted; no outcome shall be specified for invalid enum values.

    The validity, numerical, lifetime and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Selected modular evaluation shall retain 🔗 2. Interval abstraction of wrapped integer images with refinement's backend prerequisites. Modeled limit construction shall use unbounded integer arithmetic independent of configured Coefficient range; conversion into an endpoint profile shall retain that profile's representability and outward-rounding conditions. A guard shall retain its descriptor context, coefficient-intermediate range and refinement prerequisites; dimension reporting shall retain the initialized context of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Otherwise valid calls shall require no additional library initialization. Underlying resource/numerical failures may leave a partially updated box.

    RATIONALE:

    A Cartesian abstraction can preserve concrete bounded-integer outcomes while losing modular disjunctions and relational guard precision; the overflow interpretation and empty-selection path determine different operations.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    // Member of Box<ITV>:
    void wrap_assign(const Variables_Set& vars,
                     Bounded_Integer_Type_Width w,
                     Bounded_Integer_Type_Representation r,
                     Bounded_Integer_Type_Overflow o,
                     const Constraint_System* cs_p = nullptr,
                     unsigned complexity_threshold = 16,
                     bool wrap_individually = true);
    
    VERIFICATION_CRITERIA:

    Compare bounded concrete integer enumeration against exact modular, possible-overflow and impossible-overflow models. Check all widths with GMP limits, native admitted widths, selected/unselected axes, closed/open and fractional factors, full periods, unbounded and lazy-empty values. Exercise all overflow modes, null/empty/false/selected/relational/unselected guards, empty selections, both precision flags and several thresholds, dimension prechecks and preserved source descriptors. Check analytic wide limits and capability independence from configured Coefficient storage.

    BIBLIOGRAPHY:

    SimonK07 | Sections 5.1–5.4, explicit wrapping and guard precision; PDF page indices 7–10 (zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_templates.hh; tests/Box/wrap1.cc; tests/Box/wraplimits1.cc; tests/Box/wrapguard1.cc; tests/Box/wrapcontracts2.cc;

    tests/wrappingspec1.cc; tests/wrappingoracle.hh; tests/wrappingpublic1.cc.

  • 1. Single-coordinate affine box image UID: PPL-SPEC-001021 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid coordinate k, dimension-compatible affine expression e and nonzero coefficient d, affine_image(k,e,d) shall enclose every vector obtained from an entry point x by replacing only coordinate k with e(x) ⁄ d. The receiving interval shall be the outward interval evaluation of that affine expression on the entry factors, including its inhomogeneous term and the sign of d. Every other coordinate interval shall retain its entry represented set.

    With exact rational endpoint operations and supported openness, the result shall be the least box containing this image. Finite numerical profiles shall retain their delegated outward enclosures, without a general best- approximation claim when intermediate arithmetic is inexact. Dependencies between the replaced coordinate and unchanged coordinates may be lost. The source expression shall remain unchanged.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    A single affine assignment can retain each unchanged coordinate while abstracting the newly introduced correlations into an interval product.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void affine_image(Variable var, const Linear_Expression& expr,
                      Coefficient_traits::const_reference denominator
                        = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Derive rational affine ranges and endpoint attainment from independent signed sums. Check constants, self-dependence, positive/negative denominators, fractional extrema, open/unbounded factors, lazy emptiness, dimension errors, explicit/default denominator and unchanged descriptors.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001022
    2. Single-coordinate affine box preimage UID: PPL-SPEC-001022 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With coordinate, expression and denominator admitted by 🔗 1. Single-coordinate affine box image, affine_preimage(k,e,d) shall enclose every vector x whose image under x’k = e(x) ⁄ d, with all other coordinates unchanged, belongs to the entry box.

    When the coefficient of xk in e is nonzero, the affine map is invertible. The result shall enclose the interval evaluation of its inverse on the entry box; with exact rational endpoint arithmetic and supported openness this shall be the least box preimage. When that coefficient is zero, the old value of xk is unconstrained by the assignment. The operation need not derive every additional restriction on other coordinates and need not compute the least box preimage, but shall retain every feasible predecessor. At coordinates other than the updated one, the result shall preserve the entry factor restrictions; feasibility filtering may tighten those factors. It may return empty only when no predecessor exists. The source expression shall remain unchanged.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Backward substitution requires existential predecessor semantics; an overwrite cannot retain a constraint on the previous value of its overwritten coordinate.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void affine_preimage(Variable var, const Linear_Expression& expr,
                         Coefficient_traits::const_reference denominator
                           = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Use exact predecessor witnesses and independent inverse maps, including positive/negative self coefficients, constants and assignments independent of the old coordinate. Check consistency versus impossibility, conservative noninvertible precision, open bounds, empty/lazy states and input rejection.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001023
    3. Generalized single-coordinate box image UID: PPL-SPEC-001023 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid coordinate k, dimension-compatible affine expression e, nonzero coefficient d and admitted comparison  ⋈ , the variable overload of generalized_affine_image shall enclose every z for which an entry point x satisfies zk ⋈ e(x) ⁄ d and zi = xi for i ≠ k. It shall retain every other coordinate's entry factor. Equality shall have the behavior in 🔗 1. Single-coordinate affine box image. A one-sided relation shall retain the required finite outer bound and remove the opposite finite bound, using outward approximation and supported endpoint openness. With exact rational endpoint operations and supported openness, the result shall be the least Cartesian box for the specified relation: the target factor shall use the exact required extremum and its attainment. This shall not promise the exact relational image or a least result under inexact arithmetic.

    The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Generalized assignment describes a relation on the new value of one coordinate, while the other coordinates remain unchanged.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void generalized_affine_image(Variable var, Relation_Symbol relsym,
      const Linear_Expression& expr,
      Coefficient_traits::const_reference denominator=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check exact rational old/new point pairs for all five admitted symbols, both denominator signs, strict endpoints, self and other-coordinate dependencies, unbounded factors, equality agreement, empty states, disequality rejection and dimension/zero-denominator errors.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001024
    4. Generalized single-coordinate box preimage UID: PPL-SPEC-001024 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For arguments and relation symbols admitted by 🔗 3. Generalized single-coordinate box image, the variable overload of generalized_affine_preimage shall enclose every predecessor x for which some entry-box point z satisfies zk ⋈ e(x) ⁄ d and zi = xi for i ≠ k. The result shall follow existential backward semantics, including reversal of a comparison when algebraically dividing by a negative coefficient. Equality shall retain 🔗 2. Single-coordinate affine box preimage. Noninvertible relations may forget predecessor information and shall not claim a least box result. Only infeasibility of the relation with the entry box shall permit an empty result. Every coordinate other than the updated one shall preserve its entry factor restriction; feasibility filtering may tighten that factor.

    The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Backward reasoning must use the primed/unprimed relation and the sign of its coefficients, rather than simply reversing an assignment.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void generalized_affine_preimage(Variable var, Relation_Symbol relsym,
      const Linear_Expression& expr,
      Coefficient_traits::const_reference denominator=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Construct independent rational predecessor/successor witnesses for all admitted relations, negative divisors and self coefficients, zero self coefficient, impossible constants, open bounds and unbounded values. Verify equality agreement and all argument rejections.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001025
    5. Generalized multi-coordinate box image UID: PPL-SPEC-001025 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For dimension-compatible affine expressions l, r and an admitted comparison  ⋈ , the expression overload of generalized_affine_image shall enclose every z for which an entry point x satisfies l(z) ⋈ r(x). For each coordinate absent from the homogeneous part of l, zi = xi shall additionally hold. A zero coefficient shall therefore leave a coordinate unchanged, irrespective of its explicit ambient dimension. When the left expression contains a coordinate, factors outside its nonzero support shall retain their entry represented sets. When the left expression is constant, the result may refine these unchanged factors within the entry box to enforce the relation.

    Coordinates occurring on the left are updated together. The same coordinate may also occur on the right, where it denotes its entry value. Exchanging the two expressions and reversing the comparison shall not be treated as an equivalent update. An enclosure may lose correlations or retain infeasible points; no least box result shall be promised.

    The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.

    An expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Primed left-hand coordinates and unprimed right-hand coordinates give an asymmetric simultaneous-update relation.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void generalized_affine_image(const Linear_Expression& lhs,
      Relation_Symbol relsym, const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Enumerate independent rational old/new pairs with several left coordinates, shared and disjoint left/right coordinates, constant sides, zero coefficients, every admitted comparison and explicit dimensions. Check unchanged coordinates, sound enclosures, empty states and rejection of incompatible/disequality inputs.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001026
    6. Generalized multi-coordinate box preimage UID: PPL-SPEC-001026 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the expression relation and admitted arguments in 🔗 5. Generalized multi-coordinate box image, the expression overload of generalized_affine_preimage shall enclose every x for which an entry-box point z satisfies l(z) ⋈ r(x) and zi = xi at every coordinate whose coefficient in l is zero. It shall use the left expression for successor values and the right expression for predecessor values, even when their coordinate sets overlap. At coordinates outside the original left expression's nonzero support, the result shall retain the entry factor restrictions, permitting sound tightening.

    The result may lose constraints during existential abstraction and need not be the least box preimage. It shall not exclude a feasible predecessor or make the result empty merely because a relational predecessor set cannot be represented exactly. Const descriptors shall remain unchanged.

    The five admitted relation symbols shall be LESS_THAN, LESS_OR_EQUAL, EQUAL, GREATER_OR_EQUAL and GREATER_THAN. NOT_EQUAL shall throw std::invalid_argument. Other relation codes shall be outside the admitted interface.

    An expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    A simultaneous relation requires existential predecessor abstraction with the original primed-coordinate convention intact.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void generalized_affine_preimage(const Linear_Expression& lhs,
      Relation_Symbol relsym, const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Use rational successor witnesses to check predecessor inclusion for shared/disjoint coordinate supports, constant left/right sides, all comparisons and signs, empty and unbounded boxes, preservation of input expressions and dimension/disequality rejection.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001027
    7. Bounded affine box image UID: PPL-SPEC-001027 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid coordinate k, dimension-compatible affine lower and upper expressions l, u, and nonzero coefficient d, bounded_affine_image shall enclose all successor vectors z from entry points x satisfying l(x) ⁄ d ≤ zk ≤ u(x) ⁄ d and zi = xi for i ≠ k. A negative denominator shall keep these divided lower/upper meanings; it shall not silently exchange the supplied expressions.

    The operation may refine feasibility of the lower/upper relation before updating the coordinate. Inconsistent divided bounds shall admit no successor, while partial feasibility shall retain all feasible successors. Conservative refinement and interval evaluation may lose precision; no least box enclosure shall be promised. The supplied expressions shall retain their values. Every coordinate other than the updated one shall preserve its entry factor restriction; feasibility filtering may tighten it.

    With exact rational interval endpoints and two constant bound expressions, a nonempty input shall produce exactly the divided closed interval at the updated coordinate, retaining the other entry factors, when the divided lower bound does not exceed the divided upper bound. Reversed divided bounds shall produce empty. This special case shall not establish a general least-box guarantee for variable-dependent bounds.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Both bounds refer to the same predecessor state, so their ordering and dependencies must be retained when defining feasible successors.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void bounded_affine_image(Variable var,
      const Linear_Expression& lb_expr, const Linear_Expression& ub_expr,
      Coefficient_traits::const_reference denominator=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independent rational predecessor/successor pairs for both denominator signs, constants, affine bounds with/without the overwritten coordinate, intersecting or contradictory bounds, strict source factors, unbounded values, empty states and invalid arguments.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001028
    8. Bounded affine box preimage UID: PPL-SPEC-001028 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the bounded affine relation and arguments in 🔗 7. Bounded affine box image, bounded_affine_preimage shall enclose all predecessors x for which an entry-box successor z satisfies l(x) ⁄ d ≤ zk ≤ u(x) ⁄ d and zi = xi for i ≠ k. Both inequalities shall constrain the same successor value. Negative denominators and coefficients shall retain the mathematically required comparison directions. The result may lose precision through existential abstraction and need not be the least box preimage. It shall retain every feasible predecessor; only an infeasible relation may yield empty. Coordinates other than the updated one shall preserve the entry factor restrictions, permitting sound tightening by feasibility filtering.

    With exact rational interval endpoints and two constant bound expressions, the result for a nonempty entry box shall be empty exactly when the divided closed interval is empty or has no point in common with the entry target factor. Otherwise, the old target coordinate shall become unconstrained and every other factor shall equal its entry factor. The entry factor's open endpoints shall govern whether a contact point is a common witness. This special case shall not establish a general least-box guarantee.

    A zero denominator, an invalid selected coordinate or an expression of greater ambient dimension shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors stored separately from the receiver shall retain their values. A scalar argument borrowed from still-live receiver storage shall use its entry value. Such a borrowed view may reflect the resulting receiver. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Backward bounded assignment must retain a common successor witness for its lower and upper inequalities.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void bounded_affine_preimage(Variable var,
      const Linear_Expression& lb_expr, const Linear_Expression& ub_expr,
      Coefficient_traits::const_reference denominator=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check rational predecessor witnesses against an independent two-inequality model, with positive/negative denominators and coefficients, self/other dependencies, constant and inconsistent bounds, open/unbounded successor factors, empty states and rejection paths.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • PPL-SPEC-001029
    9. Interval-coefficient affine box image UID: PPL-SPEC-001029 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid coordinate k and dimension-compatible Linear_Form<ITV> with nonempty bounded coefficient intervals, affine_form_image shall require a supported native floating boundary profile. It shall enclose every successor obtained from an entry point x by replacing coordinate k with a value of B + ∑iAixi, where the constant B and coefficients Ai are chosen from the supplied form's intervals. Every other coordinate shall retain its entry factor.

    The range shall use outward interval arithmetic on the entry box, including the old value of the replaced coordinate wherever it occurs. Neither successive occurrences nor coordinate choices shall create an exactness claim beyond that interval enclosure. The form shall remain unchanged and an empty box shall remain empty. Dimension checks shall occur even for an empty receiver. An exact-arithmetic boundary profile shall not be an admitted instantiation of this floating-boundary interface.

    An expression of greater ambient dimension or an invalid selected coordinate shall throw std::invalid_argument before replacement, including on empty input.

    The receiver shall retain its ambient dimension; empty input shall remain empty. Const input descriptors shall retain their values. The numerical, initialization, lifetime and synchronization prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Escaping allocation and arithmetic exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    An interval linear form carries an enclosure of possible assignment expressions, whose evaluation must remain sound after projection into a Cartesian domain.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void affine_form_image(Variable var, const Linear_Form<ITV>& lf);
    
    VERIFICATION_CRITERIA:

    Use exact rational coefficient and coordinate samples under every available native boundary format in its required initialized FPU mode, checking direction preservation. Check constant/trailing dimensions, uncertain signs and zero coefficients, self-dependence, outward non-dyadic bounds, unchanged other factors and form, empty/lazy states, dimension rejection and compile-time boundary admission.

    BIBLIOGRAPHY:

    Mine04 | Section 5, interval linear forms and intervalization (PDF page index 6, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxaffinetransfersspec1.cc; tests/boxaffinetransferoracle.hh; tests/boxrefinementoracle.hh; tests/boxaffinepublic1.cc.

  • 1. Threshold box widening and finite stabilization UID: PPL-SPEC-001034 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For compatible boxes of one fixed interval profile, let Y be the argument's entry value and X the receiver's entry value, with Y ⊆ X. The iterator overload of CC76_widening_assign shall apply the threshold interval rule of 🔗 1. Threshold interval widening and finite stabilization independently to every coordinate. It shall contain both input sets. An empty argument shall leave the receiver's represented set unchanged. Empty and universe in zero dimensions shall retain their distinct meanings. Self-aliasing shall preserve the represented set.

    For nonempty operands, a finite lower boundary moving numerically down from the previous factor shall move to the greatest threshold not above the current boundary, or become unbounded when no such threshold exists. A finite upper boundary moving numerically up shall move to the least threshold not below it, or become unbounded when no such threshold exists. Exact threshold hits, other finite boundaries and already unbounded boundaries shall retain the current factor's boundary. A finite threshold replacement shall retain the current endpoint's openness.

    The range shall use readable, multipass bidirectional iterators. It shall be finite, sorted in nondecreasing numerical order and stable throughout the call, with finite thresholds exactly representable in the boundary type. Empty ranges and duplicate values shall be admitted. The range shall not alias storage modified by the call. The numerical and policy conditions of 🔗 1. Threshold interval widening and finite stabilization shall apply.

    For a fixed dimension, interval policy and finite threshold range, the ascending recurrence shall first enclose the preceding widened result and the next input, then widen that enclosure against the preceding widened result. This recurrence shall stabilize after finitely many changes: each coordinate has only finitely many threshold/carrier boundaries to visit, and endpoint membership can weaken only finitely often. All comparisons and assignments shall satisfy the selected arithmetic profile's prerequisites.

    Unequal box dimensions shall throw std::invalid_argument before receiver modification, including empty and zero-dimensional cases. Containment of the previous argument in the current receiver shall remain a caller precondition. The box validity, lifetime, synchronization and numerical prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. A distinct argument and the threshold range shall retain their values. The enabled overload shall require the exact same Box<ITV> type and an implicit conversion from const ITV& to const Interval_Base&. Resource or numerical failures shall retain their underlying operation's guarantees; whole-operation rollback shall not be promised.

    RATIONALE:

    A Cartesian widening needs a sound coordinate rule and a finite endpoint progression under its actual operand order.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename T, typename Iterator>
      requires (std::is_same_v<T, Box<ITV>> &&
                std::is_convertible_v<const ITV&, const Interval_Base&>)
    void
    CC76_widening_assign(const T& y, Iterator first, Iterator last);
    
    VERIFICATION_CRITERIA:

    Independently enumerate nested products with strict/closed endpoints, rays, zero-dimensional values and classified/lazy emptiness. Compute predecessor/successor thresholds from mathematical sets, including exact hits, duplicate thresholds and empty ranges. Exercise pointer, vector and bidirectional-list iterators, self-aliasing, unchanged inputs and ranges, dimensional rejection and ascending recurrences. Inspect the finite-coordinate convergence argument separately from sample iterations.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2, Widening (PDF page index 4, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.

  • 2. Default box widening and precision-sensitive delay tokens UID: PPL-SPEC-001035 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    CC76_widening_assign(y,tp) shall use the threshold rule of 🔗 1. Threshold box widening and finite stabilization with the fixed ordered values  − 2,  − 1, 0, 1, 2. The selected boundary type shall represent those values exactly. widening_assign(y,tp) shall have the same behavior. Receiver and argument shall have the same dimension, and the argument's entry set shall be contained in the receiver's entry set.

    With a null token pointer or a zero counter, the receiver shall become the default threshold-widened value. With a positive counter, the receiver's represented set shall remain its entry set. The counter shall decrease by exactly one if the corresponding undelayed widening would strictly enlarge that set; otherwise it shall retain its value. Tokens shall not be consumed merely because the operation was called. The counter shall be a live, separately owned writable unsigned object, with access synchronized against other users.

    A fixed finite initial token budget, without replenishment during the ascending recurrence, shall preserve the finite-stabilization guarantee of 🔗 1. Threshold box widening and finite stabilization. Each delayed precision loss can consume at most one available token; after exhaustion the ordinary widening shall apply. Calls whose undelayed result is exact shall not require a token.

    Both entry sets, dimension checking, enabled interval type, source preservation, self-aliasing and exceptional-operation conditions shall follow 🔗 1. Threshold box widening and finite stabilization. Dimension mismatch shall be rejected before changing the receiver or counter. The result shall not depend on sharing default stop-point objects across callers. Underlying resource or numerical exceptions shall not imply a transaction over receiver and counter.

    RATIONALE:

    A delay budget should preserve precision when widening would lose it, while keeping the number of postponed losses finite.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename T>
      requires (std::is_same_v<T, Box<ITV>> &&
                std::is_convertible_v<const ITV&, const Interval_Base&>)
    void
    CC76_widening_assign(const T& y, unsigned* tp = nullptr);
    
    void widening_assign(const Box& y, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Compare the default overload and wrapper with an independent five-threshold model. Check null, zero, one and larger budgets; exact versus strictly enlarging results; repeated calls; empty and zero-dimensional cases; self-aliasing and source preservation. Verify counter changes and ascending histories through budget exhaustion, including arbitrarily many exact calls. Check mismatch rejection before counter replacement.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Section 7, widening with tokens (PDF page index 29, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76widening.cc.

  • PPL-SPEC-001036
    3. Box extrapolation with selected limiting constraints UID: PPL-SPEC-001036 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    limited_CC76_extrapolation_assign(y,cs,tp) shall require the previous argument's entry set Y to be contained in the receiver's entry set X. The boxes shall have equal ambient dimensions, and the constraint system's dimension shall not exceed them. Dimension errors shall throw std::invalid_argument before receiver or token modification, including on empty or zero-dimensional operands. Strict inequalities in the limiting system shall be admitted under the selected interval policy; their endpoint representation shall retain the outward-conversion rules below.

    For nonempty positive-dimensional inputs, limiting constraints shall be selected from the entry receiver. A nontrivial constraint concerning only one coordinate shall be selected exactly when every point of X satisfies it. Constant constraints and constraints involving multiple coordinates shall be ignored. Redundant or differently scaled rows shall not change the mathematical selection rule.

    Let L be the least box of the selected profile enclosing the conjunction of the selected coordinate constraints. Let W be the result of the default delayed widening specified by 🔗 2. Default box widening and precision-sensitive delay tokens, computed from the entry operands and counter. The result shall denote W∩L, under the same-profile intersection contract of 🔗 4. Cartesian box intersection. It shall contain X and Y and be contained in W. Under exact rational endpoint arithmetic, the selected constraints shall hold exactly. Under outward endpoint conversion, their box representation shall follow 🔗 1. Addition of optimally supported box constraints; original bounds need not all remain exact after that conversion.

    An empty previous argument, empty receiver or zero-dimensional receiver shall retain the current represented set and leave the counter unchanged. A distinct box argument and the supplied constraint system shall retain their values. Self-aliasing of the box operands shall be admitted.

    With a fixed finite limiting system, fixed profile and dimension, exact admitted comparisons/conversions and a finite token budget without replenishment, the prescribed ascending recurrence shall stabilize. Selected bounds can only be lost as the receiver grows; each coordinate can visit only the finite threshold/limiting boundary set, including open/closed membership, and its unbounded extents. Arbitrarily changing limiting systems shall have no general finite-convergence guarantee.

    The validity, lifetime, synchronization, numeric and enabled interval-type prerequisites of 🔗 2. Default box widening and precision-sensitive delay tokens shall apply. Constraint descriptors and diagnostic reporting shall retain the initialized-context prerequisites of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical and resource exceptions may propagate without whole-operation rollback.

    RATIONALE:

    A fixed set of satisfied coordinate limits can recover precision discarded by widening while preserving both input sets.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void limited_CC76_extrapolation_assign(const Box& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Independently select satisfied unary constraints from exact entry products, construct their coordinate enclosure and intersect it with the independently modeled delayed widening. Include equalities, strict and non-strict bounds, scaled rows, ignored relational/constant constraints, violated limits, repeated limits, inexact endpoint conversions and token changes. Check fixed-limit ascending recurrences and the finite candidate-bound argument. Check input preservation, aliasing, classified/lazy empty states, zero dimensions and rejection of dimension errors before mutation. Create lazy empty factors without querying or copying the box before the call. Check strict bounds on empty and zero-dimensional inputs without changing the represented set or counter.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Section 7, fixed finite limiting constraints and convergence caveat (PDF page index 30, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/limitedcc76extrapolation1.cc.

  • PPL-SPEC-001037
    4. Box narrowing with complete previous-boundary retention UID: PPL-SPEC-001037 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal-dimensional boxes, let X be the receiver's entry set and Y the previous argument's entry set, with X ⊆ Y. CC76_narrowing_assign(y) shall replace the receiver by a box Z with X ⊆ Z ⊆ Y.

    For nonempty positive-dimensional inputs, each finite previous lower boundary shall be retained in the result, including its exact value and openness. A previous unbounded lower boundary shall leave the current lower boundary unchanged. The corresponding rule shall apply to upper boundaries. Where both current and previous boundaries are finite, the complete previous boundary shall be retained; endpoint membership shall not be copied from the current factor when it differs from that previous boundary.

    An empty current set shall remain empty. If the previous set is empty, the containment precondition makes the current set empty as well. Zero-dimensional values shall retain their represented set. A distinct argument shall retain its set and dimension. Self-aliasing shall preserve the receiver's represented set.

    For a fixed dimension and interval policy, a descending recurrence shall supply a current set contained in the preceding narrowed result and narrow it against that preceding result. This recurrence shall stabilize after finitely many changes: a previous finite boundary remains fixed, and a previous unbounded boundary can become finite at most once. Reaching the empty set shall terminate further set changes. The selected endpoint comparisons and assignments shall meet their numerical prerequisites.

    Dimension mismatch shall throw std::invalid_argument before receiver modification, including empty and zero-dimensional cases. Nesting shall remain a caller precondition. The enabled overload shall require the exact same Box<ITV> type and an implicit conversion from const ITV& to const Interval_Base&. The validity, lifetime, synchronization and numerical conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Diagnostic reporting shall retain its initialized-context prerequisites. Numerical or resource exceptions shall follow the underlying operation's guarantees without a general rollback promise.

    RATIONALE:

    Recovering a finite bound from a previously unbounded approximation must preserve the complete boundary of every already finite previous constraint.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename T>
      requires (std::is_same_v<T, Box<ITV>> &&
                std::is_convertible_v<const ITV&, const Interval_Base&>)
    void
    CC76_narrowing_assign(const T& y);
    
    VERIFICATION_CRITERIA:

    Independently choose complete boundary descriptors from nested rational products. Cover every open/closed equality case, strict and unequal finite endpoints, all combinations of unbounded sides, singleton factors, empty/lazy states, zero dimensions and self-aliasing. Check both inclusions, source preservation, dimension rejection before mutation, descending histories and finite-boundary stabilization. Reuse the open-endpoint regression histories as well as fresh independently enumerated cases.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Interval_defs.hh; src/Interval_templates.hh; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc; tests/Box/cc76narrowing1.cc.

  • PPL-SPEC-001044
    1. Box construction from supported constraints UID: PPL-SPEC-001044 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(cs) shall construct the coordinate enclosure obtained by conjoining the constraints in cs with a universe box of the same ambient dimension, using the admitted row forms and endpoint interpretation in 🔗 1. Addition of optimally supported box constraints. With exact rational endpoints and supported openness, the result shall equal the conjunction of admitted rows. Rounded profiles shall preserve the specified outward endpoint enclosure, without a general optimality claim for inexact arithmetic. An empty system shall produce universe. A constant false row shall produce empty. With exact rational operations, every inconsistent admitted conjunction shall produce empty. Under inexact endpoint conversion, successive row enclosures may lose enough information to leave an inconsistent conjunction undetected.

    A non-interval row, or a nontrivial strict inequality when the selected interval policy cannot retain open boundaries, shall throw std::invalid_argument. Rejection shall still occur if an earlier admitted row already made the conjunction empty. Tautological and inconsistent constant rows shall retain their declared meanings.

    Construction from an rvalue system shall have the same result and rejection behavior. Its const source shall not be consumed or have its rows removed.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    A coordinate-constraint conjunction directly describes an interval product, but construction must retain row admission and empty-system distinctions.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    explicit Box(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Use an independent rational conjunction model for unary equalities, weak/strict inequalities, scaled rows, contradictions, constants and zero dimensions. Check lvalue/rvalue agreement, source value preservation, finite-profile outward conversion and every unsupported-row rejection, including after a contradiction.

    SOURCE:

    tests/recyclingconstructors1.cc; src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc.

  • PPL-SPEC-001045
    2. Box construction from supported congruences UID: PPL-SPEC-001045 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(cgs) shall construct the coordinate enclosure obtained by conjoining the congruences in cgs with a universe box, using the admitted forms in 🔗 2. Addition of optimally supported box congruences. Nontrivial unary equalities shall constrain the corresponding coordinate to their rational solution, with target endpoint conversion as declared. Tautological rows shall have no effect and inconsistent rows shall produce empty. An empty system shall produce universe. With exact rational interval endpoints, admitted equalities shall be represented exactly.

    A non-interval equality or a nontrivial proper congruence shall throw std::invalid_argument, including after an earlier row has made the conjunction empty. A proper congruence whose meaning is tautological or inconsistent shall retain that meaning instead of being rejected merely because its modulus is nonzero.

    Construction from an rvalue system shall have the same result and rejection behavior; its const source shall retain its rows and value.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    A box can express coordinate equalities and the two constant truth values without representing a nontrivial periodic lattice.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    explicit Box(const Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Check independent rational solutions of admitted unary equalities, fractions, negative scaling, contradictory coordinates, trivial proper congruences and zero dimensions. Compare both overloads, preserve sources and reject unsupported rows even after inconsistency.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc.

  • PPL-SPEC-001046
    3. Cartesian enclosure of a polyhedral generator system UID: PPL-SPEC-001046 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(gs) shall contain the polyhedral set generated by gs with the point, closure-point, ray and line meanings in 🔗 1. Generator kinds and numerical prerequisites and 🔗 15. Generator-system hull meaning and construction. For exact rational endpoint operations and supported openness, the result shall be its least Cartesian box.

    At a coordinate not made unbounded by directions, the finite extrema shall be those of the generator points and closure points. Such an extremum shall be included exactly when an ordinary point attains it; a closure point alone shall not include that endpoint. A ray with a nonzero component shall remove the bound in that component's sign direction. A line with a nonzero component shall remove both coordinate bounds. Zero components shall not change other factors. Inexact endpoint profiles shall provide outward enclosures of these coordinate ranges.

    An empty generator system shall produce empty with the inherited dimension. A nonempty system with no ordinary point shall throw std::invalid_argument. A point in dimension zero shall generate the unique empty tuple. Construction from an rvalue system shall have the same result, rejection and source preservation as ordinary construction.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    Independent coordinate extrema give the Cartesian enclosure of a generated convex set, while closure points distinguish finite excluded endpoints from attained ones.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    explicit Box(const Generator_System& gs);
    
    VERIFICATION_CRITERIA:

    Compute exact rational extrema and point attainment independently from raw point/closure-point coordinates and ray/line signs. Include fractions with different divisors, repeated extrema, orthogonal directions, empty and zero-dimensional systems, both overloads, profile conversion and rejection of nonempty systems without a point.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/fromgensys1.cc.

  • 4. Box conversion from bounded-difference shapes UID: PPL-SPEC-001047 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(bds,complexity) shall contain the set represented by the bounded-difference shape. Each coordinate shall use the lower and upper unary bounds implied by the source constraints. Nonempty finite extrema shall be included, since the source carrier is topologically closed. Unbounded coordinates shall retain the corresponding unbounded sides. Empty and zero-dimensional sources shall retain their set meanings.

    When the source closure and target endpoint operations are exact, including the rational-bound profile, the result shall be the least Cartesian box containing the source. Inexact source closure arithmetic or target endpoint conversion shall retain outward containment without a general best-box guarantee. The selected Complexity_Class value shall not change this constructor's mathematical result or its polynomial closure algorithm; all three declared complexity values shall be admitted.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    Implied unary difference bounds determine the coordinate projections, including bounds that are absent from the original syntactic row list.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename T>
    explicit Box(const BD_Shape<T>& bds,
                 Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Independently project rational difference-constraint systems, including chains and cycles, to obtain coordinate extrema. Compare fresh/cached sources, empty/universe and zero dimensions, closure-derived bounds, every complexity value and target numeric profiles. Check source value preservation and directed finite conversion.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, unary zero-node encoding and transitive closure (PDF page index 5, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frombdshape1.cc.

  • 5. Box conversion from octagonal shapes UID: PPL-SPEC-001048 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(oct,complexity) shall contain the set represented by the octagonal shape. Coordinate bounds shall use the implied unary signed constraints, including the division by two required for bounds on 2*x or -2*x. Nonempty finite extrema shall be included; unbounded sides, empty sources and zero-dimensional set meanings shall be retained.

    When source closure arithmetic and target endpoint operations are exact, including the rational-bound profile, the result shall be the least Cartesian box containing the source. Inexact closure or endpoint arithmetic shall retain an outward enclosure without a general optimality promise. The three declared complexity values shall be admitted, and the complexity argument shall not change this constructor's mathematical result or its polynomial closure algorithm.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    Signed-sum constraints imply unary extrema whose factor of two must be preserved when projecting into coordinate intervals.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename T>
    explicit Box(const Octagonal_Shape<T>& oct,
                 Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use independent rational projection of signed-sum systems and compare every coordinate extremum, including half-integral bounds. Cover all sign combinations, implied chains, inconsistent and unbounded cases, fresh/cached sources, dimensions, complexity arguments and outward target profiles.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, signed forms, factor of two and strong closure (PDF page indices 9–10, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frombdshape1.cc.

  • PPL-SPEC-001049
    6. Complexity-sensitive box conversion from polyhedra UID: PPL-SPEC-001049 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(ph,complexity) shall contain the source polyhedron under each of ANY_COMPLEXITY, SIMPLEX_COMPLEXITY and POLYNOMIAL_COMPLEXITY. The default shall be ANY_COMPLEXITY. Other complexity codes shall be outside the admitted interface.

    With ANY_COMPLEXITY, exact rational endpoint arithmetic and supported openness, the result shall be the least Cartesian box, including endpoint attainment for not necessarily closed polyhedra and exact preservation of emptiness. Inexact target profiles shall retain their declared outward enclosure.

    With SIMPLEX_COMPLEXITY and exact rational operations, a nonempty source shall have exact coordinate infima and suprema, but a finite unattained bound may be included. A topologically closed source shall therefore have its least Cartesian box in the exact rational target profile. The operation need not detect an empty not necessarily closed system whose closed relaxation is nonempty. A more precise result obtained from an already available generator representation shall also be admitted.

    With POLYNOMIAL_COMPLEXITY, the constructor may use a bounded constraint-propagation computation whose pass budget grows linearly with the space dimension and which stops early when coordinates cease changing. The resulting box shall remain a containing approximation; no general least-box, fixed-point propagation, exact emptiness detection or implementation-specific iteration-count guarantee shall be inferred. Available equivalent source representations may yield different allowed approximations. Each complexity option shall retain the corresponding declared algorithmic complexity bound.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. On success and when construction throws, a source shall retain a valid representation of its unchanged value; logically const normalization may update its caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    A conversion budget may trade optimal coordinate projections for conservative propagation. A dimension-dependent budget accommodates long bound-dependency chains, while a finite cutoff also terminates on asymptotically contracting cycles. Strict endpoint attainment additionally distinguishes open boxes from their closures.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    explicit Box(const Polyhedron& ph,
                 Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Project independently encoded rational closed/NNC polyhedra using exact elimination. Require the least open box for ANY, exact finite extrema with optional endpoint closure for nonempty SIMPLEX inputs, and sound containment for POLYNOMIAL inputs. Include correlated systems, closed-relaxation-only feasibility, cache/representation histories, all complexity values, source preservation and target profile conversion. Include polynomial conversions of long lower/upper bound chains, strict seeds, variable and row permutations, dense and sparse storage, and a rational cycle that cannot reach its fixed point in finitely many propagation passes. Sweep each measured C++ allocation failure position during pending-constraint integration and fresh constraint-backed minimization, including existing and discovered affine equalities, dense and sparse representations, and closed and NNC sources. Check source validity before retrying, unchanged geometry against the entry conjunction, and a successful retry against independently derived exact coordinate bounds.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; src/Polyhedron_defs.hh; src/Polyhedron_nonpublic.cc; src/Polyhedron_minimize_templates.hh; src/Polyhedron_simplify_templates.hh; tests/polyhedronconstraintconversionfailure1.cc; tests/throw_on_allocation.hh; tests/Box/frompolyhedron1.cc; tests/Box/frompolyhedron2.cc.

  • PPL-SPEC-001050
    7. Cartesian enclosure of a rational grid UID: PPL-SPEC-001050 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(gr,complexity) shall contain the rational grid. A coordinate whose value is fixed throughout a nonempty grid shall be constrained to that rational value, with target endpoint conversion as specified. If a line or an integer-parameter direction varies that coordinate, its projection shall be unbounded in both directions. Correlations and periodic gaps shall not become additional Cartesian restrictions.

    With exact rational interval endpoints the result shall be the least Cartesian box of the grid. Finite inexact target profiles shall provide the outward coordinate enclosure. Empty grids and zero-dimensional empty/universe shall retain their set meanings. All three declared complexity values shall be admitted; the argument shall not change the mathematical result or the polynomial generator-based computation.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    A rational grid coordinate is either fixed or ranges without a finite lower or upper bound; a box cannot retain periodic gaps or cross-coordinate congruences.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    explicit Box(const Grid& gr,
                 Complexity_Class complexity=POLYNOMIAL_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Derive exact coordinate projections from independent rational base points, real line directions and integer parameter directions. Include fractional fixed coordinates, non-axis-aligned generators, finite-index lattice correlations, redundant descriptions, fresh/cached congruence/generator states, empty/zero dimensions, complexity options and outward target conversion.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation (PDF page indices 9–10, zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/fromgrid1.cc.

  • PPL-SPEC-001051
    8. Box conversion from partially reduced products UID: PPL-SPEC-001051 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(dp,complexity) shall convert each component domain of dp into the target box profile under the supplied admitted complexity value, then take their same-profile box intersection. The result shall contain every point in the product's represented component intersection. Each component conversion shall retain its own admission, numerical and complexity prerequisites.

    Even when both component conversions are individually least, their box intersection need not be the least box of the product: constraints correlating coordinates across components may be lost. No additional reduction or global optimality guarantee shall be inferred. Empty component enclosures shall yield empty; an empty semantic product whose separate component boxes overlap may yield a nonempty approximation. The default complexity value shall be ANY_COMPLEXITY.

    The result shall inherit the source's ambient dimension, including when empty. A source dimension above max_space_dimension() shall throw std::length_error before allocating that coordinate storage. Its coordinate storage shall have the independent ownership specified in 🔗 3. Owned box copying, assignment and cleanup. Endpoint conversion shall retain the profile conditions in 🔗 4. Upward box conversion between interval profiles.

    Sources shall remain live, valid and synchronized throughout construction. Their represented values shall remain unchanged; logically const normalization may update their caches. The selected source-domain arithmetic and the target interval operations shall meet their range, resource, rounding and policy prerequisites. The numerical and runtime prerequisites in 🔗 1. Cartesian box values, coordinate identity and valid use, and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization where used, shall apply. Failure during construction shall release resources owned by the incompletely constructed box. Underlying numerical or resource exceptions may propagate.

    RATIONALE:

    Projecting separate component sets and then intersecting coordinate enclosures is sound, while shared relational information can make the exact product projection smaller.

    INTERFACE:

    Public header: <ppl.hh>; constructor excerpts for Box<ITV> in Parma_Polyhedra_Library:

    template <typename D1, typename D2, typename R>
    explicit Box(const Partially_Reduced_Product<D1,D2,R>& dp,
                 Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Independently construct component Cartesian enclosures and intersect them. Include agreeing/conflicting coordinate bounds, relational intersections tighter than the intersection of hulls, empty and zero-dimensional products, several reductions/components, all admitted complexity values and source value preservation.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxconversionsspec1.cc; tests/boxconversionoracle.hh; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxconversionspublic1.cc; tests/Box/frompartiallyreducedproduct1.cc.

  • 1. Rectilinear distance between Box endpoint tuples UID: PPL-SPEC-001052 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the endpoint differences dj of 🔗 4. Box endpoint-distance domain, workspaces and dispatch, rectilinear_distance_assign shall compute the requested directed bound on

    D1(X, Y) =  ∑jdj.

    This shall be a distance of endpoint descriptions, not the minimum distance between a point of each box. Openness shall not affect it. With exact rational temporary arithmetic and an exactly representable output, the finite sum shall be returned exactly.

    The source interpretation, exceptional dimensional/empty/infinite cases, false-output preservation, numerical directions, workspace choices and lifetime conditions of 🔗 4. Box endpoint-distance domain, workspaces and dispatch shall apply to every overload. With supported arithmetic and representable intermediates, a completed upward result shall be at least the exact distance and a completed downward result at most the exact distance. A numerical or resource failure shall not establish a successful directed-bound result. Both sources shall retain their values and dimensions.

    RATIONALE:

    Endpoint descriptions give a deterministic numerical comparison of boxes; its meaning differs from geometric point-to-set separation.

    INTERFACE:

    Public header: <ppl.hh>; PPL free functions:

    template <typename To, typename ITV>
    bool rectilinear_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Temp, typename To, typename ITV>
    bool rectilinear_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Work, typename To, typename ITV>
    bool rectilinear_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Independently flatten rational product descriptions and sum their absolute finite endpoint differences. Check exact sums, both source orders, all three overload forms, supplied scratch/result overlaps, identical owners, open/closed descriptions with equal endpoints, unbounded positions, empty and zero-dimensional conventions, mismatch sentinels and directed native output bounds.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/boxdistancesspec1.cc; tests/boxdistanceoracle.hh; tests/boxdistancespublic1.cc; tests/Box/intervalcontracts1.cc; tests/boxrationalmetrictemporaries1.cc.

  • 2. Euclidean distance between Box endpoint tuples UID: PPL-SPEC-001053 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the endpoint differences dj of 🔗 4. Box endpoint-distance domain, workspaces and dispatch, euclidean_distance_assign shall compute the requested directed bound on

    D2(X, Y) = √( ∑jd2j).

    Each squared contribution shall preserve the requested bound on this nonnegative endpoint distance, including when conversions into a temporary format are inexact. This endpoint-tuple norm shall not be identified with the minimum set distance or general Euclidean Hausdorff distance between the represented boxes. Openness shall not affect it. A rational temporary square root shall retain the enclosure and precision conditions of 🔗 2. Finite rational square root at the selected irrational precision and 🔗 3. Selection and ownership of irrational rational precision; no universal exactness of a rational perfect-square input or universal fixed error width shall be inferred beyond those contracts.

    The source interpretation, exceptional dimensional/empty/infinite cases, false-output preservation, numerical directions, workspace choices and lifetime conditions of 🔗 4. Box endpoint-distance domain, workspaces and dispatch shall apply to every overload. With supported arithmetic and representable intermediates, a completed upward result shall be at least the exact distance and a completed downward result at most the exact distance. A numerical or resource failure shall not establish a successful directed-bound result. Both sources shall retain their values and dimensions.

    RATIONALE:

    A directed bound on a sum of squares requires bounds on nonnegative contributions; squaring a negative lower approximation does not preserve that ordering.

    INTERFACE:

    Public header: <ppl.hh>; PPL free functions:

    template <typename To, typename ITV>
    bool euclidean_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Temp, typename To, typename ITV>
    bool euclidean_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Work, typename To, typename ITV>
    bool euclidean_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute the exact rational sum of squared endpoint differences independently. Check directed results by exact squaring with the appropriate sign condition; include zero, Pythagorean and irrational norms, rational precision choices, inexact temporary conversions, matching/mismatching unbounded endpoints, all overloads and result/scratch overlaps, dimension mismatch and scalar range/resource prerequisites.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/boxdistancesspec1.cc; tests/boxdistanceoracle.hh; tests/boxdistancespublic1.cc; tests/Box/intervalcontracts1.cc; tests/boxrationalmetrictemporaries1.cc.

  • 3. Maximum-coordinate distance between Box endpoint tuples UID: PPL-SPEC-001054 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the endpoint differences dj of 🔗 4. Box endpoint-distance domain, workspaces and dispatch, l_infinity_distance_assign shall compute the requested directed bound on

    D∞(X, Y) =  maxjdj, 

    with value zero for an empty finite endpoint tuple. Openness shall not affect this endpoint comparison. With exact rational temporary arithmetic and an exactly representable output, the finite maximum shall be returned exactly.

    The source interpretation, exceptional dimensional/empty/infinite cases, false-output preservation, numerical directions, workspace choices and lifetime conditions of 🔗 4. Box endpoint-distance domain, workspaces and dispatch shall apply to every overload. With supported arithmetic and representable intermediates, a completed upward result shall be at least the exact distance and a completed downward result at most the exact distance. A numerical or resource failure shall not establish a successful directed-bound result. Both sources shall retain their values and dimensions.

    RATIONALE:

    The largest endpoint displacement is a separate norm from the sum and sum-of-squares comparisons and needs its own infinity and zero conventions.

    INTERFACE:

    Public header: <ppl.hh>; PPL free functions:

    template <typename To, typename ITV>
    bool l_infinity_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Temp, typename To, typename ITV>
    bool l_infinity_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir);
    template <typename Work, typename To, typename ITV>
    bool l_infinity_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Independently compute the maximum endpoint difference. Check exact rational and directed native results, ties, zero-contribution coordinates, every coordinate as unique maximum, source symmetry, all overloads and admitted scratch/result overlaps, equal endpoints with different openness, unbounded positions and dimension/empty conventions.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/boxdistancesspec1.cc; tests/boxdistanceoracle.hh; tests/boxdistancespublic1.cc; tests/Box/intervalcontracts1.cc; tests/boxrationalmetrictemporaries1.cc.

  • 4. Box endpoint-distance domain, workspaces and dispatch UID: PPL-SPEC-001055 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For equally dimensioned nonempty ordinary-real boxes, each finite lower or upper endpoint shall occupy its corresponding position in a tuple of 2n endpoints. A position finite in both boxes shall contribute dj = |ej(X) − ej(Y)|. A matching unbounded lower position or matching unbounded upper position shall contribute zero; a position unbounded in exactly one source shall make each supported distance positive infinity. Endpoint openness shall be ignored, so boxes differing only in endpoint inclusion may have distance zero.

    Two empty boxes of equal ambient dimension shall have distance zero; exactly one empty box shall have positive-infinite distance. These conventions shall apply also in dimension zero, distinguishing zero-dimensional empty from universe. Unequal ambient dimensions shall return false before modifying the result or caller-supplied scratch objects. Equal dimensions shall return true on successful numerical completion, with the assigned distance specified by 🔗 1. Rectilinear distance between Box endpoint tuples, 🔗 2. Euclidean distance between Box endpoint tuples or 🔗 3. Maximum-coordinate distance between Box endpoint tuples. A Boolean success shall not imply exactness of a rounded value.

    The default overload shall allocate three Checked_Number<To,Extended_Number_Policy> workspaces. The overload with an explicit scalar temporary type Temp shall instead allocate three Checked_Number<Temp,Extended_Number_Policy> workspaces. The supplied workspace overload shall use the actual Work type of its three references, which may be an admitted raw or checked numerical type. Each scalar conversion, subtraction, accumulation, square, square root and final assignment shall satisfy its backend's representability, numerical failure, resource, shared-temporary, nontrapping and caller-owned FPU conditions. Native floating conversions or computations shall retain their configured availability and hardware prerequisites. Rational square-root precision shall remain stable throughout a dependent call.

    Calls evaluating a finite endpoint difference shall use ROUND_UP or ROUND_DOWN, optionally with ROUND_STRICT_RELATION. They shall not require endpoint conversions to be exact solely to establish a directed bound. Paths assigning only the exact zero or positive-infinite exceptional value shall admit any otherwise valid direction request for that scalar assignment. Sources shall satisfy 🔗 1. Cartesian box values, coordinate identity and valid use; no NaN or included-infinity element shall be introduced into their ordinary-real carrier. An output profile shall support positive infinity whenever that outcome is reachable. Otherwise valid calls shall require no additional library initialization beyond the selected numerical/thread prerequisites.

    The three supplied scratch objects shall be pairwise distinct and have storage disjoint from both source boxes. Their entry numerical values need not be initialized when the call overwrites them before reading. The result shall have live assignable storage disjoint from the source boxes; it may coincide with any one scratch object or its compatible raw storage. Result and scratch aliases shall use source values on entry. The same box may be supplied for both sources. Source factor views shall retain their read-only contract 🔗 7. Empty-aware borrowed coordinate interval access. Callers shall synchronize access, including cached emptiness updates, and preserve object/borrowed-storage lifetimes. Failures other than ordinary dimension mismatch shall retain the selected scalar policy's permitted partial output/scratch state, with no aggregate rollback guarantee.

    The generic l_m_distance_assign helper shall apply these rules when instantiated with the library's rectilinear, Euclidean or maximum-coordinate specialization for that same workspace type. The sum, sum-of-squares/square-root and maximum accumulation shall use the shared numerical specializations of 🔗 17. Rectilinear distance between bound-entry arrays, 🔗 18. Euclidean distance between bound-entry arrays and 🔗 19. Maximum-coordinate distance between bound-entry arrays, respectively. The source tuple here shall consist of Box endpoints, with the Box admission and overlap conditions stated above.

    RATIONALE:

    Source tuples, aliases and numeric setup define when a directed endpoint-distance result is meaningful; endpoint norms do not distinguish all topological differences between boxes.

    INTERFACE:

    Public header: <ppl.hh>; PPL free functions:

    template <typename Specialization, typename Work, typename To, typename ITV>
    bool l_m_distance_assign(
        Checked_Number<To,Extended_Number_Policy>& result,
        const Box<ITV>& x, const Box<ITV>& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Check the three named specialization dispatches against independent endpoint norms, including shared and mismatching infinite positions, classified/lazy emptiness, every zero-dimensional pair and unequal dimensions. Instantiate default, explicit scalar and raw/checked supplied workspaces; exercise result aliases to each scratch object and identical input owners. Preserve result and all scratch sentinels on dimension mismatch. Compare directed bounds under inexact conversions without imposing exact-source-conversion admission; check pure valid calls without additional Init and native availability guards.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/boxdistancesspec1.cc; tests/boxdistanceoracle.hh; tests/boxdistancespublic1.cc; tests/Box/intervalcontracts1.cc; tests/boxrationalmetrictemporaries1.cc.

  • PPL-SPEC-001038
    1. Exact topological closure of boxes UID: PPL-SPEC-001038 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    topological_closure_assign() shall replace the receiver by its exact topological closure over the ordinary real carrier. It shall include each finite boundary point of a nonempty factor while preserving that boundary's value and retaining unbounded directions. Empty, including a product with an unclassified empty factor, shall remain empty. The ambient dimension shall remain unchanged. The operation shall be idempotent and shall preserve an already closed box. A closed-only interval profile shall not introduce a distinct value merely because no openness bits are stored.

    Finite endpoint closure and policy admission shall follow 🔗 5. Interval closure and endpoint exclusion; closing factors shall not turn an empty product into a nonempty one.

    The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Exceptions escaping a delegated interval operation may leave a partly updated receiver; no aggregate rollback shall be inferred.

    RATIONALE:

    A finite Cartesian product of nonempty real intervals has the product of their closures; the empty case must be treated separately.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void topological_closure_assign();
    
    VERIFICATION_CRITERIA:

    Compare exact rational Cartesian closures for strict, closed, half-open, singleton, unbounded, classified and lazy-empty factors in dimensions zero through three. Check containment, endpoint identity, idempotence and ambient dimension. Instantiate open-capable and closed-only numerical profiles; check active native endpoint payloads and valid calls without extra Init.

    SOURCE:

    src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc.

  • PPL-SPEC-001039
    2. Least box enclosure of nonnegative real-time progression UID: PPL-SPEC-001039 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the receiver's entry set X and the argument's entry set Y of the same ambient dimension, time_elapse_assign(y) shall replace the receiver by the least box of its admitted interval profile containing

    {x + ty ∣ x ∈ X,  y ∈ Y,  t ∈ ℝ,  t ≥ 0}.

    The progression parameter shall be one common nonnegative real number for all coordinates. The result shall be the Cartesian enclosure of this progression set; it need not preserve relationships induced by the common time. Where the interval profile can express the exact coordinate ranges, the enclosure shall be exact as a box. Zero time shall preserve every entry receiver point when the direction set is nonempty. If either entry set is empty, the result shall be empty, including in dimension zero. Finite extremal values retained from the receiver shall retain their inclusion or exclusion, and unbounded progression shall be represented as an unbounded coordinate direction.

    The ambient dimension shall remain unchanged. A distinct y shall retain its set and dimension; self-aliasing shall use both entry sets. Unequal ambient dimensions shall throw std::invalid_argument before modifying the receiver, including when either operand is empty.

    The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Dimension-error reporting shall retain the context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical or allocation exceptions may leave a partly updated receiver; no aggregate rollback shall be inferred.

    RATIONALE:

    A shared progression time can create relations between coordinates even when states and directions are boxes; the least Cartesian enclosure must distinguish that loss of correlation from unsoundness.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void time_elapse_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Construct an independent positive-time homogenized rational constraint system, eliminate state, displacement and time coordinates, and combine its coordinate ranges with zero-time states. Check all signs, zero rates, strict zero endpoints, finite and unbounded directions, fractional states, empty/lazy states, dimension zero, common-time correlation loss, self-aliasing, distinct-source preservation and dimension errors before mutation. Check native endpoint profiles without requiring rounded arithmetic absent from the operation.

    BIBLIOGRAPHY:

    HalbwachsPR97 | Sections 4.3.1–4.3.2, time-elapse operator; PDF page index 20 (zero-based).

    SOURCE:

    src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc; tests/Box/timeelapse1.cc.

  • PPL-SPEC-001040
    3. Selected-coordinate integer-point normalization of boxes UID: PPL-SPEC-001040 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    drop_some_non_integer_points(complexity) shall normalize every factor; drop_some_non_integer_points(vars,complexity) shall normalize exactly the selected coordinates. The result shall introduce no point outside the entry box and shall preserve every entry point integral on the selected coordinates. Unselected factors and the ambient dimension shall retain their meanings. An empty selection shall preserve the box; an empty receiver, including a product with a hidden empty factor, shall remain empty. Each admitted complexity argument shall have the same mathematical meaning for these Box operations.

    For ordinary real factors satisfying the exact endpoint and unit-adjustment preconditions of 🔗 2. Interval endpoint normalization around integer points, each selected factor shall become the least interval hull of its integer points. A factor with no integer point shall make the product empty. A varying interval between distinct integer endpoints may retain noninteger interior points: the operation shall not change the underlying real carrier into an integer carrier. Selected unbounded directions shall retain their unbounded meaning. Normalization shall be idempotent. Closed factors with integral boundary storage shall already have the required endpoint meaning.

    A selected variable outside the receiver dimension shall throw std::invalid_argument before modification, including for empty or closed-only boxes. The selected-coordinate set shall remain unchanged.

    The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Delegated interval operations shall retain their scalar range, resource, shared-temporary and caller-owned FPU prerequisites. These operations shall impose no additional library initialization on otherwise valid calls. Dimension-error reporting shall retain the context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical or allocation exceptions may leave a partly updated receiver; no aggregate rollback shall be inferred.

    RATIONALE:

    The Cartesian hull of selected-coordinate integer solutions tightens endpoint ranges while allowing real values between retained integers and leaving unselected coordinates unrestricted.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void drop_some_non_integer_points(
        Complexity_Class complexity = ANY_COMPLEXITY);
    void drop_some_non_integer_points(
        const Variables_Set& vars,
        Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Enumerate independent integer candidates around every finite rational boundary and form their Cartesian interval hull, retaining analytically unbounded tails. Compare all coordinate selections and complexity values; check open integral and fractional endpoints, negative boundaries, no integer solution, unselected fractional factors, empty selection, lazy empty, dimension zero and idempotence. Check selected-source preservation and dimension exceptions, exact native open-capable endpoints and the closed-integral identity path under the delegated range prerequisites.

    SOURCE:

    src/Box_defs.hh; src/Box_templates.hh; src/Interval_defs.hh; tests/boxnormalizationandtimespec1.cc; tests/boxnormalizationoracle.hh; tests/boxnormalizationpublic1.cc.

  • 1. Addition of optimally supported box constraints UID: PPL-SPEC-001016 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraint(c) shall admit a dimension-compatible linear constraint with at most one nonzero homogeneous coefficient. A nonconstant strict inequality shall additionally require a profile supporting open endpoints. The successful result shall enclose the intersection of the entry box and the constraint and remain contained in the entry box. With exact admitted endpoints and openness, that intersection shall be represented exactly; otherwise the affected factor shall use its least supported outward interval enclosure. Constant truth or falsity shall leave the value unchanged or make it empty, including the zero-dimensional cases.

    A constraint of greater ambient dimension, a non-interval constraint, or an unsupported nonconstant strict inequality shall throw std::invalid_argument. The support checks shall still apply to an empty receiver. add_constraints(cs) shall apply the same obligations to the conjunction of all supplied constraints; a support error may follow earlier successful additions, so the system form shall not promise rollback. System ambient dimension, including unused trailing coordinates, shall be checked before refinement. Const descriptors shall retain their values.

    add_recycled_constraints(cs) shall have the same mathematical result and shall leave the supplied mutable system safely destructible on ordinary or exceptional return. can_recycle_constraint_systems() shall return false. No right to reuse a recycled system's prior contents shall be inferred from this capability value.

    The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Separable constraints can be enforced directly; unsupported relational information must be distinguished from an accepted conservative refinement.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void add_constraint(const Constraint& c);
    void add_constraints(const Constraint_System& cs);
    void add_recycled_constraints(Constraint_System& cs);
    static bool can_recycle_constraint_systems();
    
    VERIFICATION_CRITERIA:

    Derive exact intersections for constant and one-coordinate constraints, both coefficient signs, fractional boundaries and all admitted strictness. Check closed-only profiles, non-interval rejection even on empty receivers, unused system dimensions, bulk partial failure, returned capability, recycled lifetime, preserved const donors and resource failure.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.

  • PPL-SPEC-001017
    2. Addition of optimally supported box congruences UID: PPL-SPEC-001017 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruence(cg) shall admit a dimension-compatible equality congruence with at most one nonzero homogeneous coefficient, and constant tautological or inconsistent proper congruences. An equality shall have the same numerical enclosure as addition of its equivalent linear equality under 🔗 1. Addition of optimally supported box constraints. A tautology shall leave the receiver unchanged; an inconsistency shall make it empty. A nontrivial proper congruence or a relational equality shall throw std::invalid_argument, including when the receiver is already empty.

    add_congruences(cgs) shall apply these obligations to the conjunction of its entries. The whole system's ambient dimension shall be checked before addition, even if its nonzero coefficients use fewer dimensions. Any input of greater ambient dimension shall throw std::invalid_argument. A bulk support error may follow earlier changes; no rollback shall be promised. Const congruences and systems shall retain their values.

    add_recycled_congruences(cgs) shall give the same mathematical result and leave its supplied mutable system safely destructible on success or exception. can_recycle_congruence_systems() shall return false; the caller shall not rely on a recycled input retaining its prior contents.

    The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    An interval product can enforce separable equalities directly but cannot generally express a periodic lattice constraint.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void add_congruence(const Congruence& cg);
    void add_congruences(const Congruence_System& cgs);
    void add_recycled_congruences(Congruence_System& cgs);
    static bool can_recycle_congruence_systems();
    
    VERIFICATION_CRITERIA:

    Compare supported equalities with exact rational singleton intersections. Exercise true and false constant proper congruences, relational equalities, positive-modulus nontrivial rejection, both coefficient signs, empty/zero-dimensional boxes, system dimension and partial failures, recycled lifetime and const-source preservation.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.

  • 3. Conservative box refinement by linear constraints UID: PPL-SPEC-001018 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible constraint c, refine_with_constraint(c) shall produce a box X’ satisfying X∩{x : c(x)} ⊆ X’ ⊆ X, where X is the receiver's entry set. Unlike optimal addition, refinement shall admit relational constraints and strict constraints under closed-only profiles, using outward supported bounds where necessary. It shall not reject a constraint solely because its exact intersection is not a box.

    A constant inconsistency shall make the box empty; a constant tautology shall preserve it. A separable constraint shall refine its affected factor; relational constraints shall propagate necessary coordinate bounds and need not yield the least box enclosure. Empty shall remain empty. refine_with_constraints(cs) shall perform at most one refinement step per constraint in one traversal, stopping early on detected emptiness. The result may depend on traversal order; no fixed-point or least-enclosure guarantee shall be inferred.

    Dimension mismatch, including excess system ambient dimension, shall throw std::invalid_argument before replacement. The receiver's ambient dimension and the supplied const descriptors shall remain unchanged.

    The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Sound coordinate refinement can use relational information without pretending that a Cartesian box represents its full conjunction exactly.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void refine_with_constraint(const Constraint& c);
    void refine_with_constraints(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Check exact satisfying rational valuations remain enclosed and that results stay within the entry box. Include equality and both inequalities, zero/nonzero coefficient signs, open and closed-only profiles, constants, unbounded factors, empty/lazy states, single-pass systems and order-sensitive examples, preserved descriptors and dimension errors.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc; tests/Box/refinewithconstraints2.cc.

  • PPL-SPEC-001019
    4. Conservative box refinement by linear congruences UID: PPL-SPEC-001019 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible congruence g, refine_with_congruence(g) shall produce X’ with X∩{x : g(x)} ⊆ X’ ⊆ X. An equality congruence shall use the linear-constraint refinement in 🔗 3. Conservative box refinement by linear constraints. A constant inconsistent proper congruence shall make the receiver empty. Other proper congruences may leave its box unchanged, retaining soundness without claiming an explicit lattice representation or periodic endpoint tightening.

    refine_with_congruences(cgs) shall refine the conjunction by applying the supported per-entry refinement and may stop when emptiness is detected. It shall not require a fixed point or least box enclosure. Empty shall remain empty and zero-dimensional constants shall retain their logical meaning. Input congruences and systems shall remain unchanged. An input or system ambient dimension larger than the box dimension shall throw std::invalid_argument before replacement; the receiver dimension shall remain unchanged.

    The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    A sound periodic-constraint refinement can retain the original interval product when a stronger periodic representation is unavailable.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void refine_with_congruence(const Congruence& cg);
    void refine_with_congruences(const Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Check exact equality refinements, constant proper truths/falsities, nontrivial periodic constraints whose satisfying samples are retained, negative affine terms, bulk equalities and periodic combinations, empty/zero-dimensional cases, unused system dimensions and source preservation.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc.

  • PPL-SPEC-001020
    5. Controlled box constraint propagation UID: PPL-SPEC-001020 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For dimension-compatible linear constraints, propagation shall tighten coordinate bounds without deleting any entry point satisfying the supplied constraint or conjunction, and without enlarging the entry box. It shall accept equality and strict or nonstrict inequality constraints under the selected supported numerical profile, retaining required outward rounding and any openness the profile can represent. Constant contradictions shall make the box empty; tautologies and empty inputs shall retain their set meanings.

    propagate_constraint(c) shall perform one propagation step for the constraint. propagate_constraints(cs, max_iterations) shall make at most max_iterations passes when that argument is positive, using each constraint at most once per pass unless emptiness is detected first. A pass leaving every interval unchanged shall terminate propagation early. A finite pass limit shall permit later calls to continue tightening the current box.

    Zero, including the default argument, shall mean no pass limit and may lead to nontermination. Even reaching an unchanged pass shall not establish a least box enclosure of the conjunction. Traversal and intermediate rounding may affect the final precision. Greater constraint or system ambient dimension shall throw std::invalid_argument before replacement. The box dimension and const input descriptors shall remain unchanged.

    The valid-profile, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Allocation and endpoint exceptions shall retain their delegated guarantees without a general rollback promise.

    RATIONALE:

    Propagation must retain sound bounds while giving callers an explicit finite-work control for recurrences that need not stabilize.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    void propagate_constraint(const Constraint& c);
    void propagate_constraints(const Constraint_System& cs,
                               dimension_type max_iterations=0);
    
    VERIFICATION_CRITERIA:

    Use independent exact rational satisfying valuations and coordinate limits, all coefficient signs, fractional arithmetic, strict/open bounds, unbounded terms, constants, empty/lazy states and mismatches. Exercise one versus several finite passes, continuation, early stability and empty-system termination. Test unlimited mode only on proven terminating examples; analyze its absence of a general convergence promise. Exercise finite native operands whose intermediate arithmetic overflows to infinity. Check that discarding an unusable infinite candidate retains a sound entry enclosure, including strict and nonstrict numerical result relations.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxrefinementspec1.cc; tests/boxrefinementoracle.hh; tests/boxallocationfixture.hh; tests/boxpublic1.cc. tests/Box/propagateconstraints1.cc; tests/Box/propagateconstraints2.cc; tests/Box/refinewithconstraints2.cc.

  • PPL-SPEC-001030
    1. Exact extraction of individual box boundaries UID: PPL-SPEC-001030 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty receiver and a variable var within its ambient dimension, has_lower_bound(var,n,d,closed) shall return true exactly when that factor has a finite lower boundary. On true, n ⁄ d shall be its exact infimum, with d > 0, coprime numerator and denominator, and denominator one when the numerator is zero. closed shall state whether that boundary belongs to the factor. has_upper_bound shall give the corresponding exact supremum and upper boundary inclusion. On false, all supplied output objects shall retain their values. Numerator and denominator outputs shall be distinct.

    These calls shall require the stated nonempty and coordinate-validity preconditions; they shall not promise validation or a specified outcome outside them. The represented box and ambient dimension shall remain unchanged. The profile, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Finite endpoint conversion and coefficient assignment shall retain the selected numerical policy's range and exception conditions; an exception shall not imply rollback of outputs already assigned. Valid use shall impose no additional initialization requirement beyond the selected numerical facilities.

    RATIONALE:

    Exact boundary values and inclusion distinguish an open extremum from an attained coordinate value.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    bool has_lower_bound(Variable var, Coefficient& n, Coefficient& d,
                         bool& closed) const;
    bool has_upper_bound(Variable var, Coefficient& n, Coefficient& d,
                         bool& closed) const;
    
    VERIFICATION_CRITERIA:

    Use exact rational factors and independently decoded finite native endpoints. Check positive/negative/zero fractions, canonical signs, both open boundaries, one-sided and fully unbounded factors, unchanged sentinel outputs on false, source preservation and valid use without additional initialization. Exercise selected checked coefficient range failures separately from ordinary false results.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc.

  • PPL-SPEC-001031
    2. Constraint and congruence exports of box values UID: PPL-SPEC-001031 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    constraints() shall return an owned, dimension-preserving constraint system whose conjunction denotes exactly the receiver. Finite coordinate boundaries shall retain their exact values and strictness; unconstrained coordinates shall not introduce restrictions. Empty, including an unclassified empty factor, shall export an inconsistent conjunction. Zero-dimensional universe shall export the tautological conjunction and zero-dimensional empty an inconsistent one.

    minimized_constraints() shall return an equivalent system, using one equality for a singleton factor and the necessary finite endpoint constraints for a nonsingleton factor. The interface shall not require a particular row order or syntactic scaling.

    congruences() and minimized_congruences() shall return owned, dimension-preserving congruence systems containing every receiver point. For a nonempty box, they shall express exactly the affine equalities fixing its singleton coordinates and shall impose no periodic restriction on varying factors. Empty shall export an inconsistent system. The two forms shall have the same mathematical meaning; no extra proper congruence precision shall be inferred from minimization.

    The box's set and dimension shall remain unchanged and returned systems shall be independent values. The validity, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Construction of output descriptors shall retain the initialized library and thread context required by 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Coefficient representability, intermediate arithmetic and reported range failures shall follow the configured coefficient profile; resource or numerical exceptions shall not promise a returned partial system.

    RATIONALE:

    A constraint system can describe every coordinate interval exactly, while congruences express only the singleton-coordinate equalities of a nonempty Cartesian box.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    Constraint_System constraints() const;
    Constraint_System minimized_constraints() const;
    Congruence_System congruences() const;
    Congruence_System minimized_congruences() const;
    
    VERIFICATION_CRITERIA:

    Compare exported constraints with independent Cartesian membership and exact rational elimination. Check singleton equalities and redundant-row freedom without prescribing row order. Evaluate exported congruences on singleton and varying coordinates; include rational singletons, strict intervals, absent trailing coordinates, universe, classified and lazy empty, both zero-dimensional values, owned-result independence and descriptor resource failure.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/constraints1.cc; tests/Box/minconstraints1.cc; tests/Box/congruences1.cc;

  • PPL-SPEC-001032
    3. Affine boundedness, extrema and witnesses on boxes UID: PPL-SPEC-001032 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounds_from_above(expr) and bounds_from_below(expr) shall decide exactly whether the affine expression's values over the receiver are bounded in the indicated direction. Empty shall be bounded in both directions. Zero coefficients shall not make an otherwise bounded objective unbounded because of unused coordinate factors.

    maximize shall return true exactly when the receiver is nonempty and the objective is bounded above. On true, its numerator and positive denominator shall give the exact supremum as a reduced fraction, and maximum shall be true exactly when some receiver point attains it. minimize shall analogously report the exact infimum and attainment. A constant objective on any nonempty box shall be attained, including in zero dimensions. Ordinary false shall preserve every supplied output. Numerator and denominator outputs shall be distinct.

    The generator overloads shall additionally return a point in the receiver when the extremum is attained, and a closure point in its topological closure when it is not attained. Its coordinates, including coordinates absent from the expression, shall satisfy the respective membership condition, and its objective value shall equal the reported extremum. Omitted generator coordinates shall have their declared zero-extension meaning. A witness shall not be accepted merely because it gives the correct objective value.

    An expression's ambient dimension greater than the box dimension shall throw std::invalid_argument before changing outputs, including for an empty receiver or a constant expression with excess declared dimension. The represented box, its dimension and the supplied expression shall retain their values. The profile, numerical, lifetime and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Expressions and generators shall retain their descriptor prerequisites; creating output generators and reporting dimension errors shall retain the context of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. Numerical intermediate and output representability shall follow the selected coefficient profile. Reported allocation or numerical exceptions may leave outputs partly assigned; ordinary false-result preservation shall not imply exception rollback.

    RATIONALE:

    An exact extremum, its attainment and a valid extremizing witness are separate mathematical obligations.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    bool bounds_from_above(const Linear_Expression& expr) const;
    bool bounds_from_below(const Linear_Expression& expr) const;
    bool maximize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& maximum) const;
    bool maximize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& maximum, Generator& g) const;
    bool minimize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& minimum) const;
    bool minimize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& minimum, Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Project an independently constrained objective coordinate using exact rational elimination. Cover all coefficient signs, strict and closed boundaries, fractional endpoints, unused bounded and unbounded coordinates, constant objectives, empty and zero-dimensional boxes and lazy emptiness. Check reduced fractions, attainment, every coordinate of point/closure-point witnesses and exact objective evaluation. Verify all false-result sentinels, dimension errors before output replacement and selected numerical/resource failure outcomes.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/max_min1.cc; tests/Box/interval1.cc;

  • PPL-SPEC-001033
    4. Detection of constant affine values and zero frequency UID: PPL-SPEC-001033 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    frequency(expr,fn,fd,vn,vd) shall return true exactly when the receiver is nonempty and the expression has one value throughout it. On true, fn and fd shall be zero and one, respectively, while vn/vd shall be that exact value as a reduced fraction with positive denominator. A coordinate with zero expression coefficient shall not prevent constancy even when its factor varies or is unbounded. For boxes this success shall express a unique value, not a nonzero periodic frequency. Empty shall return false. Zero-dimensional universe shall return the expression's constant term with zero frequency.

    Ordinary false shall preserve all four supplied output values. Those outputs shall be distinct. Greater expression ambient dimension shall throw std::invalid_argument before output replacement, including when the receiver is empty. The expression and the represented box and its ambient dimension shall retain their values.

    The profile, numerical, lifetime and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Expression descriptors and dimension error reporting shall retain their initialized-context prerequisites. Coefficient intermediate and output representability and reported range failures shall follow the configured coefficient profile. Allocation or numerical exceptions may leave output values partly assigned; ordinary false-result preservation shall not imply exception rollback.

    RATIONALE:

    A Cartesian product has a discrete affine image only when the expression is constant on its nonempty factors.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Box<ITV> in Parma_Polyhedra_Library:

    bool frequency(const Linear_Expression& expr, Coefficient& fn,
                   Coefficient& fd, Coefficient& vn, Coefficient& vd) const;
    
    VERIFICATION_CRITERIA:

    Use an independent exact objective projection to distinguish singleton ranges from varying and unbounded ranges. Include multiple rational singleton coordinates, negative coefficients, offsets, ignored free coordinates, open intervals, empty/lazy states, zero-dimensional values, source preservation, four unchanged false-result sentinels and excess expression dimension. Check the exact 0/1 frequency and canonical value, plus selected checked arithmetic failures.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxqueriesspec1.cc; tests/boxqueryoracle.hh; tests/boxqueriespublic1.cc. tests/Box/frequency1.cc;

  • PPL-SPEC-000973
    1. Box relations with linear constraints UID: PPL-SPEC-000973 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible constraint with affine expression e(x) and relation e(x) ⋈ 0, relation_with(c) shall report exactly the applicable assertions: is_disjoint() when no represented point satisfies the constraint; is_included() when every represented point satisfies it; strictly_intersects() when some but not all represented points satisfy it; and saturates() when every represented point has e(x) = 0. Saturation shall be independent of whether the inequality is strict.

    An empty box shall therefore report disjoint, included and saturating, without strict intersection. A nonempty box lying on an excluded strict boundary shall report disjoint and saturating. The zero-dimensional universe shall use its unique empty tuple, and omitted coefficients shall be zero. A constraint of greater ambient dimension shall throw std::invalid_argument without changing the represented box.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Logical relation assertions distinguish exclusion, implication, partial intersection and boundary equality, including vacuous truths on the empty set.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Constraint& c) const;
    
    VERIFICATION_CRITERIA:

    Compare the full assertion set with independently derived exact rational affine ranges, signs and endpoint attainment. Include constants, equality and both inequalities, one and several nonzero coefficients, open bounds, unbounded coordinates, zero dimensions, lazy emptiness, dimension mismatch and unchanged mathematical inputs.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations2.cc; tests/Box/relations3.cc.

  • PPL-SPEC-000974
    2. Box relations with linear congruences UID: PPL-SPEC-000974 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible congruence with affine expression e(x) and modulus m, relation_with(cg) shall interpret m = 0 as the equality e(x) = 0, and positive m as membership of e(x) in mℤ. It shall report disjointness, inclusion or strict intersection by the corresponding quantified assertions over the represented box. On a nonempty box, saturates() shall hold when its affine image is a single value satisfying the congruence. An empty box shall report disjoint, included and saturating. The unique zero-dimensional point shall be tested against the constant congruence.

    Excluded finite endpoints shall not establish a congruence witness. The first eligible lattice value and all affine-range intermediates shall not be restricted to the configured coefficient range. A congruence whose ambient dimension exceeds the box dimension shall throw std::invalid_argument without changing the represented box.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Congruence relations require actual lattice intersections with the affine range; a rounded bound or an excluded lattice endpoint is insufficient.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Congruence& cg) const;
    
    VERIFICATION_CRITERIA:

    Use independent integer divisibility and rational affine-image bounds. Check positive moduli, equality congruences, both coefficient signs, constants, open and closed endpoints at lattice values, fractional bounds, unbounded ranges, singleton images, coefficient endpoints, lazy/marked emptiness, zero dimensions and mismatches.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations4.cc.

  • PPL-SPEC-000975
    3. Box subsumption of geometric generators UID: PPL-SPEC-000975 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible geometric generator, relation_with(g) shall return Poly_Gen_Relation::subsumes() exactly when the generator is subsumed, and nothing() otherwise. A point shall be subsumed exactly when its rational coordinates belong to the box. A closure point shall use membership in the topological closure of a nonempty box. Coordinates omitted from the generator shall be zero, including all trailing box coordinates.

    A ray shall be subsumed exactly when translating any box point by every nonnegative multiple of its direction remains in the box; a line shall use every real multiple. Zero direction components shall impose no condition; a positive or negative ray component shall require the corresponding upper or lower absence of a finite bound, and a nonzero line component shall require an unconstrained factor. An empty box shall subsume no generator. The zero-dimensional universe shall subsume every admitted zero-dimensional generator. A generator with greater dimension shall throw std::invalid_argument without changing the represented box.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Points, closure points and recession directions express different geometric obligations and must retain their distinct boundary semantics.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    Poly_Gen_Relation relation_with(const Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Check exact rational point coordinates, divisors, omitted zero coordinates, open/closed finite bounds and closure points on excluded boundaries. Exercise both ray signs, lines, mixed zero/nonzero directions, unbounded coordinates, empty and zero-dimensional boxes, dimension errors and donor preservation.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/relations1.cc; tests/Box/relations2.cc; tests/Box/relations3.cc.

  • 4. Cartesian box intersection UID: PPL-SPEC-000976 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For same-profile boxes of equal ambient dimension, intersection_assign(y) shall replace the receiver by the exact set intersection of the two entry values, preserving their ambient dimension. Each nonempty result factor shall be the corresponding interval intersection. Empty and universe shall obey the ordinary set identities, including dimension zero. The operation shall admit self-intersection and shall preserve a distinct donor's represented value. Any empty factor shall make the result empty regardless of cached classification.

    Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Exact coordinate intersections implement the meet of Cartesian boxes without introducing correlations or losing endpoint openness.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    void intersection_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Derive coordinate intersections independently for all supported endpoint combinations. Include touching open/closed bounds, unbounded factors, empty coordinates in different positions, lazy/marked states, zero dimensions, self-aliasing, donor preservation and mismatched dimensions. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/intersection1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

  • PPL-SPEC-000977
    5. Least same-profile box upper bound UID: PPL-SPEC-000977 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For same-profile boxes of equal ambient dimension, upper_bound_assign(y) shall replace the receiver by the least box of that profile containing both entry sets. For nonempty operands this shall use the coordinate-wise least interval hulls; endpoint inclusion shall retain every admitted input point. An empty operand shall be neutral, including a lazily empty operand, and the zero-dimensional cases shall retain empty/universe meaning.

    The operation shall admit a donor identical to the receiver, preserve the represented value of a distinct donor and keep ambient dimension. Dimension mismatch shall throw std::invalid_argument before replacing the receiver's represented value. The result need not equal the union.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    The least enclosing Cartesian product may fill gaps or introduce combinations absent from the disjunctive union.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    void upper_bound_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Compare independent coordinate hulls and openness with both input sets, including crossing coordinate choices, contained operands, separated intervals, equal extrema, empty/universe, zero dimensions, lazy state, self-aliasing, preserved donors and mismatches. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperbound1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

  • PPL-SPEC-000978
    6. Conditional exact union of boxes UID: PPL-SPEC-000978 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For same-profile boxes of equal dimension, upper_bound_assign_if_exact(y) shall return true exactly when their set-theoretic entry union is representable as a box of that profile. On true it shall replace the receiver by that union. On false the receiver's represented value shall remain unchanged; a partial coordinate hull shall not escape as a failed result. A distinct donor shall remain unchanged in either case.

    Exactness shall account for gaps and excluded touching endpoints within a factor, and for incompatible alternatives in different coordinates. Mere intersection or exactness of every separate coordinate hull shall not establish exactness of the Cartesian union. Empty, equal, contained, zero-dimensional and self-aliased operands shall use their set meanings. Dimension mismatch shall throw std::invalid_argument before replacement.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    An exact-union query must distinguish a true disjunction from the potentially larger product of its coordinate hulls.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    bool upper_bound_assign_if_exact(const Box& y);
    
    VERIFICATION_CRITERIA:

    Independently decide union equality with the Cartesian hull, including one-axis changes, opposite containment directions across axes, separated and touching factors with all openness choices, contained/empty/equal/zero-dimensional states, every rejection position, false-result preservation and self histories.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/upperboundifexact1.cc.

  • PPL-SPEC-000979
    7. Same-profile abstract box difference UID: PPL-SPEC-000979 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For same-profile boxes of equal ambient dimension, difference_assign(y) shall replace the receiver by the least box of that profile containing the set-theoretic difference of the two entry values. It may retain removed points when the difference is not itself representable as a box. With exact rational endpoints and supported openness this shall be the Cartesian interval hull of the exact difference.

    Empty subtraction, subtraction from empty, self-subtraction, coverage and zero-dimensional cases shall follow their set meanings. Removal of a boundary shall preserve the remaining endpoint's required openness where representable. A difference split into separate pieces shall use their least same-profile enclosure. A distinct donor shall retain its represented value, self-aliasing shall be admitted and ambient dimension shall remain. Dimension mismatch shall throw std::invalid_argument before replacement.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Differences of Cartesian products can be disconnected; their box abstraction must state its precision instead of implying set-theoretic exactness.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    void difference_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Independently derive exact differences and their coordinate projections for zero, one and several dimensions. Cover equality, containment, disjointness, a single non-contained factor, multiple exclusion alternatives, removed open/closed boundaries, interior holes, empty/lazy states, self-subtraction, donor preservation and mismatch.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/difference1.cc.

  • PPL-SPEC-000980
    8. Context-preserving box simplification UID: PPL-SPEC-000980 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For same-profile boxes of equal ambient dimension, let X and Y be the receiver and context entry sets. simplify_using_context_assign(y) shall produce a box X’ with X ⊆ X’ and X’∩Y = X∩Y, keeping ambient dimension. The operation may discard bounds made redundant by the context. It shall not promise a unique or maximally enlarged result.

    A false return shall establish X∩Y = ⌀; a true return shall retain the intersection-preservation guarantee without an additional exact nonemptiness claim. Empty contexts and receivers and zero-dimensional values shall follow these set obligations. A distinct context's represented value shall remain unchanged. With the receiver also used as context, entry-value semantics shall still apply. Dimension mismatch shall throw std::invalid_argument before replacement.

    The valid-profile, entry-state, numerical, lifetime, initialization and synchronization prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Mathematical observations may refresh internal caches without changing a represented set. Allocation and endpoint-operation exceptions shall retain their delegated guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Bounds may be removed outside the relevant context while the original constrained intersection and primitive-domain enlargement are preserved.

    INTERFACE:

    Public header: <ppl.hh>; member excerpt for Box<ITV> in Parma_Polyhedra_Library:

    bool simplify_using_context_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Check input inclusion and equality of the original/result intersections with an independent product model. Include redundant bounds, disjoint factors at every position, empty and universe contexts, empty receiver, open endpoints, unbounded factors, zero dimensions, self-context and mismatch. Interpret the Boolean using its stated one-sided guarantee.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxsetoperationsspec1.cc; tests/boxsetoracle.hh; tests/boxpublic1.cc; tests/Box/simplifyusingcontext1.cc.

  • PPL-SPEC-000969
    1. Human-readable box presentation UID: PPL-SPEC-000969 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Insertion shall write false for an empty box and true for a universe box. Otherwise, it shall visit every ambient coordinate in increasing index order and write the active variable name, the literal separator " in ", and that coordinate's interval presentation. Consecutive coordinates shall be separated by ", ". Unrestricted factors of a non-universe product shall also be shown. Zero-dimensional empty and universe shall retain their respective words. Successful insertion shall return the supplied stream reference without adding a newline or explicitly flushing it.

    Variable names shall follow the active formatter and its live-callback prerequisites in 🔗 7. Active Variable formatter and initialized thread state and 🔗 8. Variable names, formatter dispatch and output failures. Interval presentation shall follow 🔗 2. Readable interval presentation and output delivery, including stream formatting and locale. The display shall not encode a separate ambient-dimension header. print() shall deliver the same display to the current std::cerr without appending a newline.

    The represented box value shall remain unchanged; logically const emptiness/universe queries may refresh status. Stream failures shall retain the supplied stream's state and exception-mask behavior. Exceptions escaping the selected formatter, endpoint or stream operations shall propagate with partial output retained; their internal stream handling shall follow the applicable exception mask. Rendering callbacks shall not invalidate or mutate the box or coordinate storage being visited.

    The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.

    RATIONALE:

    A readable list of coordinate factors must preserve order and use the configured coordinate names.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    namespace IO_Operators {
      template <typename ITV>
      std::ostream& operator<<(std::ostream& s, const Box<ITV>& box);
    }
    // Member of Box<ITV>:
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check exact words and coordinate order using independent literal intervals, default/custom variable formatters, unrestricted factors, zero-dimensional cases and lazy emptiness. Verify stream identity, no newline, print redirection, source values and partial failure/exception behavior.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.

  • PPL-SPEC-000970
    2. Reloadable box record export UID: PPL-SPEC-000970 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under compatible machine-output formatting and endpoint serialization prerequisites, ascii_dump(s) shall emit the box status record, the label space_dim, the ambient dimension and a newline, followed by exactly one serialized interval record per coordinate in increasing index order. The status protocol shall follow 🔗 5. Status ASCII loading and partial rejection state; interval records shall follow 🔗 4. Reloadable interval metadata and endpoint export. The record shall retain enough information to reload the same ambient dimension and mathematical Cartesian value with 🔗 3. Compatible box record loading and failure state.

    For a box whose status already certifies emptiness, endpoint storage may be inactive. Export shall emit a valid canonical universe interval for each such coordinate without interpreting inactive endpoint payloads. The certified empty status shall preserve the empty Cartesian meaning independently of those replacement records. For other valid status states, coordinate export shall retain the interval serialization's metadata and inactive-payload rules. Export shall preserve the source mathematical value and shall not require first querying its emptiness.

    ascii_dump() shall deliver the same record to the current std::cerr. Output shall require sufficient stream resources, compatible numeric formatting/locale and the selected endpoint codec's prerequisites. Stream/endpoint/resource failures shall retain their own state and exception behavior, with no output rollback. The record shall not imply cross-version or different-policy format compatibility.

    The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.

    RATIONALE:

    Machine records must preserve dimension and empty-set meaning without reading inactive coordinate payloads.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    // Members of Box<ITV>:
    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Round-trip independently modeled empty/universe, zero-dimensional and mixed-factor boxes in classified and unclassified states. Inspect label/count/order and canonical inactive-factor records. Check concatenated records, source preservation, stderr delivery and failing output streams, including native endpoint profiles with inactive storage.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.

  • PPL-SPEC-000971
    3. Compatible box record loading and failure state UID: PPL-SPEC-000971 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a complete valid record produced under 🔗 2. Reloadable box record export with compatible status, interval policy, endpoint arithmetic, dimension limits, numeric formatting and locale, ascii_load(s) shall return true and replace the destination by the recorded ambient dimension and mathematical Cartesian value. It shall consume one box record, permitting a following record or suffix to remain in the stream. A previously different destination dimension or value shall not affect a successful result.

    Status-field parsing and its outcomes shall follow 🔗 5. Status ASCII loading and partial rejection state. A missing or incorrect space_dim label, an absent, negative-signed or unsupported dimension, or a rejected or truncated coordinate interval record shall return false when stream extraction returns normally. Coordinate loading shall follow 🔗 5. Compatible interval record loading and partial failure state. A completed record that fails the box invariant check shall return false in every build. Stream exception masks and selected endpoint/resource exceptions shall retain their own propagation rules. A complete admissible dimension shall fit the selected box profile and available resources. Use trusted compatible dumps.

    Failure may have replaced status and some coordinate records or discarded the previous coordinate sequence. A false return or exception shall not promise rollback or a complete valid mathematical box value. The object shall retain safely destructible owned resources and may be replaced by assignment from a valid box; callers shall establish a valid replacement before mathematical queries or other operations requiring a valid box. Input already consumed shall not be restored. Successful loading shall not transfer ownership of the input stream.

    The validity, numerical, synchronization and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. The selected interval profile shall provide the required codec, output or memory operations. Borrowed objects and streams shall remain live throughout the call.

    RATIONALE:

    Reloadable records need a precise success contract and an explicit partial-update failure state.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    // Member of Box<ITV>:
    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Load independently generated compatible records into different prior dimensions, check exact mathematical values and repeated/concatenated loading. Exercise incorrect/truncated status, header and endpoint fields, prefixes and exception-enabled streams. Reassign valid values after every failed load before querying; check resource cleanup and successful reuse.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.

  • PPL-SPEC-000624
    9. Backing-array allocation failure preserves the prior map UID: PPL-SPEC-000624 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When insertion or erasure requires replacement backing arrays, a recoverable failure allocating either replacement array shall preserve the prior complete map and its coefficient ownership, release incomplete replacement storage and retain valid cached ends. No insertion, removal or coordinate transformation shall be reported as a successful result when its required backing allocation fails. A retry with sufficient resources shall remain possible.

    This guarantee shall cover ordinary and hinted insertion, occupied/key erasure and erase-and-shift operations when they trigger a backing replacement. It shall not promise ordinary recovery after a fatal GMP allocation failure or after violation of a member's valid-input preconditions.

    RATIONALE:

    Relocation must not consume old coefficient owners until both replacement arrays are available.

    INTERFACE:

    Internal source header: CO_Tree_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to CO_Tree; iterator and data_type_const_reference are its nested types.

    iterator insert(dimension_type key);
    iterator insert(dimension_type key, data_type_const_reference data);
    iterator insert(iterator itr, dimension_type key);
    iterator insert(iterator itr, dimension_type key, data_type_const_reference data);
    iterator erase(dimension_type key);
    iterator erase(iterator itr);
    void erase_element_and_shift_left(dimension_type key);
    
    VERIFICATION_CRITERIA:

    Force growth and shrinkage and fail each replacement-array allocation for every applicable interface, preserving dictionary values and multi-limb owner identities; then retry and check the independent successful mutation.

    SOURCE:

    src/CO_Tree_defs.hh; src/CO_Tree_inlines.hh; src/CO_Tree.cc; tests/CO_Tree/cotreemutationspec1.cc; tests/CO_Tree/cotree1.cc; tests/CO_Tree/memory1.cc.

  • 1. Ordered coefficient-map values and valid tree use UID: PPL-SPEC-000601 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    CO_Tree shall own a finite map from distinct dimension_type keys to Coefficient values. Stored keys shall be strictly ordered and shall exclude not_a_dimension(). A stored zero coefficient shall remain a stored map entry. Physical array positions and holes shall not change the map's key/value associations.

    Calls shall require live valid owners, admitted keys/counts and supported nonoverflowing capacity calculations, with sufficient resources. Selected coefficient values and operations shall satisfy the configured arithmetic profile's prerequisites. Library initialization shall be active where coefficient constants or scratch storage are used, and synchronization shall follow 🔗 3. Thread initialization, default state and finalization. Recoverable failures shall not be successful map results. Failed construction shall release resources of the incomplete owner; failure-state guarantees shall follow the selected member, without a universal rollback promise.

    RATIONALE:

    Sparse numerical storage must preserve explicit key/value associations independently of the cache-oblivious array layout.

    INTERFACE:

    Internal source header: CO_Tree_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to CO_Tree or its indicated nested iterator type.

    class CO_Tree;
    
    VERIFICATION_CRITERIA:

    Compare complete ordered maps with independent integer dictionaries, including explicitly stored zeros and extreme valid keys, through valid lifetime and lookup histories.

    SOURCE:

    src/CO_Tree_defs.hh; src/CO_Tree_inlines.hh; src/CO_Tree_templates.hh; src/CO_Tree.cc; tests/CO_Tree/cotreespec1.cc; tests/CO_Tree/cotree1.cc; tests/CO_Tree/memory1.cc.

  • PPL-SPEC-000603
    3. Independent copying, assignment and destruction UID: PPL-SPEC-000603 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Copy construction and assignment shall preserve the source map and produce independently owned coefficient objects and backing arrays. Copies shall remain usable after source mutation or destruction. Assignment shall admit self-assignment and return its target. Copying a const rvalue through these copy interfaces shall preserve its source. Destruction shall release all live coefficients and both backing arrays.

    Recoverable copy-construction failure shall preserve the source and release the incomplete copy's resources. A recoverable assignment failure may discard the target's preceding contents, but shall leave a valid empty reusable target and preserve the source.

    Transfer construction from a non-const rvalue shall acquire the complete owned storage without allocating or throwing and leave its source empty and reusable. Move assignment shall exchange complete storage owners without allocation or exceptions, return its target and leave its source holding the preceding target value. Self-move shall preserve both value and storage. References to elements shall follow their storage; distinct-owner transfers shall invalidate element iterators. References to cached ends shall remain bound to their original tree owners and shall be refreshed after transfer. Explicitly stored zeroes and physical layout metadata shall be transferred with their arrays.

    RATIONALE:

    Tree copies need separate value ownership, while destructive replacement assignment has an explicit empty-target failure state.

    INTERFACE:

    Internal source header: CO_Tree_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to CO_Tree or its indicated nested iterator type.

    CO_Tree(const CO_Tree& y);
    CO_Tree& operator=(const CO_Tree& y);
    ~CO_Tree();
    CO_Tree(CO_Tree&& y) noexcept;
    CO_Tree& operator=(CO_Tree&& y) & noexcept;
    
    VERIFICATION_CRITERIA:

    Check nonthrowing move traits, zero C++/GMP allocation during transfers, exact values and storage ownership, empty and reserved-empty inputs, self-moves, const-rvalue copies, source reuse and independent mutations after exchange. Check independent populated/empty copies and assignments, self-assignment, source destruction, rvalue copying, multi-limb owners where available and both backing-allocation failures followed by retry.

    SOURCE:

    tests/rowmovespec1.cc; src/CO_Tree_defs.hh; src/CO_Tree_inlines.hh; src/CO_Tree_templates.hh; src/CO_Tree.cc; tests/CO_Tree/cotreespec1.cc; tests/CO_Tree/cotree1.cc; tests/CO_Tree/memory1.cc.

  • PPL-SPEC-000604
    4. Construction from a counted increasing-key input sequence UID: PPL-SPEC-000604 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a count not exceeding max_size(), sequence construction shall consume exactly that many entries from the input position. The sequence shall provide coefficient values by dereference and their keys through index(); keys shall be valid and strictly increasing. The new map shall contain exactly those key/value pairs, including zero values, as independently owned coefficient copies. No following input position shall be dereferenced or have its key requested. Count zero shall produce an empty map without dereferencing or advancing the input.

    If allocation, key access, dereference, coefficient construction or input advancement reports a recoverable exception, the incomplete tree shall release both backing arrays and every coefficient already constructed. The caller's input state shall follow its iterator's own copy and failure semantics; restoring a consumed input position shall not be promised.

    RATIONALE:

    Counted sparse ranges provide efficient construction and must clean partial ownership even when the input iterator reports a failure.

    INTERFACE:

    Internal source header: CO_Tree_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to CO_Tree or its indicated nested iterator type.

    template <typename Iterator>
    CO_Tree(Iterator i, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Compare every prefix of independent increasing-key sequences, include zero count and growth boundaries, and throw at each key/dereference/advance step after partial coefficient acquisition.

    SOURCE:

    src/CO_Tree_defs.hh; src/CO_Tree_inlines.hh; src/CO_Tree_templates.hh; src/CO_Tree.cc; tests/CO_Tree/cotreespec1.cc; tests/CO_Tree/cotree1.cc; tests/CO_Tree/memory1.cc.

  • PPL-SPEC-000613
    13. Managed storage counts backing arrays and live coefficient payloads UID: PPL-SPEC-000613 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    External-memory accounting shall return zero for a tree with no backing arrays. Otherwise it shall count the complete reserved key-array payload, including its two sentinel slots, the coefficient-array payload, including its unused leading slot, and the external storage of every live coefficient. Unoccupied coefficient slots shall not add coefficient payload. This shall describe owned allocated payload, excluding allocator bookkeeping, and preserve the map and all current iterators.

    RATIONALE:

    Sparse tree storage includes physical holes and sentinels as well as the coefficients visible during traversal.

    INTERFACE:

    Internal source header: CO_Tree_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to CO_Tree or its indicated nested iterator type.

    dimension_type external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Independently calculate reserved-array sizes and live coefficient allocation payloads across sparse layouts, multi-limb values where supported, copies, clear and ownership exchanges.

    SOURCE:

    src/CO_Tree_defs.hh; src/CO_Tree_inlines.hh; src/CO_Tree_templates.hh; src/CO_Tree.cc; tests/CO_Tree/cotreespec1.cc; tests/CO_Tree/cotree1.cc; tests/CO_Tree/memory1.cc.

  • 2. Finite coefficient construction, copying and comparison UID: PPL-SPEC-000042 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A default-constructed Coefficient shall have value zero. Construction from a representable native integral input and copying from a live coefficient shall preserve the source integer value. The common native input forms covered here are char, signed char, unsigned char, short, unsigned short, int, unsigned int, long and unsigned long. Copy assignment shall replace the target value with the source's entry value, return a reference to the target and preserve a distinct source. Self-copy assignment shall preserve the value. Later mutation of a value shall not change a distinct copy. Destruction of one value shall not invalidate another value or a separately owned copy of a constant.

    For live finite coefficient values, equality and ordering comparisons shall agree with equality and ordering of their mathematical integers and shall preserve the operands. These obligations shall hold independently of object identity and the current floating-point rounding direction.

    Construction and use shall satisfy the applicable initialized-thread protocol in 🔗 3. Thread initialization, default state and finalization. Callers shall prevent concurrent access to an object while another operation changes it. This contract's integral-input guarantee requires the input value to be representable in the selected profile.

    RATIONALE:

    Coefficients must retain integer value semantics across the selected backend, even when that backend owns dynamically allocated limbs.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit these forms in a C++ client function using PPL names:

    Coefficient zero;
    Coefficient x(7);
    Coefficient y(x);
    Coefficient& target = (y = x);
    y = y;
    bool equal = (x == y);
    bool different = (x != y);
    bool less = (x < y);
    bool less_equal = (x <= y);
    bool greater = (x > y);
    bool greater_equal = (x >= y);
    

    The literals illustrate admitted calls; the value guarantees apply to all representable operands in this contract.

    VERIFICATION_CRITERIA:

    Check default zero, positive and negative integral construction, copy construction, assignment return identity, self-assignment and independent later mutation. Compare all six predicates against an independent integer ordering, including bounded endpoints and large multi-limb GMP values. Destroy original values while retaining copies. Exercise assertion and nonassertion builds.

    SOURCE:

    src/Coefficient_types.hh; src/Checked_Number_inlines.hh; GMP integer provider; tests/coefficient2.cc.

  • 5. Checked coefficient overflow and result-policy dispatch UID: PPL-SPEC-000045 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, COEFF_CHECKED_I8, COEFF_CHECKED_I16, COEFF_CHECKED_I32, COEFF_CHECKED_I64 VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a checked bounded coefficient profile, an ordinary coefficient arithmetic operation in 🔗 3. Exact ordinary integral coefficient arithmetic, or quotient calculation in 🔗 4. Coefficient quotient and remainder with truncation toward zero, whose exact integer result is outside the selected range shall throw std::overflow_error instead of returning a successful wrapped result. This includes negation of the least representable integer, endpoint-crossing increment or decrement, and dividing the least representable integer by -1. Operand prerequisites other than representability shall still apply.

    After a supported arithmetic overflow exception, a surviving coefficient object shall remain destructible and assignable to a new representable value. Its previous value shall not be promised to remain unchanged. A constructor that throws shall not produce a usable object. Exception-message text shall not be prescribed. These promises shall not extend overflow checking to a native coefficient profile or promise rejection of a zero divisor.

    For checked profiles, Bounded_Integer_Coefficient_Policy::handle_result(r) shall return normally exactly when result_overflow(r) is zero and result_class(r) differs from VC_NAN. Otherwise it shall dispatch to throw_result_exception(r). Supported positive/negative overflow codes, including unknown intermediate overflow, shall produce std::overflow_error. V_NAN and V_CVT_STR_UNK shall produce std::domain_error. A normally returned inexact result classification shall not be reclassified as exact.

    RATIONALE:

    Checked bounded storage must detect arithmetic range loss while retaining a usable failure state. Its result handler distinguishes overflow and invalid-number classes from ordinary precision relations.

    INTERFACE:

    Public header: <ppl.hh>. In a checked coefficient configuration:

    struct Bounded_Integer_Coefficient_Policy {
      static void handle_result(Result r);
    };
    

    The arithmetic call forms are specified by 🔗 3. Exact ordinary integral coefficient arithmetic and 🔗 4. Coefficient quotient and remainder with truncation toward zero. The policy operation shall be a static member.

    VERIFICATION_CRITERIA:

    For each checked width, cross both range boundaries with addition, subtraction, multiplication, unary negation and increment/decrement. Require the exact exception category, then explicitly reassign and reuse surviving outputs without inspecting a promised old payload. Exercise accepted normal classifications, both signed overflow classes, invalid numeric input and unknown intermediate overflow. Cover all short-circuit outcomes in the policy handler.

    SOURCE:

    src/Coefficient_types.hh; src/Coefficient_inlines.hh; src/Checked_Number.cc; tests/coefficient2.cc.

  • PPL-SPEC-000047
    7. Coefficient constant-stage acquisition and release UID: PPL-SPEC-000047 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal coefficient-constant initialization stage shall be entered only when that thread has no active instance of the stage. In the mpz profile, successful Coefficient_constants_initialize() shall acquire and publish one owned zero coefficient and one owned unit coefficient for that thread. Neither pointer shall be published until both objects have been constructed. If supported recoverable construction failure occurs, partial acquisitions shall be destroyed, both published pointers shall remain null and a later initialization attempt shall be permitted.

    Coefficient_constants_finalize() shall require the initialized stage and completion of all dependent uses. It shall release both owned objects and clear both published pointers. The bounded profiles shall require no owned constant-stage allocation; their initialization and finalization functions shall perform no stage-resource operation. Their accessor storage shall follow 🔗 6. Coefficient zero and one constant access.

    The enclosing initialization transaction shall acquire and release this stage in dependency order under 🔗 3. Thread initialization, default state and finalization. Callers shall not interleave independent stage ownership protocols for the same thread.

    RATIONALE:

    Publishing a complete pair prevents incomplete singleton ownership after failure. Explicit stage release makes retry and reverse-order initialization cleanup possible.

    INTERFACE:

    Internal declarations in Parma_Polyhedra_Library:

    void Coefficient_constants_initialize();
    void Coefficient_constants_finalize();
    

    These operations form an internal initialization stage. Public clients shall use the library/thread initialization interfaces.

    VERIFICATION_CRITERIA:

    Check repeated balanced stage lifetimes, published zero/one values and release of acquired storage. Inject each GMP stage allocation failure and verify null publication, resource cleanup and successful retry before testing dependent objects. Inspect bounded no-op implementations. Exercise enclosing library/thread rollback in initialization3 and initialization4.

    SOURCE:

    src/Coefficient.cc; tests/coefficient2.cc; tests/initialization3.cc; tests/initialization4.cc.

  • PPL-SPEC-001429
    1. Exact linear polyhedron partitioning UID: PPL-SPEC-001429 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For compatible polyhedra p and q, linear_partition(p,q) shall return first denoting p∩q and a finite NNC-polyhedron powerset second denoting q⧵p. Its nonempty residue pieces shall be pairwise disjoint and disjoint from p. Together with first they shall partition q. Equalities shall split into complementary sides; strict inequalities shall use their non-strict complement. Input values shall remain unchanged. The template base shall admit exact constraint conjunction for the returned first component.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Excluded boundaries require NNC residues even when both inputs are closed.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    template <typename PSET>
    std::pair<PSET, Pointset_Powerset<NNC_Polyhedron>>
    linear_partition(const PSET&, const PSET&);
    
    VERIFICATION_CRITERIA:

    Check interval cuts, equalities, strict boundaries, empty/universe and independent disjointness/union reconstruction.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Polyhedron/linearpartition1.cc; tests/Powerset/difference1.cc.

  • PPL-SPEC-001430
    2. Finite and approximate grid partitioning UID: PPL-SPEC-001430 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    approximate_partition(p,q,finite) shall return the exact grid intersection p∩q as first. When the residue is finitely representable by the procedure, finite shall be true and second shall be a pairwise-disjoint finite grid partition of q⧵p. Otherwise finite shall be false and second shall soundly contain that residue, possibly returning q itself. Failure of an early finite partition shall not omit later input congruences from first. If the full intersection is empty, returning q shall be an exact finite residue. Inputs shall be dimension-compatible and remain unchanged.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A grid complement may require infinitely many cosets; finite approximation must still compute the full intersection exactly.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    std::pair<Grid, Pointset_Powerset<Grid>>
    approximate_partition(const Grid&, const Grid&, bool& finite_partition);
    
    VERIFICATION_CRITERIA:

    Check even/odd residues, inhomogeneous and rational cosets, equality cuts without finite residue and late contradictions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Grid/approximatepartition1.cc; tests/Powerset/difference1.cc; tests/Powerset/gridpartition1.cc.

  • PPL-SPEC-001431
    1. Reloadable pointset-powerset representations UID: PPL-SPEC-001431 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump shall write the stored collection size, ambient dimension and each base representation, preserving enough information to reload the value with the matching coefficient/base configuration. ascii_load shall return true only for a complete admitted representation with matching disjunct dimensions and valid components; malformed, truncated or structurally invalid input shall return false. A successful round trip shall preserve union and dimension, without requiring canonical text or reduced decomposition. Stream and resource exceptions may propagate. A false return shall not promise rollback or further queries; surviving ownership shall remain destructible. Human-readable print shall remain distinct from the reloadable format.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Persistence must reject incompatible structure rather than create an object whose dimension disagrees with its disjuncts.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void ascii_dump(std::ostream&) const;
    bool ascii_load(std::istream&);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check empty/universe and nonreduced round trips, every token truncation, bad labels/counts/dimensions and incompatible component encodings.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/contractvalues1.cc; tests/Powerset/powerset1.cc.

  • PPL-SPEC-001432
    2. Pointset-powerset diagnostics, display and hash UID: PPL-SPEC-001432 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall check disjunct dimensions and generic powerset invariants. Memory queries shall give lower bounds; total shall add sizeof(*this) to external bytes. Hash shall depend on ambient dimension, so equal values shall have equal hashes without promising collision resistance. Stream insertion shall use the inherited powerset display and return the supplied stream; printing may normalize redundant storage without changing the value.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A cheap dimension hash is compatible with equality while allowing many collisions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    int32_t hash_code() const;
    
    VERIFICATION_CRITERIA:

    Check dimensioned values, generic display, memory relationships and hash agreement after copy, reordering and reduction.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/contractvalues1.cc; tests/Powerset/membytes1.cc.

  • PPL-SPEC-001464
    3. Reloadable product representations UID: PPL-SPEC-001464 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Dumping shall write the product label, reduction marker and both base representations. Loading shall accept a complete representation only when both base loads succeed, component dimensions agree and component invariants hold. Malformed, truncated or structurally inconsistent input shall return false. A successful round trip shall preserve the component pair's intersection and common dimension. A loaded reduction marker shall not bypass the requirement that a pair be admitted by its selected policy. False shall not promise rollback or further queries; surviving owned storage shall remain destructible. Stream and resource exceptions may propagate. Human display shall be distinct from the reloadable format.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Two individually valid component encodings do not form a valid product when their dimensions differ.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void ascii_dump(std::ostream&) const;
    bool ascii_load(std::istream&);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check every policy round trip, unlike component dimensions, marker/label errors, all token truncations and valid-prefix trailing content.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/asciidumpload1.cc; tests/Partially_Reduced_Product/contractvalues1.cc.

  • PPL-SPEC-001465
    4. Product diagnostics, display, memory and hash UID: PPL-SPEC-001465 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall require matching component dimensions and both component invariants, without certifying policy application or a reduction fixed point. External memory shall sum component external estimates; total shall add sizeof(*this). Hash shall depend on ambient dimension and agree for equal products without promising collision resistance. Stream insertion shall label and display both components and return the supplied stream.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    An invariant check is structural and must not silently strengthen a lazy reduction flag into a fixed-point claim.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    int32_t hash_code() const;
    template <typename D1, typename D2, typename R>
    std::ostream& IO_Operators::operator<<(std::ostream&,
                                         const Partially_Reduced_Product<D1,D2,R>&);
    
    VERIFICATION_CRITERIA:

    Check byte relationships, stream identity/labels, hash equality and diagnostics before/after policy application.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/directproduct1.cc.

  • PPL-SPEC-001379
    1. Compound-domain values and valid use UID: PPL-SPEC-001379 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Pointset_Powerset<PSET> shall denote ⋃iγ(pi). An empty collection shall denote empty. Partially_Reduced_Product<D1,D2,R> shall denote γ1(d1)∩γ2(d2) in a common real ambient space. Powerset<D> shall implement the finite powerset construction on a base domain with bottom, top, entailment, equality, upper bound and meet. Determinate<PSET> shall adapt a supported pointset domain to that base interface without changing its represented set.

    A component type shall supply the operations used by an instantiated member, with their stated soundness, precision, dimension and arithmetic conditions. Every intermediate arithmetic operation shall meet its coefficient profile's range and resource conditions. Initialization shall follow 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization; indices and dimensions shall follow 🔗 1. Coordinate type and reserved dimension index. Objects, descriptors, function objects and streams shall remain live and valid throughout their uses. Independently written outputs shall not alias each other or input storage, except where explicitly permitted. The denominator-taking affine wrappers shall admit a scalar borrowed from the receiver at entry as specified below.

    Value copies shall permit independent subsequent mutations. Accesses that can change shared representations or caches shall be externally synchronized. Numerical, allocation and resource exceptions may propagate. Failed construction shall release acquired resources. For existing objects no general rollback or further-query guarantee shall be assumed after an exception; surviving owned resources shall remain destructible.

    RATIONALE:

    Disjunction and conjunction have different concretizations and different lifting laws. Component contracts determine which operations can be instantiated.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template <typename D> class Powerset;
    template <typename PSET> class Determinate;
    template <typename PSET> class Pointset_Powerset;
    template <typename D1, typename D2, typename R>
    class Partially_Reduced_Product;
    
    VERIFICATION_CRITERIA:

    Check independent union and intersection examples, empty collections, dimensioned distinguished values, independent copies, coefficient admission and ownership during failures.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 3, Definitions 4–5 (finite powersets and union concretization). CousotC79 | whole work (background on products).

    SOURCE:

    src/Determinate_defs.hh; src/Determinate_inlines.hh; src/Determinate_types.hh; src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Partially_Reduced_Product/directproduct1.cc; tests/Powerset/powerset1.cc.

  • PPL-SPEC-000986
    6. Oracle interval and expression-value queries UID: PPL-SPEC-000986 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    FP_Oracle<Target, C> shall define an abstract client-supplied query interface for a coordinate interval, a floating-point constant value and an integer expression value. A true return shall mean that the output is an initialized valid interval enclosing all relevant values under the client's current modeled state. A false return shall mean that the query supplies no usable complete enclosure; callers shall not infer an unchanged output value. An admitted oracle shall report refusal rather than certify an unsound enclosure.

    The oracle and target inputs shall remain live and semantically consistent with the analyzed expression and any affine store throughout one analysis. Callbacks may propagate their documented exceptions. C shall provide the selected valid interval operations; rational interval queries shall not require host floating-point arithmetic merely because the interface is named FP_Oracle. Construction/destruction of the concrete oracle shall remain with its client; the protected nonvirtual base destructor shall not support deleting an owned oracle through a base pointer.

    RATIONALE:

    A true oracle response is an enclosure promise from the analyzer, while explicit refusal prevents a partial query from being treated as established numerical information.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to their corresponding class templates; target-provided excerpts describe the required adapter protocol.

    template <typename Target, typename C> class FP_Oracle;
    virtual bool get_interval(dimension_type coordinate, C& result) const = 0;
    virtual bool get_fp_constant_value(
      const Floating_Point_Constant<Target>& expression, C& result) const = 0;
    virtual bool get_integer_expr_value(
      const Concrete_Expression<Target>& expression, C& result) const = 0;
    // Protected base destructor:
    ~FP_Oracle();
    
    VERIFICATION_CRITERIA:

    Check abstract/protected-destructor type properties, typed callback arguments, direct rational query results, refusals and recovery; verify consuming analyses propagate false without treating stale outputs as evidence.

    SOURCE:

    src/Concrete_Expression_defs.hh; src/Concrete_Expression_inlines.hh; src/Concrete_Expression_types.hh; src/Concrete_Expression.cc; src/Float_defs.hh; tests/expressionprotocolsspec1.cc; tests/expressionprotocolfixture.hh; tests/expressiontype1.cc; tests/expressionpublic1.cc; src/globals_types.hh.

  • 1. Affine congruence meaning and valid numerical use UID: PPL-SPEC-000141 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For dimension d, integer coefficient expression E(x) = b + ∑d − 1i = 0aixi and nonnegative modulus m, a Congruence shall denote the rational valuations satisfying E(x) = 0 when m = 0, and E(x) ⁄ m ∈ ℤ when m > 0. Coordinates themselves need not be integral. is_equality() and is_proper_congruence() shall distinguish these cases exactly. is_tautological() shall report whether all rational valuations satisfy the relation; is_inconsistent() shall report whether none do. With a nonzero homogeneous coefficient neither predicate shall hold. For a constant expression, the first shall equal its equality/divisibility truth and the second its negation.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization; the caller shall synchronize access overlapping modification of an object. Both dense and sparse storage shall be supported, with default_representation equal to SPARSE. Computed construction, arithmetic, normalization, comparison and transformation guarantees shall require every evaluated coefficient step and result to be representable in the selected numerical profile. Unchecked completion shall not prove this precondition. Allocation and configured numerical exceptions may propagate. Failed construction shall release its owned resources; distinct unchanged sources shall survive failures, while modified destinations shall remain destructible without a universal rollback guarantee.

    RATIONALE:

    Congruence divisibility applies to the affine result, including rational coordinate values, rather than forcing each coordinate to be an integer.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Congruence;
    static constexpr Representation Congruence::default_representation = SPARSE;
    bool Congruence::is_equality() const;
    bool Congruence::is_proper_congruence() const;
    bool Congruence::is_tautological() const;
    bool Congruence::is_inconsistent() const;
    
    VERIFICATION_CRITERIA:

    Evaluate exact rational affine results and test equality or integral quotient independently. Include fractional satisfying and nonsatisfying coordinates, zero dimension, constants and trailing unused coordinates in both storage choices.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000144
    4. Equality-constraint conversion and explicit modulus construction UID: PPL-SPEC-000144 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from an equality Constraint shall produce a modulus-zero congruence with the same satisfying valuations and dimension, using requested storage. A dimensioned overload shall apply coefficient truncation or zero extension as specified by 🔗 6. Congruence dimensions and coefficient-coordinate transformations. Inequality constraints shall be rejected with std::invalid_argument.

    operator/(c,m) for an equality constraint and nonnegative modulus m shall construct the congruence formed from that equality expression with modulus m. In particular a positive supplied modulus shall produce a proper congruence, while zero shall preserve equality. It shall preserve its source and use the default representation. Numerical prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    An equality can be viewed modulo zero or used as the coefficient source for a periodic condition with an explicitly selected modulus.

    INTERFACE:
    explicit Congruence(const Constraint& c,
                        Representation r = default_representation);
    Congruence(const Constraint& c, dimension_type new_space_dimension,
               Representation r = default_representation);
    Congruence operator/(const Constraint& c, Coefficient_traits::const_reference m);
    
    VERIFICATION_CRITERIA:

    Convert equalities in both representations, compare rational truth, resize during conversion and reject each inequality kind. Check explicit modulus zero and positive moduli independently, ensuring a positive modulus is not silently retained as equality.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000145
    5. Owned congruence values and representation conversion UID: PPL-SPEC-000145 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction shall preserve expression, modulus, dimension and source representation; the explicit-storage overload shall select its requested storage. Assignment shall copy the source's entry value and representation, return the target reference, preserve a distinct source and support self-assignment. Rvalue inputs shall admit those copy forms and preserve source value without requiring a distinct move operation. Distinct copies shall survive later source mutation or destruction.

    m_swap and PPL swap shall exchange complete values, dimensions and storage; self-swap shall preserve the value. representation() shall report current storage. Successful set_representation(r) shall change only storage, preserving exact exposed coefficients, modulus and dimension. Destruction shall release owned storage. Copy assignment or representation conversion failing while constructing a replacement shall preserve the target.

    RATIONALE:

    Modulus and expression form one owning value; changing coefficient storage does not normalize or reinterpret the relation.

    INTERFACE:
    Congruence(const Congruence& cg);
    Congruence(const Congruence& cg, Representation r);
    Congruence& Congruence::operator=(const Congruence& y);
    Congruence::~Congruence();
    Representation Congruence::representation() const;
    void Congruence::set_representation(Representation r);
    void Congruence::m_swap(Congruence& y);
    void swap(Congruence& x, Congruence& y);
    
    VERIFICATION_CRITERIA:

    Check owned copies, return identity, self/rvalue assignment, destruction independence, cross-storage conversions and swaps, exact field preservation and replacement-copy/conversion failures.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000153
    13. Reloadable congruence representation UID: PPL-SPEC-000153 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall write the full affine coefficient expression followed by the token m and its nonnegative modulus; ascii_dump() shall use std::cerr. Export shall preserve its source. For a complete compatible export with representable coefficients, ascii_load(s) shall return true and replace the target with those coefficients, dimension and modulus, retaining destination storage.

    Malformed or truncated expressions, missing/invalid modulus tokens, negative moduli and structurally invalid coefficient counts shall return false. If expression loading fails, ascii_load(s) shall return false without reading the modulus marker or value. Trailing input shall remain available. A failed load may modify the target; it shall remain destructible and admit complete valid replacement. No rollback or cross-version wire-format stability is promised. Allocation and configured numerical exceptions may propagate.

    RATIONALE:

    Expression syntax and modulus both need validation before a loaded object can be interpreted as a congruence.

    INTERFACE:
    void Congruence::ascii_dump(std::ostream& s) const;
    void Congruence::ascii_dump() const;
    bool Congruence::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip equality/proper, constant, gapped and trailing-zero forms across storage choices. Check exact coefficient/modulus preservation, rational meaning and trailing input; reject malformed/truncated expressions, negative modulus and invalid counts, and replace destinations after failures. Reject invalid expression prefixes followed by otherwise valid modulus suffixes, checking that those suffixes remain unread. Reject representable negative moduli through false with assertions enabled or disabled. Replace failed targets completely across storage representations, retaining modulus-zero equality and trailing input.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000156
    16. Congruence-system meaning and construction UID: PPL-SPEC-000156 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Congruence_System shall denote the conjunction of its retained congruences over rational coordinates. An empty conjunction shall be true. Default construction shall have dimension zero and no rows; the dimensioned empty constructor shall retain its supplied admitted dimension. A singleton constructor from a congruence shall copy that relation and its dimension. Construction from an equality constraint shall make its modulus-zero singleton; inequalities shall throw std::invalid_argument. Construction from a constraint system shall extract its equality rows and retain its ambient dimension, omitting inequalities.

    All constructors shall use requested storage, with default_representation equal to SPARSE. zero_dim_empty() shall borrow a dimension-zero inconsistent singleton, not an empty conjunction, until owning-thread finalization. Initialization, synchronization and numerical/failure preconditions shall follow 🔗 1. Affine congruence meaning and valid numerical use.

    RATIONALE:

    A system's conjunction and ambient space remain meaningful even without nontrivial rows. Equality extraction deliberately omits ordered inequalities.

    INTERFACE:
    class Congruence_System;
    static constexpr Representation Congruence_System::default_representation = SPARSE;
    explicit Congruence_System(Representation r = default_representation);
    explicit Congruence_System(dimension_type d, Representation r = default_representation);
    explicit Congruence_System(const Congruence& cg, Representation r = default_representation);
    explicit Congruence_System(const Constraint& c, Representation r = default_representation);
    explicit Congruence_System(const Constraint_System& cs, Representation r = default_representation);
    static const Congruence_System& Congruence_System::zero_dim_empty();
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/shared inconsistent systems, positive-dimensional empty construction, equality/inequality conversion and extraction from mixed constraint systems using independent rational conjunctions.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000157
    17. Owned congruence systems, storage conversion and descriptor equality UID: PPL-SPEC-000157 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction and assignment shall preserve the system's row sequence, conjunction and declared dimension; ordinary copies and assignment shall retain source representation, while an explicit-storage copy shall use its argument. Assignment shall return the target, preserve a distinct source, support self-assignment and retain the source when using rvalue copy forms. Copies shall remain independent after source modification or destruction. Swaps shall exchange complete values, dimensions and storage, including self-swap. Successful representation conversion shall select requested dense or sparse storage for all rows without changing their conjunction or dimension. Copy-assignment replacement failure shall preserve the target; other failures shall follow 🔗 1. Affine congruence meaning and valid numerical use.

    is_equal_to and system operator== shall test equal declared dimensions and matching retained row counts/order, comparing corresponding congruences semantically. They shall not decide whether differently ordered or redundant systems denote the same conjunction. Storage choice shall not change this comparison. Destruction shall release owned rows.

    RATIONALE:

    Owned row-sequence comparison is distinct from semantic equality of conjunctions, but ambient dimension remains part of an exact descriptor comparison.

    INTERFACE:
    Congruence_System(const Congruence_System& cgs);
    Congruence_System(const Congruence_System& cgs, Representation r);
    Congruence_System& Congruence_System::operator=(const Congruence_System& y);
    Congruence_System::~Congruence_System();
    Representation Congruence_System::representation() const;
    void Congruence_System::set_representation(Representation r);
    void Congruence_System::m_swap(Congruence_System& y);
    void swap(Congruence_System& x, Congruence_System& y);
    bool Congruence_System::is_equal_to(const Congruence_System& y) const;
    bool operator==(const Congruence_System& x, const Congruence_System& y);
    
    VERIFICATION_CRITERIA:

    Check copy/self/rvalue operations, swaps, storage conversion and independence. Compare matching sequences across storage, changed/reordered rows, different row counts, and empty systems whose declared dimensions differ.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000158
    18. System insertion, ownership transfer and coordinate changes UID: PPL-SPEC-000158 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Const-reference insertion of a congruence, equality constraint or congruence system shall conjoin copies, preserving sources and target representation. Inequality constraints shall throw std::invalid_argument. Single congruence and constraint insertion shall strongly normalize the inserted copy. Result dimension shall be the maximum input dimension, zero-extending shorter rows. Ordinary self-system insertion and insertion of a borrowed row from the target shall be admitted using entry values.

    Rvalue insertion shall conjoin transferred relations, requiring a source distinct from the target system and not borrowing one of its rows. Transferred inputs shall remain destructible. Successful recycled-system insertion shall clear the source to a dimension-zero empty system. clear() shall likewise remove all rows and reset dimension zero while retaining storage.

    space_dimension() shall report ambient dimension, and max_space_dimension() the congruence limit. Successful set_space_dimension(n) shall resize all row coefficients by truncation or zero extension and retain moduli. Swapping/permuting system coordinates shall apply 🔗 6. Congruence dimensions and coefficient-coordinate transformations to every row. Dimension and variable arguments shall satisfy that contract's bounds. These are coefficient transformations rather than existential projection.

    Const row sources, including const rvalues, shall use preserving insertion. Const system sources shall likewise use preserving insertion. Successful rvalue row insertion shall leave its source a valid descriptor with an unspecified value.

    RATIONALE:

    Copying and recycling have different source-ownership consequences, while their resulting conjunction and coordinate alignment must agree.

    INTERFACE:
    void Congruence_System::insert(const Congruence& cg);
    void Congruence_System::insert(Congruence&& cg);
    void Congruence_System::insert(const Constraint& c);
    void Congruence_System::insert(const Congruence_System& y);
    void Congruence_System::insert(Congruence_System&& y);
    void Congruence_System::clear();
    static dimension_type Congruence_System::max_space_dimension();
    dimension_type Congruence_System::space_dimension() const;
    void Congruence_System::set_space_dimension(dimension_type n);
    void Congruence_System::swap_space_dimensions(Variable x, Variable y);
    void Congruence_System::permute_space_dimensions(const std::vector<Variable>& cycle);
    
    VERIFICATION_CRITERIA:

    Check mixed dimensions, duplicates, borrowed-row and self-system ordinary insertion, recycled rows/systems, rejected inequalities, clear/reuse and coordinate transformations against independently evaluated conjunctions. Check source preservation for copy forms and source clearing for successful recycled systems.

    SOURCE:

    src/Row_Transfers.cc; tests/consuminginsertions1.cc; src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000160
    20. Reloadable congruence-system representation UID: PPL-SPEC-000160 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export stored row count, public dimension, representation choice and every full congruence row; ascii_dump() shall write that representation on std::cerr. Export shall preserve the source. A complete compatible export with representable coefficients shall load with true, replacing the target conjunction, dimension, stored rows and encoded representation choice.

    Malformed/truncated headers or rows, invalid modulus or coefficient structure, and inconsistent encoded row dimensions shall return false rather than be accepted as a valid system. Trailing input shall remain available. Failure may modify a destination but shall leave it destructible and replaceable by a complete valid load. No rollback or cross-version format stability is promised. Allocation and configured numerical exceptions may propagate. The decoded row count shall be nonnegative and fit the row container. The decoded header dimension shall be nonnegative and shall not exceed max_space_dimension(), including when the record contains no rows; not_a_dimension() shall be rejected as an unsupported extent.

    RATIONALE:

    Reloading must retain the system's ambient coordinate context as well as its modular rows.

    INTERFACE:
    void Congruence_System::ascii_dump(std::ostream& s) const;
    void Congruence_System::ascii_dump() const;
    bool Congruence_System::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip empty positive-dimension, equality/proper and duplicate/tautology-containing systems through initial destination storage choices. Check encoded representation, dimensions and independent rational truth; reject malformed/truncated headers and rows and incompatible row dimensions. Check zero, positive and maximum admitted header dimensions, maximum plus one and the reserved non-dimension, even for empty row sequences. Exercise both storage choices, preserved trailing input and complete valid replacement after rejection.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-001656
    21. Common-modulus normalization of congruence systems UID: PPL-SPEC-001656 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid congruence system with positive moduli m1, …, mk, normalize_moduli() shall set every proper row's modulus to L = lcm(m1, …, mk) and multiply its affine expression by L ⁄ mi. It shall preserve row order, row count, ambient dimension, storage representation and the relation denoted by every row. Modulus-zero equalities shall remain unchanged. Empty and equality-only systems shall remain unchanged.

    Every evaluated LCM, ratio and coefficient-scaling intermediate shall be representable in the configured coefficient profile. Initialization, lifetime, synchronization and failure guarantees shall follow 🔗 1. Affine congruence meaning and valid numerical use.

    RATIONALE:

    Multiplying the expression and modulus by the same positive factor preserves their integral-quotient relation. A common positive modulus supports joint system transformations without changing the represented grid.

    INTERFACE:

    Internal member of Parma_Polyhedra_Library::Congruence_System:

    void normalize_moduli();
    
    VERIFICATION_CRITERIA:

    Exercise public grid construction and normalization with empty systems, equalities, equal and unequal positive moduli, mixed row orders and both storage representations. Compare independent coordinate-period generator models and preserve copied sources. Include large GMP moduli and bounded profiles within representability limits. Inspect the exact row-scaling loop for order, count and representation preservation.

    SOURCE:

    src/Congruence_System_defs.hh; src/Congruence_System.cc; tests/gridvaluesspec1.cc.

  • 1. Constraint relation meaning and numerical prerequisites UID: PPL-SPEC-000101 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Constraint of dimension d shall describe one relation on rational valuations x ∈ ℚd. With its exposed expression E(x) = b + ∑d − 1i = 0aixi, its three types shall mean E(x) = 0, E(x) ≥ 0 and E(x) > 0, respectively. A coefficient belonging to an internal strictness representation shall not be exposed as a coordinate of this relation.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization. The caller shall synchronize any access overlapping modification of the same object. Both DENSE and SPARSE storage shall be supported and default_representation shall be SPARSE. Computed construction, conversion, normalization, dimension transformation and comparison guarantees shall require representability of every evaluated coefficient arithmetic step in the selected coefficient profile. Unchecked completion shall not establish this precondition. Allocation and configured numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete constraint. Distinct, unchanged sources shall survive a reported failure; otherwise a modified destination shall remain destructible, without a universal unchanged-state guarantee.

    RATIONALE:

    Constraint meaning concerns the admitted valuations, rather than a particular coefficient scale or hidden strictness column.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Constraint;
    enum Constraint::Type { EQUALITY, NONSTRICT_INEQUALITY, STRICT_INEQUALITY };
    static constexpr Representation Constraint::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Evaluate exposed affine expressions with independent rational arithmetic, testing equality, strict boundaries and nonstrict boundaries. Include zero-dimensional relations and trailing unused coordinates in both representations. Check numerical-profile preconditions separately from relation truth.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000104
    4. Owned constraint copying, assignment and swapping UID: PPL-SPEC-000104 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary copy construction shall preserve relation type, exposed coefficients, constant term, dimension and representation. Explicit-representation copying shall use the requested representation. Copy assignment shall replace the target with the source's entry value and representation, preserve a distinct source and return the target reference. Self-assignment shall preserve the constraint. Rvalue arguments shall admit these copy forms without requiring a distinct move operation; the source shall retain its value.

    Distinct copies shall remain independent of later mutation and destruction. m_swap and the PPL swap overload shall exchange complete constraint values, including dimensions and representation. Self-swap shall preserve the value. Destruction shall release owned storage. Failure while constructing a replacement for copy assignment shall leave the target unchanged.

    RATIONALE:

    Constraint values own their storage even when constructed from borrowed expression views or shared constants.

    INTERFACE:
    Constraint(const Constraint& c);
    Constraint(const Constraint& c, Representation r);
    Constraint& Constraint::operator=(const Constraint& c);
    Constraint::~Constraint();
    void Constraint::m_swap(Constraint& y);
    void swap(Constraint& x, Constraint& y);
    
    VERIFICATION_CRITERIA:

    Check all relation types, dense/sparse copy combinations, return identity, self-assignment, rvalue copies, mutation independence, retained copies after source destruction, both swap forms and replacement-copy failures.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000105
    5. Constraint representation conversion UID: PPL-SPEC-000105 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    representation() shall report the current coefficient storage. For r equal to DENSE or SPARSE, successful set_representation(r) shall preserve relation type, every exposed coefficient, constant term and dimension, and select r. Repeating the current choice shall preserve the object. A failed replacement allocation shall leave the original representation and value unchanged.

    RATIONALE:

    Storage conversion must preserve the complete descriptor rather than only its satisfying set.

    INTERFACE:
    Representation Constraint::representation() const;
    void Constraint::set_representation(Representation r);
    
    VERIFICATION_CRITERIA:

    Convert equality, nonstrict and strict constraints both ways, including zero-dimensional and trailing-zero cases. Check exact coefficients and independent satisfaction before and after conversion; inject conversion allocation failures.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • 10. Conversion of equality congruences to constraints UID: PPL-SPEC-000110 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a zero-modulus Congruence shall yield an equality constraint with the same public dimension and satisfying valuations, using the requested representation. Normalization may rescale its coefficients. The source shall remain unchanged. A proper congruence with nonzero modulus shall be rejected with std::invalid_argument and shall not yield a constraint. Numerical prerequisites in 🔗 1. Constraint relation meaning and numerical prerequisites shall apply.

    RATIONALE:

    A congruence with nonzero modulus denotes a periodic condition and cannot be silently reinterpreted as equality.

    INTERFACE:
    explicit Constraint(const Congruence& cg,
                        Representation r = default_representation);
    
    VERIFICATION_CRITERIA:

    Convert zero-modulus congruences with both coefficient signs, constants and trailing zeros in both representations. Compare rational equality truth independently. Reject positive-modulus proper congruences and check source preservation.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000111
    11. Reloadable constraint representation UID: PPL-SPEC-000111 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export all fields needed to reload the constraint: its full stored coefficient expression, relation token and topology token. ascii_dump() shall use std::cerr. Export shall preserve its source. For compatible complete exported data with representable coefficients, ascii_load(s) shall return true and replace the destination's stored relation, dimension and coefficients, retaining the destination storage choice. It shall preserve the source relation's satisfying set and public kind.

    Malformed expression, relation or topology tokens, missing coefficient slots, truncated input, violations of the checked row invariants and inconsistent encoded relation/type combinations shall return false. The expression slot count shall include the constant and any required internal strictness slot; invalid counts shall not be accepted as valid relations. If expression loading fails, ascii_load(s) shall return false without reading the relation or topology suffix. Trailing input shall remain available to the caller. A failed load may change the destination; it shall remain destructible and admit replacement by a subsequent complete valid load. No rollback or cross-version format stability is promised. Allocation and configured numerical exceptions may propagate.

    RATIONALE:

    A reloadable constraint must retain strictness and public dimensions rather than merely a printed inequality.

    INTERFACE:
    void Constraint::ascii_dump(std::ostream& s) const;
    void Constraint::ascii_dump() const;
    bool Constraint::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip every relation type, constants, sparse gaps and trailing dimensions through both producer/destination representations. Compare exposed coefficients, kind and rational truth. Test malformed/truncated expressions and relation/topology fields, invalid counts, trailing-input preservation and complete replacement after reported failure. Reject invalid expression prefixes followed by otherwise valid relation/topology suffixes, checking that those suffixes remain unread. Reject missing NNC epsilon storage and nonzero equality epsilon across source/destination representations. Preserve the exported internal epsilon bounds, including positive epsilon inequalities. Exercise both inequality strictness signs, trailing input and complete valid replacement after false.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • 14. Constraint-system conjunction, construction and shared contradiction UID: PPL-SPEC-000114 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Constraint_System shall denote the conjunction of its constraints over its declared rational coordinate space. An empty conjunction shall be true. An empty public range shall not mean an inconsistent set. Conversely, zero_dim_empty() shall return a borrowed, dimension-zero system containing an inconsistent equality and denoting the empty set of valuations. That shared system shall remain alive until its owning initialized thread is finalized.

    Default construction shall create a dimension-zero system with no constraints. Construction from one constraint shall create its singleton conjunction and use that constraint's public dimension. Both shall use the requested representation; default_representation shall be SPARSE. Construction shall own its stored values independently of the source. Use shall satisfy 🔗 1. Constraint relation meaning and numerical prerequisites's initialization, synchronization, arithmetic and failure prerequisites.

    RATIONALE:

    The empty constraint list denotes the universe, whereas an inconsistent singleton denotes no points; the word empty has distinct container and geometric uses.

    INTERFACE:
    class Constraint_System;
    static constexpr Representation Constraint_System::default_representation = SPARSE;
    explicit Constraint_System(Representation r = default_representation);
    explicit Constraint_System(const Constraint& c,
                               Representation r = default_representation);
    static const Constraint_System& Constraint_System::zero_dim_empty();
    
    VERIFICATION_CRITERIA:

    Evaluate default, singleton and shared inconsistent systems independently at rational points. Check dimensions, requested representations, source independence and the distinction between no constraints and no satisfying valuation.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000115
    15. Constraint-system owned values and representation conversion UID: PPL-SPEC-000115 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    System copy construction shall preserve the conjunction, dimension and representation; the explicit-representation overload shall use its requested storage. Copy assignment shall replace the target with an independent copy of the source's entry value and representation, preserve a distinct source and return the target reference. Self-assignment shall preserve the system. Rvalue arguments shall admit the copy forms without requiring a distinct move operation, retaining source value. Copies shall survive later source modification or destruction.

    m_swap and the PPL swap overload shall exchange entire system values, dimensions and representations. Self-swap shall preserve the system. representation() shall report current storage. Successful set_representation(r) for DENSE or SPARSE shall select that storage for the system and its rows while preserving conjunction and dimension. Destruction shall release owned storage. Copy-assignment replacement failure shall preserve the target. Other failure guarantees shall follow 🔗 1. Constraint relation meaning and numerical prerequisites.

    RATIONALE:

    Systems are owning values whose storage may change without altering the conjunction they denote.

    INTERFACE:
    Constraint_System(const Constraint_System& cs);
    Constraint_System(const Constraint_System& cs, Representation r);
    Constraint_System& Constraint_System::operator=(const Constraint_System& y);
    Constraint_System::~Constraint_System();
    Representation Constraint_System::representation() const;
    void Constraint_System::set_representation(Representation r);
    void Constraint_System::m_swap(Constraint_System& y);
    void swap(Constraint_System& x, Constraint_System& y);
    
    VERIFICATION_CRITERIA:

    Check both storage choices and conversions for empty, equality, inequality and mixed strict systems. Check copy independence, retained copies after destruction, assignment return identity, self/rvalue use, swaps and unchanged conjunction under conversion using independent rational evaluation.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000116
    16. System insertion, dimension adjustment and clearing UID: PPL-SPEC-000116 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    insert(const Constraint&) shall conjoin a copy of its source with the system's existing meaning, preserve the source constraint and retain system representation. The resulting dimension shall be the maximum of old system and inserted constraint dimensions. Rows with fewer coordinates shall be extended with zero coefficients. Inserting duplicates or tautologies shall preserve the corresponding conjunction; insertion of an inconsistent constraint shall make it unsatisfiable. Retrievable rows need only describe an equivalent conjunction and need not preserve insertion order or duplicate multiplicity.

    Rvalue insertion shall have the same mathematical, coordinate and topology semantics while permitting reuse of source storage. The source shall not borrow a row of the receiving system and shall remain destructible and assignable, with no unchanged-value guarantee. Const sources, including const rvalues, shall use preserving insertion.

    max_space_dimension() shall return the constraint dimension limit. space_dimension() shall return the declared system dimension. set_space_dimension(n) shall require an admitted result dimension and apply the constraint coordinate-resizing semantics in 🔗 6. Constraint dimensions and explicit coordinate transformations to its rows; an empty system may retain a positive dimension. clear() shall remove all constraints and reset dimension zero, retaining representation. These are descriptor transformations and do not promise existential projection when nonzero coefficients are discarded. Successful rvalue row insertion shall leave its source a valid descriptor with an unspecified value.

    RATIONALE:

    Insertion must align coordinates and distinguish preserving inputs from explicitly consumed sources. Declared dimensions also matter for empty systems.

    INTERFACE:
    void Constraint_System::insert(const Constraint& c);
    void Constraint_System::insert(Constraint&& c);
    static dimension_type Constraint_System::max_space_dimension();
    dimension_type Constraint_System::space_dimension() const;
    void Constraint_System::set_space_dimension(dimension_type n);
    void Constraint_System::clear();
    
    VERIFICATION_CRITERIA:

    Insert different-dimension equality, nonstrict and strict constraints in multiple orders, duplicates, tautologies and contradictions. Compare conjunction truth over independent valuations. Check source preservation, empty-system extension, nonzero coefficient truncation, clear and reuse. Check const and borrowed row insertion into both representations, matching and differing topology, and smaller/equal/larger declared row dimensions; verify NNC epsilon placement, independent conjunction and source preservation.

    SOURCE:

    src/Row_Transfers.cc; tests/consuminginsertions1.cc; src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000119
    19. Reloadable constraint-system representation UID: PPL-SPEC-000119 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export the system's complete stored coefficient rows, public dimension, topology, representation choice and row-state fields needed for compatible reloading. ascii_dump() shall use std::cerr. Export shall preserve the source.

    Loading a complete compatible export with representable coefficients shall return true and replace the destination with the encoded system, retaining its conjunction, public dimension and encoded representation choice. Malformed or truncated headers, row data, relation/topology fields and inconsistent encoded dimensions or row-state fields shall be reported by false rather than accepted as a valid system. Trailing input after the representation shall remain available. Failure may change the destination; it shall remain destructible and admit complete valid replacement. No rollback or cross-version format stability is promised. Allocation and configured numerical exceptions may propagate. The decoded header dimension shall not exceed max_space_dimension(), including when the record contains no rows; not_a_dimension() shall be rejected as an unsupported extent.

    RATIONALE:

    System reload preserves its conjunction and coordinate context, including fields that a human-readable list does not encode.

    INTERFACE:
    void Constraint_System::ascii_dump(std::ostream& s) const;
    void Constraint_System::ascii_dump() const;
    bool Constraint_System::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip empty positive-dimension, singleton, duplicate/tautology-containing and mixed strict systems across initial destination choices. Compare dimensions, encoded representation and independent rational conjunction truth. Check malformed/truncated headers and rows, inconsistent counts/dimensions/state and replacement after failure. Check zero, positive and maximum admitted header dimensions, maximum plus one and the reserved non-dimension, even for empty row sequences. Exercise both storage choices, preserved trailing input and complete valid replacement after rejection.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • 1. Square bound-matrix values and valid ownership UID: PPL-SPEC-000751 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    DB_Matrix<T> shall own a square coordinate-indexed array of T entries, stored as independently owned DB_Row<T> rows. Row/column coordinates shall determine entry identity; neither spare capacity nor row-owner addresses shall change represented array values. Each selected element operation shall retain 🔗 1. Extended-number row meaning and construction states and its supported arithmetic, rounding, resource, initialization and synchronization prerequisites. Every admitted dimension shall fit both advertised row and column bounds, with representable capacity and memory calculations.

    Mutable row access shall not permit clients to break the matrix shape: callers shall retain each row's logical size and actual shared capacity when returning to matrix operations. Storage access/copying may carry the selected element type's valid extended values; operations requiring only finite or positive-infinite bound values shall state that scope separately. Borrowed rows and coefficients shall remain subject to their owner's lifetime and the selected mutation's invalidation rules.

    RATIONALE:

    A square storage interface needs exact coordinates and ownership rules without confusing raw entries with higher-level closed difference-bound shapes.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    template <typename T> class DB_Matrix;
    
    VERIFICATION_CRITERIA:

    Compare independently indexed arrays through constructed/copy/mutation histories and verify row sizes, owner independence and actual entry addresses.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000752
    2. Empty and sized matrix construction and dimension limits UID: PPL-SPEC-000752 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall create a zero-by-zero matrix with no logical rows and an empty row range. Construction with admitted dimension n shall create exactly n rows of n entries each, initially positive infinity at every coordinate, including the diagonal. Zero dimension shall be admitted by either form. Destruction shall release every owned row and coefficient exactly once.

    max_num_rows() shall report the supported row-container count bound, and max_num_columns() the supported DB_Row<T> count bound. Square construction shall require both bounds; they shall not promise enough available memory to realize the advertised maximum. Construction failure shall retain 🔗 16. Incomplete matrix cleanup and operation-specific failure guarantees.

    RATIONALE:

    Raw bound matrices start unconstrained at every coordinate; semantic diagonal conventions belong to their higher-level owners.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    DB_Matrix();
    explicit DB_Matrix(dimension_type n);
    ~DB_Matrix();
    static dimension_type max_num_rows();
    static dimension_type max_num_columns();
    
    VERIFICATION_CRITERIA:

    Check default/sized zero matrices, every cell of several positive dimensions, row/column bound consistency and exact resource cleanup after construction failure.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000753
    3. Independent matrix copy construction UID: PPL-SPEC-000753 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Ordinary copying shall create the same square dimension and exactly the source's entry values in independently owned rows. It shall preserve the source, and changes or destruction of either owner shall not change the other's entries. Physical spare capacities need not be copied exactly. A source supplied through an rvalue shall use ordinary copying; no distinct move constructor shall be required. Empty sources shall copy as empty matrices. Failed copying shall release the incomplete target and preserve the source under 🔗 16. Incomplete matrix cleanup and operation-specific failure guarantees.

    RATIONALE:

    Exact array copying must preserve coordinate values independently of the storage owners and capacity choices.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    DB_Matrix(const DB_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Compare independent cell expectations, row/coefficient addresses, source mutation/destruction, empty sources, rvalue copying and multi-limb rational/integer values.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000754
    4. Pointwise upward matrix conversion UID: PPL-SPEC-000754 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Cross-element-type construction shall create the same square dimension and an independent row at every source coordinate. Its entry conversion shall follow 🔗 7. Pointwise upward conversion of extended-number rows: finite successful conversions shall bound the exact source upward, exact representable values shall remain exact, and supported extended values shall retain their meanings. The source shall remain unchanged; an empty source shall yield an empty target. Source/target policies shall admit every requested conversion and rounding direction, including all intermediates. Failure shall follow 🔗 16. Incomplete matrix cleanup and operation-specific failure guarantees.

    RATIONALE:

    Changing bound representation must round outward at each actual matrix coordinate rather than change row/column associations.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    template <typename U> explicit DB_Matrix(const DB_Matrix<U>& y);
    
    VERIFICATION_CRITERIA:

    Compare signed rational cells with independent GMP ceilings for integral targets and exact same-value conversions for rational targets, including positive infinity, empty matrices and source preservation.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 5. Matrix value assignment and exceptional target state UID: PPL-SPEC-000755 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful assignment shall replace the target by the source dimension and independently owned entry values and return the target wrapper. The source shall be preserved. Self-assignment shall retain all entries, dimension and capacity metadata without rebuilding the row container.

    A reported recoverable failure during assignment may leave a partially replaced target. Its completed objects and owned allocations shall remain safely destructible; no square value or coherent old/new mathematical result shall be claimed for that target. A complete subsequent assignment from a valid owner may establish a new valid value. Source state and temporary-resource cleanup shall retain 🔗 16. Incomplete matrix cleanup and operation-specific failure guarantees.

    RATIONALE:

    Vector-of-row assignment can replace rows incrementally, so a failed value replacement needs a distinct permitted state from successful square copying.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    DB_Matrix& operator=(const DB_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Check independent assignment across dimensions and source destruction, self-assignment and source preservation; inject allocation/element-copy failures and verify safe target destruction or complete replacement.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 9. Growth preserves the old square and adds infinity coordinates UID: PPL-SPEC-000759 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Growth shall require an admitted new dimension at least the current dimension. It shall produce that new square, preserving every old coordinate's value in the upper-left common square and initializing every newly introduced row or column position to positive infinity. Equal-dimension growth shall preserve the existing value. Storage may be recycled or replaced; clients shall reacquire borrowed row/entry positions after a size change.

    A supported recoverable allocation or element-construction/copy failure shall preserve the old complete square value and dimension, destroy incomplete rows/columns, and permit a valid retry. Physical capacities and wrapper addresses need not remain unchanged. Common prerequisites shall retain 🔗 1. Square bound-matrix values and valid ownership.

    RATIONALE:

    Dimension growth extends the bound coordinate space while retaining all old associations and leaving new bounds unconstrained.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    void grow(dimension_type new_dimension);
    
    VERIFICATION_CRITERIA:

    Compare repeated growth histories with independent upper-left/infinity models across storage capacities; enumerate allocation and coefficient failures for row-vector relocation and both recycled/new row storage, then retry.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 10. Discarding resize establishes the requested square UID: PPL-SPEC-000760 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Discarding resize shall admit any supported new dimension, including zero, shrinkage, equal size and growth. It shall establish the requested square with valid logical entries. It shall make no preservation promise for old entry values; callers shall initialize values they require after the call. Newly constructed logical positions shall initially be positive infinity. Storage may be recycled and clients shall reacquire borrows.

    A supported recoverable failure during growth preparation shall destroy incomplete additions and retain the old complete square value and dimension so that a retry remains possible. Shrinkage shall retain the selected element types' nonthrowing destruction prerequisite.

    RATIONALE:

    Callers that discard prior values need a square resize without relying on incidental storage recycling.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    void resize_no_copy(dimension_type new_dimension);
    
    VERIFICATION_CRITERIA:

    Enumerate shrinking/equal/growing histories, initialize every desired new value independently before comparing it, and inject each growth allocation/element failure followed by retry.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 12. Exact ASCII input, forbidden payloads and failure state UID: PPL-SPEC-000762 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The decoded row count shall be nonnegative and shall not exceed min(max_num_rows(), max_num_columns()). ASCII load shall return false for a greater count before resizing or requesting storage for that extent. For an admitted count, it shall read exactly its square count of row-major payloads, allocating each rectangular row only after its payload has been read. A successful load shall establish a valid square with exactly those mathematical finite or positive-infinite values, requiring exact selected-profile conversion of each token. Missing or malformed dimension/payload tokens, NaN, negative infinity and inexact payload conversions shall not yield true. Following stream content shall remain available after the completed record and permitted separating whitespace. Supported dimensions/resources and stream/numeric-policy prerequisites shall apply.

    A false parse or reported exception shall not claim an old or new complete mathematical value. The target shall remain safely destructible and may be replaced by a complete valid assignment or complete supported load; callers shall not rely on uncommitted partial values. Recoverable resource exceptions shall propagate through their configured channels.

    RATIONALE:

    A square requires both admitted rows and admitted columns. Rejecting unsupported counts before resizing distinguishes malformed extents from resource failures for admitted extents. Exact values and complete framing distinguish a restored matrix from a partial numerical record.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Reject the first count above the smaller row/column bound and the reserved non-dimension before payload extraction; check zero and small admitted counts, complete replacement after rejection and following-token framing. Check every truncated position, malformed dimensions and values, forbidden infinities/NaN and inexact integer/native conversions, exact records and concatenated frames; destroy failed targets or replace them through complete fresh input.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 16. Incomplete matrix cleanup and operation-specific failure guarantees UID: PPL-SPEC-000766 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Failure during sized/copy/upward-conversion construction shall destroy every completed row/coefficient and release all resources acquired for the incomplete matrix, preserving any source matrix. Destruction shall safely release storage for the completed objects in every documented exceptional state. Assignment shall retain 🔗 5. Matrix value assignment and exceptional target state, growth and discarding resize 🔗 9. Growth preserves the old square and adds infinity coordinates and 🔗 10. Discarding resize establishes the requested square, and input 🔗 12. Exact ASCII input, forbidden payloads and failure state.

    Recoverable allocation, coefficient and stream exceptions shall not become successful mathematical values. The guarantees shall require the selected element operations to retain their supported failure states and nonthrowing destruction, and shall not promise recovery from fatal GMP allocation failure or violated caller preconditions.

    RATIONALE:

    Container cleanup and numerical-value rollback have distinct scopes during partial construction and mutation.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    explicit DB_Matrix(dimension_type n);
    DB_Matrix(const DB_Matrix& y);
    template <typename U> explicit DB_Matrix(const DB_Matrix<U>& y);
    ~DB_Matrix();
    
    VERIFICATION_CRITERIA:

    Inject each observable row-container/backing/coefficient construction failure, count live objects and owned storage before/after cleanup, preserve sources and retry only through the documented operation-specific state guarantees.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 20. Distance scratch storage, admissible overlaps and numeric conditions UID: PPL-SPEC-000770 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Distance calls shall require live valid square matrices, admitted finite or positive-infinite entries, a supported requested rounding direction, and temporary/result profiles supporting all conversion, subtraction, accumulation and finalization operations. Every intermediate bound shall satisfy its selected profile's representability/resource prerequisites. The three supplied mutable temporary objects shall be pairwise distinct and disjoint from matrix entry storage; their values may be overwritten.

    The result output may be independent, overlap any one temporary when types permit, or overlap one live source entry when all scratch objects remain independent. Result meaning shall use the matrices' values on entry. The same matrix may be supplied for both inputs. Unequal-dimension failure shall precede scratch/result modification. Other failures shall retain the selected numerical policies' own permitted output/scratch states without a general rollback guarantee. Initialization and synchronization shall retain 🔗 3. Thread initialization, default state and finalization where required. The generic distance helper shall apply these conditions when selected with the library's rectilinear, Euclidean or maximum-coordinate distance specialization for the same temporary type.

    RATIONALE:

    Caller-supplied scratch storage needs actual alias and failure conditions without excluding supported result overlaps.

    INTERFACE:

    Internal source header: DB_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to DB_Matrix<T> except the indicated nested row iterator. Dependent aliases retain their source-declared types.

    template <typename Specialization, typename Temp, typename To, typename T>
    bool l_m_distance_assign(Checked_Number<To, Extended_Number_Policy>& r,
                             const DB_Matrix<T>& x, const DB_Matrix<T>& y,
                             Rounding_Dir dir, Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Check result aliases to each scratch object and a source entry, identical input owners, unchanged result/workspaces on dimension mismatch and supported directions/profiles using independent exact-distance oracles.

    SOURCE:

    src/DB_Matrix_defs.hh; src/DB_Matrix_inlines.hh; src/DB_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/dbmatrixspec1.cc; tests/dbmatrixgrowth1.cc; tests/dbmatrixconstrows1.cc; tests/rawmatrixmetricshistories1.cc.

  • 1. Extended-number row meaning and construction states UID: PPL-SPEC-000651 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    DB_Row<T> shall own an indexed finite sequence of extended-number values. The selected T and checked-number operations shall support positive infinity initialization, the requested copying/conversion, validity and memory hooks, and nonthrowing destruction. Numerical operations shall satisfy their configured policy, representability and rounding prerequisites; initialization and synchronization shall follow 🔗 3. Thread initialization, default state and finalization where the selected element operations require them.

    Default construction shall produce a preconstructed owner with no row storage. This state shall admit destruction, ordinary copying/assignment, complete-owner swapping and first allocation/construction. Size, element, iterator, memory and validity queries shall require a constructed row. A constructed zero-length row shall be distinct from a preconstructed owner and shall admit ordinary constructed-row queries. Calls shall use live valid owners, nonoverflowing supported sizes/capacities and sufficient resources; failures shall not be successful numerical results.

    RATIONALE:

    Efficient numerical matrices distinguish an owner awaiting storage from a fully constructed row that happens to have no entries.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    template <typename T> class DB_Row;
    DB_Row();
    
    VERIFICATION_CRITERIA:

    Check legal preconstructed copying/assignment/swap and later construction without querying unconstructed storage; compare independent finite sequences in constructed empty and nonempty rows.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • PPL-SPEC-000653
    3. Independent row copies and enlarged copies UID: PPL-SPEC-000653 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Ordinary copy construction shall preserve a source's construction state. A constructed source shall yield an independently owned sequence of the same size and values; a preconstructed source shall yield a preconstructed target. The explicit-capacity copy shall require a constructed source and capacity at least its size. The size/capacity copy shall additionally require the new size to be at least the source size and at most capacity; it shall preserve source entries and initialize every additional entry to positive infinity.

    Successful copying shall not alter the source. Later changes or destruction of either owner shall not change the other's values. A source supplied through an rvalue shall use ordinary copy construction; no distinct move operation shall be required. Each capacity shall satisfy 🔗 2. Allocation and positive-infinity row construction; failed construction shall follow 🔗 10. Row construction cleanup and recoverable failure states.

    RATIONALE:

    Copying mathematical bounds must preserve exact values and independent ownership, while enlargement adds unconstraining new entries.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    DB_Row(const DB_Row& y);
    DB_Row(const DB_Row& y, dimension_type capacity);
    DB_Row(const DB_Row& y, dimension_type size, dimension_type capacity);
    
    VERIFICATION_CRITERIA:

    Compare copied values/addresses, alternative capacities, enlarged infinity suffixes, preconstructed sources, source mutation/destruction and multi-limb integer/rational payloads.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • 4. Row assignment and ownership-preserving swaps UID: PPL-SPEC-000654 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Assignment shall replace the target with an independent ordinary copy of the source's values and construction state and return the target wrapper. It shall admit distinct owners and self-assignment. A recoverable failure preparing the replacement shall preserve the prior complete target and source. Assignment from a preconstructed source shall release old target storage and leave the target preconstructed.

    Member/free swap shall exchange complete owned implementations and their construction states without coefficient copying or allocation, admitting preconstructed, constructed, empty and self-swapped rows. Existing element references/iterators shall retain the same live objects, now owned by the other row. Row iter_swap shall perform that whole-owner exchange at two valid vector positions. Old target borrows after replacement assignment shall not be reused. 🔗 1. Extended-number row meaning and construction states shall apply.

    RATIONALE:

    Mathematical value replacement and storage-owner exchange have different borrowing and failure guarantees.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    DB_Row& operator=(const DB_Row& y);
    void m_swap(DB_Row& y);
    template <typename T> void swap(DB_Row<T>& x, DB_Row<T>& y);
    template <typename T>
    void iter_swap(typename std::vector<DB_Row<T>>::iterator x,
                   typename std::vector<DB_Row<T>>::iterator y);
    
    VERIFICATION_CRITERIA:

    Check independent assignment and source destruction, preconstructed-state transfer, self-assignment, allocated/preconstructed swapping, retained coefficient addresses, vector row iter_swap, and allocation/element-copy failure preservation.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • PPL-SPEC-000656
    6. Within-capacity expansion and suffix destruction UID: PPL-SPEC-000656 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Expansion shall require a constructed row and a new size between its current size and actual capacity. It shall retain all existing entries and construct each added logical position as positive infinity. Shrinking shall require a new size no greater than the current size, retain the prefix and destroy the removed suffix in reverse construction order. Re-expanding previously removed positions shall create fresh infinity entries, without restoring their former values.

    Both operations shall retain backing capacity and all surviving prefix objects/addresses. Borrows of destroyed suffix entries shall become invalid. Zero/no-op sizes shall be admitted. If a recoverable element construction failure interrupts expansion, the row shall retain its old prefix plus exactly the successfully constructed new prefix and record that logical size; it shall remain destructible and reusable under 🔗 10. Row construction cleanup and recoverable failure states.

    RATIONALE:

    Bound-row resizing must preserve surviving coordinates and make every newly introduced bound unconstraining.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    void expand_within_capacity(dimension_type new_size);
    void shrink(dimension_type new_size);
    
    VERIFICATION_CRITERIA:

    Compare every small shrink/regrowth boundary and retained address with independent prefix models; count element lifetimes and inject each expansion construction failure, then retry.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • 7. Pointwise upward conversion of extended-number rows UID: PPL-SPEC-000657 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Upward-approximation construction shall require a preconstructed target, a constructed source, and an admitted capacity at least the source size. It shall produce the same logical size, independently owning a converted value at each source coordinate. Each successfully converted finite value shall be an upper bound on its exact source value under the selected conversion's supported ROUND_UP semantics; exactly representable conversions shall preserve that value. Admitted signed infinities shall retain their extended-number meaning.

    Conversion shall preserve the source. Selected source/target policies shall support all requested values and rounding directions, with every arithmetic/resource precondition active. Empty constructed sources shall produce constructed empty targets. Recoverable failures shall follow 🔗 10. Row construction cleanup and recoverable failure states and shall not be reported as successful bounds.

    RATIONALE:

    Changing the numeric representation of difference bounds must round outward coordinate by coordinate.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    template <typename U>
    void construct_upward_approximation(const DB_Row<U>& y,
                                        dimension_type capacity);
    
    VERIFICATION_CRITERIA:

    Compare signed rational inputs against independent GMP ceilings for integral targets and exact rational copies for rational targets, include both infinities and empty rows, and check source preservation.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • 9. Constructed-row validity checks and diagnostic metadata UID: PPL-SPEC-000659 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On a constructed row with valid storage and an admitted actual capacity, OK(expected_size,expected_capacity) shall return false for a mismatched logical size or for an entry that fails its own OK() hook or represents NaN. A row with matching size and valid non-NaN entries shall pass these checks. The configured extra-debug representation shall additionally compare its stored capacity with supplied capacity metadata and ensure logical size fits that stored capacity, treating the configured one-slot minimum for zero request consistently.

    Ordinary configurations shall not be required to retain/check capacity metadata. This query shall not repair entries or validate unconstructed storage. An exception from an element hook shall propagate with the hook's own state guarantee; node ownership shall remain with the row.

    RATIONALE:

    Validity diagnostics distinguish wrong logical metadata or unusable bound values from a successfully represented row.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    bool OK(dimension_type expected_size, dimension_type expected_capacity) const;
    
    VERIFICATION_CRITERIA:

    Check valid rows, deliberately mismatched expected size, an admitted NaN diagnostic value followed by repair, and configured extra-debug capacity checks without corrupting storage.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • 10. Row construction cleanup and recoverable failure states UID: PPL-SPEC-000660 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A recoverable backing-allocation failure shall release incomplete storage; failed first allocation shall leave a postconstruction receiver preconstructed. Failure of a sizing/copy constructor shall destroy every completed coefficient and release all storage of the incomplete owner, preserving the source. Failed replacement assignment shall retain 🔗 4. Row assignment and ownership-preserving swaps.

    If a postconstruction or within-capacity expansion call fails after acquiring storage, its receiver shall remain constructed with the successfully completed coefficient prefix recorded in its logical size. It shall retain owned storage and admit destruction, valid shrinkage, copying and a valid expansion retry. It shall not require a repeat of first allocation on the already allocated receiver. No completed element shall be leaked or destroyed twice. A configured fallback's already-live first physical element shall retain its correct lifetime even at logical size zero. These guarantees shall apply to supported recoverable C++ exceptions rather than fatal GMP allocation failure or violated inputs.

    RATIONALE:

    A split allocation/construction protocol needs precise partial-prefix states as well as ordinary failed-constructor cleanup.

    INTERFACE:

    Internal source header: DB_Row_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to DB_Row<T>; iterator and memory aliases have their declared source types.

    void allocate(dimension_type capacity);
    void construct(dimension_type size);
    void construct(dimension_type size, dimension_type capacity);
    DB_Row(dimension_type size);
    DB_Row(dimension_type size, dimension_type capacity);
    DB_Row(const DB_Row& y);
    DB_Row(const DB_Row& y, dimension_type capacity);
    DB_Row(const DB_Row& y, dimension_type size, dimension_type capacity);
    template <typename U>
    void construct_upward_approximation(const DB_Row<U>& y,
                                        dimension_type capacity);
    DB_Row& operator=(const DB_Row& y);
    void expand_within_capacity(dimension_type new_size);
    
    VERIFICATION_CRITERIA:

    Fail backing allocations and each observable coefficient construction/copy, check source/target preservation or admitted partial-prefix size, exact live/destruction counts and storage balance, then retry or destroy safely in both tail configurations.

    SOURCE:

    src/DB_Row_defs.hh; src/DB_Row_inlines.hh; src/DB_Row_templates.hh; tests/dbrowspec1.cc; tests/dbrowlegacy1.cc; tests/dbrowallocation1.cc; tests/dbrowiteratorlaws1.cc; tests/dbrowownedhistories1.cc.

  • PPL-SPEC-001388
    1. Determinate values and copy-on-write ownership UID: PPL-SPEC-001388 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a pointset, constraint system or congruence system shall embed the corresponding base-domain value. Copying may share its representation, but subsequent mutation through either adapter shall preserve the other value. In a thread-safe build each copy shall own its own representation so that const queries on different threads can update the embedded values' caches independently. Assignment shall support self-assignment and return its receiver. Exchange shall swap the embedded values. pointset() const shall return a borrowed const view. Both pointset() overloads shall require an lvalue wrapper; mutable and const temporary wrappers shall be rejected. Mutable pointset() and mutate() shall first detach shared storage. A retained mutable reference shall not be used across subsequent copying or other operations that can share or replace its representation. Destruction shall release the representation when its last owner is destroyed.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Copy-on-write is an ownership mechanism, so value independence must survive every exposed mutation path.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Determinate unless qualified otherwise.

    explicit Determinate(const PSET&);
    explicit Determinate(const Constraint_System&);
    explicit Determinate(const Congruence_System&);
    Determinate(const Determinate&); ~Determinate();
    Determinate& operator=(const Determinate&);
    const PSET& pointset() const &;
    const PSET& pointset() const && = delete;
    PSET& pointset() &;
    PSET& pointset() && = delete;
    void mutate(); void m_swap(Determinate&);
    template <typename PSET> void swap(Determinate<PSET>&, Determinate<PSET>&);
    
    VERIFICATION_CRITERIA:

    Check pointset/system construction, const sharing, detach, self-assignment/exchange and lifetime after an owner is destroyed. Admit mutable and const lvalue pointset borrows with unchanged reference types; reject mutable and const temporary wrappers.

    SOURCE:

    src/Determinate_defs.hh; src/Determinate_inlines.hh; src/Determinate_types.hh; tests/Powerset/powerset1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001389
    2. Determinate order and distinguished values UID: PPL-SPEC-001389 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Entailment shall mean that the receiver's embedded pointset is contained in y; definite equivalence and equality shall use base equality. Shared representations may short-circuit these tests. Top and bottom shall mean base universe and empty, respectively. Inequality shall negate equality.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The adapter must preserve the ordering direction expected by the powerset construction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Determinate unless qualified otherwise.

    bool definitely_entails(const Determinate&) const;
    bool is_definitely_equivalent_to(const Determinate&) const;
    bool is_top() const; bool is_bottom() const;
    template <typename PSET> bool operator==(const Determinate<PSET>&, const Determinate<PSET>&);
    template <typename PSET> bool operator!=(const Determinate<PSET>&, const Determinate<PSET>&);
    
    VERIFICATION_CRITERIA:

    Check equal shared and unshared values, proper inclusion in both directions and empty/universe.

    SOURCE:

    src/Determinate_defs.hh; src/Determinate_inlines.hh; src/Determinate_types.hh; tests/Powerset/entails1.cc; tests/Powerset/equals1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001390
    3. Determinate operations and binary lifting UID: PPL-SPEC-001390 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Upper bound, meet and concatenation shall detach as needed and delegate to base upper bound, intersection and concatenation, respectively. Their mathematical precision and argument admission shall follow the corresponding base member. lift_op_assign(f) shall return a function object which invokes f on a writable detached first pointset and a const second pointset. Self-aliasing shall follow the corresponding base operation. The function object shall retain a copy of f.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Lifting must route every mutation through detachment so shared disjuncts retain value semantics.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Determinate unless qualified otherwise.

    void upper_bound_assign(const Determinate&);
    void meet_assign(const Determinate&);
    void concatenate_assign(const Determinate&);
    template <typename Binary_Operator_Assign>
    class Binary_Operator_Assign_Lifter;
    template <typename Binary_Operator_Assign>
    static Binary_Operator_Assign_Lifter<Binary_Operator_Assign>
    lift_op_assign(Binary_Operator_Assign);
    
    VERIFICATION_CRITERIA:

    Compare each lifted operation with independent base calculations, including shared receivers and function-object state.

    SOURCE:

    src/Determinate_defs.hh; src/Determinate_inlines.hh; src/Determinate_types.hh; tests/Powerset/concatenate1.cc; tests/Powerset/meet1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001391
    4. Determinate display, invariants and memory UID: PPL-SPEC-001391 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall return the embedded pointset's invariant result. External memory shall include the representation object and its base external storage; total memory shall add sizeof(*this). Shared storage may be counted for each adapter. Stream insertion shall display the embedded pointset and return the supplied stream.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The reference-counted representation occupies storage beyond the adapter itself.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Determinate unless qualified otherwise.

    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    template <typename PSET>
    std::ostream& IO_Operators::operator<<(std::ostream&, const Determinate<PSET>&);
    
    VERIFICATION_CRITERIA:

    Check valid shared/unshared values, byte relationships and stream identity.

    SOURCE:

    src/Determinate_defs.hh; src/Determinate_inlines.hh; src/Determinate_types.hh; tests/Powerset/membytes1.cc.

  • PPL-SPEC-001646
    2. Exact comparison of revised PIP tableau columns UID: PPL-SPEC-001646 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The file-local column_lower helper shall compare two scaled columns of an admitted revised PIP tableau. The equally sized mapping and basis sequences shall enumerate each nonbasic tableau row and each basic variable column once in variable order. Reconstruct column Cj at position k as the matrix entry at mapping[k],j for a nonbasic entry, and as one or zero according as a basic entry maps to j or another column. Compared columns shall be lexicographically positive. Both pivot rows shall be actual rows of that tableau, with strictly positive selected entries pa, pb.

    The result shall be true exactly when  − caCja ⁄ pa < lex − cbCjb ⁄ pb, comparing reconstructed components in the stated variable order. The two column indices and pivot rows may coincide; zero and either sign of the costs shall be admitted. No input shall change. Comparisons shall evaluate complete two- and three-factor products exactly without requiring comparison-only products to fit the stored coefficient profile. The normal initialized coefficient/temporary- resource prerequisites shall apply.

    Omitting the final reconstructed component shall be permitted when the admitted tableau invariants prove it cannot be the first unequal component. For distinct columns and two nonzero costs, one of their distinct basic unit entries distinguishes them before the final position. With exactly one nonzero cost, its positive pivot entry also appears among the mapped rows, so its basic unit entry and that row cannot both occupy the final position. Two zero costs yield equal vectors. Same-column comparisons shall use the positive-column ratio ordering.

    RATIONALE:

    Exact rational column ordering supports pivot selection; its optimized early exits rely on the complete revised-tableau mapping rather than arbitrary unrelated row vectors.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless stated otherwise.

    // File-local helper in src/PIP_Tree.cc, within the PPL namespace:
    bool column_lower(const Matrix<PIP_Tree_Node::Row>&,
                      const std::vector<dimension_type>& mapping,
                      const std::vector<bool>& basis,
                      const PIP_Tree_Node::Row& pivot_a, dimension_type ja,
                      const PIP_Tree_Node::Row& pivot_b, dimension_type jb,
                      Coefficient_traits::const_reference ca = -1,
                      Coefficient_traits::const_reference cb = -1);
    
    VERIFICATION_CRITERIA:

    Generate coherent mapped tableaux, retain only lexicographically positive compared columns and positive actual pivots, and compare with independently reconstructed rational full vectors. Exercise reordered mappings, zero/positive/negative costs, same and different columns, equal vectors and late differences. Inspect the proof permitting omission of the final component under the admitted invariants.

    BIBLIOGRAPHY:

    Feautrier88 | Journal background on parametric lexicographic integer programming; the local mapping proof is stated in this contract.

    SOURCE:

    src/Exact_Arithmetic.hh; src/PIP_Tree.cc; tests/pipcolumnsspec1.cc.

  • 1. Embedded chain identity, links and ownership prerequisites UID: PPL-SPEC-000642 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Implementation::Doubly_Linked_Object shall provide an embedded forward/backward link pair; Implementation::EList<T> shall use a distinct owner-resident sentinel to form an ordered ring of T nodes. Valid linked use shall require live mutually reciprocal neighbor links and each node to belong to at most one chain. Node addresses shall remain fixed while linked. Copying or moving memberwise link fields shall not establish an independent ring; independent owner copying or relocation shall remain outside valid linked use.

    List nodes shall expose their accessible Doubly_Linked_Object base, support the selected T::OK() const hook, and remain compatible with scalar delete T* while list-owned. Destructors shall not throw. A linked node shall remain alive until explicitly removed or destroyed; borrowed iterators shall obey 🔗 7. Embedded-list iterator borrowing and valid linked positions. These structures shall require no numerical-library initialization. The link operations themselves shall neither allocate nor copy element values.

    RATIONALE:

    Embedded links must preserve actual node identity and distinguish ring structure from ownership of numerical payloads.

    INTERFACE:

    Internal source header: Doubly_Linked_Object_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to Doubly_Linked_Object; list iterator aliases have the declared mutable/const types.

    class Doubly_Linked_Object;
    template <typename T> class EList;
    
    VERIFICATION_CRITERIA:

    Check exact pointer order and surviving-node identities in valid rings and lists using noncopyable over-aligned nodes, including node destruction and owner destruction.

    SOURCE:

    src/Doubly_Linked_Object_defs.hh; src/Doubly_Linked_Object_inlines.hh; src/EList_defs.hh; src/EList_inlines.hh; tests/embeddedlistsspec1.cc; tests/embeddedlistlegacy1.cc.

  • 4. Embedded-node erasure and automatic unlink on destruction UID: PPL-SPEC-000645 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasing a live linked node shall reconnect its preceding and following neighbors, return its former following node, and leave every unrelated node's order and value unchanged. The removed node shall remain alive and caller-owned. It shall be independently destructible or insertable again; later operations on the surviving chain shall not cause its eventual destruction to remove or corrupt surviving nodes. Erasing an isolated self-linked node shall return that same node.

    Destroying a currently linked node shall unlink it without destroying its neighbors or their payloads. Removal and destruction shall require valid initialized link use under 🔗 1. Embedded chain identity, links and ownership prerequisites and 🔗 2. Embedded-node construction and link initialization.

    RATIONALE:

    A removed node and its surviving chain need separate lifetimes, and live linked destruction must preserve the remaining ring.

    INTERFACE:

    Internal source header: Doubly_Linked_Object_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to Doubly_Linked_Object; list iterator aliases have the declared mutable/const types.

    Doubly_Linked_Object* erase();
    ~Doubly_Linked_Object();
    
    VERIFICATION_CRITERIA:

    Check exact successor and survivor order, immediate removed-node destruction, reinsertion, automatic live-node unlink, isolated nodes, and independent removed-node destruction after later surviving-chain edits.

    SOURCE:

    src/Doubly_Linked_Object_defs.hh; src/Doubly_Linked_Object_inlines.hh; src/EList_defs.hh; src/EList_inlines.hh; tests/embeddedlistsspec1.cc; tests/embeddedlistlegacy1.cc.

  • 5. Empty owning-list construction and remaining-node destruction UID: PPL-SPEC-000646 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A new EList<T> shall contain no nodes and shall establish its own live sentinel with empty mutable and const iterator ranges. No element shall be constructed or allocated by empty-list construction.

    The list shall own nodes admitted by 🔗 1. Embedded chain identity, links and ownership prerequisites while they remain linked in it. List destruction shall remove and scalar-delete every remaining node exactly once, then destroy the empty sentinel. Previously removed nodes shall remain outside this destruction obligation. Destruction shall not invoke handlers or other unrelated client actions beyond the nodes' own destruction effects.

    RATIONALE:

    Owning-list lifetime must release its remaining heap nodes while keeping explicitly removed ownership separate.

    INTERFACE:

    Internal source header: EList_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to EList<T>; list iterator aliases have the declared mutable/const types.

    EList();
    ~EList();
    
    VERIFICATION_CRITERIA:

    Check empty construction/destruction, ordinary and over-aligned heap nodes, destructor counts and final zero live-node count through lists with inserted, removed and retained nodes.

    SOURCE:

    src/Doubly_Linked_Object_defs.hh; src/Doubly_Linked_Object_inlines.hh; src/EList_defs.hh; src/EList_inlines.hh; tests/embeddedlistsspec1.cc; tests/embeddedlistlegacy1.cc.

  • PPL-SPEC-000648
    7. Owning-list removal returns successor and node ownership UID: PPL-SPEC-000648 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasure shall require an occupied current same-list iterator. It shall remove exactly that node without deleting it, return its former following element or the same list's end, and transfer the removed node's ownership to the caller. Other node addresses, values and relative order, their live iterators and the owner sentinel shall remain unchanged. First, interior, last and sole-node removal shall be admitted.

    The removed node shall be independently destructible or insertable into an eligible list, including after intervening operations on its former owner; its eventual cleanup shall not alter surviving-node membership. An emptied list shall remain reusable. Safe detachment shall retain 🔗 4. Embedded-node erasure and automatic unlink on destruction.

    RATIONALE:

    Removing membership must return both the precise traversal continuation and independent ownership of the detached node.

    INTERFACE:

    Internal source header: EList_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to EList<T>; list iterator aliases have the declared mutable/const types.

    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Enumerate every occupied removal position and successor, check no premature destruction, reinsertion in a second list, immediate deletion, sole-node reuse, and later detached cleanup after independent surviving-list changes.

    SOURCE:

    src/Doubly_Linked_Object_defs.hh; src/Doubly_Linked_Object_inlines.hh; src/EList_defs.hh; src/EList_inlines.hh; tests/embeddedlistsspec1.cc; tests/embeddedlistlegacy1.cc.

  • PPL-SPEC-000650
    9. Owning-list node validity hooks UID: PPL-SPEC-000650 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a structurally valid live list under 🔗 1. Embedded chain identity, links and ownership prerequisites, OK() shall call the nodes' const OK() hooks in list order until the first false result or the end. It shall return false at the first false hook and true if all hooks return true, including an empty list. This result shall describe those node-hook outcomes; structural validity shall remain a precondition rather than a conclusion supplied by this query. Hooks shall retain chain structure and ownership.

    An exception from a hook shall propagate, preserving list membership and node ownership when the hook itself preserves them. The list shall not destroy nodes or interpret such an exception as a successful true or false query result.

    RATIONALE:

    Per-node payload checks are useful on a valid ring but cannot replace the ring's own lifetime and link preconditions.

    INTERFACE:

    Internal source header: EList_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to EList<T>; list iterator aliases have the declared mutable/const types.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Use independent true/false hooks at every node position, count call order/early return and empty conjunction, then inject a hook exception and verify membership, ownership and subsequent successful reuse.

    SOURCE:

    src/Doubly_Linked_Object_defs.hh; src/Doubly_Linked_Object_inlines.hh; src/EList_defs.hh; src/EList_inlines.hh; tests/embeddedlistsspec1.cc; tests/embeddedlistlegacy1.cc.

  • PPL-SPEC-000815
    1. Polymorphic event-action interface and virtual destruction UID: PPL-SPEC-000815 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler shall be an abstract interface with const action dispatch and virtual destruction. Calling act() through a live base reference shall dispatch to the selected derived handler. Deleting an owned derived handler through a base pointer shall run its derived destruction and release its wrapper exactly once. A borrowed handler shall not become owned merely by being passed to a pending event.

    Construction, dispatch and destruction shall require the selected external callback/flag objects and synchronization to remain valid. These wrappers shall not themselves require global PPL initialization or timer availability. A caller invoking actions in a signal handler or shared threshold-watcher context shall retain that surrounding interface's operation and thread/signal restrictions.

    RATIONALE:

    Notification storage relies on const polymorphic dispatch and deletion through its abstract action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler {
    public:
      virtual void act() const = 0;
      virtual ~Handler();
    };
    
    VERIFICATION_CRITERIA:

    Check base-reference action dispatch and derived destruction with owned wrappers, and preserve borrowed external objects across wrapper destruction.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 2. Flag-handler binding and binding-preserving copies UID: PPL-SPEC-000816 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Flag construction shall bind the supplied holder reference and flag object without invoking a priority query, installing the flag or taking ownership of either external object. Copy construction and rvalue construction shall preserve those same bindings; later actions shall observe the holder's current value rather than a pointer-value snapshot made during construction. Ordinary assignment of this reference-binding wrapper shall not be supported.

    The holder shall be a live volatile pointer to const Flag_Base and Flag* shall convert to Flag_Base*. For a nonnull holder, the existing pointee shall belong to the compatible Flag object family, so the implementation's declared base-to-flag cast is well formed and valid. The flag/holder and any nonnull pointee shall outlive their actual access. Wrapper destruction shall not delete or alter them.

    RATIONALE:

    A retained holder reference must follow later client updates, and priority comparison requires a valid concrete flag object behind the base pointer.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    template <typename Flag_Base, typename Flag> class Handler_Flag;
    Handler_Flag(const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check copied/rvalue wrappers, changed holder values after construction, compatible multiple-base pointer adjustment, construction without priority queries and unchanged borrowed-object lifetimes.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 3. Strict-priority flag installation UID: PPL-SPEC-000817 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On act(), a null bound holder shall be set to the bound flag address without querying flag priorities. For a nonnull valid holder, the action shall install the bound flag exactly when the existing flag's observed priority is strictly lower than the bound flag's observed priority. Equal or higher existing priority shall preserve the existing pointer. Priority queries shall supply comparable values consistent with that call's decision; they shall not themselves rebind the holder. External priority changes between calls shall be observed by later actions.

    The operation shall not own/delete flags or allocate a wrapper. If a priority query reports an exception, it shall propagate through ordinary C++ dispatch without an assignment by the handler to the holder; any side effects of the query itself shall remain its own contract.

    RATIONALE:

    Competing abandonment requests need the highest observed priority and a definite equal-priority retention rule.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Flag<Flag_Base, Flag>::act() const;
    
    VERIFICATION_CRITERIA:

    Check null holders, every smaller/equal/larger signed priority pair, dynamic priority changes, compatible base pointers and priority exceptions with unchanged holder identity.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 4. Function-handler target binding and copies UID: PPL-SPEC-000818 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Function construction shall store the supplied function pointer without invoking it. Copy and rvalue construction shall retain the same target. Ordinary assignment shall not be supported. A null pointer may be stored and destroyed without invocation, but shall not be an admitted action target. The callable code shall remain valid at invocation. Construction/copy/destruction shall not call or own the function or allocate auxiliary callback state.

    RATIONALE:

    A function wrapper owns its pointer binding while the callable code and its external state remain the caller's responsibility.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler_Function;
    Handler_Function(void (*function)());
    
    VERIFICATION_CRITERIA:

    Check zero callback calls during construction/copy/destruction, copied target identity by later dispatch, null-bound noninvoked wrappers and nonassignability.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 5. Function action dispatch and callback failure UID: PPL-SPEC-000819 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With a live nonnull target, Handler_Function::act() shall call the stored function exactly once per invocation and return normally exactly when that call returns normally. A callback exception shall propagate with its identity and previously performed callback effects; no rollback of arbitrary callback state shall be required. The wrapper shall remain bound to the same target and permit a later admitted call. No invocation shall silently replace the callback with another target or delete its external state.

    RATIONALE:

    Ordinary callback completion and callback failure must remain observable through the const action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Function::act() const;
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks, a callback that records an effect then throws a unique exception, repeated const/base dispatch and successful retry.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 1. Internal affine value, coefficient storage and dispatch prerequisites UID: PPL-SPEC-001622 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For Row equal to Dense_Row or Sparse_Row, a live Linear_Expression_Impl<Row> of dimension d shall own d + 1 coefficient slots. Slot zero shall contain the constant; slot i + 1 shall contain the coefficient of Variable(i). Dense storage shall retain zero slots; valid sparse expression storage shall contain no explicit zero entries. Trailing zero coordinates shall retain the ambient dimension. representation() shall return DENSE or SPARSE accordingly, and max_space_dimension() shall equal Row::max_size()-1.

    Calls shall satisfy the initialization, synchronization, coefficient-range and resource conditions of 🔗 1. Affine value, numerical prerequisites and shared zero. Raw slot indices shall be in [0, d + 1) and half-open windows shall satisfy 0 ≤ s ≤ e ≤ d + 1. A new dimension shall fit the selected backend's maximum; its increment for the constant slot shall be representable. Internal coordinate transformations shall receive in-dimension variables, valid distinct permutation cycles, and growth within that maximum.

    An argument dispatched through Linear_Expression_Interface shall have one of these two concrete backend types. Dispatch shall preserve the operation's meaning for every dense/sparse pairing. Setters and dimension transformations shall implement the coefficient effects of 🔗 5. Ambient dimension queries and trailing-coordinate resizing, 🔗 6. Coefficient access, replacement and zero predicates and 🔗 12. Explicit coefficient-coordinate transformations on these admitted inputs. A const access shall borrow its coefficient according to the selected traits; reads beyond the homogeneous dimension through coefficient(v) shall return zero. Mutations shall invalidate borrowed positions according to their storage.

    The internal row_data() accessor shall borrow the complete read-only row only from a live lvalue expression. Mutable and const temporary expression owners shall be rejected. A row borrow shall not outlive its owner or a mutation that invalidates the underlying coefficient storage.

    coefficient_is_owned(n) shall identify a reference to a stored coefficient in assertion builds when coefficient arguments use reference traits, without changing the expression. With value traits or assertions disabled it shall return false. Internal scalar-independence preconditions shall apply in every build mode; that diagnostic predicate shall not replace them.

    RATIONALE:

    Raw coefficient indices and variable identifiers have different meanings. Internal callers supply the validated dimensions and storage assumptions used by the public interface.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    template <typename Row> class Linear_Expression_Impl;
    static dimension_type max_space_dimension();
    const Row& row_data() const &;
    const Row& row_data() const && = delete;
    Representation representation() const;
    dimension_type space_dimension() const;
    void set_space_dimension(dimension_type);
    Coefficient_traits::const_reference coefficient(Variable) const;
    Coefficient_traits::const_reference inhomogeneous_term() const;
    void set_coefficient(Variable, Coefficient_traits::const_reference);
    void set_inhomogeneous_term(Coefficient_traits::const_reference);
    void swap_space_dimensions(Variable, Variable);
    void shift_space_dimensions(Variable, dimension_type);
    void remove_space_dimensions(const Variables_Set&);
    void permute_space_dimensions(const std::vector<Variable>&);
    // Private diagnostic helper:
    bool coefficient_is_owned(const Coefficient&) const;
    
    VERIFICATION_CRITERIA:

    Check both concrete backends, constant-slot mapping, zero reads beyond the dimension, coordinate transformations and trait-dependent borrowing. Inspect interface dispatch and scalar guards; compare public and backend effects on admitted inputs. Admit read-only row borrows from mutable and const lvalues of both backend types, and reject temporary owners.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001623
    2. Independent backend construction, copying and affine arithmetic UID: PPL-SPEC-001623 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall create the zero expression of dimension zero; coefficient and variable construction shall implement 🔗 2. Zero, constant, variable and dimensioned construction. The sizing constructor's Boolean argument shall distinguish its overload and shall not alter its meaning: it shall create the zero expression of the admitted requested dimension. Ordinary, cross-storage and interface-based copy construction shall produce independent coefficients. A dimensioned copy shall retain the selected prefix and zero-extend as necessary. Private construct helpers shall establish those same copied values. Destruction shall release the owned row without changing a distinct source.

    Backend affine additions, subtractions, multiplication, truncating division, negation, normalization and coordinate updates shall implement the value rules of 🔗 7. Affine addition, subtraction and negation, 🔗 8. Integral scalar multiplication and coefficient-wise division, 🔗 9. Explicit scaled accumulation, combination and elimination and 🔗 10. Coefficient normalization and sign normalization. Expression addition and subtraction shall admit self operands. Whole-expression combinations and scaled accumulations shall receive a distinct source; their scalar arguments shall be independent of modified target coefficients. Multiplication and division factors shall likewise be independent of the target. Division shall receive a nonzero divisor. Scaled variable accumulation shall retain the variable's dimension even for a zero factor; zero-factor scaled expression accumulation shall preserve the target's current dimension and value.

    The prerequisites of 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites shall apply. Each operation that returns a backend reference shall return its target. Distinct sources shall retain their values and dimensions.

    RATIONALE:

    Concrete storage and dynamic dispatch must preserve the public affine value while retaining the stronger internal operand-independence conditions.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    Linear_Expression_Impl();
    explicit Linear_Expression_Impl(Coefficient_traits::const_reference);
    Linear_Expression_Impl(Variable);
    Linear_Expression_Impl(dimension_type, bool);
    Linear_Expression_Impl(const Linear_Expression_Impl&);
    template <typename Other>
    Linear_Expression_Impl(const Linear_Expression_Impl<Other>&);
    Linear_Expression_Impl(const Linear_Expression_Interface&);
    Linear_Expression_Impl(const Linear_Expression_Interface&, dimension_type);
    ~Linear_Expression_Impl();
    Linear_Expression_Impl& operator+=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator-=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator+=(Variable);
    Linear_Expression_Impl& operator-=(Variable);
    Linear_Expression_Impl& operator+=(const Linear_Expression_Interface&);
    Linear_Expression_Impl& operator-=(const Linear_Expression_Interface&);
    Linear_Expression_Impl& operator*=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator/=(Coefficient_traits::const_reference);
    void negate();
    void normalize();
    void sign_normalize();
    Linear_Expression_Impl& add_mul_assign(Coefficient_traits::const_reference, Variable);
    Linear_Expression_Impl& sub_mul_assign(Coefficient_traits::const_reference, Variable);
    void add_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Interface&);
    void sub_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Interface&);
    // Typed source overloads and private construct helpers:
    template <typename Other>
    Linear_Expression_Impl& operator+=(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    Linear_Expression_Impl& operator-=(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void add_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void sub_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Impl<Other>&);
    template <typename Other> void construct(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void construct(const Linear_Expression_Impl<Other>&, dimension_type);
    
    VERIFICATION_CRITERIA:

    Compare copied, truncated and extended values across all storage pairings; mutate copies independently. Check exact coefficient-vector arithmetic, self addition/subtraction, zero factors and returned-target identity using existing public and direct-backend histories.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001624
    3. Raw coefficient access, zero ranges, gcd and support filtering UID: PPL-SPEC-001624 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, get(i) shall return the raw coefficient ai; set(i,n) shall replace it by the entry value of n, removing a sparse entry when zero. is_zero() shall test every slot; all_homogeneous_terms_are_zero() shall exclude slot zero.

    For an admitted window [s, e), all_zeroes shall test every slot, num_zeroes shall count zero slots, and gcd shall return the nonnegative greatest common divisor of those coefficients. An empty or all-zero window shall have gcd zero. The positive gcd shall be representable in the selected coefficient type. first_nonzero(s,e) and last_nonzero(s,e) shall return the least and greatest nonzero slot, respectively, or e if none exists. No-argument last_nonzero() shall return the greatest nonzero slot, or zero for the all-zero vector.

    all_zeroes(vars) shall test precisely the selected homogeneous coefficients. all_zeroes_except(vars,s,e) shall test the window after excluding the selected variable coefficients; slot zero shall never be excluded by a variable set. Empty windows shall satisfy both universal predicates. has_a_free_dimension_helper(indices) shall retain exactly those input raw indices whose coefficients are zero, inserting no new indices. Variable sets and raw indices shall be within the respective admitted extent. All queries shall preserve the expression.

    RATIONALE:

    Internal algebra uses raw coefficient windows, including the constant, and needs consistent empty-window results and absence sentinels.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    Coefficient_traits::const_reference get(dimension_type) const;
    void set(dimension_type, Coefficient_traits::const_reference);
    bool is_zero() const;
    bool all_homogeneous_terms_are_zero() const;
    bool all_zeroes(dimension_type start, dimension_type end) const;
    dimension_type num_zeroes(dimension_type start, dimension_type end) const;
    Coefficient gcd(dimension_type start, dimension_type end) const;
    dimension_type first_nonzero(dimension_type first, dimension_type last) const;
    dimension_type last_nonzero(dimension_type first, dimension_type last) const;
    dimension_type last_nonzero() const;
    bool all_zeroes(const Variables_Set&) const;
    bool all_zeroes_except(const Variables_Set&, dimension_type, dimension_type) const;
    void has_a_free_dimension_helper(std::set<dimension_type>&) const;
    
    VERIFICATION_CRITERIA:

    Compare every window of literal vectors with independent counts, gcds and nonzero positions. Enumerate variable masks and raw-index subsets; include nonzero constants, zero-dimensional expressions, empty windows, negative inputs and both storage types.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001625
    4. Range scaling and exact affine elimination UID: PPL-SPEC-001625 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, mul_assign(c,s,e) shall multiply exactly the raw slots in [s, e) by c; zero shall clear that window. exact_div_assign(c,s,e) shall divide those slots exactly by a nonzero c that divides every selected coefficient. negate(s,e) shall negate precisely those slots. Every operation shall retain dimension and all coefficients outside its window.

    For distinct target x and source y, range linear_combine shall assign xi :  = c1xi + c2yi from entry values for s ≤ i < e, with nonzero scalars. linear_combine_lax shall admit zero scalars as well. Both windows shall fit their respective expressions. Whole-expression forms shall use the maximum input dimension and zero-extend absent coordinates. Scalar arguments shall be live and independent of modified target coefficients. The source shall retain its value and dimension. Empty windows shall preserve the target; valid sparse results shall contain no explicit zeros.

    The raw-index elimination overload shall require equal dimensions, a distinct source and nonzero pivot coefficients xk, yk. With g = gcd(|xk|, |yk|) > 0, it shall replace every target coefficient by (yk ⁄ g)xi − (xk ⁄ g)yi. The selected pivot shall become zero. The variable overload shall use raw index v.space_dimension(). All evaluated coefficient arithmetic, including normalization factors, shall meet the selected profile's representability conditions.

    RATIONALE:

    Elimination is an exact integer combination with reduced factors. Windowed operations must preserve independent prefix and suffix coefficients across storage pairings.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    void mul_assign(Coefficient_traits::const_reference, dimension_type, dimension_type);
    void exact_div_assign(Coefficient_traits::const_reference, dimension_type, dimension_type);
    void negate(dimension_type, dimension_type);
    void linear_combine(const Linear_Expression_Interface&, Variable);
    void linear_combine(const Linear_Expression_Interface&, dimension_type);
    void linear_combine(const Linear_Expression_Interface&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    void linear_combine_lax(const Linear_Expression_Interface&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    void linear_combine(const Linear_Expression_Interface&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                        dimension_type, dimension_type);
    void linear_combine_lax(const Linear_Expression_Interface&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                            dimension_type, dimension_type);
    // Each linear-combination form also has a typed source overload:
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&, dimension_type);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&, Variable);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    template <typename Other>
    void linear_combine_lax(const Linear_Expression_Impl<Other>&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                        dimension_type, dimension_type);
    template <typename Other>
    void linear_combine_lax(const Linear_Expression_Impl<Other>&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                            dimension_type, dimension_type);
    
    VERIFICATION_CRITERIA:

    Use independent integer vectors for all four storage pairings, every admitted small window and signed/zero/unit factors. Check direct and interface-dispatched paths, outside-window preservation, source independence, exact-divisibility cases and the reduced pivot formula.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • 5. Backend equality, comparison and common-variable queries UID: PPL-SPEC-001626 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, full is_equal_to(y) shall require equal dimensions and equal raw coefficient vectors. Range equality shall compare only the admitted common window. Scaled range equality shall test c1xi = c2yi at every selected slot, including when either scalar is zero. Each evaluated scaled product shall be representable. Empty-window equality shall hold.

    compare(y) shall compare homogeneous coefficients in increasing variable order, treating absent trailing coefficients as zero, and compare the constant only if all homogeneous coefficients agree. It shall return -2 or 2 for the first homogeneous difference, -1 or 1 for a constant-only difference, and zero for equal zero-extended affine values. Consequently, different declared dimensions containing only additional zero coefficients may compare as zero while failing full dimension-sensitive equality.

    have_a_common_variable(y,first,last) shall hold exactly when some variable in the admitted half-open variable range has nonzero coefficients in both operands. Constants shall be irrelevant. All queries shall preserve their operands and shall have the same meaning through typed and interface dispatch.

    RATIONALE:

    Dimension-sensitive identity and affine-value ordering serve different internal purposes. Sparse support and dispatch must not change either result.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    bool is_equal_to(const Linear_Expression_Interface&) const;
    bool is_equal_to(const Linear_Expression_Interface&, dimension_type, dimension_type) const;
    bool is_equal_to(const Linear_Expression_Interface&,
                     Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                     dimension_type, dimension_type) const;
    int compare(const Linear_Expression_Interface&) const;
    bool have_a_common_variable(const Linear_Expression_Interface&, Variable, Variable) const;
    template <typename Other> bool is_equal_to(const Linear_Expression_Impl<Other>&) const;
    template <typename Other>
    bool is_equal_to(const Linear_Expression_Impl<Other>&, dimension_type, dimension_type) const;
    template <typename Other>
    bool is_equal_to(const Linear_Expression_Impl<Other>&,
                     Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                     dimension_type, dimension_type) const;
    template <typename Other> int compare(const Linear_Expression_Impl<Other>&) const;
    template <typename Other>
    bool have_a_common_variable(const Linear_Expression_Impl<Other>&, Variable, Variable) const;
    
    VERIFICATION_CRITERIA:

    Compare signed literal vectors and zero-extended unequal dimensions in all storage pairings. Enumerate every common window, zero/nonzero scale pair and common-variable interval, checking direct and dispatched calls and source preservation.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001627
    6. Owned raw iterator handles and borrowed coefficient positions UID: PPL-SPEC-001627 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, begin() and end() shall allocate independent polymorphic iterator handles delimiting the nonzero homogeneous coefficients in increasing variable order. lower_bound(v) shall allocate a handle at the first such variable at least v, or at end. The search variable shall be within the dimension or its one-past position. The caller shall delete each allocated handle through its virtual interface. The handles shall borrow the live expression's row without owning it.

    Direct nested-iterator construction shall require a row of at least one slot and a starting raw index 1 ≤ i ≤ row.size(). It shall borrow that row at the first nonzero slot at or after i, or at end. The row shall outlive every such handle.

    clone() shall allocate an independent handle at the same borrowed position. Advancing or destroying one handle shall preserve another handle's position and the coefficients. Dereference, variable() and index() shall require a live non-end position; index shall be variable().id()+1. Increment shall move to the next nonzero homogeneous coefficient, admitting arrival at end. Decrement shall require a preceding nonzero homogeneous coefficient and shall move to it, including from end. Constant slot zero shall be excluded.

    Equality shall compare positions in the same row and concrete iterator type. Expression mutation shall invalidate borrowed positions as declared for the row; the caller shall obtain new handles afterward. Allocation failures shall propagate without changing the expression or existing handles. The internal zero-skipping helpers shall implement this traversal without changing values.

    RATIONALE:

    Raw polymorphic iterator handles have caller-owned allocation and a separately borrowed coefficient lifetime. Copying a handle must preserve independent traversal state.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    using iterator_interface = Linear_Expression_Interface::const_iterator_interface;
    iterator_interface* begin() const;
    iterator_interface* end() const;
    iterator_interface* lower_bound(Variable) const;
    // Members of Linear_Expression_Impl<Row>::const_iterator:
    explicit const_iterator(const Row&, dimension_type);
    iterator_interface* clone() const;
    void operator++();
    void operator--();
    Coefficient_traits::const_reference operator*() const;
    Variable variable() const;
    dimension_type index() const;
    bool operator==(const iterator_interface&) const;
    // Private traversal helpers:
    void skip_zeroes_forward();
    void skip_zeroes_backward();
    
    VERIFICATION_CRITERIA:

    Exercise forward and reverse paths, constants and trailing zero slots, every lower bound, clone independence and deletion through the base interface in both backends. Check empty traversal and allocation failures without using invalidated handles.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001628
    7. Backend row export, serialization, diagnostics and accounting UID: PPL-SPEC-001628 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, get_row(r) shall replace a dense or sparse output with an independent copy of the complete raw coefficient vector. The copy shall include its logical extent, all constant and trailing zero slots, and shall not borrow the backend's coefficient storage.

    ascii_dump(stream) shall emit size, the raw slot count, and every coefficient in slot order, using the producer grammar of 🔗 13. Reloadable ASCII export and replacement loading. ascii_load(stream) shall implement that raw grammar: require its exact size keyword and a nonzero raw count, replace the row and read exactly that many coefficients. Normal malformed or truncated extraction shall return false; resource and stream exceptions shall propagate. A rejected or throwing load may leave a partially replaced row; only destruction shall be required until the caller restores a valid value. A following token shall remain available after a complete record. The selected coefficient input grammar, stream formatting and exception masks shall retain their ordinary behavior.

    print(stream) and the free stream insertion shall implement the affine format and variable formatter dispatch of 🔗 14. Human-readable affine output and formatter dispatch; insertion shall return its stream. Source values shall be preserved by export and print. OK() shall return false for a row of size zero, and sparse OK() shall also reject any explicit stored zero, with its documented diagnostic to std::cerr. This local check shall not inspect unrelated domain state. external_memory_in_bytes() shall report the owned row's external storage; total_memory_in_bytes() shall add sizeof(*this).

    RATIONALE:

    A raw backend export must preserve both the affine coefficient vector and its owning storage, while failed loading has a deliberately limited lifetime guarantee.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    void get_row(Dense_Row&) const;
    void get_row(Sparse_Row&) const;
    void ascii_dump(std::ostream&) const;
    bool ascii_load(std::istream&);
    void print(std::ostream&) const;
    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    template <typename Row>
    std::ostream& operator<<(std::ostream&, const Linear_Expression_Impl<Row>&);
    
    VERIFICATION_CRITERIA:

    Overwrite differently sized prepopulated rows, then mutate source and outputs independently. Check exact dumps, valid reloads, malformed/truncated input, suffix retention, ordinary stream failures, formatting and accounting identities in both backends.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • 1. Target-adapted floating expression evaluation UID: PPL-SPEC-000991 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a well-formed floating-point expression and sound composite abstract store, linearize() shall return true only with a linear form enclosing every modeled expression value consistent with the entry inputs, including the analyzed operations' rounding error. Target nodes and the oracle shall meet 🔗 4. Target-specific concrete-expression adapter protocol, 🔗 6. Oracle interval and expression-value queries and 🔗 7. Oracle reference-to-coordinate associations. Each stored affine binding shall already enclose the corresponding coordinate in that same modeled state. Correlations shall use consistent coordinate identities.

    C shall have a supported native floating-point boundary type and sound interval operations under its initialized arithmetic/FPU prerequisites. Modeled metadata shall not itself establish numerical format support. The selected relative/absolute-error helpers shall support every format for which the operation needs an error bound. Allocation, callback and selected arithmetic operations shall satisfy their documented preconditions.

    On false return, the output shall not establish a complete enclosure; no preservation of its prior value shall be promised. Documented callback, resource and unsupported-operation exceptions may propagate. Output owners shall remain safely destructible and reusable after such failure. Analysis shall use input entry values even when result designates a store binding; only the designated output may then change, and other input bindings and target nodes shall remain unchanged. No node or oracle ownership shall be acquired.

    RATIONALE:

    A successful result is a numerical enclosure promise for the original modeled state, rather than a claim about real arithmetic alone.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool linearize(
      const Concrete_Expression<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Use exact rational modeled arithmetic and independently rounded binary32 samples, retained input snapshots, refusal/recovery, supported native boundary profiles and entry-value alias histories; compare every successful affine enclosure at explicit valuations.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Theorem 1 and the discussion of failed linearization (PDF page index 7, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000992
    2. Floating constant linearization UID: PPL-SPEC-000992 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a floating-constant node, linearize() shall query the oracle for that constant. Refusal shall return false. Success shall replace result with a dimension-zero form whose constant is the returned interval and whose homogeneous coefficients are zero. This leaf shall add no operation-rounding error beyond the oracle's enclosure. A valid unbounded oracle interval shall remain an admitted constant result; true at this leaf shall not by itself certify finite coefficients. The common prerequisites and failure/lifetime rules of 🔗 1. Target-adapted floating expression evaluation shall apply.

    RATIONALE:

    Constant interpretation belongs to the oracle; constructing its affine enclosure must not reinterpret it as an additional arithmetic operation.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool linearize(
      const Concrete_Expression<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Check exact and non-dyadic rational payloads, dimension replacement, unbounded constant intervals, oracle refusal and recovery, without introducing coordinate queries.

    BIBLIOGRAPHY:

    Mine04 | Section 5, constant and variable linearization rules (PDF page index 6, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000993
    3. Unary and unsupported operator dispatch UID: PPL-SPEC-000993 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For unary UPLUS, linearize() shall return the operand's linearization without an additional rounding term. For UMINUS, it shall propagate operand refusal; on success it shall negate every coefficient interval, preserving the operand form's dimension. Unary BNOT shall report unsupported evaluation by throwing std::runtime_error.

    Binary REM, BAND, BOR, BXOR, LSHIFT and RSHIFT shall return false without claiming a result. ADD, SUB, MUL and DIV shall dispatch to their matching helper contracts. Unknown kind/operator codes inconsistent with the target protocol shall be outside the admitted interface. The common prerequisites and failure/lifetime rules of 🔗 1. Target-adapted floating expression evaluation shall apply.

    RATIONALE:

    Expression syntax must distinguish supported arithmetic, exact sign changes and explicit unsupported outcomes.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool linearize(
      const Concrete_Expression<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Check both unary signs on constant and symbolic forms, nested refusal, every named unsupported binary operator and the unary exception, with independent child-query counters and preserved inputs.

    BIBLIOGRAPHY:

    Mine04 | Section 5, interval linear forms and coefficient-wise arithmetic (PDF page index 6, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • 4. Rounding-aware addition linearization UID: PPL-SPEC-000994 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_linearize() shall require an ADD node and linearize both operands in the same entry store. When either operand refuses, it shall return false. A successful child form with an unbounded coefficient shall also cause refusal before its relative-error form is constructed; later children need not be evaluated after this refusal. Let L1, L2 be their forms, Rf the selected format's relative-error form from 🔗 21. Format-specific relative-error linear form, and Af the interval returned by compute_absolute_error<C>(f). The output shall soundly enclose the coefficient-wise combination L1 + L2 + Rf(L1) + Rf(L2) + Af, retaining symbolic coordinate terms. It shall return false if the resulting coefficients are unbounded, and true otherwise. 🔗 1. Target-adapted floating expression evaluation shall govern runtime, entry-value, exception and ownership semantics.

    RATIONALE:

    Addition requires both operand-sensitive relative error and an absolute error allowance while retaining useful affine dependence.

    A rounded parent needs finite coefficient magnitudes even when a constant leaf can soundly represent an unbounded value.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool add_linearize(
      const Binary_Operator<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Compare exact rational affine coefficients and independently rounded binary32 sums at explicit valuations, including half-ulp ties, cancellation, unequal dimensions and operand refusal; distinguish removal of each error component.

    Check unbounded constant leaves in either child position, refusal before relative-error construction, first-child short-circuiting and successful bounded recovery. Keep source/store entry-value and alias controls.

    BIBLIOGRAPHY:

    Mine04 | Section 5, addition linearization and relative-error definitions (PDF page index 6, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000995
    5. Rounding-aware subtraction linearization UID: PPL-SPEC-000995 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    sub_linearize() shall require a SUB node and linearize both operands in the same entry store. Operand refusal shall return false. A successful child form with an unbounded coefficient shall also cause refusal before its relative-error form is constructed; later children need not be evaluated after this refusal. Using L1, L2, Rf, Af as in 🔗 4. Rounding-aware addition linearization, the output shall soundly enclose L1 − L2 + Rf(L1) + Rf(L2) + Af, using coefficient-wise interval operations and preserving the operands' coordinate identities. It shall return false if any resulting coefficient is unbounded, and true otherwise. 🔗 1. Target-adapted floating expression evaluation shall govern common prerequisites and failure effects.

    RATIONALE:

    Subtraction must preserve cancellation relationships while accounting for both operands in its rounding bound.

    Finite coefficient magnitudes make the two relative-error components well-defined; an admitted unbounded leaf can therefore cause parent refusal.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool sub_linearize(
      const Binary_Operator<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Use independently rounded subtraction samples, cancellation and nontrivial signs, different symbolic dimensions and refusal at either operand; compare rational coefficient bounds and input snapshots.

    Check unbounded constant leaves on both sides, first-child short-circuiting, safe refusal and bounded recovery without changing operand signs or input entry values.

    BIBLIOGRAPHY:

    Mine04 | Section 5, subtraction linearization and relative-error definitions (PDF page index 6, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000996
    6. Interval-scalar multiplication linearization UID: PPL-SPEC-000996 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    mul_linearize() shall require a MUL node, obtain both operand forms and intervalize both through the oracle. Failure of any required linearization or coordinate query shall return false. It shall select a bounded intervalized operand for scalar multiplication; if neither operand has a bounded interval enclosure it shall return false. If the retained form has an unbounded coefficient, an exactly zero selected scalar shall yield a dimension-zero form containing the absolute-error interval without constructing relative error; a nonzero selected scalar shall cause refusal. Width estimates may choose either bounded operand and shall not promise optimal precision.

    For a bounded retained form, if I1 is selected, the result shall soundly enclose I1L2 + I1Rf(L2) + Af; if I2 is selected it shall soundly enclose I2L1 + I2Rf(L1) + Af. Scalar multiplication shall preserve the other operand's symbolic coordinates. It shall return false for an unbounded result coefficient, and true otherwise. Common notation and prerequisites shall follow 🔗 4. Rounding-aware addition linearization and 🔗 1. Target-adapted floating expression evaluation.

    RATIONALE:

    One operand is enclosed as a scalar interval so that the remaining affine dependence can be retained without introducing nonlinear terms.

    An exact zero scalar annihilates every real coefficient without requiring a finite magnitude for the retained form. A nonzero scalar still requires finite retained coefficients for relative-error construction.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool mul_linearize(
      const Binary_Operator<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Use independent rational products and binary32 rounding, opposite width choices, signed intervals, ties, one/two unbounded enclosures and refusal at each required query; ensure the unselected symbolic dependence remains represented.

    Check an unbounded constant times exact zero in both selected orientations, requiring only the absolute-error constant and dimension zero. Nonzero bounded scalars with unbounded retained coefficients shall refuse. Retain successful unbounded oracle values with bounded coefficient forms.

    BIBLIOGRAPHY:

    Mine04 | Section 5, multiplication and intervalization rules (PDF page indices 6–7, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000997
    7. Nonzero interval-divisor linearization UID: PPL-SPEC-000997 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    div_linearize() shall require a DIV node and first obtain the denominator's linear form and oracle-based interval enclosure. Required query refusal shall return false. If the closed hull of the denominator interval reaches zero it shall return false, including a zero endpoint excluded by openness. Thus a successful division shall not rely on an unproved nonzero denominator. A one-sided unbounded denominator whose closed hull excludes zero shall remain admitted when the selected interval arithmetic supports it.

    It shall then linearize the numerator, propagating refusal. An unbounded numerator coefficient shall cause refusal before its relative-error form is constructed. For numerator form L1 and denominator enclosure I2, it shall soundly enclose L1 ⁄ I2 + Rf(L1) ⁄ I2 + Af, retaining numerator coordinates. An unbounded result coefficient shall return false; a bounded result shall return true. Common prerequisites and notation shall follow 🔗 1. Target-adapted floating expression evaluation and 🔗 4. Rounding-aware addition linearization.

    RATIONALE:

    Division requires established separation from zero before applying a reciprocal scalar enclosure and its rounding allowance.

    A sign-separated unbounded divisor can have a bounded reciprocal, while relative rounding of the numerator requires finite coefficient magnitudes.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool div_linearize(
      const Binary_Operator<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Check positive/negative and one-sided unbounded denominators, interior/closed/open-endpoint zero exclusions, denominator-first refusal and successful retry; compare exact rational quotient and independently rounded binary32 samples.

    Check unbounded numerator refusal after denominator validation, preserving denominator-first queries. Retain bounded numerator controls with positive and negative sign-separated unbounded denominator intervals.

    BIBLIOGRAPHY:

    Mine04 | Section 5, division and intervalization rules (PDF page indices 6–7, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000998
    8. Floating and integer cast linearization UID: PPL-SPEC-000998 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    cast_linearize() shall require a floating-result cast node. For a floating argument it shall linearize that argument, propagating refusal. When the destination format contains every finite value representable by the source format, it shall retain the resulting form without added cast error. A constant enclosure certified by 🔗 11. Constant affine enclosures closed under destination rounding shall also require no added cast error.

    For an integer argument it shall obtain a sound interval through get_integer_expr_value(), returning false on refusal. If the destination contains every finite value of the analyzer boundary format, it shall close any excluded finite endpoints of that interval and retain the resulting constant form without a further error term. Equality of formats shall satisfy this inclusion condition. Other integer enclosures certified by 🔗 11. Constant affine enclosures closed under destination rounding shall remain unchanged without an error term.

    Value-set inclusion shall use is_less_precise_than(): the destination contains the analyzer exactly when !is_less_precise_than(destination, analyzer). The converse difference predicate shall not establish inclusion for incomparable formats.

    In the remaining cases it shall add destination-format relative and absolute error enclosures. An unbounded input coefficient shall cause refusal before relative error is constructed. Unbounded resulting coefficients shall return false and bounded coefficients true. Error-free casts may retain admitted unbounded enclosures; success alone shall not certify finite coefficients. Common numerical and entry-value rules shall follow 🔗 1. Target-adapted floating expression evaluation; unsupported selected error helpers may report their documented exceptions.

    RATIONALE:

    Format value sets form a partial order. Lacking some destination values does not establish that every analyzer value belongs to the destination. Monotone rounding fixes representable finite enclosure endpoints, but may produce a previously excluded endpoint. Closing those endpoints preserves soundness of integer conversions. A closed constant enclosure with exact finite endpoints already contains every rounded result, even when not every interior value is exactly representable.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool cast_linearize(
      const Cast_Operator<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Check same-format, widening and narrowing casts, zero/one and other exact constants, padded zero dimensions and genuine symbolic forms. Compare integer and floating casts with independent exact-rational destination lattices. Include signed modeled128-bit integers without native128 arithmetic, oracle refusal/recovery, input/output store aliases and unsupported selected error helpers.

    Check binary32 analyzer enclosures of integers converted to IBM single, including an enclosure containing no destination value. Check integer casts whose open native endpoints can become rounded results, both for equal and wider destinations. Distinguish certified constant rays and universe from unbounded enclosures requiring an error term. Check open finite endpoints and nonrepresentable finite endpoints against directed rounding neighbors.

    BIBLIOGRAPHY:

    Mine04 | Section 5, floating-point cast linearization rule (PDF page index 6, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/castcontracts1.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000999
    9. Reference association and symbolic-store lookup UID: PPL-SPEC-000999 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an approximable reference, linearize() shall obtain its possible coordinate identities from the oracle. Refusal or an empty association set shall return false. For a single associated coordinate, an existing store binding shall be copied into the result; an unbounded copied form shall return false. If that key is absent, the result shall be the exact unit variable form for that coordinate, with dimension equal to its index plus one. This symbolic fallback shall not require a numerical coordinate query.

    For multiple possible coordinates it shall query every required coordinate interval and return false on refusal. Otherwise it shall form their interval hull as a dimension-zero constant form, returning true exactly when its coefficient is bounded. It shall not arbitrarily select one possible identity or combine alternatives as a conjunction. Coordinate validity, entry-value copying and common lifetime/numerical rules shall follow 🔗 7. Oracle reference-to-coordinate associations and 🔗 1. Target-adapted floating expression evaluation.

    RATIONALE:

    A known identity permits affine substitution; several possible identities require a conservative numerical union.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Target, typename C>
    bool linearize(
      const Concrete_Expression<Target>& expression,
      const FP_Oracle<Target, C>& oracle,
      const std::map<dimension_type, Linear_Form<C>>& store,
      Linear_Form<C>& result);
    
    VERIFICATION_CRITERIA:

    Check absent/present single keys, independent copies, high valid indices, unbounded stored forms, multiple coordinate hulls, empty/refused sets and failure at first/middle/last value query followed by recovery.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based).

    SOURCE:

    src/linearize.hh; src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionlinearizationspec1.cc; tests/expressionprotocolfixture.hh; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/expressionpublic1.cc.

  • 10. Native value membership in modeled floating formats UID: PPL-SPEC-001658 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a configured supported native binary floating type Boundary and one of the seven modeled Floating_Point_Format values, cast_value_is_exact() shall return true exactly when the native value is finite and exactly representable in that modeled format. Both signs of zero shall be representable. Nonfinite native values shall return false.

    Binary format membership shall include normal and subnormal values within the finite range of binary16, binary32, binary64, binary128 and x87 extended. IBM single and double membership shall use their normalized radix-16 value sets, including zero, their finite exponent ranges and their respective significand precisions. Membership shall be symmetric under sign reversal. The checker shall require no dynamic storage and shall preserve the active rounding direction.

    RATIONALE:

    Exact destination-value membership permits an enclosure endpoint to be a fixed point of rounding. Classification through exact native scaling avoids rounding through the very destination format being examined. Equality with an integer-rounded value tests integrality in any rounding direction.

    INTERFACE:

    Header: <ppl.hh>; namespace Parma_Polyhedra_Library::Implementation.

    template <typename Boundary>
    bool cast_value_is_exact(Boundary value, Floating_Point_Format format);
    
    VERIFICATION_CRITERIA:

    Compare classifications with independent integer/rational lattice tests for every format. Include signed zero, both signs, subnormal and normal boundaries, exponent boundaries, exact and inexact significands, finite extremes, infinities and NaN. Exercise native precision both below and above the destination precision, including cases requiring no significand scaling. Check classification and direction preservation in all four IEEE rounding directions, including exact values and halfway/inexact significands. Exercise actual native significand precisions both up to 64 bits and above 64 bits; inspect the compiled precision selection and the retained wide-format path.

    SOURCE:

    src/linearize.hh; tests/Concrete_Expression/castcontracts1.cc.

  • 11. Constant affine enclosures closed under destination rounding UID: PPL-SPEC-001659 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a linear form over admitted real intervals with a configured supported native floating boundary type and a known modeled destination format, cast_interval_is_rounding_closed() shall return true exactly when all homogeneous coefficients are zero and the constant interval is nonempty, topologically closed, and has exactly representable finite endpoints as defined by 🔗 10. Native value membership in modeled floating formats. Infinite abstract bounds shall impose no additional representability condition. Retained zero dimensions shall not prevent certification.

    A true result shall certify that rounding any admitted finite concrete value from the enclosure to a finite destination value remains in that enclosure. It shall not claim that every interior real value is exactly representable. False shall provide no such certificate. The checker shall preserve the represented form, its space dimension and the active rounding direction, and shall require no dynamic storage.

    RATIONALE:

    Monotone rounding fixes exactly representable finite endpoints. Therefore rounding maps a closed interval into itself. The same argument applies when one or both abstract bounds are infinite. A nonzero homogeneous coefficient prevents treating an affine form as a constant enclosure.

    INTERFACE:

    Header: <ppl.hh>; namespace Parma_Polyhedra_Library::Implementation.

    template <typename Interval>
    bool cast_interval_is_rounding_closed(
      const Linear_Form<Interval>& form, Floating_Point_Format format);
    
    VERIFICATION_CRITERIA:

    Check exact and halfway singleton neighbors at each smaller destination precision, including x87 precision when the native boundary is binary128. Check scalar and zero-padded forms, nonzero homogeneous coefficients at several coordinates, empty intervals, finite open endpoints, closed bounded intervals, both half-lines and universe. Distinguish inexact lower and upper endpoints and singleton endpoints. Exercise certification through public integer and floating cast calls as well as directly. Check preserved values, dimensions and rounding direction.

    SOURCE:

    src/linearize.hh; tests/Concrete_Expression/castcontracts1.cc.

  • 1. Dependency invalidation UID: PPL-SPEC-000988 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a well-formed affine store, discard_occurrences(store, var) shall erase exactly those bindings whose linear form has a coefficient for var unequal to the singleton zero interval. It shall preserve every other key and associated value. An absent coordinate beyond a form's stored dimension shall have zero coefficient as specified by 🔗 6. Dimensions and borrowed coefficient access. An uncertain coefficient containing zero and other values shall count as a dependency. The operation shall accept empty stores and shall not create a binding.

    Store keys and referenced coordinates shall be valid dimension indices; each form shall meet the interval-coefficient and lifetime prerequisites of 🔗 1. Interval-linear-form meaning and numerical prerequisites. No PPL initialization or native floating-point arithmetic shall be required when the selected exact interval operations require neither. Erasing a binding shall invalidate references to that binding; references to retained bindings shall remain valid.

    RATIONALE:

    Invalidating all possibly dependent expressions prevents a changed program variable from leaving a stale symbolic relationship.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type.

    template <typename C>
    void discard_occurrences(
      std::map<dimension_type, Linear_Form<C>>& store, Variable var);
    
    VERIFICATION_CRITERIA:

    Compare retained keys and literal coefficients for no dependency, consecutive dependencies, uncertain intervals, empty stores and coordinates beyond stored dimensions.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based).

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000989
    2. Affine assignment and dependency invalidation UID: PPL-SPEC-000989 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_form_image(store, var, form) shall first assign a copy of the entry value of form to the key var.id(), inserting or replacing the binding. It shall then perform the dependency invalidation specified by 🔗 1. Dependency invalidation for var across the resulting store. Consequently, a newly assigned form depending on var shall also be discarded. The input may be a form borrowed from the same store, including the target binding; copying shall use its entry value before any removal can destroy that donor. An independent donor shall remain unchanged.

    Valid keys, interval operations and lifetimes shall meet 🔗 1. Dependency invalidation. Allocation or coefficient-operation exceptions may propagate; no rollback of the entire store shall be promised, but existing owners shall remain safely destructible. After normal return, every retained binding shall be independent of the assigned coordinate.

    RATIONALE:

    Assignment records the new expression and then conservatively removes relationships that cannot remain valid when the coordinate changes.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type.

    template <typename C>
    void affine_form_image(
      std::map<dimension_type, Linear_Form<C>>& store,
      Variable var, const Linear_Form<C>& form);
    
    VERIFICATION_CRITERIA:

    Check insertion/replacement, independent inputs, same-store borrowed donors that are removed during invalidation, same-target aliasing and self-dependent assignments; compare all remaining mappings to independent entry-value snapshots.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based).

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc.

  • PPL-SPEC-000990
    3. Common-binding affine-store join UID: PPL-SPEC-000990 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign(left, right) shall retain exactly the bindings of left whose keys also occur in right and whose associated linear forms are equal according to 🔗 14. Coefficient equality with implicit trailing zeros. Every other left binding shall be erased. No right-only binding shall be inserted. The retained forms and the right operand shall remain unchanged. Explicit trailing zero coefficients shall not cause mathematically equal forms to be discarded. Joining a store with itself shall preserve all bindings.

    Both stores shall meet 🔗 1. Dependency invalidation and describe consistent coordinate identities. Coefficient comparison shall be supported for their selected interval type. Empty operands shall be admitted; an empty right operand shall remove every left binding. Exceptions from selected coefficient comparisons may propagate without a whole-store rollback promise; surviving owners shall remain safely destructible.

    RATIONALE:

    Only a symbolic relationship established on both alternatives can survive their conservative join.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. C is the selected interval coefficient type.

    template <typename C>
    void upper_bound_assign(
      std::map<dimension_type, Linear_Form<C>>& left,
      const std::map<dimension_type, Linear_Form<C>>& right);
    
    VERIFICATION_CRITERIA:

    Compare independent literal mappings for equal and unequal common bindings, missing right keys, right-only keys, explicit zero tails, empty operands and self-aliasing; retain an independent right snapshot.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based).

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; src/Float_templates.hh; tests/expressionstoresspec1.cc; tests/Concrete_Expression/linearize.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/expressionpublic1.cc.

  • 1. Descriptor absolute-error interval UID: PPL-SPEC-001012 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public static absolute_error field shall initially contain an interval enclosing [ − ω, ω], where the radius is the larger of the analyzed absolute error and the analyzer boundary type's smallest positive subnormal. Built-in IEEE binary descriptors shall use their smallest positive subnormal; normalized IBM short and long hexadecimal descriptors shall use 16 − 65, including underflow to zero with the exponent-underflow interruption disabled. Custom three-field descriptors shall use BASE1 −  EXPONENT_BIAS − MANTISSA_BITS. The descriptor shall meet the radix, precision and exponent-range prerequisites of 🔗 1. Owned floating-expression protocol and lifetime. The stored radius shall enclose the mathematical value even when it is not exactly representable in the analyzer.

    The field shall be owned by its I, Format specialization and by its thread when PPL thread support selects thread-local storage. It shall remain publicly mutable; callers changing it shall preserve a sound nonempty error interval for their analysis. Subsequent rounded-node evaluation shall use the current field. Selected arithmetic and runtime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    A separate absolute term bounds underflow even when the relative term vanishes, and analyzer storage must not shrink that bound.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    // Public static member of Floating_Point_Expression<I, Format>:
    static PPL_TLS I absolute_error;
    
    VERIFICATION_CRITERIA:

    Compare exact rational radii for all built-in descriptors and custom radix powers, analyzer-subnormal clamping, specialization/thread lifetime and a sound temporary public-field override with restoration.

    SOURCE:

    src/Float_defs.hh; src/Float_templates.hh; src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionthreads1.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/ownedexpressionpublic1.cc.

  • 2. Enumeration-based cached absolute error UID: PPL-SPEC-001013 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    compute_absolute_error<I>() shall return a stable const reference to the cached absolute-error interval for IEEE754_HALF, IEEE754_SINGLE, IEEE754_DOUBLE, IEEE754_QUAD, INTEL_DOUBLE_EXTENDED or IBM_SINGLE. Its radius shall enclose the corresponding analyzed absolute error and the analyzer's smallest positive subnormal, with binary and IBM meanings from 🔗 1. Descriptor absolute-error interval. Distinct supported formats shall retain their own cached values. Repeated calls shall not change a previously returned interval. Unsupported format selections, including IBM_DOUBLE, shall throw std::invalid_argument.

    References shall belong to the selected template specialization and thread when configured thread-local, and shall not be deleted or modified by the caller. Native boundary arithmetic and runtime prerequisites shall be met; metadata support alone shall not establish this helper's support.

    RATIONALE:

    A cached immutable reference gives repeated analyses the same error bound while retaining an explicit unsupported-format outcome.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I>
    const I& compute_absolute_error(Floating_Point_Format analyzed_format);
    
    VERIFICATION_CRITERIA:

    Check all six supported format/radius pairs using exact rationals, stable reference addresses, preserved values after intervening queries and explicit IBM_DOUBLE rejection.

    SOURCE:

    src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionthreads1.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/ownedexpressionpublic1.cc.

  • PPL-SPEC-001579
    1. Rectilinear distance between generator points UID: PPL-SPEC-001579 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted generators with rational coordinates as specified by 🔗 4. Generator-distance admission, workspaces and dispatch, rectilinear_distance_assign shall assign the requested directed bound on

    D1(x, y) = n − 1∑i = 0|xi − yi|.

    With exact rational temporary arithmetic and an exactly representable output, the sum shall be returned exactly.

    The admission, direction, workspace, alias, lifetime and failure conditions of 🔗 4. Generator-distance admission, workspaces and dispatch shall apply. Successful completion shall return true; rejection shall return false with the stated preservation. An upward result shall be at least the exact norm and a downward result shall be nonnegative and at most the exact norm, under the numerical prerequisites. Both source generators shall retain their values, kinds, representations and dimensions.

    RATIONALE:

    A rational point descriptor supplies geometric coordinates independently of its normalized integer coefficients and divisor; the chosen norm determines the meaning of their distance.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename To>
    bool rectilinear_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Temp, typename To>
    bool rectilinear_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Work, typename To>
    bool rectilinear_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute independent exact rational coordinate differences and their absolute sum; check both source orders, identical coordinates with different point kinds, negative coordinates, zero dimensions and all overload/workspace choices.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/distances_defs.hh; src/distances_inlines.hh; tests/generatorspec1.cc; tests/generatorpublic1.cc; tests/generatormetricsspec1.cc.

  • PPL-SPEC-001580
    2. Euclidean distance between generator points UID: PPL-SPEC-001580 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted generators with rational coordinates as specified by 🔗 4. Generator-distance admission, workspaces and dispatch, euclidean_distance_assign shall assign the requested directed bound on

    D2(x, y) = √(n − 1∑i = 0(xi − yi)2).

    Every squared contribution shall preserve the directed bound even when a coordinate difference is inexact in the workspace type. Rational square roots shall retain the precision and enclosure conditions of 🔗 2. Finite rational square root at the selected irrational precision and 🔗 3. Selection and ownership of irrational rational precision; no universal exactness or fixed error width shall be inferred beyond those contracts.

    The admission, direction, workspace, alias, lifetime and failure conditions of 🔗 4. Generator-distance admission, workspaces and dispatch shall apply. Successful completion shall return true; rejection shall return false with the stated preservation. An upward result shall be at least the exact norm and a downward result shall be nonnegative and at most the exact norm, under the numerical prerequisites. Both source generators shall retain their values, kinds, representations and dimensions.

    RATIONALE:

    A rational point descriptor supplies geometric coordinates independently of its normalized integer coefficients and divisor; the chosen norm determines the meaning of their distance.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename To>
    bool euclidean_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Temp, typename To>
    bool euclidean_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Work, typename To>
    bool euclidean_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Compare nonnegative results by exact squared inequalities, without using a floating square root as the oracle. Include a 3-4-5 displacement, irrational norms, close rational coordinates rounded into native workspaces and both directions through every overload.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/distances_defs.hh; src/distances_inlines.hh; tests/generatorspec1.cc; tests/generatorpublic1.cc; tests/generatormetricsspec1.cc.

  • PPL-SPEC-001581
    3. Maximum-coordinate distance between generator points UID: PPL-SPEC-001581 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted generators with rational coordinates as specified by 🔗 4. Generator-distance admission, workspaces and dispatch, l_infinity_distance_assign shall assign the requested directed bound on

    D∞(x, y) =  max0 ≤ i < n|xi − yi|.

    The maximum over the empty coordinate tuple shall be zero. With exact rational temporary arithmetic and an exactly representable output, the maximum shall be returned exactly.

    The admission, direction, workspace, alias, lifetime and failure conditions of 🔗 4. Generator-distance admission, workspaces and dispatch shall apply. Successful completion shall return true; rejection shall return false with the stated preservation. An upward result shall be at least the exact norm and a downward result shall be nonnegative and at most the exact norm, under the numerical prerequisites. Both source generators shall retain their values, kinds, representations and dimensions.

    RATIONALE:

    A rational point descriptor supplies geometric coordinates independently of its normalized integer coefficients and divisor; the chosen norm determines the meaning of their distance.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename To>
    bool l_infinity_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Temp, typename To>
    bool l_infinity_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir);
    template <typename Work, typename To>
    bool l_infinity_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Compute the exact maximum of absolute rational coordinate differences. Check ties, each coordinate as the unique maximum, zero contributions, both source orders, empty tuples and rounded native workspaces through every overload.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/distances_defs.hh; src/distances_inlines.hh; tests/generatorspec1.cc; tests/generatorpublic1.cc; tests/generatormetricsspec1.cc.

  • 4. Generator-distance admission, workspaces and dispatch UID: PPL-SPEC-001582 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Distances shall be admitted exactly when both generators are points or closure points and have the same ambient dimension. A line, a ray or a dimension mismatch shall return false before assigning the output or any supplied scratch object. Equal-dimensional point/closure-point pairs shall return true on successful numerical completion. A zero-dimensional pair shall assign exact zero. A closure point shall contribute its rational coordinates without asserting inclusion in any polyhedron. For each source, xi = ai ⁄ d shall use its own positive divisor. Neither coefficient vectors alone nor homogeneous-coordinate distances shall replace these coordinates. Boolean success shall not imply exactness of a rounded result.

    The default overload shall use three Checked_Number<To,Extended_Number_Policy> workspaces. An explicit scalar temporary type Temp shall use three Checked_Number<Temp,Extended_Number_Policy> workspaces. Supplied references shall use their actual admitted raw or checked numerical type Work. Their accumulation shall use 🔗 17. Rectilinear distance between bound-entry arrays, 🔗 18. Euclidean distance between bound-entry arrays or 🔗 19. Maximum-coordinate distance between bound-entry arrays, respectively. The generic helper instantiated with the corresponding specialization shall use the same admission, coordinate and numerical rules.

    Source validity and coefficient conditions of 🔗 1. Generator kinds and numerical prerequisites shall apply. Each scalar conversion, subtraction, accumulation, square, square root and final assignment shall satisfy its backend's representability, failure, resource, shared-temporary, nontrapping and FPU prerequisites. Native floating types shall retain their configured availability and hardware conditions. Rational square-root precision shall remain stable throughout a dependent call. Calls evaluating coordinate differences shall use ROUND_UP or ROUND_DOWN, optionally with ROUND_STRICT_RELATION. Inexact coordinate conversion shall not by itself invalidate a directed bound. The zero-dimensional exact assignment shall admit any otherwise valid direction for that scalar assignment.

    Supplied scratch objects shall be pairwise distinct and disjoint from both source generators. Their entry values need not be initialized where they are overwritten before reading. The output shall have live assignable storage disjoint from the sources; it may coincide with any one scratch object or its compatible raw storage. The same generator may be passed as both sources. Callers shall preserve object and borrowed-storage lifetimes and provide synchronization required by the selected numerical profile. Numerical or allocation failures may propagate through their declared channels, shall not establish a successful directed bound, and may leave partial output/scratch values according to the selected scalar policies; no aggregate rollback guarantee shall be inferred.

    RATIONALE:

    Explicit admission and workspace rules distinguish a geometric distance from a coefficient-vector calculation and make directed bounds meaningful under rounding and permitted output aliases.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    template <typename Specialization, typename Work, typename To>
    bool l_m_distance_assign(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Check all rejected kind pairs and both dimension-mismatch orders with output and scratch sentinels. Exercise both point kinds, zero dimensions, default and explicit raw/checked workspaces, each output/scratch alias and identical sources. Use independent rational norms and squared comparisons under inexact conversions; verify source preservation and caller-owned rounding state.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/distances_defs.hh; src/distances_inlines.hh; tests/generatorspec1.cc; tests/generatorpublic1.cc; tests/generatormetricsspec1.cc.

  • PPL-SPEC-001653
    6. Admitted generator-distance evaluation kernel UID: PPL-SPEC-001653 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    l_m_distance_assign_impl shall evaluate a valid point or closure-point pair of equal strictly positive dimension. Callers shall meet the source, workspace, output-alias, rounding, initialization, synchronization and backend conditions of 🔗 4. Generator-distance admission, workspaces and dispatch before entering this kernel; it shall not perform the public admission checks.

    With Skip_Common_Zero_Runs equal to false, the kernel shall process every coordinate in decreasing index order, using each source's own positive divisor. It shall initialize tmp0 to zero, form the directed nonnegative coordinate differences, call Specialization::combine once for each coordinate, call Specialization::finalize once after accumulation, and assign the result from tmp0. The applicable numerical obligations of 🔗 1. Rectilinear distance between generator points, 🔗 2. Euclidean distance between generator points or 🔗 3. Maximum-coordinate distance between generator points shall apply for their corresponding standard specialization.

    With Skip_Common_Zero_Runs equal to true, both sources shall have sparse representation and Specialization shall be the standard rectilinear, Euclidean or infinity-distance specialization for Work. The kernel may replace a maximal run of coordinates zero in both sources by one ordinary zero-coordinate step. Successful completion shall preserve the full traversal's result, final scratch values, directed rounding and floating-point zero signs and status effects. Contributions at nonzero coordinates shall retain their decreasing-index order. The skipping path shall not allocate coefficient vectors or polymorphic expression iterators.

    Successful numerical completion shall return true. Numerical or allocation failures shall retain the failure channels and partial-state conditions of 🔗 4. Generator-distance admission, workspaces and dispatch. The public dispatcher shall retain ordinary traversal for other specialization types; callbacks of those types shall not lose coordinate invocations.

    RATIONALE:

    Zero contributions do not change the three standard norms. Retaining one zero step per run preserves idempotent signed-zero and scratch effects, while ordering all nonzero contributions preserves directed accumulation. The same assumption is unavailable for arbitrary specialization callbacks.

    INTERFACE:

    Internal function template in namespace Parma_Polyhedra_Library; src/Generator_inlines.hh and public header <ppl.hh>.

    template <bool Skip_Common_Zero_Runs, typename Specialization,
              typename Work, typename To>
    bool l_m_distance_assign_impl(
        Checked_Number<To, Extended_Number_Policy>& result,
        const Generator& x, const Generator& y, Rounding_Dir dir,
        Work& tmp0, Work& tmp1, Work& tmp2);
    
    VERIFICATION_CRITERIA:

    Compare sparse evaluations with dense full traversal and independent exact rational norms or squared Euclidean bounds. Check zero runs before, between and after nonzero coordinates, one-dimensional zeros, equal inexact rational coordinates, overlapping/disjoint supports, density and dimension boundaries, asymmetric supports, both directed and strict directions, raw/checked workspaces and each output alias. Compare final scratch values, floating-point bits and status, rounding state and unchanged sources. Count invocations for a custom specialization and inspect the skipping path's allocation behavior.

    SOURCE:

    src/Generator_inlines.hh; tests/generatorspec1.cc; tests/generatormetricsspec1.cc; tests/generatorsparsedistances1.cc.

  • 1. Generator kinds and numerical prerequisites UID: PPL-SPEC-000181 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Generator shall describe one of four geometric objects in a declared ambient dimension: an included rational point, a rational closure point, a ray direction or a line direction. For homogeneous integer coefficients ai and positive divisor d, point and closure-point coordinates shall be ai ⁄ d. A line shall admit arbitrary real multiples of its nonzero direction; a ray shall admit nonnegative real multiples. Closure points shall retain their distinct kind and shall not assert boundary inclusion. Internal divisor/strictness fields shall not become public coordinates.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization and require caller synchronization for overlapping modification of an object. Dense and sparse storage shall be supported, with default_representation equal to SPARSE. Computed construction, normalization, transformation and comparison guarantees shall require representability of every evaluated coefficient step/result in the selected profile. Unchecked completion shall not prove those preconditions. Allocation and numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete generator; distinct unchanged sources shall survive failures, while modified destinations shall remain destructible without universal rollback.

    RATIONALE:

    Point inclusion, closure and directional reachability have different geometric meanings even when their coordinate coefficients coincide.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Generator;
    enum Generator::Type { LINE, RAY, POINT, CLOSURE_POINT };
    static constexpr Representation Generator::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Use independent exact rational point coordinates and direction-proportionality checks; distinguish positive ray scales from signed line scales and included points from closure points. Exercise all supported storage choices and trailing coordinates.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • 2. Construction of nonzero lines and rays UID: PPL-SPEC-000182 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    line(e) and ray(e) shall use the expression's homogeneous coefficients as their respective direction, ignore its constant term and retain its declared dimension. They shall use requested storage. A zero homogeneous direction, including a nonzero constant expression, shall throw std::invalid_argument. Results shall have primitive homogeneous coefficients; lines shall orient their first nonzero coefficient positively, while rays shall preserve orientation. Source expressions shall remain unchanged. Numerical prerequisites in 🔗 1. Generator kinds and numerical prerequisites shall apply.

    RATIONALE:

    The zero vector is not a direction; nonzero expression constants do not change the represented line or ray.

    INTERFACE:
    static Generator Generator::line(const Linear_Expression& e,
      Representation r = default_representation);
    static Generator Generator::ray(const Linear_Expression& e,
      Representation r = default_representation);
    Generator line(const Linear_Expression& e, Representation r = Generator::default_representation);
    Generator ray(const Linear_Expression& e, Representation r = Generator::default_representation);
    
    VERIFICATION_CRITERIA:

    Check static/free forms, both direction signs, common factors, leading/trailing zeros, ignored constants and zero-direction rejection with unchanged sources.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000183
    3. Construction of rational points and closure points UID: PPL-SPEC-000183 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    point(e,d) and closure_point(e,d) shall respectively construct an included or closure point whose coordinates are the homogeneous coefficients of e divided by the entry value of nonzero d. They shall ignore the expression constant, retain its dimension and use requested storage. A negative divisor shall be accepted by reversing all coordinate numerators and making the stored divisor positive, preserving rational coordinates. The stored numerator/divisor tuple shall be primitive. Zero divisor shall throw std::invalid_argument and preserve sources.

    Omitted expressions shall denote the dimension-zero origin; omitted divisors shall be one. Representation-only overloads shall make that origin, and expression/representation overloads shall use divisor one. A divisor borrowed from the unchanged input expression shall be admitted using its entry value. The numerical prerequisites of 🔗 1. Generator kinds and numerical prerequisites shall apply.

    RATIONALE:

    A numerator coefficient is not itself a point coordinate when the positive divisor differs from one.

    INTERFACE:
    static Generator Generator::point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = default_representation);
    static Generator Generator::point(Representation r);
    static Generator Generator::point(const Linear_Expression& e, Representation r);
    static Generator Generator::closure_point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = default_representation);
    static Generator Generator::closure_point(Representation r);
    static Generator Generator::closure_point(const Linear_Expression& e, Representation r);
    
    Generator point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = Generator::default_representation);
    Generator point(Representation r);
    Generator point(const Linear_Expression& e, Representation r);
    Generator closure_point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = Generator::default_representation);
    Generator closure_point(Representation r);
    Generator closure_point(const Linear_Expression& e, Representation r);
    
    VERIFICATION_CRITERIA:

    Compare exact rational coordinates for all static/free overloads, positive/negative divisors, common factors, origin/default arguments, borrowed divisor and ignored constants. Check retained dimensions, point/closure kind and zero-divisor rejection.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000185
    5. Owned generator copying, assignment and swapping UID: PPL-SPEC-000185 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary copying shall preserve kind, dimension, exposed coefficients, divisor when applicable and source representation. Explicit-storage copying shall use requested storage. Assignment shall copy the complete entry value and source storage, return the target reference, preserve a distinct source and support self-assignment. Rvalue arguments shall admit the copy forms, retaining source value without requiring a distinct move operation. Copies shall survive later source mutation or destruction.

    Both swap forms shall exchange full values, dimension and storage; self-swap shall preserve the generator. Destruction shall release owned storage. Failure while constructing copy assignment's replacement shall leave the target unchanged.

    RATIONALE:

    Owning geometric descriptors must remain independent even when their values originated from shared constants or expression views.

    INTERFACE:
    Generator(const Generator& g);
    Generator(const Generator& g, Representation r);
    Generator& Generator::operator=(const Generator& g);
    Generator::~Generator();
    void Generator::m_swap(Generator& y);
    void swap(Generator& x, Generator& y);
    
    VERIFICATION_CRITERIA:

    Check every kind across both storage choices, assignment identity/self/rvalue forms, source destruction, mutation independence, swaps and replacement-copy allocation failures.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000186
    6. Generator representation conversion UID: PPL-SPEC-000186 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    representation() shall report current coefficient storage. Successful set_representation(r) for dense or sparse storage shall preserve kind, public dimension, exposed coefficients and applicable divisor while selecting r. Repeating current storage shall preserve the object. Failed replacement allocation shall leave its value and representation unchanged.

    RATIONALE:

    Storage conversion changes neither rational coordinates nor direction orientation or topological kind.

    INTERFACE:
    Representation Generator::representation() const;
    void Generator::set_representation(Representation r);
    
    VERIFICATION_CRITERIA:

    Convert all four kinds both directions, including rational coordinates and unused dimensions, comparing exact fields and independent geometric values. Check repeated conversion and replacement allocation failures.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000192
    12. Reloadable generator representation UID: PPL-SPEC-000192 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export the full stored coefficient expression, public kind token and topology token; ascii_dump() shall use std::cerr. Export shall preserve the source. A complete compatible representation with representable coefficients shall load with true, replacing kind, coefficients, divisor and public dimension while retaining destination storage.

    Malformed/truncated expression, kind or topology fields, missing required coefficient slots, invalid directional zero vectors, nonpositive point divisors, violations of the checked row invariants and inconsistent kind/topology combinations shall return false rather than be accepted as valid generators. If expression loading fails, ascii_load(s) shall return false without reading the kind or topology suffix. Trailing input shall remain available. Failure may modify the target but shall leave it destructible and replaceable by a complete valid load. No rollback or cross-version format stability is promised; allocation and numerical exceptions may propagate.

    RATIONALE:

    A reloaded generator needs valid rational scaling, nonzero directional data and correct topological kind, in addition to syntactically complete input.

    INTERFACE:
    void Generator::ascii_dump(std::ostream& s) const;
    void Generator::ascii_dump() const;
    bool Generator::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip all kinds, rational points, gaps and trailing dimensions across destination storage. Compare independent geometric values and exact fields; reject malformed/truncated fields, missing slots, zero directions and invalid divisors/kinds, then exercise complete replacement. Reject invalid expression prefixes followed by otherwise valid kind/topology suffixes, checking that those suffixes remain unread. Reject complete zero line/ray records, nonpositive point divisors, missing NNC epsilon storage and inconsistent epsilon fields with assertions enabled or disabled, across destination storage. After false, perform only complete valid replacement before querying the target; preserve trailing input.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc; tests/generatorbranches1.cc.

  • 15. Generator-system hull meaning and construction UID: PPL-SPEC-000195 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Generator_System with lines L, rays R, included points P and closure points C shall generate exactly the real vectors

     ∑p ∈ Pλpp +  ∑c ∈ Cγcc +  ∑r ∈ Rρrr +  ∑l ∈ Lτll, 

    where λp, γc, ρr ≥ 0, τl ∈ ℝ, ∑pλp + ∑cγc = 1 and ∑pλp > 0. Thus a system without an included supporting point shall generate the empty set, even when directions or closure points are stored. Its meaning shall be a generated hull, not a conjunction of point membership conditions.

    Default construction shall have dimension zero and no rows. Singleton construction shall own a copy of its generator and adopt its dimension. Requested storage shall be used, with default SPARSE. zero_dim_univ() shall borrow the singleton included origin generating the universe of the zero-dimensional space until owning-thread finalization. Use/failure prerequisites shall follow 🔗 1. Generator kinds and numerical prerequisites.

    RATIONALE:

    Positive total weight on included points distinguishes an NNC hull from the closed convex hull of closure points alone.

    INTERFACE:
    class Generator_System;
    static constexpr Representation Generator_System::default_representation = SPARSE;
    Generator_System(Representation r = default_representation);
    explicit Generator_System(const Generator& g, Representation r = default_representation);
    static const Generator_System& Generator_System::zero_dim_univ();
    
    VERIFICATION_CRITERIA:

    Check empty, direction-only, closure-only and supported systems with independent low-dimensional generated sets. Include a closed segment, an open segment with interior supporting point, a ray and a line through an offset point; distinguish zero-dimensional empty and universal systems.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000196
    16. Owned generator systems and storage conversion UID: PPL-SPEC-000196 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction shall preserve generated hull, public dimension and source storage; an explicit-storage overload shall use its argument. Assignment shall copy the source entry value and representation, return the target reference, preserve a distinct source and support self-assignment. Rvalue copy forms shall retain source value without requiring a distinct move operation. Copies shall remain independent of later source modification/destruction.

    Swaps shall exchange complete system values, dimension and storage, including self-swap. Successful representation conversion shall select dense or sparse storage for all rows while preserving the generated hull and dimension. Destruction shall release owned rows. Copy-assignment replacement failure shall preserve the target; other failures shall follow 🔗 1. Generator kinds and numerical prerequisites.

    RATIONALE:

    An owning generator system may change row storage without changing the geometry or inclusion of its generated boundary.

    INTERFACE:
    Generator_System(const Generator_System& gs);
    Generator_System(const Generator_System& gs, Representation r);
    Generator_System& Generator_System::operator=(const Generator_System& y);
    Generator_System::~Generator_System();
    Representation Generator_System::representation() const;
    void Generator_System::set_representation(Representation r);
    void Generator_System::m_swap(Generator_System& y);
    void swap(Generator_System& x, Generator_System& y);
    
    VERIFICATION_CRITERIA:

    Check empty and all-kind systems across copies/conversions, self/rvalue assignment, return identity, swaps and source destruction, comparing independent geometric tuples and generated-set examples.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000197
    17. Generator insertion and coefficient ownership transfer UID: PPL-SPEC-000197 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Const-reference insertion shall add a copy of the generator to the system's geometric generator collection, preserving the source and target storage. Result dimension shall be the maximum input dimension; shorter tuples shall be zero-extended. Inserting a closure point shall retain its topological role; any necessary internal conversion shall preserve the public coordinates and kind of existing generators. Duplicates or redundant generators may be reordered/removed provided the generated hull is preserved. Publicly retrieved rows need not reproduce insertion order or multiplicity.

    Rvalue insertion shall transfer a generator not borrowed from the target, producing the same generated hull as copying it. The source shall remain destructible; no unchanged-value guarantee shall apply to it. Ordinary insertion of a borrowed row from the same target shall use its entry value. Numerical/failure prerequisites in 🔗 1. Generator kinds and numerical prerequisites shall apply.

    Const row sources, including const rvalues, shall use preserving insertion. Successful rvalue row insertion shall leave its source a valid descriptor with an unspecified value.

    RATIONALE:

    Adding a generator expands a geometric description and can require NNC representation, without conjoining a new constraint.

    INTERFACE:
    void Generator_System::insert(const Generator& g);
    void Generator_System::insert(Generator&& g);
    
    VERIFICATION_CRITERIA:

    Check mixed dimensions, borrowed-row insertion, duplicate/closure/ray/line insertion and recycled ownership. Verify unchanged copied sources and preserved existing rational coordinates when closure-point insertion promotes a closed system.

    SOURCE:

    tests/consuminginsertions1.cc; src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc; tests/generatorbranches1.cc.

  • PPL-SPEC-000200
    20. Reloadable generator-system representation UID: PPL-SPEC-000200 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export full stored rows, dimension, topology, representation and required row-state fields; ascii_dump() shall use std::cerr. Export shall preserve source value. A complete compatible export with representable coefficients shall load with true, replacing the target with the encoded generated hull, public dimension and encoded storage choice.

    Malformed/truncated headers or rows, invalid generator fields and inconsistent encoded dimensions or row-state fields shall return false rather than be accepted as valid systems. Trailing input shall remain available. Failure may modify a destination but shall leave it destructible and replaceable by a complete valid load. No rollback/cross-version format stability is promised; allocation and configured numerical exceptions may propagate. The decoded header dimension shall not exceed max_space_dimension(), including when the record contains no rows; not_a_dimension() shall be rejected as an unsupported extent.

    RATIONALE:

    A generator-system reload must retain supporting-point inclusion and closure data as well as rational coordinate scaling.

    INTERFACE:
    void Generator_System::ascii_dump(std::ostream& s) const;
    void Generator_System::ascii_dump() const;
    bool Generator_System::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip empty positive-dimensional, direction-only, point/closure and all-kind systems across initial destination storage choices. Compare encoded dimensions/storage and independent generated-set examples; reject malformed/truncated rows and inconsistent structural fields. Check zero, positive and maximum admitted header dimensions, maximum plus one and the reserved non-dimension, even for empty row sequences. Exercise both storage choices, preserved trailing input and complete valid replacement after rejection.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-001287
    1. Exact rational affine image UID: PPL-SPEC-001287 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_image(var, expr, denominator) shall assign the exact image under x’v = e(x) ⁄ d, with all other coordinates unchanged. denominator defaults to one. The entry denominator value shall be used even when borrowed from a receiver-owned congruence or generator. External expression and scalar values shall be preserved. Zero denominator, an invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.

    Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    An affine transformation maps supporting points, integer parameters and real directions exactly; entry scalar capture prevents descriptor invalidation from changing the transformation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void affine_image(Variable var,
                      const Linear_Expression& expr,
                      Coefficient_traits::const_reference denominator
                      = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Use independent rational generator transformations for invertible and singular maps, negative denominators, all cache histories, borrowed scalar owners, zero values and dimension rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affineimage1.cc; tests/Grid/affineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001288
    2. Exact rational affine preimage UID: PPL-SPEC-001288 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_preimage(var, expr, denominator) shall assign exactly the set of x whose image under x’v = e(x) ⁄ d, with other coordinates unchanged, belongs to the entry receiver. denominator defaults to one. It shall use the entry denominator value even when borrowed from receiver-owned descriptions, and preserve external inputs. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers.

    Bounded-coefficient congruence substitution shall clear the denominator, replace the target coefficient and form complete exact coefficients before admission. Proper constants may be reduced modulo the new positive modulus; all coefficients and that modulus may be divided by their common positive factor. Homogeneous coefficients shall not be reduced modulo a modulus. Numeric generator reductions shall complete each subtraction before admission and shall preserve every integer-parameter period. In a discrete generator system, a common physical factor of every point/parameter coordinate and divisor may be cancelled during elimination and restored afterwards. Such working-scale cancellation shall preserve the previous strong-form storage scale and shall not rescale one lattice direction independently.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Substitution in congruences computes inverse images even when the transformation is singular.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void affine_preimage(Variable var,
                         const Linear_Expression& expr,
                         Coefficient_traits::const_reference denominator
                           = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independently substituted congruences, invertible/singular maps, constants, negative denominators, fractional phases, borrowed scalars and invalid arguments under every cache history.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Congruence.cc; src/Grid_templates.hh; tests/Grid/affinepreimage1.cc; tests/Grid/affinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001289
    3. Generalized variable affine image UID: PPL-SPEC-001289 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For EQUAL, generalized_affine_image(var, relsym, expr, denominator, modulus) shall assign the exact relational image under x’v = e(x) ⁄ d + mk, k ∈ Z, with other coordinates unchanged. Zero modulus shall mean ordinary affine image; either sign of a nonzero modulus shall denote the same period. Defaults are denominator one and modulus zero. Borrowed scalars shall use their entry values. For an ordered inequality and zero modulus, it shall conservatively cylindrify the target. NOT_EQUAL and ordered relations with nonzero modulus are unsupported and shall throw std::invalid_argument before mutation, including on empty receivers. Zero denominator and dimension errors shall likewise be rejected before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    An integer target period represents modular nondeterminism; ignoring an ordered bound still gives a sound coarse grid abstraction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void
    generalized_affine_image(Variable var,
                             Relation_Symbol relsym,
                             const Linear_Expression& expr,
                             Coefficient_traits::const_reference denominator
                             = Coefficient_one(),
                             Coefficient_traits::const_reference modulus
                             = Coefficient_zero());
    
    VERIFICATION_CRITERIA:

    Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.

    Use independent rational image generators plus the target period, signed and zero moduli, singular maps, borrowed denominators/moduli, inequality cylindrification and rejection controls.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage1.cc; tests/Grid/generalizedaffineimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001290
    4. Generalized variable affine preimage UID: PPL-SPEC-001290 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_preimage(var, relsym, expr, denominator, modulus) shall assign the exact inverse relational image for the EQUAL relation in [LINK: PPL-SPEC-001289]. Defaults, modulus sign, borrowed entry values and rejection scope shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify the target coordinate of the entry receiver.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Inverse modular substitution must retain both denominator and modulus until the induced inverse period has been formed.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void
    generalized_affine_preimage(Variable var,
                                Relation_Symbol relsym,
                                const Linear_Expression& expr,
                                Coefficient_traits::const_reference denominator
                                = Coefficient_one(),
                                Coefficient_traits::const_reference modulus
                                = Coefficient_zero());
    
    VERIFICATION_CRITERIA:

    Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.

    Check rational range and congruence substitution independently for unit, negative, nonunit and zero target coefficients, signed moduli, singular preimages, borrowed scalar owners and relation/dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage1.cc; tests/Grid/generalizedaffinepreimage2.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001291
    5. Generalized expression affine image UID: PPL-SPEC-001291 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For EQUAL, generalized_affine_image(lhs, relsym, rhs, modulus) shall assign the exact image of the relation lhs(x’) − rhs(x) ∈ mZ, where the coordinates with nonzero coefficients in lhs may change simultaneously and all other coordinates are unchanged. Zero modulus means equality and is the default; modulus sign is immaterial. Constant lhs shall constrain the old state without assigning a coordinate. The modulus shall use its entry value even if borrowed. Ordered inequalities with zero modulus shall conservatively cylindrify the assigned coordinates. NOT_EQUAL or an ordered relation with nonzero modulus shall throw std::invalid_argument before mutation, including on empty receivers. Excess expression dimensions shall likewise be rejected before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The expression overload is a simultaneous relation, so it must preserve the pre-update meaning of the right-hand side.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void
    generalized_affine_image(const Linear_Expression& lhs,
                             Relation_Symbol relsym,
                             const Linear_Expression& rhs,
                             Coefficient_traits::const_reference modulus
                             = Coefficient_zero());
    
    VERIFICATION_CRITERIA:

    Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.

    Check independent projected generator/range calculations for overlapping and disjoint expression supports, constant sides, signed/zero moduli, borrowed moduli, inequality cylindrification and invalid dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffineimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001292
    6. Generalized expression affine preimage UID: PPL-SPEC-001292 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_preimage(lhs, relsym, rhs, modulus) shall assign the exact inverse relational image of EQUAL as defined in [LINK: PPL-SPEC-001291]. Assigned coordinates are those occurring in lhs; all others are shared between old and new states. Default modulus, sign, borrowed entry-value and rejection rules shall be the same. Ordered inequalities with zero modulus shall conservatively cylindrify those coordinates of the entry receiver.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The inverse relation constrains the old right-hand-side value by the possible new left-hand-side values.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void
    generalized_affine_preimage(const Linear_Expression& lhs,
                                Relation_Symbol relsym,
                                const Linear_Expression& rhs,
                                Coefficient_traits::const_reference modulus
                                = Coefficient_zero());
    
    VERIFICATION_CRITERIA:

    Check every ordered relation with positive/negative nonzero moduli on marked-empty, unclassified contradictory and nonempty receivers. Require rejection without receiver mutation; zero-modulus ordered relations retain their documented coordinate frame.

    Use independent rational range and congruence calculations for both expression supports, constant cases, signed periods, borrowed moduli, inequalities and dimension/relation rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    tests/Grid/affineadmission1.cc; tests/affinecontractmatrix1.cc; src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/generalizedaffinepreimage3.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001293
    7. Bounded affine image abstraction UID: PPL-SPEC-001293 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_image(var, lb_expr, ub_expr, denominator) shall return the cylindrification of the entry receiver in var, preserving ambient dimension and its projection on all other coordinates. This is a conservative abstraction of the bounded affine image; it need not detect infeasible bounds or retain equal bounds. The denominator defaults to one. Zero denominator, invalid target or excess dimension of either bound shall throw std::invalid_argument before mutation, including empty.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The Grid interface deliberately uses a coarse forgetting operation for bounded assignments.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void bounded_affine_image(Variable var,
                              const Linear_Expression& lb_expr,
                              const Linear_Expression& ub_expr,
                              Coefficient_traits::const_reference denominator
                              = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check equality with independently projected grids for equal, reversed, constant and variable bounds, either denominator sign, empty inputs and each invalid bound/target/denominator.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/boundedaffineimage1.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001294
    8. Bounded affine preimage abstraction UID: PPL-SPEC-001294 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_preimage(var, lb_expr, ub_expr, denominator) shall return the cylindrification of the entry receiver in var. It shall preserve dimension and all restrictions among other coordinates, and conservatively contain the concrete bounded-relation preimage. It need not detect infeasible bounds. Default and rejection rules shall be as in 🔗 7. Bounded affine image abstraction.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Forgetting the updated coordinate is sound for the bounded preimage even when sharper relational information could be computed.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void bounded_affine_preimage(Variable var,
                                 const Linear_Expression& lb_expr,
                                 const Linear_Expression& ub_expr,
                                 Coefficient_traits::const_reference denominator
                                 = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare with independent projection and free-coordinate restoration for equal/reversed bounds, singular cases, empty and invalid arguments.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/boundedaffinepreimage1.cc; tests/gridoperationsspec1.cc; tests/gridaffineborrow1.cc; tests/gridoperationsfailure1.cc.

  • 1. Congruence widening and finite delay UID: PPL-SPEC-001307 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    congruence_widening_assign(y,tp) requires Y ⊆ X and shall return a grid containing X, preserving dimension and the operand value. Empty previous, empty current and zero dimensions shall preserve the receiver. After normalization, if the current grid has fewer independent equalities than the previous one, it shall retain the current grid. Otherwise it shall retain all current equalities and the current proper congruences whose corresponding normalized pivot coefficients agree with the previous description, discarding other proper rows. A sequence with fixed coordinate order and finite delay shall stabilize.

    With tp null or pointing to zero, the computed widening shall be assigned. With a positive token count, the entry grid shall be retained and one token consumed exactly when the computed widening strictly enlarges it. The token object shall be separate writable storage. Unequal dimensions shall throw std::invalid_argument before mutation. Failure guarantees shall not imply rollback of tokens.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Pivot-stable normalized congruences give a finite descending certificate while retaining modular information. The published paper defines both widenings; the technical report supplies the full congruence-widening proof and certificate discussion.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void congruence_widening_assign(const Grid& y, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Check normalized-pivot selection, strict chains, equality-dimension growth, fixed points, zero/positive tokens, empty and zero-dimensional cases, source preservation and dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001308
    2. Generator widening and finite delay UID: PPL-SPEC-001308 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generator_widening_assign(y,tp) shall obey the inclusion, dimensions, empty cases and finite-token rules in 🔗 1. Congruence widening and finite delay. It shall normalize generator descriptions. If the current grid has more generators or real lines than the previous grid, it shall retain the current grid. Otherwise it shall retain the supporting point and real lines, retain parameters with unchanged corresponding normalized pivots, and replace changed parameter directions by real lines. With fixed coordinate order and finite delay, increasing iterations shall stabilize.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Promoting changing discrete directions to real directions forces finite progress while preserving the current grid.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void generator_widening_assign(const Grid& y, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Check independent parameter/line promotion cases and ascending lattice chains, point phases, tokens, generator/congruence caches, zero dimensions and invalid dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening2.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001309
    3. Representation-selected default grid widening UID: PPL-SPEC-001309 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    widening_assign(y,tp) shall select congruence widening when both congruence descriptions are current, otherwise generator widening when both generator descriptions are current. For mixed histories it may choose either strategy and normalize the required descriptions. It shall obey the common inclusion, dimension, empty and finite-token rules in 🔗 1. Congruence widening and finite delay. The selected strategy may affect precision; identical output across different cache histories is not required. With fixed coordinate order and finite delay, increasing iterations shall stabilize, including when available descriptions change the selected strategy between calls.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The default strategy exploits available descriptions without promising identical precision from the two distinct widenings.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void widening_assign(const Grid& y, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Check each cache-selection route against the corresponding named widening and check containment, tokens, fixed points and convergence on ascending chains.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14).

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/widening3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001310
    4. Congruence-limited extrapolations UID: PPL-SPEC-001310 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    limited_congruence_extrapolation_assign, limited_generator_extrapolation_assign and limited_extrapolation_assign shall require Y ⊆ X and apply their corresponding named or default widening, then intersect with the supplied limiter congruences satisfied by every entry point of X. Valid equalities already retained by widening need not be inserted redundantly. With an empty limiter they shall have exactly the corresponding widening's mathematical result and token effect. Finite-token behavior shall follow 🔗 1. Congruence widening and finite delay. The result shall contain the entry receiver, preserve ambient dimension and preserve external limiter/operand values. Unequal grid dimensions or excess limiter dimension shall throw std::invalid_argument before mutation. Convergence requires the usual widening iteration and a fixed finite limiter set; changing limiters provide only extrapolation guarantees.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Limiting restores established entry invariants, and an empty limiter must not silently switch the named widening strategy. The report gives the additional extrapolation details.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void limited_congruence_extrapolation_assign(const Grid& y,
                                                 const Congruence_System& cgs,
                                                 unsigned* tp = nullptr);
    
    void limited_generator_extrapolation_assign(const Grid& y,
                                                const Congruence_System& cgs,
                                                unsigned* tp = nullptr);
    
    void limited_extrapolation_assign(const Grid& y,
                                      const Congruence_System& cgs,
                                      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Compare all three variants with their corresponding widenings for empty, satisfied, unsatisfied and mixed limiter rows; check generator-only caches, tokens, ascending chains, empty grids and invalid dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/limitedextrapolation1.cc; tests/Grid/limitedextrapolation2.cc; tests/Grid/limitedextrapolation3.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001311
    5. Grid convergence certificates UID: PPL-SPEC-001311 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid_Certificate shall represent the lexicographic pair (e, p): the number of independent equalities and the number of proper congruence rows in a minimal description of a nonempty grid. In positive ambient dimension, p includes the normalization congruence and is one plus the number of independent discrete parameter directions. The grid-taking constructor and grid-taking comparison/stabilization queries require a nonempty grid. Default construction shall represent the zero-dimensional-universe certificate (0, 0); copying and assignment shall preserve the pair.

    compare shall return minus one, zero or plus one for a smaller, equal or greater pair. is_stabilizing(gr) shall return exactly whether this pair is strictly greater than gr's pair. Compare shall order greater pairs first. OK() shall return true for certificates constructed through this interface. Computing a certificate may normalize grid caches but shall preserve its mathematical value. The two counts are the finite progress measure for compatible Grid widenings; they do not encode the grid's phase or coefficients.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Finite structural counts support powerset convergence without storing an entire represented grid. The report supplies the certificate construction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The compiler-supplied copy assignment preserves the certificate counts.

    class Grid_Certificate {
    public:
      Grid_Certificate();
      Grid_Certificate(const Grid& gr);
      Grid_Certificate(const Grid_Certificate& y);
      ~Grid_Certificate();
      int compare(const Grid_Certificate& y) const;
      int compare(const Grid& gr) const;
      bool is_stabilizing(const Grid& gr) const;
      struct Compare {
        bool operator()(const Grid_Certificate& x,
                        const Grid_Certificate& y) const;
      };
      bool OK() const;
    };
    
    VERIFICATION_CRITERIA:

    Compute equality and parameter ranks independently for empty-excluded product/coupled grids and every cache route. Check defaults, copies, assignment, comparison signs, equal-count distinct grids, reverse ordering and stabilization equivalence.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 5, Definitions 5–8 and Proposition 9 (printed pages 13–14). BagnaraDHMZ05TR | Section 6, Definitions 4–6, Proposition 11, finite convergence certificate and limited extrapolation (printed pages 19–22).

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_widenings.cc; src/Grid_Certificate_defs.hh; src/Grid_Certificate_inlines.hh; src/Grid_Certificate.cc; tests/Grid/certificate1.cc; tests/gridoperationsspec1.cc; tests/gridconvergencespec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001312
    1. Grid construction from boxes UID: PPL-SPEC-001312 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid(box,complexity) shall preserve the box's ambient dimension and construct its exact real affine hull as a grid. Empty shall yield empty. Each singleton interval shall fix its coordinate; every non-singleton coordinate shall be free. Open bounds do not add excluded endpoints to a singleton. All complexity choices shall have this meaning, under the source interval's arithmetic conditions and 🔗 1. Rational-grid values, coefficient profile and valid use. The source value shall be preserved. Excess ambient dimension shall throw std::length_error before representation allocation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    A Cartesian box contributes only fixed-coordinate equalities to its affine hull.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    template <typename Interval>
    explicit Grid(const Box<Interval>& box,
                  Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Compare rational/open/closed/unbounded and empty boxes with independently selected singleton-coordinate equations, both numerical representations and dimension boundaries. Exercise empty, universe, fixed, mixed and open non-singleton boxes at dimensions 63, 64 and 65 and above, with every complexity choice. Compare each reconstructed minimal representation and subsequent prefix projections with independent fixed-coordinate equations. Check preservation of the source box and of the floating-point rounding mode and exception flags for dyadic floating bounds. Compare canonical endpoint pairs with equal numerators and unequal denominators, different numerators and equal denominators, equal fractions and canonical zero. Check both extracted fractions and the resulting fixed or free coordinate. Check negative integer and dyadic singleton coordinates through positive canonical bound denominators, including preservation of the source box and floating environment. Inspect LCM-scaled anchors before minimizing queries: compare literal primitive coordinates and positive divisors for free, mixed and fixed axes, coprime and nested denominators, and confirm that reading the generator view leaves the serialized representation unchanged.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frombox1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001313
    2. Grid construction from bounded-difference shapes UID: PPL-SPEC-001313 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid(bd,complexity) shall preserve ambient dimension and construct the exact real affine hull of the bounded-difference shape, including empty. It shall retain all implied affine equalities under the source shape's arithmetic preconditions and 🔗 1. Rational-grid values, coefficient profile and valid use, for every complexity choice. The source's mathematical value shall be preserved; closure caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Tight opposite difference bounds identify all affine equalities of a nonempty bounded-difference shape.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    template <typename U>
    explicit Grid(const BD_Shape<U>& bd,
                  Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use independently known equalities and strict inequalities among rational difference constraints, redundant/latent-empty source descriptions, all complexity values and source preservation.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frombdshape1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001314
    3. Grid construction from octagonal shapes UID: PPL-SPEC-001314 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid(os,complexity) shall preserve ambient dimension and construct the exact real affine hull of the octagonal shape, including empty, under its arithmetic preconditions and 🔗 1. Rational-grid values, coefficient profile and valid use. Every complexity choice shall retain the implied affine equalities. The source's mathematical value shall be preserved; closure caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Tight opposite octagonal bounds determine the affine equalities of the shape.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    template <typename U>
    explicit Grid(const Octagonal_Shape<U>& os,
                  Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check fixed coordinates, sum/difference equalities, open affine freedom, redundant rows and latent emptiness across complexity choices, source caches and numerical profiles.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/fromoctagonalshape1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001315
    4. Grid construction from polyhedra UID: PPL-SPEC-001315 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid(ph,complexity) shall preserve ambient dimension and contain the polyhedron's real affine hull. With ANY_COMPLEXITY it shall equal that affine hull, including for NNC polyhedra and empty. Restricted complexity may retain only explicit available equalities and may fail to detect latent emptiness, giving a coarser grid. If generators are used, supporting points, closure points, rays and lines shall contribute their real affine span. Marked empty and zero-dimensional empty shall yield empty in every complexity class. The source value shall be preserved, though caches may change. Excess ambient dimension shall throw std::length_error before representation allocation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    For a bounded coefficient profile, directions joining rational points shall be computed from complete cross-products of their numerators and divisors, then reduced by a common positive factor before their coefficients are admitted. Constants and NNC epsilon coordinates shall not contribute to these line directions. This projective normalization shall not rescale a lattice parameter.

    RATIONALE:

    An exact affine hull can require constraint minimization; a complexity-limited conversion may conservatively omit hidden equalities.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    explicit Grid(const Polyhedron& ph,
                  Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Compare exact conversions with independent affine spans of C/NNC polyhedral generators, hidden equalities and emptiness; check sound limited-complexity outputs, source preservation, dimensions and zero-dimensional cases.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_templates.hh; tests/Grid/frompolyhedron1.cc; tests/gridoperationsspec1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001295
    1. Free-coordinate extension UID: PPL-SPEC-001295 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_space_dimensions_and_embed(m) shall assign G×Rm, placing the new free coordinates after the old ones. Zero additions shall preserve the value and dimension; empty remains empty in the enlarged space. Exceeding max_space_dimension() shall throw std::length_error before mutation, using an overflow-safe dimension check.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Free extension preserves every old-coordinate relation without constraining appended coordinates.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_space_dimensions_and_embed(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Check zero/positive additions on empty, zero-dimensional, point, periodic and continuous grids, both descriptions and dimension-overflow boundaries.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/addspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001296
    2. Zero-coordinate extension UID: PPL-SPEC-001296 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_space_dimensions_and_project(m) shall assign G×{0}m, appending the new zero coordinates. A nonempty zero-dimensional grid shall become the origin, and empty shall remain empty. Zero additions are identity. Exceeding max_space_dimension() shall throw std::length_error before mutation, using an overflow-safe dimension check.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The historical project-named interface adds zero coordinates rather than free ones.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_space_dimensions_and_project(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Check explicit zero-coordinate equations and dimension growth from zero dimensions, empty/periodic/continuous inputs, zero additions and overflow rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/addspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001297
    3. Ordered Cartesian concatenation UID: PPL-SPEC-001297 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    concatenate_assign(y) shall assign the ordered Cartesian product X×Y in dimension nX + nY. Either empty operand shall make the result empty. Self concatenation shall use the entry value twice. The distinct operand shall retain its mathematical value. A dimension sum beyond max_space_dimension() shall throw std::length_error before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Concatenation combines independent state vectors and must snapshot self input before descriptor growth.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void concatenate_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Check independent factor membership in both orders, self concatenation, zero-dimensional identities, empty operands, description histories and dimension-sum rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/concatenate1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001298
    4. Selected-coordinate existential projection UID: PPL-SPEC-001298 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_space_dimensions(vars) shall assign exact existential projection onto the unselected coordinates, preserving their relative order and renumbering them consecutively. Its dimension shall decrease by the selection size. Empty selection is identity; removing every coordinate yields zero-dimensional universe exactly for nonempty input. Any out-of-range index shall throw std::invalid_argument before mutation, including empty.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Existential elimination must preserve the lattice information among remaining coordinates.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Check independent projected generator systems for coupled rational lattices, arbitrary selected subsets, all/none removal, empty inputs and invalid indices.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/removespacedims1.cc; tests/Grid/removespacedims2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001299
    5. Prefix-coordinate existential projection UID: PPL-SPEC-001299 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_higher_space_dimensions(new_dimension) shall assign the exact projection onto the prefix of that many coordinates. Equal dimension is identity; zero produces zero-dimensional universe exactly when the entry grid is nonempty. A requested dimension greater than the current dimension shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Prefix removal is the ordered special case of existential coordinate projection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void remove_higher_space_dimensions(dimension_type new_dimension);
    
    VERIFICATION_CRITERIA:

    Compare with independent generator truncation and selected-coordinate removal, including latent empty, every prefix and greater-dimension rejection. Compare literal prefix descriptions of equalities, independent residue lattices and coupled modular rows across dense and sparse representations, both minimal systems, each minimal system alone and current nonminimal generators. Check that compatible minimal caches survive projection before querying them again, then reconstruct and compare both representations of the result.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/removespacedims1.cc; tests/Grid/removespacedims2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001300
    6. Injective coordinate remapping UID: PPL-SPEC-001300 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    map_space_dimensions(pfunc) shall project away unmapped old coordinates and move each retained coordinate to its supplied destination, exactly. The mapping shall be an injection from a subset of old indices onto a dense destination set {0, …, m − 1}, with m ≤ n. An invalid mapping violates the interface precondition; runtime rejection is not guaranteed. Empty image gives zero-dimensional projection. The mapping object shall provide has_empty_codomain(), max_in_codomain() and maps(i,j) with the meanings in 🔗 1. Public partial coordinate-map type and valid use; queries shall preserve the mapping. For positive old dimension the empty-image query precedes other queries; if empty, no maximum or lookup is required. Otherwise the maximum is queried at most once and lookups at most once per old coordinate. Zero old dimension may return without queries.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Dense injective remapping defines a valid coordinate permutation after projection, without inventing unused output coordinates.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    template <typename Partial_Function>
    void map_space_dimensions(const Partial_Function& pfunc);
    
    VERIFICATION_CRITERIA:

    Check independent permutations and partial projections, empty/self mappings, zero dimensions, callback counters and both descriptions. Exercise only mappings meeting the dense-image prerequisite. Check verified identity maps without temporary C++ allocation, unchanged cached representations and owned capacity after copying and grow/shrink histories. Compare first/last/middle swaps, reversal, cycles and projections against literal coordinate oracles; preserve floating-point mode/flags. Inject every mapping-query exception and check propagation, safe replacement and temporary cleanup. Enforce at most one lookup per source coordinate, including the first nontrivial cycle after a fixed suffix.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/mapspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc. tests/coordinatemappingfixture.hh;

  • PPL-SPEC-001301
    7. Conditional coordinate replication UID: PPL-SPEC-001301 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    expand_space_dimension(var,m) shall append m independent replicas of the selected coordinate conditioned on the unchanged other coordinates. Every replica, separately substituted for var, shall satisfy the original grid together with those other coordinates; replicas shall not be required to equal one another. Original coordinates retain their meaning. Empty remains empty and zero replicas are identity. An invalid source index shall throw std::invalid_argument; dimension overflow shall throw std::length_error, before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Conditional replication preserves correlations with the common context while allowing the separate values of a nondeterministic coordinate.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void expand_space_dimension(Variable var, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare copied congruence equations with independent conditional models; distinguish periodic replicas from equal copies. Include empty, zero replicas, invalid source and dimension overflow.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/expandspacedim1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001302
    8. Least-grid folding of coordinate alternatives UID: PPL-SPEC-001302 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    fold_space_dimensions(vars,dest) shall form the least grid containing the entry grid and every alternative obtained by assigning dest the old value of one selected source, then existentially project away the selected sources. Remaining coordinates retain their order. The destination shall be a valid unselected coordinate. Invalid destination, invalid source or destination included in the selection shall throw std::invalid_argument before mutation. Empty selection is identity after destination validation; empty remains empty in the reduced space.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Folding abstracts a choice among source coordinates, rather than adding or identifying all their values.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void fold_space_dimensions(const Variables_Set& vars, Variable dest);
    
    VERIFICATION_CRITERIA:

    Compute independent affine alternatives, their grid hull and projection. Check multiple sources, correlations, empty selection/input and each invalid-selection/destination case. Compare independent entry-grid affine images followed by grid join and projection, with zero/single/multiple noncontiguous sources, different destination positions, dense/sparse rows, rational anchors, destination-only periods or lines, correlations and pending or minimized caches.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_chdims.cc; src/Grid_templates.hh; tests/Grid/foldspacedims1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001303
    1. Integer-time-elapse grid abstraction UID: PPL-SPEC-001303 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    time_elapse_assign(y) shall assign the least grid containing {p + μq ∣ p ∈ X, q ∈ Y, μ ∈ Z}. The multiplier is integer time, including negative integers. Either empty operand shall yield empty. The distinct operand value and receiver dimension shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Integer multiples of supporting points become discrete parameters; replacing integer time with real time would unnecessarily lose modular information.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void time_elapse_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Construct independent supporting-point/parameter/line hulls for integer time; distinguish fractional/discrete periods from real rays. Include zero dimensions, self operands, empty and dimension rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/timeelapse1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001304
    2. Exact integer-coordinate restriction UID: PPL-SPEC-001304 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    drop_some_non_integer_points(complexity) shall intersect exactly with Zn. The overload with vars shall instead require integrality exactly on those coordinates. Unselected coordinates need not be integral; an empty selection is identity. Every complexity value shall give this exact result. Out-of-range selected indices shall throw std::invalid_argument before mutation, including empty.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Coordinate integrality is itself a conjunction of congruences and is exactly representable by grids.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void drop_some_non_integer_points(Complexity_Class complexity
                                      = ANY_COMPLEXITY);
    
    void drop_some_non_integer_points(const Variables_Set& vars,
                                      Complexity_Class complexity
                                      = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check independently intersected rational cosets with integer coordinate constraints, fractional phases, all/selected/no coordinates, coupled lattices, empty and invalid indices.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/dropnonintegerpoints1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001305
    3. Bounded-integer wrapping abstraction UID: PPL-SPEC-001305 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    wrap_assign(vars,w,r,o,cs_p,complexity_threshold,wrap_individually) shall conservatively abstract bounded-integer conversion on the selected coordinates, with modulus M = 2w and the signed or unsigned range selected by r. Coordinates supplied as bounded integers are assumed integral. Unselected coordinates and their projection shall be preserved. Empty selections are identity. Any out-of-range selected index, or an optional constraint system of excess dimension, shall throw std::invalid_argument before mutation. The optional constraints and the two precision controls need not improve the result.

    For OVERFLOW_WRAPS, a constant integer shall map to its unique in-range residue. A discrete coordinate shall retain its entry period together with period M, except that a period divisible by M shall collapse to the unique in-range residue. Rational periods shall first determine their possible integer residues; no possible integer shall yield empty. A constant noninteger shall yield empty. Real line directions may be retained conservatively. For OVERFLOW_IMPOSSIBLE, no in-range possible integer shall yield empty, one shall fix the coordinate, and multiple values may retain the original periodic abstraction. For OVERFLOW_UNDEFINED, overflow may forget the coordinate's value while retaining integrality; an already representable constant may be retained. No global optimality for correlated coordinates is required.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    A full-period multiple has one machine residue; representing it as an infinite modular coset loses a representable singleton.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void wrap_assign(const Variables_Set& vars,
                     Bounded_Integer_Type_Width w,
                     Bounded_Integer_Type_Representation r,
                     Bounded_Integer_Type_Overflow o,
                     const Constraint_System* cs_p = nullptr,
                     unsigned complexity_threshold = 16,
                     bool wrap_individually = true);
    
    VERIFICATION_CRITERIA:

    Enumerate signed/unsigned rational one-coordinate cosets and integer representatives independently for wrapping and impossible overflow. Check exact/larger/nonmultiple periods, negative phases, constants, continuous directions, correlated untouched coordinates, empty selections and dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/wrap1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001306
    4. Grid topological closure UID: PPL-SPEC-001306 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    topological_closure_assign() shall preserve the receiver's mathematical value and ambient dimension. Every represented rational grid, including empty, is closed in its ambient real topology.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    A rational grid is a finite-dimensional sum of a real subspace and a discrete lattice; it has no excluded limit points.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void topological_closure_assign();
    
    VERIFICATION_CRITERIA:

    Check empty, zero-dimensional, discrete, continuous and mixed grids with both descriptions and redundant generators.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/topclosure1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • 1. Copying bulk insertion of rational-grid generators UID: PPL-SPEC-001271 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_grid_generators(input) shall add the input points, parameters and lines to a generator description of the receiver, with the meaning in 🔗 1. Rational-grid values, coefficient profile and valid use. For nonempty G = p + H, input points ri, parameters qj and lines lk shall produce p + H + ∑iZ(ri − p) + ∑jZqj + ∑kRlk. In particular, adding points shall form a grid hull, not a finite union.

    A system with no stored rows shall be a no-op. If the receiver is empty and the nonempty input has no point, the operation shall throw std::invalid_argument. Otherwise an empty receiver shall acquire exactly the grid generated by the input. A zero-dimensional point shall turn zero-dimensional empty into universe; zero-dimensional universe shall be preserved. Zero parameters omitted by the generator-system contract shall not constitute stored rows.

    The input's value, dimension and storage shall be preserved, including when an exception propagates. A current generator-system view borrowed from the receiver may be supplied: its pre-call generators shall be used as the input, and normal receiver-view invalidation shall apply during mutation.

    The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    The copying interface must preserve its source while combining integer displacements and real line directions, including when cached congruences are inconsistent.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.

    void add_grid_generators(const Grid_Generator_System& input);
    
    VERIFICATION_CRITERIA:

    Use independent rational coset calculations for points, parameters and lines under invertible coordinate transformations. Cross empty, singleton, periodic and continuous receivers with both descriptions and cache histories. Exercise pending contradictory rows, lower-dimensional inputs, dense/sparse storage, reversed/redundant rows, borrowed self views, unchanged source records, dimension errors, zero dimensions and allocation failures.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.

  • PPL-SPEC-001272
    2. Recycling bulk insertion of rational-grid generators UID: PPL-SPEC-001272 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_grid_generators(std::move(input)) and add_recycled_grid_generators(input) shall produce the same mathematical receiver value, ambient dimension and ordinary input-rejection outcomes as 🔗 1. Copying bulk insertion of rational-grid generators. These operations may transfer ownership from the supplied system. The input shall be a separate writable object; it shall not alias receiver-owned storage. After successful or exceptional return the input shall retain ownership sufficient for destruction. Its rows, dimension, storage and suitability for subsequent queries shall not be assumed.

    A receiver discovered empty while converting its congruences shall use the same insertion rules as an already marked empty receiver. Nonempty input without a supporting point shall therefore be rejected; input with a point shall establish the generated grid. Conversion shall not leave subsequent normalization dependent on a nonexistent old supporting point.

    The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Recycling changes ownership permissions, while the generated set and empty-grid point requirement remain the same as for copying insertion.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.

    void add_grid_generators(Grid_Generator_System&& input);
    void add_recycled_grid_generators(Grid_Generator_System& input);
    
    VERIFICATION_CRITERIA:

    Check recycling and copying separately against the same independent coset oracle. Include empty inputs, lower-dimensional rows, zero dimensions, systems with no points, latent contradictions, mixed point/parameter/line systems, every observed allocation-failure frontier and destruction of both surviving objects.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc; tests/gridconsuminginsertions1.cc.

  • PPL-SPEC-001273
    3. Copying insertion of a single rational-grid generator UID: PPL-SPEC-001273 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_grid_generator(g) shall add the pre-call generator value to a generator description of the receiver, preserving its ambient dimension. For nonempty G = p + H, adding a point r shall produce p + H + Z(r − p); adding a parameter q shall produce p + H + Zq; adding a line l shall produce p + H + Rl. Insertion of an already supplied generator shall be mathematically idempotent. A zero parameter shall preserve a nonempty grid.

    An empty receiver shall accept a point and become that singleton. A parameter or line supplied to empty shall throw std::invalid_argument, including a zero parameter. Previously undetected inconsistency shall have the same meaning as already marked empty. In zero dimensions a point shall establish universe; a parameter shall preserve universe and be rejected by empty.

    Missing coordinates shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including an empty receiver or a zero parameter. Input type and value shall be captured safely when the argument is borrowed from the receiver's generator view. Receiver mutation may invalidate that view according to 🔗 10. Borrowed congruence and generator views of grid values; the external input case shall preserve its source. The result shall not depend on storage, redundant rows or cache history.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. External input descriptors shall retain their value.

    RATIONALE:

    Points, integer parameters and real lines extend a grid in different ways. The copy-taking interface must not inspect a borrowed argument after receiver storage growth invalidates it.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Grid.

    void add_grid_generator(const Grid_Generator& g);
    
    VERIFICATION_CRITERIA:

    Use independent rational coset calculations for each generator kind. Check empty and latent-empty receivers, zero dimensions and parameters, lower or excess declared dimension, fractional points, storage and cache histories. Insert borrowed points, parameters and lines across storage growth and compare with their pre-call grid. Exercise external-input preservation and every observed allocation-failure frontier, checking surviving ownership.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_nonpublic.cc; src/Grid_inlines.hh; tests/gridsingleinsertionspec1.cc; tests/gridinsertionpublic1.cc; tests/gridinsertionfailure1.cc; tests/Grid/addgenerators1.cc; tests/Grid/grid1.cc.

  • 1. Grid-generator values and integer versus continuous displacement UID: PPL-SPEC-000221 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Grid_Generator shall describe a rational included point, a rational parameter displacement vector, or a continuous line direction, in its public ambient dimension. For a point or parameter with numerators ai and positive divisor d, coordinates shall be ai ⁄ d. Parameters shall retain their exact rational step, including sign and magnitude; integer multiples of that step shall contribute to a generated grid. Lines shall contribute arbitrary real multiples of their direction. Hidden divisor fields shall not be public coordinates.

    Both storage representations shall be supported; default_representation shall be SPARSE. Initialization and synchronization shall follow 🔗 3. Thread initialization, default state and finalization. Computed construction, transformation, scaling and comparison guarantees shall require all evaluated coefficient steps/results to be representable in the selected profile; unchecked completion shall not prove that condition. Allocation/numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete grid generator; distinct unchanged sources shall survive failures, while modified targets shall remain destructible without universal rollback.

    RATIONALE:

    A parameter is a sized displacement vector rather than a scale-free direction. Its exact value is separate from the integer span it contributes to a grid.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Grid_Generator;
    enum Grid_Generator::Type { LINE, PARAMETER, POINT };
    static constexpr Representation Grid_Generator::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Compare independent rational point/parameter vectors and line proportionality. Distinguish rational/integral displacements, scaled and opposite parameters, continuous lines and integer steps.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation BagnaraDHMZ07 | Section 3, The Generator Representation

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000222
    2. Construction of nonzero grid-line directions UID: PPL-SPEC-000222 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    grid_line(e,r) shall construct a line from homogeneous coefficients, ignore the constant, retain declared dimension and use requested storage. It shall produce a primitive direction with first nonzero coefficient positive. A zero homogeneous direction, including a nonzero constant expression, shall throw std::invalid_argument without modifying its source. Static and free forms shall agree geometrically. Numerical prerequisites in 🔗 1. Grid-generator values and integer versus continuous displacement shall apply.

    RATIONALE:

    Continuous direction is unchanged by nonzero common scaling and cannot be constructed from the zero vector.

    INTERFACE:
    static Grid_Generator Grid_Generator::grid_line(const Linear_Expression& e,
      Representation r = default_representation);
    Grid_Generator grid_line(const Linear_Expression& e,
      Representation r = Grid_Generator::default_representation);
    
    VERIFICATION_CRITERIA:

    Check static/free factories, both signs, common factors, ignored constants, gaps, trailing dimensions and zero-direction rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000223
    3. Exact rational parameter construction including zero steps UID: PPL-SPEC-000223 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    parameter(e,d,r) shall create the rational displacement with coordinates ai ⁄ d from the homogeneous input coefficients, ignoring the constant, retaining dimension and using requested storage. Nonzero negative divisors shall be accepted by reversing numerator/divisor signs to make stored divisor positive while preserving the exact signed step. The parameter's magnitude shall not be normalized as a line direction. Zero displacement shall be admitted and retain its dimension. Zero divisor shall throw std::invalid_argument and preserve sources.

    Defaults shall use dimension-zero zero expression, divisor one and default storage. Representation-only and expression/representation forms shall use divisor one. A divisor borrowed from the unchanged input expression shall be admitted using its entry value. Numerical prerequisites in 🔗 1. Grid-generator values and integer versus continuous displacement shall apply.

    RATIONALE:

    Dividing a parameter vector without its divisor changes its periodic step. Zero is a valid redundant displacement descriptor.

    INTERFACE:
    static Grid_Generator Grid_Generator::parameter(
      const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = default_representation);
    static Grid_Generator Grid_Generator::parameter(Representation r);
    static Grid_Generator Grid_Generator::parameter(const Linear_Expression& e, Representation r);
    Grid_Generator parameter(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = Grid_Generator::default_representation);
    Grid_Generator parameter(Representation r);
    Grid_Generator parameter(const Linear_Expression& e, Representation r);
    
    VERIFICATION_CRITERIA:

    Check every static/free/default form, signed/nonunit divisors, common factors, exact doubled/opposite steps, zero parameters with positive dimension, borrowed divisor and zero-divisor rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000224
    4. Rational grid-point construction, defaults and shared origin UID: PPL-SPEC-000224 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    grid_point(e,d,r) shall construct the rational point with coordinates ai ⁄ d, ignoring the expression constant, retaining dimension and using requested storage. A negative nonzero divisor shall reverse numerator signs and become positive; common factors may be removed while preserving rational coordinates. Zero divisor shall throw std::invalid_argument. A divisor borrowed from the unchanged input expression shall use its entry value.

    Omitted expression/divisor arguments shall denote the dimension-zero origin and divisor one. Representation-only and expression/representation forms shall use divisor one. Default construction shall produce that origin using requested storage. zero_dim_point() shall borrow the zero-dimensional origin until owning-thread finalization; owned copies shall be independent.

    RATIONALE:

    A rational supporting point fixes a grid offset and differs from a periodic parameter at the same coordinate vector.

    INTERFACE:
    static Grid_Generator Grid_Generator::grid_point(
      const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = default_representation);
    static Grid_Generator Grid_Generator::grid_point(Representation r);
    static Grid_Generator Grid_Generator::grid_point(const Linear_Expression& e, Representation r);
    Grid_Generator grid_point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = Grid_Generator::default_representation);
    Grid_Generator grid_point(Representation r);
    Grid_Generator grid_point(const Linear_Expression& e, Representation r);
    explicit Grid_Generator(Representation r = default_representation);
    static const Grid_Generator& Grid_Generator::zero_dim_point();
    
    VERIFICATION_CRITERIA:

    Check all static/free/default forms, positive/negative divisors, origins in different dimensions, exact rational coordinates and shared lifetime, input aliases and zero-divisor rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000225
    5. Owned grid-generator copying, assignment and swaps UID: PPL-SPEC-000225 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction shall preserve exact fields, kind, dimension and source representation; explicit-storage copies shall select their argument. Assignment shall copy complete entry value/storage, preserve distinct sources, return the target and admit self-assignment. Rvalue inputs shall admit copy forms retaining source value without requiring a distinct move operation. Copies shall remain independent of source mutation/destruction. Swaps shall exchange complete values, dimension and storage; self-swap shall preserve them. Destruction shall release owned storage. Failure during copy assignment's replacement construction shall preserve the target.

    RATIONALE:

    Each grid-generator object owns its expression and divisor fields independently.

    INTERFACE:
    Grid_Generator(const Grid_Generator& g);
    Grid_Generator(const Grid_Generator& g, Representation r);
    Grid_Generator& Grid_Generator::operator=(const Grid_Generator& g);
    Grid_Generator::~Grid_Generator();
    void Grid_Generator::m_swap(Grid_Generator& y);
    void swap(Grid_Generator& x, Grid_Generator& y);
    
    VERIFICATION_CRITERIA:

    Check all kinds, exact rational parameter/point fields, representation choices, return identity, self/rvalue forms, surviving copies, swaps and replacement-copy failures.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000226
    6. Grid-generator storage conversion UID: PPL-SPEC-000226 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    representation() shall report storage. Successful conversion to dense or sparse representation shall select requested storage and preserve exact coefficients, divisor when applicable, kind and dimension. Repeating the current choice shall preserve the object. Failed replacement allocation shall leave its original value and storage unchanged.

    RATIONALE:

    Representation conversion must preserve parameter magnitude as well as point coordinates and line orientation.

    INTERFACE:
    Representation Grid_Generator::representation() const;
    void Grid_Generator::set_representation(Representation r);
    
    VERIFICATION_CRITERIA:

    Convert every kind in both directions, including unnormalized numerator/divisor tuples and zero parameters, checking exact fields and allocation-failure preservation.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000230
    10. Explicit replacement of a rational generator divisor UID: PPL-SPEC-000230 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a point or parameter and positive input d, set_divisor(d) shall replace only its divisor using the input entry value, preserving coordinate numerators, dimension, kind and storage. It shall therefore change the rational vector when the divisor changes. A divisor borrowed from the same object shall be admitted. Calling it on a line shall throw std::invalid_argument without changing that line.

    RATIONALE:

    Replacing a divisor changes rational coordinates; it is different from scaling a representation to an equivalent divisor.

    INTERFACE:
    void Grid_Generator::set_divisor(Coefficient_traits::const_reference d);
    
    VERIFICATION_CRITERIA:

    Check point/parameter divisor replacement, self-divisor and positive borrowed-coordinate inputs with unchanged numerators. Compare changed rational vectors and verify documented line rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000233
    13. Reloadable grid-generator representation UID: PPL-SPEC-000233 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export all stored coefficient/divisor fields and the public kind token; the no-argument form shall use std::cerr. Export shall preserve the source. Compatible complete exported data with representable coefficients shall load with true, replacing the generator's fields and public dimension while retaining destination storage.

    Malformed/truncated expression or kind fields, missing internal divisor slots, nonpositive point/parameter divisors and encoded kind/field mismatches shall return false rather than be accepted as valid generators. Trailing input shall remain available. A failed target shall remain destructible and admit complete valid replacement, without rollback or cross-version format promises. Allocation and numerical exceptions may propagate.

    RATIONALE:

    A declared point token must not silently load as a parameter merely because its coefficient fields encode that different kind.

    INTERFACE:
    void Grid_Generator::ascii_dump(std::ostream& s) const;
    void Grid_Generator::ascii_dump() const;
    bool Grid_Generator::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip all kinds, zero/nonzero parameters, rational and unreduced tuples across destination choices. Check exact kind/divisor/coordinate fields and reject malformed/truncated expressions, kind mismatches, invalid counts/divisors and unsupported structure. Reject missing hidden divisor storage, nonpositive parameter/point divisors and inconsistent point/line fields through false rather than assertion failure. Exercise dense/sparse destination replacement and preserve positive-divisor zero parameters and valid line records retaining hidden divisor metadata.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc; tests/gridgeneratorbranches1.cc.

  • PPL-SPEC-000235
    15. Grid-generator-system integer-affine span and construction UID: PPL-SPEC-000235 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For lines L, parameters Q and included points P, a Grid_Generator_System shall generate the real vectors

     ∑l ∈ Lτll +  ∑q ∈ Qkqq +  ∑p ∈ Pzpp,   τl ∈ ℝ,  kq, zp ∈ ℤ,   ∑p ∈ Pzp = 1.

    Without a point the generated grid shall be empty, even with stored nonzero lines/parameters. Integer affine combinations of multiple points shall not be replaced by convex combinations. Default construction shall make a zero-dimensional system with no rows; an explicit dimension constructor shall retain its supplied admitted dimension. Singleton construction shall copy its generator and dimension, including a zero parameter. Ordinary insertion shall separately follow 🔗 17. Grid-generator insertion, zero steps and ownership transfer. Requested storage shall be used, with default SPARSE. zero_dim_univ() shall borrow the singleton zero-dimensional origin until owning-thread finalization. Numerical/use/failure prerequisites shall follow 🔗 1. Grid-generator values and integer versus continuous displacement.

    RATIONALE:

    Grid generation combines integer affine offsets and integer parameter steps with continuous line spans; a convex hull would admit incorrect fractional displacements.

    INTERFACE:
    class Grid_Generator_System;
    static constexpr Representation Grid_Generator_System::default_representation = SPARSE;
    explicit Grid_Generator_System(Representation r = default_representation);
    explicit Grid_Generator_System(dimension_type dim, Representation r = default_representation);
    explicit Grid_Generator_System(const Grid_Generator& g, Representation r = default_representation);
    static const Grid_Generator_System& Grid_Generator_System::zero_dim_univ();
    
    VERIFICATION_CRITERIA:

    Check supporting-point absence, rational offsets, half-integer steps, points at zero and two generating even integers, continuous line directions and zero-dimensional empty/universal systems against independent lattice equations.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation BagnaraDHMZ07 | Section 3, The Generator Representation

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc; tests/gridgeneratorbranches1.cc.

  • PPL-SPEC-000236
    16. Owned grid-generator systems and representation comparison UID: PPL-SPEC-000236 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copies/assignment shall preserve generated grid, declared dimension and retained row sequence. Ordinary copies and assignment shall retain source storage, while explicit-storage copies shall use their argument. Assignment shall return the target, preserve distinct sources, admit self-assignment and retain source value under rvalue copy forms. Copies shall survive source mutation/destruction. Swaps shall exchange full values, dimensions and storage, including self-swap. Successful representation conversion shall select dense or sparse row storage and preserve the generated grid and dimension. Copy-assignment replacement failure shall preserve the target; other failures shall follow 🔗 1. Grid-generator values and integer versus continuous displacement.

    is_equal_to and system equality shall compare declared dimensions and retained row sequence using equivalent corresponding generators, not decide equality of arbitrarily reordered or redundant generated grids. Comparison shall ignore dense/sparse choice. Destruction shall release owned storage.

    RATIONALE:

    Owning row-sequence comparison remains distinct from equality of the lattice or continuous affine set generated by a system.

    INTERFACE:
    Grid_Generator_System(const Grid_Generator_System& gs);
    Grid_Generator_System(const Grid_Generator_System& gs, Representation r);
    Grid_Generator_System& Grid_Generator_System::operator=(const Grid_Generator_System& y);
    Grid_Generator_System::~Grid_Generator_System();
    Representation Grid_Generator_System::representation() const;
    void Grid_Generator_System::set_representation(Representation r);
    void Grid_Generator_System::m_swap(Grid_Generator_System& y);
    void swap(Grid_Generator_System& x, Grid_Generator_System& y);
    bool Grid_Generator_System::is_equal_to(const Grid_Generator_System& y) const;
    bool operator==(const Grid_Generator_System& x, const Grid_Generator_System& y);
    
    VERIFICATION_CRITERIA:

    Check copy/self/rvalue forms, swaps/conversions and destruction independence for empty and mixed systems. Compare matching sequences across storage, different dimensions/counts and changed rows without inferring a general grid-equivalence decision.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • 17. Grid-generator insertion, zero steps and ownership transfer UID: PPL-SPEC-000237 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Const-reference insertion shall add a copy of a grid generator to the generating collection, preserve its source and retain target storage. Result dimension shall be the maximum input dimension, zero-extending shorter rows. A zero parameter shall add no row but shall still extend ambient dimension as needed; it shall not supply a supporting point. Copy insertion of a borrowed target row shall use its entry value. Duplicates/redundant generators may be removed or reordered while preserving the generated grid.

    Rvalue row insertion shall transfer a source not borrowed from the target, with the same generated-grid effect as copying; the source shall remain destructible. Consuming-system insertion shall require distinct systems, combine their generating collections in aligned dimensions, and clear the source to a dimension-zero empty system on success. No unchanged-value guarantee shall apply to transferred inputs. Numerical/failure prerequisites in 🔗 1. Grid-generator values and integer versus continuous displacement shall apply.

    Const row sources, including const rvalues, shall use preserving insertion. Successful rvalue row insertion shall leave its source a valid descriptor with an unspecified value.

    RATIONALE:

    Zero displacement is redundant yet still carries ambient dimension. Ownership transfer must not accidentally add a supporting point or change a parameter period.

    INTERFACE:
    void Grid_Generator_System::insert(const Grid_Generator& g);
    void Grid_Generator_System::insert(Grid_Generator&& g);
    void Grid_Generator_System::insert(Grid_Generator_System&& gs);
    
    VERIFICATION_CRITERIA:

    Check dimension alignment, zero-parameter discarding, borrowed-row insertion, copied-source preservation and recycled row/system ownership. Compare independent generated-grid examples before/after adding points, lines and rational parameters.

    SOURCE:

    src/Row_Transfers.cc; tests/consuminginsertions1.cc; src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc; tests/gridgeneratorbranches1.cc.

  • PPL-SPEC-000240
    20. Reloadable grid-generator-system representation UID: PPL-SPEC-000240 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export stored rows, public dimension, storage and required system-state fields; the no-argument form shall use std::cerr. Export shall preserve source value. Compatible complete exports with representable coefficients shall load with true, replacing the target's generated grid, dimension, retained rows and encoded storage.

    Malformed/truncated headers/rows, invalid divisor or kind structure, and inconsistent encoded dimensions/state fields shall return false rather than be accepted as valid systems. Trailing input shall remain available. Failed targets shall remain destructible and admit complete valid replacement, without rollback or cross-version format promises. Allocation/numerical exceptions may propagate. The decoded header dimension shall not exceed max_space_dimension(), including when the record contains no rows; not_a_dimension() shall be rejected as an unsupported extent.

    RATIONALE:

    Reload must preserve parameter periods and supporting-point offsets together with ambient dimension.

    INTERFACE:
    void Grid_Generator_System::ascii_dump(std::ostream& s) const;
    void Grid_Generator_System::ascii_dump() const;
    bool Grid_Generator_System::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip empty positive-dimensional, no-supporting-point and mixed rational-point/parameter/line systems across destination choices. Check encoded storage, dimensions and independent lattice membership; reject malformed/truncated structural fields and row-kind/divisor inconsistencies. Check zero, positive and maximum admitted header dimensions, maximum plus one and the reserved non-dimension, even for empty row sequences. Exercise both storage choices, preserved trailing input and complete valid replacement after rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc; tests/gridgeneratorbranches1.cc.

  • PPL-SPEC-001274
    1. Single congruence addition and refinement UID: PPL-SPEC-001274 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruence(cg) and refine_with_congruence(cg) shall replace the receiver G by G∩{x ∣ cg(x)}. Equalities and proper congruences shall have their meanings in 🔗 1. Rational-grid values, coefficient profile and valid use. Tautologies shall preserve the grid and contradictions shall produce empty. Lower-dimensional rows shall be zero extended; excess declared row dimension shall throw std::invalid_argument before mutation, including for an empty receiver. The external row value shall be preserved.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Adding a congruence is an exact meet, including modular inconsistency that is detected only when descriptions are normalized.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_congruence(const Congruence& cg);
    
    void refine_with_congruence(const Congruence& cg);
    
    VERIFICATION_CRITERIA:

    Cross equality, proper, tautological and contradictory rows with empty, singleton, periodic and continuous grids, both storage choices, pending contradictions and both cached descriptions. Check lower/excess dimensions and source preservation.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruence1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001275
    2. Copying congruence-system addition and refinement UID: PPL-SPEC-001275 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruences(cgs) and refine_with_congruences(cgs) shall intersect the receiver with the conjunction of all input rows, exactly as repeated 🔗 1. Single congruence addition and refinement. An empty system shall preserve the grid. An independently supplied input shall retain its value, declared dimension and storage, including on exceptional return. The receiver's current congruence view may be supplied; its entry value shall be used before invalidation. Excess declared input dimension shall throw std::invalid_argument before mutation, even for no rows or an empty receiver.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Copying a conjunction must not depend on row order, redundancy or whether the source is a receiver-owned current view.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_congruences(const Congruence_System& cgs);
    
    void refine_with_congruences(const Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Compare bulk and single-row exact meets with independent cosets. Include borrowed self systems, unused declared dimensions, empty systems, contradictions and source records.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/Grid/refinewithcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001276
    3. Recycling congruence-system addition UID: PPL-SPEC-001276 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruences(std::move(cgs)) and add_recycled_congruences(cgs) shall produce the same mathematical grid and dimension-rejection behavior as 🔗 2. Copying congruence-system addition and refinement. The source shall be a separate writable system without receiver-owned storage. Its storage may be transferred; after successful or exceptional return it shall retain ownership sufficient for destruction, without a guarantee about its rows or suitability for queries.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Recycling changes source ownership permissions without changing conjunction semantics.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_congruences(Congruence_System&& cgs);
    void add_recycled_congruences(Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Check copied and recycled systems against the same independent intersections, including empty, contradictory, lower-dimensional and excess-dimensional systems. Exercise allocation failures and destruction of both objects.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addcongruences1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc; tests/gridconsuminginsertions1.cc.

  • 4. Strict addition of a single linear constraint UID: PPL-SPEC-001277 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraint(c) shall intersect the receiver exactly with an equality or constant constraint. A constant true inequality shall preserve the grid; a constant false inequality shall produce empty. A nonconstant inequality shall throw std::invalid_argument when processed. An already marked empty receiver may return without processing a dimension-compatible row. Excess declared constraint dimension shall throw std::invalid_argument before mutation, even for empty.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    A grid can represent affine equalities and the two constant truth values; a general half-space is not a grid.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_constraint(const Constraint& c);
    
    VERIFICATION_CRITERIA:

    Check equalities, strict/non-strict constant truth values, nonconstant inequalities, zero dimensions and dimension errors. Distinguish unsupported-row processing from the marked-empty early return.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addconstraint1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc; tests/Grid/addconstraints1.cc.

  • PPL-SPEC-001278
    5. Copying and recycling strict constraint-system addition UID: PPL-SPEC-001278 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraints(cs) and add_recycled_constraints(cs) shall process the conjunction using the supported-constraint rules in 🔗 4. Strict addition of a single linear constraint. Excess declared system dimension shall throw std::invalid_argument before mutation, even for no rows or empty. Copying shall preserve the source value, dimension and storage. Recycling requires a separate writable source and guarantees its destruction after return; it need not actually transfer its storage. When an unsupported inequality is reached, earlier accepted rows may already have changed the receiver; rollback shall not be assumed.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    System processing preserves exact supported meets but does not offer transactional rejection of a later unsupported row.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void add_constraints(const Constraint_System& cs);
    
    void add_recycled_constraints(Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Check empty and mixed supported systems, row ordering, a later unsupported inequality, source preservation, zero dimensions, excess declared dimensions and allocation failure ownership. Check coefficient storage transfer for an equality when source and destination representations match, and NNC equality rows with hidden epsilon coordinates, including dimension extension.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/addconstraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001279
    6. Conservative refinement by linear constraints UID: PPL-SPEC-001279 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_constraint(c) and refine_with_constraints(cs) shall intersect with every equality and produce empty for an inconsistent constant constraint. Other inequalities shall be ignored. Thus the result shall contain the concrete constrained set and shall never introduce points outside the entry grid. Input values shall be preserved. Excess declared input dimension shall throw std::invalid_argument before mutation, including an empty receiver or system.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Conservative refinement can ignore unsupported half-spaces while still recognizing a false constant constraint.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void refine_with_constraint(const Constraint& c);
    
    void refine_with_constraints(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Compare with the conjunction of equalities and constant truth values; cross nonconstant inequalities, inconsistency, dimensions, source storage and cache histories.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/refinewithconstraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001280
    7. Equality-constraint extraction and minimization UID: PPL-SPEC-001280 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    constraints() shall return an independently owned equality-constraint system defining the real affine hull of the receiver. Empty shall yield an inconsistent system, including when emptiness follows from incompatible proper congruences not previously normalized. minimized_constraints() shall return a minimal equality description of the same affine hull. Both shall preserve ambient dimension, receiver value and ownership, while normalization caches may change. The result shall be independent of storage, redundant rows and description history.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Dropping proper congruences is correct only after any latent inconsistency has been resolved.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    Constraint_System constraints() const;
    
    Constraint_System minimized_constraints() const;
    
    VERIFICATION_CRITERIA:

    Use consistent and inconsistent proper congruences, contradictions among equalities, unused coordinates, dense/sparse storage, all addition/refinement routes and both extraction methods. Check returned ownership and affine hulls with an independent equality oracle.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/constraints1.cc; tests/gridrefinementspec1.cc; tests/gridoperationsfailure1.cc; tests/gridedgespec1.cc.

  • PPL-SPEC-001251
    1. Exact grid equality and inequality UID: PPL-SPEC-001251 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    operator== shall return true exactly when both ambient dimensions and represented sets agree. Different dimensions shall compare unequal, including empty grids in different dimensions. Inequality expressions shall be the logical negation of equality. Equal-dimensional empty grids shall compare equal, including when inconsistency has not previously been detected. Self comparison shall have the ordinary reflexive result for every admitted value.

    The result shall be independent of constructor choice, generator order, redundant descriptors and the current dual-description caches.

    The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Set equality includes periodicity and the ambient coordinate space; matching affine hulls or matching syntactic rows alone do not establish equality.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    bool operator==(const Grid& left, const Grid& right);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare independent rational cosets, continuous subspaces, singletons, empty/universe and incompatible dimensions. Use literal generator/congruence models and alternate construction, normalization and reload histories. Include unequal lattices with identical affine hulls and equal values with redundant generators.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001252
    2. Equality-compatible grid hashing UID: PPL-SPEC-001252 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    hash_code() shall return a value of type int32_t. Equal grid values under 🔗 1. Exact grid equality and inequality shall have equal hashes. Normalization, query history and equivalent descriptions shall not change the hash of an unchanged grid. Hash collisions shall be permitted, including between unequal values of the same dimension. The numerical hash shall not be a persistent identifier or promise a value stable across library versions or configurations.

    The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Hash compatibility permits associative storage without implying that a coarse hash distinguishes different sets.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    int32_t hash_code() const;
    
    VERIFICATION_CRITERIA:

    Check exact equal-value descriptions before and after each cache transition, copy, assignment and self comparison. Verify the public return type and do not infer inequality from equal hashes.

    SOURCE:

    src/Grid_inlines.hh; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc.

  • PPL-SPEC-001253
    3. Exact grid containment UID: PPL-SPEC-001253 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal-dimensional grids, left.contains(right) shall return true exactly when γ(right) ⊆ γ(left). Every grid shall contain the empty grid; empty shall contain no nonempty grid; universe shall contain every equal-dimensional grid. Self containment shall hold. Different ambient dimensions shall throw std::invalid_argument before empty, universe or identity shortcuts. Previously undetected inconsistency shall retain the same set meaning.

    The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Containment must respect integer parameter steps and rational offsets, not only affine spans or the presence of individual points.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    bool contains(const Grid& other) const;
    
    VERIFICATION_CRITERIA:

    Use exact rational one-dimensional coset divisibility and invertible coupled-coordinate products. Cross all pairs of empty, singleton, periodic and continuous factors; vary representations and query order. Check reflexivity, containment of empty and dimension rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001254
    4. Exact strict grid containment UID: PPL-SPEC-001254 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal-dimensional grids, left.strictly_contains(right) shall return true exactly when γ(right) ⊊ γ(left). It shall be false for self comparison and equal sets; a nonempty grid shall strictly contain empty. Different ambient dimensions shall throw std::invalid_argument even when either operand is empty.

    The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Strict containment combines inclusion with semantic inequality; changes only to representation cannot make containment strict.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    bool strictly_contains(const Grid& other) const;
    
    VERIFICATION_CRITERIA:

    Use the same independent coset/product inclusion oracle as containment. Check strict chains of periods, fractional shifts, equal alternate representations, self comparison, empty and incompatible dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001255
    5. Exact grid disjointness UID: PPL-SPEC-001255 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal-dimensional grids, left.is_disjoint_from(right) shall return true exactly when γ(left)∩γ(right) = ⌀. The result shall be symmetric. Empty shall be disjoint from every grid, including itself; no nonempty grid shall be disjoint from itself. Different ambient dimensions shall throw std::invalid_argument before shortcuts. Success shall preserve both operands even when detecting inconsistent input or incompatible periodic residues.

    The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Intersecting affine hulls do not establish that periodic grids share a point. Rational residue compatibility determines lattice intersection.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    bool is_disjoint_from(const Grid& other) const;
    
    VERIFICATION_CRITERIA:

    Use independent rational greatest-common-divisor conditions for cosets, then combine independent coordinates through invertible rational maps. Include fractional periods, incompatible shifts, singleton membership, continuous factors, zero dimensions, symmetry and argument rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001256
    6. Exact grid relation with a congruence UID: PPL-SPEC-001256 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(cg) shall classify the grid relative to the solution set of cg. For nonempty grids it shall report exactly one of is_included(), is_disjoint() and strictly_intersects(): respectively all points satisfy cg, no point does, or both satisfying and nonsatisfying points exist. Empty shall report is_included() && is_disjoint() && saturates(). An equality congruence shall additionally report saturates() exactly when the grid is included in its equality hyperplane. For a nonempty positive-dimensional grid and a proper congruence, the returned relation shall consist of the inclusion/disjointness/intersection assertion alone. Zero-dimensional universe shall report is_included() && saturates() for a true constant congruence and is_disjoint() for a false one.

    For a nonempty generator description, let S = {a⋅x − b : x ∈ γ(G)}. If a real line has nonzero scalar image, S = R. Otherwise S = s + dZ, where s = a⋅p − b and d ≥ 0 generates the rational subgroup of parameter images and supporting-point differences. This scalar image shall determine equality and periodic intersection without depending on generator order or rational divisor representation.

    A congruence dimension greater than the grid dimension shall throw std::invalid_argument before distinguished-value shortcuts. Smaller descriptors shall have zero coefficients in the remaining coordinates.

    Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Exact relation queries require rational residue arithmetic, including point offsets, integer combinations of all parameter images and arbitrary real line images. Saturation and periodic inclusion have distinct API assertion conventions.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Congruence& cg) const;
    
    VERIFICATION_CRITERIA:

    Use the independent integer-scaled scalar-image gcd oracle and all point/parameter/line permutations in the existing relation tests. Include fractional divisors, extra supporting points, proper/equality constants, undetected emptiness, alternate caches, zero dimensions and rejection.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; tests/Grid/relations2.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001257
    7. Exact grid relation with a linear constraint UID: PPL-SPEC-001257 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(c) shall classify all points, no points or a proper nonempty subset of grid points satisfying c using is_included(), is_disjoint() or strictly_intersects(). Empty shall report is_included() && is_disjoint() && saturates(). In every case, saturates() shall be present exactly when every grid point lies on the equality hyperplane obtained from c by replacing its relation with equality. Thus a grid on the boundary of a strict inequality shall report is_disjoint() && saturates().

    For nonempty grids, a nonconstant scalar image along any line, parameter or supporting-point displacement shall take values on both sides of every finite halfspace threshold. Otherwise the scalar image shall be constant and its sign shall determine strict/nonstrict satisfaction and saturation. Equality constraints shall use the exact equality-congruence meaning in 🔗 6. Exact grid relation with a congruence.

    A constraint dimension greater than the grid dimension shall throw std::invalid_argument before shortcuts; omitted coefficients shall be zero. Strict boundary behavior shall apply also to constant constraints and zero dimensions.

    Strict constraints extracted from NNC polyhedra shall retain their mathematical relation when queried against a larger-dimensional grid.

    Scalar products, rational point differences and modulus/divisor products used solely for relation classification shall be exact even when their intermediates exceed the configured coefficient range. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached descriptor conversion and normalization remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Integer displacements still extend in both signs, so a nonconstant linear form on a grid cannot have a one-sided finite extremum. Saturation concerns the boundary hyperplane independently of inequality satisfaction.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Constraint& c) const;
    
    VERIFICATION_CRITERIA:

    Exercise literal affine annihilators, unbounded parameter/line images, rational supporting points and boundary equalities. Reuse independent strict-boundary and scalar-sign controls, with generator permutations, cache histories, constants, latent empty values and dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; tests/Grid/relations3.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001258
    8. Exact grid subsumption of grid generators UID: PPL-SPEC-001258 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(g) for a Grid_Generator shall return Poly_Gen_Relation::subsumes() exactly under the following conditions:

    • a point denotes a member of the grid;
    • for a parameter q, the grid is nonempty and every integer translate x + zq, for x ∈ γ(G) and z ∈ Z, remains in the grid;
    • for a line ℓ, the grid is nonempty and every real translate x + tℓ, for t ∈ R, remains in the grid.

    In all other cases it shall return Poly_Gen_Relation::nothing(). In particular, empty shall subsume no generator, including a zero parameter; this shall hold before any earlier query has detected the emptiness. Parameter steps shall use their rational divisors and shall not be confused with arbitrary real line displacements. Zero-dimensional universe shall subsume every admitted zero-dimensional grid generator. A descriptor dimension greater than the grid dimension shall throw std::invalid_argument before empty/universe shortcuts; omitted coordinates shall be zero.

    The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Satisfying homogeneous direction equations alone does not establish that the source grid contains a supporting point. Nonempty rational lattices can admit an integer step while rejecting its real line.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    Poly_Gen_Relation relation_with(const Grid_Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Use literal congruence membership for points and independent homogeneous conditions for integer parameters and real lines. Include cold inconsistent systems, nonzero directions in otherwise free coordinates, zero parameters, fractional lattice steps, affine obstructions, cache histories and dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001259
    9. Exact grid subsumption of polyhedral generators UID: PPL-SPEC-001259 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(g) for a polyhedral Generator shall return Poly_Gen_Relation::subsumes() exactly when the grid is nonempty and the following corresponding condition holds. Points and closure points shall be tested as rational point members, with the same result for identical coordinates. Lines shall be tested as arbitrary real displacements. A ray shall be subsumed exactly when its direction is an admitted real line direction of the grid; an integer parameter in that direction alone shall not suffice.

    It shall return Poly_Gen_Relation::nothing() otherwise, including every empty grid before or after inconsistency detection. Zero-dimensional universe shall subsume every admitted zero-dimensional polyhedral generator. Descriptors of greater dimension than the grid shall throw std::invalid_argument before shortcuts; omitted coordinates shall be zero.

    The scalar-product and modulus-times-divisor calculations used solely for satisfaction tests shall be exact without a configured-coefficient range prerequisite. The valid-use, initialization, arithmetic-profile and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply; cached conversion and normalization intermediates remain subject to the configured arithmetic profile. Logically const queries may normalize cached descriptions; success shall preserve all operands' mathematical values and ambient dimensions. Borrowed views shall follow 🔗 10. Borrowed congruence and generator views of grid values. Supported failures may propagate; surviving ownership shall permit destruction without a general rollback or subsequent-query guarantee.

    RATIONALE:

    Grids are closed, so closure points have ordinary point membership. A nonzero real scalar image along a ray varies continuously and cannot stay in a discrete congruence class; ray subsumption therefore requires a full continuous line direction.

    INTERFACE:

    Public header: <ppl.hh>; Grid member or related free-function excerpts in Parma_Polyhedra_Library:

    Poly_Gen_Relation relation_with(const Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Cross point/closure-point membership, both orientations of rays and lines, periodic directions lacking continuous freedom, coupled rational coordinates, cold inconsistent grids, free unused coordinates, zero dimensions and argument rejection. Check the same mathematical value after each query.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid, generator and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Congruence_System.cc; tests/Grid/congruences2.cc; tests/Grid/relations1.cc; tests/gridrelationsspec1.cc; tests/gridrelationspublic1.cc; tests/gridrelationsfailure1.cc.

  • PPL-SPEC-001265
    1. Exact directional boundedness of affine expressions on grids UID: PPL-SPEC-001265 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounds_from_above(expr) and bounds_from_below(expr) shall return true exactly when the expression is bounded in the indicated direction over the grid. Empty shall be bounded in both directions. On a nonempty grid, either both queries shall be true and the expression shall have one constant value, or both shall be false and the expression shall be unbounded in both directions.

    For a generator description p + ∑iℤqi + ∑jℝlj and e(x) = a⋅x + b, boundedness shall be equivalent to a⋅qi = 0 and a⋅lj = 0 for every direction, including point differences when the description has more than one generating point. Zero coefficients shall not introduce dependence on unused directions.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    A grid direction is reversible with an integer or real multiplier; a varying affine objective therefore has neither a lower nor an upper bound.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool bounds_from_above(const Linear_Expression& expr) const;
    bool bounds_from_below(const Linear_Expression& expr) const;
    
    VERIFICATION_CRITERIA:

    Independently compute scalar images of literal rational generating points, their differences, parameters and lines. Include empty, latent inconsistency, zero-dimensional universe, constant objectives and objectives orthogonal to nontrivial directions. Vary storage and both description/cache histories.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.

  • PPL-SPEC-001266
    2. Exact rational-grid supremum and attainment UID: PPL-SPEC-001266 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    maximize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded above. On true, n/d shall be its exact supremum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    The only finite affine supremum of a nonempty grid is its constant objective value; it is always attained.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool maximize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& attained) const;
    
    VERIFICATION_CRITERIA:

    Compare the returned fraction and attainment with exact rational scalar-image calculations. Use signed/fractional points, unused varying coordinates, empty and unbounded cases. Check reduced positive denominators, sentinel preservation on false and dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.

  • PPL-SPEC-001267
    3. Exact rational-grid infimum and attainment UID: PPL-SPEC-001267 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    minimize(expr,n,d,attained) shall return true exactly when the grid is nonempty and the expression is bounded below. On true, n/d shall be its exact infimum as a reduced fraction with positive denominator, and attained shall be true. Every grid point shall have that value. Empty or an unbounded objective shall return false and preserve every supplied output. Zero-dimensional universe shall return the expression's constant term over one.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    Reversibility of every grid direction makes a finite infimum the constant objective value, equal to the supremum.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool minimize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& attained) const;
    
    VERIFICATION_CRITERIA:

    Check exact rational infima and attainment using independent scalar images. Include negative constants, fractional points, non-singleton grids with constant objectives and false/error output sentinels.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.

  • PPL-SPEC-001268
    4. Point witnesses for rational-grid maximization UID: PPL-SPEC-001268 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The maximize overload with a Generator output shall obey 🔗 2. Exact rational-grid supremum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned supremum. Its type shall be POINT, not a closure point or a direction. All coordinates, including those absent from the objective, shall satisfy the grid's equalities and periodic restrictions. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness as well as all scalar and attainment outputs.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    A correct objective value alone does not establish membership; the witness must preserve the supporting point and its rational divisor.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool maximize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& attained, Generator& witness) const;
    
    VERIFICATION_CRITERIA:

    Independently check the witness coordinates against literal congruences and recompute its objective. Include rational offsets, nontrivial unused coordinates, zero dimensions, negative constants and preservation of an unrelated ray sentinel on false/error.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.

  • PPL-SPEC-001269
    5. Point witnesses for rational-grid minimization UID: PPL-SPEC-001269 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The minimize overload with a Generator output shall obey 🔗 3. Exact rational-grid infimum and attainment. On true, it shall additionally replace the witness with an ordinary point belonging to the receiver and attaining the returned infimum. Its type shall be POINT, not a closure point or a direction. Every coordinate shall satisfy the grid's equalities and periodic restrictions, including coordinates unused by the objective. Omitted coordinates shall have their ordinary zero-extension meaning. False shall preserve the witness and all scalar and attainment outputs.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    An infimum witness must be a member of the grid, even when the objective ignores coordinates constrained to fractional or periodic values.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool minimize(const Linear_Expression& expr, Coefficient& n,
                  Coefficient& d, bool& attained, Generator& witness) const;
    
    VERIFICATION_CRITERIA:

    Check complete witness membership and objective values independently for both bounded non-singleton grids and singletons. Include zero-dimensional universe and unchanged ray/scalar sentinels after false/error.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc.

  • PPL-SPEC-001270
    6. Exact affine-image frequency and closest value on rational grids UID: PPL-SPEC-001270 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the affine image S = {e(x) ∣ x ∈ G}, frequency(expr,fn,fd,vn,vd) shall return false when S is empty or equals ℝ, preserving all four supplied outputs. Otherwise it shall return true and positive denominators, with both fractions reduced. If S = {c}, fn/fd shall be zero over one and vn/vd shall be c. Otherwise S shall be the coset v + dℤ where d = fn ⁄ fd > 0 is its unique positive period generating all differences and v = vn ⁄ vd ∈ S has minimum absolute value. Either sign shall be permitted when two values tie.

    A line with nonzero homogeneous objective image shall make the frequency undefined. Otherwise the positive period shall be the rational greatest common divisor of the parameter images and generating-point differences; a zero period shall mean the objective is constant. The objective's constant term shall translate the coset without changing its period. Zero-dimensional universe shall report zero frequency and the constant expression value.

    For a bounded coefficient profile, generator scalar products, translated point values, parameter gcds and closest-residue selection shall use exact working integers until both output fractions are reduced. Only the final reduced numerators and denominators shall require coefficient admission. A machine-carrier overflow shall promote the working arithmetic without truncation. Stored grid descriptions remain subject to their profile limits.

    An expression with declared ambient dimension greater than the grid shall throw std::invalid_argument before output replacement, including empty, zero-dimensional and syntactically constant cases. The source grid's set and ambient dimension and the expression's value and dimension shall be preserved. Logically const queries may normalize caches; borrowed descriptor views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

    The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate and output representability. Writable coefficient outputs shall be pairwise distinct and shall not overlap input expression or receiver storage. Allocation and selected numerical failures may propagate; they shall not imply output rollback or a queryable surviving receiver beyond destruction-safe ownership.

    RATIONALE:

    The exact affine image of a rational grid is empty, continuous, a singleton or a rational coset. A closest representative is signed, while the generating period is nonnegative.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Grid.

    bool frequency(const Linear_Expression& expr, Coefficient& fn, Coefficient& fd,
                   Coefficient& vn, Coefficient& vd) const;
    
    VERIFICATION_CRITERIA:

    Compute images from literal generating points, point differences, rational parameters and lines using independent rational gcd arithmetic. Check exact period, coset membership, minimal absolute representative, both tie signs, constant/zero-dimensional cases, undefined continuous images, translations, false/error sentinels and cache/storage independence.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/gridscalarqueryspec1.cc; tests/gridscalarquerypublic1.cc; tests/gridscalarqueryfailure1.cc; tests/Grid/bounds1.cc; tests/Grid/maxmin1.cc; tests/Grid/frequency1.cc; tests/exactboundedworking1.cc; src/Linear_Expression.cc; src/Linear_Expression_defs.hh.

  • PPL-SPEC-001281
    1. Exact rational-grid intersection UID: PPL-SPEC-001281 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    intersection_assign(y) shall replace X by X∩Y exactly. Empty shall be absorbing, universe neutral and self intersection idempotent. The operand shall retain its mathematical value. Unequal ambient dimensions shall throw std::invalid_argument before receiver mutation, including empty operands.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Congruence conjunction computes the meet of rational grids.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void intersection_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Use rational CRT intersections and invertible coordinate transformations, including inconsistent offsets, lines, points, self operands, cache histories and dimension errors.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/intersection1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001282
    2. Least containing rational grid UID: PPL-SPEC-001282 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign(y) shall replace X by the least rational grid containing X∪Y. Empty shall be neutral and self hull idempotent. For nonempty X = p + HX and Y = q + HY, the result shall be p + HX + HY + Z(q − p). It need not equal the finite union. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.

    A self join shall preserve the stored descriptions. If the operands have the same ordered generator rows in current generator systems or the same ordered congruence rows in current congruence systems, the join shall keep the existing caches without appending rows or materializing another system.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Joining supporting points adds an integer displacement rather than a real line.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void upper_bound_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Compute hulls from rational displacement groups and independent generators, including fractional phases, redundant descriptions, self hull, empty and dimension errors. Check stored descriptions before and after self joins and joins with copies without first forcing a normalization.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001283
    3. Conditional exact rational-grid union UID: PPL-SPEC-001283 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign_if_exact(y) shall return true exactly when X∪Y is a rational grid. On true it shall assign that exact union. On false it shall preserve the receiver's mathematical value; its caches may change. Empty and contained operands shall succeed. The operand value shall be preserved. Unequal dimensions shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    A hull is an exact union for containment or a compatible two-coset decomposition, but arbitrary unions require disjunctions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    bool upper_bound_assign_if_exact(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Check containment, adjacent index-two cosets, incompatible direction groups, continuous/point cases, false-result preservation, self operands and dimensions against independent union criteria.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/upperbound1.cc; tests/Grid/upperbound2.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001284
    4. Least-grid abstraction of set difference UID: PPL-SPEC-001284 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    difference_assign(y) shall assign the least rational grid containing X⧵Y. Removing a superset shall yield empty; removing disjoint or empty shall preserve X. When the difference is the other coset of an index-two subgroup, that coset shall be retained exactly. In other cases the least grid may be the whole entry receiver. The operand shall retain its value. Unequal dimensions shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Grid difference must distinguish a single remaining coset from a complement whose grid hull is unchanged.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void difference_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Use exact subgroup-index and phase calculations, index-two complements, partial overlap, continuous and singleton factors, coupled coordinates, empty/self operands and dimension errors. Check exact integer-grid complement cosets, disjoint cosets, equality cuts and singleton factors in different dimensions, both representations and pending or minimized caches. After operand destruction, verify the result, invariants, independent copies and self difference.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/griddifference1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001285
    5. Context-preserving grid simplification UID: PPL-SPEC-001285 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    simplify_using_context_assign(y) shall produce X’ satisfying X’∩Y = X∩Y. A false return shall imply X∩Y = ⌀; true need not prove nonemptiness. Simplification may enlarge the receiver and need not be maximal or preserve it outside the context. The operand's mathematical value shall be preserved unless it is the receiver itself. Unequal dimensions shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Only behavior within the context is observable to context-based simplification clients.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    bool simplify_using_context_assign(const Grid& y);
    
    VERIFICATION_CRITERIA:

    Compare intersections before and after simplification for coupled rational cosets, equality/continuous factors, empty contexts, self context and multiple caches; check false-return soundness and dimensions.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/simplifyusingcontext1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • PPL-SPEC-001286
    6. Coordinate cylindrification UID: PPL-SPEC-001286 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    unconstrain(var) and unconstrain(vars) shall existentially project the selected coordinates and reintroduce them as unconstrained real coordinates at their original indices. They shall preserve ambient dimension and all correlations among unselected coordinates. Empty remains empty; an empty selection is identity. Any selected index outside the ambient dimension shall throw std::invalid_argument before mutation, including empty receivers.

    The initialization, lifetime, synchronization and computational-arithmetic conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is stated, ambient dimension shall be preserved. Resource and numerical exceptions may propagate; surviving ownership shall permit destruction, without an assumed rollback or guarantee that further queries are valid. Receiver-owned views may be invalidated as in 🔗 10. Borrowed congruence and generator views of grid values.

    RATIONALE:

    Forgetting coordinates removes all their restrictions, rather than merely deleting visibly involving rows.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Member declarations of Grid.

    void unconstrain(Variable var);
    
    void unconstrain(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare with independent generator projection plus real coordinate lines, including correlated congruences, all/empty selections, zero dimensions and invalid indices.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid definitions, representations and operations.

    SOURCE:

    src/Grid_defs.hh; src/Grid_inlines.hh; src/Grid_public.cc; src/Grid_nonpublic.cc; tests/Grid/unconstrain1.cc; tests/gridoperationsspec1.cc; tests/gridoperationsfailure1.cc.

  • 5. Grid internal status signed-keyword loading and rejection UID: PPL-SPEC-001611 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Grid internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.

    For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Grid internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.

    The loader shall reset its word to zero before reading the first field. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. Grid internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 3. Compatible rational-grid record loading and failure state.

    RATIONALE:

    The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.

    INTERFACE:

    Internal nested type Grid::Status in Grid_Status_idefs.hh, included through Grid_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.

    bool ascii_load(std::istream& stream);
    // Internal helper, in its defining translation unit or implementation namespace:
    bool get_field(std::istream& stream, const char* keyword, bool& positive);
    
    VERIFICATION_CRITERIA:

    Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and output preservation of the translation-unit-local parser by inspection. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.

    SOURCE:

    src/Grid_defs.hh; src/Grid_Status_idefs.hh; src/Grid_Status_inlines.hh; src/Grid_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.

  • PPL-SPEC-001260
    1. Human-readable rational-grid presentation UID: PPL-SPEC-001260 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    IO_Operators::operator<<(s, grid) shall write false for empty, true for universe, and a readable congruence description otherwise. Nontrivial output shall denote the same set and coordinate identities as the grid, using the installed variable formatter and descriptor output conventions. It shall return s by reference. Representation normalization shall be permitted, preserving set and ambient dimension. This display shall not promise an ascii_load input format or a fixed order of equivalent rows. Stream failure shall follow the stream's configured state/exception behavior. print() shall send the same readable presentation to std::cerr without adding a newline; it shall have the same source and arithmetic prerequisites.

    The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.

    RATIONALE:

    Grid display must distinguish empty, universe and periodic restrictions while allowing normal-form and variable-name changes.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.

    std::ostream& IO_Operators::operator<<(std::ostream& s, const Grid& grid);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check literal empty/universe and nontrivial equality/proper-congruence displays, custom variable names, return-stream identity, cache histories and stream failures.

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.

  • 2. Reloadable rational-grid record export UID: PPL-SPEC-001261 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export a complete record of ambient dimension, distinguished-value/status information, stored congruence and generator systems with their current-description indicators, and dimension-kind data required by the encoded reduced descriptions. The no-argument overload shall write the same record to std::cerr. Export shall preserve the source value, dimension, stored descriptions, status and ownership.

    A compatible complete record shall support the loading contract in 🔗 3. Compatible rational-grid record loading and failure state. The scope shall be the corresponding supported producer/consumer format and representable selected coefficient profile; cross-version compatibility, fixed bytes across equivalent cache histories and compatibility with human-readable presentation shall not be implied. Stream failures and enabled stream exceptions shall propagate through the standard stream mechanism; incomplete output shall not be a complete record.

    The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.

    The internal status contract shall follow 🔗 4. Grid internal status signed-keyword export.

    RATIONALE:

    Text reproduction must include enough state to recover the mathematical grid without requiring prior normalization.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Round-trip literal rational grids in cold, congruence-only, generator-only and dual-description states, including dense/sparse storage, zero dimensions, empty and retained inactive descriptions. Compare repeated dumps without intervening mutation and exercise stderr and failing streams.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.

  • 3. Compatible rational-grid record loading and failure state UID: PPL-SPEC-001262 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_load(s) shall return true on a trusted, compatible complete record produced by 🔗 2. Reloadable rational-grid record export, replacing the receiver's set and ambient dimension. Encoded storage shall be retained for the loaded descriptor systems. Cached normal forms may be invalidated and rebuilt under the current reduction rules; cache reconstruction shall preserve mathematical meaning. Trailing input shall remain available after the complete record.

    Malformed or truncated fields, unsupported ambient dimensions, invalid status/descriptor structures, incompatible current-description dimensions and nonempty-state generator descriptions lacking a point shall return false, with and without enabled assertions. For a successful load of a trusted record written by 🔗 2. Reloadable rational-grid record export, the receiver shall meet 🔗 5. Rational-grid representation invariant query. Its current descriptions shall define the same set, and an empty grid shall retain empty congruence and generator views. Structural checks can accept altered records whose descriptions contradict one another or disagree with the status. Further operations require a valid representation.

    Stream, allocation and selected numerical exceptions may propagate. After false or an exception, the receiver shall retain ownership sufficient for destruction; rollback and subsequent queries shall not be assumed.

    The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.

    Storage for serialized dimension kinds shall grow with the accepted entries rather than the declared dimension alone.

    The internal status contract shall follow 🔗 5. Grid internal status signed-keyword loading and rejection.

    RATIONALE:

    Loaded status and caches influence later query shortcuts. Successful parsing must not admit mutually contradictory descriptions or a supporting-point-free nonempty representation.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.

    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Use independent literal round trips and every truncated prefix. Corrupt dimensions, distinguished states, active-description flags, generator topology and point presence. Combine individually valid but different current grids in both inclusion directions, including a proper sublattice with the same affine hull. Check false returns in optimized and assertion-enabled loader builds; exercise throwing streams and allocation failures against the destruction-only guarantee.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.

  • PPL-SPEC-001263
    4. Owned rational-grid memory accounting UID: PPL-SPEC-001263 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall report the owned external storage of the congruence system, generator system and dimension-kind vector. Descriptor system counts shall follow their component contracts; the vector count shall include its retained allocated capacity rather than only its live entries. Inactive or logically empty cached data shall remain counted while owned. Other objects, runtime scratch pools and allocator bookkeeping shall be excluded.

    total_memory_in_bytes() shall equal sizeof(Grid) plus that external count. The sums shall fit memory_size_type and use the selected build's sizes. Both queries shall preserve set, ambient dimension, caches, capacity, ownership and lifetimes; the observed storage shall remain unchanged during the query.

    The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.

    RATIONALE:

    Logical state changes do not release every retained allocation. Capacity owned by the dimension-kind cache contributes to the object footprint.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Observe the actual allocation backing the dimension-kind vector and compare the reported count with that allocation plus independently specified descriptor-system counts. Include zero/nonzero dimensions, empty, normalization, dimension shrinkage, reuse and reserved spare capacity. Check total minus external equals sizeof(Grid), source preservation and absence of query allocations.

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.

  • 5. Rational-grid representation invariant query UID: PPL-SPEC-001264 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK(false) shall return true for an admitted grid whose distinguished state, ambient dimension, status and current descriptions satisfy the representation invariants. OK(true) shall additionally require the grid to be nonempty. The ambient dimension shall be supported and every current system shall be structurally valid and have that dimension.

    An empty grid shall have empty generator views and a contradictory congruence view. Zero-dimensional universe shall have no defining congruences and one zero-dimensional point. A nonempty-state current generator system shall contain a point. If both descriptions are current, they shall define the same set, including affine restrictions and discrete periods. A congruence-only description may be inconsistent without already having the empty flag; in that case OK(false) shall be true and OK(true) false.

    The query shall preserve the receiver and may use independent temporary normalization to check consistency. It may allocate and propagate supported resource or numerical failures. On an invalid state it may emit diagnostic text; diagnostic wording shall not be a stable interface. The query shall operate only on live, destructible owned structures, not arbitrary invalid addresses or corrupted object representations.

    The initialization, selected arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including temporary calculations. Source descriptions and output streams shall remain live for their respective uses. Resource and numerical failures shall not imply a stronger surviving-object guarantee than the operation states.

    The internal status contract shall follow 🔗 3. Grid internal status consistency predicate.

    RATIONALE:

    Public invariant checks must recognize states that invalidate the nonempty and dual-description shortcuts used by other operations.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library and signatures are Grid members unless indicated.

    bool OK(bool check_not_empty = false) const;
    
    VERIFICATION_CRITERIA:

    Check all valid construction and cache histories against literal grids, including latent emptiness. Use the existing focused test access for owned structural counterexamples, checking missing points, incompatible current descriptions in each direction, and distinguished-state or ambient-dimension mismatch. Verify source preservation and both check_not_empty values.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and double-description definitions (PDF page indices 6–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridpersistencespec1.cc; tests/gridpersistencepublic1.cc; tests/gridpersistencefailure1.cc; tests/Grid/asciidumpload1.cc through asciidumpload6.cc; tests/Grid/loadstatus1.cc.

  • PPL-SPEC-001241
    1. Rational-grid values, coefficient profile and valid use UID: PPL-SPEC-001241 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid shall represent the solutions in Rn of a finite system of rational linear congruences. For integer coefficients after common denominator scaling, a row a⋅x ≡ mb shall mean a⋅x − b ∈ mZ when m > 0, and a⋅x = b when m = 0. Empty and universe shall be distinct in every supported ambient dimension. Coordinates absent from all restrictions shall remain free. The coordinate carrier shall remain real, including when all stored coefficients are integral.

    A nonempty rational generator description shall denote p + ∑iziiq + ∑jtjℓj, with rational supporting point p, rational parameter directions qi, rational line directions ℓj, zi ∈ Z and tj ∈ R. Additional supporting points shall contribute their displacements from p as integer parameter directions. Generator insertion order shall not affect this mathematical meaning.

    coefficient_type shall be the configured Coefficient. Objects and supplied descriptors shall be live and valid. Coordinate identities and reserved dimension indications shall follow 🔗 1. Coordinate type and reserved dimension index. Library and descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall apply. Every coefficient operation, including intermediate calculations, shall meet the selected arithmetic profile's range and resource prerequisites. Exact guarantees shall apply when these preconditions hold; bounded coefficient storage shall not silently turn the grid into an integer-coordinate domain.

    When eliminating an equality from a proper congruence, an unrepresentable inhomogeneous difference shall be replaced by an equivalent exact residue modulo the positive row modulus. Range requirements shall continue to apply to modulus scaling and homogeneous coefficients; real coordinates shall not permit reducing homogeneous coefficients modulo that modulus.

    Diagonal LCMs used in either description-conversion direction shall be exact even when the working value exceeds the configured coefficient range. Each quotient stored in a destination row shall still fit that range. Cancelling a positive factor shared by proper congruence rows shall include their moduli and stored integrality row, while preserving zero-modulus equalities.

    Elimination of a nonzero column between two proper congruences, or between points and parameters, shall store its known zero and positive GCD without requiring cancelling products in that column to fit the coefficient range. Assertion checks of the corresponding Bezout identity shall not add a bounded intermediate-product prerequisite. Non-pivot two-product linear combinations shall be evaluated exactly before applying stored-result range requirements, including when native carrier products overflow. An unrepresentable proper-congruence constant shall use an exact equivalent residue modulo its positive row modulus. Homogeneous coefficients and generator coordinates shall still fit their selected storage; homogeneous terms shall not be reduced modulo a congruence modulus.

    Independent objects shall own independent values. Mutation, destruction and operations that may update caches shall be externally synchronized against other uses of the same object. Failed construction shall release the resources acquired by the incomplete object. Failure of an operation on an existing object shall preserve ownership sufficient for safe destruction; rollback or permission for further queries shall require a stronger operation-specific guarantee.

    RATIONALE:

    Congruences describe periodic restrictions over real coordinates. Integer parameters, real line directions and ordinary affine equalities have different meanings. The cited grid-domain paper supplies these definitions.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    class Grid {
    public:
      typedef Coefficient coefficient_type;
    };
    
    VERIFICATION_CRITERIA:

    Use independent literal congruences and rational point/parameter/line models. Include fractional offsets, continuous directions, discrete periodic sets, multiple supporting points, redundant generators, order permutations, free coordinates and empty/universe in zero dimensions. Inspect configured coefficient admission, initialization and failure ownership. Exercise equality elimination with positive and negative constant differences outside the coefficient range, equal pivot coefficients, and constant products exceeding the native accumulator. Exercise conversion with nonprimitive proper rows, working diagonal LCMs outside the coefficient range, and representable stored quotients in both directions. Eliminate coprime columns with products outside the coefficient range, and verify Bezout identities with large opposing products, in both descriptions and representations. Compare against literal rational generators. Exercise cancellation in non-pivot homogeneous terms, wide modular constant combinations and genuinely unrepresentable stored results. Include large Bezout products exceeding the native carrier.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, Definition 1 and The Generator Representation (PDF page indices 6–7, zero-based).

    SOURCE:

    tests/recyclingconstructors1.cc; src/Grid_defs.hh; src/Grid_nonpublic.cc; src/Grid_simplify.cc; src/Grid_conversion.cc; src/Linear_Expression_Impl_defs.hh; tests/Grid/congruences1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001242
    2. Dimensioned empty and universe grid construction UID: PPL-SPEC-001242 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid(n,kind) shall construct the selected EMPTY or UNIVERSE value in ambient dimension n. Default construction shall produce the zero-dimensional universe. Zero-dimensional universe shall contain the unique empty tuple; zero-dimensional empty shall contain none.

    max_space_dimension() shall report the structural limit for Grid in the selected configuration. Requests above that limit, including the reserved dimension indication, shall throw std::length_error before allocating storage for the requested dimension. The limit shall not promise that actual resources suffice for every smaller request. Failed construction shall release resources acquired by the incomplete object.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Distinguished grid values require an ambient dimension even when there are no points. Structural dimension validation precedes extent-dependent storage.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    explicit Grid(dimension_type n=0, Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check defaults, both distinguished values in zero and positive dimensions, structural bounds and oversized/reserved requests for both kinds. Inject allocation failures into admitted construction and check incomplete-object cleanup.

    SOURCE:

    src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001243
    3. Owned grid copying, assignment and destruction UID: PPL-SPEC-001243 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction shall produce an independent grid with the source's represented set and ambient dimension. The three declared complexity values shall not alter ordinary copying. Assignment shall replace the receiver's represented set and dimension with the source's, return a reference to the receiver, and support different dimensions and self-assignment. Mutation or destruction of either independent value shall not change the other value.

    Destruction shall release owned resources exactly once. Failed copy construction shall release resources acquired by the incomplete object. Failed assignment shall preserve ownership needed for safe destruction; rollback to the receiver's entry value shall not be required.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Value semantics must be independent of whether congruences, generators or both cached descriptions are current.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    Grid(const Grid& source, Complexity_Class complexity=ANY_COMPLEXITY);
    Grid& operator=(const Grid& source);
    ~Grid();
    
    VERIFICATION_CRITERIA:

    Cross empty, universe, fractional singleton, periodic and continuous grids with different dimensions, self-assignment and all complexity values. Copy before and after each representation is minimized, mutate each object independently, destroy sources, and inject allocation failures without assuming failed-assignment rollback.

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001244
    4. Whole grid value exchange UID: PPL-SPEC-001244 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    x.m_swap(y) and swap(x,y) shall exchange the represented grids, ambient dimensions and owned representation state. They shall support self exchange and grids of different dimensions. Subsequent independent mutation shall affect only its selected object. Exchange shall not require grid normalization, coefficient arithmetic or new allocation.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Exchanging ownership can preserve whole values without rebuilding either dual description.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    void m_swap(Grid& other);
    void swap(Grid& left, Grid& right);
    
    VERIFICATION_CRITERIA:

    Cross different dimensions, distinguished values and cold/minimized cache histories. Check both forms and self exchange, independent mutation and the absence of allocations while exchange runs.

    SOURCE:

    src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001245
    5. Exact grid construction from congruence systems UID: PPL-SPEC-001245 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a valid Congruence_System shall inherit its ambient dimension and denote exactly the simultaneous solutions of its rows. Equalities, proper congruences, redundant rows, tautologies and inconsistent systems shall retain their congruence meanings. A system without restrictions shall describe universe in its ambient dimension. Zero-dimensional systems shall give universe or empty according to their constant conditions.

    can_recycle_congruence_systems() shall return true.

    The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. Both forms shall reject a source dimension above max_space_dimension() with std::length_error before dimension-dependent storage allocation.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Congruence input is an exact defining description, including periodicity that cannot be recovered from an affine hull alone.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    static bool can_recycle_congruence_systems();
    explicit Grid(const Congruence_System& source);
    Grid(Congruence_System&& source);
    
    VERIFICATION_CRITERIA:

    Evaluate literal congruences independently on rational witnesses. Cross copied and recycled systems, inconsistent nontrivial pairs, zero-dimensional constants, fractional residue classes, redundant rows and ambient free coordinates. Check source preservation for copying and destruction-only cleanup for recycling, including injected failures.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, Definition 1 (PDF page index 6, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001246
    6. Exact grid construction from generator systems UID: PPL-SPEC-001246 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a valid Grid_Generator_System shall inherit its ambient dimension and denote its point, integer-parameter and real-line combinations in 🔗 1. Rational-grid values, coefficient profile and valid use. An empty system shall construct an empty grid. A nonempty system without a supporting point shall throw std::invalid_argument. A supporting point in zero dimensions shall construct zero-dimensional universe. Generator insertion order, redundant points and equivalent simultaneous rescaling of generator numerators and divisors shall not change the represented set.

    The const-reference form shall preserve its source. The non-const rvalue form may consume source storage; after successful or exceptional return the source shall require no operation other than destruction. A source dimension above max_space_dimension() shall throw std::length_error before allocating dimension-dependent grid storage.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    A supporting point fixes the affine offset; parameters and lines supply different displacement sets. A collection of directions without a supporting point is not an admitted nonempty constructor input.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    explicit Grid(const Grid_Generator_System& source);
    Grid(Grid_Generator_System&& source);
    
    VERIFICATION_CRITERIA:

    Check literal rational point/parameter/line models, repeated and different supporting points, unequal divisors, both constructor forms, free directions, empty and zero-dimensional inputs. Reject line-only and parameter-only systems. Permute generator order and check the value before normalization as well as after each minimized view.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, The Generator Representation and Definition 3 (PDF page index 7, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_nonpublic.cc; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001247
    7. Grid construction from equality constraint systems UID: PPL-SPEC-001247 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For positive ambient dimension, construction from a Constraint_System shall accept equality rows and denote exactly their common affine subspace. An empty system shall describe universe in its ambient dimension. An inequality row shall throw std::invalid_argument in positive dimension.

    In zero dimensions, constant conditions shall instead be evaluated directly: a system whose rows are all satisfied shall construct universe, and any inconsistent row shall construct empty, including an inconsistent constant inequality. Both forms shall inherit the source's ambient dimension.

    can_recycle_constraint_systems() shall return true.

    The const-reference form shall preserve its source. The non-const rvalue form shall permit source consumption; after successful or exceptional return the source shall require no operation other than destruction. Oversized source dimensions shall throw std::length_error before dimension-dependent grid storage.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Affine equalities are grid congruences with zero modulus. Positive-dimensional inequality systems require a separate conversion policy, while zero-dimensional constraints are constant truth conditions.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    static bool can_recycle_constraint_systems();
    explicit Grid(const Constraint_System& source);
    Grid(Constraint_System&& source);
    
    VERIFICATION_CRITERIA:

    Check copied and recycled equality systems against independent affine solutions, inconsistent equalities and free coordinates. Check rejection of positive-dimensional strict/nonstrict inequalities. Enumerate constant zero-dimensional truth/falsity conditions, and inject constructor failures while respecting recycled-source destruction-only use. Check coefficient storage transfer for an equality in the destination representation, and conversion of NNC equality rows without retaining the hidden epsilon coordinate as a grid dimension.

    SOURCE:

    src/Grid_public.cc; src/Grid_inlines.hh; tests/gridvaluesspec1.cc; tests/gridvaluesfailure1.cc.

  • PPL-SPEC-001248
    8. Ambient and affine grid dimensions UID: PPL-SPEC-001248 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall report the ambient dimension without changing the represented grid. affine_dimension() shall return zero for empty and zero-dimensional grids; otherwise it shall return the dimension of the least affine subspace containing the grid. For a nonempty generator description this shall equal the rational rank of its line directions, parameter directions and supporting-point differences.

    The answer shall be independent of the current dual representation, redundant input rows, generator order and prior normalization.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    A periodic full-rank grid is affinely full-dimensional even though it is discrete. Ambient dimension remains meaningful for empty sets.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Use independent exact rational elimination on literal direction vectors and point differences. Include singleton, lower-dimensional periodic and continuous values, full-rank discrete grids, empty/universe, redundant systems, both input descriptions and alternate normalization histories.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, generator representation and minimal forms (PDF page indices 7–8, zero-based).

    SOURCE:

    src/Grid_inlines.hh; src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.

  • PPL-SPEC-001249
    9. Exact foundational grid classification UID: PPL-SPEC-001249 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The following queries shall make exact decisions on admitted grid values:

    • is_empty() shall return true exactly for the empty represented set.
    • is_universe() shall return true exactly for all of the ambient real coordinate space.
    • is_bounded() shall return true exactly for empty or singleton grids.
    • is_discrete() shall return true exactly when every represented point is isolated; empty shall be discrete. In a nonempty rational generator description this is equivalent to the absence of nonzero line directions.
    • is_topologically_closed() shall return true for every rational grid.
    • contains_integer_point() shall return true exactly when the grid intersects Zn; zero-dimensional universe shall contain the integer empty tuple and zero-dimensional empty shall contain none.
    • constrains(v) shall return true exactly when independently varying coordinate v can leave the grid. Empty shall constrain every in-range coordinate. An out-of-range coordinate shall throw std::invalid_argument before an empty/universe shortcut.

    Answers shall not depend on generator insertion order or whether the current congruence/generator descriptions have been normalized. A periodic restriction shall not be mistaken for an interval bound or a continuous free coordinate.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    RATIONALE:

    Nonzero parameter directions give unbounded integer displacements; nonzero line directions give arbitrarily small real displacements. A finite intersection of linear congruence solution sets is closed. These are different properties from whether an integer-coordinate point exists.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    bool is_empty() const;
    bool is_universe() const;
    bool is_bounded() const;
    bool is_discrete() const;
    bool is_topologically_closed() const;
    bool contains_integer_point() const;
    bool constrains(Variable coordinate) const;
    
    VERIFICATION_CRITERIA:

    Use independently described rational singletons, periodic lattices, continuous lines and affine subspaces, fractional offsets excluding all integer points, inconsistent systems and all zero-dimensional cases. Cross constructor forms, redundant descriptions, all generator permutations and normalization orders. Check coordinate independence using literal line spans and validate out-of-range arguments even for empty and universe.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, grid and generator definitions (PDF page indices 6–7, zero-based).

    SOURCE:

    src/Grid_public.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc.

  • PPL-SPEC-001250
    10. Borrowed congruence and generator views of grid values UID: PPL-SPEC-001250 STATUS: APPROVED COMPONENT: GRIDS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed congruence and grid-generator accessors shall require an lvalue receiver, with corresponding const && overloads deleted. Returned references shall not extend the receiver's lifetime. Constraint extraction returns an independent value and shall remain available on temporary grids.

    congruences() and grid_generators() shall return valid descriptions of the receiver's exact represented grid in the same ambient dimension. If the required description is stale, it shall be computed without changing the grid's mathematical meaning.

    minimized_congruences() and minimized_grid_generators() shall additionally supply the corresponding minimized triangular representations. Required administrative integrality rows may remain in congruence storage. These interfaces shall not promise a unique physical row order or byte-identical records across equivalent descriptions.

    Returned references shall borrow receiver-owned storage. Their use shall require the receiver to remain live and no intervening operation capable of replacing or normalizing the borrowed representation. Iterators and row references shall obey the same condition. An independently copied returned system shall remain independent of later receiver mutation or destruction. Empty and zero-dimensional values shall retain their exact distinguished meanings in both descriptions.

    The lifetime, initialization, arithmetic and synchronization prerequisites in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply. A logically const operation may update cached representations while preserving the represented grid and ambient dimension. Supported arithmetic and allocation failures may propagate through their declared channels; surviving ownership shall permit safe destruction, without a general rollback guarantee.

    Before aligning proper-congruence moduli in a bounded profile, simplification shall remove each row's redundant sign, constant-residue and common-factor scaling. A tautological constant row shall retain a nonzero integrality representative. Alignment shall preserve the same rational satisfying set.

    For a bounded discrete generator system, elimination may temporarily cancel the common positive factor of every coupled point/parameter coordinate and divisor, restoring that physical scale after reduction. The resulting strong form shall retain its previous storage scale. Lines shall not be rescaled by this operation, and integer-parameter periods shall not change. Centered coordinate reduction shall also accept a positive pivot at the profile's largest admissible coefficient without overflowing the half-pivot calculation. For a least signed pivot input, Bezout computation shall own its working magnitudes and admit only the completed positive gcd and signed coefficients; an unrepresentable input magnitude alone shall not cause arithmetic failure.

    During triangular conversion, the selected coordinate's scaling and exact division shall be fused; an unrepresentable product immediately cancelled by that division shall not be stored. Other coupled point/parameter or proper- congruence rows shall receive the required common scale. Independent line or equality scales shall remain independent. Complete column differences shall be evaluated exactly. If an inverse-column working value exceeds the coefficient range, conversion shall replay the complete triangular inverse using independently owned unbounded integers. Later exact divisions shall precede admission of destination coefficients. Final unrepresentable entries shall still raise the configured range exception, including in native coefficient profiles. Replay shall preserve the source rows, their dimension kinds and the distinct coupled or independent row scales.

    RATIONALE:

    Clients need exact dual views while ownership and normalization invalidate physical observations independently of mathematical value.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Grid and related free functions in Parma_Polyhedra_Library:

    const Congruence_System& congruences() const &;
    const Congruence_System& minimized_congruences() const &;
    const Grid_Generator_System& grid_generators() const &;
    const Grid_Generator_System& minimized_grid_generators() const &;
    
    VERIFICATION_CRITERIA:

    Exercise both conversion directions with the literal lattice x = 1 ⁄ 60 + z ⁄ 3, y = 1 ⁄ 2 + 2w ⁄ 5, c =  − 1 ⁄ 3 for independent integers z, w. Check its equivalent congruences, positive and negative periods, rejected supporting points, both representations and row orders, and unchanged independent input systems.

    Compare exported congruences with literal rational membership conditions and generated points/directions. Alternate the four accessors after each input form and verify dimensions, value preservation and admissible minimal forms. Reject borrowing from temporary grids while admitting independent constraint extraction from them. Copy borrowed systems, mutate or destroy the owner, and check the copied systems independently. Exercise empty, redundant and inconsistent inputs.

    BIBLIOGRAPHY:

    BagnaraDHMZ07 | Section 3, Definitions 2–3, Propositions 1–3 and Double Description (PDF page indices 7–8, zero-based).

    SOURCE:

    src/Grid_public.cc; src/Grid_conversion.cc; src/Grid_simplify.cc; tests/Grid/gridboundedconversion1.cc; tests/exactboundedworking1.cc; tests/gridvaluesspec1.cc; tests/gridvaluespublic1.cc; tests/gridvaluesfailure1.cc.

  • 1. Initialization owners and automatic C++ initialization UID: PPL-SPEC-000031 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Translation-unit ownership keeps initialized facilities available during static and automatic object lifetimes. First/last-owner and thread-exit conditions make the ownership boundary and its synchronization explicit.

    INTERFACE:

    Public header: <ppl.hh>. Initialization-owner declarations:

    namespace Parma_Polyhedra_Library {
      class Init {
      public:
        Init();
        ~Init();
      };
    }
    

    The header-selection macro is PPL_NO_AUTOMATIC_INITIALIZATION; it shall be selected consistently across participating C++ client translation units before their first public-header inclusion.

    VERIFICATION_CRITERIA:

    Compile and run a public-header client with initialized objects in more than one translation unit, including their static construction and destruction. Exercise nested explicit owners and confirm that destroying an inner owner preserves live models, formatter selection and rounding state. Exercise repeated whole-library lifetimes after all dependent objects have been destroyed. Inspect first/last-owner transitions and configuration-dependent ownership. Inject supported construction failures and check acquired-resource cleanup, formatter, precision and rounding restoration, and absence of an owner from a failed construction. Check restoration of a preceding signal action and preservation of caller-owned timer state and pending notifications on failure. Review guard noncopying and serialized first/last-owner prerequisites. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/initializer.hh: per-translation-unit automatic owner. src/Init_defs.hh and src/Init.cc: initialization-owner lifetime. tests/initialization1.cc: nested owners and repeated explicit lifetimes. tests/initialization2.cc and tests/initialization2_aux.cc: automatic initialization across translation units. tests/initialization3.cc: first-owner failure, resource cleanup and retry. tests/initialization4.cc: native rounding-initialization failure fixture. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • PPL-SPEC-000032
    2. Explicit whole-library initialization and finalization UID: PPL-SPEC-000032 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    An explicit initialization mode supports applications and bindings that own the library lifetime themselves. Idempotent entry and a single release avoid interpreting repeated requests as additional independent ownership.

    INTERFACE:

    Public whole-library entry points:

    namespace Parma_Polyhedra_Library {
      void initialize();
      void finalize();
    }
    

    Their definitions are selected by the public-header initialization macro as described in 🔗 1. Initialization owners and automatic C++ initialization.

    VERIFICATION_CRITERIA:

    Build a client with automatic initialization disabled and no automatically initializing helper translation unit. Check repeated initialization while a custom formatter, precision and live numerical models are present; confirm that one finalization ends that owned lifetime. Repeat balanced lifetimes and check fresh default state. Inject a first-owner allocation failure and confirm that a later initialization establishes usable state. In a separate automatically initialized client, call all four entry points while models and a custom formatter are live and confirm that they do not alter the active lifetime.

    SOURCE:

    src/initializer.hh: public entry points and macro-dependent no-ops. src/Init.cc: explicit-owner acquisition and release. tests/initialization1.cc: explicit initialization and repeated lifetimes. tests/initialization2.cc: automatic-mode no-op entry points. tests/initialization3.cc: explicit acquisition failure and successful retry. tests/initialization4.cc: failure after native rounding initialization.

  • PPL-SPEC-000033
    3. Thread initialization, default state and finalization UID: PPL-SPEC-000033 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Constants, formatter callbacks, irrational precision and saved rounding state must have an explicit thread lifetime. Idempotent entry preserves active state; reentry after cleanup deliberately establishes a new default state.

    INTERFACE:

    Public thread-lifetime declarations:

    namespace Parma_Polyhedra_Library {
      class Thread_Init {
      public:
        Thread_Init();
        ~Thread_Init();
      };
      void thread_initialize();
      void thread_finalize();
    }
    

    The entry-point functions act only when automatic initialization was disabled before public-header inclusion. Thread_Init guards also support worker entry in automatically initialized C++ clients.

    VERIFICATION_CRITERIA:

    Check usable numerical constants and representative expressions and domains within explicitly initialized thread lifetimes. Set a custom formatter and precision, repeat thread entry, and confirm that active state is unchanged. Finalize after destroying dependent objects, reenter, and confirm the default formatter and precision. In thread-safe configurations run two initialized workers while preserving distinct caller and worker state; check rounding restoration on worker exit and caller-state isolation. Exercise both direct guards and the manual entry protocol in their supported contexts. Review partial-construction cleanup with injected failures and object cleanup before thread and whole-library finalization. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Init_defs.hh and src/Init.cc: Thread_Init and initialized state. src/initializer.hh: manual thread entry and exit. src/thread_safe.hh: configuration-dependent thread-local storage. tests/initialization1.cc: manual thread entry, reentry and worker isolation. tests/initialization2.cc: direct worker guard within an automatic lifetime. tests/initialization3.cc: manual and direct thread-entry failure and retry. tests/initialization4.cc: failure after native thread rounding initialization. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • 2. Cutoff value storage and explicit borrowing criteria UID: PPL-SPEC-000682 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Use_By_Ref<Use_Slow_Copy, T>::value shall equal Slow_Copy<T>::value; By_Value shall select false and By_Ref true. For owned storage, Val_Or_Ref<T, Criteria> shall contain a distinct T object, use T as both Arg_Type and Return_Type, and default construct that value with T(). Construction, assignment and set shall copy the supplied value using T's ordinary operations. get and the conversion operator shall return its current value by value.

    For borrowed storage, Arg_Type shall be T& and Return_Type const T&. Default construction shall leave the holder unbound; no read or value conversion shall be permitted before binding. Construction, assignment and set from a mutable lvalue shall bind its identity; the overload with a const T& and Boolean argument shall bind that same const object's identity. The Boolean argument's value shall not change storage or request a snapshot. get and conversion shall expose the live bound object as a const reference, reflecting subsequent valid donor changes.

    Implicit copying/assignment of a holder shall preserve its owned value or borrowed identity according to the selected criterion. Assignment from an argument shall return the holder. Borrowed donors shall outlive every use of their values; copying an unbound holder shall not bind it. All referenced objects shall remain live and access shall be synchronized against mutation. The selected T operations, representability and resource prerequisites shall hold; their exceptions shall propagate without a universal rollback promise. Storage alone shall require no library, coefficient-constant or FPU initialization beyond any prerequisites imposed by the selected T.

    RATIONALE:

    A cutoff snapshot and a borrowed view have different lifetime and mutation semantics even when their initial mathematical values are equal.

    INTERFACE:

    Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.

    struct Use_Slow_Copy;
    struct By_Value;
    struct By_Ref;
    template <typename Criteria, typename T> struct Use_By_Ref;
    template <typename T, typename Criteria = Use_Slow_Copy, typename Enable = void>
    class Val_Or_Ref;
    // Owned specialization: Arg_Type = T, Return_Type = T.
    Val_Or_Ref();
    explicit Val_Or_Ref(T value, bool ignored = false);
    Val_Or_Ref& operator=(T value);
    void set(T value, bool ignored = false);
    T get() const;
    operator T() const;
    // Borrowed specialization: Arg_Type = T&, Return_Type = const T&.
    Val_Or_Ref();
    explicit Val_Or_Ref(T& value);
    Val_Or_Ref(const T& value, bool acknowledge_borrow);
    Val_Or_Ref& operator=(T& value);
    void set(T& value);
    void set(const T& value, bool acknowledge_borrow);
    const T& get() const;
    operator const T&() const;
    
    VERIFICATION_CRITERIA:

    Check criteria and type aliases, default owned value and unbound rebinding, owned copy independence/lifetime, mutable and const identity, both Boolean acknowledgments and subsequent donor mutation.

    SOURCE:

    src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.

  • 4. Interval constraints retain relation and cutoff ownership UID: PPL-SPEC-000684 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    I_Constraint<T, Criteria, extended> shall combine a relation code with the cutoff holder selected in 🔗 2. Cutoff value storage and explicit borrowing criteria. Default construction shall set rel() to V_LGE; its owned cutoff shall have T()'s value and its borrowed cutoff shall remain unbound until set. value() shall follow the holder's value/reference return type and lifetime rules; an unbound borrowed default shall admit relation inspection but not cutoff access.

    Construction from a relation and cutoff shall retain that relation and store or borrow the cutoff according to the criterion. set shall replace the relation and update/rebind the cutoff by those same rules. The Boolean acknowledgment shall not force a copy, regardless of its value. Admitted converting overloads shall apply ordinary T construction/assignment under the source type's valid conversion and representability conditions. extended shall not change the ownership or relation/value access behavior specified here.

    Implicit copies and assignments shall retain the relation and the selected owned value or borrowed identity. Owned copies shall survive donor scope and mutate independently; borrowed copies shall retain their donor's lifetime obligation. Self-assignment shall preserve the pair. Underlying value exceptions shall propagate; a failed set may already have replaced the relation and shall not promise atomic replacement of the pair. The type shall derive from I_Constraint_Common and I_Constraint_Base for the supported interval-constraint dispatch. Other prerequisites shall follow 🔗 2. Cutoff value storage and explicit borrowing criteria and 🔗 3. Interval-constraint relation adapter preserves supported relation codes.

    RATIONALE:

    A relation/cutoff pair must retain its selected ownership through copying and rebinding, and failed value assignment must not imply an atomic pair update.

    INTERFACE:

    Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.

    class I_Constraint_Base;
    template <typename Derived> class I_Constraint_Common;
    template <typename T, typename Criteria = Use_Slow_Copy, bool extended = false>
    class I_Constraint;
    explicit I_Constraint();
    I_Constraint(I_Constraint_Rel relation, Arg_Type value);
    I_Constraint(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow);
    template <typename U> I_Constraint(I_Constraint_Rel relation, const U& value);
    void set(I_Constraint_Rel relation, Arg_Type value);
    void set(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow);
    template <typename U> void set(I_Constraint_Rel relation, const U& value);
    Return_Type value() const;
    Result rel() const;
    
    VERIFICATION_CRITERIA:

    Check defaults, owned/borrowed pairs, conversions, both acknowledgment values, implicit/self assignment, donor identity and scope; inject an observable value-assignment failure and assess the retained relation/value state.

    SOURCE:

    src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.

  • PPL-SPEC-000685
    5. Interval-constraint factories preserve explicit storage selection UID: PPL-SPEC-000685 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The two-argument i_constraint(relation, value) overloads shall return I_Constraint<T, Use_Slow_Copy, false> using the default storage trait. For a borrowed cutoff, the unacknowledged overload shall require a mutable lvalue; borrowing a const cutoff shall require the explicit Boolean argument. For an owned cutoff, mutable or const input shall be copied.

    Overloads with an explicit criterion object shall return I_Constraint<T, Criteria, false> and use that criterion, overriding the slow-copy trait. By_Value shall therefore retain an independent snapshot even for an expensive type, and By_Ref shall retain live reference identity even for a cheap type. The Boolean overload shall acknowledge const borrowing without changing ownership when true or false. A criterion object shall select a type; its own lifetime shall not become the cutoff lifetime. The retained relation and cutoff, exception behavior and valid-use conditions shall follow 🔗 4. Interval constraints retain relation and cutoff ownership.

    RATIONALE:

    Explicit storage criteria must propagate to the returned constraint type rather than silently reverting to the default ownership trait.

    INTERFACE:

    Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.

    template <typename T>
    I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value);
    template <typename T>
    I_Constraint<T> i_constraint(I_Constraint_Rel relation, T& value);
    template <typename T>
    I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value, bool acknowledge);
    template <typename T, typename Criteria>
    I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation,
                                         const T& value, const Criteria& criterion);
    template <typename T, typename Criteria>
    I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation,
                                         T& value, const Criteria& criterion);
    template <typename T, typename Criteria>
    I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation,
                                         const T& value, bool acknowledge,
                                         const Criteria& criterion);
    
    VERIFICATION_CRITERIA:

    Check type deduction and retained relations/values for cheap native and expensive rational cutoffs, explicit criteria overriding both defaults, mutable/const donors and acknowledged borrowing; retain interval-integration tests with their interval owner suite.

    SOURCE:

    src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.

  • 1. Pointer-adapter types and borrowed storage UID: PPL-SPEC-000631 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Implementation::Ptr_Iterator<P> shall adapt a stored object of type P without copying, destroying or taking ownership of the elements to which it refers. Its five iterator type aliases shall equal the corresponding std::iterator_traits<P> aliases. Each selected operation shall require its underlying P operations and conversions to be well-formed and to satisfy their own range, lifetime and arithmetic preconditions. The underlying object shall manage any resources of P itself; underlying exceptions shall propagate without being converted into a successful iterator result.

    For raw object pointers, the adapter shall borrow live elements of a live array; a one-past position shall be admitted where the corresponding pointer operation admits it. Element access shall require an occupied position. Pointer subtraction and range ordering shall require positions within the same array, with representable differences. The adapter shall impose no library numerical-initialization prerequisite.

    RATIONALE:

    Internal numerical rows need ordinary pointer-range views without transferring element ownership.

    INTERFACE:

    Internal source header: Ptr_Iterator_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to Ptr_Iterator<P>; dependent aliases are its declared iterator types.

    template <typename P> class Ptr_Iterator;
    typedef typename std::iterator_traits<P>::iterator_category iterator_category;
    typedef typename std::iterator_traits<P>::value_type value_type;
    typedef typename std::iterator_traits<P>::difference_type difference_type;
    typedef typename std::iterator_traits<P>::pointer pointer;
    typedef typename std::iterator_traits<P>::reference reference;
    
    VERIFICATION_CRITERIA:

    Inspect inherited aliases; use noncopyable elements to check exact borrowed identities and a throwing pointer-object fixture to check exception propagation and completed-subobject cleanup.

    SOURCE:

    src/Ptr_Iterator_defs.hh; src/Ptr_Iterator_inlines.hh; tests/iteratoradaptersspec1.cc.

  • PPL-SPEC-000632
    2. Pointer-position construction, conversion and assignment UID: PPL-SPEC-000632 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall value-initialize the stored P object. For a raw pointer this shall yield a null position, usable for copying, assignment and equality without element access or pointer arithmetic. Explicit binding shall copy the supplied underlying pointer value. Ordinary copying and assignment shall retain the same borrowed position. Converting construction from Ptr_Iterator<Q> shall initialize the target pointer from the source pointer when that initialization is supported; raw mutable-to-const conversion shall retain element identity.

    Destroying the adapter shall destroy its pointer object, leaving borrowed elements untouched. Failed construction shall release completed pointer subobjects. A failure of an underlying pointer operation shall retain that operation's own permitted state, without a stronger general rollback guarantee. These operations shall follow 🔗 1. Pointer-adapter types and borrowed storage.

    RATIONALE:

    Position copying and const conversion must preserve the referent rather than copy the referenced numerical value.

    INTERFACE:

    Internal source header: Ptr_Iterator_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation. Member signatures apply to Ptr_Iterator<P>; dependent aliases are its declared iterator types.

    Ptr_Iterator();
    explicit Ptr_Iterator(const P& q);
    template <typename Q> Ptr_Iterator(const Ptr_Iterator<Q>& q);
    // Ordinary copy/move/assignment and destruction are implicitly declared.
    
    VERIFICATION_CRITERIA:

    Check null equality, explicit binding, independent copies, assignment, const conversion, wrapper moves and destruction; inject underlying pointer construction/copy/assignment exceptions without copying noncopyable elements.

    SOURCE:

    src/Ptr_Iterator_defs.hh; src/Ptr_Iterator_inlines.hh; tests/iteratoradaptersspec1.cc.

  • 1. Affine value, numerical prerequisites and shared zero UID: PPL-SPEC-000071 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A live Linear_Expression of space dimension d, with homogeneous coefficients ai and inhomogeneous term b, shall denote the function E(x) = b + ∑d − 1i = 0aixi on rational valuations. The constant term shall not occupy a coordinate. Trailing zero coefficients shall remain part of the declared ambient dimension.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization. The caller shall synchronize access to an object while another operation modifies it. The valid representations shall be DENSE and SPARSE; default_representation shall be SPARSE. zero() shall return a borrowed, constant expression of dimension zero and value zero. The returned object shall remain alive until its owning initialized thread is finalized.

    The computed arithmetic guarantees of 🔗 7. Affine addition, subtraction and negation, 🔗 8. Integral scalar multiplication and coefficient-wise division, 🔗 9. Explicit scaled accumulation, combination and elimination and 🔗 10. Coefficient normalization and sign normalization shall require every evaluated coefficient arithmetic step and result to be representable in the selected coefficient profile. Checked arithmetic may report overflow; unchecked completion shall not prove that this precondition held. Allocation failures may propagate. Failed construction shall release resources owned by the incomplete expression. Distinct, unchanged operands shall remain valid after a reported failure. Other modified objects shall be destructible; no universal rollback is promised.

    RATIONALE:

    An expression has an affine value independently of its storage or any constraint later formed from it. Shared numerical prerequisites delimit arithmetic guarantees without weakening that value meaning.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Linear_Expression;
    enum Representation { DENSE, SPARSE };
    static constexpr Representation Linear_Expression::default_representation = SPARSE;
    static const Linear_Expression& Linear_Expression::zero();
    
    VERIFICATION_CRITERIA:

    Evaluate explicit coefficient vectors independently over rational valuations, including dimension zero and trailing zeros. Check the shared zero during a balanced initialized lifetime and verify both supported representations. Inspect construction cleanup and failure paths without inferring unpromised rollback.

    SOURCE:

    src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionfailure1.cc.

  • 2. Zero, constant, variable and dimensioned construction UID: PPL-SPEC-000072 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expression_Adapter_Source<T> shall have the truth value of std::is_convertible_v<const T&, const Expression_Adapter_Base&>. The four adapter-copy constructors shall use this predicate as their type constraint, including implicit base-reference conversions and excluding inaccessible or ambiguous base conversions. Their optional trailing void* parameter shall retain its default null value and shall be ignored.

    Construction with only an optional representation shall produce dimension zero and value zero. Construction from a coefficient shall produce dimension zero and that constant value. Construction from Variable v shall produce dimension v.space_dimension(), coefficient one at v.id(), and zero elsewhere, including the constant term.

    A variable whose dimension exceeds max_space_dimension() shall cause std::length_error. A requested representation shall be used. The ordinary copy constructor shall copy all coefficients and the declared dimension and retain the source representation. The overload accepting a representation shall use that representation. The overloads accepting space_dim shall copy the retained coefficients, discard coefficients of removed trailing coordinates when shrinking, and insert zero coefficients when extending. Their caller shall supply space_dim <= max_space_dimension(). All copies shall own independent values.

    The four corresponding copy forms shall also accept a supported, live expression adapter, including the borrowed expression views exposed by constraints and congruences. They shall copy the adapter's visible coefficients, constant and declared dimension. Copying a view shall not introduce a descriptor's hidden representation columns. Omitting the representation shall retain the adapter's representation; an explicit representation shall select that representation. Dimensioned copies shall apply the same truncation and zero-extension rules as ordinary copies.

    RATIONALE:

    Constructor dimensions are observable and must not be inferred from the last nonzero term. Explicit dimensioned copying is a semantic truncation when removed coefficients are nonzero. Named constraints expose source admission while the implementation argument alias preserves the established constructor linkage.

    INTERFACE:
    template <typename T>
    concept Expression_Adapter_Source =
      std::is_convertible_v<const T&, const Expression_Adapter_Base&>;
    
    explicit Linear_Expression(Representation r = default_representation);
    explicit Linear_Expression(Coefficient_traits::const_reference n,
                              Representation r = default_representation);
    Linear_Expression(Variable v, Representation r = default_representation);
    Linear_Expression(const Linear_Expression& e);
    Linear_Expression(const Linear_Expression& e, Representation r);
    Linear_Expression(const Linear_Expression& e, dimension_type space_dim);
    Linear_Expression(const Linear_Expression& e, dimension_type space_dim,
                      Representation r);
    

    For a supported expression adapter v, representation r and valid space dimension d, these effective constructor calls shall be admitted:

    Linear_Expression a(v);
    Linear_Expression b(v, r);
    Linear_Expression c(v, d);
    Linear_Expression e(v, d, r);
    
    VERIFICATION_CRITERIA:

    Check both representations, constants of each sign, variables including a nonleading coordinate, zero-sized and trailing-zero copies, shrink/extend operations, independent later mutations and variable-limit rejection. Evaluate copies over rational points against a separately transformed coefficient vector. Check all four adapter-copy forms with constraint and congruence expression views, including hidden strictness, shrinking, extending and later independent mutations.

    SOURCE:

    src/Expression_Adapter_defs.hh; tests/commonhelpersspec1.cc; src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionfailure1.cc; tests/linearexpressionbranches1.cc.

  • PPL-SPEC-000073
    3. Independent assignment, destruction and swapping UID: PPL-SPEC-000073 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy assignment shall replace the target coefficients, dimension and representation with those of the source at entry, return a reference to the target, and preserve a distinct source. Self-assignment shall preserve the value, dimension and representation. Construction or assignment from an rvalue shall admit the copy forms and retain the source value; no distinct move operation is required. A separately owned copy shall remain usable after mutation or destruction of the original.

    m_swap and the PPL swap overload shall exchange complete values, dimensions and representations; swapping an object with itself shall preserve it. Destruction shall release the object's owned representation. Assignment shall leave the target unchanged if creating its replacement copy fails.

    RATIONALE:

    Owning value semantics separate expression lifetime from borrowed coefficient references. Swapping the owned representation must also exchange its representation choice.

    INTERFACE:
    Linear_Expression& Linear_Expression::operator=(const Linear_Expression& e);
    Linear_Expression::~Linear_Expression();
    void Linear_Expression::m_swap(Linear_Expression& y);
    void swap(Linear_Expression& x, Linear_Expression& y);
    
    VERIFICATION_CRITERIA:

    Check return identity, self-assignment, rvalue copy behavior, cross-representation assignment and both swap forms. Destroy originals while retaining copies. Inject failure while copying a replacement and check unchanged target and source.

    SOURCE:

    src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionfailure1.cc.

  • PPL-SPEC-000074
    4. Value-preserving representation selection and conversion UID: PPL-SPEC-000074 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    representation() shall report the expression's current storage choice. For r equal to DENSE or SPARSE, successful set_representation(r) shall select r while preserving every coefficient, the constant term and declared space dimension. Repeating the current choice shall preserve the expression. Explicit-representation copy construction shall make the same coefficient-preservation guarantee for a distinct result. If creating a converted representation fails, set_representation shall leave the original unchanged.

    RATIONALE:

    Dense and sparse storage encode the same affine function; changing storage is not coefficient normalization.

    INTERFACE:
    Representation Linear_Expression::representation() const;
    void Linear_Expression::set_representation(Representation r);
    Linear_Expression(const Linear_Expression& e, Representation r);
    
    VERIFICATION_CRITERIA:

    Convert both directions and repeat the existing representation, including zero, constants, sparse gaps and unused trailing coordinates. Compare coefficient vectors and independent rational evaluations. Inject conversion allocation failures and check unchanged state.

    SOURCE:

    src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionfailure1.cc.

  • 13. Reloadable ASCII export and replacement loading UID: PPL-SPEC-000083 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall write a reloadable representation consisting of the word size, the number of coefficient slots d + 1, and then the constant term followed by all homogeneous coefficients in increasing variable order. Whitespace shall separate tokens. ascii_dump() shall write the same representation to std::cerr. Export shall preserve the expression.

    Given a compatible complete representation with representable coefficient values and a positive slot count not exceeding the supported storage limit, ascii_load(s) shall return true and replace the expression with the encoded coefficients and dimension, retaining its destination representation. The slot count shall include the constant slot, so zero shall be rejected with false before resizing, preserving the destination expression. A missing or incorrect size token, missing count, malformed coefficient or truncated coefficient sequence shall yield false. Trailing input after the indicated coefficient count shall remain available to the caller. The contract shall not promise a stable cross-version wire format.

    Other reported load failures may change the destination. It shall remain destructible and may be replaced by a subsequent complete valid load; no rollback is promised. Allocation and configured numerical failures may propagate through their documented exception channels.

    RATIONALE:

    A reloadable expression carries its ambient dimension and constant term, while storage choice belongs to the destination. An empty coefficient sequence cannot encode an affine expression.

    INTERFACE:
    void Linear_Expression::ascii_dump(std::ostream& s) const;
    void Linear_Expression::ascii_dump() const;
    bool Linear_Expression::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip constants, gaps, trailing zeros and modified expressions through all dense/sparse producer and consumer pairs. Compare literal coefficient vectors and rational evaluations. Check exact token order, trailing-input preservation, malformed headers/counts/coefficients and truncation. Verify that zero-slot rejection preserves coefficients, dimension and representation. After other failures exercise destruction and complete replacement, without assuming unchanged state.

    SOURCE:

    src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc.

  • 1. Interval-linear-form meaning and numerical prerequisites UID: PPL-SPEC-000921 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a selected interval type C, a live Linear_Form<C> of dimension d, with coefficient intervals Ai and constant interval B, shall represent the interval-affine expression B + ∑d − 1i = 0Aixi. At each real valuation x, it shall denote the set of sums obtained by choosing each coefficient and the constant independently from their intervals. Repeated use of an interval object shall not establish correlations between those choices. The constant shall occupy no variable coordinate. The declared dimension shall retain trailing zero coefficients.

    C shall provide the interval construction, copying, predicates and arithmetic required by the selected operation. Stored values shall satisfy its initialization, canonical-value and metadata prerequisites. Each successful arithmetic operation shall retain the interval operations' enclosure guarantees and selected numerical-profile conditions; no common optimality or finite-bound guarantee shall be inferred. Native floating-point arithmetic shall require the selected supported boundary format and its rounding-state prerequisites. Storage access shall add no numerical rounding requirement. Shared-facility initialization shall be required where the selected coefficient operation, expression conversion or output formatter requires it; unrelated storage shall add no initialization owner.

    Callers shall synchronize access against overlapping modification and obey shared-temporary restrictions in the selected configuration. Allocation and coefficient exceptions may propagate. Failed construction shall release resources owned by the incomplete form. Unchanged operands shall remain unchanged; modified destinations shall remain destructible, with no universal rollback guarantee.

    RATIONALE:

    Independent interval choices distinguish interval algebra from symbolic cancellation and make the numerical assumptions of every operation explicit.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> class Linear_Form;
    
    VERIFICATION_CRITERIA:

    Derive affine values with independent rational coefficient/valuation choices; check zero dimensions, trailing zeros, uncertain signs, native enclosures and source preservation. Inspect partial-construction cleanup and selected scalar/runtime prerequisites.

    BIBLIOGRAPHY:

    Mine04 | Whole work (background on floating-point expressions modeled by interval linear forms).

    SOURCE:

    src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; tests/linearformspec1.cc; tests/linearformstorage1.cc; tests/linearformscalar1.cc; tests/linearformvariables1.cc; tests/linearformoutput1.cc; tests/linearformlegacy1.cc; tests/linearformpublic1.cc; tests/inactiveboundcodec.hh.

  • PPL-SPEC-000925
    5. Independent copying, assignment and owned lifetimes UID: PPL-SPEC-000925 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction and copy assignment shall preserve the dimension and all coefficient intervals, including their admitted endpoint metadata. Copies shall own independent coefficient storage. Subsequent mutation or destruction of one form shall not change the other. Assignment shall return the destination reference, including same-object assignment, which shall preserve its value and dimension. Destruction shall release the form's owned vector and constructed coefficient objects. Copying shall not promise to preserve allocation capacity or introduce a move interface beyond the declared C++ operations.

    RATIONALE:

    Independent owned values allow snapshots to survive further interval algebra and owner destruction.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    Linear_Form(const Linear_Form& source);
    Linear_Form& operator=(const Linear_Form& source);
    ~Linear_Form();
    
    VERIFICATION_CRITERIA:

    Check copy/assignment/self-assignment and independent mutation across distinct dimensions, large rational endpoints, source destruction and open/empty intervals; inspect cleanup through failed vector/coefficient construction.

    SOURCE:

    src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; tests/linearformspec1.cc; tests/linearformstorage1.cc; tests/linearformscalar1.cc; tests/linearformvariables1.cc; tests/linearformoutput1.cc; tests/linearformlegacy1.cc; tests/linearformpublic1.cc; tests/inactiveboundcodec.hh.

  • PPL-SPEC-000937
    17. Reloadable interval-coefficient ASCII representation UID: PPL-SPEC-000937 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump() shall write the dimension followed by the constant and homogeneous intervals in coordinate order, each in C's reloadable ascii_dump() format. Successful loading shall replace the complete form with that declared dimension and those intervals, including endpoint metadata and inactive payloads required by C's format. A dump shall round-trip under a compatible coefficient representation. The overload without a stream argument shall write that same frame on standard error. Dumping shall preserve the source and may propagate stream exceptions.

    ascii_load() shall return false when no valid dimension can be read, when it exceeds max_space_dimension(), or when a required interval record cannot be loaded. Success shall return true after consuming the required record; trailing input shall remain available. A failed load shall leave the form destructible and reusable by complete assignment/loading, with no unchanged-state guarantee. Earlier display-based coefficient encodings shall not be accepted as equivalent machine records.

    RATIONALE:

    Interval metadata must survive machine serialization independently of human-readable formatting.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    void ascii_dump(std::ostream& stream) const;
    void ascii_dump() const;
    bool ascii_load(std::istream& stream);
    
    VERIFICATION_CRITERIA:

    Check literal and round-trip records for zero/high dimensions and scalar families, open/empty/unbounded intervals, stream extent, malformed headers/coefficient truncation and successful reuse after failure.

    SOURCE:

    src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/globals_defs.hh; tests/linearformspec1.cc; tests/linearformstorage1.cc; tests/linearformscalar1.cc; tests/linearformvariables1.cc; tests/linearformoutput1.cc; tests/linearformlegacy1.cc; tests/linearformpublic1.cc; tests/inactiveboundcodec.hh.

  • PPL-SPEC-000940
    20. Oracle-based interval enclosure and explicit refusal UID: PPL-SPEC-000940 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live form with supported initialized interval coefficients, intervalize() shall ask the oracle for intervals of its declared variable coordinates. When the oracle supplies valid enclosures for every requested coordinate, a true result shall set result to an interval enclosing all entry-form affine values at independently admitted coefficient and coordinate choices. A dimension-zero form shall need no coordinate query and shall return its constant interval. The form shall remain unchanged.

    If a required oracle query returns false, the method shall return false and shall not claim that result establishes a complete enclosure; no prior result-value preservation shall be promised. Exceptions from the oracle or coefficient operations may propagate. The oracle shall supply initialized intervals and remain valid for the call; overlapping mutation shall follow the operation's numerical/runtime prerequisites. Rational coefficient intervals shall not require native floating-point availability.

    RATIONALE:

    Interval evaluation composes independent coefficient/coordinate products and propagates refusal rather than reporting a partial sum as complete.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename Target>
    bool intervalize(const FP_Oracle<Target, C>& oracle, C& result) const;
    
    VERIFICATION_CRITERIA:

    Enumerate independent rational corner values for signed uncertain coefficients and coordinate boxes, including inexact native bounds, zero dimension, zero coefficients and failures at first/middle/last queried coordinates followed by recovery. Include exact rational oracle evaluation with native floating-point support disabled.

    BIBLIOGRAPHY:

    Mine04 | Whole work (background on floating-point expressions modeled by interval linear forms).

    SOURCE:

    src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; tests/linearformspec1.cc; tests/linearformstorage1.cc; tests/linearformscalar1.cc; tests/linearformvariables1.cc; tests/linearformoutput1.cc; tests/linearformlegacy1.cc; tests/linearformpublic1.cc; tests/inactiveboundcodec.hh.

  • PPL-SPEC-000425
    1. Forward elimination and augmented equality/line rank UID: PPL-SPEC-000425 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Constraint and polyhedral-generator instantiations shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping. The separate line-only Grid_Generator case below shall use its stated prerequisites.

    For constraint or polyhedral-generator rows, gauss(k) shall require no pending rows and exactly k equality/line rows grouped at the beginning. It shall return the rational rank of their stored coefficient vectors, including ordinary constant and applicable epsilon columns. It shall retain the equality/line row span, choose pivots from higher columns toward lower columns, place an independent triangular basis in the returned-rank prefix and reduce the remaining equality/line rows to zero vectors. Row count and non-equality/non-line rows shall be retained. Constant-only independent equalities, including an inconsistent equality, shall participate in the rank.

    Dependent zero line vectors may remain as internal intermediate rows until removed; their owned coefficient layouts and common container metadata shall remain valid. Internal metadata queries, numeric-field inspection, removal cleanup and back substitution with zero rows outside its basis shall admit these intermediates. They shall not be exposed as public line descriptors. Common dimension, topology, storage and no-pending state shall be retained, and the sorted certificate shall be cleared whenever its truth is no longer established. All coefficient calculations shall satisfy 🔗 1. Internal geometric-row sequences and valid bookkeeping. For a Linear_System<Grid_Generator> containing only grid lines, with no pending rows, the same rational direction-span and rank/basis guarantees shall hold. Grid points and integer-lattice parameters are outside this extension: these operations do not promise to preserve a parameter lattice. A zero residual line is an admitted internal intermediate and contributes no direction; it shall be removed or skipped before constructing public grid generators. The common stored dimensions and representation shall remain valid.

    RATIONALE:

    Forward elimination computes a basis of coefficient rows independently of whether affine equalities have a solution.

    INTERFACE:
    dimension_type Linear_System<Row>::gauss(dimension_type k);
    
    VERIFICATION_CRITERIA:

    Compare rank and coefficient-row spans with independent exact rational elimination using the opposite pivot direction. Check basis rank, descending pivot columns, zero dependent tails, unchanged other rows and constant-pivot cases. Check wide empty prefixes, early complete bases, full-column scans, dependent tails and unchanged nonbasis rows, processing state and sorted certificates.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; tests/linearsystemalgorithmsspec1.cc; tests/linearsystem1.cc; tests/Grid/linearelimination1.cc.

  • PPL-SPEC-000426
    2. Back substitution through a triangular nonconstant basis UID: PPL-SPEC-000426 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Constraint and polyhedral-generator instantiations shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping. The separate line-only Grid_Generator case below shall use its stated prerequisites.

    back_substitute(k) shall require no pending rows and a leading independent triangular equality/line basis of k rows, with nonzero pivots outside the ordinary constant column. Leading basis rows shall be line/equality rows, with pivots in strictly descending column order. Each pivot shall be eliminated from the other basis rows and from the remaining rows by exact linear combination, preserving the basis row span. Combining an inequality, ray or point with a basis row shall use positive scaling of that non-basis row.

    For constraints this shall preserve the conjunction with the equality basis; for generators it shall preserve the generated combinations modulo the line span. Residual zero direction rows may remain as redundant internal rows. Zero direction rows shall require internal removal cleanup before public descriptor use. They shall remain admitted for numeric-field inspection and container metadata queries under 🔗 1. Internal geometric-row sequences and valid bookkeeping. Shape, topology, storage, row count and no-pending state shall be retained; certificates shall remain truthful. Numerical prerequisites shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping. For a Linear_System<Grid_Generator> containing only grid lines, with no pending rows, the same rational direction-span and rank/basis guarantees shall hold. Grid points and integer-lattice parameters are outside this extension: these operations do not promise to preserve a parameter lattice. A zero residual line is an admitted internal intermediate and contributes no direction; it shall be removed or skipped before constructing public grid generators. The common stored dimensions and representation shall remain valid.

    RATIONALE:

    A nonconstant triangular pivot permits substitution without negating an inequality or changing a one-sided generator combination.

    INTERFACE:
    void Linear_System<Row>::back_substitute(dimension_type k);
    
    VERIFICATION_CRITERIA:

    Check exact basis row-span preservation and independent rational constraint satisfaction, including inequalities and strict inequalities. For generators compare the line subspace and point/ray quotient coordinates, including negative pivots and zero residual directions.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; tests/linearsystemalgorithmsspec1.cc; tests/linearsystem1.cc; tests/Grid/linearelimination1.cc.

  • PPL-SPEC-000427
    3. Simplification of equality and line subsystems UID: PPL-SPEC-000427 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Row shall be Constraint or Generator. Valid use shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping.

    With no pending rows, simplify() shall establish a leading independent basis of the meaningful nonzero line/equality coefficient rows and back-substitute that basis into the remaining rows. It may remove dependent rows or retain them as redundant zero coefficient rows. The result shall preserve constraint conjunction or polyhedral-generator combinations modulo the line span. An inconsistent equality subsystem shall remain inconsistent rather than being treated as a consistent affine space. The nonzero basis rank shall be retained independently of the stored line/equality row count.

    It shall retain public dimension, topology, storage and no-pending state. Other rows need not be minimized for all geometric redundancy. Residual zero equality rows may remain as tautologies; zero direction rows shall require row-validity cleanup before public descriptor use. Internal numeric-field inspection, metadata queries and removal cleanup shall admit these intermediate rows. Sorted-prefix certificates shall be truthful. Numerical and resource prerequisites shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping.

    RATIONALE:

    Partial simplification establishes the meaningful basis while permitting redundant zero storage rows and separate public direction cleanup.

    INTERFACE:
    void Linear_System<Row>::simplify();
    
    VERIFICATION_CRITERIA:

    Compare exact ranks and before/after conjunctions using independent rational valuations; compare generator line spans and quotient combinations. Check dependent equalities/lines, mixed row kinds, all-equality inputs, inconsistent equations and repeated simplification.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; tests/linearsystemalgorithmsspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000428
    4. Sorting rows together with their saturation records UID: PPL-SPEC-000428 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Row shall be Constraint or Generator. Valid use shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping.

    sort_and_remove_with_sat(sat) shall require a valid bit matrix with one row for each processed system row, in matching order. It shall sort and deduplicate that processed prefix by the same row predicates as 🔗 19. Sorting processed prefixes or single-status row windows, moving each retained bit row with its corresponding geometric row. On duplicate elimination it shall retain one original paired record; callers shall require equivalent saturation records for duplicate geometric rows when that equivalence is needed by the consuming algorithm.

    The matrix column count shall be retained and its resulting row count shall equal the new processed boundary. Pending rows shall remain pending with their multiset preserved, although their order may change. System dimensions, topology and storage shall be retained and the processed prefix certified sorted. Zero/one processed row shall be admitted.

    RATIONALE:

    A row permutation must preserve the association with the incidence information consumed by later numerical algorithms.

    INTERFACE:
    void Linear_System<Row>::sort_and_remove_with_sat(Bit_Matrix& sat);
    
    VERIFICATION_CRITERIA:

    Associate independent label-derived bit sets with rows, then check retained pairs through sorting/deduplication, empty/one-row prefixes and pending suffixes. Verify exact prefix/matrix dimensions and unchanged saturation columns.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; tests/linearsystemalgorithmsspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000429
    5. Adding processed rows for new coordinate axes UID: PPL-SPEC-000429 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Row shall be Constraint or Generator. Valid use shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping.

    For a positive admitted n, add_universe_rows_and_space_dimensions(n) shall append n zero-extended public coordinates to old rows and introduce n leading processed line/equality rows spanning exactly the new coordinate axes. Each new row shall have one positive unit coefficient at a distinct new axis, with all other public and ordinary constant coefficients zero. No new row shall add a supporting included point or a nonzero epsilon term.

    Old rows shall retain their order, values at old coordinates and pending status. Row count, dimension and processed boundary shall each increase by n; topology and storage shall be retained and hidden epsilon fields shall remain hidden at the new layout location. Empty initial row collections shall be admitted. Certificates shall remain truthful. For constraints the new equalities fix the new coordinates to zero; for generators the new lines supply arbitrary real displacement in them.

    RATIONALE:

    The same new-axis row construction supplies equations or line directions according to its row type.

    INTERFACE:
    void Linear_System<Row>::add_universe_rows_and_space_dimensions(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check new-axis unit vectors as an independent multiset, preserved old rows/pending status and relocated epsilon fields in both topologies. Include one/multiple added axes, empty initial collections and existing processed/pending rows.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; tests/linearsystemalgorithmsspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-001649
    6. Sparse equality and line pivot selection UID: PPL-SPEC-001649 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    gauss_sparse(k) shall require sparse representation, a positive leading line/equality count k and the valid no-pending grouping required by 🔗 1. Forward elimination and augmented equality/line rank. It shall return the augmented rational rank and establish the same ordered coefficient rows and common metadata as descending column elimination under that contract. Among remaining rows it shall choose the greatest nonzero column and the first row containing that column. Constant-only equality pivots shall participate; an all-zero remainder shall end elimination. A line's divisor column shall remain zero.

    The equality/line row span, row count, topology, dimension, storage and nonbasis rows shall be preserved. The sorted certificate shall be cleared when rows are swapped or combined. Valid sparse expression storage shall satisfy 🔗 7. Backend row export, serialization, diagnostics and accounting; its stored entries shall be nonzero. Numerical and lifetime prerequisites shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping.

    RATIONALE:

    The greatest last-nonzero index of the remaining rows identifies the same pivot as a descending column scan while skipping columns that are all zero.

    INTERFACE:

    Internal source header: Linear_System_defs.hh; namespace Parma_Polyhedra_Library. The private member belongs to Linear_System<Row> for Row equal to Constraint or Generator.

    dimension_type gauss_sparse(dimension_type k);
    
    VERIFICATION_CRITERIA:

    Compare exact ordered rows with dense elimination and rank and spans with an independent rational oracle. Include tied tails, row swaps, sparse gaps, constant-only pivots, zero residuals, closed and NNC systems, and unchanged nonbasis rows, pending state and sorted certificates.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_templates.hh; tests/linearsystemalgorithmsspec1.cc.

  • 1. Internal geometric-row sequences and valid bookkeeping UID: PPL-SPEC-000401 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A Linear_System<Row> shall own an ordered finite sequence of geometric rows with common public space dimension, topology and storage representation. A boundary index p, with 0 ≤ p ≤ n, shall divide its n rows into a processed prefix [0, p) and pending suffix [p, n). A true sorted certificate shall require that processed prefix to be nondecreasing under compare(Row,Row). A false certificate shall make no assertion about actual ordering. Duplicate rows shall be permitted.

    No conjunction, convex hull or grid-span meaning shall be added by this container; the public descriptor-system contracts shall supply those meanings. Calls shall require live rows with admitted coefficient values, kinds and layouts, valid container metadata and nonoverflowing dimensions/counts. Direct mutation through rows shall require restoring common metadata and applicable prefix ordering before a call requiring a valid system. Operations need not require already strong-normalized rows unless their individual contract says so. Stored rows shall otherwise meet their row-type validity conditions. Elimination contracts may explicitly admit live internal zero-direction intermediate rows for numeric-field inspection, metadata queries and prescribed cleanup; this shall not admit those rows as public geometric descriptors.

    Initialization, representability of all evaluated coefficient steps and synchronization shall follow 🔗 1. Internal coefficient-row values and valid use. Failed construction shall release resources owned by its incomplete system. Recoverable failures may propagate; distinct unchanged sources shall survive and modified targets shall remain destructible without universal rollback or valid-bookkeeping guarantees.

    RATIONALE:

    The internal row container separates algorithm bookkeeping from the mathematical interpretation supplied by each public system.

    INTERFACE:

    Internal source header: Linear_System_defs.hh. Names belong to Parma_Polyhedra_Library. Member declarations below apply to supported Constraint, Generator and Grid_Generator row capabilities.

    template <typename Row> class Linear_System;
    Swapping_Vector<Row> Linear_System<Row>::rows;
    
    VERIFICATION_CRITERIA:

    Compare explicit row sequences and processed/pending partitions in all supported row/storage contexts. Inspect common metadata, mutation preconditions and resource failure states.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000402
    2. Empty system construction with explicit topology and dimension UID: PPL-SPEC-000402 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall create a system with no rows or pending rows, true sorted certificate and the supplied topology/representation. Its dimension shall be zero unless explicitly supplied. Both topologies shall be supported for constraints and polyhedral generators; grid generators shall require NECESSARILY_CLOSED. Empty systems shall retain admitted nonzero dimensions without manufacturing a point, constraint or line.

    RATIONALE:

    An empty internal sequence still needs defined coordinate and representation metadata.

    INTERFACE:
    Linear_System<Row>::Linear_System(Topology topology, Representation r);
    Linear_System<Row>::Linear_System(Topology topology,
      dimension_type space_dim, Representation r);
    
    VERIFICATION_CRITERIA:

    Check empty/default-dimension and explicit-dimension construction for each admitted topology and storage, including nonzero empty extent.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000403
    3. Owning copies with explicit pending-row policy UID: PPL-SPEC-000403 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Every copy shall preserve row sequence, row values, dimension and topology, with independent storage. Ordinary copies shall make all copied rows processed; if any source row was pending they shall clear the sorted certificate, otherwise retain it. With_Pending copies shall preserve the pending boundary and sorted certificate. Explicit-storage copies shall use the supplied representation; other copies shall retain source representation. Explicit-storage copies shall construct converted rows directly, without constructing disposable default row backends. The source shall be preserved through successful copying and remain intact if construction fails. Copies shall survive source mutation/destruction.

    RATIONALE:

    Pending state is a deliberate copy policy rather than an accidental consequence of row-vector copying.

    INTERFACE:
    struct Linear_System<Row>::With_Pending {};
    Linear_System<Row>::Linear_System(const Linear_System<Row>& y);
    Linear_System<Row>::Linear_System(const Linear_System<Row>& y, Representation r);
    Linear_System<Row>::Linear_System(const Linear_System<Row>& y, With_Pending);
    Linear_System<Row>::Linear_System(const Linear_System<Row>& y,
      Representation r, With_Pending);
    
    VERIFICATION_CRITERIA:

    Check all four copy forms with empty, processed-only and mixed systems; compare exact boundaries/certificates, cross-storage ownership and source independence.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/systemconversionspec1.cc.

  • PPL-SPEC-000404
    4. Assignment, swaps and lifecycle of linear-system owners UID: PPL-SPEC-000404 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Ordinary assignment shall use the ordinary-copy pending policy, return its target and admit self-assignment. assign_with_pending shall preserve all pending metadata and admit self-assignment. Both shall preserve distinct sources and replace the target only after their replacement copy succeeds. Swaps shall exchange row owners and all dimension, topology, representation, pending and sorted metadata, including self-swap. Destruction shall release owned storage. Rvalue forms selecting these copy operations shall follow their copy/pending policy and preserve a distinct source.

    RATIONALE:

    An assignment must select a clear pending policy while exchanging complete metadata with the new owner.

    INTERFACE:
    Linear_System<Row>& Linear_System<Row>::operator=(const Linear_System<Row>& y);
    void Linear_System<Row>::assign_with_pending(const Linear_System<Row>& y);
    void Linear_System<Row>::m_swap(Linear_System<Row>& y);
    template <typename Row> void swap(Linear_System<Row>& x, Linear_System<Row>& y);
    Linear_System<Row>::~Linear_System(); // Implicitly declared.
    
    VERIFICATION_CRITERIA:

    Check ordinary/full/self/chained/rvalue assignments and swaps across differing dimensions, topologies, representations and pending boundaries; inject replacement-copy allocation failure.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000405
    5. Row representation conversion UID: PPL-SPEC-000405 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Representation queries shall report the common row storage choice. Successful conversion shall set the requested dense/sparse representation for every retained row and system metadata, while preserving row values/order, space dimension, topology, pending boundary and sorted certificate. Conversion of an empty system shall still update its representation. Failure shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping, without promising universal conversion rollback.

    RATIONALE:

    Container metadata and every row must agree on the selected representation.

    INTERFACE:
    Representation Linear_System<Row>::representation() const;
    void Linear_System<Row>::set_representation(Representation r);
    
    VERIFICATION_CRITERIA:

    Check all row types through both conversion directions, with pending rows and empty nonzero-dimensional systems; compare literal row fields and bookkeeping.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • 9. Inserting a processed row with dimension alignment UID: PPL-SPEC-000409 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Processed insertion shall require matching row/system topology and no target pending rows. It shall append the row entry value, align all rows to the maximum input dimension by zero extension and retain target representation. Copy insertion shall preserve the source, including a borrowed target row captured before reallocation. Recycled insertion shall require a source not borrowed from the target and leave it destructible, without a retained-value promise. Every resulting row shall be processed. If the certificate was false it shall remain false; if true it shall remain true exactly when the new final adjacent pair is nondecreasing, or the resulting size is at most one. Duplicates shall be retained.

    RATIONALE:

    Appending a processed row can preserve a sorted prefix only when its boundary comparison succeeds.

    INTERFACE:
    void Linear_System<Row>::insert(const Row& row);
    void Linear_System<Row>::insert(Row& row, Recycle_Input);
    
    VERIFICATION_CRITERIA:

    Check copied/borrowed/recycled inputs, dimension extension in both directions, duplicate retention, source independence and sorted/unsorted appends.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000410
    10. Appending pending rows without certifying their order UID: PPL-SPEC-000410 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending insertion shall require matching topology and append the source entry value to the pending suffix. It shall preserve the existing boundary, processed prefix and sorted certificate, align dimensions and retain target storage as in 🔗 9. Inserting a processed row with dimension alignment. Copy insertion shall capture borrowed target inputs before mutation; recycled input shall be independent of target storage and remain destructible. The appended row need not be sorted with other pending rows. An empty processed prefix shall be admitted.

    RATIONALE:

    A pending suffix records work still to be handled without weakening the established prefix certificate.

    INTERFACE:
    void Linear_System<Row>::insert_pending(const Row& row);
    void Linear_System<Row>::insert_pending(Row& row, Recycle_Input);
    
    VERIFICATION_CRITERIA:

    Check all-pending and mixed systems, out-of-order suffixes, borrowed copies, recycled inputs and row/system dimension alignment.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000411
    11. Copying and recycling whole system row sequences UID: PPL-SPEC-000411 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending whole-system insertion shall require equal public dimensions even for an empty source. Processed insertion shall require equal dimensions when source rows are present; transferred rows shall have matching topology. Copies shall preserve their source and admit self-copy insertion by capturing its entry sequence. Recycled sources shall be distinct from the target and, when transferred, clear to an empty dimension-zero system retaining source topology/representation. Transferred rows shall retain their entry order and use target storage. For participating descriptor rows, the insert_pending_consume and insert_consume entry points shall prepare capacity and representation conversions before destructive transfers. They shall require a nonempty source, equal dimensions and matching topology. Prepared transfers shall reuse owned expression backends without constructing default row backends. An empty pending source shall still be cleared; an empty processed source shall retain the existing no-op behavior.

    Processed insertion shall require no target pending rows and make all added source rows processed. It shall preserve a true certificate only when the source is certified without pending rows and the concatenation is ordered. An empty source shall leave the target unchanged. Pending insertion shall append every source row as pending and preserve the target prefix/boundary and certificate. These operations shall not apply geometric conjunction or hull operations beyond combining their internal row collections.

    RATIONALE:

    Whole-container insertion has distinct ownership and pending policies that must not be inferred from the source flags.

    INTERFACE:
    void Linear_System<Row>::insert(const Linear_System<Row>& y);
    void Linear_System<Row>::insert(Linear_System<Row>& y, Recycle_Input);
    void Linear_System<Row>::insert_pending(const Linear_System<Row>& y);
    void Linear_System<Row>::insert_pending(Linear_System<Row>& y, Recycle_Input);
    // Available for rows with nonthrowing container ownership transfer.
    void Linear_System<Row>::insert_pending_consume(Linear_System<Row>& y);
    void Linear_System<Row>::insert_consume(Linear_System<Row>& y);
    
    VERIFICATION_CRITERIA:

    Check source order, distinct/copy-self cases, all source pending states, target suffix state, empty source no-op and recycled-source reset across storage choices.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc; tests/systembulktransferspec1.cc.

  • PPL-SPEC-000412
    12. Removing individual, trailing and same-status row ranges UID: PPL-SPEC-000412 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Individual removal shall require an in-range row. Half-open range removal shall require first <= last <= num_rows() and, for a nonempty range, a single processed/pending status. Trailing removal shall require an admitted count not greater than row count. Exactly the selected entry rows shall be removed; processed and pending survivors shall retain their status, with the boundary decreased by the number of removed processed rows. Dimension, topology and storage shall be retained.

    With keep_sorted true and a certified processed range, survivor order and certificate shall be retained. Otherwise survivor order may change within each status class; removing processed rows may clear the certificate, while pending-only removal shall retain the established prefix certificate. Empty ranges/counts shall be admitted.

    RATIONALE:

    Fast removal can reorder rows but must not mix processed rows with pending ones.

    INTERFACE:
    void Linear_System<Row>::remove_row(dimension_type i, bool keep_sorted = false);
    void Linear_System<Row>::remove_rows(dimension_type first, dimension_type last,
      bool keep_sorted = false);
    void Linear_System<Row>::remove_trailing_rows(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Compare labelled processed/pending multisets through every valid range, individual index and trailing count; verify ordered survivors on certified keep_sorted paths.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc.

  • PPL-SPEC-000413
    13. Ordered-index row removal preserves survivor sequence UID: PPL-SPEC-000413 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Indexed-list removal shall require strictly increasing distinct in-range indices. It shall erase exactly those rows and preserve the relative order of all survivors, including removals spanning processed and pending parts. The boundary shall decrease by the number of selected processed rows. The certificate and other metadata shall be retained. An empty index list shall leave the system unchanged.

    RATIONALE:

    Stable list removal can select both status classes without losing the pending partition.

    INTERFACE:
    void Linear_System<Row>::remove_rows(const std::vector<dimension_type>& indexes);
    
    VERIFICATION_CRITERIA:

    Enumerate index subsets of small labelled mixed systems; compare literal survivor sequences, pending status and unchanged certificates.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000414
    14. System dimension changes and coordinate removal UID: PPL-SPEC-000414 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Dimension setting shall require an admitted result dimension preserving every retained row kind's validity. It shall resize every row consistently, retaining low-index public coefficients and correctly relocating hidden fields. It shall zero-extend or truncate trailing public coordinates. Removing selected in-dimension variables shall apply each row's coordinate-removal operation, compact survivors in coordinate order and drop rows whose row-type transformation reports invalidity. No selected variables shall be a no-op. Removed rows shall update the pending partition as in 🔗 12. Removing individual, trailing and same-status row ranges.

    Both operations shall preserve common metadata consistency and retain only truthful sorted-prefix certificates, clearing them when needed. Dimension removal shall clear the certificate after a nonempty selection. Raw row normalization and geometric interpretation shall follow the row capability; no existential-elimination interpretation shall be added by this container.

    RATIONALE:

    All rows and hidden fields must follow the same coordinate transformation without retaining a false ordering certificate.

    INTERFACE:
    void Linear_System<Row>::set_space_dimension(dimension_type space_dim);
    void Linear_System<Row>::remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Check extension/truncation, interior/all variable removal, kind-specific collapsed-row removal, pending boundary updates and truthful ordering after shrink.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc.

  • PPL-SPEC-000415
    15. Shared coordinate swaps, cycles and zero insertion UID: PPL-SPEC-000415 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    In-dimension swaps and cycles shall apply the same coordinate correspondence to every row. Cycles shall require distinct valid variables and admit empty or singleton cycles. Shifting shall require v.id() <= space_dimension() and admitted result size, insert n zero coordinates before that position and update system dimension. Zero shifting shall retain the represented row sequence. Row kinds, hidden fields and transformed coordinate meaning shall follow each row's contract. Pending status shall be retained. Coordinate changes shall retain only truthful processed-prefix certificates.

    RATIONALE:

    Shared coordinate operations must preserve row alignment and algorithm metadata across every retained descriptor.

    INTERFACE:
    void Linear_System<Row>::swap_space_dimensions(Variable a, Variable b);
    void Linear_System<Row>::permute_space_dimensions(const std::vector<Variable>& cycle);
    void Linear_System<Row>::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check independent coefficient tuple swaps/cycles and front/interior/end zero insertion for processed/pending rows, all row types and both storage representations.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000416
    16. Topology queries and hidden-epsilon layout conversion UID: PPL-SPEC-000416 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Topology queries shall report the common row topology. Constraint/generator layout conversion shall set the requested topology for system and rows, retain public dimension, public homogeneous coefficients and ordinary constant or divisor fields, and add a zero hidden epsilon coefficient when entering NNC layout or discard it when entering closed layout. Repeating the current topology shall retain the system. Pending status and row sequence shall remain.

    This is an internal layout operation: dropping epsilon changes a strict constraint to a nonstrict one and a closure point to an included point; adding zero epsilon changes a closed-layout included point to an NNC closure point. Callers shall select it according to the surrounding geometric algorithm and require valid resulting row kinds. Grid-generator systems shall require closed topology. Certificates shall remain truthful after any layout change.

    RATIONALE:

    Epsilon layout conversion has concrete boundary effects and must not be mistaken for a proof of topological closedness.

    INTERFACE:
    Topology Linear_System<Row>::topology() const;
    bool Linear_System<Row>::is_necessarily_closed() const;
    void Linear_System<Row>::set_topology(Topology topology);
    void Linear_System<Row>::set_necessarily_closed();
    void Linear_System<Row>::set_not_necessarily_closed();
    
    VERIFICATION_CRITERIA:

    Check metadata and literal coordinate/divisor preservation, closed/NNC weak constraints and point-kind transitions, idempotence and row capability exclusions.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc.

  • 19. Sorting processed prefixes or single-status row windows UID: PPL-SPEC-000419 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Full-prefix sorting shall order the processed prefix by compare and remove duplicate entries identified by Row::is_equal_to while retaining the pending suffix's entry sequence. It shall certify the resulting prefix. Window sorting shall require an admitted half-open window contained entirely in one status class. It shall sort/deduplicate just that window, preserve outside entry rows and adjust the pending boundary to account for removed processed rows. Windows shorter than two shall be no-ops. A window call shall not itself claim that an unrelated unsorted processed prefix is sorted. Neither operation shall decide geometric redundancy beyond the stated row equality predicate.

    RATIONALE:

    Ordering and duplicate elimination use defined row comparison/equality rather than a domain minimization algorithm.

    INTERFACE:
    void Linear_System<Row>::sort_rows();
    void Linear_System<Row>::sort_rows(dimension_type first, dimension_type last);
    
    VERIFICATION_CRITERIA:

    Check independent labelled row order and duplicate multiplicity in full-prefix and every single-status window, preserving pending/outside sequences and boundary counts.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000420
    20. Pending-row sorting and duplicates already in the prefix UID: PPL-SPEC-000420 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    This operation shall require a true processed-prefix certificate and at least one pending row. It shall sort and deduplicate pending rows, remove pending entries comparing equal to a processed prefix row, preserve the processed prefix and retain the surviving rows as pending. It shall preserve dimension, topology and storage and retain a true prefix certificate. It shall not mark the surviving suffix processed or merge it into prefix order.

    RATIONALE:

    Pending duplicate cleanup retains which rows still need elaboration.

    INTERFACE:
    void Linear_System<Row>::sort_pending_and_remove_duplicates();
    
    VERIFICATION_CRITERIA:

    Compare sorted distinct pending labels minus prefix labels with independent sets, including no overlap, full overlap, duplicate pending rows and prefix duplicates.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc.

  • PPL-SPEC-000421
    21. Merging sorted processed systems UID: PPL-SPEC-000421 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Merge shall require matching topology, no pending rows in either input, actually sorted row sequences and target dimension at least source dimension. It shall replace the target by the ascending merge of both row collections, retaining one copy of matching rows under comparison, target dimension and target representation. Source rows shall be zero-extended to the target's dimension. Distinct sources shall retain their values; self-merge shall retain the target row sequence. The resulting system shall have no pending rows and a truthful sorted certificate. Inputs shall already be duplicate-free if a fully duplicate-free result is required.

    RATIONALE:

    Merging established row orders is a storage operation with dimension and duplicate preconditions.

    INTERFACE:
    void Linear_System<Row>::merge_rows_assign(const Linear_System<Row>& y);
    
    VERIFICATION_CRITERIA:

    Compare sorted unique label unions, disjoint/interleaved/overlapping and empty systems, source dimension extension, source ownership and self-merge.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • PPL-SPEC-000423
    23. Reloadable linear-system metadata and row sequences UID: PPL-SPEC-000423 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ASCII export shall include topology, row count, public dimension, representation, sorted certificate, pending boundary and all row encodings in sequence. Loading a complete compatible encoding shall restore those fields and row values and return true only for a valid common-metadata system. Malformed/missing tokens, an out-of-range pending boundary, a false sorted claim or row metadata incompatible with the declared system shall report false. The stored sorted flag shall remain a certificate, not a request to sort input. Empty and all-pending systems shall be admitted. Trailing input shall remain available. Failure need not roll back the target; resource states shall follow 🔗 1. Internal geometric-row sequences and valid bookkeeping. Diagnostic dump/print shall emit the same reloadable representation. The decoded header dimension shall not exceed max_space_dimension(), including when the record contains no rows; not_a_dimension() shall be rejected as an unsupported extent.

    RATIONALE:

    Successful reload must reestablish bookkeeping and common row metadata, not merely parse each row independently.

    INTERFACE:
    void Linear_System<Row>::ascii_dump(std::ostream& s) const;
    void Linear_System<Row>::ascii_dump() const;
    void Linear_System<Row>::print() const;
    bool Linear_System<Row>::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip exact row records, pending partitions, both topologies/storage choices and empty extents; check malformed/truncated input, inconsistent metadata/certificates and preserved trailing input. Check zero, positive and maximum admitted header dimensions, maximum plus one and the reserved non-dimension, even for empty row sequences. Exercise both storage choices, preserved trailing input and complete valid replacement after rejection.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc; tests/linearsystembranches1.cc.

  • PPL-SPEC-000424
    24. Linear-system invariants, accounting and clear state UID: PPL-SPEC-000424 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    OK() shall check common row representation/dimension/topology, an admitted pending boundary and truth of an asserted sorted-prefix certificate. Separate row invariants shall remain the responsibility of the row capability. Memory queries shall preserve values and metadata; external accounting shall include reserved row-vector slots and each live row's external storage, and total shall equal sizeof(system) + external. No allocator-overhead or future-availability guarantee shall be inferred. clear() shall remove all rows, set dimension and pending boundary to zero and certificate true, while retaining topology and representation.

    RATIONALE:

    Clearing and inspecting the internal container must leave a defined reusable bookkeeping state.

    INTERFACE:
    bool Linear_System<Row>::OK() const;
    memory_size_type Linear_System<Row>::external_memory_in_bytes() const;
    memory_size_type Linear_System<Row>::total_memory_in_bytes() const;
    void Linear_System<Row>::clear();
    
    VERIFICATION_CRITERIA:

    Check metadata inspections, accounting identities for reserved/populated rows and clear/reuse in each admitted context without changing geometric row values.

    SOURCE:

    src/Linear_System_defs.hh; src/Linear_System_inlines.hh; src/Linear_System_templates.hh; tests/linearsystemspec1.cc; tests/linearsystem1.cc.

  • 1. Internal rectangular coefficient matrices and valid use UID: PPL-SPEC-000361 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For Row equal to Dense_Row or Sparse_Row, Matrix<Row> shall represent a rectangular coefficient array with independent row and column counts. Every retained row shall have exactly the matrix column count; entry Mij shall be the row coefficient at index j. Zero rows, zero columns and zero-by-zero shape shall all be admitted and remain distinct shapes. The raw row contracts shall follow 🔗 1. Internal coefficient-row values and valid use. No affine, constraint or generator interpretation shall be imposed by the matrix.

    Calls shall require live valid matrices, valid positions/iterators, admitted nonoverflowing size calculations and sufficient resources. Mutable row access shall require clients to restore the common width before a call requiring matrix validity. Initialization, numerical and synchronization prerequisites shall follow 🔗 1. Internal coefficient-row values and valid use. Failed construction shall release storage owned by the incomplete matrix. Recoverable mutation failure may propagate; unchanged sources shall survive and modified targets shall remain destructible without a universal rectangular-state or rollback guarantee.

    RATIONALE:

    Matrix shape and coordinate identity must remain meaningful even when one dimension is zero.

    INTERFACE:

    Internal source header: Matrix_defs.hh. Names belong to Parma_Polyhedra_Library. Member declarations below apply to this template with Row equal to Dense_Row or Sparse_Row.

    template <typename Row> class Matrix;
    
    VERIFICATION_CRITERIA:

    Compare complete independent rectangular arrays and shapes, including both zero extents. Inspect mutable-row lifetime, initialization, failure cleanup and numerical prerequisites.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000362
    2. Zero-filled square and rectangular matrix construction UID: PPL-SPEC-000362 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall produce zero-by-zero shape. Square construction shall produce n rows and columns. Rectangular construction shall preserve both requested counts, including zero in either count. Every coefficient shall initially be zero, and sparse rows shall initially have no stored entries. Construction shall use the row type selected by the template.

    RATIONALE:

    Zero initialization supplies a defined array before individual entries are assigned.

    INTERFACE:
    explicit Matrix<Row>::Matrix(dimension_type n = 0);
    Matrix<Row>::Matrix(dimension_type num_rows, dimension_type num_columns);
    
    VERIFICATION_CRITERIA:

    Enumerate small rectangular and square shapes, zero-row/nonzero-width matrices and nonzero-row/zero-width matrices against independent zero arrays.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000363
    3. Owning matrix copies, assignment and whole-matrix swaps UID: PPL-SPEC-000363 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Implicit copy construction/assignment shall preserve shape and all entries, produce independent row owners, admit self-assignment and return the target from assignment. A copy shall survive its source mutation/destruction. Implicit moves shall transfer the source entry value to the target and leave the source valid for destruction and reassignment, with unspecified shape and entries. Member/free swaps shall exchange full matrix values and dimensions, including self-swap. Destruction shall release row and coefficient storage owned by the matrix. Failure shall follow 🔗 1. Internal rectangular coefficient matrices and valid use.

    RATIONALE:

    Copying a row container must preserve each coefficient independently of another matrix lifetime.

    INTERFACE:
    Matrix<Row>::Matrix(const Matrix<Row>& y); // Implicitly declared.
    Matrix<Row>& Matrix<Row>::operator=(const Matrix<Row>& y); // Implicitly declared.
    Matrix<Row>::Matrix(Matrix<Row>&& y); // Implicitly declared.
    Matrix<Row>& Matrix<Row>::operator=(Matrix<Row>&& y); // Implicitly declared.
    Matrix<Row>::~Matrix(); // Implicitly declared.
    void Matrix<Row>::m_swap(Matrix<Row>& y);
    template <typename Row> void swap(Matrix<Row>& x, Matrix<Row>& y);
    
    VERIFICATION_CRITERIA:

    Check source destruction/mutation, self and chained assignments, empty and unequal shapes, moves with source reuse and both swap forms.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000364
    4. Matrix shape, row capacity and reservation UID: PPL-SPEC-000364 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Shape queries shall report logical row and column counts independently of allocated capacity. has_no_rows() shall mean row count zero, including a nonzero column count. capacity() shall report reserved row slots at least as large as row count. reserve_rows(n) shall retain shape and values and provide at least n row slots; a request no larger than current capacity shall retain capacity. Reallocation may invalidate row references/iterators. max_num_rows() shall return std::vector<Row>().max_size() and max_num_columns() shall return Row::max_size(). These reported limits shall not guarantee that every allocation below them succeeds.

    RATIONALE:

    Reserved row storage and logical dimensions answer different questions.

    INTERFACE:
    dimension_type Matrix<Row>::num_rows() const;
    dimension_type Matrix<Row>::num_columns() const;
    bool Matrix<Row>::has_no_rows() const;
    dimension_type Matrix<Row>::capacity() const;
    void Matrix<Row>::reserve_rows(dimension_type n);
    static dimension_type Matrix<Row>::max_num_rows();
    static dimension_type Matrix<Row>::max_num_columns();
    
    VERIFICATION_CRITERIA:

    Check shape queries and capacity lower bounds through reservation and reuse; retain every entry and distinguish no rows from zero columns without attempting infeasible allocations.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000365
    5. Matrix resizing, prefix preservation and clear UID: PPL-SPEC-000365 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Resizing shall set the requested rectangular shape, preserve every entry in the common old/new row-and-column rectangle, discard removed entries and initialize newly introduced entries to zero. Removed values shall not reappear on regrowth. The one-argument form shall set a square shape. clear() shall produce zero rows and columns; it need not release reserved row capacity. Successful resizing shall restore every retained row to the common width. Existing iterators/references shall be invalidated as specified by changes to the row vector and row storage.

    RATIONALE:

    Shape changes must preserve coordinate associations and remove stale values outside the retained rectangle.

    INTERFACE:
    void Matrix<Row>::resize(dimension_type n);
    void Matrix<Row>::resize(dimension_type num_rows, dimension_type num_columns);
    void Matrix<Row>::clear();
    
    VERIFICATION_CRITERIA:

    Compare mixed shrink/grow histories in both dimensions and all zero extents with independent array slicing/zero extension, including later regrowth and square resizing.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000366
    6. Appending zero rows and columns UID: PPL-SPEC-000366 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    add_zero_rows(n) and add_zero_columns(m) shall require positive counts and admitted resulting shapes. They shall append exactly that many zero rows or columns, retaining all old entries at their old coordinates. The combined form shall require both positive counts and append both zero blocks. Zero columns in old/new rows shall follow the selected raw row representation.

    RATIONALE:

    Appending empty storage must not shift or reinterpret existing matrix entries.

    INTERFACE:
    void Matrix<Row>::add_zero_rows(dimension_type n);
    void Matrix<Row>::add_zero_columns(dimension_type m);
    void Matrix<Row>::add_zero_rows_and_columns(dimension_type n, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Check independent rectangle extension with zero/nonzero initial extents, both storage types and row-capacity reuse versus growth.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000367
    7. Copy-appending a row with source independence UID: PPL-SPEC-000367 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    add_row(x) shall require x.size() == num_columns() and an admitted additional row. It shall append an owned copy of the source entry value, preserve all old rows/width and preserve an external source. The source may be a row borrowed from the target matrix; its entry value shall be captured before growth can invalidate that reference. Mutating the appended row shall not modify its source. Existing matrix-row iterators may be invalidated.

    RATIONALE:

    A copied target-owned row must remain valid as an input even when append reallocates row storage.

    INTERFACE:
    void Matrix<Row>::add_row(const Row& x);
    
    VERIFICATION_CRITERIA:

    Check external and borrowed rows with spare/full row capacity, zero-width rows and independently mutated appended/source rows.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000368
    8. Recycling an external row into a matrix UID: PPL-SPEC-000368 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    add_recycled_row(x) shall require a live row of matching column count that is not a row of the matrix, plus admitted additional row count. It shall append the source entry vector while preserving all old matrix values. On success, the donor shall be a valid all-zero row of the same column count; its capacity shall be unspecified. The operation may transfer owned storage rather than copy coefficient values. Violations of matching-width or independent-donor preconditions need not be detected in release builds. Borrowed matrix-row iterators may be invalidated by append.

    RATIONALE:

    A transferred donor needs an explicit residual state and independence rule to avoid ownership aliasing.

    INTERFACE:
    void Matrix<Row>::add_recycled_row(Row& x);
    
    VERIFICATION_CRITERIA:

    Check matching external dense/sparse donors with varying capacities and zero/nonzero widths, source zero state, transferred coefficient ownership and existing matrix values. Inspect/debug-check excluded borrowed or wrong-width donors.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000369
    9. Removing contiguous or trailing matrix rows UID: PPL-SPEC-000369 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Trailing-row removal shall require n <= num_rows() and remove exactly the last n rows while retaining column count. Iterator-range removal shall require a valid ordered half-open range in the same matrix, including an empty range; it shall retain the unselected rows in their original order and keep column count. Removing every row shall retain the declared width. Removed row storage shall be released; later appended zero rows shall not recover old coefficients.

    RATIONALE:

    Row removal changes sequence positions without altering the coordinate width or values of surviving rows.

    INTERFACE:
    void Matrix<Row>::remove_trailing_rows(dimension_type n);
    void Matrix<Row>::remove_rows(iterator first, iterator last);
    
    VERIFICATION_CRITERIA:

    Enumerate all row windows and trailing lengths against independent sequence erasure, including zero-width, empty, full removal and later zero-row append.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000370
    10. Inserting and removing matrix columns UID: PPL-SPEC-000370 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    add_zero_columns(n,i) shall require i <= num_columns() and an admitted nonoverflowing result shape. It shall insert n zero columns before i and shift all old columns at or after i up by n; zero insertion shall preserve the array. remove_column(i) shall require an in-width column, erase it from every row and shift later indices down by one. Trailing-column removal shall require n <= num_columns() and remove just the last n columns. Row count shall be retained, including zero rows. These transformations shall preserve every surviving coefficient association.

    RATIONALE:

    All rows must undergo the same coordinate renumbering even when they store different sparse supports.

    INTERFACE:
    void Matrix<Row>::add_zero_columns(dimension_type n, dimension_type i);
    void Matrix<Row>::remove_column(dimension_type i);
    void Matrix<Row>::remove_trailing_columns(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Enumerate front/interior/end insertion, all individual and trailing removals, zero-width/no-row shapes and later regrowth against independent row-wise vector edits.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000374
    14. Matrix ASCII reload validates rectangular row sizes UID: PPL-SPEC-000374 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ASCII export shall emit r x c followed by a newline and the compatible row-type ASCII representation of each retained row in order. Loading a complete compatible representation shall replace both dimensions and every entry and return true only for a valid rectangular result. Zero-row/nonzero- column and nonzero-row/zero-column representations shall be admitted. Malformed/missing shape tokens or row encodings, including a row size that differs from the declared width, shall return false. Trailing input shall remain available for further parsing. The dimensions shall fit the container limits and any limits supplied by the enclosing record. Matrix row storage shall grow as the rows are decoded. Failure need not roll back prior changes; owned storage and surviving target destruction shall follow 🔗 1. Internal rectangular coefficient matrices and valid use. Diagnostic dump/print forms shall emit this same reloadable representation.

    RATIONALE:

    A reload success must restore a rectangular array rather than accepting a header that disagrees with its rows.

    INTERFACE:
    void Matrix<Row>::ascii_dump(std::ostream& s) const;
    void Matrix<Row>::ascii_dump() const;
    void Matrix<Row>::print() const;
    bool Matrix<Row>::ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Round-trip complete independent arrays and both zero extents, check exact header/row ordering, malformed/truncated fields, mismatched row widths, retries and preserved trailing input.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • PPL-SPEC-000375
    15. Matrix rectangularity inspection and memory accounting UID: PPL-SPEC-000375 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    OK() shall report whether every retained row's logical size equals the matrix column count; no-row matrices shall satisfy that width invariant for any declared admitted column count. It shall not replace the separate raw-row invariant queries. Memory queries shall preserve matrix values. Total memory shall equal sizeof(matrix) + external; external memory shall include reserved row-vector slots and external storage owned by each live row. The returned count shall be a storage-accounting estimate, with no promise of exact allocator overhead or future allocation success.

    RATIONALE:

    Common row width and the invariants of each row are separate conditions; storage accounting must include both levels of ownership.

    INTERFACE:
    bool Matrix<Row>::OK() const;
    memory_size_type Matrix<Row>::external_memory_in_bytes() const;
    memory_size_type Matrix<Row>::total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check matching/mismatched/restored borrowed row widths, empty matrices with nonzero width, accounting identities for reserved rows and unchanged entries through const queries.

    SOURCE:

    src/Matrix_defs.hh; src/Matrix_inlines.hh; src/Matrix_templates.hh; src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/matrixspec1.cc; tests/matrix1.cc.

  • 1. Exact strict mixed-integer feasibility witnesses UID: PPL-SPEC-001680 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A successfully completed three-argument is_mixed_integer_satisfiable shall report the exact feasibility defined by 🔗 1. Exact strict mixed-integer feasibility, preserving both inputs. True shall assign a POINT of the original ambient dimension that satisfies every original row and designated integrality restriction. False shall preserve the supplied witness. The output shall own its representation independently of the local solver.

    Index validation, dimension capacity, exact normalization of integer-supported strict rows and the positive shared-slack criterion shall be those of 🔗 1. Exact strict mixed-integer feasibility. Closed systems and systems whose strict rows all have integral support shall require no auxiliary slack coordinate. With remaining strict rows, a positive optimum shall supply the maximizing point, projected off that slack coordinate; optimum zero or infeasibility shall return false. Empty systems, zero dimensions and constant rows shall retain their ordinary mathematical meanings.

    The initialization, lifetime, synchronization, configured-arithmetic and exceptional-completion conditions of 🔗 1. Optimization and ranking valid use shall apply. The false-result preservation guarantee shall not strengthen those common guarantees for exceptions during solving, copying or output assignment.

    RATIONALE:

    A strictly feasible point has a positive minimum slack across the finitely many strict rows. Conversely, every positive shared-slack point satisfies them all. Copying the resulting point before destruction of the local solver and removing the auxiliary coordinate produces an independently owned witness in the original space.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    bool is_mixed_integer_satisfiable(const Constraint_System& cs,
                                     const Variables_Set& integer_dimensions,
                                     Generator& witness);
    
    VERIFICATION_CRITERIA:

    Check closed, integral-strict and continuously strict feasible/infeasible systems, both coefficient signs, equalities, mixed and empty integer subsets, constants, zero dimensions, rational slacks and invalid dimensions. Compare with independent bounded integer-fiber enumeration and evaluate witnesses using GMP rational arithmetic. Verify false-result and input preservation, source independence, and valid state under allocation failures.

    SOURCE:

    src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/MIP_Problem/strictwitness1.cc; tests/MIP_Problem/strictwitnessfailure1.cc.

  • PPL-SPEC-001472
    1. Mixed integer constraint and dimension additions UID: PPL-SPEC-001472 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint additions shall conjoin canonical admitted copies of the supplied constraints under 🔗 1. Integer-supported strict MIP admission. Unsupported continuous-support strict rows and dimension-incompatible descriptors shall raise std::invalid_argument. Dimension growth shall append unrestricted real coordinates, preserve old coordinates and reject m > max - dimension with std::length_error before adding extents. Subsequent completed queries shall refer to the modified problem; earlier results may be reused only when still valid for it.

    If allocation fails during add_constraints, an already appended prefix may remain. The surviving problem shall remain valid for subsequent queries under the common valid-use conditions. Those queries shall describe exactly the retained constraints, objective and integer subset. Cached non-infeasibility results invalidated by retained rows shall be recomputed; known infeasibility shall remain valid. Input descriptors shall be preserved. Rollback to the entry constraint sequence is not required.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply, with the allocation-failure recovery guarantee specified above.

    RATIONALE:

    Incremental storage reuse must agree with a fresh problem containing exactly the retained constraints and coordinates. Conjoining constraints can invalidate feasible points and optima, whereas an empty feasible set remains empty after further constraints.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    void add_constraint(const Constraint&);
    void add_constraints(const Constraint_System&);
    void add_space_dimensions_and_embed(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare incremental and fresh instances after feasible/infeasible changes, growth after optimization, empty systems and invalid/extreme dimensions. Inject allocation failures before any append and after retained prefixes from pending, feasible, optimized, unbounded and infeasible states. Check subsequent satisfiability, witnesses, optimization status and exact values, together with input and original-source preservation.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/constraintrecovery1.cc.

  • PPL-SPEC-001473
    2. Mixed integer integrality additions UID: PPL-SPEC-001473 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Adding i_vars shall union those indices into the existing integer coordinate subset. An incompatible index shall raise std::invalid_argument. Repeated addition and an empty subset shall preserve the mathematical problem. Any cached feasible or optimal point invalidated by a newly required integral coordinate shall be recomputed before a subsequent successful result is returned.

    If allocation of integer-set nodes fails, indices already inserted may remain. The surviving problem shall remain valid for subsequent queries under the common valid-use conditions. Those queries shall use exactly the retained integer subset; invalidated cached feasibility, optima and witnesses shall be recomputed. Known infeasibility shall remain valid. If no new index was inserted, the mathematical problem shall be preserved. The supplied index set shall be preserved. Rollback to the entry subset is not required.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply, with the allocation-failure recovery guarantee specified above.

    RATIONALE:

    A point feasible over the real relaxation need not remain feasible under new integer restrictions. A retained integral coordinate must therefore affect subsequent queries even if insertion of a later coordinate fails; no new restriction can make an infeasible problem feasible.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    void add_to_integer_space_dimensions(const Variables_Set& i_vars);
    
    VERIFICATION_CRITERIA:

    Add integrality before and after feasibility/optimization; include fractional cached points, duplicate indices, infeasibility and fresh-model comparisons. Inject allocation failures before and after retained indices from pending, feasible, optimized, unbounded and infeasible states. Compare subsequent satisfiability, witnesses and exact optimization results with a fresh model. Check that empty and duplicate-only selections allocate no new nodes, input sets remain unchanged and invalid indices are rejected before mutation.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/integerrecovery1.cc.

  • PPL-SPEC-001474
    3. Mixed integer objective and mode updates UID: PPL-SPEC-001474 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Setting an objective shall copy its affine expression and reject an expression dimension greater than the ambient dimension with std::invalid_argument. Setting mode shall select a valid MINIMIZATION or MAXIMIZATION value. Changes shall preserve the feasible region and invalidate optimality conclusions for a different objective or direction. Subsequent completed queries shall optimize the current objective and mode.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Feasibility survives objective changes, whereas finite and unbounded optimality are direction-dependent.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    void set_objective_function(const Linear_Expression&);
    void set_optimization_mode(Optimization_Mode);
    
    VERIFICATION_CRITERIA:

    Change signs, constants and modes after each solver status; compare optimal witnesses and values against a fresh equivalent problem.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/constraintrecovery1.cc.

  • PPL-SPEC-001481
    1. Reloadable mixed integer solver representations UID: PPL-SPEC-001481 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Dumping shall write the problem and incremental solver representation. Loading a complete admitted representation produced by a matching coefficient and format configuration shall replace the destination problem and preserve its constraints, integer coordinates, objective, direction and subsequent query meaning. A valid prefix may be followed by unrelated stream content. These records are trusted solver snapshots. Malformed tokens, incompatible dimensions, invalid counts or indices and structural inconsistencies between the status, extents and basis shall return false without relying on debug assertions. The loader reads the recorded tableau. An altered record can pass those checks with a tableau that fails to represent its processed constraints. The loader shall check declared tableau extents against known solver bounds before loading rows and allocate constraint storage as records are read. False shall not promise rollback or further queries. Surviving resources shall remain destructible. Stream and resource exceptions may propagate. Valid records can require substantial resources.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Reloading is replacement, and structural admission must hold in optimized as well as debugging builds.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    void ascii_dump(std::ostream&) const;
    void ascii_dump() const;
    bool ascii_load(std::istream&);
    
    VERIFICATION_CRITERIA:

    Round-trip unsolved and every solved state into fresh and populated destinations, then modify/solve; reject every truncated token, malformed extent, count, mapping and status combination. Reject raw coordinate sets containing the largest dimension_type value, reserved indices and indices outside the ambient dimension before using a derived coordinate-set dimension. Exercise unsolved and solved records, zero ambient dimensions, empty/unsorted/duplicate valid sets, trailing input and complete valid replacement after false.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/ascii_dump_load1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipproblem4.cc.

  • PPL-SPEC-001482
    2. Mixed integer diagnostics, display and storage UID: PPL-SPEC-001482 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall check the implemented structural and cached-feasibility invariants without proving global optimality. Display shall show constraints, objective, direction and integer coordinates, return its stream, and remain distinct from reloadable serialization. External memory shall estimate managed storage, including owned constraints and solver arrays; total memory shall add sizeof(*this). Shared or pooled storage accounting shall remain an estimate.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Diagnostics describe internal consistency and resource accounting rather than a mathematical optimization certificate.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    bool OK() const; void print() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    std::ostream& IO_Operators::operator<<(std::ostream&, const MIP_Problem&);
    
    VERIFICATION_CRITERIA:

    Check all valid solver states, stream identity and labels, byte relationships and ownership after copies, reset and failures.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/ascii_dump_load1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem4.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc.

  • 1. Mixed integer satisfiability UID: PPL-SPEC-001475 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A completed is_satisfiable shall return true exactly when a point satisfies every stored constraint and designated integer restriction. True shall include feasible problems with unbounded objective. The query may update solver caches without changing the problem. If an exception interrupts a solver query, the cache shall be discarded without allocation and the original exception shall propagate. A subsequent query shall solve from the stored model. A real-relaxation witness alone shall not establish mixed integer feasibility.

    Before solving the real relaxation for a pending result, check each stored equality whose nonzero variable coefficients all belong to declared integer coordinates. If the greatest common divisor of those coefficients fails to divide the constant, report infeasibility. The check shall preserve stored constraints and use exact working integers. Equalities with a nonzero coefficient on a continuous coordinate are outside this check. Use the current constraints and integer selection after model changes.

    An integer search over an unbounded real relaxation may run indefinitely. Configured deterministic weight limits and supported cancellation are observed at solver checkpoints under 🔗 1. Optimization and ranking valid use.

    When the initial auxiliary objective is zero, the feasibility phase shall recognize that its upper bound is attained without pricing. Before removing basic artificial variables, it shall discard this completed objective. Cleanup pivots shall prefer a non-artificial column occurring in the fewest current tableau rows, retaining the lowest column index on a tie. Redundant rows shall be removed. These steps shall preserve the feasible point; subsequent optimization shall use the stored client objective.

    When pending nonnegativity constraints permit merging split variables, the implementation shall stably remove the negative-part columns and renumber all retained basis and variable mappings. Rows losing a basic negative part shall be reported in descending original-variable order. Any such loss shall invalidate cached-point satisfaction hints for pending inequalities. Larger merge batches shall compact row indices together; small batches may retain individual removals.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    The mixed integer feasible region can be empty even when its real relaxation is nonempty.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    bool is_satisfiable() const;
    
    VERIFICATION_CRITERIA:

    Check real-relaxation-only solutions, exact integral witnesses, infeasible and unbounded problems, repeated queries and queries before/after solve. Exercise an incompatible equality over integer coordinates with an unbounded real relaxation, a divisible equality, an equality involving continuous coordinates, and a previously queried problem after constraints or integer selections change.

    Check homogeneous equalities with a certified feasible origin, dependent rows, and all pricing rules, both fresh and after a feasibility query. Include bounded-coefficient cases where pricing the completed auxiliary objective, retaining it during cleanup, or choosing a more coupled pivot would overflow despite a representable cleanup. Check a later constraint excluding the origin. Check simultaneous noncontiguous merges with basic and nonbasic negative parts, fresh construction, pending cross-row cuts and intermediate feasibility queries. Use independent literal bounds and optimizing points under every pricing rule, including bounded coefficients and both matrix layouts.

    BIBLIOGRAPHY:

    Schrijver99 | Whole work; background on linear and integer optimization.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/pricing1.cc; tests/MIP_Problem/mipproblem4.cc.

  • PPL-SPEC-001476
    2. Mixed integer optimization outcomes UID: PPL-SPEC-001476 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A completed solve shall return UNFEASIBLE_MIP_PROBLEM exactly for an empty mixed integer feasible region, UNBOUNDED_MIP_PROBLEM for a nonempty region whose objective is unbounded in the requested direction, and OPTIMIZED_MIP_PROBLEM when a finite optimum is attained. The categories shall be mutually exclusive. Repeated queries and admissible pricing choices shall preserve the mathematical outcome; search effort or arithmetic failure shall not be reported as one of these successful conclusions. The equality divisibility check and the search and interruption conditions in 🔗 1. Mixed integer satisfiability shall apply.

    For a bounded coefficient profile, simplex row elimination shall evaluate complete two-product combinations and cancel the resulting row's positive common factor before coefficient admission when direct arithmetic has not been proved representable. Magnitude bounds may be reused only while their source rows remain unchanged, or updated conservatively after each combination. Such scratch shall belong to one active simplex invocation, with fresh bounds on a later invocation; it shall not become persistent problem state. After this proof, native updates may omit redundant arithmetic checks while retaining the existing row support merge and cancellation rules. When no proof is available, exact complete-row evaluation shall remain mandatory. This projective row normalization shall include constant and objective coordinates. An unrepresentable primitive row may raise the selected profile's arithmetic exception.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply. The exceptional cache-reset guarantee in 🔗 1. Mixed integer satisfiability shall apply.

    RATIONALE:

    Objective unboundedness presupposes feasibility and differs from the absence of any solution.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    MIP_Problem_Status solve() const;
    
    VERIFICATION_CRITERIA:

    Check all three outcomes in both directions under every pricing rule and compare finite mixed-coordinate models with independent optima.

    BIBLIOGRAPHY:

    Schrijver99 | Whole work; background on linear and integer optimization.

    SOURCE:

    tests/MIP_Problem/pricingoverflowpublic1.cc; src/MIP_Problem.cc; src/Exact_Arithmetic.hh; tests/Polyhedron/termination2.cc; tests/MIP_Problem/primitivepivots1.cc; src/Sparse_Row.cc; src/Sparse_Row_defs.hh; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem2.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/mipproblem4.cc; tests/MIP_Problem/exceptions1.cc.

  • PPL-SPEC-001477
    3. Mixed integer objective evaluation UID: PPL-SPEC-001477 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Objective evaluation shall assign rational outputs numer and denom whose ratio equals the stored objective evaluated at the supplied point, including its constant term. The denominator shall be positive. The point need not be feasible or integral. A non-point generator or one with coordinate dimension greater than the problem shall raise std::invalid_argument. Missing trailing point coordinates shall mean zero. The numerator and denominator shall be coprime.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Evaluating an affine function is independent of deciding whether its argument is a feasible witness.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    void evaluate_objective_function(const Generator&,
                                      Coefficient& numer, Coefficient& denom) const;
    
    VERIFICATION_CRITERIA:

    Evaluate rational, negative, zero-dimensional and shorter points against direct scalar arithmetic, and reject rays, lines, closure points and oversized points.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipproblem1.cc.

  • PPL-SPEC-001478
    4. Mixed integer feasible witness access UID: PPL-SPEC-001478 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    feasible_point shall establish feasibility as needed and return a borrowed point satisfying every constraint and selected integrality condition. It shall be available for feasible unbounded as well as bounded problems. An infeasible problem shall raise std::domain_error. The returned point need not optimize the objective, and no particular feasible point shall be selected by this contract. Mutation, destruction or a cache-replacing query on the owning problem may invalidate the borrowed point.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A feasible witness certifies membership independently of whether an optimum exists.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    const Generator& feasible_point() const;
    
    VERIFICATION_CRITERIA:

    Substitute returned coordinates into original scalar constraints and integrality restrictions across all solver histories; check unavailable access.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc.

  • PPL-SPEC-001479
    5. Mixed integer optimal witnesses and values UID: PPL-SPEC-001479 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    optimizing_point shall solve as needed and return a borrowed feasible point attaining the current optimum. optimal_value shall assign rational outputs with positive denominator whose ratio is that objective value. Both operations shall raise std::domain_error for infeasible or unbounded problems. No particular optimizing point or reduced fraction shall be promised when several representations are possible. Mutation, destruction or a cache-replacing query on the owning problem may invalidate the borrowed optimizing point.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    An optimization status, its witness and its rational objective value must describe the same current problem.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    const Generator& optimizing_point() const;
    void optimal_value(Coefficient& numer, Coefficient& denom) const;
    
    VERIFICATION_CRITERIA:

    Independently check feasibility, integrality and objective equality, tied optima, both directions, incremental invalidation and unavailable cases.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/mipproblem4.cc.

  • PPL-SPEC-001480
    6. Mixed integer pricing controls UID: PPL-SPEC-001480 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    get_control_parameter(PRICING) shall return the current pricing choice. Setting one of PRICING_STEEPEST_EDGE_FLOAT, PRICING_STEEPEST_EDGE_EXACT or PRICING_TEXTBOOK shall select that search heuristic without changing constraints, integrality or objective. The default shall be floating steepest-edge pricing. Names and values passed to these accessors shall belong to their documented enumerations. A floating heuristic shall not weaken the exact meaning of a completed mathematical result.

    Exact steepest-edge pricing shall compare the squared reduced costs divided by 1 + sum_i (tableau[i][j] / tableau[i][base[i]])^2. Equal scores shall retain the candidate with the highest column index. Candidate pruning shall exclude a column only when integer bounds prove its score strictly smaller than another candidate's; overlapping bounds shall retain exact comparison.

    Floating steepest-edge pricing shall approximate the same cost-to-edge ratio. Coefficient magnitudes and normalized edge lengths outside the direct range of double shall remain comparable without infinities or NaNs in the scores. Ties in the computed floating scores shall retain the candidate with the highest column index.

    When there are no eligible entering columns, both steepest-edge rules shall return zero without pricing arithmetic. When there is exactly one, they shall return its index without computing basis LCMs or edge norms, including when those intermediate calculations would exceed the coefficient range.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Pivot selection can alter effort and resource use without changing the mathematical optimization task.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    Control_Parameter_Value get_control_parameter(Control_Parameter_Name) const;
    void set_control_parameter(Control_Parameter_Value);
    
    VERIFICATION_CRITERIA:

    Compare independent public optimization results before and after objective replacement under both ordinary and reduced-limit exact pricing. Exercise both reduced-limit overflow guards, the exact accumulation boundary and preservation of the complete candidate sequence on fallback. Retain the full-width helper boundary tests. Compare public exact-pricing optimization with independent polygon-vertex optima before and after adding a tighter bound. Include zero, positive and negative objective coefficients, both directions, unused ambient coordinates and valid optimal witnesses; retain the existing large-coefficient pruning and tie oracles. Check defaults, round trips of each control value and independently justified statuses/witnesses under all three choices.

    Compare exact entering-column choices with independent rational score oracles, including sparse gaps, signed basis coefficients, unequal coefficient sizes, equal scores and near ties. Check outward integer bounds and arithmetic-limit fallbacks against unbounded integer calculations.

    Check floating selections against rational squared-score oracles for well-separated scores and equal columns. Include reversed cost and edge rankings, signed coefficients, sparse gaps, and coefficient magnitudes beyond the floating exponent range. Scaling a row and its basis coefficient, or all candidate costs, by a common power of two shall preserve these choices.

    Check zero and sole eligible columns with consecutive basis coefficients near the coefficient limit, whose LCM would overflow, in sparse and dense layouts.

    SOURCE:

    tests/MIP_Problem/pricingoverflowpublic1.cc; tests/MIP_Problem/pricingoverflow1.cc; tests/MIP_Problem/pricingoverflow1_impl.cc; tests/MIP_Problem/exactpricingkeys1.cc; src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem3.cc; tests/MIP_Problem/pricing1.cc; tests/MIP_Problem/pricing1_impl.cc; tests/MIP_Problem/mipproblem4.cc.

  • PPL-SPEC-001651
    7. Point-coordinate integrality predicate UID: PPL-SPEC-001651 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For live finite coefficients numerator and divisor, with a strictly positive divisor, coordinate_is_integral shall return true exactly when numerator ⁄ divisor ∈ ℤ. It shall preserve both arguments. Zero and negative numerators, including the minimum value of a bounded signed coefficient type, shall be admitted. The predicate shall not require the quotient or the absolute numerator to be representable as a coefficient. It shall not construct quotient or GCD coefficient objects, own scratch containers, or introduce floating-point arithmetic. first_fractional_coordinate(point,variables) shall require a valid point with a positive divisor and selected indices within its dimension. It shall preserve its inputs and return the least selected index having a nonintegral coordinate, or not_a_dimension() when all selected coordinates are integral. An empty selection and divisor one shall yield that sentinel. The scan shall check early selected coordinates before sparsity admission, skip only zero coordinates, and retain an ordinary scan for dense suffixes. It shall allocate no scratch containers and shall be used by optimization, heuristic-disabled feasibility, and the cached integer-witness invariant check.

    Coefficient objects and their backend allocation/lifetime facilities shall satisfy the applicable conditions of 🔗 1. Optimization and ranking valid use.

    RATIONALE:

    A rational point coordinate is integral precisely when its positive divisor divides its numerator. Testing divisibility avoids computing an unused GCD. A positive divisor excludes zero division and the signed minimum divided by minus one, so native remainder admits the complete finite numerator range.

    INTERFACE:

    The function is local to the translation unit src/MIP_Problem.cc. The coefficient types belong to Parma_Polyhedra_Library.

    bool coordinate_is_integral(
        Coefficient_traits::const_reference numerator,
        Coefficient_traits::const_reference divisor);
    dimension_type first_fractional_coordinate(
        const Generator& point, const Variables_Set& variables);
    
    VERIFICATION_CRITERIA:

    Compare with exact unbounded-integer quotient multiplication for zero, positive, negative, minimum and maximum numerators; unit, nonunit and maximum positive divisors; large GMP values and reproducible pseudorandom inputs. Preserve the arguments. Exercise the predicate through optimization, feasibility with and without the branching heuristic, and cached integer witness validation. Inspect coefficient dispatch and scratch allocation. Compare first-fractional selection with an independent exact quotient oracle for dense/sparse points, empty and noncontiguous subsets, early/late fractions, sparsity-admission boundaries, nonselected fractional coordinates, integral nonzero suffixes and zero runs. Include positive GMP divisors with a low limb equal to one, spanning single- and multiple-limb values. Check a late fractional cached integer and wide public mixed-integer histories with independent literal optima.

    SOURCE:

    src/MIP_Problem.cc; tests/MIP_Problem/integrality1.cc; tests/MIP_Problem/integrality1_impl.cc; tests/MIP_Problem/integralityfallback1_impl.cc; tests/MIP_Problem/branching1.cc.

  • PPL-SPEC-001652
    8. Fractional branching-variable selection UID: PPL-SPEC-001652 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    choose_branching_variable shall inspect the cached rational point of mip and the variable indices in i_vars without changing either. The cached point shall be valid, have mip.space_dimension() coordinates, and satisfy the input constraints. The helper shall be called at a solver state where this cached point and these input rows are meaningful; it shall not require the tableau to determine this selection. Every index in i_vars shall belong to the ambient dimension. Scalar arithmetic and synchronization shall satisfy 🔗 1. Optimization and ranking valid use.

    Let C be the indices in i_vars whose cached coordinates are not integers. If C = ⌀, the helper shall return true and preserve branching_index. Otherwise it shall return false and assign a member of C. When |C| = 1, that member shall be selected without evaluating constraint-appearance scores.

    For more than one candidate, an active input row shall be an equality or an inequality saturated by the cached point. A candidate's score shall be the number of active input rows having a nonzero coefficient at that candidate. Rows shall contribute individually, including repeated rows. Coefficients beyond a row's dimension and constant terms shall not contribute. The helper shall select a maximum-score candidate, choosing the greatest variable index when scores tie, including when all scores are zero. Dense and sparse row representations shall have the same selection semantics.

    RATIONALE:

    Branching must select a fractional integer-constrained coordinate. The appearance heuristic and its tie rule determine a reproducible choice; a singleton needs no scoring. Sparse storage changes which zeros are visited, not the mathematical counts.

    INTERFACE:

    Private static member of Parma_Polyhedra_Library::MIP_Problem; src/MIP_Problem_defs.hh and src/MIP_Problem.cc.

    static bool choose_branching_variable(
        const MIP_Problem& mip, const Variables_Set& i_vars,
        dimension_type& branching_index);
    
    VERIFICATION_CRITERIA:

    Use independent exact rational candidate and active-row evaluation. Check divisor one, empty integer subsets, integral zero coordinates, singleton candidates, multiple candidates, ties, equalities, saturated and inactive inequalities, constant/short rows, noncandidate nonzero coefficients and candidate suffixes beyond a row's dimension. Compare both point and row representations and preserve input values and empty-case output sentinels. Include large sparse points, nonselected nonzero coordinates, sparse/dense prefixes and suffixes, integral nonzero coordinates and fractional candidates separated by zero runs.

    SOURCE:

    src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/MIP_Problem/branching_test.hh; tests/MIP_Problem/branching1.cc; tests/MIP_Problem/sparsebranching1.cc; tests/MIP_Problem/sparsecandidates1.cc.

  • 1. Integer-supported strict MIP admission UID: PPL-SPEC-001668 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A strict row ax + b > 0 shall be admitted by MIP_Problem construction and insertion exactly when every coordinate with nonzero coefficient in a is in the declared integer subset. Unused continuous coordinates shall not prevent admission. Constructors without an integer subset shall therefore admit only strict constant rows. Dimension validation shall precede normalization. Unsupported support shall raise std::invalid_argument.

    Under the arithmetic preconditions, the admitted row shall be stored as an integer-equivalent closed row. For positive homogeneous GCD g, its meaning shall be (a ⁄ g)x ≥ ⌊ − b ⁄ g⌋ + 1; constant rows shall retain their truth value. Constraint views and reloadable storage shall expose these canonical closed rows in admitted input order. Integer declarations shall restrict the selected coordinates to integers. Optimization results and witnesses shall satisfy 🔗 2. Mixed integer optimization outcomes, 🔗 4. Mixed integer feasible witness access and 🔗 5. Mixed integer optimal witnesses and values.

    Single-row validation/conversion failure shall not append a row. Bulk strict support validation and conversion shall complete before any row is appended. A later allocation failure may leave an appended prefix with provisional solution state; known infeasibility shall remain valid. Input descriptors shall be preserved.

    The initialization, lifetime, synchronization, arithmetic-profile and failure conditions of 🔗 1. Optimization and ranking valid use shall apply, including intermediate calculations. No general rollback after resource or arithmetic exceptions is required beyond those common conditions and the explicit guarantees above.

    RATIONALE:

    An integer-valued primitive form is strictly greater than  − b ⁄ g exactly when it is at least ⌊ − b ⁄ g⌋ + 1. Dividing before adjusting the constant avoids unnecessary coefficient growth, such as 3x − 128 > 0 becoming x ≥ 43. Nonstrict input retains its existing admission path; strict-only work is outlined.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    The constructors in 🔗 3. Mixed integer construction from constraints and the following members:

    void MIP_Problem::add_constraint(const Constraint&);
    void MIP_Problem::add_constraints(const Constraint_System&);
    
    VERIFICATION_CRITERIA:

    Check integer truth tables, constant true/false rows, partially integral support, trailing zero coordinates, canonical views, cached feasible/infeasible/optimized states, all constructor forms, single-pass ranges, invalid dimensions, bulk validation before append, resource-failure state validity, reload and C-wrapper forwarding.

    SOURCE:

    src/MIP_Problem_defs.hh; src/MIP_Problem_templates.hh; src/MIP_Problem.cc; tests/MIP_Problem/integralstrict1.cc.

  • 1. Exact strict mixed-integer feasibility UID: PPL-SPEC-001669 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A successfully completed is_mixed_integer_satisfiable(cs, integer_dimensions) shall return true exactly when {x ∈ Rn ∣ cs(x),  xi ∈ Z for selected i} is nonempty, where n is the system's ambient dimension. Other coordinates shall remain real, and every strict boundary shall retain its membership meaning. The inputs shall be preserved.

    A selected index outside that dimension shall raise std::invalid_argument. The ordinary MIP dimension limit shall apply. If a strict row depends on a continuous coordinate, one additional continuous coordinate shall be required; insufficient dimension capacity shall raise std::length_error. Integer-supported strict rows shall use exact closed normalization without requiring that extra coordinate. Empty selections, empty systems, zero dimensions and constant rows shall retain their mathematical meanings.

    For remaining strict rows aix + bi > 0, feasibility shall be decided by a shared continuous slack s, with aix + bi ≥ s, 0 ≤ s ≤ 1, and exact maximization of s. Integer indices shall remain unchanged and shall exclude s. Infeasibility or optimum zero shall yield false; a positive exact optimum shall yield true. This interface shall not optimize an arbitrary user objective over an open feasible set.

    The underlying mixed-integer search shall follow the equality divisibility and interruption conditions of 🔗 1. Mixed integer satisfiability.

    The initialization, lifetime, synchronization, arithmetic-profile and failure conditions of 🔗 1. Optimization and ranking valid use shall apply, including intermediate calculations. No general rollback after resource or arithmetic exceptions is required beyond those common conditions and the explicit guarantees above.

    RATIONALE:

    Any strict witness has a positive minimum slack across the finitely many strict rows; taking its minimum with one gives a feasible positive s. Conversely, a positive slack witness satisfies every original strict row. The slack objective is bounded by one. Closing integer-supported rows first avoids unnecessary auxiliary dimensions and optimization. The comparisons use exact rational values, not a chosen floating-point epsilon.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    bool is_mixed_integer_satisfiable(const Constraint_System& cs,
                                     const Variables_Set& integer_dimensions);
    
    VERIFICATION_CRITERIA:

    Check independent always-slack and literal finite-coordinate witnesses, closed and open unit intervals, incompatible integer declarations, mixed slices with only closure-feasible integer layers, rational positive slacks, false/tautological constants, input preservation. Review dimension-capacity rejection through the checked dimension-growth operation.

    SOURCE:

    src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/MIP_Problem/strictfeasibility1.cc.

  • PPL-SPEC-001671
    1. Strict-row support and admission kernels UID: PPL-SPEC-001671 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    mip_strict_support_is_integral shall return true exactly when all nonzero visible variable coefficients of the supplied row of any relation refer to indices in the supplied integer subset. It shall ignore the constant, hidden NNC epsilon coordinate and zero coefficients, without changing either input.

    For an integer-supported strict row, mip_closed_integral_strict shall produce the closed equivalent defined in 🔗 1. Integer-supported strict MIP admission, handling constant truth values separately. Its GCD, quotient and adjustment operations shall satisfy the selected exact arithmetic profile's intermediate-value preconditions. Inputs shall retain their value.

    add_integral_strict_constraint requires dimension compatibility and a strict input. It shall validate support, convert, append and invalidate any cached non-infeasibility conclusion. Validation, conversion or pre-append allocation failure shall preserve the model.

    add_integral_strict_constraints requires dimension compatibility and a system containing strict rows. It shall validate and convert all strict rows before appending any source row. Conversion failure shall preserve the model; subsequent append failure may leave a prefix with provisional solution state. Both helpers shall preserve known infeasibility.

    The initialization, lifetime, synchronization, arithmetic-profile and failure conditions of 🔗 1. Optimization and ranking valid use shall apply, including intermediate calculations. No general rollback after resource or arithmetic exceptions is required beyond those common conditions and the explicit guarantees above.

    RATIONALE:

    Nonzero traversal makes support checking depend on represented coefficients rather than sparse ambient extent. A positive GCD permits exact divisibility testing without another GCD or a signed minimum divided by minus one. Preconversion isolates strict validation from model mutation.

    INTERFACE:

    File-local helpers: unnamed namespace in src/MIP_Problem.cc. Private member declarations: src/MIP_Problem_defs.hh, class Parma_Polyhedra_Library::MIP_Problem.

    bool mip_strict_support_is_integral(const Constraint&, const Variables_Set&);
    Constraint mip_closed_integral_strict(const Constraint&);
    void MIP_Problem::add_integral_strict_constraint(const Constraint&);
    void MIP_Problem::add_integral_strict_constraints(const Constraint_System&);
    
    VERIFICATION_CRITERIA:

    Exercise equality, weak and strict row support, every sign/divisibility combination, empty and mixed support, sparse trailing coordinates, constant truth, homogeneous GCD one/non-one, canonical integer equivalence, rejected support and append-failure cache validity through the public APIs.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; tests/MIP_Problem/integralstrict1.cc; tests/MIP_Problem/strictoptimizationpolicy1.cc.

  • PPL-SPEC-001681
    1. Uniform strict-margin denominator UID: PPL-SPEC-001681 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    strict_margin_denominator(cs, integers, continuous) shall require valid input rows, in-range integer indices and a sorted complete list of the other coordinates. At least one strict row shall depend on a continuous coordinate. Missing trailing row coordinates shall have coefficient zero.

    Let k count continuously supported strict rows and let Sj = max(1, ∑ia2ij) for each listed continuous column. The result shall be D = ⌈√((k + 2)∏jSj)⌉. The norm sums, product, square root and ceiling shall use exact GMP integers. For each nonempty fiber obtained by fixing the designated integer coordinates, a strict witness shall exist with every continuously supported strict row ei ≥ 1 ⁄ D while satisfying all other rows.

    GMP coefficients shall admit the exact result without a fixed integer bound. For bounded signed coefficients, a positive result beyond the configured maximum shall raise std::overflow_error before narrowing it, including in native configurations. Inputs shall be preserved. Resource and other common failure conditions shall be those of 🔗 1. Optimization and ranking valid use.

    RATIONALE:

    Fixing integer coordinates leaves integer right-hand sides. A positive optimal shared slack has a basic rational value whose denominator is bounded by a nonzero integer basis determinant. Removing unit slack columns leaves a minor of the continuous and shared-slack columns. Signed copies of a free column cannot both occur independently in a basis. Hadamard's inequality bounds every such minor by the product of column norms; factors at least one also bound smaller minors. The slack column has squared norm at most k + 2, including its two bounds. Thus every positive optimum is at least 1 ⁄ D, independently of the integer right-hand sides.

    INTERFACE:

    File-local helper in the unnamed namespace of src/MIP_Problem.cc.

    Coefficient strict_margin_denominator(
      const Constraint_System& cs, const Variables_Set& integers,
      const std::vector<dimension_type>& continuous);
    
    VERIFICATION_CRITERIA:

    Through the public optimizer, cover zero/unit/nonunit column norms, perfect and nonperfect square products, different integer subsets, trailing constant false rows, mixed relation kinds, finite and unbounded integer ranges, both storage layouts and exact bounded-range rejection. Use literal limits and independent integer-fiber optimization to verify the resulting feasible set. Review the determinant bound and capacity checks independently of test counts.

    SOURCE:

    src/MIP_Problem.cc; tests/MIP_Problem/strictoptimization1.cc; tests/MIP_Problem/strictoptimizationpolicy1.cc; tests/MIP_Problem/strictoptimizationfailure1.cc.

  • PPL-SPEC-001682
    2. Exact general strict mixed-integer optimization UID: PPL-SPEC-001682 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    optimize_mixed_integer shall interpret the input constraints, integer subset, affine objective and valid minimization/maximization mode over the original strict feasible set. The scalar output objects shall be distinct. An integer index or objective dimension outside the system's ambient dimension shall raise std::invalid_argument. The inputs shall be preserved.

    A successfully completed query shall report a Mixed_Integer_Optimization_Status that distinguishes: INFEASIBLE (no original feasible point), UNBOUNDED (feasible and unbounded in the requested direction), ATTAINED (finite attained optimum), and UNATTAINED (finite supremum/infimum that is not attained). Both finite results shall assign the exact value as numerator/denominator with positive denominator and a generator of the original ambient dimension. An attained result shall return a POINT satisfying every original row and integer restriction at that value. An unattained result shall return a CLOSURE_POINT at that value, satisfying the weakened rows and belonging to the closure of a nonempty original fiber at the returned integer coordinates. Infeasible and unbounded results shall preserve all three outputs. The underlying mixed-integer search shall follow the equality divisibility and interruption conditions of 🔗 1. Mixed integer satisfiability.

    A constant objective shall use 🔗 1. Exact strict mixed-integer feasibility witnesses and shall be attained exactly when the original set is nonempty. Without continuously supported strict rows, the ordinary MIP model and exact integral-strict normalization shall provide the result without a witness-coordinate copy or margin bound.

    Otherwise let r be the number of continuous coordinates. Insufficient MIP capacity for n + r coordinates shall raise std::length_error before allocating the coordinate map. Use D from 🔗 1. Uniform strict-margin denominator to construct a closed model with original coordinates for a limit and copied continuous coordinates for a strict witness, sharing exactly the original integer coordinates. Insert integer-supported rows once, normalizing their strict forms. On the limit coordinates weaken the remaining strict rows. On witness coordinates replace each strict row by Dei ≥ 1, preserving weak rows and equalities. Optimize the original objective on the limit coordinates. For a finite bound p ⁄ q, test the original strict system with the equality qf = p using 🔗 1. Exact strict mixed-integer feasibility witnesses. Success shall supply the optimizing point; failure shall supply the projected limit as a closure point.

    The initialization, lifetime, synchronization, configured-arithmetic and exceptional-completion conditions of 🔗 1. Optimization and ranking valid use shall apply to all intermediate computations and output assignments. Arithmetic/range and resource exceptions shall not be mathematical statuses. Terminal-status output preservation shall not imply rollback after such exceptions.

    RATIONALE:

    The uniform margin provides a strict witness for every nonempty integer fiber. Conversely, a modeled limit and its witness share integer coordinates, and their convex combinations approach the limit while satisfying every original strict row. Therefore the closed model has exactly the original bounds and preserves infeasibility and unboundedness. Rational closed MILP attains every feasible finite bound. Testing the original equality face then distinguishes an actual optimizing point from an unattained limit.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    enum class Mixed_Integer_Optimization_Status {
      INFEASIBLE, UNBOUNDED, ATTAINED, UNATTAINED
    };
    Mixed_Integer_Optimization_Status optimize_mixed_integer(
      const Constraint_System& cs, const Variables_Set& integers,
      const Linear_Expression& objective, Optimization_Mode mode,
      Coefficient& numerator, Coefficient& denominator, Generator& extremum);
    
    VERIFICATION_CRITERIA:

    Exercise both directions and all outcomes with literal examples and independent finite integer-fiber enumeration. Cover excluded integer layers, open and closed optimal faces, negative and rational objectives, equalities, constant objectives, zero dimensions, all/none integer selections and unbounded integer ranges. Independently evaluate outputs, confirm nonempty original fibers for closure points, and check input/terminal-output preservation, invalid dimensions, insufficient capacity, denominator overflow and allocation failures across admitted arithmetic/storage configurations.

    BIBLIOGRAPHY:

    Meyer74 | Abstract (rational constraint coefficients suffice for attainment in feasible bounded closed mixed-integer problems).

    SOURCE:

    src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/MIP_Problem/strictoptimization1.cc; tests/MIP_Problem/strictoptimizationpolicy1.cc; tests/MIP_Problem/strictoptimizationfailure1.cc.

  • PPL-SPEC-001467
    1. Mixed integer problem values UID: PPL-SPEC-001467 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A problem of dimension n shall denote the points in Rn satisfying its stored equalities and non-strict inequalities, with coordinates in integer_space_dimensions() restricted to integers. Other coordinates shall remain unrestricted real coordinates. The objective shall be an affine linear expression, including its constant term. The mode shall select minimization or maximization. Stored constraints shall retain their mathematical meaning independently of subsequent source mutations.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Integer restrictions change feasibility and optimality, while coordinates outside the selected subset remain real.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    class MIP_Problem;
    enum MIP_Problem_Status {
      UNFEASIBLE_MIP_PROBLEM, UNBOUNDED_MIP_PROBLEM, OPTIMIZED_MIP_PROBLEM
    };
    
    VERIFICATION_CRITERIA:

    Check real, integer and mixed coordinates, negative values, affine objective constants and independently enumerated bounded models.

    BIBLIOGRAPHY:

    Schrijver99 | Whole work; background on linear and integer optimization.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipproblem1.cc.

  • PPL-SPEC-001468
    2. Trivial mixed integer construction and dimensions UID: PPL-SPEC-001468 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from dim shall create a problem with no explicit constraints or integer coordinates, zero objective and maximization mode. The default dimension shall be zero. Dimension queries shall report its ambient extent and the supported maximum. An extent greater than the maximum, including the reserved non-dimension value, shall raise std::length_error.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    The unrestricted problem and its ambient dimension are meaningful even before any solve request.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    explicit MIP_Problem(dimension_type dim=0);
    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check zero/nonzero defaults, origin feasibility, constant optimum, maximum reporting and excessive dimensions.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/mipproblem3.cc.

  • PPL-SPEC-001469
    3. Mixed integer construction from constraints UID: PPL-SPEC-001469 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    System construction shall copy its canonical admitted constraints, objective and mode. Range construction shall copy the constraints in the valid half-open input range; the overload with int_vars shall additionally select those integer coordinates. Omitted objectives and modes shall mean zero and maximization.

    The common iterator type shall satisfy Constraint_Input_Iterator: it shall support implicit copying of a traversal lvalue, prefix increment, a boolean inequality test, and a dereferenced result implicitly convertible to const Constraint&. It shall additionally provide operator-> for constraint metadata. C++20 inputs with distinct sentinel types or value/proxy results can use std::common_iterator when its standard copyability requirements are met. The adapter shall preserve single-pass traversal and caller-owned rows; the constructed problem shall own its acquired constraints.

    An excessive ambient dimension shall raise std::length_error. Strict rows shall follow 🔗 1. Integer-supported strict MIP admission. Unsupported strict support or constraint, objective or integer-coordinate dimensions greater than dim shall raise std::invalid_argument. Failed construction shall release every constraint copy already acquired.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Admission must precede mathematical solving, and partial acquisition must not leak owned constraints.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    MIP_Problem(dimension_type dim, const Constraint_System& cs,
                const Linear_Expression& obj=Linear_Expression::zero(),
                Optimization_Mode mode=MAXIMIZATION);
    template<class In>
      requires Constraint_Input_Iterator<In>
    MIP_Problem(dimension_type dim, In first, In last,
                const Linear_Expression& obj=Linear_Expression::zero(),
                Optimization_Mode mode=MAXIMIZATION);
    template<class In>
      requires Constraint_Input_Iterator<In>
    MIP_Problem(dimension_type dim, In first, In last,
                const Variables_Set& int_vars,
                const Linear_Expression& obj=Linear_Expression::zero(),
                Optimization_Mode mode=MAXIMIZATION);
    
    VERIFICATION_CRITERIA:

    Check constrained overload admission and standard common-iterator adapters for non-common sentinels, single-pass reference/value/proxy inputs, source independence, failed acquisition and allocation failure followed by retry. Exercise metadata and row-dimension rejection using live borrowed MIP constraint iterators, including rejection before any copy and after an acquired prefix. Check that the owner retains its value and the failed construction releases its copies. Check all constructor forms, single-pass ranges, integer-supported strict rows, rejected continuous-support strict/dimensioned inputs, source independence and allocation failure after each acquired constraint.

    SOURCE:

    src/Constraint_types.hh; tests/constraintinput1.cc; tests/MIP_Problem/borrowediterator1.cc; src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/constructorownership1.cc; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/exceptions1.cc; tests/MIP_Problem/iteratoradmission1.cc.

  • PPL-SPEC-001470
    4. Mixed integer copying, exchange and reset UID: PPL-SPEC-001470 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copying and assignment shall preserve the mathematical problem and permit independent later mutation and solving. Assignment shall return the receiver and support self-assignment. Exchange shall swap the complete problem and solver state; self-exchange shall preserve the value. clear shall reset to the zero-dimensional trivial problem. Destruction shall release owned constraints and solver storage.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Cached optimization state is part of owned storage but must not compromise mathematical value independence.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    MIP_Problem(const MIP_Problem&); ~MIP_Problem();
    MIP_Problem& operator=(const MIP_Problem&);
    void m_swap(MIP_Problem&); void clear();
    void swap(MIP_Problem&, MIP_Problem&);
    
    VERIFICATION_CRITERIA:

    Copy unsolved, feasible, optimized, infeasible and unbounded states; modify each copy, self-assign, exchange and reset after solving.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/constructorownership1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc.

  • PPL-SPEC-001471
    5. Mixed integer descriptor views and iterators UID: PPL-SPEC-001471 STATUS: APPROVED COMPONENT: MIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Descriptor accessors shall expose the stored objective, optimization mode and integer-coordinate subset. Constraint iterators shall expose const canonical admitted constraints in insertion order, as defined by 🔗 1. Integer-supported strict MIP admission, and support random-access movement, difference, dereference and comparison within the same live sequence. The end position shall not be dereferenced. Iterator arithmetic shall stay within that sequence and its end. Mutations that reallocate, clear, exchange or replace storage may invalidate borrowed views and iterators.

    Default-constructed constraint iterators shall be singular and compare equal to one another. They shall support copying, assignment and destruction; dereference and movement require assignment from a valid iterator first. The constraint iterator shall satisfy the C++20 bidirectional-iterator and sized-sentinel concepts, permitting standard range adapters and algorithms.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Clients must be able to inspect the original problem without confusing it with a transformed simplex tableau.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of MIP_Problem or the concrete type named below.

    class MIP_Problem::const_iterator {
    public:
      using iterator_category = std::iterator_traits<std::vector<Constraint*>::const_iterator>::iterator_category;
      using difference_type = std::iterator_traits<std::vector<Constraint*>::const_iterator>::difference_type;
      using value_type = const Constraint;
      using pointer = const Constraint*;
      using reference = const Constraint&;
      const_iterator();
      difference_type operator-(const const_iterator&) const;
      const_iterator& operator++(); const_iterator operator++(int);
      const_iterator& operator--(); const_iterator operator--(int);
      const_iterator& operator+=(difference_type);
      const_iterator& operator-=(difference_type);
      const_iterator operator+(difference_type) const;
      const_iterator operator-(difference_type) const;
      reference operator*() const; pointer operator->() const;
      bool operator==(const const_iterator&) const;
      bool operator!=(const const_iterator&) const;
    };
    const_iterator constraints_begin() const;
    const_iterator constraints_end() const;
    const Linear_Expression& objective_function() const;
    Optimization_Mode optimization_mode() const;
    const Variables_Set& integer_space_dimensions() const;
    
    VERIFICATION_CRITERIA:

    Check insertion order, all iterator movement forms and distances, const access, empty ranges and descriptors after incremental changes. Check default construction, singular equality, assignment to live positions, and standard range iteration and copying.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/MIP_Problem/mipproblem1.cc; tests/MIP_Problem/persistenceadmission1.cc; tests/MIP_Problem/iteratoradmission1.cc.

  • 2. Canonical rational input and stream failure outcomes UID: PPL-SPEC-000526 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The destination shall be live mpq_class storage, either raw or owned by Checked_Number<mpq_class, Policy>. The policy shall provide constant boolean has_nan and has_infinity traits for that wrapper's input and lifetime operations; no rounding default or result handler shall be required by named rational input. For an initially readable stream and a complete finite token in 🔗 1. Exact finite numeric token syntax, input shall assign its exact rational value in canonical form with positive denominator and coprime numerator/denominator. It shall return V_EQ for every valid rounding request, including strict and exactness requests. Lexical negative zero shall become rational zero. Reusing a destination shall not retain any previous numerator, denominator, sign or exponent component.

    Successful parsing shall consume the recognized token and its leading whitespace, preserve any looked-ahead terminator by stream putback, and clear a speculative failbit caused only by successful end-of-token recognition at EOF. It shall retain eofbit and shall not clear a genuine stream failure. The stream buffer shall support the required character putback for successful delimiter retention. If that operation fails, input shall report failure through stream state rather than claim a complete finite value. Syntax rejection, an exponent expansion beyond the bound above or a conservative expansion bound exceeding the supported backend storage limits shall set failbit and return V_CVT_STR_UNK when the stream exception mask allows return. Enabled stream exceptions shall propagate. A consumed prefix shall not be rolled back after failure; no universal unchanged-destination promise shall apply. The surviving destination shall remain reassignable and destructible.

    Case-insensitive inf with optional sign and unsigned nan shall be recognized as nonfinite tokens; a zero-valued denominator shall not be a successful finite value. Their nonfinite/undefined or unrepresentable outcome shall remain distinct from V_EQ finite input. This shall not promise a nonfinite representation in ordinary canonical mpq_class storage.

    Objects and streams shall be synchronized against concurrent mutation and resources shall suffice for parsing and exact canonicalization. No library initialization owner, coefficient-constant stage, FPU setup/direction, inexact-flag support or irrational-precision setting shall be required.

    RATIONALE:

    Canonical token values must not depend on destination history. Numeric parsing and stream delivery failures need observable outcomes without an unjustified full rollback guarantee.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    Result input(mpq_class& to, std::istream& stream, Rounding_Dir dir);
    Result input(Checked_Number<mpq_class, Policy>& to,
                 std::istream& stream, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact canonical values, backend capacity preflight with a small test limit, destination reuse, signed and zero denominators, lexical zero, special-token classification, sequential tokens and retained delimiters. Exercise EOF at each syntactic stage, prefailed streams, failed putback and enabled stream exception masks; recover by resetting stream/destination state and parse a new valid value without library initialization.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_mpq_inlines.hh; src/checked.cc; tests/numberinput1.cc; tests/numerictextspec1.cc.

  • 5. Mathematical numeric output and stream delivery status UID: PPL-SPEC-000529 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    output shall preserve a live source number and write its mathematical text using the supplied stream. With ordinary decimal formatting, native integer, mpz_class and canonical finite mpq_class sources shall use their exact ordinary integer/rational representation; character-sized integer sources shall be printed numerically rather than as glyphs. A native finite floating source shall be written as an exact finite decimal representation of its represented binary rational value, without rounding to the stream precision or changing hardware direction. Both zero signs shall be written as 0. Admitted native infinities and quiet NaNs shall be written as -inf, +inf and nan respectively.

    Exact integer/rational output shall follow its ordinary stream formatting flags. Native floating mathematical output shall insert the exact decimal string instead of using the stream's native floating formatting. Pending width/fill/alignment shall act through the corresponding ordinary insertion; no newline shall be added. Live Numeric_Format instances shall select the same formatting rules. Every valid rounding request shall return V_EQ when insertion returns, indicating no numeric approximation; it shall not by itself certify successful stream delivery. Stream error state and enabled exceptions shall follow ordinary insertion semantics, without a partial-output rollback promise or policy handler dispatch by named output.

    Resources shall suffice for exact decimal expansion and insertion; source, format and stream access shall be synchronized against mutation. Supported native formats shall satisfy their availability conditions. No library initialization owner, coefficient-constant stage, FPU rounding setup, inexact-flag support or irrational-precision setting shall be required. Ordinary decimal output read by compatible numeric input shall preserve the mathematical finite value, without promising to preserve a floating zero's sign or machine object representation.

    RATIONALE:

    Mathematical numeric text should preserve exact values while stream delivery remains governed by stream state and exceptions; readable output is distinct from ABI-specific object-byte dumps.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    class Numeric_Format;
    Result output(std::ostream& stream, const From& from,
                  const Numeric_Format& format, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact numeric strings for native integer widths, very large MPZ values, canonical rationals and every supported native floating format, including negative fractions, both zero signs and admitted specials. Round-trip finite mathematical values, vary flags/precision/width, preserve sources and hardware, and exercise returning/throwing stream-buffer failures without interpreting numeric EQ as stream success.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/Numeric_Format_defs.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; src/checked.cc; tests/numberinput1.cc; tests/numerictextspec1.cc.

  • 6. Checked numeric stream policy integration UID: PPL-SPEC-000530 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a Checked_Number<T, Policy> instantiation whose policy provides ROUND_DEFAULT_INPUT and handle_result(Result), input stream extraction shall call numeric input with that default direction and return the same stream reference. On a returned V_CVT_STR_UNK, it shall set failbit and shall not dispatch that syntax result to the policy handler. For another returned numeric result, it shall invoke the handler once. Stream exceptions and exceptions raised by the handler shall propagate. No successful destination value shall be inferred after a failed parse or a handler rejection; reuse shall meet the destination's declared post-failure prerequisites.

    Output stream insertion shall require the policy handler, without requiring an input-default direction. It shall call numeric output with a default Numeric_Format and ROUND_IGNORE, dispatch a returned result to the policy handler once, and return the same output-stream reference. A stream exception shall propagate before a returned numeric result can be dispatched. The source shall remain unchanged by library formatting. Input/output mathematical values and stream semantics shall follow 🔗 2. Canonical rational input and stream failure outcomes, 🔗 3. Numeric text input into integral destinations, 🔗 4. Numeric text input into supported native floating destinations and 🔗 5. Mathematical numeric output and stream delivery status for admitted underlying types. Check_Overflow_Policy alone shall not be assumed to provide these stream-operator policy members; the named result-returning interfaces shall remain governed by their own contracts.

    RATIONALE:

    Checked stream operators integrate numeric conversion with an explicit policy, while syntax rejection remains an ordinary stream failure rather than an implicit numeric success.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    std::istream& operator>>(std::istream& stream,
                             Checked_Number<T, Policy>& value);
    std::ostream& operator<<(std::ostream& stream,
                             const Checked_Number<T, Policy>& value);
    
    VERIFICATION_CRITERIA:

    Use policies with observable default directions and handlers. Check one handler invocation per returned numeric result, no handler for syntax rejection, exact stream-reference identity, conversion rounding, input recovery, source preservation, stream exception masks and handler-thrown exceptions. Compile named interfaces with policies that lack stream defaults to distinguish their supported surface.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/numberinput1.cc; tests/numerictextspec1.cc.

  • PPL-SPEC-001650
    10. Native finite affine interval congruence classification UID: PPL-SPEC-001650 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    native_interval_relation<Halve>() shall require finite native bounds, a positive magnitude a, a positive modulus m and exact unbounded native arithmetic. With h = 2 when Halve is true and h = 1 otherwise, its admitted affine interval shall be nonempty: L = c − a neg_lower ⁄ h ≤ U = c + a upper ⁄ h, where c is expr.inhomogeneous_term(). The selected halving operation shall be exact.

    The result shall be disjoint exactly when [L, U]∩mℤ is empty. It shall be included and saturating exactly when L = U ∈ mℤ. Otherwise it shall strictly intersect. Expression, magnitude, modulus and supplied bounds shall be preserved. Supported numerical and allocation failures may propagate; temporaries shall release their owned resources. Numerical initialization, lifetime and synchronization prerequisites shall follow 🔗 1. Bounded-difference values, numerical profiles and valid use and 🔗 1. Octagonal values, numerical profiles and valid use for the calling domain.

    RATIONALE:

    A convex affine image meets a modulus lattice according to its two endpoints; computing both together permits one expression classification.

    INTERFACE:

    Internal source header: Shape_Congruence_Queries.hh; namespace Parma_Polyhedra_Library::Implementation::Shape_Congruence_Queries.

    template <bool Halve, typename N>
    Poly_Con_Relation native_interval_relation(
      const Linear_Expression& expr, const Coefficient& magnitude,
      const N& neg_lower, const N& upper, const Coefficient& modulus);
    
    VERIFICATION_CRITERIA:

    Compare results with independently enumerated lattice levels for positive, negative, zero and fractional endpoints, nonzero offsets, multiple magnitudes, congruent and incongruent singletons, narrow gaps and nontrivial intervals. Exercise both halving choices. Check domain queries against analytic images, including general expressions, empty and unbounded sets and cold/warm caches.

    SOURCE:

    src/Shape_Congruence_Queries.hh; src/BD_Shape_templates.hh; src/Octagonal_Shape_templates.hh; tests/shapequerycertificatespec1.cc.

  • 1. Rational affine image of one coordinate UID: PPL-SPEC-001206 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an entry shape X ⊆ ℝn , a valid coordinate k , a dimension-compatible integer-coefficient affine expression e and a nonzero coefficient d , affine_image(k,e,d) shall replace the receiver with an octagonal shape containing

    {y ∈ ℝn ∣ ∃x ∈ X : yk = e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    With exact rational boundary arithmetic, constant replacement and assignments xk :  = sxj + c with s ∈ { − 1, 1} , including signed self translation, shall give the exact image. Other affine expressions may require a conservative octagonal enclosure. Rounded profiles shall keep the delegated outward bounds. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Transporting a correlated state through an assignment requires an old/new-coordinate relation; independent interval evaluation alone loses those correlations.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void affine_image(Variable var, const Linear_Expression& expr,
                      Coefficient_traits::const_reference denominator
                        = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Project independent old/new halfspaces. Check constant, copy, translation, negation, nonunit scaling and multiple-variable forms. Under unbounded exact rational arithmetic, require equality for constant/signed-copy/translation classes and sound inclusion elsewhere; other profiles retain their stated enclosure guarantees. Include negative denominators, bounded/unbounded sources, latent emptiness, cache histories and unchanged-coordinate constraints. Exercise finite implied bounds exposed by translation after earlier positive or negative saturation; check receiver validity before and after subsequent semantic queries.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/octagonalshapesaturationspec1.cc.

  • PPL-SPEC-001207
    2. Rational affine preimage of one coordinate UID: PPL-SPEC-001207 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With the coordinate, expression and denominator admitted by 🔗 1. Rational affine image of one coordinate , affine_preimage(k,e,d) shall contain every x ∈ ℝn whose successor, obtained by replacing coordinate k with e(x) ⁄ d , belongs to the entry post-state shape. Expression occurrences of the updated coordinate shall denote its pre-state value.

    With exact rational boundary arithmetic, a signed self translation xk :  = sxk + c with s ∈ { − 1, 1} shall give the exact preimage. Other transformations shall give sound containing octagons; they need not compute the least octagonal enclosure even when the exact preimage is representable, as specified by WR_Affine_Preimage_Precision in the mathematical interface definitions. In particular, constant and distinct-coordinate assignments need not retain every representable predecessor constraint. Rounded profiles shall retain the selected outward arithmetic guarantees. Invertible transformations shall use the same relational predecessor meaning as noninvertible ones. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Backward transfer selects predecessors of the postcondition and must distinguish pre-state and post-state occurrences of an assigned variable.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void affine_preimage(Variable var, const Linear_Expression& expr,
                         Coefficient_traits::const_reference denominator
                           = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Derive relational predecessors by eliminating new coordinates. Check exact signed self inverses, including fractional translations. Check containment for constants, distinct-coordinate copies, noninvertible general maps and negative denominators without imposing a leastness promise. Include empty postconditions, correlated frames and nonrepresentable rounded bounds.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001208
    3. Single-coordinate generalized affine image UID: PPL-SPEC-001208 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For  ⋈  ∈ { = ,  ≤ ,  ≥ } , the variable overload of generalized_affine_image(k,relsym,e,d) shall contain

    {y ∣ ∃x ∈ X : yk ⋈ e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Equality shall have the behavior of 🔗 1. Rational affine image of one coordinate . A one-sided relation shall use the indicated quotient, including the sign of the denominator; it shall not silently turn a lower relation into an upper relation. The result may conservatively approximate the affine relation. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    A one-sided update nondeterministically chooses a successor satisfying its affine bound, while leaving all other coordinates framed.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void generalized_affine_image(
        Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Independently project equality and both non-strict relation directions. Compare equality with 🔗 1. Rational affine image of one coordinate ; include positive/negative denominators, self dependence, distinct-variable dependence, general expressions, unbounded inputs and infeasible relations. Check unchanged-coordinate constraints and rejected strict/disequality symbols.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001209
    4. Single-coordinate generalized affine preimage UID: PPL-SPEC-001209 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For  ⋈  ∈ { = ,  ≤ ,  ≥ } , the variable overload of generalized_affine_preimage(k,relsym,e,d) shall contain

    {x ∣ ∃y ∈ X : yk ⋈ e(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Equality shall have the behavior and class-specific precision of 🔗 2. Rational affine preimage of one coordinate . Other admitted relations may give sound nonleast octagonal enclosures according to the documented preimage approximation contract. The denominator sign shall be respected. The relation shall use the same old/new coordinate frame for self-dependent and non-self-dependent expressions. Constraints involving only unchanged coordinates shall remain valid. The source expression and denominator shall keep their values.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    A predecessor exists when some framed successor satisfies the postcondition and the selected relation, not when every possible successor does.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void generalized_affine_preimage(
        Variable var, Relation_Symbol relsym, const Linear_Expression& expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Eliminate new coordinates independently, with equality and both inequality directions, sign-normalized denominators, self/non-self dependence and general affine expressions. Check equality delegation, empty postconditions, surviving-coordinate restrictions and invalid symbols.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001210
    5. Expression-left generalized affine image UID: PPL-SPEC-001210 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let l and r be dimension-compatible affine expressions, U the coordinates with nonzero homogeneous coefficient in l , and  ⋈  ∈ { = ,  ≤ ,  ≥ } . The expression overload of generalized_affine_image(l,relsym,r) shall contain

    {y ∣ ∃x ∈ X : l(y) ⋈ r(x) ∧ ∀i ∉ U,  yi = xi}.

    The left expression shall be interpreted in the new state and the right expression in the old state; exchanging them and reversing the relation shall not in general describe the same update. A constant left expression shall be a guard with every coordinate framed. Multiple updated coordinates may lose precision through a sound octagonal enclosure. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; lhs and rhs may denote the same live expression.

    For a constant left expression, a representable guard shall be added natively. Other guards shall receive one finite pass over native directions formed from each nonzero coefficient and each representable matching pair, in increasing coordinate order. For a guard expression e ≥ 0 and such a direction d , the finite infimum of the residual d − e shall supply d ≥ inf(d − e) . Equality shall also use its finite supremum to supply d ≤ sup(d − e) . Closure shall propagate earlier deductions before each direction is considered. Residual optimization shall preserve its supported correlations; returned rational bounds shall be inserted directly, without an intermediate scalar-interval conversion. This pass need not reach a fixed point or compute a least abstract intersection. General residuals may require linear programming.

    When the homogeneous part of l has two nonzero coefficients and is representable as an octagonal expression up to scaling, the finite entry-state supremum of r shall be retained as an upper bound on the new l for EQUAL and LESS_OR_EQUAL. Its finite infimum shall be retained as a lower bound for EQUAL and GREATER_OR_EQUAL. These bounds shall be computed before forgetting updated coordinates and shall also apply to disjoint left/right supports. Rational boundaries shall retain the exact extrema; other boundary profiles shall retain their native outward guarantees. An unbounded direction shall add no finite bound.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    The support of the left expression determines which coordinates are assigned together; all occurrences on the right refer to the entry state.

    Finite right-hand ranges are evaluated in the entry shape. Native optimization uses cached bounds for representable objectives and may invoke the linear programming solver for a general right expression. Saving those bounds before projection avoids confusing old and new occurrences of the same coordinate.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void generalized_affine_image(const Linear_Expression& lhs,
                                  Relation_Symbol relsym,
                                  const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Check the retained left-expression ranges against an independently assembled old/new polyhedron followed by projection, and literal rational fixtures. Include positive/negative scaling, arbitrary right expressions, disjoint and overlapping supports, shared expressions, one-sided/unbounded ranges, framed coordinates, dense/sparse expressions and rational/floating/integral bounds.

    Use independent old/new relations for constant, single-variable and multi-variable left sides, disjoint/overlapping supports, shared lhs/rhs, all admitted relations and rejected symbols. Check full frame constraints and soundness for approximate general updates rather than imposing an unsupported universal leastness requirement.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/generalizedaffineboundsspec1.cc; tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001211
    6. Expression-left generalized affine preimage UID: PPL-SPEC-001211 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With l , r , U and  ⋈  admitted by 🔗 5. Expression-left generalized affine image , the expression overload of generalized_affine_preimage(l,relsym,r) shall contain

    {x ∣ ∃y ∈ X : l(y) ⋈ r(x) ∧ ∀i ∉ U,  yi = xi}.

    A constant left expression shall be a guard with every coordinate framed. Other forms may return sound nonleast octagonal enclosures as specified by the preimage approximation contract. Constraints involving only coordinates outside U shall remain valid. Separately stored source expressions shall remain unchanged; the same live expression may supply both lhs and rhs .

    For a left expression with at least two nonzero homogeneous coefficients, the finite target-state infimum of l shall supply the necessary guard r ≥ infXl for EQUAL and LESS_OR_EQUAL; the finite supremum shall supply r ≤ supXl for EQUAL and GREATER_OR_EQUAL. These extrema shall be computed before forgetting updated coordinates. The guards shall be refined in the old-state coordinates using the same native native-direction approximation as constant-left images. An unbounded direction shall contribute no finite guard. Existing relational deductions and framed-coordinate constraints shall also be preserved. Rational boundary arithmetic shall use exact extrema; other profiles shall retain their native outward guarantees. These deductions need not give a least preimage enclosure.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. An expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Strict inequality and disequality relation symbols shall throw std::invalid_argument before changing the represented set, including on empty input.

    The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Expression-left backward transfer uses the same transition relation as the forward operation, with the postcondition placed on new coordinates.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void generalized_affine_preimage(const Linear_Expression& lhs,
                                     Relation_Symbol relsym,
                                     const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Eliminate the new coordinates from relational postconditions for constant/single/multiple left supports, finite and unbounded target lhs ranges, disjoint and overlapping right supports, shared expressions and every admitted relation. Include empty/zero-dimensional guards, incompatibility and rejected symbols; retain every feasible predecessor.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001212
    7. Single-coordinate bounded affine image UID: PPL-SPEC-001212 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted coordinate k , dimension-compatible expressions l, u and nonzero denominator d , bounded_affine_image(k,l,u,d) shall contain

    {y ∣ ∃x ∈ X : l(x) ⁄ d ≤ yk ≤ u(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    Both bounding expressions shall use the same entry state. A negative common denominator shall preserve the displayed quotient inequalities; the lower and upper argument roles shall not be exchanged merely because the denominator is negative. The bounds may depend on the replaced coordinate. The result may conservatively approximate this simultaneous relation. Constraints involving only unchanged coordinates shall remain valid. Both expressions and the denominator shall remain unchanged; lb_expr and ub_expr may refer to the same live expression.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Two bounds constrain one nondeterministic assignment in a common old state; sequentially changing the variable would define a different relation.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void bounded_affine_image(
        Variable var, const Linear_Expression& lb_expr,
        const Linear_Expression& ub_expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Project both divided inequalities together. Cover equal and inconsistent bounds, self dependence in zero/one/both bounds, negative denominators, shared bound expressions, unbounded correlated inputs, empty input and invalid dimensions/zero denominators. Check simultaneous-transition soundness and unchanged-coordinate constraints.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001213
    8. Single-coordinate bounded affine preimage UID: PPL-SPEC-001213 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With the coordinate, expressions and denominator admitted by 🔗 7. Single-coordinate bounded affine image , bounded_affine_preimage(k,l,u,d) shall contain

    {x ∣ ∃y ∈ X : l(x) ⁄ d ≤ yk ≤ u(x) ⁄ d ∧ ∀i ≠ k,  yi = xi}.

    The two bounds shall be evaluated in the same pre-state, including when one or both contain xk . The result may be a sound nonleast octagonal enclosure under the documented preimage approximation contract. Any auxiliary coordinate used internally shall not remain in a successful result. Constraints involving only unchanged coordinates shall remain valid. Both source expressions and the denominator shall remain unchanged, including shared bound-expression arguments.

    The ambient dimension shall remain unchanged on successful return. Empty input shall remain empty after argument validation. A zero denominator, a selected coordinate outside the receiver or an expression of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. The real-set interpretation, admitted boundary profiles, initialized runtime, numerical-intermediate, synchronization and resource conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Exactness clauses refer to exact rational boundary arithmetic; native or integral bounds shall retain the selected arithmetic operations' outward guarantees. Const expression and denominator arguments may share still-live source storage. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible. No additional rollback guarantee is imposed.

    RATIONALE:

    Backward bounded transfer must find a single successor satisfying both old-state bounds and the complete postcondition.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void bounded_affine_preimage(
        Variable var, const Linear_Expression& lb_expr,
        const Linear_Expression& ub_expr,
        Coefficient_traits::const_reference denominator = Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Derive predecessors by eliminating new coordinates with both affine bounds present. Include zero/one/both-bound self dependence, constant and inconsistent pairs, positive/negative denominators and shared source expressions. Verify bottom preservation, unchanged-coordinate restrictions, final dimension and ownership when temporary coordinates are used.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal semantics and floating-point implementation background).

    SOURCE:

    tests/shapeunsignedaffinespec1.cc; doc/definitions.dox; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeaffinespec1.cc; tests/octagonalshapeaffinepublic1.cc; tests/octagonalshapeaffineallocationsspec1.cc; tests/boxallocationfixture.hh; tests/bdshapeaffineoracle.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh.

  • PPL-SPEC-001214
    1. Default octagonal stop points UID: PPL-SPEC-001214 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    CC76_extrapolation_assign(y,tp) shall have the behavior of [LINK: PPL-SPEC-001215] with the finite ordered stop points  − 2,  − 1, 0, 1, 2. These are bounds on the signed forms in that contract: a stop s on a unary form 2xi means xi ≤ s ⁄ 2, while a stop on xi + xj means xi + xj ≤ s. Already representable stop values shall be retained exactly.

    The ascending operand order Y ⊆ X, empty and zero-dimensional cases, source preservation and precision-sensitive token rule shall be those of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens. Sharing the default stop-point values between calls shall not affect mathematical results. This convenience overload shall not add a convergence guarantee to CC76 extrapolation.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    The octagonal unary encoding doubles coordinate bounds. Stating the actual stop-point scale prevents a factor-of-two error in clients' expected results.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void CC76_extrapolation_assign(const Octagonal_Shape& y,
      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Compare independent exact support/threshold models with the default overload and explicit five-stop range. Include both unary signs, half-unit boundaries, stable and growing binary bounds, absent stops, source lifetime, self-aliasing, null/zero/positive tokens and empty/zero-dimensional values. Exercise admitted integral and native profiles under their rounding prerequisites.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1 and 4, extrapolation and doubled unary octagonal encoding. BagnaraHRZ05SCP | Section 7, precision-sensitive widening delay.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76extrapolation1.cc.

  • 2. Threshold octagonal extrapolation and precision-sensitive tokens UID: PPL-SPEC-001215 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let X be the receiver's entry set and Y the argument's entry set, with Y ⊆ X. The explicit-iterator CC76 operator shall produce an octagonal enclosure of X, preserving dimension. An empty argument and zero-dimensional operands shall preserve the receiver's entry set.

    For nonempty operands and exact rational support computations, define bZ(v) = sup{v⋅p ∣ p ∈ Z} for the signed forms v ∈ {±2ei,  ±ei±ej (i < j)}. With no delay token, a finite stable bound bX(v) = bY(v) shall be retained. A bound that increased strictly shall be replaced by the least supplied stop point not below bX(v), or removed if no such stop exists. An unbounded form shall remain unbounded. The result shall denote the conjunction of these closed upper bounds. This characterization concerns real-coordinate sets, including when the stored coefficient type is integral.

    Other supported profiles shall compare outward closed profile bounds and assign chosen stops outward, preserving every point of X under 🔗 1. Octagonal values, numerical profiles and valid use. Rounded closure shall not be assumed canonical or required to compute exact real supports. General relational CC76 iterations shall carry no finite-stabilization guarantee.

    The half-open stop-point range shall use readable multipass forward iterators and finite values sorted in nondecreasing numerical order. Empty ranges and duplicates shall be admitted. Values and iterators shall remain live and stable throughout the call, shall not borrow storage invalidated by the call, and shall support the selected profile's comparisons and outward assignment.

    A null token pointer or zero counter shall select the undelayed result. With a positive counter, the receiver shall retain X; exactly one token shall be consumed when the corresponding undelayed result strictly enlarges X, and otherwise none shall be consumed. The counter shall be a live, separately owned, externally synchronized writable unsigned object. Neither the argument's represented value nor the supplied stop-point values shall be changed.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    Scalar thresholds control the loss of signed-form bounds, while the token budget delays only precision-losing steps. Closure may restore discarded relational bounds, so extrapolation must remain distinct from semantic widening.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    template <typename Iterator>
    void CC76_extrapolation_assign(const Octagonal_Shape& y,
      Iterator first, Iterator last, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Use independent rational elimination to determine every primitive support and a mathematical ordered range to select stops. Cover exact hits, strict changes, stable/unbounded directions, doubled unary and all binary signs, empty/duplicate ranges, pointer and forward iterators, all token states, aliasing, source/range preservation, lazy emptiness and dimension rejection. For rounded profiles assess inclusion separately from exact support precision.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1, 4 and 7, extrapolation limits, signed-form encoding and inexact propagation. BagnaraHRZ05SCP | Section 7, widening with tokens.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76extrapolation1.cc.

  • PPL-SPEC-001216
    3. Semantic octagonal widening and default widening alias UID: PPL-SPEC-001216 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With argument entry set Y contained in receiver entry set X, BHMZ05_widening_assign shall return an octagonal set containing both, with the same ambient dimension. An empty or singleton argument, or an increase in affine dimension from Y to X, shall retain X. widening_assign shall have the same behavior as BHMZ05_widening_assign with the same argument and token pointer.

    For equal positive affine dimension and exact rational support computations, the undelayed result shall implement the semantic standard widening: obtain a nonredundant octagonal inequality description of Y, retain its inequalities satisfied by every point of X, and conjoin the retained inequalities. The affine-dimension guard and strong reduction shall make this result independent of equivalent input descriptions, redundant bounds, representation-only cache changes and choices of a strongly reduced octagonal description. This shall not require a least possible widening.

    Supported rounded profiles shall preserve inclusion under the numerical prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use; the exact-support characterization shall apply when the relevant support and reduction calculations are exact. A smaller resulting set shall not be promised than is established by the selected widening and arithmetic profile.

    The precision-sensitive token rule in 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens shall apply to this operator's undelayed result. Equal entry sets and self-aliasing shall preserve their set and shall not consume a token.

    In a fixed dimension and profile, form an ascending iteration by first constructing an enclosure of the preceding widened result and the next input, then invoking this operator on that enclosure with the preceding result as argument. Under its inclusion and numerical prerequisites, the represented results shall stabilize after finitely many strict changes. A finite initial token budget, without replenishment, shall preserve the convergence guarantee.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    Reducing the previous octagon avoids the interaction between reintroduced entailed constraints and repeated extrapolation. Tokens postpone precision loss while retaining the convergence purpose of the semantic widening.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void BHMZ05_widening_assign(const Octagonal_Shape& y,
      unsigned* tp = nullptr);
    void widening_assign(const Octagonal_Shape& y,
      unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Derive independent irredundant facet descriptions on low-dimensional sets and retain exactly those facets satisfied by the current set. Check affine subspaces, singletons, dimension increases, stable and growing facets, redundant/cache histories, the default alias, all token states, aliases and empty/zero-dimensional cases. Check inclusion at each step of independent ascending recurrences and inspect the reduction-based stabilization proof; assess rounded profiles without claiming exact canonical closure.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.3, 4.1-4.2 and 7, reduction choice, semantic octagonal widening and finite-precision qualifications. BagnaraHRZ05SCP | Section 7, finite token budgets and precision-sensitive delay.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/bhmz05widening1.cc.

  • PPL-SPEC-001217
    4. Limited semantic octagonal extrapolation UID: PPL-SPEC-001217 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With Y ⊆ X in the ascending operand order, limited_BHMZ05_extrapolation_assign shall improve the semantic widening of 🔗 3. Semantic octagonal widening and default widening alias using selected limits.

    The supplied system shall have dimension no greater than the operands and shall contain no strict inequalities. Recognized limits shall be nonstrict unary inequalities and two-coordinate inequalities with equal absolute nonzero coefficients; equalities and other linear forms shall not be used as limiting inequalities. Normalize each recognized inequality to the signed forms of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens, rounding its bound outward in the selected profile. Select only normalized bounds satisfied by the receiver's entry set X. A rounded bound may be weaker than the original constraint; selection shall not promise that the result satisfies the original constraint.

    Let L be the conjunction of the selected bounds and W the base operator's delayed or undelayed result. The final result shall denote W∩L, contain X and be contained in W. The base operator shall make its token decision before applying L; a limit that recovers all discarded information shall not refund a token. Positive tokens shall retain X.

    An empty argument, empty receiver or zero-dimensional operands shall preserve the receiver's entry set without consuming a token. The supplied constraint system shall retain its value and ownership. Incompatible constraint dimensions and strict inequalities shall throw std::invalid_argument before changing the represented receiver or token counter, including in zero dimensions.

    With a fixed finite limiting system, fixed dimension/profile, the admitted normalization and widening prerequisites, and a finite unreplenished token budget, the prescribed ascending recurrence shall retain finite stabilization. Arbitrarily changing the limiting system shall carry no such general guarantee.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    Satisfied supported limits recover selected information after widening; unsupported facets and stronger unrounded constraints cannot silently become extra guarantees of a weakly relational result.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void limited_BHMZ05_extrapolation_assign(const Octagonal_Shape& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Independently normalize recognized limits, determine satisfaction by the entry set, compute the semantic base widening and intersect the models. Cover all signs/scalings, ignored equalities and nonoctagonal rows, unsatisfied limits, outward half-unit integral bounds, tokens decided before limiting, fixed-limit ascending sequences, source preservation, aliases, empty/cache histories and rejected strict/dimension-incompatible systems.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.3, 4.2 and 7, widening up to bounds, semantic octagonal widening and outward approximation. BagnaraHRZ05SCP | Section 7, fixed finite limiting systems and token delay.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/limitedbhmz05extrapolation1.cc.

  • PPL-SPEC-001218
    5. Octagonal narrowing and descending operand order UID: PPL-SPEC-001218 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let X be the receiver's entry set and Y the argument's entry set, with X ⊆ Y. CC76_narrowing_assign shall produce R with X ⊆ R ⊆ Y, preserving ambient dimension. An empty receiver, zero-dimensional operands and self-aliasing shall preserve the receiver's entry set.

    For nonempty operands and exact rational support computations, use the signed forms and supports of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens. The result shall be the conjunction whose bound for v is bY(v) when that previous bound is finite and bX(v) otherwise. Thus it may restore a finite previous bound even when the current one is tighter; it shall recover a current bound in a direction where the previous set is unbounded. It shall not simply retain every improvement in the receiver.

    Supported rounded profiles shall use their outward closed profile bounds while preserving both inclusions. Keep every finite previous bound even when the corresponding current bound remains infinite in rounded closure. The exact-support characterization shall apply when the corresponding support computations are exact. Under exact support arithmetic in a fixed dimension, descending iteration that passes each result as the next previous argument shall stabilize after finitely many strict changes: a strict step must make a previously unbounded primitive form finite. Finite-carrier profiles shall stabilize under the same descending inclusion and arithmetic conditions. No stabilization guarantee shall be inferred for other operator/profile/iteration combinations without its own justification.

    The receiver/argument order shall be the descending order stated above, rather than the ascending order used by widening. A distinct previous argument shall retain its represented value.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    Narrowing restores selected finite restrictions after extrapolation, using the current approximation inside its previous approximation. The descending operand order and finite-previous-bound rule determine its precision.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void CC76_narrowing_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Compute primitive supports independently and apply the finite-previous-bound rule. Check current/result/previous inclusions, unary halves, all binary signs, finite/unbounded directions, affine subspaces, self-aliasing, lazy emptiness and dimension rejection. Exercise descending recurrences and review the finite-status-change proof separately from observed stabilization. Assess admitted rounded cases without assuming exact closure.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3-4 and 7, weakly relational support semantics and finite-precision qualifications (background). CousotC76 | Original widening and narrowing framework (background).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/cc76narrowing1.cc.

  • PPL-SPEC-001219
    6. Limited threshold octagonal extrapolation UID: PPL-SPEC-001219 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    With Y ⊆ X in the ascending operand order, limited_CC76_extrapolation_assign shall improve the default threshold extrapolation of 🔗 1. Default octagonal stop points using selected limits.

    The supplied system shall have dimension no greater than the operands and shall contain no strict inequalities. Recognized limits shall be nonstrict unary inequalities and two-coordinate inequalities with equal absolute nonzero coefficients; equalities and other linear forms shall not be used as limiting inequalities. Normalize each recognized inequality to the signed forms of 🔗 2. Threshold octagonal extrapolation and precision-sensitive tokens, rounding its bound outward in the selected profile. Select only normalized bounds satisfied by the receiver's entry set X. A rounded bound may be weaker than the original constraint; selection shall not promise that the result satisfies the original constraint.

    Let L be the conjunction of the selected bounds and W the base operator's delayed or undelayed result. The final result shall denote W∩L, contain X and be contained in W. The base operator shall make its token decision before applying L; a limit that recovers all discarded information shall not refund a token. Positive tokens shall retain X.

    An empty argument, empty receiver or zero-dimensional operands shall preserve the receiver's entry set without consuming a token. The supplied constraint system shall retain its value and ownership. Incompatible constraint dimensions and strict inequalities shall throw std::invalid_argument before changing the represented receiver or token counter, including in zero dimensions.

    This limited operator shall not add a general finite-stabilization guarantee to relational CC76 extrapolation, even with a fixed finite limiting system.

    The supported-profile, range, rounding, initialization, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Operands shall have equal ambient dimension and satisfy the stated mathematical inclusion; this inclusion is a caller precondition rather than a required runtime check. Unequal dimensions shall throw std::invalid_argument before changing the receiver's represented set or a supplied token counter. A distinct argument shall retain its represented set, although logically const operations may change its cached representation. Self-aliasing shall be admitted.

    Underlying numerical, allocation and cooperative-abandonment failures may propagate. Owned temporary storage shall be released and surviving objects shall retain safely destructible ownership. Such failures shall not imply a general rollback guarantee. Successful results shall own their representation independently of the argument's lifetime.

    RATIONALE:

    Limiting constraints and scalar thresholds serve different purposes. Limits can recover satisfied information after threshold extrapolation without turning the underlying CC76 method into a semantic widening.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void limited_CC76_extrapolation_assign(const Octagonal_Shape& y,
      const Constraint_System& cs, unsigned* tp = nullptr);
    
    VERIFICATION_CRITERIA:

    Use the independent doubled-unary/binary threshold model and independently selected limiting bounds, then compare their conjunction with the result. Include exact and outward-rounded limits, ignored equality/general rows, unsatisfied limits, token consumption before limiting, aliases, source and system preservation, empty/zero-dimensional inputs and all required invalid input rejections.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 3.1, 3.3, 4 and 7, relational extrapolation, limiting bounds and numerical propagation. BagnaraHRZ05SCP | Section 7, widening with tokens and fixed finite limits.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconvergencespec1.cc; tests/octagonalshapeconvergenceallocationsspec1.cc; tests/octagonalshapeconvergencepublic1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh. tests/Octagonal_Shape/limitedcc76extrapolation1.cc.

  • 1. Closed octagonal support hull of geometric generators UID: PPL-SPEC-001162 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(gs) shall construct the least target-profile octagonal enclosure of the convex set generated by gs. Its closed boundaries shall include finite limiting points supplied only as closure points. Ordinary points and closure points shall contribute their actual rational coordinates to support extrema, with the generator meanings in 🔗 1. Generator kinds and numerical prerequisites and 🔗 2. Construction of nonzero lines and rays. A ray shall make a normal unbounded exactly when its scalar product with that normal is positive; a line shall do so exactly when that scalar product is nonzero. A zero directional product shall retain any finite bound on that normal.

    An empty generator system shall construct empty in its declared dimension. A nonempty generator system shall contain an ordinary point; otherwise the constructor shall throw std::invalid_argument. Divisors, zero trailing coordinates and ambient dimension shall retain their generator-system meanings.

    For a nonempty source set X, let h(a) = supx ∈ Xa⋅x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

    The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

    Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

    RATIONALE:

    Signed support extrema determine the closed octagonal hull. A closure point can determine such an extremum without being an ordinary generated point; directional signs determine whether a finite supporting inequality survives.

    INTERFACE:

    Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(const Generator_System& gs);
    
    VERIFICATION_CRITERIA:

    Compute support independently from raw rational point/closure-point coordinates and ray/line dot products for every signed primitive normal. Check unequal point divisors, all four binary signs, zero and nonzero directional products, unequal-speed rays and lines, repeated extrema, trailing zero coordinates and independent affine dimension. Include empty systems in zero and positive dimensions, point-free nonempty rejection, half-integral unary bounds, positive/negative inexact target conversion and source-lifetime independence. Inject admitted allocation failures and check incomplete-object cleanup and source-set preservation. Check literal support entries for dense and sparse systems at dimensions 0, 1, 2, 63, 64, 65 and 128, including implicit zero tails, dyadic coordinates, origin and fully populated points, closure-first updates and repeated points. Exercise exact, integral and native boundaries, source lifetime independence and unchanged native floating state. Bound additional C++ allocation against independently constructed matrix storage, including value-returning coefficient traits, and sweep observed allocation failures after numeric-pool warmup; require incomplete-result cleanup and unchanged source values. Compare every stored support bound for positive and negative first, middle and last coordinate lines and rays, zero-coordinate rows, equal/opposite pairs and fixed nonzero point coordinates in dense and sparse storage. Exercise exact, integral and native boundaries and require finite bounds for zero directional products. Retain the selected coefficient profile's admitted arithmetic and failure behavior.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4, closure points and extended generator semantics. BagnaraHZ09FMSD | Section 4, signed-variable encoding and doubled unary bounds (PDF page index 9, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; tests/Octagonal_Shape/fromgensys1.cc; tests/Octagonal_Shape/dimensionlimits1.cc. tests/generatorconstructionfixture.hh; tests/generatorconstructionallocationsspec1.cc.

  • PPL-SPEC-001163
    2. Complexity-sensitive octagonal conversion from polyhedra UID: PPL-SPEC-001163 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(ph,complexity) shall construct an octagonal set containing the source closed or not necessarily closed polyhedron. The default ANY_COMPLEXITY and the explicit SIMPLEX_COMPLEXITY and POLYNOMIAL_COMPLEXITY values shall be admitted.

    ANY_COMPLEXITY shall produce the least target-profile octagonal enclosure and shall detect an empty source exactly. For a nonempty source, strict finite boundaries shall contribute their limiting suprema to the closed result. Primitive bounds shall use the exact signed supports and target normalization in 🔗 1. Closed octagonal support hull of geometric generators, including doubling a unary support before rounding. This guarantee shall not depend on an equivalent source constraint/generator representation or cache history.

    SIMPLEX_COMPLEXITY shall give the same primitive support bounds for every nonempty source. It may use the closed relaxation obtained by replacing each strict source row by its weak counterpart. Therefore an empty not necessarily closed source whose closed relaxation is nonempty need not be detected as empty. An already available valid generator representation may give the stronger exact-empty result without exceeding the selected complexity class.

    POLYNOMIAL_COMPLEXITY shall preserve containment while respecting its polynomial complexity bound. It may conservatively extract and propagate supported information without a universal least-enclosure, exact-emptiness, mandatory-progress or particular iteration fixed-point guarantee. Equivalent source representation/cache histories may yield different permitted conservative enclosures. Each complexity option shall respect its declared algorithmic complexity bound.

    The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction, subject to the stated complexity-dependent emptiness guarantees.

    Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

    RATIONALE:

    Optimal projection onto a fixed family of signed normals and conservative constraint extraction have different complexity costs. Closing a nonempty strict polyhedron preserves its finite support suprema, while closing an inconsistent strict conjunction can change emptiness.

    INTERFACE:

    Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(const Polyhedron& ph,
                             Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use independent rational elimination of arbitrary closed and strict source halfspaces to decide source feasibility and each octagonal support. Compare ANY with the least target-profile hull; require the same bounds for nonempty SIMPLEX sources, and containment for POLYNOMIAL. Separately model closed relaxations of empty strict systems. Include relational non-octagonal rows, all primitive signs, finite unattained limits, universe/empty and zero dimensions, source generators already computed, new pending constraints, minimized constraints, target profiles and source-set preservation. Allocation failures shall check owned cleanup without assuming source-cache rollback.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Sections 4 and 4.1, Definition 4.1, Definition 4.2 and Theorem 4.4, NNC polyhedra and their generators. BagnaraHZ09FMSD | Section 4, octagonal normal family and coherent signed encoding (PDF page indices 8–10, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Polyhedron_defs.hh; src/MIP_Problem_defs.hh; tests/Octagonal_Shape/frompolyhedron1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001164
    3. Best octagonal enclosure of Cartesian boxes UID: PPL-SPEC-001164 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(box,complexity) shall construct the least target-profile octagonal enclosure of the real Cartesian product represented by box. The source interval endpoint policy shall retain its open/closed meanings. For a nonempty product, an excluded finite endpoint may determine an included limiting bound in the closed result. Any empty factor shall make the result empty in the source ambient dimension; closing endpoints individually shall not turn an empty product into a nonempty one.

    For a signed binary normal, its exact support shall combine the two relevant source endpoint contributions before target conversion. The unary support shall be doubled before conversion to its stored target bound. Unbounded contributing endpoints shall leave the corresponding support unrestricted.

    For a nonempty source set X, let h(a) = supx ∈ Xa⋅x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

    The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee.

    The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

    Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

    RATIONALE:

    Independent interval supports combine into signed sums and differences. Rounding each coordinate first can lose a binary bound that is representable in the target profile, so optimal conversion depends on exact source combinations.

    INTERFACE:

    Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    template <typename Interval>
    explicit Octagonal_Shape(const Box<Interval>& box,
                             Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Derive the Cartesian set and signed support sums directly from rational endpoint values and openness. Check every binary sign, unary doubled bounds, empty factors, open touching endpoints, unbounded/free coordinates, fractional endpoint combinations, half-integral target precision, zero dimensions and all three complexity values. Require equality with the independently rounded primitive hull, including cases that distinguish combining source endpoints from first rounding separate unary bounds. Check source denotation, independent storage and failed-construction cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, signed-variable and doubled-unary encoding (PDF page index 9, zero-based).

    SOURCE:

    src/Shape_Conversion_Support.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Box_defs.hh; tests/Octagonal_Shape/frombox1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

  • PPL-SPEC-001165
    4. Best octagonal enclosure of rational grids UID: PPL-SPEC-001165 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(grid,complexity) shall construct the least target-profile octagonal enclosure of the entire rational grid. The constructed octagonal set shall have the real carrier in 🔗 1. Octagonal values, numerical profiles and valid use and shall enclose every source grid point under its line and integer-parameter semantics. Integral target bound storage shall not change that result carrier.

    For a nonempty grid, a signed primitive normal shall have a finite supremum exactly when it annihilates every line direction, every integer-parameter direction and every difference between its generating base points. In that case the normal shall be constant with its value at any base point. Otherwise its support shall be unbounded in both signs. Implied signed equalities shall be retained whether or not they appear as individual rows of a chosen congruence basis. Periodic restrictions that do not imply such an equality shall impose no finite bound.

    For a nonempty source set X, let h(a) = supx ∈ Xa⋅x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

    An empty grid shall give empty in its original ambient dimension. The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee.

    The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

    Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

    RATIONALE:

    The convex enclosure of an unbounded affine lattice retains its constant linear forms. A particular congruence basis must not conceal a signed equality that the whole grid entails.

    INTERFACE:

    Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(const Grid& grid,
                             Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use raw rational base points, integer parameters and real lines. Independently compute dot products for all signed primitive normals, including consequences of combinations of non-octagonal congruences. Include fractional constants, skew parameters, multiple generating points, free axes, nonadjacent signed relations, empty/zero dimensions and every complexity value. Compare the least target-profile hull across equivalent grid bases and normalization histories; check source preservation, ownership and resource-failure cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and the rational parameter representation (PDF page indices 9–10, zero-based). BagnaraDHMZ07 | Section 3, The Generator Representation, real lines, integer parameters and generating points (PDF page index 7, zero-based). BagnaraHZ09FMSD | Section 4, octagonal signed normal family (PDF page index 9, zero-based).

    SOURCE:

    src/Shape_Conversion_Support.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/Grid_defs.hh; tests/Octagonal_Shape/fromgrid1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

  • PPL-SPEC-001166
    5. Best octagonal enclosure of bounded-difference shapes UID: PPL-SPEC-001166 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(bd,complexity) shall construct the least target-profile octagonal enclosure of the real set represented by bd at entry. Signed sum and difference supports shall include all consequences of the source bounded-difference conjunction, including signed sums obtained by combining source unary restrictions. Source and target numerical profiles may differ; integer source bounds shall still describe real coordinates.

    The constructor shall preserve empty and zero-dimensional source meanings. The three declared complexity values shall be accepted and ignored; the conversion shall use a polynomial-complexity algorithm without changing its precision guarantee. Equivalent source descriptions and normalization histories shall not discard a supported relation.

    For a nonempty source set X, let h(a) = supx ∈ Xa⋅x. For each sign s ∈ { − 1, 1}, the unary restriction shall be 2sxi ≤  ↑ T(2h(sei)). For each pair of distinct coordinates and signs si, sj ∈ { − 1, 1}, the binary restriction shall be sixi + sjxj ≤  ↑ T(h(siei + sjej)). Here  ↑ T(q) shall be the least admitted target bound not smaller than the exact value q, using positive infinity when no finite target bound suffices. An unbounded source support shall impose no finite restriction. These bounds shall be those obtained from exact source supports, including the unary factor of two, before target rounding. The conjunction of these restrictions shall define the least target-profile enclosure. Integral bound storage shall retain the real carrier and shall not imply exact rational half-sum closure, as specified in 🔗 1. Octagonal values, numerical profiles and valid use.

    The result shall inherit the source's ambient dimension and own its storage independently, as in 🔗 3. Owned octagonal copying, assignment and cleanup. Successful construction and logically const source normalization shall preserve the source's represented set and ambient dimension. Later source mutation or destruction shall not affect the constructed value.

    A source dimension above max_space_dimension() shall throw std::length_error before allocating the corresponding matrix storage. Empty and zero-dimensional values shall retain the meanings in 🔗 2. Dimensioned empty and universe octagonal construction.

    Sources shall remain live, valid and synchronized throughout construction. The profile, descriptor, initialization and native floating runtime prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply, together with the source domain's numerical prerequisites. For admitted inputs, the implementation shall respect the preconditions of the numerical policies it selects for intermediate operations. Underlying numerical or resource exceptions may propagate through their declared channels. Failure during construction shall release resources acquired by the incomplete result; the source's cache representation need not be rolled back.

    RATIONALE:

    Bounded differences are an octagonal subclass, but changing the bound profile can alter the best representable signed sums. Optimal conversion depends on the complete source set before rounding target constants.

    INTERFACE:

    Public header: <ppl.hh>; constructor of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    template <typename U>
    explicit Octagonal_Shape(const BD_Shape<U>& bd,
                             Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Decode independently supplied bounded-difference halfspaces and use rational elimination to compute all octagonal supports. Include correlated chains, signed sums implied by unary bounds, fractions, integral and native source profiles, half-integral target bounds, all three complexity values and source closure/cache histories. Require the least target-profile enclosure, not only containment. Preserve empty/zero dimensions, source denotation and independent lifetime; verify construction cleanup after admitted resource failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 3.1, bounded-difference encoding, and Section 4, signed-variable octagonal encoding (PDF page indices 5 and 9, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeconversionsspec1.cc; tests/octagonalshapeconversionsfailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapeconversionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeconversionspublic1.cc; src/BD_Shape_defs.hh; tests/Octagonal_Shape/frombdshape1.cc; tests/Octagonal_Shape/dimensionlimits1.cc; tests/Octagonal_Shape/supportconversion1.cc.

  • PPL-SPEC-001198
    1. Unrestricted octagonal coordinate extension UID: PPL-SPEC-001198 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry set X ⊆ ℝn, add_space_dimensions_and_embed(m) shall produce exactly X×ℝm in dimension n + m. Original coordinates shall retain their indices and relationships. New coordinates, in positions n, …, n + m − 1, shall be unrestricted. Empty input shall remain empty in the larger space. The zero-dimensional universe shall extend to the universe. Adding zero coordinates shall preserve the value.

    A final dimension exceeding max_space_dimension() shall throw std::length_error before attempting the corresponding matrix allocation. The check shall reject a count whose mathematical sum with the current dimension exceeds the range of dimension_type; arithmetic wraparound shall not turn an excessive request into a smaller successful extension. Rejected dimension requests shall preserve the entry set and dimension.

    The ordered product with an independently represented second set is specified by 🔗 7. Ordered Cartesian concatenation of octagonal values.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Unrestricted extension adjoins free axes while preserving every original relationship.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void add_space_dimensions_and_embed(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare with an independent halfspace lift whose new coefficients are zero. Include empty, universe and zero-dimensional values, coupled original axes, zero/one/multiple new axes, cached and uncached descriptions, unchanged indices and overflow-sized requests.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/addspacedims1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001199
    2. Zero-fixed octagonal coordinate extension UID: PPL-SPEC-001199 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry set X ⊆ ℝn, add_space_dimensions_and_project(m) shall produce exactly X×{0}m in dimension n + m. Original coordinates shall retain their indices and relationships. Every new coordinate, in positions n, …, n + m − 1, shall equal zero. Empty input shall remain empty in the larger space. The zero-dimensional universe shall extend to the origin. Adding zero coordinates shall preserve the value.

    A final dimension exceeding max_space_dimension() shall throw std::length_error before attempting the corresponding matrix allocation, including a mathematical sum outside the range of dimension_type. Rejected dimension requests shall preserve the entry set and dimension. Unrestricted extension is specified separately by 🔗 1. Unrestricted octagonal coordinate extension.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Extension at zero fixes all new coordinate values and therefore differs from adjoining free axes.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void add_space_dimensions_and_project(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Add independent positive and negative zero halfspaces for every new axis and compare complete real sets. Include correlated original axes, empty/universe, zero-dimensional inputs, zero/one/multiple new axes, representation histories and excessive counts without allocating the requested matrix.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/addspacedims1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • 3. Existential removal of selected octagonal coordinates UID: PPL-SPEC-001200 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry set X ⊆ ℝn and selected entry indices S, remove_space_dimensions(vars) shall existentially eliminate those coordinates. If i0 < ⋯ < im − 1 are the indices outside S, the concrete result shall be

    {(xi0, …, xim − 1) ∣ x ∈ X} ⊆ ℝm.

    Survivors shall be compacted in that ascending order. Removing no coordinates shall preserve the value. Removing a constrained coordinate shall retain relationships implied between surviving coordinates, subject to the stated numerical precision.

    With exact computational arithmetic, including exact halving where needed, the result shall equal that projection. For rounded profiles the result shall contain it; closure and bound rounding may yield a less precise enclosure. Integral bound storage shall retain its real-set interpretation, including half-integral points. Empty input shall remain empty in the resulting ambient dimension; a nonempty set projected onto no coordinates shall become the zero-dimensional universe.

    Every selected index shall be inside the entry space. An out-of-space selection shall throw std::invalid_argument before changing the represented set or dimension, including for empty input. The Variables_Set argument shall remain unchanged.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Existential projection preserves feasible surviving valuations and cannot be implemented by discarding all clauses mentioning an eliminated coordinate.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Independently eliminate selected columns from rational halfspaces and compact survivors. Check all/none/nonadjacent selections, retained relations through removed coordinates, signed sums and differences, equalities, half-integral real points, lazy contradictions, empty/universe, cache histories, selection preservation and invalid indices. Require equality for exact arithmetic and containment for rounded profiles.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/removespacedims1.cc.

  • PPL-SPEC-001201
    4. Existential removal of trailing octagonal coordinates UID: PPL-SPEC-001201 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry set X ⊆ ℝn, remove_higher_space_dimensions(k) shall remove indices k, …, n − 1 and retain the prefix in its original order. Its concrete result shall be {(x0, …, xk − 1) ∣ x ∈ X} ⊆ ℝk. Calling it with k = n shall preserve the value.

    With exact computational arithmetic, including exact halving where needed, the result shall equal that projection. For rounded profiles the result shall contain it; closure and bound rounding may yield a less precise enclosure. Integral bound storage shall retain its real-set interpretation, including half-integral points. Empty input shall remain empty in the resulting ambient dimension; a nonempty set projected onto no coordinates shall become the zero-dimensional universe.

    The requested prefix length shall satisfy k ≤ n. A larger value shall throw std::invalid_argument before changing the represented set or dimension, including for empty or zero-dimensional input. Selected-coordinate removal is specified by 🔗 3. Existential removal of selected octagonal coordinates.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Prefix projection retains implied constraints between lower-index coordinates while removing only the declared suffix.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void remove_higher_space_dimensions(dimension_type k);
    
    VERIFICATION_CRITERIA:

    Independently project raw rational halfspaces onto every prefix, including zero and the full entry length. Check signed constraints mediated by removed axes, half-integral values, empty/lazy-empty and universe, representation histories, repeated projections and invalid prefix lengths. Check exact equality and rounded containment according to the contract.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/removespacedims1.cc; tests/Octagonal_Shape/addspacedims1.cc.

  • PPL-SPEC-001202
    5. Injective partial remapping of octagonal coordinates UID: PPL-SPEC-001202 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    map_space_dimensions(mapping) shall existentially discard entry coordinates outside the mapping domain and place each retained coordinate i at target index f(i). For a positive-dimensional receiver, the admitted mapping shall be a partial injection from {0, …, n − 1} with image exactly {0, …, m − 1} for some m ≤ n. The concrete result shall be

    {(xf − 1(0), …, xf − 1(m − 1)) ∣ x ∈ X}.

    The result shall have dimension m. An empty mapping shall project to the zero-dimensional value. A permutation shall retain all renamed relationships; an identity mapping shall preserve the value. The exactness, rounded enclosure and empty-set guarantees of 🔗 3. Existential removal of selected octagonal coordinates shall apply to the projection part.

    The mapping type shall supply logically const has_empty_codomain(), max_in_codomain() and maps(i,j) queries with the meanings of [LINK: PPL-SPEC-000004], 🔗 5. Exact empty-codomain query and 🔗 6. Largest image and defined empty-map failure. Queries shall describe one stable mapping throughout the call. A zero-dimensional receiver shall remain unchanged without querying the mapping. Otherwise has_empty_codomain() shall be queried first; when it returns true, neither remaining query shall be called. For a nonempty image the maximum query shall precede individual mapping queries. No fixed count or order of maps queries shall be required. The mapping's value shall remain unchanged apart from effects explicitly permitted by its query contract.

    Violating injectivity, source bounds, the contiguous-image condition or query consistency shall be outside admitted use. In particular, output-index holes shall not denote newly introduced free coordinates. Exceptions from mapping queries shall propagate; no rollback of the receiver shall be inferred after such an exception.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Projection and a one-to-one coordinate relabeling preserve coordinate identity; a contiguous output image makes the resulting ambient dimension unambiguous.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    template <typename Partial_Function>
    void map_space_dimensions(const Partial_Function& mapping);
    
    VERIFICATION_CRITERIA:

    Compare independent projection followed by column permutation for every valid partial injection on small dimensions, including sparse domains, reversed and cyclic orders, all/none retention, correlated halfspaces and cache histories. Check the query protocol with a recording mapping, no queries for zero dimensions and no maximum/maps query for an empty image. Inject query exceptions and verify propagation, temporary cleanup and safe replacement/retry. Review invalid-map preconditions without invoking undefined mappings. Check verified identity maps without temporary C++ allocation, unchanged cached representations and owned capacity after copying and grow/shrink histories. Compare first/last/middle swaps, reversal, cycles and projections against literal coordinate oracles; preserve floating-point mode/flags. Inject every mapping-query exception and check propagation, safe replacement and temporary cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/mapspacedims1.cc. tests/coordinatemappingfixture.hh;

  • PPL-SPEC-001203
    6. Octagonal coordinate expansion by independent fibers UID: PPL-SPEC-001203 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an existing entry coordinate v < n, expand_space_dimension(var,m) shall append coordinates in positions n, …, n + m − 1, retaining the original coordinate positions. Let X ⊆ ℝn be the entry set and let u[v ← a] denote replacing coordinate v of the old-coordinate prefix of u by a. The declared octagonal result shall be the independent-fiber relation

    {u ∈ ℝn + m  ∣ (u0, …, un − 1) ∈ X ∧n + m − 1⋀j = nu[v ← uj] ∈ X}.

    Each replica shall reproduce the selected coordinate's restrictions against retained original coordinates. Equality with the original coordinate or between replicas shall hold only when implied by those restrictions. The result shall contain the generic common-replica expansion relation in [LINK: PPL-LLR-000444]. The displayed relation is itself octagonal. Exact copying of admitted entry bounds shall preserve it; delegated computational rounding shall retain the numerical guarantees of 🔗 1. Octagonal values, numerical profiles and valid use.

    Empty input shall remain empty. Zero replicas shall preserve the value after validating var. An out-of-space variable shall throw std::invalid_argument, including for empty input or zero replicas. A final dimension above max_space_dimension() shall throw std::length_error, including a count whose mathematical sum with the current dimension would exceed dimension_type. These rejected requests shall preserve the entry set and dimension.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Independent fibers retain relationships with other coordinates while allowing distinct admissible values for the original coordinate and each replica.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void expand_space_dimension(Variable var, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Independently substitute each new coordinate for the selected axis in source halfspaces, conjoin with the lifted entry set and compare all real constraints. Check multiple replicas taking different values, unary limits, signed correlations with retained axes, forced equalities, empty/universe, cache histories, zero replicas and invalid/oversized requests.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure. GopanDMDRS04 | Sections 4.2-4.5, background on summarized-dimension expansion and folding.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/expandspacedim1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001204
    7. Alternative-coordinate folding of octagonal values UID: PPL-SPEC-001204 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    fold_space_dimensions(vars,dest) shall combine the alternatives obtained by retaining the entry destination value or choosing the value of any entry coordinate in vars for that destination, then existentially remove every folded coordinate. Surviving indices, including the destination's resulting index, shall be compacted in ascending original order. Other surviving coordinates shall retain their entry meanings within each alternative.

    With exact computational arithmetic, including exact halving where needed, the result shall be the least closed octagonal enclosure of the union of those alternatives: each signed unary or binary bound shall be its supremum over that union. The union may be nonconvex. Rounded profiles shall produce a sound enclosure with the numerical guarantees of 🔗 1. Octagonal values, numerical profiles and valid use; they need not produce the least octagonal enclosure. Empty input shall remain empty in the reduced ambient dimension. Empty vars shall preserve the value after checking the destination.

    The destination and every folded coordinate shall belong to the entry space, and the destination shall not be in vars. An invalid coordinate or a selection containing the destination shall throw std::invalid_argument before changing the entry set or dimension. This validation shall also apply to empty input. The Variables_Set selection shall remain unchanged.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Folding summarizes alternative source values at one retained coordinate and then projects away the folded axes; a closed convex enclosure can fill gaps between alternatives.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void fold_space_dimensions(const Variables_Set& vars, Variable dest);
    
    VERIFICATION_CRITERIA:

    Independently project each possible destination-substitution alternative and take the maximum rational support for every signed octagonal normal. Include destination positions before, between and after folded axes, multiple folds, coupled coordinates, disjoint interval alternatives, empty/universe, zero selections, representation histories, rounded profiles and invalid selections. Check the selection is unchanged.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure. GopanDMDRS04 | Sections 4.2-4.5, background on summarized-dimension expansion and folding.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/foldspacedims1.cc; tests/Octagonal_Shape/expandspacedim1.cc.

  • PPL-SPEC-001205
    8. Dimension-preserving forgetting of octagonal coordinates UID: PPL-SPEC-001205 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry set X ⊆ ℝn and selected indices S, unconstrain(vars) shall retain ambient dimension n and have concrete result

    {y ∈ ℝn ∣ ∃x ∈ X ∀i ∉ S : yi = xi}.

    unconstrain(var) shall have the same meaning for the singleton selection containing var. Retained coordinates shall keep their original indices; selected coordinates shall be free. Relationships implied between retained coordinates shall be preserved with the declared projection precision.

    With exact computational arithmetic, including exact halving where needed, the result shall equal this cylindrification. Rounded profiles shall contain it and may be less precise through closure and bound rounding. Empty input shall remain empty; forgetting every coordinate of a nonempty input shall produce the universe in the same ambient dimension. Forgetting no coordinates shall preserve the value, including in zero dimensions. Integer storage shall still describe real points, including half-integral points.

    Every selected coordinate shall belong to the entry space. An out-of-space variable or selection shall throw std::invalid_argument before changing the represented set or ambient dimension, including for empty input. The Variables_Set argument shall remain unchanged. Coordinate removal, which also changes dimension, is specified by 🔗 3. Existential removal of selected octagonal coordinates.

    The supported coefficient profiles, real-set interpretation, initialization, numerical-intermediate, native floating-point runtime and synchronization conditions of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Supplied coordinate objects shall satisfy their own valid-use contracts. Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return; the receiver shall remain safely destructible, but preservation of its entry represented set shall not be inferred unless stated above.

    RATIONALE:

    Forgetting eliminates selected values existentially and then restores free positions, preserving the identities of all retained coordinates.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void unconstrain(Variable var);
    void unconstrain(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Independently eliminate selected columns and restore unconstrained columns at their original indices. Check both overloads, all/none/single/nonadjacent selections, retained signed relations mediated by forgotten axes, half-integral points, empty/lazy-empty, universe, zero dimensions, cache histories, unchanged selections and invalid dimensions. Require equality only under the exact-arithmetic guarantee and containment otherwise.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Whole work, journal background on signed octagonal bounds and closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapecoordinatesspec1.cc; tests/octagonalshapecoordinatespublic1.cc; tests/octagonalshapecoordinateallocationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapecoordinateoracle.hh; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/Octagonal_Shape/unconstrain1.cc.

  • PPL-SPEC-001234
    1. Human-readable octagonal presentation UID: PPL-SPEC-001234 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Stream insertion shall write false for a shape whose emptiness is already certified, and true for a universe shape, including their zero-dimensional forms. Otherwise it shall write a conjunction of the stored finite unary and signed binary bounds. A logically empty shape whose emptiness has not been classified may be displayed as a contradictory conjunction. Presentation shall not require computing strong closure or provide a canonical constraint list.

    Unary constraints shall precede binary constraints and shall be ordered by increasing coordinate identity. Each unary equality shall be displayed once; otherwise a finite lower side shall precede a finite upper side. For a stored unary bound on twice a coordinate, exact representable halving shall permit the form variable relation value. If such halving is not exact and representable in the selected bound profile, the doubled coefficient shall remain explicit. A sign may be moved to the coefficient side, including -2*variable <= bound, when this denotes the same halfspace. Printed relations, signs and constants shall retain the exact mathematical meaning of the stored bound.

    Binary constraints shall be ordered by increasing larger coordinate identity, then increasing smaller coordinate identity. Difference constraints for each pair shall precede sum constraints. Two opposite finite bounds that are additive inverses shall be displayed as one equality; other finite sides shall be displayed as non-strict inequalities. Difference forms may reverse the coordinate order and relation to display a nonnegative constant. Sum forms shall keep the smaller-index coordinate first. Positive-infinite sides shall not be displayed. Consecutive constraints shall be separated by ", "; no ambient-dimension header shall be inserted.

    Variable occurrences shall follow the active formatter and its live-callback prerequisites in 🔗 7. Active Variable formatter and initialized thread state and 🔗 8. Variable names, formatter dispatch and output failures. Bound values shall follow the admitted mathematical numeric stream output of 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration. Interpreted with their coordinate identities, the printed conjunction shall denote the source's represented real set.

    Insertion shall return the supplied stream reference without adding a newline or explicitly flushing it. print() shall send the same presentation to the current std::cerr. Both operations shall preserve the source set, ambient dimension, stored status, matrix and ownership. Stream and formatter failures shall retain their applicable state, exception-mask and partial-output behavior. Rendering callbacks shall not mutate or invalidate traversed source objects.

    The selected representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. The borrowed stream and its callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

    RATIONALE:

    A readable conjunction preserves the meaning of signed unary, difference and sum bounds without requiring normalization or confusing the display with a reloadable stored record. Retaining a doubled unary coefficient prevents inexact halving from changing the displayed set.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library:

    namespace IO_Operators {
      template <typename T>
      std::ostream& operator<<(std::ostream& stream,
                               const Octagonal_Shape<T>& value);
    }
    // Member of Octagonal_Shape<T>:
    void print() const;
    
    VERIFICATION_CRITERIA:

    Compare independent literal text and the exact rational meaning of printed constraints for certified and unclassified empty states, universe, unary halves, equalities, all binary signs, both inequality orientations, zero and negative constants, and absent infinite sides. Exercise native integer, floating, GMP and admitted unsigned profiles. Cover custom variable names, stream flags/locales, no newline, stream identity, stderr forwarding and throwing/failed streams or formatters. Check source records before and after presentation rather than warming the source to form the expected text. For binary native bounds, cover odd and even subnormal significands, both signs, signed zeros and neighbors of the normal/subnormal transition. Compare unary equalities and both inequality orientations with exact rational values, retaining doubled coefficients for unrepresentable halves. Check exactness classification independently of the FPU inexact flag, including destination aliases and preservation of the caller's rounding direction.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; src/globals_defs.hh; tests/Octagonal_Shape/outputcontracts1.cc; tests/Octagonal_Shape/writeoctagon1.cc; tests/octagonalshapevalueoracle.hh; tests/octagonalshapetextmemoryspec1.cc; tests/octagonalshapetextmemorypublic1.cc.

  • PPL-SPEC-001235
    2. Owned octagonal memory accounting UID: PPL-SPEC-001235 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall report the owned external storage of the pseudo-triangular bound matrix under 🔗 4. Owned backing storage and live-payload memory accounting, including its backing-row allocation, retained capacity, owned row metadata and external payload of every physically live selected coefficient. Logically empty shapes, inactive geometric content or reduced ambient dimensions shall not remove still-owned allocated capacity from the count. Borrowed views, independently owned runtime temporaries, other objects and allocator bookkeeping shall be excluded.

    total_memory_in_bytes() shall equal sizeof(Octagonal_Shape<T>) plus the external count. Sizes shall be those of the selected build/profile, and the sum shall fit memory_size_type. The selected live coefficient memory hooks shall be well-formed. Both queries shall preserve the source set, ambient dimension, stored status, matrix, ownership and lifetimes. They shall not classify emptiness or recompute strong closure.

    The selected representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Live owned storage shall remain unchanged during either query.

    RATIONALE:

    The logical number of constraints does not measure retained matrix capacity or multi-limb coefficient payloads. The enclosing object's fixed storage and its owned external allocation require distinct counts.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Compare total/external identity and independent owned-allocation observations for native matrices, then account separately for live GMP integer/rational payloads. Cover zero dimensions, copies, assignment, exchange, coordinate growth/removal, empty values and retained capacities. Preserve raw records and cache conditions; exclude allocator administration and reusable scratch.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_templates.hh; src/DB_Row_templates.hh; tests/Octagonal_Shape/membytes1.cc; tests/ormatrixoperationsspec1.cc; tests/boxallocationfixture.hh; tests/octagonalshapetextmemoryspec1.cc; tests/octagonalshapetextmemorypublic1.cc.

  • 1. Octagonal distance normalization, boundaries and workspaces UID: PPL-SPEC-001230 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty shape of ambient dimension n, let z2k = xk and z2k + 1 =  − xk for 0 ≤ k < n. The stored position (i, j) shall describe zj − zi ≤ bij. Let pi be zero for even i and one for odd i. The distance tuple shall contain exactly

    Dn = {(i, j) ∣ 0 ≤ i < 2n,  0 ≤ j < i + 2 − pi}.

    This is the physical pseudo-triangular domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates, with 2n(n + 1) positions. Its 2n diagonal positive-infinity sentinels shall each contribute zero. Its 2n2 other positions shall count each signed octagonal normal once: ±2xk for unary bounds and ±xk±xl for k < l. Unary bounds shall remain doubled in the tuple; the coherently equivalent matrix position shall not be counted again. A positive-infinite bound shall impose no restriction.

    The selected tables shall be those used after the call's required strong closure. With exact rational closure, finite entries shall be the primitive suprema of the represented set, with infinity for unbounded forms. Rounded or saturating closure, including integer halving, shall retain 🔗 1. Octagonal values, numerical profiles and valid use; selected tables need not be canonical, idempotent or invariant across alternative source descriptions. The distance shall use these selected tables, as retained in compatible post-call records of 🔗 1. Reloadable octagonal record export. It shall not denote minimum point separation or a Hausdorff distance. Normalization shall preserve each source's represented set and ambient dimension.

    Different ambient dimensions shall return false before modifying the result or supplied workspaces. False shall assign no distance for that pair. Dimension-compatible two-empty shapes shall have distance zero; exactly one empty shape shall have positive-infinite distance. In dimension zero, two universe shapes shall also have distance zero. These rules shall apply to logically empty sources whose emptiness has not yet been classified. Equal dimensions shall return true on successful numerical completion, with the value specified by 🔗 2. Rectilinear distance of octagonal closed-bound tables, 🔗 3. Euclidean distance of octagonal closed-bound tables or 🔗 4. Maximum-coordinate distance of octagonal closed-bound tables.

    The overload without an explicit temporary type shall use three Checked_Number<To,Extended_Number_Policy> workspaces. The overload with an explicit scalar Temp argument shall use three Checked_Number<Temp,Extended_Number_Policy> workspaces. The supplied-workspace overload shall use the actual type of its three references, which may be an admitted raw or checked numeric type. The supported operation, rounding, representation and overlap conditions of 🔗 20. Distance scratch storage, admissible overlaps and numeric conditions and 🔗 9. Distance workspace protocol and admissible overlaps shall apply to the selected metric specialization, subject to the public source-storage condition below.

    Calls evaluating finite entry differences shall use ROUND_DOWN or ROUND_UP, optionally combined with ROUND_STRICT_RELATION. Finite source conversions shall not have to be exact merely to establish the requested directed bound. Paths performing only exact zero or positive- infinity assignments shall admit directions valid for those selected scalar assignments. An output profile shall support positive infinity whenever that outcome is reachable. Every conversion, difference, sum, square, square root and final assignment shall satisfy its selected backend's arithmetic, range, numerical-failure, resource, initialization and nontrapping prerequisites. Native arithmetic shall retain configured support and initialized caller-owned FPU conditions; the call shall preserve caller rounding. Rational square-root precision shall remain stable throughout a dependent call.

    Sources shall be live valid objects under 🔗 1. Octagonal values, numerical profiles and valid use. The same shape may be supplied for both operands. The three mutable supplied workspaces shall be live, pairwise distinct and disjoint from source-owned storage. Their entry values need not have mathematical significance when overwritten before reading. The result shall have live assignable storage disjoint from source-owned storage, but may overlap one supplied workspace or its compatible underlying raw storage. When the result overlaps a workspace, the distance shall still use source values on entry. Callers shall preserve object/storage lifetimes and synchronize source access, including logically const cache updates.

    Numerical and recoverable resource failures shall retain their selected propagation channels and permitted partial result/workspace states; no aggregate rollback guarantee shall be inferred. Discarded owned temporaries shall be released, while reusable numerical cache storage shall retain its own lifetime and cleanup contract. Ordinary dimension mismatch shall retain the stronger unchanged-result/workspace guarantee above. Otherwise valid calls shall require no additional library initialization beyond their selected representation, numerical and thread runtime prerequisites.

    RATIONALE:

    A bound-array metric needs an explicit normalization convention, source carrier and numeric protocol. Exact semantic support tuples and rounded representation tuples have different invariance properties, while their empty/dimension outcomes and storage obligations remain explicit.

    INTERFACE:

    Public header: <ppl.hh>. This protocol applies to all nine free function overloads declared in 🔗 2. Rectilinear distance of octagonal closed-bound tables, 🔗 3. Euclidean distance of octagonal closed-bound tables and 🔗 4. Maximum-coordinate distance of octagonal closed-bound tables, in Parma_Polyhedra_Library. Their result, shape, rounding and optional three-workspace parameters retain those exact signatures.

    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Verify independent rational support closure, rounded selected-table norms and before/after denotation equality separately. Cover all nine forms, cold/classified/widened histories, lazy emptiness, zero dimensions, one-sided infinities, mismatched dimensions and unchanged sentinels. Test same-owner inputs, result aliases to each raw/checked workspace, different temporary/result profiles, required initialized native modes and caller-mode preservation. Measure and exercise meaningful allocation/cleanup paths, distinguishing C++ new/new[] observation from backend GMP allocation failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, coherent signed-variable encoding and Definition 5 of strong closure (PDF page indices 9–10, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/octagonalshapedistancespec1.cc; tests/octagonalshapedistanceoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapedistancepublic1.cc; tests/shapemetricboundaries1.cc; tests/octagonalshapedistancefailure1.cc; tests/boxallocationfixture.hh; tests/octagonalshapesaturationspec1.cc.

  • 2. Rectilinear distance of octagonal closed-bound tables UID: PPL-SPEC-001231 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Octagonal distance normalization, boundaries and workspaces, the three rectilinear_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For the physical tuple Dn defined by 🔗 1. Octagonal distance normalization, boundaries and workspaces and finite corresponding differences, the exact distance shall be ∑(i, j) ∈ Dndij, with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001230].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 6. Rectilinear distance of physical octagonal entry arrays.

    RATIONALE:

    The sum of absolute corresponding bound changes compares the selected signed-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    For exact rational closure, compute signed primitive suprema independently from rational conjunctions. For rounded profiles, decode the selected post-call physical tuples independently and check source-set preservation separately. Compare all three overload forms with exact tuple norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For rectilinear results compare the independent sum of absolute entry differences, including translated operands and differently signed entries.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/octagonalshapedistancespec1.cc; tests/octagonalshapedistanceoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapedistancepublic1.cc; tests/shapemetricboundaries1.cc; tests/octagonalshapesaturationspec1.cc.

  • 3. Euclidean distance of octagonal closed-bound tables UID: PPL-SPEC-001232 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Octagonal distance normalization, boundaries and workspaces, the three euclidean_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For the physical tuple Dn defined by 🔗 1. Octagonal distance normalization, boundaries and workspaces and finite corresponding differences, the exact distance shall be √(∑(i, j) ∈ Dnd 2ij), with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001230].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 7. Euclidean distance of physical octagonal entry arrays.

    Rational square-root enclosure shall retain 🔗 2. Finite rational square root at the selected irrational precision and the calling precision of 🔗 3. Selection and ownership of irrational rational precision, which shall remain stable throughout the dependent call.

    RATIONALE:

    The square root of the sum of squared bound changes compares the selected signed-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    For exact rational closure, compute signed primitive suprema independently from rational conjunctions. For rounded profiles, decode the selected post-call physical tuples independently and check source-set preservation separately. Compare all three overload forms with exact tuple norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For Euclidean results compare exact rational squares and test rational precision, rather than using a rounded reference square root.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/octagonalshapedistancespec1.cc; tests/octagonalshapedistanceoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapedistancepublic1.cc; tests/shapemetricboundaries1.cc.

  • 4. Maximum-coordinate distance of octagonal closed-bound tables UID: PPL-SPEC-001233 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Octagonal distance normalization, boundaries and workspaces, the three l_infinity_distance_assign overloads shall assign the requested directed approximation of the distance between the selected closed bound tables of their dimension-compatible operands. If both shapes are nonempty, corresponding finite bounds shall contribute dij = |bij(X) − bij(Y)|. Two positive-infinite entries shall contribute zero; exactly one positive infinity at any corresponding position shall make the distance positive infinity.

    For the physical tuple Dn defined by 🔗 1. Octagonal distance normalization, boundaries and workspaces and finite corresponding differences, the exact distance shall be max(i, j) ∈ Dndij, with zero for an empty tuple. The zero-dimensional, empty and dimension-incompatible cases shall follow [LINK: PPL-SPEC-001230].

    On successful numerical completion the operation shall return true. An upward result shall not be smaller than the exact selected-table distance and a downward result shall not be larger. A true Boolean shall not imply exactness or the best representable rounded bound. Valid inexact conversions to the selected temporary type shall retain these directed guarantees. The accumulation and finalization shall retain 🔗 8. Maximum-coordinate distance of physical octagonal entry arrays.

    RATIONALE:

    The largest absolute corresponding bound change compares the selected signed-bound descriptions while retaining an explicit mathematical meaning and numerical direction.

    INTERFACE:

    Public header: <ppl.hh>; free functions in Parma_Polyhedra_Library:

    template <typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir);
    
    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(
      Checked_Number<To, Extended_Number_Policy>& r,
      const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y, Rounding_Dir dir,
      Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    For exact rational closure, compute signed primitive suprema independently from rational conjunctions. For rounded profiles, decode the selected post-call physical tuples independently and check source-set preservation separately. Compare all three overload forms with exact tuple norms. Include translated nonzero operands, signed differences, infinity positions, identical owners, zero/empty cases and incompatible dimensions. Exercise exact and inexact temporary/result conversions, admitted aliases and supported configurations; verify source preservation and caller rounding. For maximum-coordinate results identify the exact greatest absolute entry difference independently and exercise both first and later maximum updates.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/distances_defs.hh; src/distances_inlines.hh; src/globals_defs.hh; doc/definitions.dox; tests/octagonalshapedistancespec1.cc; tests/octagonalshapedistanceoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapedistanceoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapedistancepublic1.cc; tests/shapemetricboundaries1.cc.

  • PPL-SPEC-001222
    1. Octagonal time evolution by nonnegative rates UID: PPL-SPEC-001222 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let X be the receiver's entry set and Y the rate argument's entry set, of the same ambient dimension n. time_elapse_assign shall replace the receiver by the least octagonal enclosure in the selected target profile of

    E(X, Y) = {p + λq ∣ p ∈ X,  q ∈ Y,  λ ≥ 0}.

    The abstraction and outward profile conversion shall have the meaning and arithmetic prerequisites of 🔗 2. Complexity-sensitive octagonal conversion from polyhedra for ANY_COMPLEXITY. Primitive bounds shall follow the signed supports and unary doubling of 🔗 1. Closed octagonal support hull of geometric generators. The carrier shall remain real even when the stored bounds are integers. A nonempty zero-dimensional pair shall remain the nonempty zero-dimensional value. Either empty operand shall make the result empty: a rate witness is required even at zero elapsed time. These meanings shall not depend on whether emptiness was already classified.

    For nonempty operands under exact rational arithmetic, each signed normal v ∈ {±2ei,  ±ei±ej (i < j)} with finite entry support supp ∈ Xv⋅p shall retain that bound precisely when supq ∈ Yv⋅q ≤ 0; a positive or unbounded rate support shall make that result direction unbounded. Already unbounded state supports shall remain unbounded. Different coordinates shall share the same elapsed time; their correlations may be lost only by the stated octagonal abstraction.

    Self-aliasing shall use both entry values. A distinct rate shape shall remain unchanged. Unequal operand dimensions shall throw std::invalid_argument before changing the represented receiver or rate value.

    The rate argument shall remain live and valid. A distinct rate argument shall preserve its represented value, and result storage shall remain independent of its lifetime.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership and remain safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    A rate set controls directions of unbounded evolution; zero elapsed time preserves states only when a rate witness exists. Primitive support bounds distinguish rate direction from independent coordinate translation.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void time_elapse_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Independently project exact rational state and rate supports and derive each retained or infinite result bound. Cross-check a homogenized common-time model on correlated examples. Exercise all rate signs, zero rates, lines, rays, fractional states, empty and lazy-empty operands, dimension zero, self-aliases, cache histories, profile conversions, source preservation and dimension rejection. Inject allocation failures in a separate executable.

    BIBLIOGRAPHY:

    HalbwachsPR97 | Sections 4.3.1–4.3.2, time-elapse operator; PDF page indices 19–20 (zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeevolutionspec1.cc; tests/octagonalshapeevolutionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeevolutionoracle.hh; tests/octagonalshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/octagonalshapeevolutionpublic1.cc; src/Polyhedron_public.cc; tests/Octagonal_Shape/timeelapse1.cc.

  • 2. Integer-point restriction on every octagonal coordinate UID: PPL-SPEC-001223 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the receiver's entry set X ⊆ ℝn, drop_some_non_integer_points(complexity) shall produce an octagonal set R satisfying

    X∩ℤn ⊆ R ⊆ X.

    The ambient dimension shall be preserved. An empty receiver shall remain empty, including an unclassified inconsistent system. Zero-dimensional empty and nonempty values shall retain their distinct meanings. Selected complexity classes shall bound permitted algorithmic work without changing which integer points must be preserved.

    The result may retain noninteger points. No least-integer-hull, strict precision improvement or removal of every fractional point shall be required. Integer storage of bounds shall not change the represented real carrier. Integral octagonal bounds shall not imply an integral polyhedron: doubled unary bounds and signed binary relations may retain half-integral points. An identity result shall be admitted even for an integral-bound profile whose entry set has no integer points; tight integer closure shall not be required by this interface.

    Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership and remain safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Integer restriction may improve a real convex abstraction while preserving every integer solution. Integral stored bounds can still admit half-integral real points, so this interface need not compute tight integer closure.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void drop_some_non_integer_points(
        Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Enumerate all integer candidates in independently bounded rational examples and verify their preservation; independently verify result inclusion in the entry halfspaces. Include fractional fixed points, negative and nonadjacent differences, affine equality fibers, unbounded integral rays, cache histories, zero dimensions, all supported complexity choices and admitted exact/inexact profiles. Do not treat an identity result as a failure without a stronger stated guarantee.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 6, especially Definitions 12–13 and the tightening rule (7); rational and integer octagonal semantics, PDF page indices 8 and 17 (zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeevolutionspec1.cc; tests/octagonalshapeevolutionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeevolutionoracle.hh; tests/octagonalshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/octagonalshapeevolutionpublic1.cc; tests/Octagonal_Shape/dropsomenonintegerpoints1.cc.

  • PPL-SPEC-001224
    3. Selected-coordinate integer restriction of octagonal values UID: PPL-SPEC-001224 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let S be the coordinates named by vars and X the receiver's entry set. drop_some_non_integer_points(vars,complexity) shall produce an octagonal set R with the same ambient dimension such that

    {p ∈ X ∣ pi ∈ ℤ for every i ∈ S} ⊆ R ⊆ X.

    Unselected coordinates shall retain their real interpretation. Their bounds may tighten through relations with selected coordinates; their fractional values shall not be discarded solely for being noninteger. An empty selection shall preserve the entry set. Empty, lazy-empty and zero-dimensional meanings shall be preserved. The global overload of 🔗 2. Integer-point restriction on every octagonal coordinate shall have the meaning of selecting every coordinate. All admitted complexity choices shall retain this preservation obligation; no least-hull or mandatory strict improvement shall be inferred.

    Every selected coordinate shall be within the receiver dimension. An excess coordinate shall throw std::invalid_argument before represented-set modification, including for empty receivers and integral-bound profiles. The valid-use conditions of 🔗 1. Public coordinate-index set and value lifecycle shall govern the selection.

    Any evaluated scalar floor, conversion and bound adjustment shall satisfy the selected arithmetic profile's numerical and range prerequisites. The selection shall remain live, valid and unchanged throughout the call.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership and remain safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Mixed integer and real modeling requires preserving whole real fibers above selected integer coordinates. Relational propagation may tighten an unselected coordinate without making it integral.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void drop_some_non_integer_points(
        const Variables_Set& vars,
        Complexity_Class complexity = ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Independently enumerate selected integer assignments in bounded examples, retain exact rational free-coordinate slices and prove each slice is contained in the result by elimination. Check result inclusion in the entry set separately. Cover empty/full/nonadjacent selections, fractional unselected frames, one-coordinate versus joint restriction, translated equalities, unbounded slices, repeated histories, dimension rejection and preserved selection ownership.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 6, especially Definitions 12–13 and the tightening rule (7); rational and integer octagonal semantics, PDF page indices 8 and 17 (zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeevolutionspec1.cc; tests/octagonalshapeevolutionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeevolutionoracle.hh; tests/octagonalshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/octagonalshapeevolutionpublic1.cc; tests/Octagonal_Shape/dropsomenonintegerpoints1.cc.

  • PPL-SPEC-001225
    4. Bounded-integer wrapping and guarded evolution of octagonal shapes UID: PPL-SPEC-001225 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    wrap_assign shall interpret widths, representations and overflow modes under 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes. For the receiver's entry set X and selected coordinate set S, the result shall conservatively contain every concrete selected-integer outcome, filtered by a supplied guard on the resulting coordinates. Unselected coordinates of each concrete outcome shall retain their entry values. The returned set shall remain a octagonal abstraction; relational implications, modular disjunctions and guard precision may be approximated.

    For OVERFLOW_WRAPS, each selected integer shall be reduced to its signed or unsigned residue. OVERFLOW_IMPOSSIBLE shall preserve every transition whose selected input integers are within the modeled machine range and may discard overflowing transitions. OVERFLOW_UNDEFINED shall permit every modeled bounded-integer result after an overflowing arithmetic result; no particular residue shall be selected as its required meaning. Result bounds shall retain the profile's outward-conversion conditions. This arithmetic-result interpretation shall not claim to model other effects of language undefined behavior.

    The selection and any nonnull guard shall satisfy their documented coordinate-dependency admission: the guard may use general or strict linear rows, but shall depend only on selected coordinates and its ambient dimension shall not exceed vars.space_dimension(). Each selected coordinate shall be within the receiver dimension. Violating these dimension bounds shall throw std::invalid_argument before represented-set modification, including empty receivers and selections. Nonzero guard coefficients outside the selection shall be outside this contract's admitted inputs. A supplied guard shall use the valid descriptor context of 🔗 1. Constraint relation meaning and numerical prerequisites and 🔗 14. Constraint-system conjunction, construction and shared contradiction.

    With an empty selection and null guard the receiver's represented set shall be unchanged. With a supplied dimension-compatible constant guard it shall perform conservative refinement; a false constant shall make the result empty. Empty receivers shall remain empty. Fractional input points on selected coordinates may be discarded, and fractional points may remain inside the result. A lower complexity_threshold or wrap_individually=true may permit less precision, but shall not permit loss of any required concrete outcome. No universal least-hull, progress or monotonic-precision guarantee between different parameter choices shall be inferred.

    Only named width, representation and overflow enumerators shall be admitted. Modeled 128-bit widths shall not require a native 128-bit scalar or a 128-bit configured coefficient. Actual intermediate machine-limit, quadrant, translation, conversion and descriptor arithmetic shall satisfy the selected backend's supported range and numerical prerequisites. In particular, a modeled width alone shall not establish that configured Coefficient can compute every intermediate power of two or translation. Variables shall use 🔗 1. Public coordinate-index set and value lifecycle's valid-use conditions.

    The selection and any supplied guard shall remain live, valid and unchanged throughout the call. Their independent storage shall remain owned by the caller.

    The supported-profile, initialization, rounding, range, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply.

    Underlying numerical, allocation or cooperative-abandonment failures may propagate. Owned temporary resources shall be released; surviving objects shall retain valid ownership and remain safely destructible. No general receiver rollback guarantee shall be inferred.

    RATIONALE:

    Wrapping interprets equivalence classes of machine integers while a relational abstraction preserves only representable consequences. Guard refinement must concern translated values and must remain sound when precision limits force a coarser result. The wrapping-specific source supplies machine-integer residue and guard semantics beyond the journal paper's octagonal representation results.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void wrap_assign(const Variables_Set& vars,
                     Bounded_Integer_Type_Width w,
                     Bounded_Integer_Type_Representation r,
                     Bounded_Integer_Type_Overflow o,
                     const Constraint_System* cs_p = nullptr,
                     unsigned complexity_threshold = 16,
                     bool wrap_individually = true);
    
    VERIFICATION_CRITERIA:

    Independently enumerate selected integer input slices and derive residues with unbounded division and nonnegative remainders. For overflow uncertainty enumerate admitted machine values in small widths and use analytic machine-range models at larger widths. Apply guards to resulting slices, then check inclusion by rational elimination. Cover signed/unsigned, all three overflow choices, all modeled widths including 128 with capable arithmetic, fractional free frames, unbounded inputs, null/strict/constant/relational guards, sparse padded dependencies, both precision flags, several thresholds, ownership and early dimension rejection. Keep generic delegated checks distinct from octagon-specific interface checks.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7, octagonal representation and outward arithmetic, PDF page indices 8 and 20–23 (zero-based). SimonK07 | Sections 2.2 and 5.1–5.4, bounded interpretations, explicit wrapping and guard precision; PDF page indices 2 and 7–10 (zero-based).

    SOURCE:

    src/wrap_assign.hh; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeevolutionspec1.cc; tests/octagonalshapeevolutionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeevolutionoracle.hh; tests/octagonalshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/octagonalshapeevolutionpublic1.cc; src/wrap_assign.hh; tests/Octagonal_Shape/wrap1.cc.

  • PPL-SPEC-001226
    5. Topological closure identity for octagonal values UID: PPL-SPEC-001226 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    topological_closure_assign shall preserve the represented set and ambient dimension of every valid octagonal value. These values are already topologically closed under 🔗 1. Octagonal values, numerical profiles and valid use, including lower-dimensional sets, unbounded sets, universe and empty values in every supported dimension. The operation shall preserve the owned representation and cache state. It shall not run strong closure, tight integer closure, allocation or numerical arithmetic, nor invoke cooperative-abandonment callbacks.

    An unclassified inconsistent representation shall continue to denote empty; forcing an emptiness query shall not be a precondition for this identity. Storage ownership and validity shall be preserved. No additional numerical rounding setup or library initialization beyond the valid object's existing context shall be required; the caller's FPU rounding direction shall remain unchanged.

    RATIONALE:

    Topological closure is a semantic operation on represented points. Closed signed unary and binary inequalities already express a closed set, independently of whether their graph representation has been normalized.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts for Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void topological_closure_assign();
    
    VERIFICATION_CRITERIA:

    Compare exact independent halfspace denotations before and after repeated calls on empty/lazy-empty/universe, affine, bounded and unbounded models. Check dimensions, source lifetime/ownership, numerical profiles and caller-FPU preservation without requiring graph-cache changes.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, rational octagonal graphs and shapes defined by non-strict signed inequalities; PDF page index 8 (zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapeevolutionspec1.cc; tests/octagonalshapeevolutionoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeevolutionoracle.hh; tests/octagonalshapeevolutionfailure1.cc; tests/boxallocationfixture.hh; tests/bdshapeconvergenceoracle.hh; tests/bdshapeoperationoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/wrappingoracle.hh; tests/boxqueryoracle.hh; tests/octagonalshapeevolutionpublic1.cc.

  • PPL-SPEC-001240
    1. Export of octagonal unary constraints through a destination protocol UID: PPL-SPEC-001240 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a destination of dimension m at least the source dimension n, export_interval_constraints(dest) shall restrict only the corresponding first n coordinates using outward unary consequences of the source. The destination's ambient dimension and coordinate identities shall be retained, and no pre-existing restriction shall be weakened. Source strong closure may update its stored bounds and cache while preserving its represented real set X and ambient dimension.

    Let D be the entry destination set and H(X) the Cartesian hull of the source set. A successfully completed export shall produce a destination set D’ satisfying

    D∩(H(X)×Rm − n) ⊆ D’ ⊆ D.

    With unbounded exact rational source closure and exact destination restrictions, the result shall equal that intersection. Other numerical profiles may lose unary information; no best-hull or canonical-bound claim shall follow for them. Existing destination correlations may propagate a restriction to other coordinates; the exporter shall select no coordinate outside the source's ambient space.

    A finite stored weight of 2xi shall yield an upper callback bound obtained by halving outward toward positive infinity. A finite stored weight li of  − 2xi shall yield a lower callback bound obtained from  − li ⁄ 2, outward toward negative infinity when it has the indicated native representation. Callback values shall be supplied as finite native T values, after the outward computation in the shape's extended coefficient type. A positive-infinite stored side shall impose no finite restriction.

    For bounded unsigned integer storage, a positive finite li denotes a negative lower endpoint that no finite native T value can express. That lower side shall be omitted. The zero lower side shall still export zero. Upper sides and other coefficient profiles shall retain their stated outward restrictions. A reserved extended-number encoding shall not be passed as an ordinary finite callback bound.

    An empty source shall invoke dest.set_empty(). A zero-dimensional universe shall contribute no restriction. A destination of smaller ambient dimension shall cause std::invalid_argument before source normalization or any restrictive callback, including for empty sources. Each restriction callback shall return false exactly when its destination is empty; such a result shall stop further restriction callbacks. No fixed callback count or coordinate order shall be required.

    The destination protocol shall perform the indicated conjunctions, preserving its existing restrictions and all coordinate identities. If its own arithmetic is approximate, a successful restriction shall contain the intersection of its entry set with the supplied halfspace and remain within its entry set. The destination, its callback environment and any borrowed storage shall remain live throughout the call. Callbacks shall not mutate or invalidate the source being traversed.

    The selected representation, numerical runtime, initialized facilities, arithmetic-range and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Configured native-format admission and caller-owned FPU prerequisites shall apply when the selected T uses native floating arithmetic; nonfloating instances shall need no FPU environment. Recoverable numerical, resource or callback exceptions may propagate. A callback failure may leave the destination partially restricted, with the states and ownership guaranteed by that destination's operations; no aggregate rollback shall be inferred. Source cache updates shall retain their applicable failure guarantees, and discarded owned temporaries shall be released.

    RATIONALE:

    A unary callback protocol transfers interval information into destinations larger than the source and into abstractions with their own restrictions. Doubled octagonal unary weights require directed halving. An unsigned native endpoint cannot express a negative lower bound, so omitting that side preserves containment without reinterpreting an infinity encoding as a positive finite restriction.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    template <typename U>
    void export_interval_constraints(U& dest) const;
    
    // Required destination capabilities:
    dimension_type U::space_dimension() const;
    void U::set_empty();
    bool U::restrict_lower(dimension_type dim, const T& lower);
    bool U::restrict_upper(dimension_type dim, const T& upper);
    
    VERIFICATION_CRITERIA:

    Derive exact rational coordinate projections independently of the exporter. Use a native-T-only destination protocol that rejects implicit checked-number callback types. Verify exact rational hull intersections, directed integral odd halves, native floating boundaries, empty and zero-dimensional sources, latent infeasibility, ignored infinite sides, larger destinations and retained extra coordinate identities. Check unsigned positive lower weights of both parities are omitted, zero lower weights are exported, upper restrictions remain effective and source points are never excluded. Exercise short-circuit empty returns, throwing callbacks, too-small destinations before callbacks, source denotation preservation and supported resource-failure cleanup. Test actual no-FPU configurations without imposing floating-runtime prerequisites on nonfloating instances.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape_inlines.hh; src/checked_int_inlines.hh; doc/definitions.dox; tests/Octagonal_Shape/exportintervalconstraints1.cc; tests/octagonalshapeintervalexportspec1.cc; tests/octagonalshapeintervalexportpublic1.cc.

  • PPL-SPEC-001236
    1. Native interval-affine image UID: PPL-SPEC-001236 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating-point boundary type T, a valid coordinate k and a dimension-compatible Linear_Form<Interval<T,Interval_Info>> with bounded coefficient intervals Ai and bounded constant interval B, affine_form_image(k,lf) shall contain every successor

    {y ∣ ∃x ∈ X,  b ∈ B,  ai ∈ Ai : yk = b +  ∑iaixi ∧ ∀j ≠ k,  yj = xj}.

    Coefficient and constant choices shall be independent as specified by 🔗 1. Interval-linear-form meaning and numerical prerequisites . The result shall use outward numerical bounds; interval uncertainty and the restricted octagonal language may lose precision, without a general least-enclosure guarantee. Constraints involving only unchanged coordinates shall remain valid. The source form and its coefficient intervals shall retain their values. An empty coefficient or constant interval shall make the receiver empty.

    The selected native format, interval representation, initialized numerical runtime, caller-owned upward FPU environment and arithmetic/resource prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use and 🔗 1. Interval-linear-form meaning and numerical prerequisites shall hold. Bounded intervals shall satisfy their stored-value and endpoint-access prerequisites. Unbounded coefficients are outside this operation's documented admission. Native availability shall follow the corresponding configured supported-format predicate.

    The ambient dimension shall remain unchanged. Empty input shall remain empty after validation. An invalid selected coordinate or a form of greater ambient dimension shall throw std::invalid_argument before changing the represented set, including on empty input. Allocation and numerical exceptions may propagate; discarded temporaries shall release owned storage and the receiver shall remain destructible, without an additional rollback guarantee. Callers shall synchronize shared owners and facilities.

    RATIONALE:

    Interval coefficients represent independent uncertainty rather than fixed rational scalars; their choices must be included together with correlated input states.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    template <typename Interval_Info>
    void affine_form_image(
        Variable var, const Linear_Form<Interval<T, Interval_Info>>& lf);
    
    VERIFICATION_CRITERIA:

    Independently enumerate finite coefficient corners and project each old/new affine relation, then derive the union supports; check conservative inclusion with constant, ±unit, uncertain-sign and general coefficients, zero tails and unbounded source directions. Include supported formats, caller FPU preservation, source-form preservation, empty input/choice sets, dimension errors and resource failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (journal background on octagonal shapes and floating implementation). Mine04 | Sections 5 and 6.1, Assignments (interval-coefficient affine transfer).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape1.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

  • PPL-SPEC-001237
    2. Conservative interval-linear-form inequality refinement UID: PPL-SPEC-001237 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating boundary type T, let X be the receiver's entry set and let L(x) and R(x) be the real value sets of its dimension-compatible interval linear-form arguments. Coefficient and constant choices shall be independent, including when the same form object is supplied twice. After refine_with_linear_form_inequality, the receiver shall have the same ambient dimension and denote a set Y satisfying

    {x ∈ X ∣ ∃l ∈ L(x),  r ∈ R(x) : l ≤ r} ⊆ Y ⊆ X.

    Valid empty coefficient or constant intervals shall be admitted; their empty choice set contributes no satisfying valuations, so a general conservative refinement may leave the input unchanged.

    The general operation may lose precision. Comparisons involving constants only, including cancellation to a constant comparison, may leave the input unchanged.

    For closed nonempty constant intervals and forms having at most one nonzero variable coefficient each, all such coefficients being singleton  + 1 or  − 1, consider a nonconstant comparison reducible to one unary or signed binary octagonal inequality. If the required constant endpoint subtraction and doubled-unary encoding are exact in the selected boundary profile, the result shall equal the intersection of X with that closed inequality, using the lower constant endpoint on the left and upper constant endpoint on the right. Opposite unit coefficients on the same coordinate shall therefore use the corresponding normalized ±2xi cut. All four sign combinations on distinct coordinates shall be covered. This precision clause shall not apply to a constant-only comparison.

    Empty input shall remain empty. An argument form whose space dimension exceeds the receiver's shall throw std::invalid_argument before changing the represented set, including on empty input. Successful refinement shall preserve the source forms and leave a valid owned receiver.

    The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

    RATIONALE:

    A floating comparison filters existing correlated states; coefficient uncertainty and outward arithmetic must not discard a satisfying state.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>.

    template <typename Interval_Info>
    void refine_with_linear_form_inequality(
        const Linear_Form<Interval<T, Interval_Info>>& left,
        const Linear_Form<Interval<T, Interval_Info>>& right);
    
    VERIFICATION_CRITERIA:

    Partition coordinate signs independently, derive exact rational minimum-left/maximum-right affine inequalities, intersect each with the input halfspaces, and check every resulting piece is contained while the result stays inside the input. Cover unit, same-coordinate opposite unit, uncertain-sign, nonunit and sparse multiple-variable forms; exact and genuinely inexact arithmetic; correlations, recession directions, source aliases, bottom, dimension errors and owned-resource failures.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (domain and floating arithmetic background). Mine04 | Sections 5 and 6.1, Tests (interval linear forms and relational guard abstraction).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

  • PPL-SPEC-001238
    3. Generalized interval-linear-form comparisons UID: PPL-SPEC-001238 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the form value sets and numerical admission of 🔗 2. Conservative interval-linear-form inequality refinement, generalized_refine_with_linear_form_inequality shall preserve the ambient dimension and denote an enclosure of the input states satisfying its relation, without introducing states outside the input. The two sides shall use independent coefficient choices.

    LESS_OR_EQUAL shall apply the left-to-right inequality refinement; GREATER_OR_EQUAL shall apply the reversed refinement. LESS_THAN and GREATER_THAN may use those same closed relaxations of the strict comparisons. EQUAL shall apply both non-strict orientations, retaining all states for which the two form value intervals overlap. NOT_EQUAL shall leave the represented set unchanged. No general least-result claim shall follow from these dispatch rules.

    Both arguments shall undergo the documented dimension validation for every named relation, including NOT_EQUAL and empty receivers. Incompatibility shall throw std::invalid_argument before changing the represented set. A Relation_Symbol having the unnamed language-admissible value 0 or 7 shall throw std::runtime_error before mutation. Values outside the C++ enum's valid representation range are outside valid language use. Empty input and source-form values shall be preserved.

    The format shall satisfy its configured supported-format predicate. The interval coefficient representation and arithmetic shall satisfy 🔗 1. Interval-linear-form meaning and numerical prerequisites, including stored-value and endpoint-access prerequisites; coefficient and constant intervals shall be bounded. The caller shall provide and retain ownership of an upward FPU environment. For admitted inputs, the implementation shall respect the preconditions of its selected numerical policies when carrying out intermediate operations. Library calls shall not transfer ownership of the forms or change their coefficient values.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. Borrowed forms and interval storage shall remain live throughout the call. Recoverable numerical and resource exceptions may propagate; discarded owned temporaries shall be released and the receiver shall remain safely destructible, without a rollback promise.

    RATIONALE:

    The relation selects the comparison orientation and its admissible closed relaxation; validation must not depend on the selected dispatch shortcut.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>.

    template <typename Interval_Info>
    void generalized_refine_with_linear_form_inequality(
        const Linear_Form<Interval<T, Interval_Info>>& left,
        const Linear_Form<Interval<T, Interval_Info>>& right,
        Relation_Symbol relsym);
    
    VERIFICATION_CRITERIA:

    Use the independent sign-partition guard oracle for all six named relations, equality overlap, strict boundary witnesses, shared form objects and disequality identity. Check dispatch against the appropriate basic orientations, source preservation, dimensions on every branch, valid unnamed enum rejection and failure channels.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (journal background on octagonal shapes and floating implementation). Mine04 | Sections 5 and 6.1, Tests (interval-coefficient guard abstractions).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

  • PPL-SPEC-001239
    4. Refinement of a floating interval abstract store UID: PPL-SPEC-001239 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported native floating boundary type T and a valid Box<Interval<T,Interval_Info>> store of the same ambient dimension, refine_fp_interval_abstract_store(store) shall intersect the store with the outward Cartesian enclosure of the receiver supplied by the box conversion of 🔗 5. Box conversion from octagonal shapes. It shall retain every point of the entry store lying in the source shape and shall introduce no point outside the entry store. The source represented set and both ambient dimensions shall remain unchanged; logically const source closure may refresh caches.

    Empty source or empty store shall yield an empty store. Zero-dimensional empty and universe cases shall preserve their distinct meanings. When the source closure and target endpoint arithmetic satisfy the exactness conditions of 🔗 5. Box conversion from octagonal shapes, the result shall equal the store's intersection with the least Cartesian enclosure of the source; otherwise outward approximation may retain additional points. Incompatible dimensions shall throw std::invalid_argument without changing the store's represented set.

    The selected native format shall satisfy its configured supported-format predicate. The box and interval representation shall retain 🔗 1. Cartesian box values, coordinate identity and valid use and 🔗 5. Box conversion from octagonal shapes. Unbounded valid store coordinates are admitted. The initialized numerical runtime and all intermediate policy prerequisites shall hold; the caller shall provide and retain ownership of an upward FPU environment.

    The selected representation, numerical runtime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall hold. The borrowed store and its live coordinate objects shall remain valid throughout the call. Recoverable numerical and resource exceptions may leave a partially refined store in the state permitted by its operations; discarded owned temporaries shall be released.

    RATIONALE:

    A relational state can strengthen a separate interval store without discarding a valuation common to both approximations.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Octagonal_Shape<T>.

    template <typename Interval_Info>
    void refine_fp_interval_abstract_store(
        Box<Interval<T, Interval_Info>>& store) const;
    
    VERIFICATION_CRITERIA:

    Derive coordinate extrema by exact rational projection of correlated halfspaces, combine them with independently specified input intervals, and compare containment/contraction; check exact Cartesian intersections where 🔗 5. Box conversion from octagonal shapes guarantees them. Cover empty and zero-dimensional states, unbounded coordinates, open store boundaries, inexact native bounds, mismatched dimensions, source preservation and allocation failure.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Sections 4 and 7 (octagonal representations and outward floating arithmetic).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; src/Interval_defs.hh; doc/definitions.dox; tests/Concrete_Expression/octagonalshape2.cc; tests/Concrete_Expression/octagonalreflection1.cc; tests/octagonalshapeintervalformspec1.cc; tests/octagonalshapeintervalformpublic1.cc; tests/octagonalshapeintervalformfailure1.cc.

  • 1. Addition of supported octagonal constraints UID: PPL-SPEC-001167 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraint(c) shall conjoin the receiver with the target-profile normalization of the admitted constraint c. The nonconstant supported forms shall be unary bounds and signed two-coordinate bounds with equal nonzero coefficient magnitudes, including equalities. Constant tautologies shall have no effect; constant falsehoods shall make the receiver empty. Constant strict conditions shall retain their truth value. A nonconstant strict constraint or an unsupported nonconstant linear form shall throw std::invalid_argument without changing the receiver's represented set.

    For a unary normalized inequality sxi ≤ b, its stored primitive bound shall be the least admitted target bound at least 2b in the doubled-unary encoding. For a binary normalized inequality sixi + sjxj ≤ b, the bound shall be the least admitted target bound at least b. Signs shall belong to { − 1, 1}. Each side of an equality shall have its own outward bound. The result shall be exactly the intersection of the entry set with these normalized target inequalities; when the normalized bounds are exact, this shall be the concrete conjunction. Every entry point satisfying c shall be retained.

    add_constraints(cs) and add_recycled_constraints(cs) shall conjoin all admitted system rows with the same normalization and validation rules. A descriptor or system dimension at most the receiver dimension shall be accepted, with zero coefficients in omitted trailing coordinates. A larger dimension shall throw std::invalid_argument before changing the receiver's represented set. An empty receiver shall still undergo these validation rules.

    An ordinary copying call shall preserve its source descriptor or system. The result shall not borrow source storage. After a recycled-system call, including exceptional return, the only required property of cs shall be safe destruction. A rejected system need not undo earlier accepted rows; no particular row visitation order shall be promised.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved. Recycled sources shall retain their explicit destruction-only guarantee.

    RATIONALE:

    An adding operation validates optimal support instead of silently discarding unsupported information. The doubled unary representation must be normalized before outward rounding, including when the storage type is integral.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void add_constraint(const Constraint& c);
    void add_constraints(const Constraint_System& cs);
    void add_recycled_constraints(Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Normalize raw integer coefficients with exact GMP rationals, using all four binary sign combinations and unary doubled bounds. Conjoin the independent halfspaces with the entry real set. Cover equality, common scales, negative constants, exact and inexact normalization, tautology, falsehood, strict constant rows, unsupported forms, dimension validation on empty and nonempty receivers, ordinary and recycled systems, source ownership and partial batch failure. Do not query recycled donors beyond their destruction guarantee.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/constraints1.cc; tests/Octagonal_Shape/systemdimension1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001168
    2. Addition of supported octagonal congruences UID: PPL-SPEC-001168 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_congruence(cg) shall accept congruence equalities whose expression is an admitted unary or equal-magnitude signed two-coordinate equality, together with constant tautologies and falsehoods. An accepted equality shall conjoin the two outward-normalized inequalities defined in 🔗 1. Addition of supported octagonal constraints. A tautology shall have no effect; a falsehood shall make the receiver empty.

    A nontrivial proper congruence or an unsupported nonconstant equality shall throw std::invalid_argument without changing the receiver's represented set. An adding call shall not silently discard a nontrivial periodic restriction. add_congruences(cgs) and add_recycled_congruences(cgs) shall apply these rules to the system.

    A descriptor or system dimension above the receiver dimension shall throw std::invalid_argument before changing its represented set, including on an empty receiver. Smaller dimensions shall have zero trailing coefficients. Ordinary copying forms shall preserve their source values and shall not borrow their storage. A recycled system shall be required only to remain safely destructible after normal or exceptional return. If a later system row is rejected, preceding accepted rows need not be rolled back; no row visitation order shall be promised.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved. Recycled sources shall retain their explicit destruction-only guarantee.

    RATIONALE:

    Equality is convex and can be expressed by opposite octagonal bounds, while a nontrivial periodic congruence generally cannot. Explicit rejection keeps addition distinct from conservative refinement.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void add_congruence(const Congruence& cg);
    void add_congruences(const Congruence_System& cgs);
    void add_recycled_congruences(Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Derive equality halfspaces independently and apply the rational normalization oracle for 🔗 1. Addition of supported octagonal constraints. Include scaled unary and all signed binary equalities, constant true/false proper congruences, nontrivial periodic rows, unsupported equalities, trailing dimensions, empty states, ordinary/recycled batches and late rejection. Preserve copying inputs and safely destroy recycled inputs.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/congruences1.cc; tests/Octagonal_Shape/systemdimension1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh; tests/Octagonal_Shape/constraints1.cc.

  • PPL-SPEC-001169
    3. Conservative refinement by linear constraints UID: PPL-SPEC-001169 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_constraint(c) shall refine the receiver by an admitted linear constraint without rejecting a row merely because its nonconstant form is not octagonal. A supported closed unary or equal-magnitude signed binary row shall have the outward-normalized conjunction in 🔗 1. Addition of supported octagonal constraints. A supported nonconstant strict inequality shall first be relaxed to its non-strict counterpart and then normalized. An unsupported nonconstant linear form shall have no effect.

    Constant true rows shall have no effect and constant false rows shall make the receiver empty, including the strict false condition 0 > 0. An empty receiver shall remain empty. refine_with_constraints(cs) shall apply these rules to the entire conjunction. For entry set X, exact condition set C and result R, X∩C ⊆ R ⊆ X shall hold. For a system, the represented result shall be the intersection with all the retained, relaxed and outward-normalized rows; ignored rows shall impose no restriction.

    Source dimensions at most the receiver dimension shall be admitted with zero trailing coefficients. A larger descriptor or system dimension shall throw std::invalid_argument before changing the receiver's represented set, including when the receiver is empty. Copying calls shall preserve source descriptors and own any resulting bounds independently. Exceptions during a system call need not roll back previously applied refinements.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    Filtering may conservatively relax strictness or omit unsupported rows, while adding has a stricter admission contract. The two operations must still agree on supported closed primitive normalization.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void refine_with_constraint(const Constraint& c);
    void refine_with_constraints(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Conjoin independently normalized supported rows, relax nonconstant strict rows, and leave unsupported rows out of the expected conjunction. Verify exact result equality to that conjunction and containment of every original satisfying point. Cover constants, unsupported sparse forms, all signs, rounded cutoffs, empty/zero dimensions, late inconsistent rows, dimension errors, source preservation and safe failure cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/constraints1.cc; tests/Octagonal_Shape/systemdimension1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001170
    4. Conservative refinement by congruences UID: PPL-SPEC-001170 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_congruence(cg) shall conjoin an octagonal congruence equality using the outward-normalized opposite inequalities in 🔗 1. Addition of supported octagonal constraints. An unsupported nonconstant equality shall have no effect. A proper constant false congruence shall make the receiver empty; other proper congruences shall have no effect. A tautology shall have no effect. The real carrier in 🔗 1. Octagonal values, numerical profiles and valid use shall remain unchanged; ignored periodic information shall not turn this call into an integer-valued state restriction.

    refine_with_congruences(cgs) shall apply those rules to the conjunction. For entry set X, supplied congruence set C and result R, X∩C ⊆ R ⊆ X shall hold. The result shall equal the intersection with all accepted normalized equality rows, unless a false row makes it empty. Empty receivers shall remain empty.

    Larger descriptor or system dimensions shall throw std::invalid_argument before changing the receiver's represented set, including on empty receivers. Smaller dimensions shall use zero trailing coefficients. Copying calls shall preserve their source values; result bounds shall not borrow source storage. A system call that throws need not roll back preceding accepted refinements.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    A convex octagonal refinement can retain supported equalities while ignoring nonconvex periodic information. Soundness concerns the real input states satisfying the congruence, not an implicit integer carrier.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void refine_with_congruence(const Congruence& cg);
    void refine_with_congruences(const Congruence_System& cgs);
    
    VERIFICATION_CRITERIA:

    Use independent rational equality halfspaces and direct truth tests for constant proper congruences. Exercise all signed binary equalities, unary halves, unsupported unequal-magnitude equalities, periodic rows, dimensions, empty receivers, copying systems and source lifetime. Require both contraction and preservation of states satisfying the original congruences.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/congruences1.cc; tests/Octagonal_Shape/systemdimension1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh; tests/Octagonal_Shape/constraints1.cc.

  • PPL-SPEC-001171
    1. Exact intersection of compatible octagonal values UID: PPL-SPEC-001171 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry receiver X and source Y, intersection_assign(y) shall replace the receiver by the exact real set X∩Y. This equality shall hold for every admitted numeric profile under its numerical prerequisites, including integral bound storage with half-integral real points.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    The conjunction of two finite octagonal systems is itself octagonal. Intersection therefore has an exact set meaning even when ordinary rounded upper bounds have weaker precision guarantees.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void intersection_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Independently conjoin raw signed halfspaces and use exact rational elimination to compare represented sets. Include correlated equalities, contradictory signed cycles, half-integral points under integer storage, unbounded/empty/universe/zero-dimensional values, aliases, independent source lifetime, dimension errors and late representation normalization.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/intersection1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001172
    2. Conservative and exact-arithmetic octagonal upper bounds UID: PPL-SPEC-001172 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry receiver X and source Y, upper_bound_assign(y) shall produce an octagonal value R satisfying X∪Y ⊆ R.

    When the arithmetic used for normalization and rational strong closure is exact, including unbounded rational-bound profiles, R shall be the least octagonal enclosure of X∪Y. For each admitted octagonal normal a, its finite support shall then be max(supx ∈ Xa⋅x, supy ∈ Ya⋅y), with the doubled unary encoding and unbounded supports interpreted as in 🔗 1. Octagonal values, numerical profiles and valid use. When arithmetic rounds, a less precise containing octagon shall be permitted. An integer boundary type alone shall not imply exact rational strong closure, because half-sums can be inexact.

    Self-union and union with an empty operand shall retain their mathematical identity meanings; union with universe shall give universe. These cases shall preserve the real carrier even for integral bound storage.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    The signed-normal hull is obtained from supports of the whole input sets. Rounded graph normalization can lose precision, so conservative containment and the exact-arithmetic least enclosure are separate promises.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void upper_bound_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Compute supports with exact rational elimination over each entry set, then take maxima for all signed primitive normals. Require the least enclosure for exact arithmetic and containment for rounded profiles. Include opposite-sign relations, disjoint/lower-dimensional inputs, rays, half-integral points, closure histories, all identity cases, aliases and dimension rejection.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/upperbound1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001173
    3. Certified real set-theoretic union of octagonal values UID: PPL-SPEC-001173 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    upper_bound_assign_if_exact(y) shall return true only when it replaces the receiver by the exact real union X∪Y of the entry sets. On false, the receiver's represented set shall remain X; internal normalization of either argument may still occur.

    With mpq_class boundaries, the decision shall be complete: it shall return true if and only if X∪Y is an octagonal set. Other supported profiles may return false when rounded computation cannot certify exactness, even when the union is octagonal. This includes rational half-sum rounding with mpz_class boundaries. Such an inconclusive false shall not assert that a non-octagonal union has been found.

    Successful union shall retain every real point of either input, rather than only its integer points. No success result may fill a missing real point.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return, including a Boolean false return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    A least octagonal upper bound can fill a genuine gap. A successful exact-join certificate must exclude that possibility, while incomplete arithmetic may legitimately fail to produce a certificate.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    bool upper_bound_assign_if_exact(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Derive exact signed-support hulls and decide whether each point of the hull belongs to at least one entry set by independent strict-complement feasibility. Require complete decisions for unbounded rational profiles, exact real-union equality on every success and entry-set preservation on false. Include touching and separated intervals, signed relational slices, rays, half-integral integer-bound inputs, aliases, empty/zero dimensions and range-sensitive rounded certificates. Keep overflow and adjacent-floating-bound witnesses in arbitrary-precision test models, independently of the configured Coefficient range. Check exact representability of the typed inputs, midpoint gaps or literal cover proofs, source preservation and resulting sets.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 6.2, Theorem 6.3, exact join detection for rational octagonal shapes.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/upperboundifexact1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001174
    4. Exact integer-point unions of octagonal values UID: PPL-SPEC-001174 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    integer_upper_bound_assign_if_exact(y) shall be available when T is a supported integral boundary type. Let I = (X∪Y)∩Zn for the entry real sets X, Y, and let H(I) be their integer upper bound: the smallest rational octagonal set containing I. The call shall return true if and only if H(I)∩Zn = I; on true it shall replace the receiver by that integer upper bound. On false it shall preserve the receiver's entry represented set. Cache normalization shall not count as a set change.

    Exactness shall concern integer valuations. The result may include nonintegral points absent from both operands and may remove fractional portions of the entry real sets. For example, the integer union of real singletons at zero and one shall have integer upper bound [0, 1]. A nonempty half-integral real input may contain no integer point; if neither operand has an integer point, the integer upper bound shall be empty and the decision shall be true. Integer storage shall continue to have the real carrier in 🔗 1. Octagonal values, numerical profiles and valid use.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return, including a Boolean false return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    Integer octagonal exactness differs from exact real union. Tightening unary parity removes fractional-only states without discarding any input integer point, and permits integer-exact unions that are not convex real unions.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    bool integer_upper_bound_assign_if_exact(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    For independently bounded examples enumerate every integer valuation in proved finite boxes, build the rational signed-support hull of the two integer sets, and enumerate every integer point of that candidate hull. Compare the exactness Boolean, required success hull and false preservation. Use analytic integer lattice models for selected unbounded cases. Include half-integral real singletons, odd and already-even unary bounds, empty integer hulls, cold and cached closure, idempotence, real-inexact/integer-exact joins, aliases and all supported integral profiles. Reject nonintegral template instantiations through a meaningful capability check.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Section 6.3, Definition 6.6 and Theorem 6.8, tight closure and exact integer-octagonal joins.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/integerupperboundifexact1.cc; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001175
    5. Least closed octagonal abstraction of subtraction UID: PPL-SPEC-001175 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    difference_assign(y) shall replace the receiver by the least closed target-profile octagonal enclosure of the concrete real difference X⧵Y of the entry sets. It shall retain every point of X absent from Y. Its precision shall concern the whole relational sets.

    For each encoded octagonal normal, the result shall impose the strongest bound expressible in the target profile that is valid on the concrete difference. Finite support suprema shall be computed with their exact boundary meaning before outward target rounding, including doubled unary bounds. Closing a strict complement may retain boundary points removed by subtraction, and a convex enclosure may fill a gap between surviving pieces. For example, removing x0 + x1 = 0 from 0 ≤ x0 + x1 ≤ 2 shall leave the same closed octagonal enclosure. The result shall not be required to be disjoint from Y.

    Self-subtraction and subtraction of universe shall give empty. Subtraction of empty shall preserve the entry set. An empty receiver shall remain empty.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    Strict complements and disjunctions generally leave the closed convex octagonal domain. Least closed abstraction retains precise supports while allowing removed boundary points and gaps to be filled.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void difference_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Represent the concrete difference as strict-complement branches of the second operand. Use independent rational elimination for branch feasibility and all signed support suprema, then outward-round the resulting primitive bounds. Verify the least target-profile hull, not just containment. Include interior removals, an equality, a boundary face, signed lower-dimensional sets, fractional witnesses, unbounded/empty/universe/zero-dimensional cases, self subtraction, source preservation and dimension errors. Compare dense and irredundant defining bases, cold and cached histories, and removal that leaves the original closed hull. Include disjointness, interior holes, boundary faces and complementary equality branches, with proper facet cuts as controls; preserve distinct-source geometry and ownership.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/difference1.cc; doc/definitions.dox; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001176
    6. Meet-preserving octagonal simplification in a context UID: PPL-SPEC-001176 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    simplify_using_context_assign(y) shall replace entry receiver X by an octagonal simplification R using entry context Y, satisfying

    R∩Y = X∩Y.

    The cardinality of a minimized constraint representation of R shall not exceed that of X. An unchanged receiver shall be an admitted result; strict progress shall not be required on every call. The Boolean result shall satisfy: false implies the entry intersection is empty. A true return need not certify nonemptiness.

    For self-aliasing, the context shall mean the entry receiver, so the meet-preservation equation shall be R∩X = X. A distinct context shall preserve its entry denotation. Empty/disjoint contexts, empty receivers and zero-dimensional values shall be admitted.

    The operands shall have equal ambient dimensions; a mismatch shall throw std::invalid_argument before changing either represented set. Empty, universe, lower-dimensional and zero-dimensional values shall be admitted. Self-aliasing shall use the entry value for both operands. A distinct y shall preserve its entry represented set on normal return, including a Boolean false return. Logically const normalization may change caches without changing the source set. The receiver shall own its result independently of a distinct source's later mutation or destruction.

    The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

    Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

    RATIONALE:

    The caller needs exactly the behavior observable in the supplied context. A reduction in the minimum representation size is a simplification measure; intersection preservation alone does not specify the receiver's outside context points.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    bool simplify_using_context_assign(const Octagonal_Shape& y);
    
    VERIFICATION_CRITERIA:

    Independently conjoin entry and result halfspaces with the unchanged context and compare their real denotations using rational elimination. For compact cases derive minimum octagonal representation counts from affine rank and independent signed supporting faces. Check cardinality nonincrease and false-result implication without requiring progress or equating true with nonempty. Include disjoint/empty/universe contexts, self alias, relational equalities, rounded half-sum cases, unchanged sources and dimension errors.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, Definition 4 and Definition 5, coherent signed-normal encoding and rational strong closure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapeoperationsspec1.cc; tests/octagonalshapeoperationoracle.hh; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/octagonalshapeoperationspublic1.cc; tests/Octagonal_Shape/simplifyusingcontext1.cc; doc/definitions.dox; tests/octagonalshapeoperationsfailure1.cc; tests/boxallocationfixture.hh.

  • PPL-SPEC-001181
    7. Ordered Cartesian concatenation of octagonal values UID: PPL-SPEC-001181 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    concatenate_assign(other) shall replace an entry value X ⊆ ℝn with exactly X×Y ⊆ ℝn + m, where Y ⊆ ℝm is other's entry value. The first n coordinates shall belong to X, followed by Y's coordinates in their original order. Cross-block consequences shall follow from Cartesian independence, rather than identifying coordinates with equal indices in the two operands.

    An empty operand shall give empty in dimension n + m. Zero-dimensional universe shall be an identity on either side; zero-dimensional empty shall be an annihilator while retaining the sum dimension. Self concatenation shall use two independent copies of the entry value. A requested sum dimension above max_space_dimension() shall throw std::length_error.

    The supported profiles, real carrier, runtime initialization, numerical range and rounding, FPU, resource and synchronization prerequisites of [LINK: PPL-SPEC-001146] shall apply. A distinct other shall retain its represented entry value; logically const cache normalization may change its storage. Underlying allocation and numerical failures may propagate; no additional rollback guarantee shall be inferred. Storage acquired by discarded temporaries shall be released.

    RATIONALE:

    Concatenation composes independently chosen valuations in a fixed coordinate order, including when the two source references coincide.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Octagonal_Shape<T>:

    void concatenate_assign(const Octagonal_Shape& other);
    
    VERIFICATION_CRITERIA:

    Compare disjointly lifted operand halfspaces, mixed dimensions, both zero-dimensional values, all empty positions, coupled operands, cross-block supports, repeated composition and self concatenation. Check a distinct right operand remains equivalent to its entry value and verify the dimension limit.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/Octagonal_Shape/concatenate1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • 5. Octagonal_Shape<T> internal status signed-keyword loading and rejection UID: PPL-SPEC-001621 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Octagonal_Shape internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.

    For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Octagonal_Shape internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.

    The loader shall retain its preceding word until parsed fields update it. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. Octagonal_Shape internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 2. Compatible octagonal record loading and failure state.

    RATIONALE:

    The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.

    INTERFACE:

    Internal nested type Octagonal_Shape<T>::Status in Og_Status_idefs.hh, included through Octagonal_Shape_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.

    bool ascii_load(std::istream& stream);
    // Internal helper, in its defining translation unit or implementation namespace:
    bool get_field(std::istream& stream, const char* keyword, bool& positive);
    
    VERIFICATION_CRITERIA:

    Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and get_field output preservation. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Og_Status_idefs.hh; src/Og_Status_inlines.hh; src/Og_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.

  • 1. Reloadable octagonal record export UID: PPL-SPEC-001227 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid admitted source of ambient dimension n, ascii_dump(stream) shall write the literal "space_dim ", the ambient dimension and a newline. It shall then write the three stored status fields in ZE, EM, SC order, with each keyword prefixed by + or -. One space shall separate the first two fields, two spaces shall separate the last two fields, and one space and a newline shall follow the last field.

    The following payload shall be the pseudo-triangular matrix record of 🔗 1. Pseudo-triangular mathematical-value records, with matrix space dimension n. It shall contain its dimension line followed by its physical rows in their stored order, including diagonal positive-infinity sentinels. A zero-dimensional matrix shall have no coefficient rows. The status fields shall retain the stored zero-dimension, emptiness and strong-closure conventions; export shall not require first classifying emptiness or computing strong closure.

    Coefficient output shall retain the selected mathematical-value formatting of 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration, including exact finite native values independently of caller precision. Under compatible record, numeric-profile, locale and version conventions, the complete record shall retain enough information for 🔗 2. Compatible octagonal record loading and failure state to restore the same mathematical set and ambient dimension. Native object bytes and a floating zero sign shall not be part of this mathematical round-trip guarantee.

    Export shall preserve the source set, dimension, stored status, matrix and ownership. The no-argument ascii_dump() shall send the same record to the current std::cerr. Output failure shall follow the stream's selected state and exception behavior, retaining partial output without certifying successful delivery.

    The representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. The borrowed stream and its output callback environment shall remain live throughout the call. Recoverable resource exceptions may propagate; discarded owned temporaries shall be released.

    The internal status contract shall follow 🔗 4. Octagonal_Shape internal status signed-keyword export.

    RATIONALE:

    A reloadable record retains dimension, stored status and every bound value, including information that a readable constraint list may omit.

    INTERFACE:

    Public header: <ppl.hh>; members of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    void ascii_dump(std::ostream& stream) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Check independent header, status-spacing and matrix framing for empty, universal, constrained, cold and strongly closed values in zero and positive dimensions. Round-trip exact integer, rational and admitted native records, including signed zeros and positive infinities. Verify mathematical source preservation, unchanged raw records, following-token framing and the no-argument output destination. Exercise stream failure without assuming transactional delivery.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; src/Og_Status_idefs.hh; src/Og_Status_inlines.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_templates.hh; src/globals_defs.hh; tests/Octagonal_Shape/ascii_dump_load1.cc; tests/Octagonal_Shape/empty1.cc; tests/octagonalshapetextmemoryspec1.cc; tests/octagonalshapetextmemorypublic1.cc.

  • 2. Compatible octagonal record loading and failure state UID: PPL-SPEC-001228 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a complete valid record of 🔗 1. Reloadable octagonal record export under compatible representation, numeric formatting, profile, locale and resource conditions, ascii_load(stream) shall return true and replace any live valid receiver by the recorded ambient dimension and mathematical set. Previous receiver dimensions, emptiness and strong-closure status shall not affect successful restoration. The recorded status fields shall replace their previous conditions. One complete record shall be consumed while a following record or suffix remains available after permitted separating whitespace.

    The decoded ambient dimension shall not exceed max_space_dimension(), including for empty records. A greater value shall return false before the matrix payload is processed.

    A missing or incorrect space_dim keyword, rejected ambient dimension, missing or malformed required status word, or truncated or rejected matrix payload shall return false when the component extractions return normally. Each status word shall have its expected keyword and a + or - prefix. The loaded matrix space dimension shall equal the recorded ambient dimension; a mismatch shall return false even for empty or zero-dimensional records. Independently of the ambient dimension, an unsupported nested matrix dimension shall return false before matrix resizing or storage-size arithmetic, as specified by 🔗 2. Exact value-record loading and rejection states. Exact scalar acceptance and numerical-payload rejection shall retain that contract. Stream masks, numerical policies and recoverable resource failures shall retain their own exception channels.

    Successful restoration assumes a trusted, complete and dump-compatible record. After repair of any legacy rounded cache, the loaded representation shall satisfy the shape invariant. A detected inconsistency shall return false in every build. Semantic queries or further shape operations require a complete valid representation.

    For rounded or bounded coefficient profiles, a loaded nonempty status that certifies strong closure may have its feasibility rechecked against the stored bounds. An inconsistent bound system may then be classified empty; otherwise its closure certification may be restored. This compatibility repair shall preserve the stored matrix's exact represented set and ambient dimension; it shall not promise canonical or maximally precise rounded closure.

    A false return or exception may leave replaced dimension or status fields and a partially loaded matrix. It shall not promise rollback or a complete mathematical value. The receiver shall retain safely destructible ownership and may be replaced by a complete valid assignment before semantic queries or operations requiring a valid shape. Consumed input shall not be restored, and the library shall not take ownership of the stream.

    The representation, numerical-runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply. The borrowed stream and its callback environment shall remain live throughout the call. Discarded owned temporaries shall be released on reported failure.

    The internal status contract shall follow 🔗 5. Octagonal_Shape internal status signed-keyword loading and rejection.

    RATIONALE:

    A compatible complete record determines the restored value independently of the receiver's former state. Local dimension agreement protects the matrix/ambient-space relationship without requiring a general semantic certification pass on every assertion-disabled load. Rejecting unsupported ambient dimensions before storage calculations prevents unsigned size wrap from being accepted as a small physical matrix. The independently encoded nested matrix extent also needs admission before its storage calculation.

    INTERFACE:

    Public header: <ppl.hh>; member of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    bool ascii_load(std::istream& stream);
    
    VERIFICATION_CRITERIA:

    Load valid producer records into receivers of different dimensions, empty/nonempty and cache states; compare the restored set and dimension independently and check following-token framing. Exercise every missing or malformed header/status word, truncated matrix boundary, forbidden or inexact scalar value, and each matrix/ambient-dimension mismatch, including empty and zero-dimensional cases. Check rounded feasibility-cache repair, stream exceptions and allocation failures without imposing rollback. Reassign a complete valid value after rejected loads before ordinary value use. Distinguish local false-return checks from debug semantic invariant diagnostics on arbitrary complete text. Reject supported-profile records whose two dimension headers are replaced by 2w − 1 + k, for unsigned dimension width w and k ∈ {0, 1, 3}. Check maximum plus one and the reserved non-dimension, rational/integer/floating bound types, valid replacement after rejection and preserved following input. Keep the outer dimension valid while replacing only the nested matrix dimension by the reserved non-dimension; check empty and universe records at zero and small dimensions, all three bound categories and complete valid reloads.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; src/Og_Status_idefs.hh; src/Og_Status_inlines.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_templates.hh; tests/Octagonal_Shape/ascii_dump_load1.cc; tests/Octagonal_Shape/empty1.cc; tests/octagonalshapetextmemoryspec1.cc; tests/octagonalshapetextmemorypublic1.cc.

  • PPL-SPEC-001229
    3. Octagonal representation invariant query UID: PPL-SPEC-001229 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live, well-owned and safely indexable representation whose selected scalar operations are admitted, OK() shall check the pseudo-triangular matrix's storage and coefficient validity and the status-condition compatibility. The matrix space dimension shall equal the ambient dimension, including empty and zero-dimensional values. A violation of these checked conditions shall return false.

    Once those conditions hold, certified empty representations shall retain their inactive-geometric-data admission, and zero-dimensional representations shall require no coefficient-geometry checks. A positive-dimensional nonempty representation shall reject a stored negative-infinite bound or a diagonal entry other than positive infinity.

    For an unbounded coefficient base whose numeric traits declare exact arithmetic, certified strong closure shall be checked against matrix recomputation. For every exact coefficient base, including bounded integer storage, certified strong closure shall satisfy the native strong-coherence inequalities. The selected extended arithmetic, including its rounding and saturation, shall retain the prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use. Bounded saturating closure shall not be required to pass an exact fixed-point test. Floating coefficient bases shall not be required to pass an exact fixed-point or exact strong-coherence test merely because their rounded closure is certified. Passing the applicable checks shall return true.

    The query shall preserve the receiver's represented set, ambient dimension, stored status, matrix and ownership. It may copy matrices and recompute derived data in temporary objects; resource and numerical exceptions may propagate through their selected channels. Debug builds may emit invariant-failure diagnostics to std::cerr without a fixed wording. Discarded owned temporaries shall be released.

    A true result shall not be an emptiness, semantic equality or minimal-storage answer. This query shall not be a corruption scanner for arbitrary pointers, broken object lifetimes or non-indexable fabricated storage. The numerical runtime, lifetime and synchronization prerequisites of 🔗 1. Octagonal values, numerical profiles and valid use shall apply.

    The internal status contract shall follow 🔗 3. Octagonal_Shape internal status consistency predicate.

    RATIONALE:

    The matrix and ambient space must agree even when geometry is inactive. Native representation checks remain separate from mathematical property queries and from unsupported inspection of broken object ownership. Saturation can allow a further safe closure pass to tighten a stored bound; this does not make the preceding rounded representation invalid. Native strong coherence and exact unbounded fixed points therefore need separate checks.

    INTERFACE:

    Public header: <ppl.hh>; member of Octagonal_Shape<T> in Parma_Polyhedra_Library:

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check true on ordinary public histories across admitted profiles. Use safely owned fixture representations for dimension disagreement, incompatible status conditions, forbidden bounds, non-infinite diagonals, incorrect unbounded-exact closure certification and violated native strong coherence for exact bases. Check bounded saturating histories whose safe subsequent closure pass can tighten a bound without treating non-idempotence alone as an invariant failure. Verify both dimension mismatches for empty and zero-dimensional representations. Restore complete valid ownership before ordinary reuse. Observe receiver preservation, selected diagnostics and permitted temporary-allocation failures without requiring bounded saturating or floating-point closure idempotence.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_templates.hh; src/Og_Status_idefs.hh; src/Og_Status_inlines.hh; src/OR_Matrix_defs.hh; src/OR_Matrix_templates.hh; src/DB_Row_templates.hh; tests/Octagonal_Shape/ascii_dump_load1.cc; tests/Octagonal_Shape/empty1.cc; tests/octagonalshapetextmemoryspec1.cc; tests/octagonalshapetextmemorypublic1.cc; tests/octagonalshapesaturationspec1.cc.

  • PPL-SPEC-001146
    1. Octagonal values, numerical profiles and valid use UID: PPL-SPEC-001146 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape<T> shall represent a topologically closed subset of Rn by a finite conjunction of unary inequalities ±xi ≤ c and binary inequalities sixi + sjxj ≤ c, where i ≠ j and si, sj ∈ { − 1, 1}. Empty and universe shall be distinct in every supported ambient dimension. Coordinates absent from all restrictions shall remain free.

    coefficient_type_base shall be T. Supported native integer, supported native floating, GMP integer and GMP rational bases shall supply the declared extended coefficient_type, including positive infinity and rounding-aware bound arithmetic. A positive-infinite bound shall impose no restriction. Every profile shall retain a real coordinate carrier. Integer bound storage shall allow fractional points, including a unary restriction 2xi ≤ 1 and a singleton xi = 1 ⁄ 2.

    Strong closure and reduction shall preserve the represented real set. With unbounded exact rational arithmetic, strong closure shall expose all implied octagonal bounds. Rounded or saturating sums and divisions, including halving an odd integer during strong closure, shall not imply exact canonical, idempotent or maximally precise closure. Unbounded integer storage shall not by itself qualify as exact rational strong-closure arithmetic. An outward finite approximation shall not exclude source points satisfying the admitted constraint.

    Objects and supplied descriptors shall be live, valid and externally synchronized. Coordinate identities and reserved dimension indications shall follow 🔗 1. Coordinate type and reserved dimension index. Descriptor initialization in 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall apply where used. Native floating operations shall require configured support and their declared initialized rounding environment. Finite operands, intermediate arithmetic and output descriptor coefficients shall meet the selected numerical facilities' range, rounding and resource prerequisites. A public operation shall not create an intermediate that violates the numerical preconditions it selects for admitted input. Uses that may update an object's caches shall not race with another use of that object.

    RATIONALE:

    Signed binary relations extend bounded differences. Stored numeric bounds, the real carrier and the completeness of closure are separate properties.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    template <typename T> class Octagonal_Shape;
    typedef T coefficient_type_base;
    typedef N coefficient_type;
    
    VERIFICATION_CRITERIA:

    Use independent rational signed-normal conjunctions for all four binary signs, unary halves, free coordinates, empty/universe and zero dimensions. Check literal half-integral points under integer storage. Compare rational primitive support suprema with exact closure; verify set preservation independently for rounded and odd-half-sum histories. Inspect actual supported scalar admission, configured native guards and runtime prerequisites.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, signed-variable encoding, coherence and Definition 5 of strong closure (PDF page indices 9–10, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/octagonalshapevaluesfailure1.cc; tests/octagonalshapesaturationspec1.cc.

  • 2. Dimensioned empty and universe octagonal construction UID: PPL-SPEC-001147 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Octagonal_Shape(d,kind) shall construct EMPTY or UNIVERSE in ambient dimension d as selected by kind. Default construction shall produce zero-dimensional universe. Zero-dimensional universe shall contain the unique empty tuple; zero-dimensional empty shall contain none.

    max_space_dimension() shall report the selected profile's structural coordinate limit. A requested dimension above that limit shall throw std::length_error before allocating the corresponding matrix storage, including requests whose doubled signed-node count would overflow the dimension type. The reported limit shall not promise that actual resources exist for every dimension below it. Failed construction shall release the resources acquired by the incomplete object.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Mathematical dimension remains separate from the two signed nodes used for each coordinate and from available storage.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(dimension_type d=0,
                             Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check default/explicit empty and universe construction in zero and small positive dimensions. Check above-limit and unsigned-boundary rejection using bounded allocation observation rather than attempting enormous allocations. Verify incomplete-object cleanup after each admitted allocation failure.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/fromspacedim1.cc; tests/Octagonal_Shape/maxspacedim1.cc; tests/octagonalshapevaluesfailure1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • 3. Owned octagonal copying, assignment and cleanup UID: PPL-SPEC-001148 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary copying shall construct an independent shape with the source's represented set and ambient dimension. Assignment shall replace the receiver's set and dimension with the source's, including different dimensions, and return a reference to the receiver. Self-assignment shall preserve the represented value. Independent source or target mutation and source destruction shall not alter the other owned value.

    The three declared complexity values shall not change ordinary copying. Destruction shall release owned resources exactly once. Failed construction shall release resources acquired by the incomplete object. Failed assignment shall preserve the ownership required for safe destruction; rollback of the entry value shall not be required.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Ownership must follow the mathematical value independently of signed-node storage, cache history and coordinate count.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Octagonal_Shape(const Octagonal_Shape& y,
                    Complexity_Class complexity=ANY_COMPLEXITY);
    Octagonal_Shape& operator=(const Octagonal_Shape& y);
    ~Octagonal_Shape();
    
    VERIFICATION_CRITERIA:

    Check copy construction, copy initialization, assignment, self-assignment and source destruction with independent rational observations. Include cold, closed and reduced cache histories, half-integral singletons, zero dimensions and different dimensions. Inject allocation failures and check cleanup, source preservation and safe destruction without imposing failed-assignment rollback.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/fromoctagonalshape1.cc; tests/octagonalshapevaluesfailure1.cc; tests/Octagonal_Shape/congruences1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001149
    4. Outward conversion between octagonal coefficient profiles UID: PPL-SPEC-001149 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Octagonal_Shape<U> with another supported coefficient base shall preserve the source dimension and produce an independently owned set containing every source point. Finite signed-node bounds selected for conversion shall be converted outward; exactly representable values shall retain their values and positive infinity shall remain unrestricted. Empty and zero-dimensional source meanings shall be preserved.

    The source may undergo logically const strong closure while preserving its represented set. Each declared complexity value shall give the same numerical conversion. Exact representability of the converted entries shall not imply that later sums or half-sums are exact in the destination profile. Source and destination mutation/destruction shall retain independent ownership. Failed construction shall release its acquired resources.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    Outward numeric conversion must retain source points, including fractional points encoded by integral doubled unary bounds.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    template <typename U>
    explicit Octagonal_Shape(const Octagonal_Shape<U>& y,
                             Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Compare rational/native/integer conversions using independently normalized signed bounds, both signs of inexact constants, exact halves, infinity and empty/zero dimensions. Check source-set preservation through closure and independent ownership. Distinguish converted-entry precision from destination strong-closure precision and check failure cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, coherent signed-node and doubled-unary encoding (PDF page index 9, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/fromoctagonalshape1.cc; tests/octagonalshapevaluesfailure1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001150
    5. Whole octagonal value exchange UID: PPL-SPEC-001150 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    m_swap and free swap shall exchange complete represented values and ambient dimensions, including different dimensions and empty/universe values. Owned matrix storage and cache metadata shall remain associated with the exchanged value. A self-swap shall preserve the value. Neither operation shall require coordinate compatibility, numerical reapproximation or a copy of the represented constraints.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Exchanging ownership must not reinterpret the signed-coordinate representation or separate a cache from its value.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    void m_swap(Octagonal_Shape& y);
    template <typename T>
    void swap(Octagonal_Shape<T>& x, Octagonal_Shape<T>& y);
    
    VERIFICATION_CRITERIA:

    Use distinct rational signed-normal values in different dimensions. Check member/free exchange and self-exchange across cold/closed/reduced, empty/universe and half-integral histories, then mutate and destroy the exchanged owners independently.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc.

  • PPL-SPEC-001151
    6. Octagonal construction from supported constraints UID: PPL-SPEC-001151 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Constraint_System shall inherit its ambient dimension and describe the conjunction of its supported constraints, rounded outward where required by the coefficient profile. Supported nonconstant rows shall be weak inequalities or equalities with one nonzero coordinate coefficient, or two nonzero coordinate coefficients of equal absolute magnitude.

    Normalization shall preserve the signs of both coordinates. For distinct coordinates, a(sixi + sjxj) ≤ b, with a > 0, shall use an outward approximation of b ⁄ a. Unary storage shall account for its doubled-coordinate encoding, so axi ≤ b shall use an outward approximation of 2b ⁄ a before interpreting the unary bound. Equality shall impose both corresponding weak inequalities. Exact representable normalized bounds shall retain their values. This shall give the optimal supported primitive bound in the selected profile; it shall not imply exact rational closure in a rounded profile.

    Tautological rows shall impose no restriction; inconsistent rows shall make the represented conjunction empty. These constant-row meanings shall also apply to strict constant rows. A nontrivial strict row or non-octagonal row shall throw std::invalid_argument rather than silently being accepted as an exact supported descriptor. An empty constraint system shall give universe in the system's ambient dimension. The supplied system shall be preserved. can_recycle_constraint_systems() shall return false. Failed construction shall release its acquired resources.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    Binary sign choices and the doubled unary encoding determine primitive precision; unsupported syntax needs an explicit rejection channel.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(const Constraint_System& cs);
    static bool can_recycle_constraint_systems();
    
    VERIFICATION_CRITERIA:

    Normalize each row independently over rationals. Check all four binary signs, negative constants, equalities, doubled unary halves, rational third bounds and optimal outward primitive integer/native bounds. Include redundant and inconsistent conjunctions, strict tautology/inconsistency, unsupported strict and unequal-magnitude binary/general rows, empty systems with explicit ambient dimension, source preservation and failed-construction cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, octagonal constraints and doubled unary encoding (PDF page index 9, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/constraints1.cc; tests/octagonalshapevaluesfailure1.cc; tests/Octagonal_Shape/congruences1.cc; tests/Octagonal_Shape/fromgrid1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001152
    7. Octagonal construction from supported congruences UID: PPL-SPEC-001152 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Congruence_System shall inherit its ambient dimension. A modulus-zero row shall be treated as its equality and shall use the supported signed unary/binary syntax and outward normalization in 🔗 6. Octagonal construction from supported constraints. Tautological congruences shall impose no restriction; inconsistent ones shall make the result empty. A nontrivial proper congruence or unsupported equality shall throw std::invalid_argument. Periodic solutions shall not be replaced by an integer-coordinate interpretation of the convex real carrier.

    An empty congruence system shall produce universe in its ambient dimension. The source system shall be preserved. can_recycle_congruence_systems() shall return false. Failed construction shall release acquired resources.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    A source dimension above the destination profile's max_space_dimension() shall throw std::length_error before source normalization or allocation of the corresponding target matrix storage.

    RATIONALE:

    Affine equalities can define an octagon; nontrivial periodic restrictions need a richer representation.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    explicit Octagonal_Shape(const Congruence_System& cgs);
    static bool can_recycle_congruence_systems();
    
    VERIFICATION_CRITERIA:

    Check signed unary/binary equality constructors, including half-integral fixed coordinates, implicit equality chains, redundant rows and source-system preservation. Include proper tautologies/inconsistencies, rejected nontrivial proper congruences and non-octagonal equalities, zero dimensions and explicit system dimensions. Check failed-construction cleanup.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/Octagonal_Shape.cc; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/congruences1.cc; tests/octagonalshapevaluesfailure1.cc; tests/Octagonal_Shape/dimensionlimits1.cc.

  • PPL-SPEC-001153
    8. Ambient and affine dimension of octagonal values UID: PPL-SPEC-001153 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall return the ambient coordinate count independently of emptiness and affine restrictions. affine_dimension() shall return zero for empty and otherwise the dimension of the smallest affine subspace containing the represented real set. Both zero-dimensional values shall have affine dimension zero.

    Implied unary equalities, signed-sum and signed-difference equalities and redundant equality chains shall contribute according to their independent rank. Rounded graph bounds shall not certify an equality that the represented set does not satisfy. Fractional fixed coordinates shall count as fixed even under integer storage.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Signed-coordinate duplication is an encoding detail; affine dimension counts independent real-coordinate degrees of freedom.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Compute an independent exact rational equality basis and Gaussian rank from all source support pairs. Check full-dimensional sets, fixed half-integers, signed positive/negative equality classes, implicit chains, empty/zero dimensions, and rounded cache histories. Verify source-set preservation separately from the reported dimension.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4.1, singular/non-singular zero-equivalence classes and Definition 8 (PDF page indices 11–12, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/affinedimension1.cc; tests/Octagonal_Shape/fromspacedim1.cc.

  • PPL-SPEC-001154
    9. Owned constraint and affine-equality exports of octagonal values UID: PPL-SPEC-001154 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    constraints() shall return an owned constraint system of the same ambient dimension whose conjunction equals the represented real set. minimized_constraints() shall additionally give an irredundant defining conjunction: removing any returned nontrivial row shall enlarge that set. A particular row order, equality orientation or unique minimal cardinality shall not be required. Stored unary halves and all finite signed bounds shall retain their exact mathematical values in the exported descriptors.

    congruences() and minimized_congruences() shall return owned equality congruences defining the receiver's affine hull, with the same ambient and affine dimensions. Their nonempty equality system shall form an independent basis of its affine restrictions. They shall not replace inequalities by periodic conditions. Empty shall export inconsistency; zero-dimensional universe shall export a tautological conjunction.

    All returned systems shall remain usable after source mutation or destruction. Source normalization shall preserve its represented set, including for rounded and integer half-sum profiles. Export coefficients shall meet the configured Coefficient output range prerequisites.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Defining inequalities and an affine-hull equality basis carry different information, and both need independent ownership.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Constraint_System constraints() const;
    Constraint_System minimized_constraints() const;
    Congruence_System congruences() const;
    Congruence_System minimized_congruences() const;
    
    VERIFICATION_CRITERIA:

    Reconstruct independent rational halfspaces from every returned row and check both containments. Remove each minimized row and prove strict enlargement, without fixing one basis. Compute affine-hull rank independently and verify equality basis sufficiency/independence. Include signed sums, differences, half-integral coordinates, redundant/cyclic and rounded descriptions, empty/zero dimensions and post-source-destruction use. Separate output Coefficient representability from valid domain-operation admission.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4.1, strong reduction, zero-equivalence subgraphs and Definitions 6–10 (PDF page indices 10–14, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/constraints1.cc; tests/Octagonal_Shape/minconstraints1.cc; tests/Octagonal_Shape/extrememinconstraints1.cc; tests/Octagonal_Shape/congruences1.cc; tests/octagonalshapevaluesfailure1.cc.

  • PPL-SPEC-001155
    10. Ordinary classification of octagonal values UID: PPL-SPEC-001155 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The ordinary classification calls shall decide their named mathematical properties of the represented real set: emptiness, universe, discreteness, boundedness, topological closure and existence of an integer point. Every octagonal shape shall be topologically closed. A nonempty convex shape shall be discrete exactly when it is a singleton. Empty shall be discrete and bounded and shall contain no integer point. Zero-dimensional universe shall be nonempty, universe, bounded and discrete and contain its integer empty tuple.

    contains_integer_point() shall decide intersection with Zn, independently of the stored coefficient type. A nonempty half-integral singleton shall therefore have no integer point, including when its doubled unary bounds are stored as integers.

    constrains(var) shall report whether that coordinate is restricted, including by a binary relation: the set is unrestricted in that coordinate exactly when it is invariant under every translation along the coordinate axis. Empty shall constrain every valid coordinate. A variable beyond the ambient dimension shall throw std::invalid_argument.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Convex real discreteness, lattice feasibility and syntactic integer storage are different properties.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool is_empty() const;
    bool is_universe() const;
    bool is_discrete() const;
    bool is_bounded() const;
    bool is_topologically_closed() const;
    bool contains_integer_point() const;
    bool constrains(Variable var) const;
    
    VERIFICATION_CRITERIA:

    Check exact rational feasibility/recession/support against every Boolean classification. Include lazy emptiness, pure relational axis restrictions, signed half-integral singletons, unbounded affine lines, rational regions with/without lattice points, integer-storage shapes with fractional real points, empty/zero dimensions and invalid variable rejection. Use independently bounded integer enumeration only when support bounds prove completeness.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, real/rational octagonal shapes; Section 5, distinction between strong and tight closure for integer feasibility.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/empty1.cc; tests/Octagonal_Shape/universe1.cc; tests/Octagonal_Shape/discrete1.cc; tests/Octagonal_Shape/bounded1.cc; tests/Octagonal_Shape/containsintegerpoint1.cc; tests/Octagonal_Shape/constrains1.cc; tests/octagonalshapesaturationspec1.cc.

  • PPL-SPEC-001156
    11. Octagonal set relations, equality and compatible hashes UID: PPL-SPEC-001156 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For compatible dimensions, contains(y) shall be true exactly when every point of y belongs to the receiver, strictly_contains(y) exactly for proper set containment, and is_disjoint_from(y) exactly when their intersection is empty. These calls shall throw std::invalid_argument when the ambient dimensions differ. A nonempty set shall strictly contain empty, including in zero dimensions; equal sets shall never strictly contain one another.

    Free equality shall compare ambient dimension and the represented set, and inequality shall be its logical negation. Different dimensions shall compare unequal without throwing. Equal values shall have equal hash_code() results; unequal values may collide. Mathematical equality shall not depend on row insertion order or the existence of one canonical rounded matrix.

    A stored bound of the inner octagon that is at least as tight as the corresponding outer bound certifies that inequality. If rounded or saturated closure leaves a weaker bound, decide the inequality using the exact support of the stored inner octagon, including the strong-coherence half-sum.

    Both operands' values and dimensions shall be preserved. The same owned shape may be supplied on both sides; containment/equality shall then be true and proper containment false, while self-disjointness shall mean emptiness.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Set relations concern represented points and dimension, rather than one numerical encoding or cache history.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool contains(const Octagonal_Shape& y) const;
    bool strictly_contains(const Octagonal_Shape& y) const;
    bool is_disjoint_from(const Octagonal_Shape& y) const;
    int32_t hash_code() const;
    template <typename T>
    bool operator==(const Octagonal_Shape<T>& x, const Octagonal_Shape<T>& y);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Use independent rational feasibility to derive both containments and intersection emptiness. Compare equal sets with reordered/redundant rows and different closure/reduction histories; include signed sums, half-integral and rounded representations, self histories, empty/zero dimensions and mismatch behavior. Require equal hashes only for mathematically equal values. Check implication through paths whose intermediate sums round upward and through unary bounds whose native sum overflows before halving.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/contains1.cc; tests/Octagonal_Shape/cc76narrowing1.cc; tests/Octagonal_Shape/disjoint1.cc; tests/Octagonal_Shape/congruences1.cc; tests/octagonalshapesaturationspec1.cc.

  • PPL-SPEC-001157
    12. Relations between octagonal values and linear constraints UID: PPL-SPEC-001157 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(c) shall return the exact Poly_Con_Relation flags of the represented set relative to c under 🔗 1. Constraint-relation assertion values and named factories. Inclusion shall mean every source point satisfies the row, disjointness that none does, and saturation that its affine expression is zero throughout the source. Strict intersection shall retain its declared logical meaning. Empty and constant-row cases shall retain the simultaneous flags implied by those meanings.

    The supplied linear row need not have octagonal syntax and may be weak, strict or an equality. Its dimension shall not exceed the receiver's; otherwise the call shall throw std::invalid_argument. The descriptor and source value shall be preserved. Rounded outer extrema alone shall not justify a relation flag that is false of the represented set.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    A restricted shape representation can answer exact semantic questions about more general linear halfspaces and hyperplanes.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Constraint& c) const;
    
    VERIFICATION_CRITERIA:

    Project arbitrary rational affine forms independently and derive each flag from the attained range and boundary relation. Include all octagonal signs, unary half-integers, general correlated objectives, strict/equality/weak rows, constant true/false rows, empty/zero dimensions, rounded extrema and oversized descriptor rejection.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/relatwithcons1.cc; tests/Octagonal_Shape/relatwithcons2.cc; tests/Octagonal_Shape/relatwithcons3.cc; tests/Octagonal_Shape/semanticqueries1.cc.

  • PPL-SPEC-001158
    13. Relations between octagonal values and linear congruences UID: PPL-SPEC-001158 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(cg) shall classify the represented real set using Poly_Con_Relation. Modulus zero shall have equality meaning. For a proper modulus, inclusion shall mean every source point satisfies the periodic condition; disjointness shall mean none does. For a nonempty source, saturation shall mean that its affine image is one value in the eligible modulus lattice, including a nonzero lattice value. Other overlapping cases shall use the declared strict-intersection flag. Empty shall retain its set-theoretic simultaneous flags.

    General admitted affine congruences shall be queryable even when their solution sets cannot be represented by an octagonal shape. The call shall throw std::invalid_argument when the descriptor dimension exceeds the source's. The descriptor and represented set shall be preserved. The decision shall use real convex points rather than an integer-only reinterpretation of integer bound storage.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Testing a periodic predicate does not require adding its nonconvex solution set to the shape representation.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Con_Relation relation_with(const Congruence& cg) const;
    
    VERIFICATION_CRITERIA:

    Combine exact rational affine ranges with independent arithmetic-progression intersection tests. Include negative and fractional singleton values, satisfied/unsatisfied constant residues, modulus zero, narrow intervals between residue levels, nonconstant unbounded ranges, all coefficient profiles, empty/zero dimensions and incompatible descriptors.

    SOURCE:

    src/Shape_Congruence_Queries.hh; tests/shapeconstantqueryspec1.cc; src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/relatwithcons2.cc; tests/Octagonal_Shape/relatwithcons3.cc; tests/Octagonal_Shape/semanticqueries1.cc; tests/shapequerycertificatespec1.cc.

  • PPL-SPEC-001159
    14. Subsumption of geometric generators by octagonal values UID: PPL-SPEC-001159 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(g) shall report Poly_Gen_Relation::subsumes() exactly when the represented set subsumes g under 🔗 6. Generator-relation assertion values and named factories, and nothing() otherwise. Points and closure points shall use their exact rational coordinates; their membership tests shall agree because the domain is topologically closed. A ray direction r shall satisfy a⋅r ≤ 0 for every defining inequality a⋅x ≤ b; a line direction shall satisfy the corresponding equalities a⋅r = 0.

    Empty shall subsume no generator. A lower-dimensional generator shall have zero trailing coordinates. A generator exceeding the source dimension shall throw std::invalid_argument. The descriptor and source value shall be preserved.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    Closed-point membership and recession directions impose different homogeneous tests over the same signed normal system.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    Poly_Gen_Relation relation_with(const Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Independently substitute rational points/closure points and evaluate every signed normal on rays/lines. Include divisors, half-integral fixed coordinates, signed sums/differences, rejected one-sided directions, free axes, lower ambient generator dimensions, empty/zero dimensions and oversized rejection.

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/relatwithgen1.cc.

  • PPL-SPEC-001160
    15. Affine boundedness, extrema and witnesses on octagonal values UID: PPL-SPEC-001160 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounds_from_above and bounds_from_below shall decide whether the supplied affine expression has a finite corresponding bound on the represented set. Empty shall bound every admitted expression in both directions; zero-dimensional universe shall bound every admitted constant. An expression dimension exceeding the receiver's shall cause these calls and all extrema overloads to throw std::invalid_argument.

    For a nonempty source with exact unbounded rational strong-closure arithmetic, maximization/minimization shall succeed exactly when the requested extremum is finite and return its exact rational value. Every finite extremum of a closed polyhedral octagonal set shall be attained.

    When strong-closure arithmetic rounds, saturates or overflows, the overload without a witness may use an outward closed-table bound for an octagonal affine objective: a returned upper value shall be at least the actual supremum and a lower value at most the actual infimum. Halving odd integer bounds shall count as rounded arithmetic. For a no-witness extremum call, overflow may cause false when a finite closed-table bound cannot be obtained. Non-octagonal affine objectives shall use exact optimization of the represented constraints rather than treating a rounded outer estimate as an exact extremum.

    On successful witness overloads, the returned rational value shall be the exact extremum of the represented source, and g shall be an ordinary point in that set attaining it. All coordinates of the witness shall satisfy the source constraints. The attainment Boolean shall concern the actual extremum, not certify that an approximate numerical bound is attained. An ordinary successful call on these closed sets shall set it to true. On false, all supplied scalar outputs, the Boolean and any supplied witness shall retain their entry values. Constant expressions and zero-dimensional cases shall retain their exact meanings.

    Numerator and denominator output objects shall be distinct and satisfy the configured Coefficient range prerequisites. A successful rational output shall have a positive denominator. The supplied expression and source value shall be preserved.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    A cheap outward closed-table bound and an exact optimizing point carry different guarantees, especially when integer half-sums round.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool bounds_from_above(const Linear_Expression& expr) const;
    bool bounds_from_below(const Linear_Expression& expr) const;
    bool maximize(const Linear_Expression& expr,
                  Coefficient& n, Coefficient& d, bool& maximum) const;
    bool maximize(const Linear_Expression& expr,
                  Coefficient& n, Coefficient& d, bool& maximum, Generator& g) const;
    bool minimize(const Linear_Expression& expr,
                  Coefficient& n, Coefficient& d, bool& minimum) const;
    bool minimize(const Linear_Expression& expr,
                  Coefficient& n, Coefficient& d, bool& minimum, Generator& g) const;
    
    VERIFICATION_CRITERIA:

    Eliminate an added rational objective coordinate independently to obtain boundedness, exact extrema and attainment. Check unary halves, every binary sign, negative scales, offsets and general correlated objectives. Compare bound-only results directionally for rounded profiles and exactly where all required arithmetic is exact. Check witness value and every coordinate against all source rows independently. Include odd half-sums, finite/unbounded rays, constants, empty/zero dimensions, preserved false sentinels, dimensional errors and output range prerequisites.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4, strengthening inference rule (5) and Definition 5 of strong closure (PDF page index 10, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; src/MIP_Problem_defs.hh; src/MIP_Problem.cc; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/bounds1.cc; tests/Octagonal_Shape/max_min1.cc; tests/Octagonal_Shape/max_min2.cc; tests/Octagonal_Shape/semanticqueries1.cc.

  • PPL-SPEC-001161
    16. Constant affine values and zero frequency on octagonal sets UID: PPL-SPEC-001161 STATUS: APPROVED COMPONENT: OCTAGONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    frequency(expr,fn,fd,vn,vd) shall return true exactly when the nonempty represented set assigns one unique real value to expr. On success, fn/fd shall be 0/1 and vn/vd shall equal that exact constant, with a positive denominator. A nonconstant or empty source shall return false and leave all four scalar outputs unchanged. Constant expressions and zero-dimensional universe shall obey the same rule.

    Signed equality substitution and fractional fixed coordinates shall retain their mathematical values. Inexact closure bounds shall not establish a constant expression unless it truly is constant on the represented set. The call shall throw std::invalid_argument if the expression dimension exceeds the source dimension. The four scalar output objects shall be pairwise distinct and satisfy their configured Coefficient range prerequisites. The expression and represented set shall be preserved.

    The lifetime, numerical-profile, initialization and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. Logically const normalization may update caches while preserving the represented set and ambient dimension. Supported numerical or allocation failures may propagate through their declared channels; temporary resources shall be released.

    RATIONALE:

    An affine image of a nonempty convex real set is either one value or an interval; it cannot have a nonzero discrete frequency.

    INTERFACE:

    Public header: <ppl.hh>; excerpts for Octagonal_Shape<T> and related free functions in Parma_Polyhedra_Library:

    bool frequency(const Linear_Expression& expr,
                   Coefficient& fn, Coefficient& fd,
                   Coefficient& vn, Coefficient& vd) const;
    
    VERIFICATION_CRITERIA:

    Derive exact affine ranges/equality spans independently and compare constancy, zero frequency and rational values. Include signed-sum and signed-difference identities on unbounded shapes, half-integral singletons stored with integer bounds, dependent equalities, zero/negative constants, free directions, rounded descriptions, unchanged false outputs, empty/zero dimensions and rejected dimensions.

    BIBLIOGRAPHY:

    BagnaraHZ09FMSD | Section 4.1, singular/non-singular zero-equivalence classes and their equality interpretation (PDF page indices 11–12, zero-based).

    SOURCE:

    src/Octagonal_Shape_defs.hh; src/Octagonal_Shape_inlines.hh; src/Octagonal_Shape_templates.hh; tests/octagonalshapevaluesspec1.cc; tests/octagonalshapevalueoracle.hh; tests/bdshapeconversionoracle.hh; tests/bdshapevalueoracle.hh; tests/boxrefinementoracle.hh; tests/boxsetoracle.hh; tests/boxallocationfixture.hh; tests/octagonalshapevaluespublic1.cc; tests/Octagonal_Shape/frequency1.cc.

  • 1. Pseudo-triangular matrix values and physical coordinates UID: PPL-SPEC-000771 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    OR_Matrix<T> shall own a pseudo-triangular array with a nonnegative space dimension n, exactly 2n physical rows, and row width w(k) = 2(⌊k ⁄ 2⌋ + 1) for 0 ≤ k < 2n. Its stored entries shall be exactly the pairs (k, j) with 0 ≤ j < w(k); their total count shall be 2n(n + 1). Coordinate identity and value shall be independent of spare capacity. Physical access shall require these coordinates; entries outside this pseudo-triangle shall not be supplied by the raw storage interface.

    The selected T shall satisfy 🔗 1. Extended-number row meaning and construction states for the element operations actually used, including its arithmetic, initialization, resource and synchronization prerequisites. Admitted dimensions and cursor displacements shall fit the advertised row bound and all selected size, offset, capacity and signed-displacement calculations. Borrowed objects shall require their coefficients to remain alive and unmoved. Only successful operations on valid objects shall reestablish the full matrix value; reported failures shall retain 🔗 20. Incomplete-owner cleanup and mutation failure states.

    RATIONALE:

    Octagonal storage needs an exact physical coordinate domain without assigning higher-level closure, diagonal or implicit symmetric-entry semantics to its raw container.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    template <typename T> class OR_Matrix;
    
    VERIFICATION_CRITERIA:

    Compare independent ragged arrays and actual coordinate addresses through empty, nonempty, copy and dimension-change histories.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000772
    2. Sized construction, destruction and the supported row bound UID: PPL-SPEC-000772 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction with admitted space dimension n shall create the shape of 🔗 1. Pseudo-triangular matrix values and physical coordinates and initialize every stored entry to positive infinity, including every stored diagonal entry. Zero dimension shall create an empty owning matrix with no rows or logical entries. No public default constructor shall be supplied. Destruction shall release the owned storage and each physically live coefficient exactly once. Failed construction shall retain 🔗 20. Incomplete-owner cleanup and mutation failure states.

    max_num_rows() shall report an even supported physical row-count bound. For admitted dimensions, twice the dimension shall not exceed that bound, and the corresponding stored count shall fit the supported DB_Row<T> size. The bound shall not guarantee available resources for constructing an object of that size.

    RATIONALE:

    Raw octagonal storage begins with unconstrained bounds; geometric owners establish any separate diagonal or closure invariants.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    OR_Matrix(dimension_type n);
    ~OR_Matrix();
    static dimension_type max_num_rows();
    
    VERIFICATION_CRITERIA:

    Check zero and several positive dimensions, every stored infinity, even row bounds against independent integer size calculations and owned-resource cleanup.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000773
    3. Independent ordinary and rvalue copy construction UID: PPL-SPEC-000773 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Ordinary copy construction shall create the same space dimension and stored entry values in independently owned coefficients. It shall preserve its source. Mutation or destruction of either completed owner shall not change the other owner. Physical spare capacity need not be copied exactly. An rvalue source shall retain this ordinary copying contract; no distinct move constructor shall be required. Empty matrices shall copy as empty matrices. Failure shall preserve the source and release the incomplete target under 🔗 20. Incomplete-owner cleanup and mutation failure states.

    RATIONALE:

    Copying must preserve values and coordinate associations independently of the storage allocation and source value category.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    OR_Matrix(const OR_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Check ordinary and rvalue copies of empty and populated matrices, all entry addresses, source mutation/destruction, and large exact rational payloads.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000774
    4. Pointwise upward representation conversion UID: PPL-SPEC-000774 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Cross-element-type construction shall create an independently owned matrix of the source space dimension. Each physical coordinate shall follow the upward conversion of 🔗 7. Pointwise upward conversion of extended-number rows: finite results shall bound the exact source upward, exactly representable values shall remain exact, and supported extended values shall retain their meanings. The source shall remain unchanged. Empty sources shall produce empty targets. Selected source/target profiles shall admit the conversions and all required intermediates. Failure shall retain 🔗 20. Incomplete-owner cleanup and mutation failure states.

    RATIONALE:

    Changing the representation of stored bounds requires directed conversion at every actual pseudo-triangular coordinate.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    template <typename U> explicit OR_Matrix(const OR_Matrix<U>& y);
    
    VERIFICATION_CRITERIA:

    Use independent GMP ceilings for signed rational-to-integral conversion at every physical coordinate, exact rational conversions, infinities, empty matrices and source preservation.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • 5. Value assignment and assignment failure preservation UID: PPL-SPEC-000775 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful assignment shall replace the target by the source space dimension and independently owned physical entry values, preserve its source, and return the target wrapper. Self-assignment shall preserve its dimension and values; it need not preserve allocation addresses or spare capacity. Rvalue assignment shall retain the ordinary copying contract. A supported recoverable allocation or coefficient-copy failure while preparing the replacement shall preserve the completed target and source values, release the incomplete replacement, and permit retry. Successful replacement shall invalidate borrows to the replaced storage.

    RATIONALE:

    The owned row is replaced before the dimension metadata is committed, so assignment provides a value-preserving preparation failure guarantee.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    OR_Matrix& operator=(const OR_Matrix& y);
    
    VERIFICATION_CRITERIA:

    Exercise every source/target dimension pair, self- and rvalue assignment, independence, preparation allocation/copy failures and successful retry.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000776
    6. Whole-owner swap and borrowed coefficient identity UID: PPL-SPEC-000776 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Member and free swap shall exchange the entire owning storage, space dimension and capacity metadata. They shall preserve every entry value and coordinate within its transferred owner without copying, allocating or destroying coefficients. Existing coefficient references and copied row views shall keep referring to the same live coefficients now owned by the other matrix. Self-swap shall preserve the owner. Callers shall associate any retained cursor with the transferred shape and storage rather than reuse it with the other allocation.

    RATIONALE:

    Owning-container exchange must transfer shape together with coefficients and distinguish storage identity from wrapper identity.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    void m_swap(OR_Matrix& y);
    template <typename T> void swap(OR_Matrix<T>& x, OR_Matrix<T>& y);
    
    VERIFICATION_CRITERIA:

    Check empty/nonempty and unequal dimensions, exact entry addresses, retained value views, self-swap and absence of element copies or allocations.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000777
    7. Dimension queries, row-width formula and exact array equality UID: PPL-SPEC-000777 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    space_dimension() shall return the current characteristic parameter n; num_rows() shall return 2n. row_size(k) shall return 2(⌊k ⁄ 2⌋ + 1) whenever its index and result arithmetic are representable. The formula may also be queried for a count-only endpoint without dereferencing it.

    Equality shall hold exactly when both matrices have the same space dimension and equal values at every stored coordinate. Inequality shall be its negation. Different dimensions shall compare unequal regardless of their common-prefix entries. Equality shall not modify either input.

    RATIONALE:

    Physical row shape and exact entry equality must remain observable without depending on the implementation cache or allocation.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    dimension_type space_dimension() const;
    dimension_type num_rows() const;
    static dimension_type row_size(dimension_type k);
    template <typename T> bool operator==(const OR_Matrix<T>& x,
                                          const OR_Matrix<T>& y);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Check every row-width pair and endpoint formula, all small dimension pairs, and an independent change at each stored coordinate.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • 8. Borrowing row-view construction, conversion and lifetime UID: PPL-SPEC-000778 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A row_reference_type shall be a value view borrowing one physical row of mutable T coefficients. const_row_reference_type shall borrow const coefficients. Copy construction and ordinary assignment shall copy the binding without copying coefficients or allocating. The declared compatible converting constructor shall permit mutable-to- const view construction and its use for compatible assignment. View destruction shall leave the coefficients unchanged.

    A default-constructed view shall be unbound and shall require assignment of a valid view before coefficient access. A bound copied view shall remain independent of the cursor cache from which it was obtained, while the borrowed coefficients remain alive and unmoved. Constness of the view wrapper alone shall preserve its selected coefficient type.

    RATIONALE:

    A lightweight row value must expose nonowning binding and constness without pretending to own the coefficients or a cursor cache.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    using row_reference_type = Pseudo_Row<T>;
    using const_row_reference_type = Pseudo_Row<const T>;
    // The following members apply to the nested Pseudo_Row<U> type.
    Pseudo_Row();
    Pseudo_Row(const Pseudo_Row& y) = default;
    template <typename V> Pseudo_Row(const Pseudo_Row<V>& y);
    Pseudo_Row& operator=(const Pseudo_Row& y);
    ~Pseudo_Row();
    
    VERIFICATION_CRITERIA:

    Bind default views by assignment; check copy/converting construction and compatible assignment, mutable const-wrapper access, unchanged addresses and use after cursor destruction.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000779
    9. Coordinate subscripting through borrowing row values UID: PPL-SPEC-000779 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Matrix subscripting at live physical row k shall return a borrowing value view of that row. Subscript j on a bound view shall return the actual coefficient reference at (k, j) and require 0 ≤ j < w(k). Mutable coefficient views shall permit updates through const view wrappers; const coefficient views shall provide read-only references. The operations shall not copy or allocate coefficients, and views shall retain 🔗 8. Borrowing row-view construction, conversion and lifetime.

    Member overloads that return references, iterators or nonowning views into the owner shall require an lvalue owner. Matching rvalue calls that would produce such borrows shall be rejected during overload resolution. Temporary iterator and row-view values shall remain usable while their backing owner remains alive.

    RATIONALE:

    Row-value and flat storage access must select the same actual coefficient at every admitted physical coordinate.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    row_reference_type operator[](dimension_type k) &;
    const_row_reference_type operator[](dimension_type k) const &;
    // The following member applies to the nested Pseudo_Row<U> type.
    U& operator[](dimension_type j) const &;
    
    VERIFICATION_CRITERIA:

    Compare actual references with independent flattened offsets, exercise all mutable cells and verify const-reference types and retained copied views. Check lvalue admission and temporary-owner rejection with compile-time client expressions. Preserve temporary iterator/view use and lvalue storage identity in runtime checks.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc. tests/rowstoragespec1.cc.

  • PPL-SPEC-000780
    10. Row-cursor binding, copying and compatible const conversion UID: PPL-SPEC-000780 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A storage-backed row cursor constructed from the first coefficient of a live nonempty matrix shall denote row zero. Count-only construction shall record the supplied row count for comparisons and index/width queries without binding matrix storage; such a cursor shall not be navigated or dereferenced. A count-only matrix endpoint shall have the matrix's current physical row count.

    Copy construction and assignment shall reproduce the position and a separate cached row view without coefficient copying or allocation. Compatible mutable-to-const construction and assignment shall be supported. All storage-backed cursors shall retain the single-allocation lifetime and valid-position conditions of 🔗 1. Pseudo-triangular matrix values and physical coordinates.

    Borrowing iterator constructors shall reject temporary backing owners. Copying temporary iterator values shall remain admitted when their backing storage remains alive.

    RATIONALE:

    An endpoint carrying only an index and a cursor carrying live storage have different admissible operations.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    // Members apply to the nested any_row_iterator<U> type.
    any_row_iterator(dimension_type n_rows);
    explicit any_row_iterator(U& base);
    template <typename V> any_row_iterator(const any_row_iterator<V>& y);
    template <typename V> any_row_iterator& operator=(const any_row_iterator<V>& y);
    
    VERIFICATION_CRITERIA:

    Check explicit storage binding, zero/nonzero count-only queries, ordinary copies/assignments and mutable-to-const copies/assignments at every live and end position. Check lvalue admission and temporary-owner rejection with compile-time client expressions. Preserve temporary iterator/view use and lvalue storage identity in runtime checks.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc. tests/rowstoragespec1.cc.

  • PPL-SPEC-000781
    11. Row-cursor aliases, cached views and position queries UID: PPL-SPEC-000781 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Row-cursor aliases shall retain the declared types below. The category shall support the library's member-operation dispatch; these declarations shall not promise the complete standard-library iterator requirements. In particular, std::reverse_iterator shall not be an admitted adapter for this cached-reference cursor.

    At a live position, dereference and arrow shall borrow the cached row view inside that cursor. The returned reference/pointer shall require that cursor to remain alive and unchanged. Copying the view by value shall create an independent borrowing value under 🔗 8. Borrowing row-view construction, conversion and lifetime, including a copy made within the full expression of a temporary cursor. Cursor index() shall return its row index; row_size() shall return the width formula for that index. Endpoints shall support these queries without coefficient access.

    RATIONALE:

    Cached row references have the cursor lifetime, while copied row values have only the underlying coefficient lifetime.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    // Aliases and members apply to any_row_iterator<U>.
    using iterator_category = std::random_access_iterator_tag;
    using value_type = Pseudo_Row<U>;
    using difference_type = long;
    using pointer = const Pseudo_Row<U>*;
    using reference = const Pseudo_Row<U>&;
    reference operator*() const;
    pointer operator->() const;
    dimension_type index() const;
    dimension_type row_size() const;
    
    VERIFICATION_CRITERIA:

    Check exact alias/reference types, arrow/dereference cache identity, independent cursor caches, copied values retained after cursor movement/destruction and endpoint queries.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000782
    12. Row-cursor prefix and postfix traversal UID: PPL-SPEC-000782 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For storage-backed cursors, increment and decrement shall change the row index by exactly one and bind the corresponding physical row or past-the-end position. Navigation shall stay in the same matrix's closed begin/end position interval. Prefix shall return the updated cursor by reference; postfix shall return an independent copy of the old cursor. Returned old live positions shall remain usable while their coefficients remain live and unmoved. Past-the-end shall not be dereferenced. Both even/odd row-width transitions shall retain exact coordinate associations.

    RATIONALE:

    Pseudo-triangular row widths change in pairs, so stepping must preserve both cursor position and old postfix cache bindings.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    // Members apply to any_row_iterator<U>.
    any_row_iterator& operator++();
    any_row_iterator operator++(int);
    any_row_iterator& operator--();
    any_row_iterator operator--(int);
    
    VERIFICATION_CRITERIA:

    Traverse every row in both directions for mutable/const cursors, check prefix identity and old postfix views, and compare all entries with an independent ragged array.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000783
    13. Signed and unsigned row offsets and indexed view values UID: PPL-SPEC-000783 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a storage-backed cursor at row index k, admitted offset m shall produce index k + m in the same matrix's closed begin/end interval. Signed addition/subtraction and the declared unsigned addition overloads shall agree on common nonnegative offsets. Compound updates shall return the modified cursor; value-returning operations shall preserve their source. Selected signed displacement calculations, including negation, shall be representable.

    Indexed cursor access shall require the offset position to be a live row and return that row's borrowing view by value. This value shall remain independent of the source cursor's cached view and lifetime, subject to the coefficient lifetime conditions.

    RATIONALE:

    Random row displacement must use physical row offsets correctly for both signed directions and width-parity transitions.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    // Members apply to any_row_iterator<U>.
    any_row_iterator& operator+=(difference_type m);
    template <typename Unsigned>
        requires (static_cast<Unsigned>(-1) > 0)
      any_row_iterator&
      operator+=(Unsigned m);
    any_row_iterator& operator-=(difference_type m);
    any_row_iterator operator+(difference_type m) const;
    template <typename Unsigned>
        requires (static_cast<Unsigned>(-1) > 0)
      any_row_iterator
      operator+(Unsigned m) const;
    any_row_iterator operator-(difference_type m) const;
    value_type operator[](difference_type m) const;
    
    VERIFICATION_CRITERIA:

    Check every pair of source/destination positions for small dimensions, signed negative/positive/zero and unsigned offsets, indexed value lifetime and source preservation.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000784
    14. Row-position comparison and signed differences UID: PPL-SPEC-000784 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Comparison and difference shall require positions of the same live matrix, using compatible const conversion where required by the declared member signatures. The six comparisons shall have exactly the ordering of the row indices. Cursor difference shall return the mathematical signed difference of the two indices when representable in difference_type. Empty count-only begin/end positions may be compared and subtracted without navigating or dereferencing them. No coefficient value shall affect these results.

    RATIONALE:

    Row positions need the same exact order and signed distance independently of coefficients and proxy-cache addresses.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    // Members apply to any_row_iterator<U>.
    difference_type operator-(const any_row_iterator& y) const;
    bool operator==(const any_row_iterator& y) const;
    bool operator!=(const any_row_iterator& y) const;
    bool operator<(const any_row_iterator& y) const;
    bool operator<=(const any_row_iterator& y) const;
    bool operator>(const any_row_iterator& y) const;
    bool operator>=(const any_row_iterator& y) const;
    
    VERIFICATION_CRITERIA:

    Compare all ordered pairs including endpoints against independent integer indices, both difference signs, identical positions and empty ranges.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000785
    15. Mutable and const row-range endpoints UID: PPL-SPEC-000785 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a nonempty matrix, row begin/end shall return storage-backed cursors at indices zero and num_rows(). They shall delimit exactly the live physical rows and permit supported forward/backward member navigation. For an empty matrix, both shall return equal count-only endpoints of index zero; they shall not be navigated or dereferenced. Const overloads shall return read-only coefficient cursors. Shape changes shall require obtaining new endpoints before traversing the new shape; coefficient borrows shall retain their own lifetime rules.

    Member overloads that return references, iterators or nonowning views into the owner shall require an lvalue owner. Matching rvalue calls that would produce such borrows shall be rejected during overload resolution. Temporary iterator and row-view values shall remain usable while their backing owner remains alive.

    RATIONALE:

    Empty row ranges must avoid manufacturing references to nonexistent storage, while nonempty ends must support reverse member traversal.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    row_iterator row_begin() &;
    row_iterator row_end() &;
    const_row_iterator row_begin() const &;
    const_row_iterator row_end() const &;
    
    VERIFICATION_CRITERIA:

    Check mutable/const begin/end for all small dimensions, exact row count/widths, reverse traversal from nonempty ends and fresh ranges after clear and resizing. Check lvalue admission and temporary-owner rejection with compile-time client expressions. Preserve temporary iterator/view use and lvalue storage identity in runtime checks.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc. tests/rowstoragespec1.cc.

  • PPL-SPEC-000786
    16. Flattened element ranges and physical row-major order UID: PPL-SPEC-000786 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Element begin/end shall delimit exactly the live stored coefficients in increasing physical row order and increasing column order within each row. Mutable and const overloads shall retain the corresponding DB_Row<T> pointer-iterator contracts of 🔗 5. Row sizes, supported limits, coefficient ranges and equality and 🔗 1. Pointer-adapter types and borrowed storage. A zero-dimensional matrix shall have an empty valid element range. For every live coordinate, the flat coefficient reference shall be identical to matrix/row-view subscripting at that coordinate. Shape/owner changes shall retain the actual coefficient lifetime and invalidation rules.

    Member overloads that return references, iterators or nonowning views into the owner shall require an lvalue owner. Matching rvalue calls that would produce such borrows shall be rejected during overload resolution. Temporary iterator and row-view values shall remain usable while their backing owner remains alive.

    RATIONALE:

    Flat numeric algorithms and row-based algorithms must visit exactly the same physical entries in a shared deterministic order.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    using element_iterator = DB_Row<T>::iterator;
    using const_element_iterator = DB_Row<T>::const_iterator;
    element_iterator element_begin() &;
    element_iterator element_end() &;
    const_element_iterator element_begin() const &;
    const_element_iterator element_end() const &;
    
    VERIFICATION_CRITERIA:

    Compare flattened values and actual addresses with independent ragged-prefix offsets, mutate through both access forms, and check empty/const ranges. Check lvalue admission and temporary-owner rejection with compile-time client expressions. Preserve temporary iterator/view use and lvalue storage identity in runtime checks.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc. tests/rowstoragespec1.cc.

  • PPL-SPEC-000787
    17. Value-preserving dimension growth UID: PPL-SPEC-000787 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    grow(new_dim) shall require an admitted dimension no smaller than the current dimension. On success it shall produce the new shape, preserve every old stored coordinate exactly and initialize every newly introduced coordinate to positive infinity. Growth to the current dimension shall preserve the values and existing coefficient objects. Successful growth may replace storage; retained views shall be usable only while their actual coefficients remain alive and unmoved. Reported failure shall retain 🔗 20. Incomplete-owner cleanup and mutation failure states.

    RATIONALE:

    Adding octagonal dimensions extends the pseudo-triangle as a physical prefix and must not change earlier coordinate values.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    void grow(dimension_type new_dim);
    
    VERIFICATION_CRITERIA:

    Compare independent ragged-array histories across fresh and retained capacity, repeated equal dimensions, zero starts and several reallocations.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000788
    18. Dimension shrinkage and complete clearing UID: PPL-SPEC-000788 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    shrink(new_dim) shall require an admitted dimension no greater than the current dimension. It shall preserve exactly the physical prefix of rows belonging to the new shape, destroy removed logical coefficients, and set the new dimension. Removed values shall not reappear after later successful growth. Equal-dimension shrinkage shall preserve the existing values and coefficient objects.

    clear() shall release the old owned storage and replace the matrix by a valid zero-dimensional owning matrix. It shall be safe on an already empty matrix and permit subsequent construction by growth or assignment. Clearing shall invalidate old coefficient borrows.

    RATIONALE:

    Removing dimensions must discard their values and lifetimes while preserving the retained physical prefix and reusable empty state.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    void shrink(dimension_type new_dim);
    void clear();
    
    VERIFICATION_CRITERIA:

    Check every smaller dimension, retained addresses and values, element destruction counts, repeated clear and regrowth with new infinities.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • PPL-SPEC-000789
    19. Discarding resize and valid rebuilt shape UID: PPL-SPEC-000789 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    resize_no_copy(new_dim) shall accept every admitted dimension. On success it shall establish the corresponding valid shape. Shrinking shall retain the prefix behavior of 🔗 18. Dimension shrinkage and complete clearing. Equal- dimension calls shall preserve the existing coefficient objects and values. Growing shall initialize all newly introduced coordinates to positive infinity; no old-prefix value preservation shall be required by this interface. A client needing that preservation shall use 🔗 17. Value-preserving dimension growth. Failure shall retain 🔗 20. Incomplete-owner cleanup and mutation failure states.

    RATIONALE:

    Rebuilding storage may avoid copying old bounds, while newly introduced coordinates and the resulting physical shape still require definite values.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    void resize_no_copy(dimension_type new_dim);
    
    VERIFICATION_CRITERIA:

    Exercise shrink, equal-size, in-capacity growth and replacement growth; check shape/new infinities and refill old entries before later value comparisons.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • 20. Incomplete-owner cleanup and mutation failure states UID: PPL-SPEC-000790 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Failed sized/copy/upward construction shall release storage and destroy every completed coefficient of the incomplete matrix, preserving any source owner. Assignment preparation failure shall retain the stronger value-preserving guarantee of 🔗 5. Value assignment and assignment failure preservation.

    A reported recoverable failure during growth or discarding resize may leave a partially extended or partially transferred target without a coherent full matrix shape. Its completed coefficients and owned storage shall remain safely destructible and replaceable by a complete successful assignment or clearing operation. No ordinary matrix access or traversal shall be required before such replacement. A failure before mutation, including failure to allocate replacement backing storage, shall preserve the old completed value. Resources owned by a discarded incomplete replacement shall be released.

    These guarantees shall require selected element operations to retain their own documented exceptional states and nonthrowing destruction. They shall not require recovery from fatal GMP allocation failure or caller-precondition violations, or classify reported failure as a successful numerical value.

    RATIONALE:

    Raw single-row ownership supports safe cleanup after partial coefficient construction without implying value rollback for every resizing path.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to OR_Matrix<T> unless an indicated nested type or free function owns the declaration. Nested aliases retain their source-declared dependent types.

    OR_Matrix(dimension_type n);
    OR_Matrix(const OR_Matrix& y);
    template <typename U> explicit OR_Matrix(const OR_Matrix<U>& y);
    OR_Matrix& operator=(const OR_Matrix& y);
    void grow(dimension_type n);
    void resize_no_copy(dimension_type n);
    ~OR_Matrix();
    
    VERIFICATION_CRITERIA:

    Inject backing allocation, infinity construction, copy and assignment failures; count completed objects/resources, preserve sources, retry assignment and replace partially extended objects before ordinary access.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; tests/ormatrixspec1.cc; tests/ormatrixiteratorhistories1.cc.

  • 1. Pseudo-triangular mathematical-value records UID: PPL-SPEC-000791 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid matrix of admitted finite or positive-infinite coefficients, ascii_dump shall emit its space dimension, a space and a newline, followed by each physical row in 🔗 1. Pseudo-triangular matrix values and physical coordinates order. Each row shall contain its coefficient values in increasing column order, with a space after each coefficient and a newline after the row. A zero-dimensional record shall contain only the dimension line. Coefficient output shall retain 🔗 5. Mathematical numeric output and stream delivery status and 🔗 6. Checked numeric stream policy integration for the selected profile; finite native values shall retain their exact mathematical value independently of caller precision. These records shall not promise preservation of native zero signs or object representations.

    The matrix shall remain unchanged. Dumping shall not consume following stream data or promise a checksum, a trailing delimiter beyond its own frame, or an interchange guarantee across incompatible scalar profiles. The no-argument form shall write the same record to std::cerr. Stream failures shall retain the stream's selected reporting mechanism.

    RATIONALE:

    Persistent raw entry values need a complete dimensioned frame and exact mathematical scalar meaning, distinct from ABI-dependent scalar object dumps.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Compare independent exact record text, concatenate empty/nonempty records and a following token, test rational/infinite and low-precision native-boundary round-trips, and capture the convenience output.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 2. Exact value-record loading and rejection states UID: PPL-SPEC-000792 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The decoded space dimension shall not exceed max_num_rows()/2. ascii_load shall return false for a greater dimension before resizing, computing its storage size or requesting storage for that extent. For a valid admitted record under 🔗 1. Pseudo-triangular matrix values and physical coordinates, it shall read exactly the physical row-major coefficient count required by its shape. It shall return true only after every coefficient has been accepted exactly by the selected scalar profile and every stored value is finite or positive infinity. True shall establish the specified dimension and values in independently owned coefficients and leave any following frame token available after permitted separating whitespace.

    The packed matrix shall be allocated after its coefficient payload has been read. Missing, nonnumeric or negative-signed dimension tokens, truncated or invalid coefficient tokens, negative infinity, NaN and non-exact scalar conversion shall return false through the scalar input's ordinary rejection channel. A rejected or exceptional load may leave a partial target without useful entry values or a coherent old/new dimension promise. Its completed objects shall remain safely destructible, and it may be replaced by a complete successful load or assignment before ordinary value access. Resource/stream exceptions shall retain their selected reporting channel; they shall not be true results. No strong rollback guarantee shall be required. Admitted extents shall retain their normal resource requirements and resource-exception behavior.

    RATIONALE:

    Dimension admission must precede unsigned storage-size arithmetic. The admitted row bound ensures representable doubled row counts and triangular storage. Exact scalar acceptance and completion determine a successful raw-bound record result.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Reject the first unsupported space dimension and the reserved non-dimension before payload extraction; check zero and small admitted dimensions, exact replacement after rejection and following-token preservation. Check every incomplete/forbidden payload position, missing headers, inexact integral/native tokens, valid exact fractional and positive-infinite records, following-token preservation, owner independence and replacement after rejection.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000793
    3. Human-readable physical rows and output channels UID: PPL-SPEC-000793 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The stream insertion operator shall write every stored row in physical order, each coefficient followed by a space and each row followed by a newline, and return the supplied stream. It shall omit the space- dimension header used by 🔗 1. Pseudo-triangular mathematical-value records. An empty matrix shall write no row text. Coefficient output shall retain the selected scalar's mathematical output contract. print() shall write that same human- readable representation to std::cerr. Both forms shall preserve the matrix, and stream failure shall follow the selected stream policy.

    RATIONALE:

    Human-readable rows and machine reloadable records need distinct framing while sharing scalar output meaning.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    template <typename T>
    std::ostream& operator<<(std::ostream& s, const OR_Matrix<T>& m);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Compare exact independent row text, empty output and stream identity; capture print output and inject stream failure without changing matrix values.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000794
    4. Owned backing storage and live-payload memory accounting UID: PPL-SPEC-000794 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall report the bytes owned outside the matrix wrapper: the backing row allocation, including its retained capacity and metadata, plus externally owned payload of every physically live coefficient under 🔗 8. Row storage and live-payload memory accounting. It shall not count borrowed views or unrelated allocations. Removing logical entries shall not remove still-retained backing capacity from that count. total_memory_in_bytes() shall equal the external count plus sizeof(*this). Counts shall require supported representable memory arithmetic and the selected coefficient type's own accounting contract.

    RATIONALE:

    The owner retains the actual row capacity, so its reported owned memory must account for that allocation even when logical dimensions shrink.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Compare backing metadata/capacity and live coefficient payloads against independent allocation/accounting witnesses for tight and spare-capacity owners, copies, shrinkage, empty states and multi-limb values.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000795
    5. Physical-shape and selected-coefficient invariant checking UID: PPL-SPEC-000795 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an otherwise safely inspectable owner, OK() shall accept exactly when its live logical coefficient count matches 2n(n + 1) for its recorded space dimension and its owned DB_Row<T> satisfies 🔗 9. Constructed-row validity checks and diagnostic metadata with the recorded logical size and capacity. This includes each selected coefficient's OK() hook and rejection of NaN. Available extra-debug checks shall retain their configuration scope. A valid empty matrix shall pass.

    This checker shall not establish octagonal strong closure, consistency, coherent mirrored constraints or semantic diagonal conventions, and shall not substitute for higher-level finite/positive-infinite operation domains. Callers shall not pass corrupted ownership metadata or read beyond live storage merely to obtain a diagnostic. The checker shall preserve entry values and ownership.

    RATIONALE:

    Raw storage validity and higher-level octagonal geometric invariants have different meanings and admissible checks.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check constructed and transformed valid matrices, permitted extended values, selected false coefficient hooks and NaN at every actual physical coordinate, restoring values before ordinary matrix access.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 6. Rectilinear distance of physical octagonal entry arrays UID: PPL-SPEC-000796 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, rectilinear distance shall return false on unequal space dimensions without modifying result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of ∑(k, j) ∈ Dndkj, where Dn is exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and each finite dkj is the absolute difference of the entry values on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

    Accumulation and result conversion shall retain the selected profile's rounding guarantees: successful upward bounds shall be no smaller than the exact sum and downward bounds no larger. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported numerical/resource failures shall not be true results.

    RATIONALE:

    A physical bound-entry norm counts each stored coordinate once; it is not a distance between represented octagonal geometric sets.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    template <typename Temp, typename To, typename T>
    bool rectilinear_distance_assign(Checked_Number<To, Extended_Number_Policy>& r,
                           const OR_Matrix<T>& x, const OR_Matrix<T>& y,
                           Rounding_Dir dir, Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Use independent rational sums with differences at every stored coordinate, all shared/one-sided infinity cases, empty/dimension mismatch, symmetry and supported result overlaps.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 7. Euclidean distance of physical octagonal entry arrays UID: PPL-SPEC-000797 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, Euclidean distance shall return false on unequal space dimensions without modifying result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of √(∑(k, j) ∈ Dnd 2kj), using exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and finite absolute entry differences on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

    Accumulation, square root and result conversion shall retain the selected profile's directed enclosure guarantees. Rational square-root bounds shall retain 🔗 2. Finite rational square root at the selected irrational precision and the context precision of 🔗 3. Selection and ownership of irrational rational precision, without promising every rational perfect square is exact on the selected grid. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported failures shall not be true results.

    RATIONALE:

    The entry-array Euclidean norm needs both a fixed physical coordinate count and the selected square-root enclosure semantics.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    template <typename Temp, typename To, typename T>
    bool euclidean_distance_assign(Checked_Number<To, Extended_Number_Policy>& r,
                           const OR_Matrix<T>& x, const OR_Matrix<T>& y,
                           Rounding_Dir dir, Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Compare literal Pythagorean families at all stored coordinates with independently calculated rational-grid bounds, integer/native sqrt(2) enclosures, infinity/empty/dimension cases and supported result overlaps.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 8. Maximum-coordinate distance of physical octagonal entry arrays UID: PPL-SPEC-000798 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the conditions of 🔗 9. Distance workspace protocol and admissible overlaps, maximum-coordinate distance shall return false on unequal space dimensions without changing result or workspaces. For equal dimensions it shall return true and assign the requested directed approximation of max(k, j) ∈ Dndkj, using exactly the physical coordinate domain of 🔗 1. Pseudo-triangular matrix values and physical coordinates and finite absolute entry differences on call entry. Equal positive infinities shall contribute zero; exactly one positive infinity at any stored coordinate shall make the distance positive infinity. Empty equal-dimensional matrices shall have distance zero.

    Coordinate difference, maximum and result conversion shall retain the selected profile's directed guarantees. Source entries shall be preserved except where the admitted result output overlaps an entry. Reported numerical/resource failures shall not be true results.

    RATIONALE:

    A maximum over physical bound entries must visit every stored row and column without introducing unstored symmetric coordinates.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    template <typename Temp, typename To, typename T>
    bool l_infinity_distance_assign(Checked_Number<To, Extended_Number_Policy>& r,
                           const OR_Matrix<T>& x, const OR_Matrix<T>& y,
                           Rounding_Dir dir, Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Compare independent coordinate maxima with differences at every stored coordinate, symmetry, all infinity cases, empty/dimension mismatch and admitted result overlaps.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 9. Distance workspace protocol and admissible overlaps UID: PPL-SPEC-000799 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Distance operations shall require valid matrices of admitted finite or positive-infinite entries, supported rounding directions and temporary/ result profiles supporting every required conversion, subtraction, accumulation, square-root or maximum operation. Negative infinity and NaN shall remain outside these metric domains. Every intermediate shall satisfy the selected arithmetic, precision and resource prerequisites. Initialization and synchronization shall retain 🔗 3. Thread initialization, default state and finalization where required.

    The three mutable workspaces shall be pairwise distinct and independent of matrix coefficients; their values may be overwritten. The result may be independent, overlap one workspace when types permit, or overlap one live input entry while all workspaces remain independent. Results shall use input values on entry. Identical matrix owners may be passed as both inputs. Dimension mismatch shall precede any result/workspace update. Other failures shall retain the selected numerical policy's permitted output states without a universal rollback guarantee. The generic helper shall apply these conditions with the library's rectilinear, Euclidean or maximum-coordinate specialization for the same temporary type.

    RATIONALE:

    Exact input-value and scratch alias rules are necessary for sound results when callers supply reusable workspaces.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    template <typename Specialization, typename Temp, typename To, typename T>
    bool l_m_distance_assign(Checked_Number<To, Extended_Number_Policy>& r,
                           const OR_Matrix<T>& x, const OR_Matrix<T>& y,
                           Rounding_Dir dir, Temp& tmp0, Temp& tmp1, Temp& tmp2);
    
    VERIFICATION_CRITERIA:

    Exercise result overlap with each workspace and source entries, identical owners, unchanged result/workspaces on dimension mismatch and supported exact/native temporary profiles.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • PPL-SPEC-000800
    10. Integer square root for capacity calculations UID: PPL-SPEC-000800 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For every dimension_type input x, isqrt shall return the nonnegative integer r satisfying r2 ≤ x < (r + 1)2. The inequalities describe mathematical integers and shall not require overflowing machine multiplication to check their meaning. The helper shall not allocate or require numerical-library initialization. Its result shall be valid for the actual radicand used in the row-bound calculation of 🔗 2. Sized construction, destruction and the supported row bound.

    RATIONALE:

    The capacity helper needs an exact integer floor characterization across its input type and actual production caller domain.

    INTERFACE:

    Internal source header: OR_Matrix_defs.hh. Names belong to Parma_Polyhedra_Library; unqualified members apply to OR_Matrix<T>. The stream insertion operator belongs to its IO_Operators namespace.

    dimension_type isqrt(dimension_type x);
    
    VERIFICATION_CRITERIA:

    Use independent division or arbitrary-precision inequalities across zero, every small radicand, perfect-square neighbors, all binary boundaries, the full input-type range and actual row-capacity radicands.

    SOURCE:

    src/OR_Matrix_defs.hh; src/OR_Matrix_inlines.hh; src/OR_Matrix_templates.hh; src/distances_defs.hh; src/distances_inlines.hh; tests/ormatrixoperationsspec1.cc; tests/ormatrixiteratorhistories1.cc; tests/rawmatrixmetricshistories1.cc.

  • 1. Owned floating-expression protocol and lifetime UID: PPL-SPEC-001000 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Floating_Point_Expression<I, Format> shall provide polymorphic numerical linearization and virtual destruction. FP_Linear_Form shall denote Linear_Form<I>, FP_Interval_Abstract_Store shall denote Box<I> and FP_Linear_Form_Abstract_Store shall denote the map from valid coordinate indices to such forms. I shall have a supported native floating-point boundary type and well-formed interval operations under the selected arithmetic/FPU initialization prerequisites. Format shall provide BASE, MANTISSA_BITS and EXPONENT_BIAS describing the analyzed arithmetic; a format-enumeration member shall not be required. The radix shall be an integer at least two, precision shall be positive, and bias/exponent calculations shall stay within their representable descriptor ranges. Custom decimal radices shall remain admitted. Its modeled rounding and underflow behavior shall meet the selected error bounds in 🔗 11. Descriptor-based relative rounding error and 🔗 1. Descriptor absolute-error interval.

    All expression coordinates and coefficients used in intervalization shall have corresponding intervals in the entry box. The box and every symbolic binding shall soundly describe the same modeled state. A successful linearize() shall enclose all corresponding modeled expression values, including operation rounding. Input entry values shall determine the result, including when the output is a symbolic-store binding. Other input bindings shall remain unchanged. A false result shall not certify an enclosure or promise preservation of the previous output. Allocation, coefficient and custom-node callback exceptions may propagate; live owners and outputs shall remain safely destructible and reusable without whole-operation rollback.

    Pointer-taking concrete nodes shall acquire exclusive ownership of their nonnull child trees after successful construction. Children shall be independently owned, with no shared ownership or cycles. Deleting through the base pointer shall destroy every owned child exactly once. Concrete nodes shall provide neither public copying nor implicit move ownership. Borrowed access to a child shall not transfer its ownership.

    Each of the six unary and binary operator nodes shall expose operand_ptr as std::unique_ptr<Floating_Point_Expression<I, Format>> and accept default-deleter unique_ptr rvalues whose child pointers convert to the base pointer, in addition to its raw-pointer adoption constructor. These arguments shall be nonnull and independently owned. The owning overloads shall not throw and shall consume their arguments' ownership. A pre-existing child owner shall retain its subtree until the parent constructor begins. If evaluating another argument throws, temporary owning arguments already created shall destroy their subtrees during unwinding. Binary nodes shall destroy the first operand before the second operand; unary nodes shall destroy their sole operand. Neither ownership form shall add a child allocation.

    overflows() shall return true exactly when the constant or a homogeneous coefficient interval is unbounded. It shall inspect every declared coordinate, treating absent coefficients as zero under 🔗 6. Dimensions and borrowed coefficient access, without changing the form.

    RATIONALE:

    Owned trees need a numerical success promise and an explicit lifetime model independent of the non-owning target adapters.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Floating_Point_Expression {
    public:
      typedef Linear_Form<I> FP_Linear_Form;
      typedef Box<I> FP_Interval_Abstract_Store;
      typedef std::map<dimension_type, FP_Linear_Form> FP_Linear_Form_Abstract_Store;
      typedef typename I::boundary_type boundary_type;
      typedef typename I::info_type info_type;
      virtual ~Floating_Point_Expression();
      virtual bool linearize(const FP_Interval_Abstract_Store& intervals,
        const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const = 0;
      static bool overflows(const FP_Linear_Form& form);
    };
    
    VERIFICATION_CRITERIA:

    Check virtual destruction, child counters, noncopyable concrete types, nonthrowing consuming construction, first-before-second destruction, rejection of unrelated and const child types, and retention of a caller's owners when argument evaluation throws. Check callback exception/retry, both refusal and recovery, input snapshots and boundedness at each coefficient position. Evaluate successful forms using exact rational and independently rounded native-format samples.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Theorem 1 and failed linearization (PDF page index 7, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Constant_Floating_Point_Expression_defs.hh; src/Constant_Floating_Point_Expression_inlines.hh; src/Variable_Floating_Point_Expression_defs.hh; src/Variable_Floating_Point_Expression_inlines.hh; src/Opposite_Floating_Point_Expression_defs.hh; src/Opposite_Floating_Point_Expression_inlines.hh; src/Cast_Floating_Point_Expression_defs.hh; src/Cast_Floating_Point_Expression_inlines.hh; src/Sum_Floating_Point_Expression_defs.hh; src/Sum_Floating_Point_Expression_inlines.hh; src/Difference_Floating_Point_Expression_defs.hh; src/Difference_Floating_Point_Expression_inlines.hh; src/Multiplication_Floating_Point_Expression_defs.hh; src/Multiplication_Floating_Point_Expression_inlines.hh; src/Division_Floating_Point_Expression_defs.hh; src/Division_Floating_Point_Expression_inlines.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001001
    2. Owned constant construction and evaluation UID: PPL-SPEC-001001 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The two-bound constructor shall store the closed interval between its ordered boundary values. The string constructor shall store the selected interval parser's enclosure of a valid constant expression; it shall not retain the caller's character storage. linearize() shall replace the output by a dimension-zero form containing exactly that stored interval, return true and add no operation-rounding term. A valid unbounded constant interval shall remain an admitted leaf result; true at that leaf shall not imply a finite coefficient. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    A constant is interpreted once; evaluation copies its enclosure without treating it as another arithmetic operation.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Constant_Floating_Point_Expression;
    // Members of Constant_Floating_Point_Expression<I, Format>:
    Constant_Floating_Point_Expression(boundary_type lower, boundary_type upper);
    Constant_Floating_Point_Expression(const char* value);
    ~Constant_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Compare ordered endpoints, decimal text against an exact rational, caller storage lifetime, dimension replacement and admitted unbounded constants.

    BIBLIOGRAPHY:

    Mine04 | Section 5, constant linearization rule (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Constant_Floating_Point_Expression_defs.hh; src/Constant_Floating_Point_Expression_inlines.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001002
    3. Owned variable lookup and symbolic fallback UID: PPL-SPEC-001002 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid coordinate index, variable construction shall retain that identity. If the symbolic store has a binding at that index, linearize() shall copy its entry form to the output and return true exactly when the copied coefficients are bounded. Without such a binding, it shall return the unit coordinate form, with dimension one greater than the index and all other coefficients zero. It shall not mutate the store or borrow its coefficient storage as output ownership. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Stable coordinate identities preserve symbolic dependencies without requiring every variable to have a stored affine substitute.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Variable_Floating_Point_Expression;
    // Members of Variable_Floating_Point_Expression<I, Format>:
    explicit Variable_Floating_Point_Expression(dimension_type index);
    ~Variable_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Check missing and present bindings, trailing indices, copied-output independence, unbounded stored constants/coefficients, refusal and recovered replacement.

    BIBLIOGRAPHY:

    Mine04 | Section 5, variable rule and Linear Form Propagation (PDF page indices 6–7, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Variable_Floating_Point_Expression_defs.hh; src/Variable_Floating_Point_Expression_inlines.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001003
    4. Owned exact opposite UID: PPL-SPEC-001003 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The opposite node shall own its child. It shall propagate child refusal; on success, it shall negate all coefficient intervals of the child's form, preserving its dimension, and return true without an additional rounding term. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Changing a floating-point sign is exact within the modeled finite format.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Opposite_Floating_Point_Expression;
    // Members of Opposite_Floating_Point_Expression<I, Format>:
    explicit Opposite_Floating_Point_Expression(Floating_Point_Expression<I, Format>* child);
    ~Opposite_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Compare coefficient-wise interval negation, symbolic dimensions, refused child/retry and child destruction.

    BIBLIOGRAPHY:

    Mine04 | Section 5, interval linear forms and coefficient-wise arithmetic (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Opposite_Floating_Point_Expression_defs.hh; src/Opposite_Floating_Point_Expression_inlines.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001004
    5. Owned rounding cast UID: PPL-SPEC-001004 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The cast node shall own its child and model rounding to its Format. It shall propagate child refusal and refuse a child form with an unbounded coefficient before constructing relative error. After these checks, it shall add the relative error of the child's form and the selected absolute-error interval, then return true exactly when all resulting coefficients are bounded. This explicit rounding node shall apply those terms even for zero or a representable child constant; it shall not infer a different source format or a widening conversion from the tree's common format parameter. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    An explicit rounding node needs its own error model even when another interface could prove a particular conversion exact.

    An explicit rounding node needs finite child coefficient magnitudes for its relative-error term, even though an unbounded constant is a valid leaf.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Cast_Floating_Point_Expression;
    // Members of Cast_Floating_Point_Expression<I, Format>:
    Cast_Floating_Point_Expression(Floating_Point_Expression<I, Format>* child);
    ~Cast_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Check a zero child exposes absolute error, nonzero and symbolic children expose relative error, exact rational rounding samples, overflow, refusal/retry and owned destruction.

    Check safe refusal for an unbounded child, then bounded successful replacement. Keep zero and representable-constant controls that still receive explicit cast error.

    BIBLIOGRAPHY:

    Mine04 | Section 5, rounding-error and cast rules (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Cast_Floating_Point_Expression_defs.hh; src/Cast_Floating_Point_Expression_inlines.hh; src/Cast_Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001005
    6. Owned floating sum UID: PPL-SPEC-001005 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The node shall own both ordered children. It shall linearize the first child before the second, propagating refusal. An unbounded child coefficient shall also cause refusal before relative error is constructed; the second child need not be evaluated after a first-child refusal. With successful bounded child forms L1 and L2, it shall enclose the coefficient-wise form L1 + L2 + R(L1) + R(L2) + A, where R is the relative-error helper and A is the selected absolute-error interval. It shall return true exactly when the resulting coefficients are bounded. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Both operand magnitudes contribute to a conservative rounding enclosure, including cancellation.

    The leaf and rounded-parent protocols have different finite-magnitude requirements; refusal prevents construction of an undefined relative error.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Sum_Floating_Point_Expression;
    // Members of Sum_Floating_Point_Expression<I, Format>:
    Sum_Floating_Point_Expression(Floating_Point_Expression<I, Format>* first,
      Floating_Point_Expression<I, Format>* second);
    ~Sum_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Compare coefficient signs and error radii, independent binary32 tie/cancellation samples, ordered child refusals, overflow and destruction.

    Check unbounded children in both positions, first-child short-circuiting, source preservation and bounded recovery, including nested and borrowed store-output histories.

    BIBLIOGRAPHY:

    Mine04 | Section 5, addition/subtraction rules (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Sum_Floating_Point_Expression_defs.hh; src/Sum_Floating_Point_Expression_inlines.hh; src/Sum_Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc; tests/Concrete_Expression/ibmroundoff1.cc.

  • PPL-SPEC-001006
    7. Owned floating difference UID: PPL-SPEC-001006 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The node shall own both ordered children. It shall linearize the first child before the second, propagating refusal. An unbounded child coefficient shall also cause refusal before relative error is constructed; the second child need not be evaluated after a first-child refusal. With successful bounded child forms L1 and L2, it shall enclose the coefficient-wise form L1 − L2 + R(L1) + R(L2) + A, where R is the relative-error helper and A is the selected absolute-error interval. It shall return true exactly when the resulting coefficients are bounded. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Both operand magnitudes contribute to a conservative rounding enclosure, including cancellation.

    The leaf and rounded-parent protocols have different finite-magnitude requirements; refusal prevents construction of an undefined relative error.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Difference_Floating_Point_Expression;
    // Members of Difference_Floating_Point_Expression<I, Format>:
    Difference_Floating_Point_Expression(Floating_Point_Expression<I, Format>* first,
      Floating_Point_Expression<I, Format>* second);
    ~Difference_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Compare coefficient signs and error radii, independent binary32 tie/cancellation samples, ordered child refusals, overflow and destruction.

    Check unbounded children in both positions, first-child short-circuiting, source preservation and bounded recovery, including nested and borrowed store-output histories.

    BIBLIOGRAPHY:

    Mine04 | Section 5, addition/subtraction rules (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Difference_Floating_Point_Expression_defs.hh; src/Difference_Floating_Point_Expression_inlines.hh; src/Difference_Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-001007
    8. Owned floating multiplication UID: PPL-SPEC-001007 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The product node shall own both ordered children, linearize them in order and intervalize both forms in the supplied box. If the retained form has an unbounded coefficient, an exactly zero selected scalar shall yield a same-dimension zero form plus the absolute-error interval without constructing relative error; a nonzero selected scalar shall cause refusal. Child refusal or the absence of a bounded scalar selection shall return false. With a bounded selected operand interval J and a bounded retained form L, a successful result shall enclose J * (L + R(L)) + A, retaining the other form's symbolic coordinates. The bounded-width selection shall admit either orientation and one unbounded operand when the other provides a bounded scalar. It shall not promise an optimal multiplication strategy. Final unbounded coefficients shall return false. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Intervalizing one operand bounds the product while retaining useful dependencies from the other.

    A selected exact zero gives a zero symbolic product without finite retained coefficient magnitudes; only the absolute-error term remains.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Multiplication_Floating_Point_Expression;
    // Members of Multiplication_Floating_Point_Expression<I, Format>:
    Multiplication_Floating_Point_Expression(Floating_Point_Expression<I, Format>* first,
      Floating_Point_Expression<I, Format>* second);
    ~Multiplication_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Check both selected orientations, one/two unbounded operand enclosures, exact rational product rounding, child refusals, finite overflow and owner destruction.

    Check an unbounded retained constant or homogeneous coefficient times exact zero in both selected orientations, including dimension zero and trailing coordinates. Require the selected absolute-error constant and zero homogeneous coefficients. Check nonzero-scalar refusal and bounded recovery.

    BIBLIOGRAPHY:

    Mine04 | Section 5, multiplication and intervalization rules (PDF page indices 6–7, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Multiplication_Floating_Point_Expression_defs.hh; src/Multiplication_Floating_Point_Expression_inlines.hh; src/Multiplication_Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc; tests/Concrete_Expression/floatingcontracts1.cc.

  • PPL-SPEC-001008
    9. Owned floating division UID: PPL-SPEC-001008 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The quotient node shall own its numerator and denominator children. It shall linearize and intervalize the denominator first. Denominator refusal or a closed endpoint hull containing zero shall return false before linearizing the numerator; an open zero endpoint shall not evade that conservative rejection. Sign-separated positive or negative unbounded intervals shall be admitted when the selected interval division supports them. After successful numerator linearization, an unbounded numerator coefficient shall cause refusal before relative error is constructed. For accepted numerator form L and divisor enclosure J, the output shall enclose L/J + R(L)/J + A. Numerator refusal or unbounded final coefficients shall return false. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Testing the complete divisor enclosure before the numerator prevents an unsupported quotient from being accepted.

    Admitting an unbounded nonzero divisor does not remove the finite coefficient requirement of the numerator relative-error computation.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    template <typename I, typename Format>
    class Division_Floating_Point_Expression;
    // Members of Division_Floating_Point_Expression<I, Format>:
    Division_Floating_Point_Expression(Floating_Point_Expression<I, Format>* numerator,
      Floating_Point_Expression<I, Format>* denominator);
    ~Division_Floating_Point_Expression() override;
    bool linearize(const FP_Interval_Abstract_Store& intervals,
      const FP_Linear_Form_Abstract_Store& symbols, FP_Linear_Form& result) const override;
    
    VERIFICATION_CRITERIA:

    Check denominator-first counters, numerator refusal, zero-crossing and open-zero hulls, both sign-separated rays, exact rational quotient rounding, overflow and destruction.

    Check unbounded numerator refusal after denominator validation, retaining closed-zero rejection, sign-separated unbounded denominator controls, source entry values and bounded successful recovery.

    BIBLIOGRAPHY:

    Mine04 | Section 5, division and intervalization rules (PDF page indices 6–7, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Division_Floating_Point_Expression_defs.hh; src/Division_Floating_Point_Expression_inlines.hh; src/Division_Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc; tests/Concrete_Expression/ibmroundoff1.cc.

  • PPL-SPEC-001009
    10. Owned expression exchange UID: PPL-SPEC-001009 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For two live nodes of the same concrete class and template arguments, m_swap() and the matching free swap() shall exchange their complete values. Constants shall exchange their stored intervals, variables their indices, unary nodes their owned children, and binary nodes both ordered owned children. The resulting nodes shall linearize as the corresponding pre-exchange nodes and preserve exclusive ownership. Self-exchange shall preserve value and ownership. No child shall be copied, destroyed or linearized merely to exchange an owned pointer. Selected constant-interval exchange operations shall meet their documented prerequisites. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Exchanging full node values must carry the owned subtrees and preserve operand order.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    // Member of Constant_Floating_Point_Expression<I, Format>:
    void m_swap(Constant_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Constant_Floating_Point_Expression<I, Format>& first,
              Constant_Floating_Point_Expression<I, Format>& second);
    
    // Member of Variable_Floating_Point_Expression<I, Format>:
    void m_swap(Variable_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Variable_Floating_Point_Expression<I, Format>& first,
              Variable_Floating_Point_Expression<I, Format>& second);
    
    // Member of Opposite_Floating_Point_Expression<I, Format>:
    void m_swap(Opposite_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Opposite_Floating_Point_Expression<I, Format>& first,
              Opposite_Floating_Point_Expression<I, Format>& second);
    
    // Member of Cast_Floating_Point_Expression<I, Format>:
    void m_swap(Cast_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Cast_Floating_Point_Expression<I, Format>& first,
              Cast_Floating_Point_Expression<I, Format>& second);
    
    // Member of Sum_Floating_Point_Expression<I, Format>:
    void m_swap(Sum_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Sum_Floating_Point_Expression<I, Format>& first,
              Sum_Floating_Point_Expression<I, Format>& second);
    
    // Member of Difference_Floating_Point_Expression<I, Format>:
    void m_swap(Difference_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Difference_Floating_Point_Expression<I, Format>& first,
              Difference_Floating_Point_Expression<I, Format>& second);
    
    // Member of Multiplication_Floating_Point_Expression<I, Format>:
    void m_swap(Multiplication_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Multiplication_Floating_Point_Expression<I, Format>& first,
              Multiplication_Floating_Point_Expression<I, Format>& second);
    
    // Member of Division_Floating_Point_Expression<I, Format>:
    void m_swap(Division_Floating_Point_Expression& other);
    template <typename I, typename Format>
    void swap(Division_Floating_Point_Expression<I, Format>& first,
              Division_Floating_Point_Expression<I, Format>& second);
    
    VERIFICATION_CRITERIA:

    Exercise member/free and self exchange for all eight classes with distinguishable leaf values and ordered operands; compare evaluations and destruction counters.

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Constant_Floating_Point_Expression_defs.hh; src/Constant_Floating_Point_Expression_inlines.hh; src/Variable_Floating_Point_Expression_defs.hh; src/Variable_Floating_Point_Expression_inlines.hh; src/Opposite_Floating_Point_Expression_defs.hh; src/Opposite_Floating_Point_Expression_inlines.hh; src/Cast_Floating_Point_Expression_defs.hh; src/Cast_Floating_Point_Expression_inlines.hh; src/Sum_Floating_Point_Expression_defs.hh; src/Sum_Floating_Point_Expression_inlines.hh; src/Difference_Floating_Point_Expression_defs.hh; src/Difference_Floating_Point_Expression_inlines.hh; src/Multiplication_Floating_Point_Expression_defs.hh; src/Multiplication_Floating_Point_Expression_inlines.hh; src/Division_Floating_Point_Expression_defs.hh; src/Division_Floating_Point_Expression_inlines.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • 11. Descriptor-based relative rounding error UID: PPL-SPEC-001010 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a bounded well-formed linear form, static relative_error() shall replace the output with a form of the same dimension. For every coefficient interval [a,b], including the constant, its error coefficient shall enclose [ − mu, mu], where m = max(|a|, |b|). For built-in binary descriptors, u = 2 − p with p excluding the leading significand bit. For normalized IBM hexadecimal short/long arithmetic, u = 161 − p with p equal to six/fourteen fraction digits. A custom three-field descriptor shall use u = BASE − MANTISSA_BITS.

    The source entry value shall determine every coefficient, including when the output aliases it. Independent sources shall remain unchanged. Coefficients shall use sound outward interval arithmetic rather than an inward approximation of the selected error radius. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    Every coefficient needs an enclosing error term; a small inward radius can invalidate the whole successful linearization.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    // Static member of Floating_Point_Expression<I, Format>:
    static void relative_error(const FP_Linear_Form& form, FP_Linear_Form& result);
    
    VERIFICATION_CRITERIA:

    Use exact rational radii for binary, hexadecimal and custom decimal descriptors, positive/negative and uncertain coefficients, zero/trailing dimensions, distinct outputs and source/output aliases.

    BIBLIOGRAPHY:

    Mine04 | Section 5, relative rounding-error definition (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Float_defs.hh; src/Float_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/floatingcontracts1.cc.

  • PPL-SPEC-001011
    12. Box-based affine intervalization UID: PPL-SPEC-001011 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Static intervalize() shall enclose the sum of the constant interval and every homogeneous coefficient interval multiplied by the corresponding box interval, using the source form's entry values. The box shall have at least the form's dimension and valid factor intervals for every declared coordinate, including zero coefficients. Its result shall not preserve cross-coordinate correlations beyond those factors. Independent form and box inputs shall remain unchanged. The result shall be a separate interval owner from input form coefficients and box factors. The numerical, entry-value and lifetime prerequisites of 🔗 1. Owned floating-expression protocol and lifetime shall apply.

    RATIONALE:

    An interval enclosure supplies the scalar bounds needed by multiplication and division without changing the underlying affine form.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    // Static member of Floating_Point_Expression<I, Format>:
    static void intervalize(const FP_Linear_Form& form,
      const FP_Interval_Abstract_Store& intervals, I& result);
    
    VERIFICATION_CRITERIA:

    Compare exact rational corner sums for positive/negative/zero coefficients, sparse and trailing dimensions, singleton and interval factors, preserving input snapshots.

    BIBLIOGRAPHY:

    Mine04 | Section 5, intervalization rule (PDF page index 6, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc.

  • PPL-SPEC-001015
    13. Owned-variable symbolic assignment UID: PPL-SPEC-001015 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    linear_form_assign() shall assign a copy of the supplied form's entry value to the node's coordinate in the symbolic store, replacing an existing binding or inserting one. Every other pre-existing binding with a non-singleton-zero coefficient for that coordinate shall be discarded; independent bindings, including explicit zero dependencies and coordinates beyond a form's dimension, shall be retained. A newly assigned form shall be retained, including when it contains the target coordinate; callers shall ensure its interpretation remains valid for their modeled state.

    A form borrowed from the same store shall use its entry value even if invalidation removes the donor. Independent inputs shall remain unchanged. Valid coordinate, coefficient and lifetime prerequisites of 🔗 1. Dependency invalidation shall apply. Allocation and coefficient exceptions may propagate without whole-store rollback; live owners shall remain safely destructible.

    RATIONALE:

    Changing a variable invalidates the other expressions that may depend on its previous value while explicitly recording the caller-supplied new form.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    // Member of Variable_Floating_Point_Expression<I, Format>:
    void linear_form_assign(const FP_Linear_Form& form,
                            FP_Linear_Form_Abstract_Store& symbols) const;
    
    VERIFICATION_CRITERIA:

    Check insertion/replacement, consecutive dependencies, uncertain/zero coefficients, retained keys and values, same-store borrowed donors and independent input snapshots.

    BIBLIOGRAPHY:

    Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based).

    SOURCE:

    src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; src/Variable_Floating_Point_Expression_defs.hh; src/Variable_Floating_Point_Expression_inlines.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc; tests/Concrete_Expression/legacyarithmetic1.cc.

  • PPL-SPEC-000002
    2. Empty partial-map construction UID: PPL-SPEC-000002 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful default construction shall create a valid Partial_Function whose domain and image are empty, with the meaning and use conditions of 🔗 1. Public partial coordinate-map type and valid use. No index shall initially be mapped. If construction fails through a supported C++ exception, resources acquired for the incomplete object shall be released and no constructed map shall be returned.

    RATIONALE:

    An empty initial map gives clients a defined starting point for incremental insertion and distinguishes an absent image from a maximum-image value.

    COMMENT:

    The constructor's private maximum-image bookkeeping is not an observable maximum for the empty map.

    INTERFACE:

    Public constructor declaration:

    Partial_Function();
    
    VERIFICATION_CRITERIA:

    After construction, check empty-codomain reporting and unsuccessful lookups at zero, ordinary absent indices and the reserved sentinel, preserving each caller's output value. Check the defined empty maximum-query exception. Inspect construction and member cleanup; use fault injection only where the selected construction path actually acquires resources that can fail.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: default constructor. tests/partialfunction2.cc: partial_function_empty_queries_preserve_output.

  • 3. Injective insertion and failure atomicity UID: PPL-SPEC-000003 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid map as defined by 🔗 1. Public partial coordinate-map type and valid use, insertion shall require both indices to differ from not_a_dimension(), the source index to be absent from the current domain, and the proposed image to be absent from the current image set. A successfully completed insertion of i and j shall add exactly the pair M(i) = j, preserve every existing pair and leave every other absent source unmapped. Gaps introduced by storage growth shall not become mappings. The operation shall permit image zero and noncontiguous source and image sets.

    Storage-capacity or allocation failure shall be reported through the corresponding C++ exception, including std::length_error or std::bad_alloc where applicable. Such a failed insertion shall leave the represented map unchanged and valid for subsequent queries, insertion, assignment and destruction.

    Violation of the insertion preconditions shall be outside the supported contract. Assertion diagnostics shall not be required in every configuration, and no defined success or failure outcome shall be promised for such a call.

    RATIONALE:

    Unique sources and unique images maintain injectivity. Failure atomicity allows callers to retain and reuse a map after a storage failure.

    INTERFACE:

    Public member declaration:

    void insert(dimension_type i, dimension_type j);
    

    Index values alone do not guarantee feasible storage growth. Insertion preconditions are independent of the assertion regime selected for the library.

    VERIFICATION_CRITERIA:

    Build independent finite-map histories with distinct sources and images, including holes across storage boundaries, decreasing and increasing images, and zero as an image. After every successful insertion compare all stored pairs, absent lookups, emptiness and the largest image against the oracle. For available assertion regimes, inject failures at each actual allocation stage and verify exception propagation, preservation of the original pairs, absence of the proposed source, emptiness and maximum before retrying the same insertion. Check storage-capacity rejection with std::length_error using a source whose required extent exceeds the configured container's maximum size, without attempting a huge allocation; verify unchanged state and subsequent valid insertion. Inspect rollback and owned-resource cleanup. Review precondition enforcement separately without requiring release-build rejection of duplicate or reserved indices or attempting infeasible huge allocations.

    SOURCE:

    src/Partial_Function_defs.hh: insertion preconditions and invalid-call scope. src/Partial_Function_inlines.hh: insertion and rollback of codomain bookkeeping. tests/partialfunction2.cc: partial_function_sparse_growth_preserves_holes_and_maximum. tests/partialfunction1.cc: allocation-failure preservation and retry. tests/partialfunction1.cc: capacity_rejection_preserves_and_reuses_the_map. doc/definitions.dox: general public exception-safety description.

  • 6. Largest image and defined empty-map failure UID: PPL-SPEC-000006 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty valid map under 🔗 1. Public partial coordinate-map type and valid use, max_in_codomain shall return the largest image value, independently of insertion order and of the largest source index. If the valid map is empty, the call shall throw std::runtime_error rather than return a maximum value. The map shall remain unchanged on either outcome. The empty call shall be a defined failure case, not an excluded precondition. Exact exception-message text is not prescribed; ordinary C++ runtime/resource conditions for reporting the exception apply.

    RATIONALE:

    A maximum is meaningful only for a nonempty finite image, and callers must not mistake the private empty-state bookkeeping for an observable result.

    COMMENT:

    The empty-query exception and the absence outcome of maps are distinct outcomes, both of which preserve the map.

    INTERFACE:

    Public const member declaration:

    dimension_type max_in_codomain() const;
    
    VERIFICATION_CRITERIA:

    Compare with independently computed maxima after increasing, decreasing and sparse insertions, including a sole image zero and image values unrelated to the source ordering. Check std::runtime_error on an empty map, without an exact-message assertion, and verify subsequent permitted use of that map. Include a large permitted image with a small source so that testing the image range does not require an infeasible storage allocation.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: max_in_codomain. tests/partialfunction2.cc: partial_function_empty_queries_preserve_output and partial_function_sparse_growth_preserves_holes_and_maximum.

  • PPL-SPEC-000007
    7. Independent copies, assignment and owned-storage cleanup UID: PPL-SPEC-000007 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction shall require a live, valid source map under 🔗 1. Public partial coordinate-map type and valid use. Successful copy construction shall create a distinct value with exactly the source's mapping. Copy assignment shall require live, valid source and target maps and, on success, shall replace the target's old map with exactly the source's mapping. Subsequent valid insertion into either distinct value shall not change the other's mapping. Successful self-copy-assignment shall preserve the map. Successful copy assignment shall return a reference to its target, including self-copy-assignment.

    Failed copy construction shall release resources acquired for the incomplete target and shall leave the source unchanged. Failed copy assignment shall leave both source and target unchanged and valid for subsequent use. Destruction of a live map shall release its owned storage without releasing another map's storage. The caller shall not access an object after its lifetime ends.

    RATIONALE:

    Independent values support reuse of a coordinate map without hidden changes to a consumer's other maps. Completing the copy before replacing the target preserves the target if acquisition of the copy's storage fails.

    INTERFACE:

    Public copy members and the callable form of the implicit destructor:

    Partial_Function(const Partial_Function& source) = default;
    Partial_Function& operator=(const Partial_Function& source);
    ~Partial_Function();
    
    VERIFICATION_CRITERIA:

    Copy empty and sparse nonempty maps by construction and assignment. Compare both values with independent pair collections, mutate each separately using valid insertions, and check self-copy-assignment. Use actual copy overloads rather than treating an assignment from a temporary as a copy test. Check returned-reference identity for ordinary and self-copy-assignment, and check chained copy assignments. Inspect member ownership and construction cleanup. Inject failures at actual copy-allocation stages, checking source and target preservation before retry. After failed assignment, check the target over the union of the old target's and source's positions, including absence at positions that belonged only to the source. Check successful retry after failed assignment.

    SOURCE:

    src/Partial_Function_defs.hh: copy members, implicit destructor and owned containers. src/Partial_Function_inlines.hh: copy assignment and representation exchange. tests/partialfunction2.cc: copy-construction, lvalue-assignment and self-copy-assignment portions of partial_function_copies_and_assignment_have_independent_storage. tests/partialfunction2.cc: partial_function_copy_assignment_returns_its_target. tests/partialfunction1.cc: copy construction and assignment under allocation failure. doc/definitions.dox: general public exception-safety description.

  • 8. Coordinate-map diagnostic printing and output failures UID: PPL-SPEC-000008 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Printing shall observe a valid map under 🔗 1. Public partial coordinate-map type and valid use without changing its represented mapping. Calls shall require the library and calling thread's applicable initialization protocol to have established a valid active Variable output function under 🔗 7. Active Variable formatter and initialized thread state and 🔗 3. Thread initialization, default state and finalization. Callers shall obey the supported thread regime and synchronize changes to the active formatter and access to a shared stream; the formatter shall not mutate the printed map during the call.

    When the map is empty and output succeeds, print shall write the literal text "empty", a newline and a flush. For a nonempty map whose source and image indices are all constructible as Variable objects, successful output shall process pairs in increasing source order. For each pair it shall write the source Variable using the Variable formatter active for that write, the literal separator " --> ", the image Variable using the formatter active for its write, and a trailing newline. Each Variable write shall use the formatter then active in the calling thread where formatting state is thread-specific; names shall not be fixed independently of it. A callback's permitted change to that formatting state may therefore affect subsequent Variable writes. Text insertions shall honor the stream's current formatting state. Specified literals identify the inserted character sequences, not a canonical byte layout independent of that state. Printing shall not promise restoration of formatting state changed by a formatter.

    A map index outside Variable's accepted identifier range shall be permitted to cause std::length_error during printing, without changing the map. Stream, formatter and resource failures may also propagate their C++ exceptions. Stream failure without an enabled exception shall be observable through the stream state; a normal void return shall not alone establish complete output. After any such failure the output may be partial, but the map shall remain valid and unchanged. Exact diagnostic messages are not prescribed.

    RATIONALE:

    Diagnostic printing depends on the map and active naming convention. Storage-valid map indices can exceed the printable Variable range. Stream failure can occur after earlier output, leaving partial output.

    COMMENT:

    Diagnostic output has no reloadability or cross-version stability guarantee. Formatting depends on the active output function and its thread context.

    INTERFACE:

    Public const member declaration:

    void print(std::ostream& s) const;
    

    The stream shall be live and usable under its own C++ contract. Complete output requires the stream to continue accepting output and the formatter to complete its writes. A Variable identifier shall be strictly smaller than Variable::max_space_dimension(); this additional print limit shall not change the valid insertion range in 🔗 3. Injective insertion and failure atomicity.

    VERIFICATION_CRITERIA:

    Check empty output including flush, and independently derive the ordered pair sequence for sparse maps. Check default formatting and configured field width and fill for both empty and nonempty maps, and integer formatting for nonempty maps, without assuming format-independent bytes. Exercise the default and a custom Variable formatter under the applicable initialization/thread protocol, including a callback that changes the formatter for subsequent writes. With a small source index, insert image not_a_dimension()-1 and check the admitted std::length_error without changing the map. Use failing streams with and without enabled exceptions and a throwing formatter; check stream state, allowed partial output and continued map validity. Review synchronization and restore any formatter/thread state used by verification activities.

    SOURCE:

    src/Partial_Function.cc: print ordering, separator, empty flush and Variable construction. src/Variable_inlines.hh and src/Variable.cc: accepted Variable identifiers and active output function. src/Init.cc and src/Init_inlines.hh: initialization of applicable Variable formatting state. tests/partialfunction2.cc: empty and default-name output checks in the direct Partial_Function scenarios. tests/partialfunction2.cc: partial_function_empty_print_flushes, partial_function_print_uses_current_variable_formatter, partial_function_print_honors_stream_formatting, partial_function_print_failures_preserve_map_and_formatter_state and partial_function_print_keeps_thread_formatters_independent.

  • PPL-SPEC-000009
    9. Move construction and empty source UID: PPL-SPEC-000009 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Move construction from a valid map under 🔗 1. Public partial coordinate-map type and valid use shall create a distinct valid map with exactly the source's mapping on entry and shall leave the source as a valid empty map. The source shall support the same queries, insertions, assignments and destruction as any other empty map. Subsequent valid changes to either object shall not change the other's map.

    If construction of the destination's empty storage fails, resources acquired for the incomplete destination shall be released and the source shall remain unchanged and valid. After the empty storage has been constructed, transferring the represented map shall not allocate storage or throw.

    The move constructor's exception specification shall be nonthrowing exactly when default construction of its configured storage containers is nonthrowing, as expressed by the declaration below. The debug codomain container shall contribute to that condition only when present.

    RATIONALE:

    Transferring a coordinate map avoids copying its stored pairs. An empty, reusable source preserves the value-type invariants after transfer. The exception specification accounts for the containers' actual construction guarantees instead of requiring every standard-library implementation to construct an empty container without throwing.

    INTERFACE:

    Public move constructor declaration:

    Partial_Function(Partial_Function&& source)
      noexcept(noexcept(std::vector<dimension_type>())
    #ifndef NDEBUG
               && noexcept(std::set<dimension_type>())
    #endif
               );
    
    VERIFICATION_CRITERIA:

    Move-construct empty and sparse nonempty maps, including image zero. Compare the destination with an independent pair collection and check source emptiness, absent-output preservation and the defined empty maximum-query exception. Insert into the source after transfer and check independence from the destination. Inspect member construction and representation exchange, including cleanup and source preservation if an actual empty-storage allocation fails. Compare allocation observations during move construction with those for default construction of the same configured empty storage, and check both empty and nonempty sources. Inject failures at any observed empty-storage allocation stage and check source preservation. Check the exception specification in configurations with and without the debug codomain container, against the configured containers' construction traits.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: move constructor and representation exchange. tests/partialfunction2.cc: partial_function_move_construction_transfers_and_empties_source. tests/partialfunction1.cc: move_construction_allocates_only_for_empty_storage.

  • PPL-SPEC-000010
    10. Move assignment and empty source UID: PPL-SPEC-000010 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Move assignment between distinct valid maps under 🔗 1. Public partial coordinate-map type and valid use shall replace the target's mapping with exactly the source's mapping on entry and leave the source as a valid empty map. Both maps shall support subsequent queries, insertions, assignments and destruction. Subsequent changes to either map shall not change the other's represented value.

    Self-move-assignment shall leave the map unchanged. Move assignment shall return a reference to its target, including self-move-assignment. It shall not allocate storage or throw. Storage retained by an empty map shall remain owned by that map and shall not imply the presence of any mapped pair.

    RATIONALE:

    Move assignment permits reuse of an existing target without copying pairs. Defined empty-source and self-assignment behavior preserves map validity and allows continued use of both objects without inspecting storage internals.

    INTERFACE:

    Public move assignment declaration:

    Partial_Function& operator=(Partial_Function&& source) noexcept;
    
    VERIFICATION_CRITERIA:

    Move-assign empty and sparse maps into empty and nonempty targets. Check exact target replacement, source emptiness and returned-reference identity. Reuse both objects with valid insertions and queries, including a source that receives storage previously owned by the target. Check self-move-assignment through a reference alias and chained assignments whose selected overloads are move assignments. Check the nonthrowing exception specification and arm allocation failure during assignment to check absence of allocation, including self-assignment and empty and nonempty source/target combinations. Inspect clearing and representation exchange.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: move assignment and representation exchange. tests/partialfunction2.cc: partial_function_move_assignment_replaces_and_empties_source. tests/partialfunction1.cc: move_assignment_does_not_allocate.

  • 1. Threshold-ordered pending events and caller prerequisites UID: PPL-SPEC-000801 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_List<Traits> shall own a sequence of active event nodes and a separate pool of reusable inactive nodes. Each active event shall contain an owned threshold value and borrowed handler/expired-flag bindings. Traits::less_than shall define a stable strict weak order on admitted threshold values. Threshold copy construction, assignment, destruction and that comparison shall not throw; selected threshold operations shall satisfy their own validity and resource prerequisites.

    Clients shall synchronize access and retain the noncopying owning-list conditions of 🔗 5. Empty owning-list construction and remaining-node destruction. Active node positions shall belong to one list and remain valid only until their event is erased or their owner destroyed. Handlers and flags shall remain alive while their event is active or a borrowed reference is accessed. Inactive pooled nodes may retain old pointer values without accessing those external objects; their old external bindings need not outlive the pool. The queue shall not require global PPL initialization beyond the selected threshold's own needs. Any enclosing watcher interface shall retain its additional thread/signal restrictions.

    RATIONALE:

    Queue ownership, threshold ordering and external notification-object lifetimes have distinct scopes, especially after cancellation recycles a node.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    template <typename Traits> class Pending_List;
    template <typename Threshold> class Pending_Element;
    
    VERIFICATION_CRITERIA:

    Compare independent ordered event models, separate owners, borrowed identities and pool lifetimes with nonthrowing threshold fixtures and no library initialization.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000802
    2. Pending-element construction and embedded-link lifetime UID: PPL-SPEC-000802 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_Element construction shall copy the supplied threshold and bind the supplied handler and flag by reference identity. It shall not invoke the handler, modify the flag or retain a reference to the caller's threshold object. The selected threshold shall satisfy 🔗 1. Threshold-ordered pending events and caller prerequisites.

    The newly constructed element's inherited links shall require binding into a valid ring before traversal, unlinking or destruction, retaining 🔗 2. Embedded-node construction and link initialization. Queue insertion shall establish that binding before exposing the element. A directly constructed element shall be attached by its caller before destruction; completed linked-element destruction shall retain the nonthrowing threshold lifetime and embedded- node contract.

    RATIONALE:

    Attribute construction alone does not initialize the inherited embedded-node links.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_Element(const Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Construct directly into an owning embedded list with a nondefault-constructible threshold; verify the independent threshold copy, borrowed identities, no notification and completed-node destruction.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000803
    3. Element attribute reassignment without relinking UID: PPL-SPEC-000803 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    assign shall replace the owned threshold value and borrowed handler/ flag bindings with the supplied attributes, preserving the element's existing link position. It shall not allocate an event node, invoke a handler or reset either flag. The supplied threshold may alias this element's current threshold; self-value assignment shall retain its meaning. Callers reassigning active elements shall preserve the pending list's ordering before using its ordinary operations. Pooled elements shall be rebound before exposure as new active events.

    RATIONALE:

    Pool reuse requires replacing every event attribute without changing the detached node ownership protocol.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    void assign(const Threshold& deadline, const Handler& handler,
                bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Check every old/new handler/flag pairing, self-borrowed deadline assignment, unchanged node links and no handler/flag side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000804
    4. Threshold, handler and expired-flag reference access UID: PPL-SPEC-000804 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    deadline() shall return a const reference to the owned threshold; handler() shall return a const reference to the bound handler; expired_flag() shall return a mutable reference to the bound Boolean even through a const element wrapper. Access shall preserve all attributes and links. A reference to the threshold shall require the node and threshold object to remain alive, and shall observe any later admitted reassignment. Handler/flag references shall retain the external object's lifetime independently of the element wrapper. Invoking or modifying a returned external object shall be a caller action, not an automatic queue notification.

    RATIONALE:

    Event access must preserve actual external identities and distinguish reference access from notification scheduling.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    const Threshold& deadline() const;
    const Handler& handler() const;
    bool& expired_flag() const;
    
    VERIFICATION_CRITERIA:

    Check exact types/addresses through const and mutable wrappers, independently copied thresholds, explicit caller notification and direct flag mutation.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000805
    5. Pending-element attribute checker scope UID: PPL-SPEC-000805 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted completed element, OK() shall return true without modifying attributes or links. It shall not validate threshold positivity, current-time expiry, external handler policy or list sorting. Its use shall not dereference a handler or flag merely to validate their stored pointer values. This element checker shall not establish the inherited ring's structural validity or make a stale active-event position usable.

    RATIONALE:

    The element checker supplies an embedded-list hook while deadline validity and ownership remain caller/queue obligations.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check live elements before/after attribute replacement and inactive pooled nodes with expired external lifetimes, without accessing stale external bindings.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000806
    6. Queue construction and complete active/free ownership cleanup UID: PPL-SPEC-000806 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall create a valid empty active sequence and empty free pool. Destruction shall release every owned active and pooled node and its threshold exactly once. It shall not delete borrowed handlers or flags, invoke notification actions or change external expired flags. Independent queue owners shall have independent nodes and lifetimes. No supported owner copy/assignment shall be required under 🔗 1. Threshold-ordered pending events and caller prerequisites.

    RATIONALE:

    Both active and recycled nodes remain queue-owned, while notification objects remain externally owned.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_List();
    ~Pending_List();
    
    VERIFICATION_CRITERIA:

    Count threshold construction/destruction across mixed active/free owners, empty owners and separate queues; verify no external handler destruction or notification.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000807
    7. Sorted insertion and equivalent-deadline multiplicity UID: PPL-SPEC-000807 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful insertion shall add exactly one active event with the supplied attributes and return its live position. Traversing the active sequence shall produce nondecreasing threshold order under the supplied strict weak comparison. Every previously active event shall remain with its prior threshold, handler, flag and node identity. Distinct events with equivalent thresholds shall all remain present; their relative order shall not be required by this interface. Insertion shall not act on handlers or modify external flags. Threshold values need not be positive or related to a clock merely to use this internal queue.

    RATIONALE:

    Ordered pending storage supports both timer and computational-weight clients without imposing one client's duration validation on the generic container.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Compare all small insertion permutations, descending histories, duplicate/equivalent thresholds, zero thresholds and exact event identities with an independent ordered model.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000808
    8. Insertion with borrowed active attributes UID: PPL-SPEC-000808 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An insertion's threshold argument may borrow the threshold of an already active element; insertion shall preserve that source and copy its value into the new event. Handlers and flags may be shared among several active events. Their reference identities and preexisting flag values shall remain unchanged by insertion. These aliases shall not permit reuse of erased positions as active-event sources or destruction of external objects still referenced by active events.

    RATIONALE:

    Watchdog records may share external notification state or use an existing active threshold without transferring its ownership.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Insert from each active threshold reference into fresh and recycled nodes, share handler/flag objects and verify all source values and bindings survive.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 9. Active-event erasure and successor preservation UID: PPL-SPEC-000809 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasure shall require a live active position belonging to this queue. It shall remove exactly that event from the active sequence, preserve every other event and its ordering/identity, and return the removed event's next active position or this queue's end. It shall retain the removed node in the reusable pool without destroying its threshold, notifying its handler or changing its flag. The removed position shall cease to denote an active event even while the underlying node remains allocated. Erasure shall not allocate.

    RATIONALE:

    Cancellation removes a logical event while retaining node storage for later low-allocation use.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Erase every possible active position, singleton and repeated front/back histories; check exact successor, unchanged surviving identities and attributes, no allocation or notification and retained threshold lifetimes.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000810
    10. Recycled-node insertion and allocation-free reuse UID: PPL-SPEC-000810 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When inactive nodes are available, insertion shall reuse one of them rather than allocate a new node. It shall replace every event attribute before linking the reused node into the sorted active sequence. The old external handler/flag bindings shall not be accessed during reuse. No particular selection order among available free nodes shall be required. Without an inactive node, insertion shall allocate a new properly aligned event node. Threshold operation costs shall remain those of the admitted nonthrowing threshold type.

    RATIONALE:

    Recycling reduces later event-node allocation while requiring complete replacement of old notification bindings.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Exhaust and replenish pools, disable allocation during reuse, check reused node-address membership and over-alignment, and replace bindings whose former external objects have been destroyed.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000811
    11. Active-event iterator ranges and borrowed traversal UID: PPL-SPEC-000811 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    iterator and const_iterator shall retain the corresponding embedded-list iterator types and 🔗 7. Embedded-list iterator borrowing and valid linked positions, 🔗 8. Embedded-list position binding and lifetime, 🔗 9. Embedded-list typed element access, 🔗 10. Embedded-list bidirectional traversal and 🔗 11. Embedded-list position equality. The public nonconst begin/end members shall bound exactly the active sequence; free nodes shall never appear in that range. End shall be comparable and support retreat when nonempty, but not dereference. Positions shall preserve node identity under other event insertion/erasure, subject to 🔗 1. Threshold-ordered pending events and caller prerequisites. Clients shall not change embedded links or break active threshold ordering through the borrowed element access.

    RATIONALE:

    Only active events participate in scheduling traversal; cached storage and borrowed-node access must not extend event validity.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    using iterator = typename EList<Pending_Element<typename Traits::Threshold>>::iterator;
    using const_iterator = typename EList<Pending_Element<typename Traits::Threshold>>::const_iterator;
    iterator begin();
    iterator end();
    
    VERIFICATION_CRITERIA:

    Compare forward/backward prefix/postfix histories, separate cursor copies and exact event addresses before/after unrelated insertions and erasures; verify free nodes are excluded.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000812
    12. Active emptiness independent of retained pool storage UID: PPL-SPEC-000812 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    empty() shall return true exactly when no active events remain. An empty active sequence shall have equal begin/end positions even if inactive node storage is retained. Emptiness shall not imply that all allocated event nodes have been released. The query shall not notify handlers, modify flags or change the active/free node ownership.

    RATIONALE:

    Logical pending-event emptiness and physical pool emptiness are different resource states.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool empty() const;
    
    VERIFICATION_CRITERIA:

    Check construction, every erase-to-empty history, retained threshold/node counts and subsequent allocation-free insertion.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000813
    13. Queue node checks and threshold-order validation UID: PPL-SPEC-000813 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For safely inspectable active/free rings, OK() shall require both embedded lists' element checks and nondecreasing active threshold order. An empty active list shall pass when its active/free node checks pass. Free nodes shall not require threshold sorting. Checking shall not invoke handlers, dereference expired external bindings, modify flags or change ownership. Corrupted embedded links shall remain outside the checker domain; this operation shall not provide memory-safe diagnosis of arbitrary ownership corruption. Clients may check and repair a threshold-order violation before resuming ordinary queue operations.

    RATIONALE:

    Queue consistency adds threshold order to the embedded-node hooks without validating canceled notification objects or arbitrary corrupted memory.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/sorted states, every adjacent valid-ring order violation and repaired order, unsorted free-node histories and absence of external notification side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000814
    14. Insertion-allocation failure preservation and retry UID: PPL-SPEC-000814 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the nonthrowing threshold and comparison prerequisites of 🔗 1. Threshold-ordered pending events and caller prerequisites, a reported event-node allocation failure shall leave the active sequence, free pool, all existing event attributes, handler bindings and flag values unchanged. No incomplete event node shall remain owned or linked. The same queue shall permit a later successful insertion and ordinary erasure. Erasure and insertion using an available pooled node shall not require an event-node allocation. These guarantees shall not promise recovery from violated threshold or linking preconditions.

    RATIONALE:

    Allocation occurs before an otherwise nonthrowing insertion can commit a new active event.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Fail the observed new-node allocation for empty and populated owners, verify complete event/address/flag/resource preservation, retry insertion and then exercise allocation-disabled pool reuse.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-001486
    1. Parametric integer coordinate growth UID: PPL-SPEC-001486 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Growth shall append m_vars new decision variables followed by m_params new parameter coordinates, preserving the indices and meaning of all old coordinates. New coordinates shall initially have only implicit nonnegativity restrictions. Zero/zero growth shall preserve the current state. The sum shall be checked against the remaining supported extent without arithmetic wraparound; overflow shall raise std::length_error before changing dimensions. Subsequent solution queries shall describe the expanded problem with artificial parameter indices adjusted to follow original coordinates.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Artificial parameter numbering must not displace or reinterpret original problem coordinates when new dimensions are appended.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void add_space_dimensions_and_embed(dimension_type m_vars,
                                        dimension_type m_params);
    
    VERIFICATION_CRITERIA:

    Add either/both coordinate kinds before and after solving, check ordering and renumbering, zero additions, extreme sizes and fresh-problem equivalence.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem2.cc.

  • PPL-SPEC-001487
    2. Parametric coordinate selection and descriptor views UID: PPL-SPEC-001487 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Parameter addition shall select the supplied indices as parameters and preserve already selected parameters. Incompatible indices shall raise std::invalid_argument. A decision coordinate already processed by the solver shall not be reinterpreted as a parameter; such conversion shall raise std::invalid_argument. Already selected processed parameters may be supplied again. Descriptor access shall expose the parameter subset and const constraints in insertion order; borrowed iterators and views may be invalidated by storage changes or replacement.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Changing an already solved decision coordinate into a parameter would reinterpret cached tableau and tree coordinates.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void add_to_parameter_space_dimensions(const Variables_Set&);
    const Variables_Set& parameter_space_dimensions() const;
    const_iterator constraints_begin() const;
    const_iterator constraints_end() const;
    
    VERIFICATION_CRITERIA:

    Select fresh coordinates, repeat parameter selections, reject processed decision variables, inspect descriptors and compare valid histories with fresh models. Repeat processed parameter selections and an aliased public parameter view without changing the solved state. Exercise empty requests, multiple processed parameters, a mixed processed/fresh suffix and rejection of processed decision coordinates; retain ordinary fresh-coordinate additions.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem2.cc; tests/PIP_Problem/pipproblem3.cc.

  • PPL-SPEC-001488
    3. Parametric constraint refinement UID: PPL-SPEC-001488 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint additions shall conjoin value copies with the current problem. A descriptor dimension greater than the ambient dimension shall raise std::invalid_argument, including an empty system with an incompatible declared extent. Strict inequalities shall be interpreted over nonnegative integers. Subsequent completed queries shall include all added variable and parameter-only constraints; obsolete feasible branches or cached solutions shall not be returned as current. After one or more rows are appended to a problem with a retained feasible solution tree, the next query that needs a solution shall rebuild the result from the complete updated model and its parameter context.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    New parameter-only constraints change the admissible initial context as well as the feasible decision region.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void add_constraint(const Constraint&);
    void add_constraints(const Constraint_System&);
    
    VERIFICATION_CRITERIA:

    Add equations, strict and non-strict inequalities, parameter-only contradictions and empty dimensioned systems before/after solving; compare against fresh literal models. After appending rows to a previously solved feasible model, compare the rebuilt solution and parameter context with a fresh equivalent problem. Exercise bulk copies with both row representations. Allocation failure before an append shall retain the prior mathematical rows and cached status; after successful prefix copies, that prefix shall remain valid pending work and support solution queries and retry with the unappended suffix. Empty bulk additions shall not allocate or invalidate cached results.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc. tests/PIP_Problem/bulkconstraints1.cc; tests/PIP_Problem/bulkparser1.cc.

  • PPL-SPEC-001493
    1. Parametric solution display UID: PPL-SPEC-001493 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Human-readable problem output shall show constraints, parameters and big-parameter selection and return its stream. print_solution shall display the already computed tree or infeasibility with the requested nonnegative indentation. A pending unsolved problem shall raise std::logic_error rather than be silently solved by this display member. Human display shall be distinct from reloadable serialization.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Observation of an existing solution is distinct from requesting solver work and from serializing its representation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void print_solution(std::ostream&, int indent=0) const;
    void print() const;
    std::ostream& IO_Operators::operator<<(std::ostream&, const PIP_Problem&);
    
    VERIFICATION_CRITERIA:

    Check solved, infeasible and pending states, indentation, stream identity, labels and empty solution tuples.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem1.cc.

  • PPL-SPEC-001494
    2. Reloadable parametric solver representations UID: PPL-SPEC-001494 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Dumping shall write original problem data, parameter context, controls, big-parameter selection and incremental tree state. Loading a complete admitted representation produced by a matching configuration shall replace the destination and preserve subsequent context-relative solution meaning. Every loaded node shall belong to the destination, with valid parent links. A complete prefix may be followed by unrelated stream content.

    These records are trusted solver snapshots. Malformed tokens, extents, counts, parameter/control selections and status, tree or tableau structures inconsistent with the declared dimensions, parameters and status shall return false in both optimized and debugging builds. The loader shall validate leaf dimensions and parameter references against the processed model and the path's artificial parameter definitions. The loader reads the recorded tableaux. An altered record can pass those checks with tableaux that fail to represent its processed constraints. False shall not promise rollback or further queries. Surviving owned storage shall remain destructible. Stream and resource exceptions may propagate. Valid records can require substantial resources.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A valid tree depends on a compatible problem, context and owner; retaining old destination constraints changes its meaning.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void ascii_dump(std::ostream&) const;
    void ascii_dump() const;
    bool ascii_load(std::istream&);
    
    VERIFICATION_CRITERIA:

    Round-trip every solver state and heuristic into fresh/populated destinations, then refine; check recursive false branches, owners, truncations, incompatible parameter dimensions, status/tree contradictions and malformed controls. Reject raw coordinate sets containing the largest dimension_type value, reserved indices and indices outside the ambient dimension before using a derived coordinate-set dimension. Exercise unsolved and solved records, zero ambient dimensions, empty/unsorted/duplicate valid sets, trailing input and complete valid replacement after false.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipmalformedvalues1.cc.

  • PPL-SPEC-001495
    3. Parametric diagnostics and storage accounting UID: PPL-SPEC-001495 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall check the implemented problem, context, control and tree invariants, including that every owned tree node refers to this problem. It shall not establish a new mathematical solution. External memory shall estimate managed constraint, parameter, context and solution-tree storage; total memory shall add sizeof(*this). Destroying, clearing or replacing the problem shall release the storage it owns.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Ownership and structural checks support resource safety separately from the solver correctness argument.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check valid pending/solved/infeasible states, every transferred owner, byte relationships and cleanup after copies, resets and failed loads.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc.

  • PPL-SPEC-001489
    1. Parametric solver outcomes and satisfiability UID: PPL-SPEC-001489 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A completed solve shall return UNFEASIBLE_PIP_PROBLEM for infeasibility and OPTIMIZED_PIP_PROBLEM with a retained tree otherwise. With no big parameter, infeasibility shall mean that no assignment in the initial context has a feasible nonnegative integer decision tuple. With a big parameter, the status shall reflect the sign decisions in 🔗 4. Parametric big-parameter designation. is_satisfiable shall solve as needed and return true exactly for the optimized status. An infeasible subregion of a partly feasible context shall not imply global infeasibility in ordinary mode. Repeated queries may reuse current state without changing the mathematical result.

    An integer search over an unbounded parameter context or feasible region may run indefinitely. Configured deterministic weight limits and supported cancellation shall be observed at solver checkpoints under 🔗 1. Optimization and ranking valid use.

    Integer compatibility checks used to determine feasibility shall follow 🔗 5. Integer feasibility of parametric compatibility contexts.

    Ordinary bounded-coefficient simplex pivots shall preserve the shared rational tableau across both its variable and parameter numerator matrices. When direct arithmetic has not been proved representable, the complete pivot shall be evaluated exactly and the common positive factor of both numerator matrices and their one denominator shall be cancelled before coefficient admission. Rows shall not be scaled independently. Parameter-row and cut-selection scores, including products of residue sums, shall be compared as exact working integers without requiring those comparison-only values to fit a coefficient. Pivot and cut ties shall retain their existing traversal order.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Every nonempty subset of nonnegative integer tuples has a lexicographic minimum; partly feasible contexts still require symbolic solutions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    PIP_Problem_Status solve() const;
    bool is_satisfiable() const;
    
    VERIFICATION_CRITERIA:

    Check global and partial feasibility, empty initial contexts, zero coordinates, all parameters, repeated queries and independently enumerated contexts. Check a feasible zero face excluded by the big-parameter sign decisions. Compare fresh ordinary initialization and post-pivot incremental updates against literal optima and bounded integer enumeration, including sparse dimension gaps, strict rows and coefficients larger than a native machine word. Assess the context-feasibility kernels separately under 🔗 5. Integer feasibility of parametric compatibility contexts. Check determinant-minus-one equality and inequality families with literal solutions (1,1) and (0,2), including coefficients whose products exceed a machine word, both representations, both input orders and every cutting/pivot mode. Exercise consecutive nonunit pivots, common-factor cancellation, intervening cuts and subsequent unit pivots. Check independently constrained coordinate ceilings for 16 and 32 unknowns, with compatible upper bounds, across both representations, input orders and every cut and pivot strategy. Check independent GMP arithmetic for working-score multiplication, self aliasing and wide values; use a coupled ceiling example to force an oversized score. Check exact ordering and ties against literal optima. Evaluate symbolic trees with independent unbounded integers. Exercise a deterministic weight limit on a long search over an unbounded parameter context.

    SOURCE:

    src/Exact_Arithmetic.hh; src/PIP_Tree.cc; src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/zerofaces1.cc; tests/PIP_Problem/weightwatch1.cc; tests/pipcolumnsspec1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/initialtableau1.cc. src/PIP_Divisibility.hh; tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc; tests/PIP_Problem/pipboundedpivot1.cc;

  • PPL-SPEC-001490
    2. Parametric solution-tree access UID: PPL-SPEC-001490 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Both accessors shall solve a pending problem as needed and return a borrowed const tree describing its current lexicographic optima. Infeasibility in the selected solve mode shall return a null tree. Interpret a returned tree only at assignments satisfying the initial context and, if a big parameter is designated, the sign assumptions in 🔗 4. Parametric big-parameter designation. On such assignments, every reached feasible leaf shall provide the least decision tuple; a missing branch or a failed leaf guard shall denote infeasibility for that context subset. Mutation, replacement, destruction or a cache-replacing query on the owning problem may invalidate the tree and its derived views.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    The initial context and the guards along a tree path together determine where a symbolic leaf is valid.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    PIP_Tree solution() const;
    PIP_Tree optimizing_solution() const;
    
    VERIFICATION_CRITERIA:

    Traverse both accessor results with an independent interpreter for guards and artificial parameters; compare feasible leaves and missing branches against bounded enumeration.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/zerofaces1.cc; tests/PIP_Problem/initialtableau1.cc. tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc;

  • PPL-SPEC-001491
    3. Parametric cutting and pivot controls UID: PPL-SPEC-001491 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Setting a cutting value shall select first-row, deepest-cut or all-cuts generation; setting a pivot value shall select first-row or maximum-column pivot choice. The getter shall report the selected value for a valid control name. Defaults shall be CUTTING_STRATEGY_FIRST and PIVOT_ROW_STRATEGY_FIRST. Unsupported setting values shall raise std::invalid_argument. Heuristic changes may change tree shape and work, while completed solutions shall retain the same context-relative meaning. The maximum-column heuristic shall compare candidate pivot updates by stored row order, then constant/original/artificial parameter column order. These comparisons shall retain exact ordering and ties when intermediate two- or three-factor products exceed the bounded coefficient range.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Equivalent symbolic solutions can have different trees under different valid search heuristics.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    Control_Parameter_Value get_control_parameter(Control_Parameter_Name) const;
    void set_control_parameter(Control_Parameter_Value);
    
    VERIFICATION_CRITERIA:

    Check defaults, all six cutting/pivot combinations, invalid setting values and literal tree evaluation rather than textual tree equality.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem2.cc. tests/PIP_Problem/pip_test_oracle.hh; tests/PIP_Problem/compatibilitysingleton1.cc; tests/PIP_Problem/compatibilitycandidates1.cc; tests/PIP_Problem/pipdivisibility1.cc; tests/PIP_Problem/compatibilityzero1.cc; tests/PIP_Problem/pipboundedpivot1.cc;

  • 4. Parametric big-parameter designation UID: PPL-SPEC-001492 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The setter shall designate an existing, not-yet-processed parameter coordinate as the big parameter. A non-parameter or a parameter already processed by the solver shall raise std::invalid_argument. The getter shall return its index, or not_a_dimension() when none is selected. In symbolic sign decisions, a nonzero coefficient of this parameter shall dominate the remaining expression. This convention shall represent an arbitrarily large parameter; concrete finite assignments shall be interpreted only where the result's asymptotic sign conditions hold, accounting for the values of artificial parameters. See 🔗 1. Parametric problem and context interpretation.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A symbolic parameter assumed sufficiently large is not interchangeable with an arbitrary finite input parameter.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    void set_big_parameter_dimension(dimension_type);
    dimension_type get_big_parameter_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check designation before/after processing, invalid coordinates, copy/exchange/reset, sign-unrestricted encodings and sufficiently large concrete witnesses.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem2.cc; tests/PIP_Problem/zerofaces1.cc.

  • 5. Integer feasibility of parametric compatibility contexts UID: PPL-SPEC-001741 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A native context shall include a constant column. Each row shall denote an inequality whose constant is in column zero and whose remaining coefficients multiply nonnegative integer coordinates. The affine row value shall be required to be nonnegative. The additional row, when supplied, shall have the same logical width and shall be conjoined with the context. A completed query shall return true exactly when that system has a nonnegative integer solution. A rational solution that fails an integrality constraint shall not justify true. Explicitly stored zeroes and differing physical row capacities shall not alter the result.

    The const-input entry points shall preserve the context and any additional row. The destructive entry point may modify and extend its working tableau. A compatibility workspace shall own its scratch storage and shall be noncopyable. Nested queries shall use distinct workspaces. Restoring a context shall replace the logical rows, including zeroing retained coordinates absent from the source. Reuse may retain inactive row allocations and sparse entries holding zero. After failure or interruption, another query shall rebuild or reinitialize the scratch state before relying on it.

    When direct bounded arithmetic has not been proved representable, complete rational pivot rows shall be evaluated exactly and the common positive factor of their numerators and denominator shall be cancelled before admission. Comparison-only products shall retain exact order without requiring them to fit a stored coefficient. When a reduced numerator or denominator cannot be stored, the protected entry points and the workspace overload accepting a const context and an additional row shall replay the original unchanged context in owned unbounded rational working storage. Replay shall preserve reconstructed original-variable column order and enforce integer feasibility of those variables using cuts. It shall not widen the public solution-tree coefficient type.

    Only the internal working-range condition shall trigger replay. Allocation failures and client abandonment exceptions, including client overflow exceptions, shall propagate. Scratch from an unsuccessful query shall not establish any feasibility result.

    RATIONALE:

    Branch and guard pruning depends on integer feasibility of the original parameter context. Ownership and replay must preserve its meaning and the caller's interruption behavior.

    INTERFACE:

    Protected PIP_Tree_Node::compatibility_check overloads and the private PIP_Implementation::Compatibility_Workspace, compatibility_check and exact_compatibility_check declarations in src/PIP_Compatibility.hh. The lower-level mutable overload used by the workspace operates on admitted working storage and may signal that exact replay is needed.

    VERIFICATION_CRITERIA:

    Compare the answers with complete bounded integer enumeration and literal integral and half-integral solutions. Use changing dimensions, stored zeroes and varying row capacities. Compare the input rows before and after both native checks and replay. Check reuse of live slots after restoration and zeroing of recycled rows. Exercise pivot reduction across the coefficient boundary and retry the same workspace after allocation and checkpoint failures. Check that a client overflow is propagated once and that nested calls use independent scratch.

    SOURCE:

    src/PIP_Tree_defs.hh, src/PIP_Tree.cc, src/PIP_Compatibility.hh, src/PIP_Exact_Compatibility.cc, tests/PIP_Problem/compatibilityworkspace1.cc, tests/PIP_Problem/exactcontexts1.cc and tests/PIP_Problem/compatibilityzero1.cc.

  • PPL-SPEC-001496
    1. Parametric tree interpretation and artificial scope UID: PPL-SPEC-001496 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A returned tree shall be interpreted at parameter assignments in the scope defined by 🔗 1. Parametric problem and context interpretation. At each node, local artificial parameters shall be introduced in stored order after all original coordinates and inherited artificial parameters. An artificial parameter a = ⌊e ⁄ d⌋ shall use mathematical floor, including for negative numerators. Its expression shall refer only to original parameters and earlier artificial parameters in scope.

    A decision's true branch shall require all local guards; its false branch, when present, shall require the complement of its single guard. A solution leaf shall require its own guards in addition to the path context. Missing branches and failed leaf guards shall mean infeasibility within that result's scope.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Guard evaluation and the scope of floor expressions jointly determine the meaning of a symbolic leaf.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    class PIP_Tree_Node;
    class PIP_Solution_Node;
    class PIP_Decision_Node;
    
    VERIFICATION_CRITERIA:

    Use an independent integer-floor tree interpreter on bounded contexts, negative numerators, inherited/local artificial parameters, false decisions and guarded leaves.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/zerofaces1.cc.

  • PPL-SPEC-001497
    2. Parametric node guards and artificial-parameter views UID: PPL-SPEC-001497 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    constraints shall return a borrowed const view of the node's local parameter guards. Artificial-parameter iterators shall traverse the local stored sequence in introduction order; the count shall report its size, without including ancestor parameters. The half-open range shall be empty when no local artificial parameter is introduced. Storage changes and node destruction may invalidate these borrowed views and iterators. Borrowing local constraints or artificial-parameter iterators shall require an lvalue node.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Local scope must be distinguished from the inherited parameter environment when traversing a tree.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    const Constraint_System& constraints() const &;
    Artificial_Parameter_Sequence::const_iterator art_parameter_begin() const &;
    Artificial_Parameter_Sequence::const_iterator art_parameter_end() const &;
    dimension_type art_parameter_count() const;
    
    VERIFICATION_CRITERIA:

    Check counts, range order and local versus ancestor scope on deep trees and round trips, and evaluate each guard independently.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc.

  • PPL-SPEC-001498
    3. Parametric tree ownership associations UID: PPL-SPEC-001498 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    get_owner shall return the node's non-owning problem association. set_owner shall update that association throughout the receiver's subtree; check_ownership shall report whether every node in that subtree has the supplied owner. Rebinding shall not copy nodes or re-solve a problem. Callers rebinding a tree for interpretation shall provide a live owner with compatible original dimensions and parameter meanings. Every tree returned by a problem shall refer to that problem throughout its subtree.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Original coordinate interpretation is obtained through the problem association rather than stored independently in each leaf.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below. The base-class constructors and owner-association operations are protected.

    const PIP_Problem* get_owner() const;
    virtual void set_owner(const PIP_Problem*) = 0;
    virtual bool check_ownership(const PIP_Problem*) const = 0;
    
    VERIFICATION_CRITERIA:

    Check every node after problem copy, assignment, exchange and loading, and explicit rebinding of a separately owned clone.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem3.cc.

  • PPL-SPEC-001499
    4. Parametric tree cloning and lifetime UID: PPL-SPEC-001499 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    clone shall allocate a structurally independent copy of the subtree, including guards, artificial parameters and solution representation, and return ownership of that copy to its caller. It shall preserve the original owner association but detach the clone's root from its former parent. Copied children shall refer to their copied parent. Deleting a tree through its virtual base shall release every owned descendant. Failed cloning shall release any subtree already acquired. Initial solution-node construction shall create solver state associated with the supplied owner; numerical leaf access shall require a complete solved representation.

    Temporary ownership during recursive solving shall protect the successfully returned subtree or newly adopting parent. Retargeting that protection shall not delete a root already consumed by solving or adopted by the parent.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Tree storage can be independent while the problem association remains borrowed.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below. The base-class constructors and owner-association operations are protected.

    explicit PIP_Tree_Node(const PIP_Problem*);
    PIP_Tree_Node(const PIP_Tree_Node&);
    explicit PIP_Solution_Node(const PIP_Problem*);
    virtual PIP_Tree_Node* clone() const = 0;
    virtual ~PIP_Tree_Node();
    
    VERIFICATION_CRITERIA:

    Clone nested true/false subtrees, destroy source or copies in valid ownership order, rebind compatible owners and inject failures during child copying.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem3.cc; tests/pipcolumnsspec1.cc.

  • PPL-SPEC-001500
    5. Artificial parameter construction and value operations UID: PPL-SPEC-001500 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction shall represent zero with denominator one. Construction from expr and nonzero d shall preserve their rational ratio while normalizing the denominator to positive and dividing numerator coefficients, constant and denominator by their common factor. Zero denominator shall raise std::invalid_argument. In tree interpretation the value shall be the floor of that normalized rational expression.

    Copying and assignment shall preserve the stored numerator expression, dimension and denominator, with independent later mutations. Exchange shall swap them. Equality shall compare stored dimension, numerator and denominator; inequality shall negate it. Equality shall not identify all distinct formulas that happen to have equal floors on a particular context. Inherited expression mutations shall follow the linear-expression contracts and shall not implicitly renormalize this denominator.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Joint normalization preserves the rational expression, whereas changing only the denominator would change the integer floor.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    class PIP_Tree_Node::Artificial_Parameter : public Linear_Expression {
    public:
      Artificial_Parameter();
      Artificial_Parameter(const Linear_Expression&, Coefficient_traits::const_reference);
      Artificial_Parameter(const Artificial_Parameter&);
      Artificial_Parameter& operator=(const Artificial_Parameter&) = default;
      Coefficient_traits::const_reference denominator() const;
      void m_swap(Artificial_Parameter&);
      bool operator==(const Artificial_Parameter&) const;
      bool operator!=(const Artificial_Parameter&) const;
    };
    
    VERIFICATION_CRITERIA:

    Check both denominator signs, zero numerator, common factors including constants, negative floors, dimensions, copy/assignment/exchange and structurally distinct equivalent expressions.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem2.cc.

  • PPL-SPEC-001501
    6. Artificial parameter persistence and diagnostics UID: PPL-SPEC-001501 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Serialization shall retain numerator dimension, coefficients and the positive denominator. Loading shall preserve an admitted stored representation, including a common factor, without constructor normalization. Malformed or nonpositive denominators shall return false in both build modes. False shall not promise rollback or further queries; owned storage shall remain destructible. OK shall require a positive denominator. Human output shall display the expression and integer-division denominator and return its stream. External memory shall estimate expression storage; total shall add the artificial-parameter object's own size.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    An admitted serialized denominator must support a defined integer floor, while persistence need not canonicalize its representation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    void ascii_dump(std::ostream&) const;
    void ascii_dump() const; bool ascii_load(std::istream&);
    bool OK() const; void print() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    std::ostream& IO_Operators::operator<<(
        std::ostream&, const PIP_Tree_Node::Artificial_Parameter&);
    
    VERIFICATION_CRITERIA:

    Check noncanonical positive round trips, replacement loads, zero/negative denominators, truncations, stream identity and byte relationships.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem2.cc.

  • PPL-SPEC-001502
    7. Reloadable parametric tree structure UID: PPL-SPEC-001502 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Node dumping shall write local guards and artificial parameters; concrete solution and decision dumping shall additionally write their complete respective representation. Concrete loading shall replace the corresponding stored state, retain the receiver's live owner association and restore parent and owner links for loaded children. Reloading shall not append old artificial parameters. Recursive decision subtrees shall be supported on both branches.

    Malformed fields, nonpositive tableau denominators, incompatible vector/matrix sizes, out-of-range mappings and invalid decision structure shall return false in both build modes, before unsafe indexing or successful use of the broken representation. Surviving ownership shall remain destructible after false, without a rollback or further-query guarantee. A tree shall be interpreted only after association with a compatible live problem. Stream and resource exceptions may propagate.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Local formulas, tableau coordinates and ownership links must describe the same tree after replacement.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    void PIP_Tree_Node::ascii_dump(std::ostream&) const;
    bool PIP_Tree_Node::ascii_load(std::istream&);
    void PIP_Solution_Node::ascii_dump(std::ostream&) const;
    bool PIP_Solution_Node::ascii_load(std::istream&);
    void PIP_Decision_Node::ascii_dump(std::ostream&) const;
    bool PIP_Decision_Node::ascii_load(std::istream&);
    
    VERIFICATION_CRITERIA:

    Round-trip fresh and populated clones, including local artificial parameters and recursive false branches; reject mismatched vector extents, mapping indices, denominators, kinds, guards and truncations with sanitizers.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipmalformedvalues1.cc.

  • PPL-SPEC-001503
    8. Parametric solution leaves and coordinate values UID: PPL-SPEC-001503 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A solution node shall return itself from as_solution and null from as_decision. On a complete solved leaf associated with a live problem, parametric_values(var) shall return a borrowed affine expression in original and in-scope artificial parameters describing that decision coordinate on the leaf's valid path context. Its coordinate shall be an original problem variable; a parameter coordinate or dimension-incompatible variable shall raise std::invalid_argument. Cached expressions may be materialized lazily. No tuple shall be inferred from the leaf when its guards fail. Returning a parametric-value reference shall require an lvalue solution node.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Coordinate formulas are meaningful only after interpreting artificial parameters and the guards that select the leaf.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    const PIP_Solution_Node* as_solution() const;
    const PIP_Decision_Node* as_decision() const;
    const Linear_Expression& parametric_values(Variable) const &;
    
    VERIFICATION_CRITERIA:

    Evaluate every decision coordinate against bounded lexicographic enumeration, including interleaved parameters, lazy/repeated access and invalid variable requests.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/zerofaces1.cc.

  • PPL-SPEC-001504
    9. Parametric decision nodes and branches UID: PPL-SPEC-001504 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A decision node shall return itself from as_decision and null from as_solution. child_node(true) and child_node(false) shall expose the respective borrowed subtree, with null denoting an absent branch. A valid decision shall have a true child. A decision with a false child shall have exactly one local guard. The mutable accessor shall expose the same node as the const accessor; callers shall preserve the owner's structure, backlinks and coordinate meaning when mutating an independently owned tree.

    Borrowing a child pointer shall require an lvalue decision node.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A false branch complements one predicate, whereas a missing false branch leaves the excluded context infeasible.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    const PIP_Decision_Node* as_decision() const;
    const PIP_Solution_Node* as_solution() const;
    const PIP_Tree_Node* child_node(bool) const &;
    PIP_Tree_Node* child_node(bool) &;
    
    VERIFICATION_CRITERIA:

    Traverse nested true and false decisions, missing branches and guarded leaves, compare const/mutable access and verify parent/owner associations after reload.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/pipproblem1.cc.

  • PPL-SPEC-001505
    10. Parametric tree diagnostics, display and memory UID: PPL-SPEC-001505 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK shall check local guard, tableau/vector and decision-structure invariants and recursively check owned children. Invalid mapping indices shall be rejected before indexing the corresponding vector. These checks shall not prove lexicographic optimality. Printing shall show the subtree's guards, artificial parameters and decision-coordinate formulas under its compatible live owner, with nonnegative indentation. Stream insertion shall return its stream. Memory estimates shall include local storage and owned descendants; total shall add the concrete object's own size.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Structural diagnostics must not themselves dereference a malformed index, and tree accounting must include descendant ownership.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Tree_Node or the concrete type named below.

    virtual bool OK() const = 0;
    void print(std::ostream&, int indent=0) const;
    virtual memory_size_type external_memory_in_bytes() const = 0;
    virtual memory_size_type total_memory_in_bytes() const = 0;
    std::ostream& IO_Operators::operator<<(std::ostream&, const PIP_Tree_Node&);
    
    VERIFICATION_CRITERIA:

    Check leaf and deep-decision storage relationships, stream identity, every owner and safe rejection of malformed vector mappings.

    SOURCE:

    src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; tests/PIP_Problem/ascii_dump_load1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc.

  • PPL-SPEC-001483
    1. Parametric integer problem meaning UID: PPL-SPEC-001483 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A problem shall interpret every coordinate as a nonnegative integer. Selected parameter coordinates shall be fixed by a parameter assignment; remaining coordinates shall be decision variables ordered by increasing original index. Constraints mentioning only parameters shall restrict the initial context. For every assignment in the scope defined by 🔗 1. Parametric problem and context interpretation, a completed solver result shall describe the lexicographically least feasible decision tuple or its absence. A designated big parameter shall follow 🔗 4. Parametric big-parameter designation. A strict integer inequality shall use the strict comparison on integer values.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Lexicographic nonnegative integer optimization differs from arbitrary real-valued linear optimization.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    class PIP_Problem;
    enum PIP_Problem_Status { UNFEASIBLE_PIP_PROBLEM, OPTIMIZED_PIP_PROBLEM };
    
    VERIFICATION_CRITERIA:

    Enumerate bounded parameter and variable tuples using literal scalar constraints and lexicographic comparison, including strict inequalities and interleaved parameters.

    BIBLIOGRAPHY:

    Feautrier88 | Whole work; journal background on exact parametric lexicographic integer programming.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/zerofaces1.cc.

  • PPL-SPEC-001484
    2. Parametric integer construction and dimensions UID: PPL-SPEC-001484 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a dimension shall create an unconstrained problem with no parameters and the all-zero decision tuple as optimum. Default dimension shall be zero. Range construction shall copy the constraints in its valid half-open input range and interpret p_vars as parameter indices.

    The common iterator type shall satisfy Constraint_Input_Iterator: it shall support implicit copying of a traversal lvalue, prefix increment, a boolean inequality test, and a dereferenced result implicitly convertible to const Constraint&. C++20 inputs with distinct sentinel types or value/proxy results can use std::common_iterator when its standard copyability requirements are met. The adapter shall preserve single-pass traversal and caller-owned rows; the constructed problem shall own its acquired constraints.

    An ambient extent above the supported maximum shall raise std::length_error; incompatible constraint or parameter dimensions shall raise std::invalid_argument. Failed construction shall release owned storage. Dimension queries shall report the current and maximum extents.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    Parameter selection and implicit nonnegativity must be fixed before interpreting a symbolic solution.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    explicit PIP_Problem(dimension_type dim=0);
    template<class In>
      requires Constraint_Input_Iterator<In>
    PIP_Problem(dimension_type dim, In first, In last, const Variables_Set& p_vars);
    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check constrained overload admission and standard common-iterator adapters for non-common sentinels, single-pass reference/value/proxy inputs, source independence, failed acquisition and allocation failure followed by retry. Check empty/no-parameter/all-parameter problems, source independence, strict constraints, incompatible inputs, extent limits and construction failures. Exercise true single-pass ranges without preliminary traversal, sized ranges whose declared count exceeds pending-vector capacity, and invalid rows after a valid prefix. Verify one row evaluation per copy and prompt failure without accessing the remainder of an invalid range.

    SOURCE:

    src/Constraint_types.hh; tests/constraintinput1.cc; src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/exceptions1.cc; tests/PIP_Problem/pipproblem1.cc. tests/PIP_Problem/bulkconstraints1.cc; tests/PIP_Problem/bulkparser1.cc.

  • PPL-SPEC-001485
    3. Parametric integer copying, exchange and reset UID: PPL-SPEC-001485 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copying and assignment shall preserve the problem, controls, designated big parameter and solution meaning while permitting independent later changes. Copied tree nodes shall be owned by the new problem. Assignment shall return the receiver and support self-assignment. Exchange shall transfer problem and tree state and update every transferred node's owner; self-exchange shall preserve the value. It shall not copy or allocate tree nodes, but shall visit the transferred trees to restore ownership. Reset shall create the zero-dimensional trivial problem with default controls and no big parameter. Destruction shall release its solution tree and other owned storage.

    The initialization, arithmetic, ownership and exceptional-completion conditions in 🔗 1. Optimization and ranking valid use shall apply.

    RATIONALE:

    A solution node depends on the owning problem for original dimensions and parameter interpretation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of PIP_Problem or the concrete type named below.

    PIP_Problem(const PIP_Problem&); ~PIP_Problem();
    PIP_Problem& operator=(const PIP_Problem&);
    void m_swap(PIP_Problem&); void clear();
    void swap(PIP_Problem&, PIP_Problem&);
    
    VERIFICATION_CRITERIA:

    Copy, assign, self-assign and exchange unsolved/infeasible/solved problems with unlike parameters; verify every owner, independent refinements and lifetime after source destruction.

    SOURCE:

    src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; tests/PIP_Problem/contextrefinement1.cc; tests/PIP_Problem/persistenceadmission1.cc; tests/PIP_Problem/pipproblem1.cc; tests/PIP_Problem/pipproblem3.cc.

  • PPL-SPEC-001413
    1. Lifted powerset image UID: PPL-SPEC-001413 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_image shall lift the corresponding base image to every disjunct. Its mathematical target shall be the set of allowed successors of states in the old receiver; the new coordinate shall equal e ⁄ d. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void affine_image(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001414
    2. Lifted powerset preimage UID: PPL-SPEC-001414 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_preimage shall lift the corresponding base preimage to every disjunct. Its mathematical target shall be the set of source states having an allowed successor in the old receiver; the new coordinate shall equal e ⁄ d. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void affine_preimage(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001415
    3. Lifted powerset generalized image UID: PPL-SPEC-001415 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_image shall lift the corresponding base generalized image to every disjunct. Its mathematical target shall be the set of allowed successors of states in the old receiver; v in the result shall satisfy v ⋈ e ⁄ d relative to the unchanged coordinates. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void generalized_affine_image(Variable, Relation_Symbol, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001416
    4. Lifted powerset generalized preimage UID: PPL-SPEC-001416 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_preimage shall lift the corresponding base generalized preimage to every disjunct. Its mathematical target shall be the set of source states having an allowed successor in the old receiver; v in the result shall satisfy v ⋈ e ⁄ d relative to the unchanged coordinates. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void generalized_affine_preimage(Variable, Relation_Symbol, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001417
    5. Lifted powerset bounded image UID: PPL-SPEC-001417 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_image shall lift the corresponding base bounded image to every disjunct. Its mathematical target shall be the set of allowed successors of states in the old receiver; the new coordinate shall satisfy ℓ ⁄ d ≤ v ≤ u ⁄ d using the written rational bounds. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void bounded_affine_image(Variable, const Linear_Expression&, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001418
    6. Lifted powerset bounded preimage UID: PPL-SPEC-001418 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_preimage shall lift the corresponding base bounded preimage to every disjunct. Its mathematical target shall be the set of source states having an allowed successor in the old receiver; the new coordinate shall satisfy ℓ ⁄ d ≤ v ≤ u ⁄ d using the written rational bounds. Other coordinates shall be retained as defined by the base relation. The union shall inherit the base transfer's soundness and exactness.

    Every disjunct shall use the same nonzero denominator value supplied at entry, even when it is borrowed from a receiver constraint, generator, divisor or inhomogeneous term that mutation later changes or invalidates. Capturing that entry value shall not depend on disjunct count. The base operation's dimension, relation-symbol and topology admission shall apply; invalid arguments shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The transfer distributes over union only when every disjunct uses the same entry relation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void bounded_affine_preimage(Variable, const Linear_Expression&, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent per-disjunct calculations; cover borrowed constraint/generator scalars, one/many disjuncts, positive/negative denominators, empty states and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineborrow1.cc; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001419
    7. Lifted expression-to-expression affine relations UID: PPL-SPEC-001419 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expression overloads shall lift the base relation ℓ’ ⋈ r to every disjunct, modifying the coordinates present in the left expression according to the base generalized-affine contract. Image shall collect allowed successors; preimage shall collect source states with an allowed successor in the old receiver. Shared left/right variables shall retain their before/after interpretation. Dimension, relation and topology admission shall follow the base member, with std::invalid_argument for invalid inputs.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Generalized relations distinguish new left-hand coordinates from old right-hand coordinates even when variable names overlap.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void generalized_affine_image(const Linear_Expression&, Relation_Symbol, const Linear_Expression&);
    void generalized_affine_preimage(const Linear_Expression&, Relation_Symbol, const Linear_Expression&);
    
    VERIFICATION_CRITERIA:

    Check overlapping/disjoint variable supports, constant left expressions, strict and equality relations and base rejection.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affineimage1.cc; tests/Powerset/affinepreimage1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001426
    1. Exact pairwise powerset reduction UID: PPL-SPEC-001426 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Pairwise reduction shall first remove entailment redundancies, then repeatedly merge pairs for which the base upper_bound_assign_if_exact certifies exact union. The represented union shall be preserved, and no pair remaining at termination shall admit a further certified exact merge. It shall not promise a globally minimum disjunct count or an insertion-order-independent geometric decomposition.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Exact pair merging can reduce decomposition beyond containment without filling gaps.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void pairwise_reduce();
    
    VERIFICATION_CRITERIA:

    Check adjacent and separated intervals, repeated merging chains, duplicate/bottom members and order variations.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 8, Definition 18 (mergers and pairwise merging).

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/contractvalues1.cc; tests/Powerset/reduce1.cc.

  • PPL-SPEC-001427
    2. BGP99 powerset extrapolation UID: PPL-SPEC-001427 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The receiver shall be the current iterate and y the previous iterate, with y.definitely_entails(*this) true in a common ambient space. The base function shall widen a containing first argument relative to its contained second argument and produce an upper bound. The method shall pairwise-reduce, optionally collapse when max_disjuncts != 0, then lift the base extrapolation over covered pairs while retaining uncovered current disjuncts. The result shall contain both input unions. Zero shall disable the collapse cap. The cap shall apply to the pre-extrapolation collection and shall not promise the same final count. This method alone shall not promise finite stabilization of arbitrary iteration sequences.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A lifted base widening and a cardinality heuristic do not by themselves establish powerset convergence.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    template <typename Widening>
    void BGP99_extrapolation_assign(const Pointset_Powerset&, Widening,
                                    unsigned max_disjuncts);
    
    VERIFICATION_CRITERIA:

    Check upper bounds, coverage preconditions, cap enabled/disabled and sequences where heuristic lifting is not a widening.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 4, Definition 7, Proposition 1 and Examples 2–3 (lifting heuristics and nonconvergence). BagnaraHZ06STTTerratum | whole erratum (corrected article figures).

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/BD_Shape/bgp99extrapolation1.cc; tests/Box/bgp99extrapolation1.cc; tests/Polyhedron/bgp99extrapolation1.cc; tests/Polyhedron/bgp99extrapolation2.cc; tests/Powerset/powerset1.cc.

  • PPL-SPEC-001428
    3. Certificate-based powerset widening UID: PPL-SPEC-001428 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The receiver shall contain the previous iterate y in powerset entailment order, in the same ambient dimension. widen_fun shall be a sound base widening with a compatible finite convergence certificate Cert. Certificate construction, comparison, predicate ordering, hulls, subtraction and exact pair merging shall satisfy the cited certificate-based widening hypotheses. Under these conditions, the method shall give an upper bound and finite stabilization for the prescribed ascending iteration history.

    It shall prefer certified hull growth, then certified multiset decrease, then compatible lifted extrapolation and exact pair merging; if these cannot certify progress, it shall enlarge using base widening/subtraction or fall back to a singleton hull. An empty previous iterate shall leave the receiver unchanged. A certificate valid for one base widening or topology shall not qualify another combination without establishing those hypotheses.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Well-founded certificate progress supplies the convergence argument missing from heuristic pair lifting.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    template <typename Cert, typename Widening>
    void BHZ03_widening_assign(const Pointset_Powerset&, Widening);
    
    VERIFICATION_CRITERIA:

    Check upper-bound inclusion and each selection/fallback path with compatible closed-polyhedron certificates; review certificate and history hypotheses separately from finite test runs.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 7, Definitions 14–16 and Theorem 3; Section 8, Definition 18 (certificate-based widening and merging). BagnaraHZ06STTTerratum | whole erratum (corrected article figures).

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/BD_Shape/bhz03widening1.cc; tests/Box/bhz03widening1.cc; tests/Grid/bhz03widening1.cc; tests/Octagonal_Shape/bhz03widening1.cc; tests/Polyhedron/bhz03widening1.cc; tests/Powerset/powerset1.cc.

  • PPL-SPEC-001420
    1. Pointset-powerset coordinate growth UID: PPL-SPEC-001420 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Embedding shall extend each disjunct with m unconstrained trailing coordinates, denoting S×Rm. Projecting growth shall extend with m zero coordinates, denoting S×{0}m. Empty shall retain empty meaning and acquire the new ambient dimension. Zero growth shall preserve the value. Growth exceeding the structural dimension limit shall throw std::length_error before extent-proportional allocation or dimension arithmetic overflow.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Even an empty collection has an ambient dimension which must be updated and range-checked.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void add_space_dimensions_and_embed(dimension_type);
    void add_space_dimensions_and_project(dimension_type);
    
    VERIFICATION_CRITERIA:

    Check free versus zero added coordinates, empty collections, zero growth and reserved/overflowing extents.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/spacedims1.cc.

  • PPL-SPEC-001421
    2. Pointset-powerset projection and coordinate mapping UID: PPL-SPEC-001421 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Removal shall existentially project out the selected coordinates of every disjunct and compact remaining indices in order. Higher removal shall retain exactly the requested prefix. Mapping shall use an injective partial map with in-range source dimensions and compact destination range, retaining mapped coordinates and existentially eliminating the others. Empty map shall produce dimension zero. Empty collections shall still acquire the correct result dimension. Invalid removal extents shall throw std::invalid_argument; mapping shall meet 🔗 1. Public partial coordinate-map type and valid use– 🔗 8. Coordinate-map diagnostic printing and output failures and the base map's stated preconditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Projection is not setting removed coordinates to zero, and dimension bookkeeping cannot depend on stored nonempty disjuncts.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void remove_space_dimensions(const Variables_Set&);
    void remove_higher_space_dimensions(dimension_type);
    template <typename Partial_Function> void map_space_dimensions(const Partial_Function&);
    
    VERIFICATION_CRITERIA:

    Check sparse projection, permutation/partial/empty maps, fractional witnesses, empty collections and invalid extents.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/spacedims1.cc.

  • PPL-SPEC-001422
    3. Pointset-powerset dimension expansion and folding UID: PPL-SPEC-001422 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expansion shall add m independent copies of the selected coordinate's base-domain restrictions using the base expansion operation. Folding shall merge selected coordinates into the retained destination by base folding and remove the folded coordinates. They shall lift per disjunct, update ambient dimension and inherit base soundness and precision. Variables shall be in range, fold destination shall be outside the folded set, and growth shall respect structural limits; invalid variables/sets shall throw std::invalid_argument and excessive growth std::length_error.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Independent expansion differs from imposing equality between duplicate coordinates; folding may approximate unions of projections.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void expand_space_dimension(Variable, dimension_type);
    void fold_space_dimensions(const Variables_Set&, Variable);
    
    VERIFICATION_CRITERIA:

    Check relational expansion, independent duplicate values, folding with retained indices, empty sets and invalid dimensions. Fold previously reduced incomparable disjuncts into identical universes, and compare the public universe result with an unreduced-entry control in closed/NNC polyhedra, bounded-difference, octagonal and rational-box powersets.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/spacedims1.cc.

  • PPL-SPEC-001423
    4. Pointset-powerset concatenation UID: PPL-SPEC-001423 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Concatenation shall collect base concatenations for every pair of reduced disjuncts in receiver-then-argument coordinate order, representing S×T when base concatenation is exact and otherwise its sound base approximation. Empty input shall give empty in the sum dimension. Self-concatenation shall be supported. The sum dimension shall be range-checked without unsigned wraparound; excessive extent shall throw std::length_error.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Cartesian product distributes over both input unions and includes ambient dimensions of empty inputs.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void concatenate_assign(const Pointset_Powerset&);
    
    VERIFICATION_CRITERIA:

    Check cross-pair products, coordinate order, empty/self inputs and overflowing sums.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/cancellation1.cc; tests/powersetinterruptedproducts1.cc; tests/Powerset/concatenate1.cc.

  • PPL-SPEC-001407
    1. Lifted constraint addition and refinement UID: PPL-SPEC-001407 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint addition and refinement shall apply the corresponding base operation to every disjunct, retaining union semantics and marking reduction unknown. Exact addition shall intersect each disjunct with the admitted constraint conjunction. Refinement shall preserve every point satisfying the input conjunction and satisfy the base precision guarantee, possibly ignoring unsupported restrictions. Topology and dimension rejection shall follow the base operation, including std::invalid_argument for incompatible inputs.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Intersection with a conjunction distributes over disjunction, while refinement may approximate at base level.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void add_constraint(const Constraint&); void add_constraints(const Constraint_System&);
    void refine_with_constraint(const Constraint&);
    void refine_with_constraints(const Constraint_System&);
    
    VERIFICATION_CRITERIA:

    Check strict boundaries, equalities, contradictions, unsupported base rows, empty/nonempty collections and invalid arguments.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/addconstraints1.cc; tests/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/refinewith1.cc.

  • PPL-SPEC-001408
    2. Lifted congruence addition and refinement UID: PPL-SPEC-001408 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Congruence addition and refinement shall apply the corresponding base operation to every disjunct, preserving union semantics and marking reduction unknown. Exact addition shall intersect with the admitted congruence conjunction; refinement shall be sound with the base precision guarantee. Proper modular restrictions shall not be converted into affine equalities. Dimension or unsupported exact-addition admission shall follow the base exception contract.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Congruences represent residue classes, so interpreting a proper congruence as equality would discard valid points.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void add_congruence(const Congruence&); void add_congruences(const Congruence_System&);
    void refine_with_congruence(const Congruence&);
    void refine_with_congruences(const Congruence_System&);
    
    VERIFICATION_CRITERIA:

    Check residue classes, equality congruences, contradictory/tautological rows, approximate refinement and dimensional errors.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/addcongruences1.cc; tests/Powerset/argumentadmission1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/refinewith1.cc.

  • PPL-SPEC-001409
    3. Lifted cylindrification UID: PPL-SPEC-001409 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    unconstrain shall cylindrify each disjunct in the selected coordinates while retaining ambient dimension and mark reduction unknown. The resulting union shall have the base operation's exactness and arithmetic guarantees. An empty variable set shall preserve the value. Out-of-range variables shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Existential projection followed by unconstrained embedding distributes over finite unions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void unconstrain(Variable);
    void unconstrain(const Variables_Set&);
    
    VERIFICATION_CRITERIA:

    Check relational disjuncts, scalar/set overload agreement, empty variable sets and invalid dimensions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/contractvalues1.cc; tests/Powerset/gridprimaryoperations1.cc; tests/Powerset/spacedims1.cc.

  • PPL-SPEC-001410
    4. Lifted pointset-powerset intersection UID: PPL-SPEC-001410 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Intersection shall collect all pairwise base intersections of the reduced operands, discarding bottom results. It shall represent exact union intersection when the base intersection is exact and otherwise inherit its soundness and precision. Self-intersection shall be supported. Operands shall have the same ambient dimension; mismatch shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Every point in the intersection belongs to a pair of input disjuncts.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void intersection_assign(const Pointset_Powerset&);
    
    VERIFICATION_CRITERIA:

    Check cross-pair rather than positional overlap, empty operands, self-intersection and mismatched dimensions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/intersection1.cc.

  • PPL-SPEC-001411
    5. Pointset-powerset set difference UID: PPL-SPEC-001411 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Difference shall subtract each subtrahend disjunct successively. For NNC polyhedra, exact polyhedral partitions shall represent exact set difference, including excluded boundaries. Other supported convex bases shall convert through NNC partitions and inherit conversion precision. Grid subtraction shall return exact finite-coset residues when representable and otherwise a sound finite overapproximation. Empty subtraction shall preserve the minuend; self-subtraction shall give empty. Ambient dimensions shall agree or std::invalid_argument shall be thrown.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Finite disjunction can preserve nonconvex residues that a single convex base element cannot represent.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void difference_assign(const Pointset_Powerset&);
    
    VERIFICATION_CRITERIA:

    Check interior holes, boundary subtraction, multiple subtrahends, grid finite/infinite residue cases and self-subtraction.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/difference1.cc; tests/Powerset/gridpartition1.cc.

  • PPL-SPEC-001412
    6. Meet-preserving powerset context simplification UID: PPL-SPEC-001412 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Context simplification shall preserve the represented intersection with y and leave no more disjuncts than the reduced original receiver. Disjuncts disjoint from the context may be removed; the result need not contain the original union outside that context. A false return shall establish empty intersection, while true need not establish nonemptiness for approximate base simplification. Empty receiver or context shall produce a false return. Dimension mismatch shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Preservation inside a context allows dropping irrelevant disjuncts and relaxing relevant ones.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool simplify_using_context_assign(const Pointset_Powerset&);
    
    VERIFICATION_CRITERIA:

    Check singleton and multiple contexts, empty intersections, cardinality, and independent before/after intersection equality. Include late overlaps after unchanged disjoint prefixes, accumulated simplifications reaching a fixed point, restoring source bounds needed by a later context, empty effective contexts, aliases, and preservation of distinct contexts. Inject allocation failures after a disjunct has been enlarged and check ownership and invalidation of stale reduction certificates. Include an unreduced original pair whose later disjunct strictly contains its predecessor, checking raw result size against the separately reduced original before any result query can canonicalize it.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/simplifyusingcontext1.cc; tests/powersetcontextfailure1.cc.

  • PPL-SPEC-001424
    7. Powerset topological closure and time elapse UID: PPL-SPEC-001424 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Topological closure shall close every disjunct; for a finite collection of exact base closures the result shall be the exact closure of the union. Time elapse shall collect all pairwise base time-elapse results, denoting the corresponding union of p + tv for admitted states, velocities and t ≥ 0, with the base precision contract. Empty state or velocity collections shall follow the base time-elapse semantics. Dimension-incompatible time operands shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Closure distributes over finite unions, while velocities require a cross-product lifting.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void topological_closure_assign();
    void time_elapse_assign(const Pointset_Powerset&);
    
    VERIFICATION_CRITERIA:

    Check open boundary closure, zero/nonzero velocities, separated disjunct pairs, empty inputs and base approximation. Close an initially reduced antichain whose new boundary makes a disjunct redundant, then request omega-reduction and compare the remaining geometry. Exercise NNC polyhedra and open rational boxes, shared-source preservation, empty and zero-dimensional collections, and exact identity closure for closed polyhedra, grids, BD/octagonal shapes and interval boxes without openness.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/closure1.cc.

  • PPL-SPEC-001425
    8. Powerset integer restriction and wrapping UID: PPL-SPEC-001425 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Integer restriction shall apply the selected base tightening to each disjunct, preserve all points integral in the selected coordinates and retain a subset of the old union; no optimality shall be promised. Wrapping shall apply the base bounded-integer conversion to every disjunct with the supplied width, representation, overflow mode, optional constraints and precision controls. It shall inherit 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes and base wrapping semantics, including sound overflow behavior and variable/constraint admission. Reduction shall become unknown after either operation.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Disjunction must retain all selected integral states and all admitted wrapped outcomes.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void drop_some_non_integer_points(Complexity_Class=ANY_COMPLEXITY);
    void drop_some_non_integer_points(const Variables_Set&, Complexity_Class=ANY_COMPLEXITY);
    void wrap_assign(const Variables_Set&, Bounded_Integer_Type_Width,
                     Bounded_Integer_Type_Representation, Bounded_Integer_Type_Overflow,
                     const Constraint_System* = nullptr, unsigned=16, bool=true);
    
    VERIFICATION_CRITERIA:

    Check fractional disjuncts, selected versus all coordinates and small-width modular/undefined/impossible overflow controls.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/contractvalues1.cc; tests/Powerset/gridprimaryoperations1.cc.

  • PPL-SPEC-001399
    1. Pointset-powerset empty and universe queries UID: PPL-SPEC-001399 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_empty shall return true exactly when every stored disjunct is empty, including the empty collection. is_universe shall return true exactly when a stored disjunct denotes universe; it may remove other disjuncts when such a disjunct is found. A union that covers the whole ambient space without a universe disjunct need not make this structural universe query true; geometric coverage shall be used for that semantic comparison.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A structural top test is cheaper than deciding whether several proper disjuncts jointly cover universe.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool is_empty() const;
    bool is_universe() const;
    
    VERIFICATION_CRITERIA:

    Check empty and redundant collections, a universe disjunct and two complementary half-spaces without a universe disjunct.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/empty1.cc; tests/Powerset/universe1.cc.

  • PPL-SPEC-001400
    2. Affine dimension of a pointset powerset UID: PPL-SPEC-001400 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_dimension shall return the affine dimension of the smallest affine space containing the union, using the affine hull of each nonempty disjunct. Empty shall have affine dimension zero. Distinct zero-dimensional disjuncts may jointly have positive affine dimension. Base minimized equality constraints shall describe each disjunct's affine hull for this calculation.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Taking the maximum of disjunct dimensions would miss dimensions introduced by distinct affine offsets.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check separated points, parallel affine subspaces, empty disjuncts and full dimension.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/affinedimension1.cc.

  • PPL-SPEC-001401
    3. Pointset-powerset structural shape queries UID: PPL-SPEC-001401 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Boundedness and discreteness shall hold exactly when they hold for all stored disjuncts. contains_integer_point shall hold when some disjunct contains one. is_topologically_closed shall reduce and report whether all remaining disjuncts are closed; false may be conservative when several nonclosed disjuncts jointly form a closed union. constrains(v) shall validate the variable, reduce, and report true for empty or when some remaining disjunct constrains v. It may conservatively report true for a union that is cylindrically unconstrained. Invalid v shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Finite unions preserve boundedness and discreteness, but closure and coordinate independence can emerge from a combined decomposition.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool is_bounded() const; bool is_discrete() const;
    bool is_topologically_closed() const;
    bool constrains(Variable) const;
    bool contains_integer_point() const;
    
    VERIFICATION_CRITERIA:

    Check finite separated points, unbounded members, open pieces covering a closed set, fractional grids and invalid variables.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/bounded1.cc; tests/Powerset/closed1.cc; tests/Powerset/containsintegerpoint1.cc; tests/Powerset/discrete1.cc.

  • PPL-SPEC-001402
    4. Pointset-powerset structural set relations UID: PPL-SPEC-001402 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    contains(y) shall return true exactly when each stored y disjunct is contained in some receiver disjunct. strictly_contains(y) shall first reduce the receiver, then require each stored y disjunct to be strictly contained in some remaining receiver disjunct. The latter universal condition is true for an empty stored y collection, including an empty receiver. Neither result shall be substituted for strict geometric containment of represented unions. Dimension-incompatible operands shall throw std::invalid_argument.

    is_disjoint_from(y) shall apply the selected base domain's disjointness predicate to each pair of retained receiver and source disjuncts. It shall return true exactly when every pair reports disjointness. For a base satisfying an exact disjointness contract, this shall decide whether the two represented unions have empty intersection, independently of their decomposition. An empty stored collection shall be disjoint from every dimension-compatible powerset. Stored bottom disjuncts and self-aliasing shall retain the base predicate's meaning. The query shall preserve the stored collections and represented values; logically const component queries may update their permitted caches. Incompatible ambient dimensions shall throw std::invalid_argument before pair visitation, including when both collections are empty.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Containment uses disjunctwise matching and its stated strictness condition. Disjointness is the conjunction of base-domain disjointness over all pairs; it does not require the union-coverage algorithm used for geometric inclusion.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool contains(const Pointset_Powerset&) const;
    bool strictly_contains(const Pointset_Powerset&) const;
    bool is_disjoint_from(const Pointset_Powerset&) const;
    
    VERIFICATION_CRITERIA:

    Check split coverage, proper per-disjunct inclusion, equal decompositions, empty collections and dimension rejection. Check symmetric zero/positive- dimensional disjointness, strict endpoint contacts, one intersecting pair, self queries, retained empty components and rejected mismatched dimensions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/contains1.cc; tests/Powerset/disjoint1.cc; tests/Powerset/argumentadmission1.cc.

  • PPL-SPEC-001403
    5. Geometric powerset coverage and equality UID: PPL-SPEC-001403 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    geometrically_covers(y) shall decide whether the receiver union contains the y union. geometrically_equals shall decide mutual geometric coverage, independently of decomposition or redundant storage. check_containment(p,ps) shall decide whether the union ps contains p. NNC polyhedra shall use exact polyhedral partitioning; supported convex base domains shall use exact conversion to NNC polyhedra. Grids shall use their specialized finite-coset coverage procedure. Arithmetic preconditions shall hold throughout all partitions. Ambient dimensions shall agree; incompatible operands shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A single target disjunct may be covered by several source disjuncts without any one covering it.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool geometrically_covers(const Pointset_Powerset&) const;
    bool geometrically_equals(const Pointset_Powerset&) const;
    bool check_containment(const NNC_Polyhedron&, const Pointset_Powerset<NNC_Polyhedron>&);
    bool check_containment(const Grid&, const Pointset_Powerset<Grid>&);
    template <typename PSET>
    bool check_containment(const PSET&, const Pointset_Powerset<PSET>&);
    
    VERIFICATION_CRITERIA:

    Check split and overlapping decompositions, holes and excluded boundaries, residue-class unions and invalid dimensions.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 3 (union concretization and semantic equivalence).

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/contains1.cc; tests/Powerset/equals1.cc; tests/Powerset/gridpartition1.cc.

  • PPL-SPEC-001404
    6. Pointset-powerset directional bound tests UID: PPL-SPEC-001404 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Directional bound tests shall reduce, then return true exactly when every remaining disjunct bounds the expression in that direction. Empty shall be bounded in either direction. For nonempty collections, the expression's ambient dimension shall be admitted by every disjunct; invalid dimensions shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A finite union has a finite directional bound exactly when every nonempty member has one.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool bounds_from_above(const Linear_Expression&) const;
    bool bounds_from_below(const Linear_Expression&) const;
    
    VERIFICATION_CRITERIA:

    Check all-bounded, one-unbounded, empty and single-direction cases with fractional expressions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/bounds1.cc.

  • PPL-SPEC-001405
    7. Pointset-powerset extrema and witnesses UID: PPL-SPEC-001405 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Maximization and minimization shall fail for empty or directionally unbounded unions, leaving all outputs unchanged on a false return. Otherwise they shall return the greatest disjunct supremum or least disjunct infimum as an exact rational with positive denominator. The attainment flag shall be true when at least one disjunct attaining the selected bound includes its optimum. A witness overload shall select an included point when the union attains the bound and otherwise a closure point of a contributing disjunct. The witness shall attain the returned bound in the corresponding union or its closure. Expression dimension admission and arithmetic shall follow the base extrema members; independently writable output objects shall be required.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Taking an extremum over a finite union requires selecting across all disjuncts, including attainment ties.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    
    VERIFICATION_CRITERIA:

    Check separated bounds, rational ties with both attainment flags, witnesses, empty/unbounded failure sentinels and output independence.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/maxmin1.cc.

  • PPL-SPEC-001406
    8. Pointset-powerset descriptor relations UID: PPL-SPEC-001406 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint and congruence relations shall combine disjunct relations: inclusion, disjointness and saturation shall each require that flag from every disjunct. Strict intersection shall be reported when a disjunct strictly intersects or when nonempty included and disjoint disjuncts occur. Empty disjuncts shall not supply a strict-intersection witness. Generator subsumption shall be reported when at least one disjunct subsumes it, using base generator semantics. Empty collections shall give the vacuous inclusion, disjointness and saturation flags and no generator subsumption. Invalid descriptor dimensions shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Relations over a union aggregate universal set properties and existential witnesses differently.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    Poly_Con_Relation relation_with(const Constraint&) const;
    Poly_Con_Relation relation_with(const Congruence&) const;
    Poly_Gen_Relation relation_with(const Generator&) const;
    
    VERIFICATION_CRITERIA:

    Check each relation flag, mixed included/disjoint disjuncts, redundant empties, points/directions and dimension rejection.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/relationwith1.cc.

  • PPL-SPEC-001392
    1. Dimensioned pointset-powerset construction UID: PPL-SPEC-001392 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from n and kind shall create empty or universe in dimension n. Default shall be the zero-dimensional universe. Empty shall retain its ambient dimension with no disjuncts; universe shall contain a base universe disjunct. max_space_dimension shall report the base structural limit. Requests above that limit or using a reserved dimension shall throw std::length_error before extent-proportional storage. The limit shall not promise allocation success for every admitted dimension.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The ambient space is part of an empty value and remains subject to the same structural limits.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    explicit Pointset_Powerset(dimension_type n=0, Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check both kinds in zero/positive dimensions, defaults and oversized/reserved dimensions without large allocation.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/fromspacedimension1.cc.

  • PPL-SPEC-001393
    2. Pointset-powerset copying, assignment and exchange UID: PPL-SPEC-001393 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Same-type copying and assignment shall preserve dimension and represented union, including stored decomposition and reduction state, while permitting independent later mutations through copy-on-write disjuncts. Assignment shall return its receiver and support self-assignment. m_swap and swap shall exchange dimension and collection together. The same-type copy complexity argument shall not change exactness. Implicit destruction shall release all owned disjuncts and collection storage.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Exchanging only disjunct storage would separate the collection from its ambient dimension.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    Pointset_Powerset(const Pointset_Powerset&, Complexity_Class=ANY_COMPLEXITY);
    Pointset_Powerset& operator=(const Pointset_Powerset&);
    void m_swap(Pointset_Powerset&);
    template <typename PSET> void swap(Pointset_Powerset<PSET>&, Pointset_Powerset<PSET>&);
    
    VERIFICATION_CRITERIA:

    Check later independent mutation, self-assignment/exchange, unlike dimensions and destruction of a shared owner.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/disjunct1.cc; tests/Powerset/powerset1.cc; tests/powersetlatticehistories1.cc.

  • PPL-SPEC-001394
    3. Pointset-powerset construction from descriptor systems UID: PPL-SPEC-001394 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from constraints or congruences shall create the corresponding base-domain value as a singleton disjunct and inherit the system dimension. Source values shall remain unchanged. Admission, arithmetic, topology and exactness shall follow the base constructor; redundant or empty singleton storage may remain until reduction.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The singleton construction must preserve base constructor semantics without introducing a hull over unrelated inputs.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    explicit Pointset_Powerset(const Constraint_System&);
    explicit Pointset_Powerset(const Congruence_System&);
    
    VERIFICATION_CRITERIA:

    Check tautological, contradictory and dimensioned systems, strict boundaries and base rejection conditions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/fromcongruences1.cc; tests/Powerset/fromconstraints1.cc.

  • PPL-SPEC-001395
    4. Pointset-powerset construction from a simple domain UID: PPL-SPEC-001395 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a simple domain shall preserve ambient dimension and contain its represented set. A nonempty source shall be converted using the base constructor with its applicable complexity contract and stored as a singleton. Known-empty sources may yield an empty collection. Conversion shall be exact when the destination base conversion is exact; unsupported discrete or relational information may be lost. External source values shall remain unchanged.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Converting a single pointset does not require disjunctive approximation beyond its base conversion.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    explicit Pointset_Powerset(const C_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    explicit Pointset_Powerset(const NNC_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    explicit Pointset_Powerset(const Grid&, Complexity_Class=ANY_COMPLEXITY);
    template <typename T> explicit Pointset_Powerset(const BD_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename T> explicit Pointset_Powerset(const Octagonal_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename Interval> explicit Pointset_Powerset(const Box<Interval>&, Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check each source family, empty/universe, fractional/open boundaries, exact conversions and deliberate information loss.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/frombdshape1.cc; tests/Powerset/frombox1.cc; tests/Powerset/fromgrid1.cc; tests/Powerset/fromoctagonalshape1.cc; tests/Powerset/frompolyhedron1.cc.

  • PPL-SPEC-001396
    5. Cross-base powerset conversion and assignment UID: PPL-SPEC-001396 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Cross-base construction shall convert each stored source disjunct with the destination base conversion and preserve ambient dimension. The resulting union shall contain the source union and be exact when every base conversion is exact. Assignment shall have the same conversion result and return its receiver. Destination reduction state shall be recomputed when conversion can make previously incomparable disjuncts comparable; a proven exact conversion may retain source reduction state. Neither source decomposition nor reduced cardinality shall be a geometric canonical form.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Approximate conversion can collapse distinctions that justified source nonredundancy.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    template <typename QH>
    explicit Pointset_Powerset(const Pointset_Powerset<QH>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename QH>
    Pointset_Powerset& operator=(const Pointset_Powerset<QH>&);
    
    VERIFICATION_CRITERIA:

    Check closed/NNC conversions in both directions, grid-to-polyhedron loss, exact shape conversions and reduction after comparable images.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/argumentadmission1.cc; tests/Powerset/contractvalues1.cc; tests/Powerset/conversionreduction1.cc.

  • PPL-SPEC-001397
    6. Pointset-powerset construction from a product UID: PPL-SPEC-001397 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a product shall convert both reduced component views to the destination base and intersect them, storing the resulting base value as a disjunct unless a known-empty shortcut applies. It shall preserve ambient dimension and overapproximate the product intersection. Exactness shall hold when both conversions and their base intersection are exact.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A product represents conjunction, so conversion must intersect rather than choose or join its components.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    template <typename QH1, typename QH2, typename R>
    explicit Pointset_Powerset(const Partially_Reduced_Product<QH1,QH2,R>&,
                              Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Use products whose components contribute independent restrictions and compare the converted intersection; include known empty.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Partially_Reduced_Product/fromproduct1.cc; tests/Powerset/contractvalues1.cc.

  • PPL-SPEC-001398
    7. Insertion of pointset disjuncts UID: PPL-SPEC-001398 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_disjunct(p) shall add a value copy and represent union with p. It shall require exactly the receiver dimension and throw std::invalid_argument on a mismatch. Duplicates and empty disjuncts may remain stored until reduction; insertion shall mark reduction as unknown. Later mutation of the external source shall not alter the powerset.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Insertion is exact disjunction even when storage contains redundancies.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Pointset_Powerset unless qualified otherwise.

    void add_disjunct(const PSET&);
    
    VERIFICATION_CRITERIA:

    Check source independence, duplicate/empty insertion, arbitrary order and mismatched dimensions.

    SOURCE:

    src/Pointset_Powerset.cc; src/Pointset_Powerset_defs.hh; src/Pointset_Powerset_inlines.hh; src/Pointset_Powerset_templates.hh; src/Pointset_Powerset_types.hh; tests/Powerset/disjunct1.cc.

  • PPL-SPEC-001685
    1. Two-coordinate full-rank equality projection UID: PPL-SPEC-001685 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    try_binary_equality_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators, at least five ambient dimensions, at most 64 stored rows and a nonempty in-range selection. It shall reject bounded coefficient profiles and selections other than two. Let the selected coordinates in ascending order be x, y.

    Scan the logical input rows in order. Select the first equality with a nonzero x coefficient. For this row's selected coefficients a, b, scan subsequent equalities for coefficients c, d with ad − bc ≠ 0, using exact GMP arithmetic. Without such a later row, return false. This opportunistic scan need not find an earlier independent row preceding its selected first pivot.

    After this rank test, copy the owned rows and eliminate x with that pivot using 🔗 1. Exact equality-pivot elimination. Choose a remaining equality with nonzero y coefficient, preferring 1 or  − 1, and eliminate y with the same kernel. Such a second pivot shall exist. Compact the two coordinates, retaining the other coordinates' order, and swap in a completed same-topology polyhedron. True shall denote the exact projection 🔗 4. Exact polyhedral coordinate deletion, with no increase in logical row count.

    False shall preserve all receiver state and allocate no C++ storage. The determinant preflight may allocate GMP temporary storage. Exceptions shall obey 🔗 1. Polyhedral values, coefficient profile and valid use; rejection preservation shall not impose a stronger exceptional-completion guarantee.

    RATIONALE:

    A nonzero determinant makes the two equations uniquely determine the two selected coordinates for every retained assignment. Eliminating one coordinate leaves a nonzero coefficient for the other in an independent equation. Positive equality substitution preserves every weak or strict relation and yields the exact existential projection. Each pass removes one pivot, so no pair generation or row growth is needed.

    INTERFACE:

    Private member of Parma_Polyhedra_Library::Polyhedron.

    bool try_binary_equality_projection(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare literal and independently materialized generator projections through the public API. Cover both pivot signs, nonunit coefficients, independent and dependent cycles, row order, additional inequalities/equalities, strict boundaries, constants, absent columns and noncontiguous coordinates. Check exact rejection state and zero C++ allocation before copying. Exercise owned-row allocation failures, profile selection, cache histories and reload.

    BIBLIOGRAPHY:

    Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.

  • PPL-SPEC-001686
    2. Bounded coupled two-coordinate pair projection UID: PPL-SPEC-001686 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    try_binary_pair_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators, at least five ambient dimensions, at most 64 stored rows and a nonempty in-range selection. It shall reject bounded coefficient profiles, selections other than two, and any logical equality row. Let x, y be selected in ascending order.

    Preflight shall count positive, negative and zero x coefficients. Reject more than 16 positive/negative pairs or more than 64 predicted owned rows. Predict the signs in the next y column: unchanged zero-x rows retain their signs, and a pair ax > 0, bx < 0 has the sign of  − byxa + ayxb. These calculations shall use exact GMP arithmetic. Tautological combinations may be counted conservatively. Reject more than 16 predicted second-column pairs or 64 predicted owned rows. Both checks shall precede scratch-row copying. False shall preserve every receiver field and allocate no C++ storage; GMP preflight temporaries are permitted.

    For each selected coordinate, retain its zero-coefficient rows. For every pair ax + r▹0 and  − bx + s▹0, with a, b > 0 and g = gcd(a, b), emit the positive combination (b ⁄ g)r + (a ⁄ g)s. It shall be strict exactly when either input row is strict. Omit tautologies. The conservative preflight shall bound the actual pair and row counts in both passes. At most 32 pairs shall be generated; each scratch vector shall contain at most 64 logical rows.

    Compact the selected coordinates only after their coefficients are zero. True shall replace the receiver with the exact projection 🔗 4. Exact polyhedral coordinate deletion, preserving topology and surviving-coordinate order. Only a completed temporary polyhedron shall be swapped in. Common lifetime, arithmetic and exceptional-completion conditions 🔗 1. Polyhedral values, coefficient profile and valid use shall apply without strengthening them to the false-result guarantee.

    RATIONALE:

    Pairwise lower/upper compatibility is necessary and sufficient for a real coordinate to exist. A strict bound requires strict compatibility in its pair. Positive gcd-reduced combinations preserve these conditions exactly. Their remaining-column signs equal the preflight signs, since division by a positive gcd does not change a sign. Removing tautologies only decreases the predicted counts, proving the second pass's work bounds.

    INTERFACE:

    Private member of Parma_Polyhedra_Library::Polyhedron.

    bool try_binary_pair_projection(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare all open/closed input-pair combinations with literal projections and an independent generator route. Cover both signs, zero columns, gcd reduction, tautologies, constant false rows, coupled and noncontiguous coordinates, one-sided passes, exact pair/row limits and conservative rejection. Check unchanged rejection state, zero C++ allocation on rejected preflight and allocation failures after acceptance. Include both matrix layouts and every admitted coefficient profile, preserving the generator fallback elsewhere.

    BIBLIOGRAPHY:

    Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.

  • PPL-SPEC-001687
    3. Exact one-dimensional continuous LP projection UID: PPL-SPEC-001687 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    try_interval_projection(vars) shall require a valid unmarked receiver with current constraints, no pending generators and a nonempty in-range selection. It shall reject bounded coefficient profiles, ambient dimensions outside 10 through 16, selections leaving other than one coordinate, descriptions with fewer than twice the ambient dimension or more than 64 stored rows, and descriptions with any logical equality or strict inequality. These rejections shall preserve all receiver state and allocate no C++ storage. The dispatch in 🔗 2. Bounded exact coupled constraint projection shall invoke it only for necessarily closed receivers; its weak-row computation shall preserve the supplied receiver's topology.

    Find the sole surviving original coordinate and construct one continuous MIP_Problem from the original constraint system, with that coordinate as the minimization objective. Select PRICING_TEXTBOOK before solving, so pricing shall use coefficient arithmetic rather than floating-point weights. Do not designate integer coordinates or introduce auxiliary ones.

    An infeasible lower solve shall replace the receiver with a same-topology empty polyhedron of dimension one. Otherwise retain a finite exact lower value p ⁄ q as qv ≥ p, and omit an unbounded lower bound. Change the same model to maximization, reusing its feasible state and basis. Its result shall remain feasible. Retain a finite upper value r ⁄ s as sv ≤ r, and omit an unbounded upper bound. Denominators shall be positive. Both finite endpoints shall be included. The completed interval shall be the exact real projection 🔗 4. Exact polyhedral coordinate deletion.

    Only a completed same-topology result shall be swapped into the receiver. The dimension, initialization, synchronization, resource and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use and the continuous incremental MIP model shall apply. Exceptions shall not strengthen the common guarantees to the false-result preservation guarantee.

    RATIONALE:

    A linear image of a convex set on the real line is an interval. For a nonempty rational polyhedron described by weak inequalities, each finite linear-programming extremum is attained. Its exact lower and upper extrema therefore determine the entire closed interval, including singletons, half-lines and the whole line. Two continuous solves can avoid constructing all original generators. Reusing the model avoids rebuilding its constraints and feasible basis, and textbook pricing avoids floating-point weight work.

    INTERFACE:

    Private member of Parma_Polyhedra_Library::Polyhedron.

    bool try_interval_projection(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare public projections with literal closed intervals and an independent generator route. Cover finite rational endpoints, one/both unbounded sides, empty sets, singletons, lower-dimensional descriptions and different surviving indices. Check dimension, row-count, selection and relation rejection, closed dispatch versus NNC fallback, exact pricing and both storage layouts. Verify rejection state, zero C++ allocation on rejection, reload, cache histories and allocation failures. Include an interrupted solve, destruction of the failed receiver and a successful retry on an independent copy of the original input, under the common resource contract.

    BIBLIOGRAPHY:

    Meyer74 | Abstract (existence of finite optima with rational constraint coefficients). Williams86 | Sections on elimination and Fourier's method (exact real projection).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/advancedprojection1.cc; tests/Polyhedron/advancedprojectionpolicy1.cc; tests/Polyhedron/advancedprojectionfailure1.cc.

  • 1. Exact rational polyhedral image UID: PPL-SPEC-001346 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly {F(x) ∣ x ∈ P} for the entry receiver P, where F(x)v = e(x) ⁄ d and F(x)i = xi for i ≠ v. The denominator shall default to one and its entry value shall be used even when borrowed from receiver-owned constraints or generators. External expressions and scalars shall preserve their values. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers. Singular and constant transformations shall retain the same exactness guarantee; NNC boundary membership shall be preserved.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Rational substitution and generator transport define exact forward and backward affine transformations. Capturing an entry scalar prevents representation changes from changing the transformation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void affine_image(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independent rational point images and substituted constraints, singular/constant maps, both denominator signs, all cache histories, borrowed scalar origins and invalid-input preservation.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/affineimage1.cc; tests/Polyhedron/affineimage2.cc; tests/Polyhedron/affinepreimage1.cc; tests/Polyhedron/affinepreimagepending1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001347
    2. Exact rational polyhedral preimage UID: PPL-SPEC-001347 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly {x ∣ F(x) ∈ P} for the entry receiver P, where F(x)v = e(x) ⁄ d and F(x)i = xi for i ≠ v. The denominator shall default to one and its entry value shall be used even when borrowed from receiver-owned constraints or generators. External expressions and scalars shall preserve their values. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers. Singular and constant transformations shall retain the same exactness guarantee; NNC boundary membership shall be preserved.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Rational substitution and generator transport define exact forward and backward affine transformations. Capturing an entry scalar prevents representation changes from changing the transformation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void affine_preimage(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independent rational point images and substituted constraints, singular/constant maps, both denominator signs, all cache histories, borrowed scalar origins and invalid-input preservation.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/affineimage1.cc; tests/Polyhedron/affineimage2.cc; tests/Polyhedron/affinepreimage1.cc; tests/Polyhedron/affinepreimagepending1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc; src/Constraint_System.cc.

  • 3. Polyhedral variable-update relational image UID: PPL-SPEC-001348 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly the set of new states x’ related to some entry state x. The relation shall be x’v ⋈ e(x) ⁄ d with other coordinates unchanged. EQUAL, LESS_OR_EQUAL and GREATER_OR_EQUAL shall be supported; NNC receivers shall also support LESS_THAN and GREATER_THAN. Disequality, strict relations on closed receivers, zero denominator, invalid target or excess expression dimension shall throw std::invalid_argument before mutation. Denominator default, entry-value borrowing and external-source preservation shall follow 🔗 1. Exact rational polyhedral image.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Relational updates add existentially chosen target values; reversing a relation must retain its denominator sign and strictness.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void generalized_affine_image(Variable, Relation_Symbol,
        const Linear_Expression&,
        Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check literal interval relations, all admitted symbols, negative denominators, missing target terms, borrowed scalars, open endpoints and rejected symbols/dimensions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001349
    4. Polyhedral variable-update relational preimage UID: PPL-SPEC-001349 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly the set of old states x having a related state x’ in the entry receiver. The relation shall be x’v ⋈ e(x) ⁄ d with other coordinates unchanged. EQUAL, LESS_OR_EQUAL and GREATER_OR_EQUAL shall be supported; NNC receivers shall also support LESS_THAN and GREATER_THAN. Disequality, strict relations on closed receivers, zero denominator, invalid target or excess expression dimension shall throw std::invalid_argument before mutation. Denominator default, entry-value borrowing and external-source preservation shall follow 🔗 1. Exact rational polyhedral image.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Relational updates add existentially chosen target values; reversing a relation must retain its denominator sign and strictness.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void generalized_affine_preimage(Variable, Relation_Symbol,
        const Linear_Expression&,
        Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check literal interval relations, all admitted symbols, negative denominators, missing target terms, borrowed scalars, open endpoints and rejected symbols/dimensions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001350
    5. Polyhedral expression-update relational image UID: PPL-SPEC-001350 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be the exact image of the entry receiver under the relation lhs(x’) ⋈ rhs(x), with every coordinate whose coefficient in lhs is zero unchanged between states. Coordinates occurring in lhs shall be updated jointly, including shared variables with rhs. An identically constant lhs shall impose a filter on the old state. Admitted and rejected relation symbols shall follow 🔗 3. Polyhedral variable-update relational image. Excess dimension in either expression shall throw std::invalid_argument. External expressions shall preserve their values.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    A multi-coordinate left expression constrains a relation among new coordinates; it does not define independent assignments to them.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void generalized_affine_image(const Linear_Expression& lhs,
        Relation_Symbol, const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Check shared/disjoint supports, constant left/right expressions, singular relations, all admitted symbols, NNC strictness and independently eliminated product-state constraints.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001351
    6. Polyhedral expression-update relational preimage UID: PPL-SPEC-001351 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be the exact preimage of the entry receiver under the relation lhs(x’) ⋈ rhs(x), with every coordinate whose coefficient in lhs is zero unchanged between states. Coordinates occurring in lhs shall be updated jointly, including shared variables with rhs. An identically constant lhs shall impose a filter on the old state. Admitted and rejected relation symbols shall follow 🔗 3. Polyhedral variable-update relational image. Excess dimension in either expression shall throw std::invalid_argument. External expressions shall preserve their values.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    A multi-coordinate left expression constrains a relation among new coordinates; it does not define independent assignments to them.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void generalized_affine_preimage(const Linear_Expression& lhs,
        Relation_Symbol, const Linear_Expression& rhs);
    
    VERIFICATION_CRITERIA:

    Check shared/disjoint supports, constant left/right expressions, singular relations, all admitted symbols, NNC strictness and independently eliminated product-state constraints.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001352
    7. Exact bounded polyhedral affine image UID: PPL-SPEC-001352 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly the image under ℓ(x) ⁄ d ≤ x’v ≤ u(x) ⁄ d, with all other coordinates unchanged. Both bounds shall use the same old-state values, including when either bound mentions the target. An impossible lower/upper pair shall admit no transition. Negative denominators shall divide the two expressions as written, without silently exchanging their lower/upper roles. The denominator shall default to one and retain its entry value when borrowed from receiver-owned descriptions. Zero denominator, invalid target or excess bound-expression dimension shall throw std::invalid_argument before mutation. External inputs shall preserve their values; NNC input boundary membership shall be retained.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    The bounded relation is conjunction of two old-to-new affine inequalities; temporary dimensions must not change the scalar or mix old and new bound values.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void bounded_affine_image(Variable, const Linear_Expression& lower,
        const Linear_Expression& upper,
        Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independent product-state elimination, target-dependent bounds, empty transition sets, both denominator signs, borrowed scalars, fractional/strict boundaries and invalid arguments.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedaffineimage1.cc; tests/Polyhedron/boundedaffinepreimage1.cc; tests/Polyhedron/boundedaffineimageempty1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001353
    8. Exact bounded polyhedral affine preimage UID: PPL-SPEC-001353 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The result shall be exactly the preimage under ℓ(x) ⁄ d ≤ x’v ≤ u(x) ⁄ d, with all other coordinates unchanged. Both bounds shall use the same old-state values, including when either bound mentions the target. An impossible lower/upper pair shall admit no transition. Negative denominators shall divide the two expressions as written, without silently exchanging their lower/upper roles. The denominator shall default to one and retain its entry value when borrowed from receiver-owned descriptions. Zero denominator, invalid target or excess bound-expression dimension shall throw std::invalid_argument before mutation. External inputs shall preserve their values; NNC input boundary membership shall be retained.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    The bounded relation is conjunction of two old-to-new affine inequalities; temporary dimensions must not change the scalar or mix old and new bound values.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void bounded_affine_preimage(Variable, const Linear_Expression& lower,
        const Linear_Expression& upper,
        Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Check independent product-state elimination, target-dependent bounds, empty transition sets, both denominator signs, borrowed scalars, fractional/strict boundaries and invalid arguments.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedaffineimage1.cc; tests/Polyhedron/boundedaffinepreimage1.cc; tests/Polyhedron/boundedaffineimageempty1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

  • PPL-SPEC-001666
    1. Bounded Chvatal half-pair refinement UID: PPL-SPEC-001666 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    refine_with_chvatal_cuts(max_pair_tests) shall first perform the existing all-coordinate drop_some_non_integer_points() with its default complexity. For a nonempty result and positive budget, it shall inspect at most max_pair_tests distinct unordered pairs of nonstrict inequalities from that result's minimized constraint description, in nested iterator order. Equalities shall not consume the pair budget. All pairs shall refer to that entry description; cuts shall be applied together after pair examination, without iterating the cutting pass.

    For a pair ax + b ≥ 0, cx + d ≥ 0, it shall add ((a + c) ⁄ 2)x + ⌊(b + d) ⁄ 2⌋ ≥ 0 when the summed normal is componentwise even and the summed constant is odd. Pairs with an even constant or any odd summed normal coordinate shall add no cut. Ambient dimension and closed topology shall be preserved. The result shall be a subset of the entry set and contain every entry point in Zn.

    Zero budget shall perform only the existing tightening. Empty shall remain empty. The budget shall bound pair examination, not minimization or conversion work. A finite budget may produce different refinements for different minimized-row orders; no exact integer hull or representation-independent budgeted result shall be promised.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. No general rollback after an arithmetic or resource exception is required beyond that common contract.

    RATIONALE:

    Adding two valid inequalities and dividing by two gives ((a + c) ⁄ 2)x + (b + d) ⁄ 2 ≥ 0. If the normal is integral, its value at x ∈ Zn is an integer, so flooring the constant retains every integer solution. An even constant gives an already implied real inequality; an odd normal does not justify this rounding. The triangle x ≥ 0, y ≥ 0, x + y ≤ 1,  − x + y ≤ 0 yields y ≤ 0 from the last two inequalities, excluding (1 ⁄ 2, 1 ⁄ 2) retained by separate-row tightening. New cuts need not describe the complete integer hull.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library; member of C_Polyhedron.

    void refine_with_chvatal_cuts(dimension_type max_pair_tests);
    
    VERIFICATION_CRITERIA:

    Derive literal cuts and independently enumerate integer witnesses in translated/reflected triangles. Compare the examined prefix with a public-API pair oracle, including negative-odd floor, odd-normal/even-constant rejection, equality rows, exact budget exhaustion, zero budget, empty, zero-dimensional, affine and unbounded cases. Check no enlargement, reload and repeated refinement.

    BIBLIOGRAPHY:

    Chvatal73DM | Whole work (Chvatal cutting-plane background). NemhauserW88 | Whole work (integer-programming background).

    SOURCE:

    src/C_Polyhedron_defs.hh; src/C_Polyhedron.cc; tests/Polyhedron/chvatalcuts1.cc; doc/definitions.dox.

  • PPL-SPEC-001679
    1. Bounded exact projection from current constraints UID: PPL-SPEC-001679 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an unmarked receiver with current constraints and no pending generators, try_constraint_projection(vars) shall attempt the exact real-coordinate projection specified by 🔗 4. Exact polyhedral coordinate deletion. The selection shall be nonempty and in range. Surviving coordinates shall retain their relative order, and the receiver's closed or NNC topology shall be preserved.

    The attempt shall reject dimensions below five or descriptions containing more than 64 stored rows. For a selected coordinate, an equality with a nonzero coefficient or inequalities of both coefficient signs shall reject the one-sided path. Otherwise every row involving any selected coordinate shall be discarded, and all other rows shall be retained with compacted coordinates. Strict inequalities shall retain their membership meaning. This path shall be available for every supported coefficient profile.

    For GMP coefficients, algebraic elimination shall additionally be attempted. If more than one coordinate is selected, each input row shall mention at most one selected coordinate, or the bounded coupled planner in 🔗 2. Bounded exact coupled constraint projection shall be attempted instead. This independence restriction shall not apply to the one-sided path. Prefer a pivot whose coefficient is 1 or  − 1. For an equality E = ax + r = 0 and another row C = bx + s▹0, with b ≠ 0 and g = gcd(|a|, |b|), replace that row by (|a| ⁄ g)C − sgn(a)(b ⁄ g)E▹0. The shared equality kernel 🔗 1. Exact equality-pivot elimination shall implement this substitution. The original relation kind shall be preserved. Rows independent of the pivot shall be transferred unchanged and tautological results omitted. Each eliminated equality shall reduce the predicted stored-row bound by one; one-sided elimination shall subtract the number of rows involving that coordinate. A predicted count above 64 shall reject the attempt before scratch copying. Bounded-coefficient profiles shall retain only the one-sided path, adding no elimination products to their admitted range.

    For GMP coefficients, a selected coordinate without an equality pivot may also have both coefficient signs. At most 16 positive/negative pairs per coordinate and a predicted stored-row bound of 64 shall be admitted. For ax + r▹0 and  − bx + s▹0, with a, b > 0 and g = gcd(a, b), emit the cancelled positive combination (b ⁄ g)r + (a ⁄ g)s▹0. It shall be strict exactly when either input is strict. Rows with zero coefficient shall be retained, and tautological combinations omitted. The predicted row count for a coordinate without an equality shall replace its positive and negative rows by their pair count. These counts shall be checked before copying or coefficient algebra. Independence of selected coordinates makes the counts stable across elimination and bounds the total emitted pair count by 64. Bounded-coefficient profiles shall retain only the one-sided path.

    A false result shall preserve all receiver state, including materialized caches. Rejection shall precede scratch-row copying and coefficient algebra. A true result shall replace the receiver with the completed exact projection; no particular minimal representation is required. Temporary rows and cancellation factors shall own their storage, and only a completed temporary polyhedron shall be swapped into the receiver. The local row-emission closure shall compact rows only after their selected coefficients are zero, preserve relation kind and topology, and transfer the compacted rows to the output system.

    The lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply. Common failure guarantees shall not be strengthened by the boolean rejection guarantee: arithmetic and resource exceptions remain subject to that common contract.

    RATIONALE:

    For a fixed retained point, finitely many one-sided bounds on a real coordinate can all be satisfied by choosing its value sufficiently far in the permitted direction. Repeating this argument proves exact elimination of several one-sided coordinates, including coupled rows. Row copying and coordinate compaction preserve every unaffected relation.

    Multiplying a relation by a positive scalar preserves its kind. Subtracting a multiple of an equality preserves equivalence on that equality; dividing cancellation factors by their positive gcd reduces intermediate growth. Independence prevents elimination from changing another selected coordinate's rows, so eligibility and work limits can be checked upfront. Opposite-sign pairs express every lower/upper compatibility condition. A strict bound requires strict compatibility in that pair. All compatible finite bounds admit a real witness, proving exactness. Independent pair results mention no remaining selected coordinate; the predicted final row bound therefore also bounds the total pair count.

    INTERFACE:

    Private member in Parma_Polyhedra_Library::Polyhedron; implementation in src/Polyhedron_chdims.cc.

    bool try_constraint_projection(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare with literal projections and with the existing generator route on closed and NNC sets. Cover positive, negative and absent selected coefficients, coupled one-sided coordinates, constant false rows, all/none coordinate selection, open boundaries, reload, source/cache histories and selection rejection. Directly check both dimension and stored-row limits, exact accepted results, unchanged state on rejection, and allocation failures before and after completed result replacement. Cover positive/negative and unit/nonunit pivots, duplicate and contradictory rows, unaffected-row transfers, independence rejection, coupled-planner delegation and profile selection. Check every strictness combination, gcd reduction, pair and predicted-row limits, multicoordinate independent pairs and generator fallback.

    BIBLIOGRAPHY:

    Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/constraintprojection1.cc; tests/Polyhedron/constraintprojectionpolicy1.cc; tests/Polyhedron/constraintprojectionfailure1.cc.

  • 1. H79 polyhedral widening UID: PPL-SPEC-001365 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The previous iterate y shall be contained in the entry receiver, with equal dimension and topology. Widening shall contain both values and preserve a distinct operand's set. For closed polyhedra it shall implement the standard widening of the cited Definition 1, including representation-independent handling of redundant rows. widening_assign shall select this H79 operation. For NNC operands the named algorithm shall operate on compatible closed epsilon representations built from closure facets and maximal excluded faces. The represented result shall be independent of the operand cache history.

    A nonnull token pointer shall designate an independently writable unsigned count. If widening would enlarge the receiver and a token is available, the operation shall retain the entry receiver and consume one token. Tokens shall not be replenished during a convergence iteration. With finite total delay, the prescribed widening iteration on ascending inputs shall stabilize. Dimension/topology mismatch shall throw std::invalid_argument; violating the inclusion prerequisite shall have no result guarantee.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Finite limited growth permits precision improvements without losing the termination purpose of widening. NNC epsilon inclusion must hold for the internal closed-set argument.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void H79_widening_assign(const Polyhedron&, unsigned* tokens=nullptr);
    void widening_assign(const Polyhedron&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check both input inclusions, delayed strict chains, empty/zero dimensions, representation redundancy, the named algorithm on independent closed examples and NNC epsilon compatibility.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Section 3, Definition 1; Section 5, Definition 18 and Theorem 19; Section 6, widening delay and tokens.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/h79widening1.cc; tests/Polyhedron/h79widening2.cc; tests/Polyhedron/bhrz03widening1.cc; tests/Polyhedron/bhrz03widening2.cc; tests/Polyhedron/bhrz03widening3.cc; src/Polyhedron_widenings.cc.

  • 2. BHRZ03 polyhedral widening UID: PPL-SPEC-001366 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The previous iterate y shall be contained in the entry receiver, with equal dimension and topology. Widening shall contain both values and preserve a distinct operand's set. For closed polyhedra it shall implement the improved widening of the cited Definition 18: it shall preserve certified limited-growth steps, otherwise combine the specified constraint/point/ray improvements under the standard widening bound. For NNC operands it shall use the same normalized epsilon representations as H79 for its standard widening bound. Its result shall be at least as precise as H79 on the same admitted pair in either topology.

    A nonnull token pointer shall designate an independently writable unsigned count. If widening would enlarge the receiver and a token is available, the operation shall retain the entry receiver and consume one token. Tokens shall not be replenished during a convergence iteration. With finite total delay, the prescribed widening iteration on ascending inputs shall stabilize. Dimension/topology mismatch shall throw std::invalid_argument; violating the inclusion prerequisite shall have no result guarantee.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Finite limited growth permits precision improvements without losing the termination purpose of widening. NNC epsilon inclusion must hold for the internal closed-set argument.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void BHRZ03_widening_assign(const Polyhedron&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check both input inclusions, delayed strict chains, empty/zero dimensions, representation redundancy, the named algorithm on independent closed examples and NNC epsilon compatibility.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Section 3, Definition 1; Section 5, Definition 18 and Theorem 19; Section 6, widening delay and tokens.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/h79widening1.cc; tests/Polyhedron/h79widening2.cc; tests/Polyhedron/bhrz03widening1.cc; tests/Polyhedron/bhrz03widening2.cc; tests/Polyhedron/bhrz03widening3.cc; src/Polyhedron_widenings.cc.

  • PPL-SPEC-001367
    3. Limited H79 polyhedral extrapolation UID: PPL-SPEC-001367 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The operands, token use and inclusion prerequisite shall follow 🔗 1. H79 polyhedral widening. From the supplied constraint system, limited extrapolation shall select constraints satisfied by every entry receiver point and intersect them with the named widening result. Empty constraint input shall select the corresponding named widening. Results shall contain both inputs. An excess limiter dimension, unequal operand dimensions, incompatible operand topologies, or strict limiter inequalities on a closed receiver shall throw std::invalid_argument. External limiter values shall be preserved. An arbitrary changing limiter sequence shall have no general finite-convergence guarantee; the widening-up-to argument shall require a fixed finite admissible set of limiting constraints.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Admitted limiting constraints retain soundness, while convergence needs control over which constraints can reappear. The box widening supplies a separate coordinate-bound approximation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void limited_H79_extrapolation_assign(
        const Polyhedron&, const Constraint_System&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check selected/rejected limiters, empty limiter correspondence, both inclusions, token counts, fixed-limit ascending chains, bound directions and dimension/topology rejection.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Sections 3–5, base widening definitions (background for limiting adaptation).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/limitedh79extrapolation1.cc; src/Polyhedron_widenings.cc.

  • PPL-SPEC-001368
    4. Bounded H79 polyhedral extrapolation UID: PPL-SPEC-001368 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The operands, token use and inclusion prerequisite shall follow 🔗 1. H79 polyhedral widening. From the supplied constraint system, limited extrapolation shall select constraints satisfied by every entry receiver point and intersect them with the named widening result. Empty constraint input shall leave the limiting intersection neutral. Bounded extrapolation shall additionally intersect the limited result with the box obtained by interval CC76 widening of the two smallest enclosing boxes, in the same previous/current operand order. Results shall contain both inputs. An excess limiter dimension, unequal operand dimensions, incompatible operand topologies, or strict limiter inequalities on a closed receiver shall throw std::invalid_argument. External limiter values shall be preserved. An arbitrary changing limiter sequence shall have no general finite-convergence guarantee; the widening-up-to argument shall require a fixed finite admissible set of limiting constraints.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Admitted limiting constraints retain soundness, while convergence needs control over which constraints can reappear. The box widening supplies a separate coordinate-bound approximation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void bounded_H79_extrapolation_assign(
        const Polyhedron&, const Constraint_System&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check selected/rejected limiters, empty limiter correspondence, both inclusions, token counts, fixed-limit ascending chains, bound directions and dimension/topology rejection.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Sections 3–5, base widening definitions (background for limiting adaptation).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedh79extrapolation1.cc; src/Polyhedron_widenings.cc.

  • PPL-SPEC-001369
    5. Limited BHRZ03 polyhedral extrapolation UID: PPL-SPEC-001369 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The operands, token use and inclusion prerequisite shall follow 🔗 2. BHRZ03 polyhedral widening. From the supplied constraint system, limited extrapolation shall select constraints satisfied by every entry receiver point and intersect them with the named widening result. Empty constraint input shall select the corresponding named widening. Results shall contain both inputs. An excess limiter dimension, unequal operand dimensions, incompatible operand topologies, or strict limiter inequalities on a closed receiver shall throw std::invalid_argument. External limiter values shall be preserved. An arbitrary changing limiter sequence shall have no general finite-convergence guarantee; the widening-up-to argument shall require a fixed finite admissible set of limiting constraints.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Admitted limiting constraints retain soundness, while convergence needs control over which constraints can reappear. The box widening supplies a separate coordinate-bound approximation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void limited_BHRZ03_extrapolation_assign(
        const Polyhedron&, const Constraint_System&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check selected/rejected limiters, empty limiter correspondence, both inclusions, token counts, fixed-limit ascending chains, bound directions and dimension/topology rejection.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Sections 3–5, base widening definitions (background for limiting adaptation).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/limitedbhrz03extrapolation1.cc; src/Polyhedron_widenings.cc.

  • PPL-SPEC-001370
    6. Bounded BHRZ03 polyhedral extrapolation UID: PPL-SPEC-001370 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The operands, token use and inclusion prerequisite shall follow 🔗 2. BHRZ03 polyhedral widening. From the supplied constraint system, limited extrapolation shall select constraints satisfied by every entry receiver point and intersect them with the named widening result. Empty constraint input shall leave the limiting intersection neutral. Bounded extrapolation shall additionally intersect the limited result with the box obtained by interval CC76 widening of the two smallest enclosing boxes, in the same previous/current operand order. Results shall contain both inputs. An excess limiter dimension, unequal operand dimensions, incompatible operand topologies, or strict limiter inequalities on a closed receiver shall throw std::invalid_argument. External limiter values shall be preserved. An arbitrary changing limiter sequence shall have no general finite-convergence guarantee; the widening-up-to argument shall require a fixed finite admissible set of limiting constraints.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Admitted limiting constraints retain soundness, while convergence needs control over which constraints can reappear. The box widening supplies a separate coordinate-bound approximation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void bounded_BHRZ03_extrapolation_assign(
        const Polyhedron&, const Constraint_System&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check selected/rejected limiters, empty limiter correspondence, both inclusions, token counts, fixed-limit ascending chains, bound directions and dimension/topology rejection.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Sections 3–5, base widening definitions (background for limiting adaptation).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedbhrz03extrapolation1.cc; src/Polyhedron_widenings.cc.

  • PPL-SPEC-001371
    7. H79 convergence certificate values and comparisons UID: PPL-SPEC-001371 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty polyhedron, H79_Certificate shall record its affine dimension and number of nonredundant visible constraints, excluding internal positivity and epsilon bounds. The default certificate shall describe the zero-dimensional universe. Copying and assignment shall preserve the recorded value. Certificate comparison shall order the pair lexicographically, returning only -1, 0 or 1; Compare shall test for a positive comparison.

    Comparison with a containing nonempty same-dimensional polyhedron shall return 1 for increasing affine dimension, or at equal affine dimension for decreasing constraint count; -1 for increasing count and 0 for equal components. Zero shall not imply pointset equality. Generic non-polyhedron inputs shall be admitted only when their constraint descriptions can be converted to a closed polyhedron without strict inequalities. For nonempty same-dimensional closed or NNC pointsets P ⊂ Q , if R is the result of the default tokenless H79 widening of P by Q , then H79_Certificate(P).compare(R) shall return 1. The NNC case shall reconcile epsilon representations before strong constraint minimization and saturation matching, as established in doc/definitions.dox (user-manual section NNC_Widening_Certificates). Certificate-to-certificate comparisons shall use compatible ambient dimensions. The comparison predicate shall order larger component tuples first.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Certificate ordering and certified growth have different orientations; neither equality of components nor a negative growth result decides set inclusion.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of H79_Certificate.

    H79_Certificate();
    H79_Certificate(const Polyhedron&);
    template <typename PH, typename = void>
      requires (!std::is_convertible_v<const PH&, const Polyhedron&>)
    H79_Certificate(const PH&);
    H79_Certificate(const H79_Certificate&);
    H79_Certificate& operator=(const H79_Certificate&);
    ~H79_Certificate();
    int compare(const H79_Certificate&) const;
    int compare(const Polyhedron&) const;
    template <typename PH>
      requires (!std::is_convertible_v<const PH&, const Polyhedron&>)
    int
    compare(const PH&) const;
    struct Compare {
      bool operator()(const H79_Certificate&, const H79_Certificate&) const;
    };
    
    VERIFICATION_CRITERIA:

    Independently count ranks and facets, check default/copy/assignment, both comparison orientations, containing sets with equal components and generic closed conversion. Check NNC strip statistics across strict/closed endpoints, equivalent generator descriptions and alternating cache histories; these samples shall not be presented as a proof for NNC widening. Inspect doc/definitions.dox (user-manual section NNC_Widening_Certificates) and check tokenless widening progress on excluded faces and differing epsilon slopes.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Sections 3–5, limited-growth compatibility and component orderings.

    SOURCE:

    src/H79_Certificate_defs.hh; src/H79_Certificate_inlines.hh; src/H79_Certificate.cc; tests/certificatelifecycles1.cc.

  • PPL-SPEC-001372
    8. BHRZ03 convergence certificate values and comparisons UID: PPL-SPEC-001372 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty polyhedron, BHRZ03_Certificate shall record affine dimension, lineality dimension, nonredundant visible constraint count, point or closure-point count, and for each possible number of zero coordinates the count of nonredundant rays with that many zero coordinates. Default shall describe zero-dimensional universe. Copying shall preserve the recorded value. Certificate comparison shall order these components lexicographically and return only -1, 0 or 1; Compare shall test for a positive comparison.

    Comparison with a same-dimensional nonempty containing polyhedron shall return 1 for growth certified stabilizing by the cited component ordering, 0 when the examined components agree and -1 otherwise. Increased affine/lineality dimension is stabilizing; at equal earlier dimensions a decrease of constraint, point or lexicographically examined ray counts is stabilizing. An increase in a later examined count may return -1 for a valid containing pair. Zero shall not establish set equality. is_stabilizing shall mean comparison is positive; OK shall test structural consistency of the stored component ranges. For nonempty same-dimensional closed or NNC pointsets P ⊂ Q , if R is the result of the default tokenless H79 or BHRZ03 widening of P by Q , then BHRZ03_Certificate(P).compare(R) shall return 1. The NNC H79 selection path, including the BHRZ03 last resort, shall reconcile epsilon representations before strong constraint minimization and saturation matching. doc/definitions.dox (user-manual section NNC_Widening_Certificates) establishes this extension of the cited closed-polyhedron compatibility argument. Certificate-to-certificate comparisons shall use compatible ambient dimensions. The comparison predicate shall order larger component tuples first.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Limited growth is a sufficient convergence argument, rather than a restatement of containment. Ray-coordinate counts distinguish later components without asserting geometric equality.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of BHRZ03_Certificate.

    BHRZ03_Certificate();
    BHRZ03_Certificate(const Polyhedron&);
    BHRZ03_Certificate(const BHRZ03_Certificate&);
    int compare(const BHRZ03_Certificate&) const;
    int compare(const Polyhedron&) const;
    bool is_stabilizing(const Polyhedron&) const;
    bool OK() const;
    struct Compare {
      bool operator()(const BHRZ03_Certificate&, const BHRZ03_Certificate&) const;
    };
    
    VERIFICATION_CRITERIA:

    Count components independently for flats, simplices, pyramids/prisms and rays; check negative containing comparisons, default/copy, total-order consistency and stabilizing predicates. Check NNC point/closure-point counts and strict inclusions with equal tuples across equivalent representations and cache histories. Inspect the NNC compatibility argument and epsilon preparation separately; test tokenless widening progress across strict facets, excluded lower-dimensional faces and cache histories.

    BIBLIOGRAPHY:

    BagnaraHRZ05SCP | Section 5, Definitions 10–11, Proposition 12 and Theorem 19.

    SOURCE:

    src/BHRZ03_Certificate_defs.hh; src/BHRZ03_Certificate_inlines.hh; src/BHRZ03_Certificate.cc; tests/Polyhedron/bhrz03widening3.cc.

  • PPL-SPEC-001345
    1. Exact polyhedral cylindrification UID: PPL-SPEC-001345 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Cylindrification shall forget restrictions on the selected coordinates while preserving exactly the projection onto all other coordinates. Ambient dimension shall be retained. Empty shall remain empty, and an empty coordinate selection shall be a no-op. Coordinates outside the receiver shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Forgetting a coordinate is existential elimination followed by adding that coordinate freely, not deleting every row that mentions it.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void unconstrain(Variable);
    void unconstrain(const Variables_Set&);
    
    VERIFICATION_CRITERIA:

    Check coupled equalities/inequalities, strict projected boundaries, empty selections, invalid indices, empty and pending descriptions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/unconstrain1.cc; src/Polyhedron_chdims.cc.

  • PPL-SPEC-001354
    2. Polyhedral coordinate growth UID: PPL-SPEC-001354 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Adding m coordinates shall append them after the old coordinates. add_space_dimensions_and_embed(m) shall form the Cartesian product with Rm; add_space_dimensions_and_project(m) shall append exactly m zero coordinates. Empty shall remain empty in the enlarged dimension. Zero growth shall be a no-op. Exceeding the selected topology's structural dimension limit shall throw std::length_error before extent-dependent allocation; unsigned dimension arithmetic shall not wrap.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Free extension and zero extension have different meanings despite sharing the same new ambient dimension.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void add_space_dimensions_and_embed(dimension_type m);
    void add_space_dimensions_and_project(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Check independent Cartesian/zero products, both topologies, empty/universe, pending histories, zero growth and reserved/overflow extents.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/addspacedims1.cc; tests/Polyhedron/addspacedims2.cc; src/Polyhedron_chdims.cc.

  • PPL-SPEC-001355
    3. Exact polyhedral Cartesian concatenation UID: PPL-SPEC-001355 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Concatenation shall assign the exact Cartesian product of the entry receiver and operand, with receiver coordinates followed by operand coordinates. The resulting dimension shall be the sum. Empty shall be absorbing; zero-dimensional universe shall be an identity. Self-concatenation shall use independent copies of the entry value. Incompatible topologies shall throw std::invalid_argument and excessive combined dimension std::length_error before extent-dependent allocation. A distinct operand shall preserve its value.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Concatenation combines independently chosen tuples and must not introduce equalities between copies.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void concatenate_assign(const Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check literal products, self products, both operand orders for zero dimensions, strict endpoints, empty and dimension/topology rejection. Check current C, current G and both saturation orientations, constraint-heavy fallbacks, zero leading saturation columns across GMP limb boundaries and subsequent pending-row processing against literal Cartesian products.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/concatenate1.cc; src/Polyhedron_chdims.cc.

  • 4. Exact polyhedral coordinate deletion UID: PPL-SPEC-001356 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Coordinate deletion shall existentially project away exactly the selected coordinates and pack surviving coordinates in their previous relative order. Removing higher dimensions shall retain the prefix of the requested length. Empty shall remain empty in the resulting dimension. Projection of nonempty onto no coordinates shall be zero-dimensional universe. Empty selection or an unchanged prefix length shall preserve the value. An invalid selection or a requested prefix longer than the receiver shall throw std::invalid_argument before mutation.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Projection retains consequences among surviving coordinates, including strict boundary information.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void remove_space_dimensions(const Variables_Set&);
    void remove_higher_space_dimensions(dimension_type);
    
    VERIFICATION_CRITERIA:

    Check relational elimination, unbounded directions that vanish, all/none/prefix selection, zero dimensions, pending histories and rejected indices. Compare the constraint and generator routes under 🔗 1. Bounded exact projection from current constraints, including unchanged rejection state, profile selection and allocation failures.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/removespacedims1.cc; tests/Polyhedron/removespacedims2.cc; src/Polyhedron_chdims.cc; tests/Polyhedron/constraintprojection1.cc; tests/Polyhedron/constraintprojectionpolicy1.cc; tests/Polyhedron/constraintprojectionfailure1.cc.

  • PPL-SPEC-001357
    5. Exact partial coordinate mapping of polyhedra UID: PPL-SPEC-001357 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted partial mapping from old coordinate indices to a dense set {0, …, m − 1}, the operation shall delete unmapped coordinates and rename the remaining ones exactly. The mapping shall be injective on its domain and m ≤ n; an equal-size map shall therefore be a permutation. The mapping object shall implement has_empty_codomain(), max_in_codomain() and maps(i,j) with the entry mapping's consistent answers. Empty codomain shall project onto zero dimensions. The maximum shall be requested at most once and maps at most once per old coordinate. Mappings violating these prerequisites shall have no result guarantee; a defensive invalid-argument check shall not make every malformed map admitted.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    An injective dense image distinguishes projection/permutation from coordinate identification or addition of unconstrained dimensions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename Partial_Function>
    void map_space_dimensions(const Partial_Function&);
    
    VERIFICATION_CRITERIA:

    Check independent permutations and partial projections, disappearing directions, empty and zero dimensions, custom mapping call counts and both current representation routes.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/mapspacedims1.cc; src/Polyhedron_chdims.cc.

  • PPL-SPEC-001358
    6. Polyhedral coordinate expansion UID: PPL-SPEC-001358 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expansion of coordinate v by m shall append m coordinates, each an independent copy of v conditional on the other old coordinates. Writing an old state as (z, xv), the result shall consist exactly of states (z, xv, t1, …, tm) for which (z, xv) ∈ P and each (z, ti) ∈ P. The copies need not equal one another. Invalid v shall throw std::invalid_argument and excessive dimension growth std::length_error. Zero expansion shall preserve the value.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Expansion replicates a coordinate relation while allowing independent values consistent with the shared context.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void expand_space_dimension(Variable v, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Check literal interval copies, context-dependent relations, strict endpoints, non-equality between copies, empty, zero growth and dimension guards.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/expandspacedim1.cc; tests/Polyhedron/expandspacedim2.cc; src/Polyhedron_chdims.cc.

  • PPL-SPEC-001359
    7. Polyhedral coordinate folding UID: PPL-SPEC-001359 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Folding coordinates in vars into dest shall take the least polyhedron of the receiver's topology containing the union of the projections that place either the old destination or one folded coordinate at the surviving destination position, and then delete the folded coordinates. Remaining coordinates shall retain relative order. dest shall be a valid coordinate outside vars; all selected coordinates shall be valid, otherwise std::invalid_argument shall be thrown. Empty selection shall be a no-op.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Folding merges alternative coordinate origins through a polyhedral hull rather than requiring their values to agree.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void fold_space_dimensions(const Variables_Set& vars, Variable dest);
    
    VERIFICATION_CRITERIA:

    Compare with independently permuted/projected hulls, strict boundaries, destinations before/after deleted coordinates, empty selection and invalid overlap/indices. Compare the result with the hull of independent affine images of the entry value followed by projection, for closed and NNC topology, dense/sparse rows, zero/single/multiple noncontiguous sources, different destination positions, rational correlations, rays, lines and pending or minimized caches.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/foldspacedims1.cc; tests/Polyhedron/foldspacedims2.cc; src/Polyhedron_chdims.cc.

  • 1. Exact equality-pivot elimination UID: PPL-SPEC-001683 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With GMP coefficients, project_constraint_equality(rows, v, pivot) shall require owned valid rows of one ambient dimension, an in-range pivot index, an equality at that index and a nonzero pivot coefficient of v. For the pivot E = ax + r = 0 and another row C = bx + s▹0, a nonzero b shall be cancelled by (|a| ⁄ g)C − sgn(a)(b ⁄ g)E, where g = gcd(|a|, |b|). The relation kind shall be retained. Rows with zero coefficient shall be transferred unchanged; tautological results shall be omitted. The pivot shall be removed, every remaining coefficient of v shall be zero, and the result shall represent the exact existential elimination of that coordinate. Row count shall not increase.

    The row vector shall retain its ambient coordinate numbering; physical coordinate compaction belongs to its caller. Temporaries shall own their data. Exceptions shall obey 🔗 1. Polyhedral values, coefficient profile and valid use without a rollback guarantee for this scratch vector. The receiver shall not be modified by scratch-vector failures before the caller's completed-result replacement.

    RATIONALE:

    The multiplier of the original relation is positive, so equality, weak and strict inequality meanings are preserved. On the pivot equality, subtracting its multiple preserves equivalence. The pivot determines the eliminated coordinate uniquely from every assignment satisfying the substituted rows; existential elimination is therefore exact. Dividing cancellation factors by their positive gcd reduces coefficient growth.

    INTERFACE:

    File-local helper in the unnamed namespace of src/Polyhedron_chdims.cc.

    void project_constraint_equality(std::vector<Constraint>& rows,
                                     Variable v, size_t pivot);
    
    VERIFICATION_CRITERIA:

    Through public coordinate removal and the production projection selector, exercise both pivot signs, unit and nonunit coefficients, all relation kinds, gcd reduction, unchanged rows, tautological and contradictory results. Compare literal projections and an independently materialized generator route. Exercise allocation failures and verify valid receiver state.

    BIBLIOGRAPHY:

    Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

    SOURCE:

    src/Polyhedron_chdims.cc; tests/Polyhedron/constraintprojection1.cc; tests/Polyhedron/constraintprojectionpolicy1.cc; tests/Polyhedron/coupledprojection1.cc; tests/Polyhedron/coupledprojectionpolicy1.cc; tests/Polyhedron/coupledprojectionfailure1.cc.

  • 2. Bounded exact coupled constraint projection UID: PPL-SPEC-001684 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    try_coupled_equality_projection(vars) shall require an unmarked receiver with current constraints, no pending generators, ambient dimension at least five, at most 64 stored rows and a nonempty in-range selection. It shall attempt the exact projection 🔗 4. Exact polyhedral coordinate deletion, preserving topology and relative coordinate order. With bounded coefficients it shall reject. With GMP coefficients, selections above four coordinates shall delegate to 🔗 3. Exact one-dimensional continuous LP projection only for necessarily closed receivers, returning its result; other such selections shall reject.

    For each equality record the support on selected coordinates in bounded stack metadata. Repeatedly select an equality whose support on remaining selected coordinates is exactly one coordinate, record that coordinate, and remove it from the remaining set. When peeling stops, inspect remaining selected coordinates in ascending order. If an equality has nonzero support on the coordinate being inspected, delegate to 🔗 1. Two-coordinate full-rank equality projection and return its result. Otherwise opposite signs shall delegate to 🔗 2. Bounded coupled two-coordinate pair projection and return its result. The structural planner itself uses only support/sign queries; the delegated preflights may use exact coefficient algebra. Absent selected columns shall impose no restriction.

    After an admissible plan is found, copy the owned rows. For each planned coordinate choose an equality with nonzero coefficient and zero coefficients on all later planned and residual selected coordinates, preferring coefficient 1 or  − 1, and apply 🔗 1. Exact equality-pivot elimination. Such a pivot shall exist. After substitution discard rows involving any residual selected coordinate. Compact the retained rows, preserve their relations, and replace the receiver only by swapping in a completed same-topology polyhedron. On this structural equality/one-sided path, at most four substitution passes shall occur and row count shall not exceed its input bound. Delegated paths shall obey their respective contracts and work bounds. A false result shall preserve every receiver field and shall allocate no C++ storage. The delegated rank and sign preflights may perform GMP coefficient algebra before returning false. Exceptions shall obey 🔗 1. Polyhedral values, coefficient profile and valid use, without strengthening its guarantees to the false-result preservation guarantee.

    RATIONALE:

    A leaf pivot has zero coefficients on every other remaining selected coordinate. Substitution consequently multiplies those coefficients by a positive nonzero factor, preserving their supports. The static support plan remains valid, later pivots remain available and no pairwise row generation is necessary. Every pivot removes one row and possibly tautologies, bounding the work without building a generator description.

    A residual coordinate has no equality coefficient and a globally consistent inequality sign. A chosen pivot has zero residual coefficients, so every substitution preserves those signs. For each assignment of retained coordinates satisfying unaffected rows, send all residual variables far enough in their permitted directions. Every row involving them then grows positively, also satisfying strict inequalities. Dropping these rows is therefore exact even with several coupled residual coordinates.

    INTERFACE:

    Private member of Parma_Polyhedra_Library::Polyhedron.

    bool try_coupled_equality_projection(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare literal results and an independent generator route on closed and NNC systems. Cover reversed elimination order, selected support patterns, signed/unit/nonunit pivots, redundant or inconsistent rows, noncontiguous dimensions, one through four selected coordinates and exact limits. Check singular-cycle, large-selection and bounded-profile rejection, complete unchanged ASCII state and zero C++ allocation on rejection. Exercise public cache histories, reload, random systems and allocation failures.

    Cover no, partial and complete equality plans, positive/negative and absent residual columns, coupled residual strict and weak rows, and rejection of remaining equalities or opposite-sign inequalities. Independently verify their mathematical projections and unchanged state on every rejection.

    BIBLIOGRAPHY:

    Williams86 | Sections on elimination and Fourier's method (exact real projection). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC membership and strict boundaries).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_chdims.cc; tests/Polyhedron/coupledprojection1.cc; tests/Polyhedron/coupledprojectionpolicy1.cc; tests/Polyhedron/coupledprojectionfailure1.cc.

  • PPL-SPEC-001360
    1. Nonnegative polyhedral time elapse UID: PPL-SPEC-001360 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary time elapse shall compute the least polyhedron of the receiver's topology containing {p + tq ∣ p ∈ P, q ∈ Q, t ≥ 0}, using the entry receiver P and operand Q. Empty in either operand shall give empty. Dimension and topology shall agree, otherwise std::invalid_argument shall be thrown. A distinct operand shall retain its represented value. The progression scalar shall be real, not integral, and zero time shall be admitted for nonempty operands.

    The generator-system overload shall interpret its input as the rate polyhedron described by that system, using the receiver's topology. The rate system shall have the same ambient dimension as the receiver. An empty rate system shall give the empty result. A nonempty system without an included point, or a closed receiver with a user-visible closure point in the system, shall raise std::invalid_argument. These argument checks shall precede updates of the receiver. An independent input generator system shall retain its value and representation. If the input is a borrowed generator view of the receiver, the operation shall read its entry generators before any receiver update; the view shall then follow 🔗 2. Equivalent borrowed polyhedral descriptions. A singleton zero rate shall preserve the receiver's represented set.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    The cone of an NNC rate polyhedron may require a polyhedral enclosure, and closing the result is required by a closed target. Generator input permits a caller that already has a rate description to avoid constructing a rate polyhedron. For nonempty operands, the least polyhedral result is the sum of the initial set and the closed rate cone: every valid strict or nonstrict halfspace must admit nonnegative progression along each rate, and hence along that closed cone.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void time_elapse_assign(const Polyhedron&);
    void time_elapse_assign(const Generator_System& rates);
    
    VERIFICATION_CRITERIA:

    Check literal rate cones, zero rates, open rate boundaries, original states at zero time, empty operands, self aliasing and compatibility rejection. Compare generator-input results with independently known cones and with the polyhedron-input overload. Cover unpaired NNC points and closure points, rays, lines, latent empty and pending receivers, both cache states, borrowed receiver generators, zero dimensions and validation before receiver updates. Exercise the powerset time-elapse callback with closed, NNC and recursive powerset operands.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/timeelapse1.cc; tests/Polyhedron/timeelapse2.cc; tests/Polyhedron/timeelapsegenerators1.cc.

  • PPL-SPEC-001361
    2. Positive polyhedral time elapse UID: PPL-SPEC-001361 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Positive time elapse shall compute the least polyhedron of the receiver's topology containing {p + tq ∣ p ∈ P, q ∈ Q, t > 0}. Zero time shall not be introduced merely by the definition; zero rates may nevertheless retain entry states. A closed receiver shall take the closed polyhedral enclosure. Both rate topologies shall be admitted by this variant. Dimensions shall agree, otherwise std::invalid_argument shall be thrown. Empty in either operand shall give empty. A distinct operand shall retain its value.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Strictly positive time can exclude initial boundary states; a closed result necessarily adds their appropriate limits.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    // Members of C_Polyhedron and NNC_Polyhedron:
    void positive_time_elapse_assign(const Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check independent positive cones, excluded/retained origins, zero rates, empty and zero-dimensional operands, cross-topology rates and dimension mismatch.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/nncpostimeelapse1.cc.

  • PPL-SPEC-001362
    3. Integer-point-preserving polyhedral restriction UID: PPL-SPEC-001362 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Restriction shall return a polyhedron contained in the entry receiver that retains every entry point integral in the selected coordinates. The all-coordinate overload shall select all coordinates. Remaining points need not all be integral; no optimality guarantee shall be made, including under ANY_COMPLEXITY. Limited complexity may leave the value unchanged rather than materializing an expensive representation. Empty coordinate selection shall be a no-op. The selection shall contain only valid receiver coordinates.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Rounding individual constraints can remove fractional states without computing the integer hull.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void drop_some_non_integer_points(Complexity_Class=ANY_COMPLEXITY);
    void drop_some_non_integer_points(const Variables_Set&,
                                     Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Enumerate bounded integer tuples independently, confirm retention and no enlargement, include subset selection, strict bounds, pending/cache and complexity-policy histories.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/dropsomenonintegerpoints1.cc; tests/Polyhedron/dropsomenonintegerpoints2.cc.

  • PPL-SPEC-001363
    4. Sound bounded-integer wrapping in polyhedra UID: PPL-SPEC-001363 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For selected coordinates assumed integral, wrapping shall conservatively represent the outcomes for the selected modeled width and signed or unsigned representation. OVERFLOW_WRAPS shall reduce modulo 2w and choose the representative in the modeled range. OVERFLOW_IMPOSSIBLE shall retain only nonoverflowing outcomes; OVERFLOW_UNDEFINED shall permit arbitrary results on overflowing transitions. Unselected coordinates shall retain their correlations as far as the documented polyhedral abstraction preserves them. Optional constraints shall restrict the output state, may mention only selected coordinates, and may guide the partition of wrapping translations. All selected indices and optional descriptors shall be dimension-compatible; dimension mismatches shall throw std::invalid_argument. The complexity threshold and individual-wrapping flag may trade precision for work; they shall not exclude concrete outcomes.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Modeled machine overflow is distinct from overflow of the coefficients computing a sound enclosure.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void wrap_assign(const Variables_Set&, Bounded_Integer_Type_Width,
        Bounded_Integer_Type_Representation, Bounded_Integer_Type_Overflow,
        const Constraint_System* = nullptr, unsigned complexity_threshold=16,
        bool wrap_individually=true);
    
    VERIFICATION_CRITERIA:

    Enumerate small integer input sets and modular representatives, include signed endpoints, cross-coordinate relations, optional constraints, every overflow policy and both wrapping modes.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/wrap1.cc; tests/Polyhedron/wrap2.cc.

  • PPL-SPEC-001364
    5. Exact polyhedral topological closure UID: PPL-SPEC-001364 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Closure assignment shall replace the receiver by its exact real topological closure. A closed receiver shall retain its value. NNC closure shall include the missing boundary points while preserving dimension, equalities and recession behavior. Empty and zero-dimensional values shall remain unchanged. Repetition shall be idempotent.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Closure changes membership at limits without changing the affine hull or introducing unrelated points.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void topological_closure_assign();
    
    VERIFICATION_CRITERIA:

    Check half-open intervals, lower-dimensional open sets, latent empty strict systems, both representation routes and idempotence. Check generator-derived receivers with both representations minimized before closure, including multiple boundary points that become unsorted on insertion; verify the exact closed generator hull, invariants and idempotence.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/topclosure1.cc.

  • PPL-SPEC-001376
    1. Sound polyhedral filtering by interval linear forms UID: PPL-SPEC-001376 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted nonempty receiver, floating-point formats and bounded interval coefficients, linear-form refinement shall retain every receiver state satisfying some coefficient instantiation of the selected comparison, and shall introduce no state outside the receiver. The basic overload shall select less-than or less-or-equal by is_strict; a closed receiver may relax strictness. Generalized refinement shall apply both non-strict filters for equality, reverse operands for greater-than relations, and retain the receiver for disequality. Excess input dimension shall throw std::invalid_argument; an invalid relation enumeration shall throw std::runtime_error. If the form or its normalization overflows the admitted analysis range, refinement may leave the receiver unchanged rather than use an unsound finite coefficient. External forms shall preserve their values.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Interval coefficients describe a family of real affine expressions; sound filtering must retain the union of their feasible states.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename FP_Format, typename Interval_Info>
    void refine_with_linear_form_inequality(
     const Linear_Form<Interval<FP_Format, Interval_Info>>& left,
     const Linear_Form<Interval<FP_Format, Interval_Info>>& right,
     bool is_strict=false);
    template <typename FP_Format, typename Interval_Info>
    void generalized_refine_with_linear_form_inequality(
     const Linear_Form<Interval<FP_Format, Interval_Info>>& left,
     const Linear_Form<Interval<FP_Format, Interval_Info>>& right,
     Relation_Symbol);
    
    VERIFICATION_CRITERIA:

    Enumerate endpoint and interior coefficient choices on literal boxes, exact dyadic coefficients, every relation symbol, strict/closed behavior, overflowing normalization and invalid dimensions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/polyhedronintervalformspec1.cc.

  • PPL-SPEC-001377
    2. Sound polyhedral image of interval linear forms UID: PPL-SPEC-001377 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted nonempty receiver and a linear form with bounded interval coefficients in a supported floating-point format, affine-form image shall contain every target state produced by an admitted coefficient instantiation, with other coordinates unchanged in the concrete transition. The result may conservatively lose correlations. It shall preserve dimension and topology. Invalid target or excess form dimension shall throw std::invalid_argument. If the form or normalization overflows the analysis range, returning universe shall be permitted. External forms shall preserve their values. Arithmetic and rounding prerequisites of the selected interval and floating-expression profiles shall apply.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Normalization separates interval uncertainty from exact rational coefficients; an overflowing abstraction must widen instead of silently discard concrete outcomes.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename FP_Format, typename Interval_Info>
    void affine_form_image(Variable,
     const Linear_Form<Interval<FP_Format, Interval_Info>>&);
    
    VERIFICATION_CRITERIA:

    Compare exact dyadic images with rational transforms, enumerate uncertain coefficients, include subnormals, cancellation, unbounded state coordinates, overflow fallback and argument rejection.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/polyhedronintervalformspec1.cc.

  • PPL-SPEC-001378
    3. Polyhedral refinement of a floating interval store UID: PPL-SPEC-001378 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a dimension-compatible floating interval box, store refinement shall intersect that store with a sound box enclosure of the receiver. It shall not change the polyhedron, and shall retain every point that belonged to both the entry store and the receiver. Directed conversion and endpoint inclusion shall follow the selected interval-profile contracts; the result need not be the best box enclosure of the intersection. Dimension incompatibility shall follow the box intersection's invalid-argument channel.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Intersecting sound enclosures is safe, while abstracting before intersection can lose relational precision.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename FP_Format, typename Interval_Info>
    void refine_fp_interval_abstract_store(
     Box<Interval<FP_Format, Interval_Info>>&) const;
    
    VERIFICATION_CRITERIA:

    Check directed rational-to-floating endpoints, empty and dimension mismatch, source preservation and concrete intersection retention for relational examples.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/polyhedronintervalformspec1.cc.

  • PPL-SPEC-001667
    1. HH95 closed-polyhedron edge extrapolation UID: PPL-SPEC-001667 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For nonempty entry operands P, Q ⊆ Rn, let H = clconv(P∪Q) and let L be its lineality space. In the pointed quotient H ⁄ L, classify a vertex as old exactly when it belongs to (P + L) ⁄ L; classify the remaining vertices as new. HH95_extrapolation_assign(y) shall produce H + cone{v − u ∣ u old, v new, [u, v] an edge of H ⁄ L}, using any lifted representatives. It shall preserve ambient dimension and closed topology and contain both operands.

    Empty in either operand shall be neutral. Self-aliasing shall preserve the entry set. A distinct operand shall preserve its represented value. Incompatible dimensions shall throw std::invalid_argument before receiver value updates, including for empty operands. The set shall be independent of redundant input descriptors and initially materialized representations. No stabilization or universal precision ordering relative to HPW01 shall be required.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. No general rollback after an arithmetic or resource exception is required beyond that common contract.

    RATIONALE:

    For minimized quotient generators, two finite vertices form an edge exactly when their common saturated facets contain no third nonline generator. This minimal-face test handles nonsimple vertices; simply counting incident facets would not suffice. Ignoring hull lines in the test implements the pointed quotient. Adding those same lines to the old operand establishes its quotient membership test. Changing representatives alters a difference only by an element of L, already present in the result. For rational points, GCD-scaled numerator differences give the same ray without multiplying inhomogeneous divisors. The construction contains H by adding rays.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library; member of C_Polyhedron.

    void HH95_extrapolation_assign(const C_Polyhedron& y);
    
    VERIFICATION_CRITERIA:

    Compare saturation adjacency with public-API minimal-face intersection and affine-dimension tests. Include nonsimple square pyramids, edges and diagonals, unbounded minimal faces, multiple lineality directions, rational vertex pairs, literal lower-dimensional lifts, pending/cache/reload histories, redundant descriptions, self/empty/zero-dimensional values and dimension rejection. Check H79 precision gains and explicit ascending nonstabilizing sequences without asserting a universal HPW01 ordering.

    BIBLIOGRAPHY:

    HenzingerH95 | Extrapolation construction (extreme points, rays and adjacent old/new vertices).

    SOURCE:

    src/C_Polyhedron_defs.hh; src/C_Polyhedron.cc; tests/Polyhedron/hh95extrapolation1.cc; doc/definitions.dox.

  • PPL-SPEC-001665
    1. HPW01 closed-polyhedron extrapolation UID: PPL-SPEC-001665 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For nonempty entry receiver P and operand Q in Rn, HPW01_extrapolation_assign(y) shall replace the receiver by the intersection of the affine-hull equalities of H = clconv(P∪Q) and exactly those facet halfspaces of H whose boundary intersects P. The result shall contain H and preserve ambient dimension and closed topology.

    Empty in either operand shall be neutral. Self-aliasing shall use the entry operand twice and preserve its set. A distinct operand shall preserve its represented value. Incompatible dimensions shall throw std::invalid_argument before receiver value updates, including for empty operands. The set shall be independent of redundant input descriptors and initially materialized representations. No stabilization or universal precision ordering with HH95 extrapolation shall be required.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions. No general rollback after an arithmetic or resource exception is required beyond that common contract.

    RATIONALE:

    For a facet valid on P, its slack on points and recession rays is nonnegative and its homogeneous slack on lines is zero. Its boundary meets P exactly when a finite point generator has zero slack. Testing these products implements the boundary-intersection definition without solving one feasibility problem per facet. Equalities remain valid on both operands.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library; member of C_Polyhedron.

    void HPW01_extrapolation_assign(const C_Polyhedron& y);
    
    VERIFICATION_CRITERIA:

    Compare with public-API boundary intersections and independently known literal results. Include nonsimple and lower-dimensional hulls, rays, lines, rational vertices, changing affine hulls, pending constraints/generators, reloads, empty and zero-dimensional cases, self-aliasing and argument validation. Exhibit a strictly ascending extrapolation sequence and the nested-square precision-ordering counterexample.

    BIBLIOGRAPHY:

    HenzingerPW01 | Section 3.3 (operator definition).

    SOURCE:

    src/C_Polyhedron_defs.hh; src/C_Polyhedron.cc; tests/Polyhedron/hpw01extrapolation1.cc; doc/definitions.dox.

  • PPL-SPEC-001672
    1. Polyhedral envelope from entry constraint descriptions UID: PPL-SPEC-001672 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    envelope_assign(y) shall capture the constraint descriptions of the entry receiver P and source Q, as obtained by constraints() without an additional minimization request. Each equality shall supply both opposite non-strict inequalities. The completed receiver shall denote exactly the intersection of those candidate inequalities satisfied by both operands. Included or excluded NNC boundaries shall retain their inequality meaning. Ambient dimension and topology shall be preserved.

    Descriptions shall be captured before support queries can normalize their caches. Precision may depend on redundant inequalities or the descriptions materialized at entry. No particular minimal output description is required. Empty shall be neutral, self-aliasing shall preserve the value, and a distinct source shall preserve its represented value. Incompatible dimensions or topologies shall raise std::invalid_argument before querying or normalizing either operand.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logical cache normalization may change materialized descriptions while preserving represented values. Resource and arithmetic exceptions shall obey that common contract.

    RATIONALE:

    Every retained half-space contains both entry sets, so their intersection contains the polyhedral hull. Equality splitting permits retention of one valid side when the other side excludes an operand. A candidate description can include additional valid directions through redundant inequalities, which explains its precision dependence.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The member is inherited by C_Polyhedron and NNC_Polyhedron.

    void Polyhedron::envelope_assign(const Polyhedron& y);
    
    VERIFICATION_CRITERIA:

    Check literal boxes, points, rays and lines, alternate affine descriptions and a redundant diagonal cut. Check all scalar endpoint-openness combinations both with generator queries and in higher-dimensional LP cylinders. Exercise unknown empty sets, including strict systems whose closure is nonempty; compatibility rejection before empty shortcuts; aliasing, pending descriptions, source-value preservation, reload and assessed allocation failures.

    BIBLIOGRAPHY:

    BemporadFT01 | Section 3, equation (3) (envelope definition); Section 4, Algorithm 4.1, steps 1–2. BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC boundary semantics).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralenvelope1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001673
    2. Captured inequality candidates for polyhedral approximations UID: PPL-SPEC-001673 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid constraint system, polyhedron_join_inequalities shall return owned candidate rows equivalent to its non-tautological inequalities, replacing each equality by its two opposite non-strict inequalities. Rows equivalent under the normalized constraint ordering shall occur once. The input shall be preserved. The ordering predicate shall agree with the sign of compare(x,y). Capturing the returned rows shall not request polyhedral minimization. Arithmetic-profile conditions shall include constructing both equality orientations.

    RATIONALE:

    Owned snapshots keep candidate selection independent of later cache updates. Opposite inequalities preserve equality meaning while allowing different validity outcomes on the other operand.

    INTERFACE:

    Translation unit: src/Polyhedron_joins.cc; anonymous namespace.

    struct Polyhedron_Join_Less {
      bool operator()(const Constraint& x, const Constraint& y) const;
    };
    using Polyhedron_Join_Rows
      = std::set<Constraint, Polyhedron_Join_Less>;
    Polyhedron_Join_Rows
    polyhedron_join_inequalities(const Constraint_System& cs);
    
    VERIFICATION_CRITERIA:

    Directly check tautologies, inconsistent constants, equality orientations, strict and non-strict rows, duplicates, ordering and source independence. Check their public envelope effects on descriptions that minimization would otherwise replace.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralenvelope1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001674
    3. Exact support queries for polyhedral approximations UID: PPL-SPEC-001674 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Polyhedron_Join_Support shall borrow its source polyhedron and own any temporary LP. With generator mode selected, it shall use the existing exact polyhedral queries. Otherwise it shall build and reuse a continuous MIP model of the system obtained by weakening strict inequalities. It shall establish original-set emptiness: an infeasible weakened system is empty; a feasible weakened system with strict rows shall additionally be checked by exact feasibility of the original system.

    For a nonempty source and an in-dimension expression, minimum shall return finite == false exactly when the expression is unbounded below. A finite result shall have a positive denominator and its numerator/denominator shall equal the source infimum. For the corresponding finite result, attained shall return true exactly when the original source contains an infimizing point. The LP route shall decide this by feasibility of the original system intersected with the equality face; systems without strict rows shall attain every finite infimum. The presence of strict rows shall be determined once during construction.

    includes shall accept a non-strict or strict candidate inequality and return true exactly when every source point satisfies it. Its source shall be nonempty. For a strict row, a zero infimum shall imply validity exactly when that infimum is unattained.

    Source objects shall remain alive while queries are issued, and their represented values shall be preserved. The LP route shall borrow an unchanged original description. Generator queries may normalize caches. After the final query, destruction shall release only owned LP state, without querying the borrowed source. Non-finite numerical fields and the LP-side cached attainment field are unspecified. The common conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply.

    RATIONALE:

    For a nonempty finite linear system, weakening strict rows gives its closure: convex combinations with an original feasible point approach every point of the weakened system while satisfying all original strict rows. Infima therefore agree. Original feasibility must be established separately because weakening can turn an empty strict system into a nonempty closed one. Equality-face feasibility exactly characterizes attainment. Changing an LP objective preserves feasibility, so a completed solve is either optimized or downward unbounded.

    INTERFACE:

    Translation unit: src/Polyhedron_joins.cc; anonymous namespace.

    struct Polyhedron_Join_Bound {
      bool finite;
      Coefficient numerator;
      Coefficient denominator;
      bool attained;
    };
    class Polyhedron_Join_Support {
    public:
      Polyhedron_Join_Support(const Polyhedron& p, bool use_generators);
      bool empty() const;
      Polyhedron_Join_Bound minimum(const Linear_Expression& e);
      bool attained(const Linear_Expression& e,
                    const Polyhedron_Join_Bound& bound) const;
      bool includes(const Constraint& c);
    };
    
    VERIFICATION_CRITERIA:

    Compare both backends with literal rational infima, attained and unattained boundaries, unbounded expressions and all validity sign cases. Include contradictory closed systems and strict-empty systems with feasible and infeasible closures. Verify temporary ownership, source-value preservation, repeated objective changes and cleanup under assessed allocation failures.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Sections 2.1–2.3 (closed and NNC polyhedra and membership).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralenvelope1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001676
    5. Homogeneous directions for weak polyhedral join UID: PPL-SPEC-001676 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Given candidate rows captured from two nonempty operands after tautology removal and equality splitting, polyhedron_join_directions shall return one normalized non-strict zero-constant row for every distinct positive-scaling class of their homogeneous parts. Orientations shall be preserved. Inputs shall be preserved. Each input row shall have a nonzero homogeneous part under these preconditions.

    RATIONALE:

    A non-tautological constant row is inconsistent, so it cannot occur in a nonempty operand. A second zero-vector scan is unnecessary under the stated preconditions. Zeroing constants and using normalized inequality ordering identifies equal directions without identifying opposite orientations.

    INTERFACE:

    Translation unit: src/Polyhedron_joins.cc; anonymous namespace.

    Polyhedron_Join_Rows polyhedron_join_directions(
        const Polyhedron_Join_Rows& xs, const Polyhedron_Join_Rows& ys);
    
    VERIFICATION_CRITERIA:

    Check positive scalings, opposite orientations from equalities, repeated directions with different constants and independence of input rows. Check their effects on literal weak joins with and without an additional redundant direction.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralweakjoin1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001677
    6. Weak join with exact directional bounds and NNC attainment UID: PPL-SPEC-001677 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    weak_join_assign(y) shall capture the constraint descriptions of the entry receiver P and source Q through constraints() without an additional minimization request. Split equalities into both opposite inequalities, and let D contain their distinct nonzero homogeneous directions. For nonempty operands, for each a ∈ D bounded below on both sets, let ma = min(infp ∈ Pa⋅p, infq ∈ Qa⋅q). The completed receiver shall denote the intersection of a⋅x ≥ ma, omitting unbounded directions. In NNC topology the inequality shall be strict exactly when no point of either operand attains ma.

    Candidates shall be captured before support queries can normalize their caches. Precision may depend on redundant directions and materialized descriptions; no minimal output description is required. The result shall contain the polyhedral hull and be contained in the envelope for the same entry descriptions. Empty shall be neutral, self-aliasing shall preserve the value, and a distinct source shall preserve its represented value. Ambient dimension and topology shall be preserved. Incompatible dimensions or topologies shall raise std::invalid_argument before querying or normalizing either operand.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logical cache normalization may change materialized descriptions while preserving represented values. Resource and arithmetic exceptions shall obey that common contract.

    RATIONALE:

    Each directional bound is the strongest half-space of that orientation containing both operands. Its infimum value and attainment determine whether the limiting boundary is included. Every retained envelope inequality is implied by the corresponding tight bound, proving the ordering between hull, weak join and envelope. The conference definition specifies this construction for closed polyhedra; the journal reference supplies NNC membership semantics for the stated attainment extension.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The member is inherited by C_Polyhedron and NNC_Polyhedron.

    void Polyhedron::weak_join_assign(const Polyhedron& y);
    
    VERIFICATION_CRITERIA:

    Check literal scalar endpoint combinations, rational bounds and independently derived multidimensional examples with distinct directions. Exercise both bound orderings, equal and unequal denominators, sign changes, ties with one or both minima attained, unbounded directions, incompatible operands, aliasing, unknown empty sets, pending/cache histories, reload, source-value preservation and assessed allocation failures. Compare independent generator support oracles with the LP path.

    BIBLIOGRAPHY:

    SankaranarayananCSM06 | Section 3, Definition 5 (weak join and equality splitting). BagnaraHZ10CGTA | Sections 2.1–2.3 (NNC semantics).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralweakjoin1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001678
    7. Comparison of finite rational support bounds UID: PPL-SPEC-001678 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For finite bounds with positive denominators, polyhedron_join_compare_bounds shall return a negative, zero or positive integer exactly when the first quotient is smaller than, equal to or greater than the second. Equal denominators shall compare numerators without products; unequal numerator signs shall compare signs without products. Otherwise cross-products shall be compared under the selected coefficient profile's intermediate-range conditions. Inputs shall be preserved.

    RATIONALE:

    Common integral bounds and equal-denominator rational endpoints need no cross-products. Sign differences also determine order directly. Avoiding those products removes allocations for large GMP values and avoids unnecessary bounded-integer overflow.

    INTERFACE:

    Translation unit: src/Polyhedron_joins.cc; anonymous namespace.

    int polyhedron_join_compare_bounds(const Polyhedron_Join_Bound& x,
                                      const Polyhedron_Join_Bound& y);
    
    VERIFICATION_CRITERIA:

    Compare with independent arbitrary-precision rational ordering over equal and unequal positive denominators and every numerator-sign pairing. Include zero, equal quotients and bounded-coefficient endpoint cases where the avoided products would overflow.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralweakjoin1.cc; tests/Polyhedron/joinfailure1.cc; tests/Polyhedron/joinsupport1_impl.cc.

  • PPL-SPEC-001664
    1. Exact Minkowski sum of polyhedra UID: PPL-SPEC-001664 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry operands P, Q ⊆ Rn, minkowski_sum_assign(y) shall replace the receiver by exactly P + Q = {p + q ∣ p ∈ P, q ∈ Q}. Ambient dimension and the receiver's closed or NNC topology shall be preserved. Empty in either operand shall yield empty; two nonempty zero-dimensional operands shall yield the zero-dimensional universe. Dimensions and topologies shall agree, otherwise std::invalid_argument shall be thrown before changing the represented value of the receiver. Self-aliasing shall use the entry operand twice. A distinct operand shall preserve its represented value.

    Excluded NNC boundaries shall retain their membership meaning. The represented result shall be independent of whether constraints or generators were initially materialized. No particular redundant or minimized description is required.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Logical cache normalization may preserve the mathematical value while changing its materialized representations. No general rollback after an arithmetic or resource exception is required beyond that common contract.

    RATIONALE:

    Taking the Cartesian product and mapping (p, q) ↦ p + q establishes exactness independently of the storage route. In generator form, a finite pair is an included point exactly when both contributing generators are included points, and is a closure point otherwise. Products of the operands' convex weights construct the finite pair sums. Positive total weight on included points in each input gives positive total weight on included point–point pairs. Conversely, the marginal weights of a valid output combination are valid input combinations. Ray cones and line spans add by retaining their generating directions. This proves the NNC construction as well as the closed case. Convexity gives P + P = 2P for self-addition. Using the least common denominator and combining only coordinate slots avoids unnecessary denominator products and temporary inhomogeneous sums.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. This public Polyhedron member is inherited by C_Polyhedron and NNC_Polyhedron.

    void minkowski_sum_assign(const Polyhedron& y);
    
    VERIFICATION_CRITERIA:

    Check literal endpoint sums and endpoint inclusion for closed, open and half-open scalar sets. Cover rational points with equal and unequal divisors, including a checked-int8 case whose least common denominator fits while the unreduced product does not. Compare boxes, triangles, deterministic point clouds, lower-dimensional and unbounded sets with the public Cartesian-product reference where admitted. Check both operand orders, self-addition, pending constraints and generators, sorted and unsorted NNC systems, borrowed source views after completion, invalid dimensions and topologies, reload, empty and zero-dimensional inputs. Validate checked-overflow reporting and temporary ownership under the common failure contract.

    BIBLIOGRAPHY:

    Fukuda04JSC | Whole work (background on Minkowski addition and vertex representations). BagnaraHZ10CGTA | Sections 2.1–2.3, Definition 2.2 (closed and NNC generator semantics).

    SOURCE:

    doc/definitions.dox: Minkowski Addition; src/Polyhedron_defs.hh; src/Polyhedron_public.cc; tests/Polyhedron/minkowskisum1.cc.

  • PPL-SPEC-001338
    1. Polyhedral constraint addition and refinement UID: PPL-SPEC-001338 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The rvalue add_constraints overload shall permit transferring owned rows through prepared insertion, with the compatibility and ownership guarantees of recycled insertion. Adding an admitted constraint or system shall compute its exact conjunction with the receiver. Closed addition shall reject strict rows with std::invalid_argument; NNC addition shall preserve their strictness. Refinement shall use the same conjunction for admitted topology-compatible rows. In a closed receiver, refinement by a strict inequality may relax it to the corresponding non-strict inequality; a false constant shall still yield empty. Trailing free dimensions shall be retained. Excess descriptor dimension shall throw std::invalid_argument. External const input shall be preserved. Recycled input may be consumed and need only remain safely destructible on return. Pending descriptions shall retain all previously added restrictions.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Closed polyhedra can conservatively relax a strict boundary during refinement, while exact addition must reject unrepresentable topology.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void add_constraint(const Constraint&);
    void add_constraints(const Constraint_System&);
    void add_constraints(Constraint_System&&);
    void add_recycled_constraints(Constraint_System&);
    void refine_with_constraint(const Constraint&);
    void refine_with_constraints(const Constraint_System&);
    
    VERIFICATION_CRITERIA:

    Check pending and minimized histories, contradictions, strict topology admission/relaxation, zero dimensions, borrowed descriptor inputs and recycled ownership. Check strict zero contradictions separately from ordinary strict relaxation, with padded and unpadded dense/sparse rows, zero and positive dimensions, processed/pending histories, both refinement APIs and unchanged const inputs.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/addconstraint1.cc; tests/Polyhedron/addconstraints1.cc; tests/Polyhedron/addconstraints2.cc; tests/Polyhedron/refinewithconstraint1.cc; tests/Polyhedron/refinewithconstraints1.cc; tests/Polyhedron/recycledsystems1.cc. src/Constraint_System.cc; tests/systembulktransferspec1.cc.

  • 2. Polyhedral congruence addition and conservative refinement UID: PPL-SPEC-001339 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Addition shall conjoin equality congruences exactly, ignore tautologies, and set empty for contradictions. A proper congruence that is neither constant-true nor constant-false shall throw std::invalid_argument. Refinement shall conjoin equality congruences exactly and may ignore proper congruences. Bulk refinement shall recognize contradictory proper congruences; single refinement in positive ambient dimension may retain the receiver for a proper congruence, including a contradiction. In zero dimensions it shall use the congruence's truth value. Excess descriptor dimension shall throw std::invalid_argument. Const external inputs shall be preserved; recycled inputs need only remain destructible. The source and receiver may have lower and higher dimensions respectively, with trailing coordinates free.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Periodic restrictions are generally nonconvex. Exact addition rejects nonrepresentable rows, while refinement provides an explicit conservative approximation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void add_congruence(const Congruence&);
    void add_congruences(const Congruence_System&);
    void add_recycled_congruences(Congruence_System&);
    void refine_with_congruence(const Congruence&);
    void refine_with_congruences(const Congruence_System&);
    
    VERIFICATION_CRITERIA:

    Check equality, tautological and contradictory proper rows in single and bulk routes, rejected periodic additions, empty/zero dimensions and const/recycled input ownership.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/addcongruence1.cc; tests/Polyhedron/addcongruences1.cc; tests/Polyhedron/refinewithcongruence1.cc; tests/Polyhedron/refinewithcongruences1.cc.

  • PPL-SPEC-001340
    3. Polyhedral generator insertion UID: PPL-SPEC-001340 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The rvalue add_generators overload shall permit transferring owned rows through prepared insertion, with the compatibility and ownership guarantees of recycled insertion. Generator insertion shall extend the receiver's generator description with the supplied generators and denote that combined description exactly. Inserting points shall form their polyhedral hull with the receiver; rays and lines shall extend recession directions and NNC closure points shall extend closure support without themselves acquiring membership. Empty input shall be a no-op. If the receiver is empty, a nonempty insertion shall contain an included point or throw std::invalid_argument. Closed receivers shall reject closure points; excess descriptor dimension shall be rejected, both by std::invalid_argument. Const external sources shall retain their values. Recycling may consume storage; its source need only remain destructible.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Generator addition changes the hull or recession cone rather than intersecting the pointset.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void add_generator(const Generator&);
    void add_generators(const Generator_System&);
    void add_generators(Generator_System&&);
    void add_recycled_generators(Generator_System&);
    
    VERIFICATION_CRITERIA:

    Check latent empty receivers, all generator kinds, points supplied after directions, fractional coordinates, borrowed rows/systems, topology rejection and recycle ownership.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/addgenerator1.cc; tests/Polyhedron/addgenerator2.cc; tests/Polyhedron/addgenerators1.cc; tests/Polyhedron/addgenerators2.cc; tests/Polyhedron/recycledsystems1.cc; tests/systembulktransferspec1.cc.

  • PPL-SPEC-001341
    4. Exact polyhedral intersection UID: PPL-SPEC-001341 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal dimensions and compatible topologies, intersection shall replace the receiver by its exact intersection with the operand, including strict NNC boundaries. Self-intersection shall preserve the value. Empty shall be absorbing and universe neutral. Incompatible dimensions or topologies shall throw std::invalid_argument before mutation. A distinct operand shall retain its value.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Conjoining both systems of constraints is the meet of the selected polyhedral domain.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void intersection_assign(const Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Compare against independently combined literal constraints, boundary-only contacts, latent emptiness, self aliasing, pending caches and mismatch rejection.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/intersection1.cc.

  • PPL-SPEC-001342
    5. Polyhedral hull and exact-union recognition UID: PPL-SPEC-001342 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Hull assignment shall return the least polyhedron of the receiver's topology containing both operands; upper_bound_assign shall be equivalent. The closed hull may add limiting boundary points that the convex hull excludes. The same-type *_if_exact variants shall return true and assign the hull exactly when the set union is already representable as one polyhedron of that topology. On false they shall preserve the receiver's set. Dimension/topology mismatches shall throw std::invalid_argument. A distinct operand shall retain its value; self-hull shall preserve the receiver.

    Ordinary hull assignment shall leave the existing caches intact for a self join or for operands that have matching complete current descriptions of the same kind. Matching shall compare ordered stored rows and the pending boundary. A current description is complete when the opposite description has no pending rows.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Convexification can fill gaps and topology can add limits; exact-union recognition must distinguish both effects.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void poly_hull_assign(const Polyhedron&);
    void upper_bound_assign(const Polyhedron&);
    // Same-type members, for both concrete polyhedron classes:
    bool poly_hull_assign_if_exact(const C_Polyhedron&);
    bool upper_bound_assign_if_exact(const C_Polyhedron&);
    bool poly_hull_assign_if_exact(const NNC_Polyhedron&);
    bool upper_bound_assign_if_exact(const NNC_Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check overlapping, disjoint and facet-touching sets, open and closed boundary contacts, nonclosed convex hull examples, false-result preservation and self aliasing. Compare stored descriptions after joins with copies in both topologies. Check that different pending constraints or generators still take part in hull computation when the opposite cached descriptions agree.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Sections 2.1–2.2 (polyhedral hull); Sections 3.1–3.2, Theorems 3.2 and 3.6 (exact-union recognition).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/polyhull1.cc; tests/Polyhedron/polyhull2.cc; tests/Polyhedron/polyhullifexact1.cc; tests/Polyhedron/polyhullifexact2.cc; tests/Polyhedron/facetcontacthulls1.cc.

  • PPL-SPEC-001343
    6. Polyhedral enclosure of set difference UID: PPL-SPEC-001343 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Difference assignment shall return the smallest polyhedron of the receiver's topology containing the set-theoretic difference of the entry receiver and operand. The closed variant shall close the convex polyhedral difference where needed. It shall not claim that the result excludes every operand point. Empty difference shall return empty. difference_assign shall be equivalent to poly_difference_assign. Dimension/topology mismatch shall throw std::invalid_argument; a distinct operand shall preserve its value.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Set difference can be nonconvex or nonclosed, so representability determines the required hull and closure.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void poly_difference_assign(const Polyhedron&);
    void difference_assign(const Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check interval subtraction, holes whose convex hull restores removed points, endpoint exclusions, self difference, empty/universe and mismatch rejection. Check closed and NNC difference against literal halfspace complements and restored convex hulls, with dense/sparse systems, different dimensions and pending or minimized caches. After operand destruction, verify the result, invariants, alias entry point, independent copies and self difference.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/polydifference1.cc; tests/Polyhedron/polydifference2.cc.

  • PPL-SPEC-001344
    7. Polyhedral context-preserving simplification UID: PPL-SPEC-001344 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For compatible operands, simplification shall return a polyhedron containing the entry receiver and having the same intersection with the context. A false result shall certify that this intersection is empty; true shall not alone establish nonemptiness. The context shall preserve its value. The operation need not preserve the receiver outside the context or return a unique simplification. Dimension/topology mismatch shall throw std::invalid_argument.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Constraints irrelevant under the context can be removed without changing states that matter within it.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool simplify_using_context_assign(const Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check independent intersections before/after, implication and disjoint contexts, true/false outcomes, self context and pending representations.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/simplifyusingcontext1.cc; tests/Polyhedron/simplifyusingcontext2.cc.

  • 1. Reloadable polyhedral ASCII descriptions UID: PPL-SPEC-001373 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump shall write a reloadable description including ambient dimension, topology, authoritative and pending descriptions, status and saturation data, without changing the receiver's represented set. ascii_load of a complete valid description of the receiver's topology shall restore that same set and dimension, independently of its previous value and cache history. A successful load shall leave a valid representation of the receiver's concrete topology. Invalid syntax, dimensions or topology, and descriptor rows or systems that violate their own invariants, shall return false without relying on debug assertions. Loading is specified for trusted records written by ascii_dump with a compatible build. The consistency of the descriptions with one another and with the status flags is validated by the available invariant checks. Altered records can pass those checks. Failure may leave a partially replaced receiver whose ownership permits destruction. Rollback and further queries shall not be assumed. The description headers shall agree with the status flags. A current saturation matrix shall match the processed row counts before its entries are retained. Obsolete saturation data shall be read without being restored to the loaded representation. print() and ascii_dump() shall write the corresponding representations to standard error. Human-readable pointset output shall not promise a reloadable format or stable descriptor order.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    The internal status contract shall follow 🔗 4. Polyhedron internal status signed-keyword export.

    The internal status contract shall follow 🔗 5. Polyhedron internal status signed-keyword loading and rejection.

    RATIONALE:

    Reloadable representation data carry authoritative status and topology; successful loading cannot leave those claims inconsistent with the concrete value type.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    void ascii_dump(std::ostream&) const;
    bool ascii_load(std::istream&);
    void print() const;
    void ascii_dump() const;
    namespace IO_Operators {
     std::ostream& operator<<(std::ostream&, const Polyhedron&);
    }
    
    VERIFICATION_CRITERIA:

    Round-trip literal values with pending/alternate caches, empty/zero dimensions and both topologies. Reject truncated, cross-topology and structurally inconsistent records in assertion and optimized builds. Check stream identity, external stream failures and failed-load destruction.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/ascii_dump_load1.cc; tests/Polyhedron/ascii_dump_load2.cc; tests/Polyhedron/ascii_dump_load3.cc; tests/Polyhedron/loadstatus1.cc; tests/Polyhedron/writepolyhedron1.cc; tests/Polyhedron/writepolyhedron2.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc.

  • PPL-SPEC-001374
    2. Polyhedral memory accounting UID: PPL-SPEC-001374 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    External memory accounting shall sum the dynamically owned storage reported by the constraint system, generator system and both saturation matrices, including retained capacities according to those container contracts. Total memory shall equal external memory plus sizeof(Polyhedron). Queries shall preserve values and ownership and shall not materialize new descriptions merely to compute the count. The count shall not promise process-resident size or allocator metadata.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Owned backing storage differs from mathematical size, active rows and process-level memory usage.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Observe actual component backing allocations, spare capacity, pending matrices, empty and dimension shrink/growth histories; verify total-minus-external and absence of query allocations.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/membytes1.cc; tests/Polyhedron/memory2.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc.

  • PPL-SPEC-001375
    3. Polyhedron representation invariant query UID: PPL-SPEC-001375 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK(false) shall recognize admitted owned representations whose constraint/generator topologies, dimensions, status, pending boundaries and current saturation data meet the representation invariants. Current representations shall agree on the represented set, and descriptions declared minimal shall satisfy the corresponding redundancy conditions. OK(true) shall additionally require nonemptiness. A latent inconsistent constraint description may satisfy the structural query without having its empty status materialized. The query may use independent temporary normalization and may allocate or propagate supported failures; it shall preserve the receiver's value. Diagnostic wording shall not be a stable interface. The receiver's storage shall already be live and destructible; this query shall not be a validator for arbitrary corrupted addresses.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    The internal status contract shall follow 🔗 3. Polyhedron internal status consistency predicate.

    RATIONALE:

    Status and saturation shortcuts are safe only when their representation claims hold; checking owned structures is distinct from dereferencing arbitrary untrusted pointers.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool OK(bool check_not_empty=false) const;
    
    VERIFICATION_CRITERIA:

    Check valid pending/cache histories and independently constructed owned counterexamples for status, topology, dimensions, saturation shape and incompatible dual descriptions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/loadstatus1.cc; tests/Polyhedron/recycledsystems1.cc; tests/Polyhedron/systemidentity1.cc; src/Ph_Status.cc; tests/polyhedronpersistencespec1.cc.

  • PPL-SPEC-001326
    1. Polyhedron ambient and affine dimensions UID: PPL-SPEC-001326 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall return the ambient dimension without changing the represented value. affine_dimension() shall return zero for empty and otherwise the dimension of the smallest affine space containing the receiver. It shall count excluded closure points only through the affine hull they share with included points, and shall preserve the represented set.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Ambient dimension and affine rank differ for equalities and for empty sets.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Use independent rational ranks for singletons, segments, flats, full-dimensional and empty sets across both topologies and cache histories.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/empty1.cc; tests/Polyhedron/constraints1.cc; tests/Polyhedron/minconstraints1.cc.

  • PPL-SPEC-001327
    2. Equivalent borrowed polyhedral descriptions UID: PPL-SPEC-001327 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed-description accessors shall require an lvalue receiver, with corresponding const && overloads deleted. Returned descriptions shall not extend the receiver's lifetime.

    Constraint and generator accessors shall return receiver-owned const views whose descriptions denote exactly the receiver, including pending changes, latent emptiness, equalities and excluded NNC boundaries. Minimized accessors shall additionally remove redundant visible descriptors; they shall not promise a particular row order, coefficient scale or unique minimal representation.

    A returned view, its iterators, rows and coefficient references shall be used only while the receiver lives and before an operation replaces or normalizes that representation. Logically const access to the opposite representation may invalidate them. Inputs explicitly permitted to borrow receiver coefficients shall be consumed according to the operation's entry-value contract before such invalidation. External copied descriptions shall own independent values.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Dual descriptions and pending rows are storage choices; their materialization must not change the set or boundary membership.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    const Constraint_System& constraints() const &;
    const Constraint_System& minimized_constraints() const &;
    const Generator_System& generators() const &;
    const Generator_System& minimized_generators() const &;
    
    VERIFICATION_CRITERIA:

    Round-trip independent constraint/generator descriptions, pending histories, redundant rows, closure-point supports and empty/zero-dimensional states. Check independent copied views and valid borrowing intervals.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | whole work (background) BagnaraHZ10CGTA | Sections 2.1–2.3, Theorems 2.1 and 2.3, Definition 2.2 (closed and NNC generator semantics).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/constraints1.cc; tests/Polyhedron/minconstraints1.cc; tests/Polyhedron/minconstraints2.cc; tests/Polyhedron/generators1.cc; tests/Polyhedron/mingenerators1.cc; tests/Polyhedron/mingenerators2.cc; tests/Polyhedron/systemidentity1.cc.

  • PPL-SPEC-001328
    3. Polyhedral equality-congruence extraction UID: PPL-SPEC-001328 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    congruences() shall return an independently owned system of equality congruences satisfied by every receiver point. minimized_congruences() shall return a nonredundant equality system defining exactly the receiver's affine hull, or an inconsistent system for empty. A nonminimized extraction need not expose equalities implied only by inequalities. Dimension shall be retained; proper periodic congruences shall not be introduced.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Only affine equalities constrain the affine hull of a convex polyhedron; periodic rows would add a distinct discrete restriction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    Congruence_System congruences() const;
    Congruence_System minimized_congruences() const;
    
    VERIFICATION_CRITERIA:

    Check implicit equalities, redundancy, empty/universe, NNC facets and independent extracted-system ownership.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/congruences1.cc.

  • PPL-SPEC-001329
    4. Exact elementary polyhedral predicates UID: PPL-SPEC-001329 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The predicates shall decide, respectively, emptiness, equality with the ambient universe, topological closedness as a real pointset, discreteness and boundedness. Discreteness shall mean affine dimension zero; thus empty and singletons shall be discrete. Empty shall be bounded and closed. NNC storage shall not itself imply that the set is nonclosed. Pending or nonminimal descriptions shall not change these decisions.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    A nonempty convex discrete set is a singleton; topological properties belong to the represented set rather than its selected encoding.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool is_empty() const;
    bool is_universe() const;
    bool is_topologically_closed() const;
    bool is_discrete() const;
    bool is_bounded() const;
    
    VERIFICATION_CRITERIA:

    Check fractional singletons, open/closed intervals, unbounded lines and rays, redundant strict rows, latent contradictions and zero dimensions.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/empty1.cc; tests/Polyhedron/universe1.cc; tests/Polyhedron/universe2.cc; tests/Polyhedron/topclosed1.cc; tests/Polyhedron/bounded1.cc.

  • PPL-SPEC-001330
    5. Exact integer-point existence in polyhedra UID: PPL-SPEC-001330 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    contains_integer_point() shall return true exactly when the receiver contains a tuple integral in every coordinate. Empty shall return false and zero-dimensional universe true. Excluded boundary points of an NNC polyhedron shall not count. The decision shall preserve the receiver's represented set.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Rational feasibility does not imply integer feasibility, and closing an NNC set can introduce its only integer candidates.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool contains_integer_point() const;
    
    VERIFICATION_CRITERIA:

    Check fractional singletons, integer-free open intervals, relationally infeasible integer systems, unbounded sets, zero dimensions and all representation histories.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/containsintegerpoint1.cc.

  • PPL-SPEC-001331
    6. Polyhedral set comparison and hashing UID: PPL-SPEC-001331 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal dimensions and compatible topologies, containment, strict containment, equality and disjointness shall decide the corresponding exact set relations. Containment shall include equality; strict containment shall exclude it. Empty-set relations shall follow set theory. Incompatible dimensions or topologies shall throw std::invalid_argument for the binary member queries; equality shall return false for unequal dimensions or topologies. Inequality expressions shall negate equality. Equal values shall have equal hashes; hash collisions shall not establish equality. Representation history shall not affect these results.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Comparison is extensional, whereas hashing is only a compatible classification with permitted collisions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool contains(const Polyhedron&) const;
    bool strictly_contains(const Polyhedron&) const;
    bool is_disjoint_from(const Polyhedron&) const;
    bool operator==(const Polyhedron&, const Polyhedron&);
    // Inequality uses C++20 rewriting of operator==.
    int32_t hash_code() const;
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Check strict boundary contacts, equal values with different histories, empty values, dimension/topology mismatch and hash agreement under normalization.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/contains1.cc; tests/Polyhedron/contains2.cc; tests/Polyhedron/disjoint1.cc; tests/Polyhedron/disjoint2.cc; tests/Polyhedron/equals1.cc.

  • PPL-SPEC-001332
    7. Exact polyhedron relation with a constraint UID: PPL-SPEC-001332 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(c) shall classify the exact intersection with the set satisfying c. It shall include is_included() exactly when every receiver point satisfies c, is_disjoint() exactly when none does, and strictly_intersects() when some satisfy it and some do not. It shall include saturates() exactly when every receiver point satisfies the boundary equality of c. Empty shall therefore be included, disjoint and saturating. Excess descriptor dimension shall throw std::invalid_argument.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Boundary equality and satisfaction differ for strict inequalities, including when every point lies on their excluded boundary.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    Poly_Con_Relation relation_with(const Constraint&) const;
    
    VERIFICATION_CRITERIA:

    Check equality, strict and non-strict constraints against interior, boundary and crossing examples; include empty, zero dimensions and excess descriptor dimension.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/relations1.cc; tests/Polyhedron/relations2.cc; tests/Polyhedron/relations3.cc.

  • PPL-SPEC-001333
    8. Exact polyhedron relation with a generator UID: PPL-SPEC-001333 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    relation_with(g) shall return subsumes() exactly when an included point belongs to the receiver, a closure point belongs to its closure, a ray is a recession direction, or a line is a two-sided recession direction, according to g's kind. Otherwise it shall return nothing(). Empty shall subsume no generator. Excess dimension shall throw std::invalid_argument; shorter generators shall use zero trailing coordinates.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Closure membership and directional inclusion are distinct from membership of an ordinary point.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    Poly_Gen_Relation relation_with(const Generator&) const;
    
    VERIFICATION_CRITERIA:

    Check every generator kind on open facets, bounded and unbounded sets, empty/universe, zero padding and dimension rejection.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/relations1.cc; tests/Polyhedron/relations2.cc; tests/Polyhedron/relations3.cc.

  • PPL-SPEC-001334
    9. Exact polyhedron relation with a congruence UID: PPL-SPEC-001334 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Equality congruences shall use the constraint relation in 🔗 7. Exact polyhedron relation with a constraint. For a proper congruence, is_included() shall mean that every point satisfies it, is_disjoint() that none does, and strictly_intersects() that some but not all do. A nonempty polyhedron with a nonconstant congruence expression can be included only when the expression is constant at an admitted residue; that case shall also be saturates(). An excluded closure point shall not establish an intersection. Empty shall be included, disjoint and saturating. Constant congruences shall retain their arithmetic truth value. Excess dimension shall throw std::invalid_argument.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    A nonconstant affine expression on a convex set cannot take only separated lattice values. Endpoint inclusion matters when deciding whether a residue is attained.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    Poly_Con_Relation relation_with(const Congruence&) const;
    
    VERIFICATION_CRITERIA:

    Use independent interval/residue calculations, open endpoints, non-axis expressions, constant congruences, empty and dimension mismatch.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/relations2.cc.

  • PPL-SPEC-001335
    10. Polyhedral coordinate and expression boundedness UID: PPL-SPEC-001335 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty receiver, constrains(v) shall return true exactly when it differs from its cylindrification in coordinate v. Empty shall return true for an admitted coordinate. bounds_from_above(e) and bounds_from_below(e) shall decide existence of finite upper and lower bounds for the affine expression; both shall return true for empty. A constant expression shall be bounded on every receiver. An invalid coordinate or excess expression dimension shall throw std::invalid_argument.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    An affine expression may be bounded by relations even when each participating coordinate is unbounded.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool constrains(Variable) const;
    bool bounds_from_above(const Linear_Expression&) const;
    bool bounds_from_below(const Linear_Expression&) const;
    
    VERIFICATION_CRITERIA:

    Check free/coupled coordinates, constant and relationally bounded expressions, recession directions, empty and argument validation.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/constrains1.cc; tests/Polyhedron/bounds1.cc; tests/Polyhedron/querydimensioncontracts1.cc.

  • PPL-SPEC-001336
    11. Exact rational polyhedral extrema and witnesses UID: PPL-SPEC-001336 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Maximization and minimization shall return true exactly when the receiver is nonempty and the expression has a finite supremum or infimum. On true, numerator and positive denominator shall represent that exact rational bound; the attainment flag shall say whether it belongs to the expression's image. The witness overload shall return an included point attaining the bound when attained, otherwise a closure point of the receiver attaining that bound. On false all scalar, flag and witness outputs shall remain unchanged. An excess expression dimension shall throw std::invalid_argument. The receiver's set and external expression shall be preserved. Bounded-coefficient generator scalar products and extremum comparisons shall use exact working arithmetic until the final translated rational extremum is reduced. Comparison-only values and unreduced numerators shall not require coefficient admission; the returned numerator and denominator shall.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Finite extrema can be unattained on NNC sets; a closure witness proves the bound without asserting membership.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    
    VERIFICATION_CRITERIA:

    Use literal rational intervals and linear images of simplices, open endpoints, constant expressions, lines/rays, negative values, sentinel false outputs and witness substitution.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/max_min1.cc; tests/Polyhedron/querydimensioncontracts1.cc; tests/exactboundedworking1.cc; src/Linear_Expression.cc; src/Linear_Expression_defs.hh.

  • PPL-SPEC-001337
    12. Constant affine-expression frequency in polyhedra UID: PPL-SPEC-001337 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    frequency(e,...) shall return true exactly when the receiver is nonempty and the expression takes a single value on it. On true, frequency shall be 0/1 and the value outputs shall represent that exact rational value with positive denominator. On false all four outputs shall remain unchanged. Excess expression dimension shall throw std::invalid_argument. A nonconstant expression on a convex set shall not be reported as a positive discrete frequency.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    The image of a convex set under an affine expression is convex, so a discrete image must be a singleton.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    bool frequency(const Linear_Expression&, Coefficient& freq_n,
                   Coefficient& freq_d, Coefficient& val_n,
                   Coefficient& val_d) const;
    
    VERIFICATION_CRITERIA:

    Check empty, constants, fractional fixed expressions, relational equalities, nonconstant bounded/unbounded images and unchanged false outputs.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/frequency1.cc; tests/Polyhedron/querydimensioncontracts1.cc.

  • PPL-SPEC-001724
    1. Saturation subsumption planning and paired deletion UID: PPL-SPEC-001724 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For the nonline/non-equality rows reaching the independence-planning phase of Polyhedron::simplify, each saturation bit row shall encode that source row's non-saturating counterparts. Planning shall retain the subset-minimal bit sets, retaining the lowest original planning index among exact duplicates. Incomparable sets, including equal-cardinality sets, shall remain distinct. A proper subset is a strict redundancy witness for its superset.

    Deletion shall keep source rows, bit rows and cached saturation counts paired through every swap-last removal. Retained geometric rows shall be their original paired values; no order beyond the required basis layout is promised. Zero or one surviving nonbasis row shall be admitted. The caller shall supply valid common dimensions, topology and exact arithmetic under the ordinary simplify prerequisites. Arbitrary bit masks in the relation-level fixture verify planning and pairing; they do not by themselves constitute a valid dual geometric representation.

    RATIONALE:

    Removing subsumed saturation groups requires row/mask alignment and deterministic handling of duplicates.

    INTERFACE:

    The independence-planning phase of Polyhedron::simplify and its relation-level test access.

    VERIFICATION_CRITERIA:

    Check duplicate groups, incomparable equal-cardinality sets, strict subset chains, rotated original indices, descending removal and a phase reached with no surviving nonbasis rows.

    SOURCE:

    src/Polyhedron_simplify_templates.hh; tests/Polyhedron/saturationgroups1.cc.

  • PPL-SPEC-001670
    1. Selected-coordinate integer-point existence UID: PPL-SPEC-001670 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A successfully completed contains_integer_point(integer_dimensions) shall return true exactly when the entry polyhedron contains a point whose selected coordinates are integers. Other coordinates shall remain real, and excluded NNC boundaries shall not be introduced. Empty selection shall test nonemptiness; selecting all coordinates shall have the existing 🔗 5. Exact integer-point existence in polyhedra meaning.

    A selected index outside the ambient dimension shall raise std::invalid_argument before querying or normalizing the receiver. The represented value shall be preserved; logically const constraint extraction may normalize caches under 🔗 2. Equivalent borrowed polyhedral descriptions. If a required mixed feasibility encoding exceeds the MIP dimension limit, std::length_error shall be raised under 🔗 1. Exact strict mixed-integer feasibility. When the query uses the mixed-integer solver, the equality divisibility and interruption conditions in 🔗 1. Mixed integer satisfiability shall apply.

    The initialization, lifetime, synchronization, arithmetic-profile and failure conditions of 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. No general rollback after resource or arithmetic exceptions is required beyond those common conditions and the explicit guarantees above.

    RATIONALE:

    For x = 0, y = 1 ⁄ 2, selecting only x admits the point, while requiring both coordinates to be integral does not. The all-coordinate case can reuse the established integer-point algorithm; proper subsets use exact mixed feasibility with the original boundary conditions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    bool Polyhedron::contains_integer_point(
        const Variables_Set& integer_dimensions) const;
    
    VERIFICATION_CRITERIA:

    Check rational singleton enumeration, strict integer-empty intervals with feasible unselected real coordinates, all/empty masks, empty/universe and zero dimensions, both topologies, pending constraints and generators, reload, source-value preservation and rejected indices.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_public.cc; tests/Polyhedron/selectedinteger1.cc.

  • PPL-SPEC-001606
    5. Polyhedron internal status signed-keyword loading and rejection UID: PPL-SPEC-001606 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ascii_load(stream) shall extract exactly the signed keywords of 🔗 4. Polyhedron internal status signed-keyword export in that order using ordinary string extraction, including its whitespace/width and exception-mask behavior. Each token shall consist of one + or - followed by the exact expected keyword. Missing, malformed, reordered or truncated fields shall return false when extraction returns normally. A following token shall remain available after a complete record, apart from ordinary separating whitespace.

    For parsed zero marker Z and remaining flag word F, success shall require Z ⇔ (F = 0) and the consistency predicate of 🔗 3. Polyhedron internal status consistency predicate. A complete consistent record shall replace all flags and return true independently of the destination's previous consistent state. A contradictory marker or incompatible completed flag vector shall return false with and without assertions; it shall not fail through an invariant assertion. A canonical zero word shall be accepted.

    The loader shall reset its word to zero before reading the first field. Successfully parsed fields may already have updated the receiver when a later field is rejected or throws. Completed invalid flags may remain installed. Rollback and status consistency after rejection shall not be promised. The caller shall restore valid status before installing it as domain state. Stream/resource exceptions shall retain their ordinary propagation and completed temporary cleanup. The internal get_field parser shall assign its output Boolean only on a successful signed-keyword match and preserve it on rejection. Its keyword shall be a live nonnull null-terminated string, and its output Boolean shall be live and writable. The prerequisites of 🔗 1. Polyhedron internal status value ownership and prerequisites shall apply. These local checks shall not certify the full numerical payload or its cache claims; the owning domain's record loader shall retain 🔗 1. Reloadable polyhedral ASCII descriptions.

    RATIONALE:

    The redundant zero marker and the remaining flags must describe one status. Local inconsistency is a recoverable parse rejection in every build mode.

    INTERFACE:

    Internal nested type Polyhedron::Status in Ph_Status_idefs.hh, included through Polyhedron_defs.hh. Names belong to Parma_Polyhedra_Library; member excerpts apply within that nested class. The owning class retains its declared access restrictions.

    bool ascii_load(std::istream& stream);
    // Internal helper, in its defining translation unit or implementation namespace:
    bool get_field(std::istream& stream, const char* keyword, bool& positive);
    
    VERIFICATION_CRITERIA:

    Enumerate all flag/ZE pairs against the propositional oracle and preserve all canonical valid records. Load every valid source over every consistent prior state and retain a suffix token. Reject every malformed/truncated field position; exercise width/whitespace settings, returning failures, input exceptions and output preservation of the translation-unit-local parser by inspection. Check the stated partial-state behavior and reject contradictory markers through full public-domain loaders.

    SOURCE:

    src/Polyhedron_defs.hh; src/Ph_Status_idefs.hh; src/Ph_Status_inlines.hh; src/Ph_Status.cc; tests/statushelpersspec1.cc; tests/statusloadpublic1.cc.

  • PPL-SPEC-001316
    1. Polyhedral values, coefficient profile and valid use UID: PPL-SPEC-001316 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    C_Polyhedron shall represent a rational topologically closed convex polyhedron in Rn. NNC_Polyhedron shall additionally admit excluded boundary points. A constraint description shall denote its conjunction of affine equalities and admitted non-strict or strict inequalities. An NNC generator description shall denote sums of real line directions, nonnegative ray directions and convex combinations of points and closure points, with strictly positive total weight on included points. The empty generator system shall denote empty. A nonempty generator system shall contain an included point. Coordinates shall be real even when all stored coefficients are integral.

    coefficient_type shall be the configured Coefficient. Every intermediate coefficient operation shall meet that profile's range and resource conditions. In bounded profiles, double-description conversion shall evaluate incidence products and complete row combinations exactly, cancel each new geometric row's common positive factor, and then admit its stored coefficients. Unreduced products need not fit the coefficient profile; a primitive row that does not fit may raise the profile's arithmetic exception. This projective normalization shall preserve the complete augmented row, including NNC epsilon coordinates, and shall not rescale integer-lattice periods. Initialization shall follow 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization; dimensions shall follow 🔗 1. Coordinate type and reserved dimension index. Objects, descriptors and streams shall remain live and valid for their uses. Output objects shall be independently writable and shall not alias one another or input storage unless an operation explicitly permits that aliasing.

    Independent objects shall own independent values. Uses that can change caches shall be externally synchronized against other uses of the same object. Unsuccessful construction shall release acquired resources. Supported numerical and resource exceptions may propagate; an existing object's surviving ownership shall permit destruction, without a general rollback or further-query guarantee.

    RATIONALE:

    An included point carries membership information that an excluded closure point cannot supply. Coefficient storage does not change the real coordinate carrier.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    class C_Polyhedron : public Polyhedron {};
    class NNC_Polyhedron : public Polyhedron {};
    // Inherited public type:
    typedef Coefficient coefficient_type;
    
    VERIFICATION_CRITERIA:

    Check literal closed and half-open sets, fractional points, rays, lines, zero-dimensional empty/universe, independent ownership and both representation directions. Inspect initialization, coefficient admission and exception cleanup.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | whole work (background) BagnaraHZ10CGTA | Sections 2.1–2.3, Theorems 2.1 and 2.3, Definition 2.2 (closed and NNC generator semantics).

    SOURCE:

    tests/recyclingconstructors1.cc; src/Exact_Arithmetic.hh; src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/cnncconversion1.cc; tests/Polyhedron/constraints1.cc; tests/Polyhedron/generators1.cc; tests/Polyhedron/nncminimize1.cc; tests/polyhedronvaluesspec1.cc; tests/descriptorequalityspec1.cc.

  • PPL-SPEC-001317
    2. Dimensioned empty and universe polyhedra UID: PPL-SPEC-001317 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from n and kind shall create exactly EMPTY or UNIVERSE in dimension n. Default construction shall create the zero-dimensional universe, containing the unique empty tuple. Empty shall contain no point in every dimension. max_space_dimension() shall report the structural limit; an oversized or reserved dimension shall throw std::length_error before allocation proportional to that dimension. The structural limit shall not promise resource availability for every smaller request.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Dimension is part of the value even for empty sets. Structural rejection must precede extent-dependent storage.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(dimension_type n=0, Degenerate_Element kind=UNIVERSE);
    explicit NNC_Polyhedron(dimension_type n=0, Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check defaults, both kinds in zero and positive dimensions, reserved/oversized dimensions and failed-construction ownership.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/maxspacedim1.cc; tests/Polyhedron/empty1.cc; tests/Polyhedron/universe1.cc; tests/Polyhedron/exceptions1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001318
    3. Owned polyhedron copying, assignment and exchange UID: PPL-SPEC-001318 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Same-type copying and assignment shall preserve the source value, ambient dimension and topology while giving the target independent ownership. Assignment shall return its receiver by reference, support self-assignment and permit a change in dimension. The copy-constructor complexity argument shall not change its exactness. Destruction shall release owned resources without throwing. m_swap and swap shall exchange complete values, dimensions and cached representations of topology-compatible objects, including self-exchange. Topology-incompatible exchange shall throw std::invalid_argument before exchange. Cross-topology assignment shall follow 🔗 7. Closed and NNC value conversion.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Value copying and exchange must transfer all authoritative descriptions and pending state consistently.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    C_Polyhedron(const C_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    NNC_Polyhedron(const NNC_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    C_Polyhedron& operator=(const C_Polyhedron&);
    NNC_Polyhedron& operator=(const NNC_Polyhedron&);
    ~C_Polyhedron();
    ~NNC_Polyhedron();
    void m_swap(Polyhedron&);
    void swap(Polyhedron&, Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Exercise independent later mutations, dimensions, empty/universe, pending constraints/generators, self-assignment/exchange and topology rejection.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/exceptions1.cc; tests/Polyhedron/exceptions2.cc; tests/Polyhedron/systemidentity1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001319
    4. Polyhedron construction from constraints UID: PPL-SPEC-001319 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a constraint system shall inherit its ambient dimension and represent exactly its conjunction. NNC construction shall preserve strict boundaries. Closed construction shall reject every strict inequality with std::invalid_argument, even if redundant; NNC-encoded non-strict rows shall be accepted without changing their meaning. Empty conjunction shall denote universe. Contradictory conjunction shall denote empty. The const-input form shall preserve its external source. The non-const rvalue form may consume source storage; on either return its source need only remain safely destructible. Structural dimension overflow shall throw std::length_error.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Constraint construction is conjunction, with topology admission independent of whether a strict row happens to be redundant.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(const Constraint_System&);
    C_Polyhedron(Constraint_System&&);
    explicit NNC_Polyhedron(const Constraint_System&);
    NNC_Polyhedron(Constraint_System&&);
    
    VERIFICATION_CRITERIA:

    Check strict/non-strict/equality rows, redundancy, contradictions, embedded dimensions, const-source preservation, recycled ownership and dimension/topology rejection.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/constraints1.cc; tests/Polyhedron/recycledsystems1.cc; tests/Polyhedron/exceptions1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001320
    5. Polyhedron construction from generators UID: PPL-SPEC-001320 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a generator system shall inherit its ambient dimension and denote its generator interpretation in 🔗 1. Polyhedral values, coefficient profile and valid use. An empty system shall create empty. A nonempty system without an included point shall throw std::invalid_argument. Closed construction shall reject closure points, including redundant ones; NNC construction shall retain their excluded boundary meaning. Const-input construction shall preserve its external source. Recycling may consume source storage, which need only remain destructible on return. Structural dimension overflow shall throw std::length_error.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Points establish nonemptiness; line and ray directions or closure points alone do not establish an included point.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(const Generator_System&);
    C_Polyhedron(Generator_System&&);
    explicit NNC_Polyhedron(const Generator_System&);
    NNC_Polyhedron(Generator_System&&);
    
    VERIFICATION_CRITERIA:

    Check point order, closure-only and direction-only rejection, fractional points, real lines, nonnegative rays, zero dimensions and recycled/const ownership.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | whole work (background)

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generators1.cc; tests/Polyhedron/recycledsystems1.cc; tests/Polyhedron/exceptions1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001321
    6. Polyhedron construction from representable congruences UID: PPL-SPEC-001321 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Congruence-system construction shall inherit the input dimension and apply the exact addition semantics in 🔗 2. Polyhedral congruence addition and conservative refinement to universe. Equality congruences shall define affine equalities; tautologies shall impose no restriction and contradictions shall give empty. A proper congruence that is neither tautological nor contradictory shall throw std::invalid_argument. The const-input form shall preserve external source values. The recycling-tag form shall have the same mathematical result; recycling shall not be promised for congruences. can_recycle_constraint_systems() shall return true and can_recycle_congruence_systems() false.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Nontrivial periodic restrictions are generally not convex; the recycling capability describes available storage reuse rather than a semantic distinction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(const Congruence_System&);
    
    explicit NNC_Polyhedron(const Congruence_System&);
    
    static bool can_recycle_constraint_systems();
    static bool can_recycle_congruence_systems();
    
    VERIFICATION_CRITERIA:

    Check equalities, constant congruences, proper periodic rejection, source preservation, zero dimensions, structural limits and both capability values.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/addcongruences1.cc; tests/Polyhedron/recycledsystems1.cc; tests/Polyhedron/exceptions1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001322
    7. Closed and NNC value conversion UID: PPL-SPEC-001322 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Conversion or assignment from closed to NNC shall preserve the represented set and dimension exactly. Conversion or assignment from NNC to closed shall produce the exact topological closure, including empty and lower-dimensional sets. The complexity argument shall not reduce this precision. Sources shall retain their values; successful assignment shall return its receiver by reference. Changing topology shall occur through the selected value type's conversion, without exposing a receiver with the wrong topology.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Closed targets cannot retain excluded boundary points, whereas NNC targets can represent every closed polyhedron unchanged.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(const NNC_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    explicit NNC_Polyhedron(const C_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    C_Polyhedron& operator=(const NNC_Polyhedron&);
    NNC_Polyhedron& operator=(const C_Polyhedron&);
    
    VERIFICATION_CRITERIA:

    Check open and half-open intervals, empty inconsistent strict systems, singletons, free coordinates, source preservation and assignments across dimensions.

    BIBLIOGRAPHY:

    BagnaraHZ10CGTA | Sections 2.1–2.3, Theorems 2.1 and 2.3, Definition 2.2 (closed and NNC generator semantics).

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/cnncconversion1.cc; tests/Polyhedron/topclosure1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001323
    8. Polyhedron conversion from boxes UID: PPL-SPEC-001323 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box conversion shall preserve dimension and source value. NNC conversion shall represent the source box exactly, including open endpoints; closed conversion shall represent its exact topological closure. Infinite endpoints shall impose no finite bound. The complexity argument shall not affect the result. Structural dimension overflow shall throw std::length_error.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Finite rational interval bounds translate to axis-aligned affine constraints; closing the target changes only endpoint inclusion.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename Interval>
    explicit C_Polyhedron(const Box<Interval>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename Interval>
    explicit NNC_Polyhedron(const Box<Interval>&, Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check empty, zero-dimensional, finite/infinite and open/closed endpoint combinations, selected interval profiles and structural bounds.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/frombox1.cc; tests/Polyhedron/frombox2.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001324
    9. Polyhedron conversion from difference and octagonal shapes UID: PPL-SPEC-001324 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a bounded-difference or octagonal shape shall preserve the source's real pointset and ambient dimension exactly in either topology. Every represented finite bound shall retain its coefficient-profile value; unbounded entries shall add no constraint. The complexity argument shall not change precision. Structural dimension overflow shall throw std::length_error. Source values shall be preserved.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    Both source constraint classes are representable by ordinary closed rational polyhedra.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    template <typename U>
    explicit C_Polyhedron(const BD_Shape<U>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename U>
    explicit C_Polyhedron(const Octagonal_Shape<U>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename U>
    explicit NNC_Polyhedron(const BD_Shape<U>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename U>
    explicit NNC_Polyhedron(const Octagonal_Shape<U>&, Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check independent relational constraints, latent empty and zero dimensions, bounded/infinite profiles, selected arithmetic admission and source preservation.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/frombdshape1.cc; tests/Polyhedron/fromoctagonalshape1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001325
    10. Polyhedral affine hull of a rational grid UID: PPL-SPEC-001325 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a grid shall preserve dimension and return empty for an empty source; otherwise it shall return the exact affine hull of the source, with all periodic restrictions removed and all affine equalities preserved. Both target topologies shall represent the same closed affine space. The complexity argument shall not reduce this guarantee. Source value shall be preserved, and structural dimension overflow shall throw std::length_error.

    The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

    RATIONALE:

    The convex hull of a nonempty rational grid is its affine hull: unrestricted integer parameter multiples fill their real spans under convexification.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

    explicit C_Polyhedron(const Grid&, Complexity_Class=ANY_COMPLEXITY);
    explicit NNC_Polyhedron(const Grid&, Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check periodic sets, non-axis affine equalities, line directions, fractional phases, latent inconsistent congruences, zero dimensions and source preservation.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/fromgrid1.cc; tests/polyhedronvaluesspec1.cc.

  • PPL-SPEC-001380
    1. Generic powerset construction and ownership UID: PPL-SPEC-001380 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction shall create the empty collection. Construction from d shall store one copy of d; bottom may remain stored until reduction. Copying and assignment shall preserve the stored base-domain values and permit independent later mutations. Assignment shall return the receiver and support self-assignment. Exchange shall swap the entire collection and reduction state; self-exchange shall preserve the value. Destruction shall release owned storage.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Collection ownership must preserve the meaning of base elements independently of storage sharing within the base domain.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    Powerset();
    explicit Powerset(const D&);
    Powerset(const Powerset&);
    ~Powerset();
    Powerset& operator=(const Powerset&);
    void m_swap(Powerset&);
    template <typename D> void swap(Powerset<D>&, Powerset<D>&);
    
    VERIFICATION_CRITERIA:

    Exercise default/singleton, bottom, copies, self-assignment, exchanges and independent mutations.

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/disjunct1.cc; tests/Powerset/powerset1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001381
    2. Generic powerset entailment and equality UID: PPL-SPEC-001381 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    definitely_entails(y) shall return true exactly when every stored receiver element entails some stored element of y. is_bottom shall reduce and test whether no disjunct remains. is_top shall reduce and test for the singleton top element. Equality shall compare the reduced collections up to order and base equality; inequality shall negate equality. This is powerset-domain equality, which may distinguish collections with equal unions. These operations may perform lazy reduction and invalidate removed-element iterators.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The Hoare ordering and reduced collection equality differ from geometric equality of unions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    bool definitely_entails(const Powerset&) const;
    bool is_top() const;
    bool is_bottom() const;
    template <typename D> bool operator==(const Powerset<D>&, const Powerset<D>&);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Check permuted, redundant and empty collections, entailment direction and equal unions with different decompositions.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 3, Definitions 4–5 (Hoare ordering and semantic equivalence).

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/entails1.cc; tests/Powerset/equals1.cc.

  • PPL-SPEC-001382
    3. Generic powerset traversal and erasure UID: PPL-SPEC-001382 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    size and empty shall report stored collection cardinality without requiring semantic reduction. Forward and reverse iterators shall visit the stored disjuncts in list order and reverse list order, respectively. Iterator dereference shall expose a const base element. drop_disjunct shall erase a valid dereferenceable iterator and return its successor. drop_disjuncts shall erase a valid half-open range; clear shall erase all elements. Erasure shall invalidate erased-element iterators; operations that replace or reduce the collection may invalidate additional iterators. End iterators shall not be dereferenced or passed as single-element erasure positions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation. The iterator adapter protocols in 🔗 1. Read-only iterator types, borrowed positions and value operations, 🔗 2. Read-only iterator element identity and const access and 🔗 3. Read-only iterator traversal and interoperable equality shall apply.

    RATIONALE:

    Stored cardinality can include redundant or empty disjuncts and must remain distinct from semantic emptiness.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    typedef typename std::list<D>::size_type size_type;
    typedef D value_type;
    typedef iterator_to_const<std::list<D>> iterator;
    typedef const_iterator_to_const<std::list<D>> const_iterator;
    typedef std::reverse_iterator<iterator> reverse_iterator;
    typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
    size_type size() const;
    bool empty() const;
    iterator begin(); iterator end();
    const_iterator begin() const; const_iterator end() const;
    reverse_iterator rbegin(); reverse_iterator rend();
    const_reverse_iterator rbegin() const; const_reverse_iterator rend() const;
    iterator drop_disjunct(iterator);
    void drop_disjuncts(iterator, iterator);
    void clear();
    
    VERIFICATION_CRITERIA:

    Check forward/reverse and const traversal, erase successors, empty/full ranges and retained unrelated iterators.

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/disjunct1.cc; tests/Powerset/size1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001383
    4. Omega reduction of generic powersets UID: PPL-SPEC-001383 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    omega_reduce shall remove bottom disjuncts and base-entailment redundancies, preserving the represented union and leaving no distinct pair related by base entailment. Equal disjuncts shall retain one representative. Repeated reduction shall preserve the value. is_omega_reduced shall report or establish whether that nonredundancy condition holds, without removing elements. Reduction shall not promise a unique geometric decomposition.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Removing an included disjunct preserves union, whereas replacing several disjuncts by their upper bound can enlarge it.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    void omega_reduce() const;
    bool is_omega_reduced() const;
    
    VERIFICATION_CRITERIA:

    Check duplicate, bottom, containment chains, incomparable disjuncts and repeated reductions against an independent union.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 3, Definition 4 (nonredundancy and Omega reduction).

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/cancellation1.cc; tests/powersetinterruptedproducts1.cc; tests/Powerset/reduce1.cc.

  • PPL-SPEC-001384
    5. Disjunctive insertion and exact powerset union UID: PPL-SPEC-001384 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_disjunct(d) shall append a value copy and denote union with d. least_upper_bound_assign and upper_bound_assign shall compute exact disjunctive union, with redundant elements removable. Self-union shall preserve the value. upper_bound_assign_if_exact shall perform that same operation and return true. No convexification shall be implicit in these union members.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The finite collection already represents disjunction exactly, without joining base elements.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    void add_disjunct(const D&);
    void least_upper_bound_assign(const Powerset&);
    void upper_bound_assign(const Powerset&);
    bool upper_bound_assign_if_exact(const Powerset&);
    
    VERIFICATION_CRITERIA:

    Check disjoint/overlapping union, bottom, top, duplicate input, independent source ownership and self-union.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 3, Definition 5 (finite powerset join).

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/disjunct1.cc; tests/Powerset/upperbound1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001385
    6. Pairwise lifting and generic powerset meet UID: PPL-SPEC-001385 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    pairwise_apply_assign(y,f) shall apply f to each ordered pair of reduced receiver and y elements, using an independent receiver copy for each pair, and collect the non-bottom results. meet_assign shall use the base meet in that lifting. If base meet represents intersection exactly, the result shall denote exact intersection of the input unions; otherwise its soundness and precision shall follow that base operation. Empty collections shall give empty and self-meet shall be supported.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Intersection distributes over finite unions, requiring all ordered pairs rather than matching positions.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    template <typename Binary_Operator_Assign>
    void pairwise_apply_assign(const Powerset&, Binary_Operator_Assign);
    void meet_assign(const Powerset&);
    
    VERIFICATION_CRITERIA:

    Independently enumerate cross-pair intersections, empty inputs, discarded bottoms and self-aliasing.

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/intersection1.cc; tests/Powerset/meet1.cc; tests/determinatehistories1.cc.

  • PPL-SPEC-001386
    7. Explicit powerset collapse UID: PPL-SPEC-001386 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    collapse() shall replace a nonempty collection by an iterated base-domain upper bound, leaving at most one disjunct. Empty shall remain empty. collapse(k) shall require k > 0, reduce first, and leave at most k disjuncts by joining the suffix into the last retained element when necessary. The resulting union shall contain the input union; exactness shall hold only when the selected base joins are exact. No minimal decomposition or optimal choice of merged elements shall be promised.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Cardinality control deliberately trades disjunctive precision for storage and computation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    void collapse();
    void collapse(unsigned max_disjuncts);
    
    VERIFICATION_CRITERIA:

    Check k equal to one, below/equal/above cardinality, empty input and a gap filled by convex collapse.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 5, Definition 10 (collapsors).

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/collapse1.cc; tests/powersetlatticehistories1.cc.

  • PPL-SPEC-001387
    8. Generic powerset diagnostics and memory accounting UID: PPL-SPEC-001387 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK(disallow_bottom) shall check base invariants and any asserted reduction condition; when requested it shall also reject stored bottom members. Memory queries shall return lower bounds on managed and total bytes; total shall equal sizeof(*this) plus external bytes. Shared base storage may be counted more than once. Stream output shall return its stream and display false for bottom, true for top or a sequence of braced disjuncts. Display and invariant checks may trigger base queries or reduction.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Memory estimates and human-readable display do not define a serialization or a canonical mathematical representation.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Powerset unless qualified otherwise.

    bool OK(bool disallow_bottom=false) const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    template <typename D>
    std::ostream& IO_Operators::operator<<(std::ostream&, const Powerset<D>&);
    
    VERIFICATION_CRITERIA:

    Check distinguished and multi-element output, stream identity, byte relationships and diagnostics on valid values.

    SOURCE:

    src/Powerset_defs.hh; src/Powerset_inlines.hh; src/Powerset_templates.hh; src/Powerset_types.hh; tests/Powerset/membytes1.cc; tests/Powerset/powerset1.cc.

  • PPL-SPEC-001452
    1. Componentwise product image UID: PPL-SPEC-001452 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_image shall apply the base transfer relation described in 🔗 1. Lifted powerset image to both components and mark reduction unknown. The resulting intersection shall soundly contain the image of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void affine_image(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001453
    2. Componentwise product preimage UID: PPL-SPEC-001453 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    affine_preimage shall apply the base transfer relation described in 🔗 2. Lifted powerset preimage to both components and mark reduction unknown. The resulting intersection shall soundly contain the preimage of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void affine_preimage(Variable, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001454
    3. Componentwise product generalized image UID: PPL-SPEC-001454 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_image shall apply the base transfer relation described in 🔗 3. Lifted powerset generalized image to both components and mark reduction unknown. The resulting intersection shall soundly contain the generalized image of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void generalized_affine_image(Variable, Relation_Symbol, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001455
    4. Componentwise product generalized preimage UID: PPL-SPEC-001455 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    generalized_affine_preimage shall apply the base transfer relation described in 🔗 4. Lifted powerset generalized preimage to both components and mark reduction unknown. The resulting intersection shall soundly contain the generalized preimage of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void generalized_affine_preimage(Variable, Relation_Symbol, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001456
    5. Componentwise product bounded image UID: PPL-SPEC-001456 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_image shall apply the base transfer relation described in 🔗 5. Lifted powerset bounded image to both components and mark reduction unknown. The resulting intersection shall soundly contain the bounded image of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void bounded_affine_image(Variable, const Linear_Expression&, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001457
    6. Componentwise product bounded preimage UID: PPL-SPEC-001457 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    bounded_affine_preimage shall apply the base transfer relation described in 🔗 6. Lifted powerset bounded preimage to both components and mark reduction unknown. The resulting intersection shall soundly contain the bounded preimage of the old product intersection. Component transfer exactness alone shall not promise exactness of the product relation, because independently witnessed outcomes can lose cross-component correlation.

    Both components shall use the same nonzero denominator value supplied at entry, even when it is borrowed from either component's constraints, generators, divisor or inhomogeneous term. The first component mutation shall not change what denominator is passed to the second. Component dimension, relation-symbol and topology admission shall apply, including the stated std::invalid_argument conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A componentwise relation is sound only if it uses one common entry relation; it can still overapproximate the intersection transfer.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void bounded_affine_preimage(Variable, const Linear_Expression&, const Linear_Expression&,
                     Coefficient_traits::const_reference=Coefficient_one());
    
    VERIFICATION_CRITERIA:

    Compare independent component operations, borrow from either component, cover constraint/generator origins, signs and invalid arguments, and check concrete source/successor inclusion.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/affineborrow1.cc; tests/Partially_Reduced_Product/affineimage1.cc; tests/Partially_Reduced_Product/boundedaffineimage1.cc; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001458
    7. Product expression-to-expression affine relations UID: PPL-SPEC-001458 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Expression overloads shall apply the base generalized relation in 🔗 7. Lifted expression-to-expression affine relations to each component and mark reduction unknown. The resulting intersection shall soundly contain the corresponding image or preimage of the old product intersection, with no extra precision claim based only on component exactness. Overlapping expression supports, admissible relation symbols, dimensions and topology shall follow both component contracts.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Independent component witnesses can lose correlations even for exact base relations.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void generalized_affine_image(const Linear_Expression&, Relation_Symbol, const Linear_Expression&);
    void generalized_affine_preimage(const Linear_Expression&, Relation_Symbol, const Linear_Expression&);
    
    VERIFICATION_CRITERIA:

    Check shared/disjoint variable supports, constants, componentwise equivalence and sound concrete relation samples.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/generalizedaffineimage1.cc.

  • PPL-SPEC-001463
    1. Product component widening and convergence scope UID: PPL-SPEC-001463 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The set represented by y shall be contained in the set represented by the receiver. Default widening shall reduce both operands and mark the receiver's reduction unknown. If a reduced receiver component does not contain the corresponding reduced component of y, replace that receiver component with their upper bound before component widening. Both default component widenings shall receive the same optional token budget. The resulting intersection shall contain both input products.

    widening_assign_with(y, widening1, widening2, tokens) shall perform the same input reductions and receiver reduction-state invalidation. The reduced component pairs shall already meet the selected preconditions. It shall invoke widening1 on the first pair of components before invoking widening2 on the second pair. Both shall receive the same optional token pointer. Callables shall be forwarded with their supplied value categories, without copying or storing them. They shall meet the selected component widening's preconditions and preserve its ambient dimension and upper-bound guarantees.

    If a component callable throws, the exception shall propagate, subsequent callables shall not be invoked, and earlier component and token effects shall remain. The receiver shall be marked for lazy reduction. No whole-operation rollback shall be promised. The existing widening_assign member shall remain unambiguous when taking its address.

    For direct and smash policies, the component convergence guarantees shall be preserved under their iteration and finite-delay conditions. For information- sharing policies, this operation shall be treated as componentwise extrapolation unless a separate combined convergence proof is supplied: reduction between iterations can restore discarded bounds. To use component convergence with sharing operations, a separate direct-product widening history shall remain free of sharing reduction, with reduced copies used for information exchange.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Restoring a discarded constraint through another component can prevent finite stabilization. Caller-selected component widenings expose the component domains' precision choices without changing the default operation or storing additional state in the product.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void widening_assign(const Partially_Reduced_Product&, unsigned* tokens=nullptr);
    template <typename Widening1, typename Widening2>
    void widening_assign_with(const Partially_Reduced_Product&,
                              Widening1&&, Widening2&&, unsigned* tokens=nullptr);
    
    VERIFICATION_CRITERIA:

    Check upper-bound inclusion, shared token changes, direct/smash stabilization, and default widening after a join that leaves incomparable reduced components; review history separation. Compare selected component algorithms with independent component calls using the same token budget. Check lvalue and rvalue noncopyable callables, component invocation order, exceptions in either callable, deferred reduction after exceptions, default member-address compatibility and self-aliasing.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/widening1.cc; tests/Partially_Reduced_Product/selectedwidenings1.cc.

  • PPL-SPEC-001459
    1. Product coordinate operations UID: PPL-SPEC-001459 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Coordinate members shall perform the corresponding base operation on both components with identical indices, counts and maps. Growth shall add free coordinates for embedding and zero coordinates for projecting growth. Removal and mapping shall existentially eliminate omitted coordinates and compact or permute retained coordinates. Expansion and folding shall use the base independent-copy and merge semantics. Cylindrification shall reduce first and free selected coordinates without changing dimension. Results shall soundly contain the corresponding transformation of the old intersection; exact base projections alone shall not establish exact product projection. Both components shall retain equal ambient dimension on successful return. Variable/map admission and structural dimension limits shall follow both base contracts.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Existential coordinate operations can lose conjunction correlations when applied independently to components.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void unconstrain(Variable); void unconstrain(const Variables_Set&);
    void add_space_dimensions_and_embed(dimension_type);
    void add_space_dimensions_and_project(dimension_type);
    void remove_space_dimensions(const Variables_Set&);
    void remove_higher_space_dimensions(dimension_type);
    template <typename Partial_Function> void map_space_dimensions(const Partial_Function&);
    void expand_space_dimension(Variable, dimension_type);
    void fold_space_dimensions(const Variables_Set&, Variable);
    
    VERIFICATION_CRITERIA:

    Check all members, coordinate order and dimensions, relational projection examples, empty values, invalid variables and growth bounds.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/spacedims1.cc.

  • PPL-SPEC-001460
    2. Product concatenation UID: PPL-SPEC-001460 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Concatenation shall concatenate corresponding components in receiver- then-argument coordinate order. The resulting common dimension shall be the sum, subject to both structural limits. With exact component concatenation the intersection shall represent the exact Cartesian product of the input product sets, because the coordinate blocks are independent. Self-concatenation shall be supported. Lazy reduction state shall be retained only when both operands are already marked reduced; component limit errors may propagate without rollback.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Cartesian products on disjoint coordinate blocks commute with component conjunction.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void concatenate_assign(const Partially_Reduced_Product&);
    
    VERIFICATION_CRITERIA:

    Check coordinate order, separate restrictions, empty and self inputs, reduction-state combinations and excessive extents.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/concatenate1.cc.

  • PPL-SPEC-001448
    1. Product descriptor addition, refinement and recycling UID: PPL-SPEC-001448 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Ordinary addition and refinement shall apply the corresponding operation to both components and mark reduction unknown. The intersection shall retain all source points satisfying the supplied restrictions, with component exactness and admission conditions. Exact-addition members shall require admission by each called component. Recycling shall first refine the nonconsuming component, then pass the system to a component advertising recycling; if neither advertises it, both shall use ordinary addition. The source may be consumed only after the other component has read it. Failure shall not promise rollback of either component or recycled input.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Information must reach both components before an input system is consumed.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void add_constraint(const Constraint&); void add_constraints(const Constraint_System&);
    void add_congruence(const Congruence&); void add_congruences(const Congruence_System&);
    void refine_with_constraint(const Constraint&); void refine_with_constraints(const Constraint_System&);
    void refine_with_congruence(const Congruence&); void refine_with_congruences(const Congruence_System&);
    void add_recycled_constraints(Constraint_System&);
    void add_recycled_congruences(Congruence_System&);
    
    VERIFICATION_CRITERIA:

    Check addition/refinement, unsupported rows, recycling into either component and no-recycling paths, source consumption and post-mutation reduction.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/addcongruences1.cc; tests/Partially_Reduced_Product/refinewithcongruences1.cc; tests/Partially_Reduced_Product/refinewithconstraints1.cc.

  • PPL-SPEC-001449
    2. Product intersection UID: PPL-SPEC-001449 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Intersection shall intersect corresponding component pairs and mark reduction unknown. With exact component intersections, associativity of conjunction shall make the result the exact intersection of the represented products; approximate component intersections shall retain their soundness. Self-intersection shall be supported. Components shall have compatible ambient dimensions or throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Unlike general images, intersection can be regrouped componentwise without losing cross-component information.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void intersection_assign(const Partially_Reduced_Product&);
    
    VERIFICATION_CRITERIA:

    Independently derive four-way intersections, including independent component restrictions and self-aliasing.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/intersection1.cc.

  • PPL-SPEC-001450
    3. Product component joins and component exactness UID: PPL-SPEC-001450 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Upper bound shall reduce both products, join corresponding components and mark reduction unknown. The resulting intersection shall contain both input products. The conditional member shall return true only if both component joins certify exactness; on false, the represented receiver shall remain unchanged apart from permitted reduction/cache changes. Exactness of each component join shall not imply exact union of the represented products. Self-join shall preserve value; dimension mismatch shall follow component std::invalid_argument admission.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Intersection of two component unions can include cross-combinations absent from the union of the original products.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void upper_bound_assign(const Partially_Reduced_Product&);
    bool upper_bound_assign_if_exact(const Partially_Reduced_Product&);
    
    VERIFICATION_CRITERIA:

    Check both exactness failure paths, source/receiver unchanged controls, lazy policy reapplication and cross-combination precision loss.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/upperbound1.cc.

  • PPL-SPEC-001451
    4. Sound product set difference UID: PPL-SPEC-001451 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Difference shall reduce both operands and form sound approximations of (A1⧵B1)∩A2 and A1∩(A2⧵B2), then take an upper bound of the nonempty alternatives. Known-empty alternatives shall not contribute unrelated nonempty components to that join. The result shall contain the exact product difference; component subtraction and join may lose precision. Self-subtraction shall give empty. Subtracting empty shall preserve the minuend, and empty minuend shall remain empty. Dimension mismatch shall still reach the documented component exception. Mutated alternatives and joins shall be marked for lazy reduction.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    De Morgan expansion makes difference a union of two product alternatives; subtracting both components simultaneously would lose valid states.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void difference_assign(const Partially_Reduced_Product&);
    
    VERIFICATION_CRITERIA:

    Independently enumerate small product differences, both alternatives, empty/self inputs, no-reduction and sharing policies.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/difference1.cc; tests/Partially_Reduced_Product/directproduct3.cc.

  • PPL-SPEC-001461
    5. Product closure and time elapse UID: PPL-SPEC-001461 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Closure shall apply each component's closure. Time elapse shall reduce both products, then time-elapse corresponding component pairs. The resulting intersection shall soundly contain the respective closure or time-elapse set of the original product. Component exactness shall not imply concrete product exactness, since closure or existential elapsed-time witnesses need not commute with intersection. Common ambient dimension and base arithmetic/admission conditions shall apply.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Independent elapsed-time or limiting witnesses can overapproximate a jointly constrained transition.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void topological_closure_assign();
    void time_elapse_assign(const Partially_Reduced_Product&);
    
    VERIFICATION_CRITERIA:

    Check open/closed component boundaries, velocities, different component precision, empty values and sound concrete samples.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/timeelapse1.cc; tests/Partially_Reduced_Product/topclosure1.cc.

  • PPL-SPEC-001462
    6. Product integer-coordinate tightening UID: PPL-SPEC-001462 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Integer tightening shall reduce first, apply the corresponding base restriction to both components and mark reduction unknown. The result shall lie within the old product and retain every old point integral in all selected coordinates. The overload without a variable set shall select all coordinates. The complexity argument shall limit the base algorithms used; no optimal integer hull or complete integer-feasibility decision shall be promised.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Each component can tighten safely without proving a complete integer abstraction of their intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    void drop_some_non_integer_points(Complexity_Class=ANY_COMPLEXITY);
    void drop_some_non_integer_points(const Variables_Set&, Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check partial/all coordinate selection, fractional boundaries, preserved integral points and component-policy reapplication.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/dropsomenonintegerpoints1.cc.

  • PPL-SPEC-001443
    1. Product constraint and congruence exports UID: PPL-SPEC-001443 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint and congruence exports shall reduce, combine the systems exported by both components and return owned systems. The systems shall soundly overapproximate the product; neither kind alone need express all information in the intersection. Minimized constraints shall minimize their combined polyhedron using NNC topology when strict rows occur; minimized congruences shall minimize the combined grid. Returned systems shall remain independent of later product mutation.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Conjoining sound component exports preserves all product points, but can lose information unavailable in that descriptor language.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    Constraint_System constraints() const;
    Constraint_System minimized_constraints() const;
    Congruence_System congruences() const;
    Congruence_System minimized_congruences() const;
    
    VERIFICATION_CRITERIA:

    Check distinct restrictions from both donors, duplicate/strict rows, independent returned values and modular information loss in constraints.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/congruences1.cc; tests/Partially_Reduced_Product/constraints1.cc.

  • PPL-SPEC-001444
    2. Component-based product property tests UID: PPL-SPEC-001444 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After policy reduction, emptiness shall test whether either component is empty; boundedness and discreteness shall test whether either component has the property; topological closure shall test whether both do. Universe shall test whether both components are universe. Disjointness shall test whether corresponding first components or corresponding second components are disjoint. Directional bound tests and constrains shall use the logical OR of the two component results. Except for exact universe characterization, these shall retain their stated component scope: a negative emptiness, boundedness, discreteness or disjointness result shall not refute the corresponding concrete property of the intersection. Component dimension/variable admission shall apply; invalid dimensions shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Component facts can establish properties of an intersection without deciding all facts jointly implied by both components.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    bool is_empty() const; bool is_universe() const;
    bool is_topologically_closed() const;
    bool is_discrete() const; bool is_bounded() const;
    bool is_disjoint_from(const Partially_Reduced_Product&) const;
    bool constrains(Variable) const;
    bool bounds_from_above(const Linear_Expression&) const;
    bool bounds_from_below(const Linear_Expression&) const;
    
    VERIFICATION_CRITERIA:

    Check truth tables, empty intersections with nonempty components, jointly bounded intersections, directional bounds and invalid variables.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/bounded1.cc; tests/Partially_Reduced_Product/bounds1.cc; tests/Partially_Reduced_Product/discrete1.cc; tests/Partially_Reduced_Product/disjoint1.cc; tests/Partially_Reduced_Product/isempty1.cc; tests/Partially_Reduced_Product/isuniverse1.cc; tests/Partially_Reduced_Product/topclosed1.cc.

  • PPL-SPEC-001445
    3. Component-based product descriptor relations UID: PPL-SPEC-001445 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint and congruence relations shall reduce, then include each is_included, is_disjoint or saturates flag when either component reports it. They shall not infer strict intersection from component strict intersection. Generator subsumption shall require subsumption by both components. The flags shall retain the base descriptor meanings and may be incomplete for the full intersection. Descriptor dimension incompatibility shall throw std::invalid_argument.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A property true of either superset component holds for the product, while a witness must satisfy both components.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    Poly_Con_Relation relation_with(const Constraint&) const;
    Poly_Con_Relation relation_with(const Congruence&) const;
    Poly_Gen_Relation relation_with(const Generator&) const;
    
    VERIFICATION_CRITERIA:

    Check each donor flag, mixed component relations, absent strict-intersection inference, generator agreement and dimension rejection.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/relations1.cc.

  • PPL-SPEC-001446
    4. Component-selected product bounds and witnesses UID: PPL-SPEC-001446 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Extremum queries shall reduce and return false if a component is empty or neither component provides a directional bound; outputs shall then remain unchanged. Otherwise maximization shall choose the smaller available component supremum and minimization the larger component infimum. Equal bounds shall prefer a component not attaining that bound. Success shall return its rational bound with positive denominator, attainment flag and, for witness overloads, its corresponding point or closure point. Neither success, attainment nor the witness shall establish nonemptiness or optimum attainment in the product intersection; the selected witness need not satisfy the other component. Comparison of representable component bounds shall be exact even when their cross-products exceed the configured coefficient range. Expression dimensions and independently writable outputs shall satisfy both component contracts.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Intersecting components may improve their bounds jointly, so choosing the best individual bound need not solve optimization over the intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool maximize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&) const;
    bool minimize(const Linear_Expression&, Coefficient&, Coefficient&, bool&, Generator&) const;
    
    VERIFICATION_CRITERIA:

    Check both donor directions, sole-bound donors, equal open/closed ties, rational comparison with cross-products exceeding the coefficient range, failure sentinels and witnesses outside the other component.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/maxmin1.cc.

  • PPL-SPEC-001447
    5. Product component order and equality UID: PPL-SPEC-001447 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Containment shall reduce both operands and require containment for both corresponding component pairs. Strict containment shall additionally require strictness for at least one pair. Equality shall require both component equalities after reduction; inequality shall negate it. These are component-order and equality tests, which may distinguish equal represented intersections. Componentwise strictness shall not prove strictness of concrete intersection inclusion. Dimension admission shall follow the component tests.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The product representation can carry redundant restrictions distributed differently between components.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    bool contains(const Partially_Reduced_Product&) const;
    bool strictly_contains(const Partially_Reduced_Product&) const;
    template <typename D1, typename D2, typename R>
    bool operator==(const Partially_Reduced_Product<D1,D2,R>&, const Partially_Reduced_Product<D1,D2,R>&);
    // Inequality uses C++20 rewriting of operator==.
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Check proper component inclusion, concrete-equal pairs with different components, self-comparison and dimension errors.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/contains1.cc; tests/Partially_Reduced_Product/equals1.cc.

  • PPL-SPEC-001438
    1. Direct and smash reduction policies UID: PPL-SPEC-001438 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    No_Reduction shall leave both components unchanged. Smash_Reduction shall set both components empty when either is empty, otherwise preserve them. Both policies shall preserve common dimension and the represented intersection. Policy objects shall be stateless, default-constructible and destructible. Direct policy application shall require valid same-dimensional components.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Propagating known emptiness is exact and does not require exchanging numerical constraints.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template <typename D1, typename D2> class No_Reduction {
    public: No_Reduction(); ~No_Reduction(); void product_reduce(D1&,D2&);
    };
    template <typename D1, typename D2> class Smash_Reduction {
    public: Smash_Reduction(); ~Smash_Reduction(); void product_reduce(D1&,D2&);
    };
    
    VERIFICATION_CRITERIA:

    Check both empty-component directions, both empty and both nonempty, including different component types.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/contractvalues1.cc; tests/Partially_Reduced_Product/directproduct1.cc; tests/Partially_Reduced_Product/smashproduct1.cc.

  • PPL-SPEC-001439
    2. Constraint-sharing product reduction UID: PPL-SPEC-001439 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint reduction shall propagate known emptiness, then refine the first component with the second's minimized constraints and the second with the resulting first component's minimized constraints. A newly detected empty component shall make both empty. Every shared constraint shall be implied by its donor and refinement shall preserve all points satisfying it, so the represented intersection and dimension shall be preserved. Application shall not promise a full reduced-product fixed point or exact concrete emptiness. Policy construction and destruction shall have no mathematical effect.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Adding a donor consequence to the other component preserves intersection even if information exchange remains incomplete.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template <typename D1, typename D2> class Constraints_Reduction {
    public: Constraints_Reduction(); ~Constraints_Reduction();
      void product_reduce(D1&,D2&);
    };
    
    VERIFICATION_CRITERIA:

    Check both donor directions, new equalities, detected contradictions and repeated application without assuming a fixed point.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/constraintsproduct1.cc; tests/Partially_Reduced_Product/contractvalues1.cc.

  • PPL-SPEC-001440
    3. Congruence-sharing product reduction UID: PPL-SPEC-001440 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Congruence reduction shall propagate known emptiness and process the minimized congruences of each donor component. Equality congruences shall refine the other component. For a proper congruence e ∈ mZ, finite bounds from the other component shall identify admitted hyperplanes e = km. If no such hyperplane can intersect, both shall become empty; if exactly one can intersect, its equality shall refine both. Otherwise the procedure may leave them unchanged. Strict endpoint exclusion and signed remainders shall be respected. The represented intersection and common dimension shall be preserved; complete reduction shall not be promised. Donors shall provide minimized valid congruences, and bound arithmetic shall meet all intermediate coefficient conditions.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A congruence restricts an affine expression to spaced hyperplanes; finite bounds can isolate none or one without enumerating all points.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template <typename D1, typename D2> class Congruences_Reduction {
    public: Congruences_Reduction(); ~Congruences_Reduction();
      void product_reduce(D1&,D2&);
    };
    
    VERIFICATION_CRITERIA:

    Independently enumerate small signed/rational intervals and residue classes, with open/closed endpoints and zero/one/many admitted hyperplanes in both component orders.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/congruencesproduct1.cc; tests/Partially_Reduced_Product/contractvalues1.cc.

  • PPL-SPEC-001441
    4. Shape-preserving product reduction UID: PPL-SPEC-001441 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Shape-preserving reduction shall first perform congruence reduction, then use frequencies from one component to tighten the other's inequality bounds to admitted affine-expression values, in both directions. It shall share resulting equalities using constraint reduction. Each tightening shall be implied by the other component, preserving the represented intersection. Except for equalities introduced by congruence reduction and subsequent constraint sharing, tightening shall retain inequality directions and adjust bounds. A strict inequality whose boundary is an admitted discrete level shall advance by one full positive period even when its closest residue is zero. A strict inequality with a constant zero image shall exclude the whole intersection. Unsupported frequency queries may leave restrictions unchanged. Common dimension and all intermediate arithmetic preconditions shall hold.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Frequency information can move a bound to the next admitted value without changing the represented intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    template <typename D1, typename D2> class Shape_Preserving_Reduction {
    public: Shape_Preserving_Reduction(); ~Shape_Preserving_Reduction();
      void product_reduce(D1&,D2&);
    };
    
    VERIFICATION_CRITERIA:

    Check rational frequencies, positive/negative offsets, strict inequalities, equality discovery and independent intersection preservation.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/contractvalues1.cc; tests/Partially_Reduced_Product/shapepreservingproduct1.cc.

  • PPL-SPEC-001442
    5. Lazy product reduction and component views UID: PPL-SPEC-001442 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    reduce() shall apply a default-constructed policy object when reduction is unknown, mark the pair as reduced and return true; when already marked it shall return false without invoking the policy. That flag shall record policy application rather than a mathematical fixed-point proof. domain1 and domain2 shall first reduce and return borrowed const component references. A caller shall not retain a component coefficient or representation view across another operation that can reduce, mutate or replace the component, except the explicitly supported entry-denominator borrowing in the affine wrappers.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Lazy information exchange may change component representations while preserving the product intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    bool reduce() const;
    const D1& domain1() const;
    const D2& domain2() const;
    
    VERIFICATION_CRITERIA:

    Use a counting reduction policy to check flag transitions, repeat queries, mutation followed by reduction and borrowed-view lifetime.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/contractvalues1.cc; tests/Partially_Reduced_Product/directproduct1.cc.

  • PPL-SPEC-001433
    1. Partially reduced product values and policy aliases UID: PPL-SPEC-001433 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A product shall own two same-dimensional components and denote their intersection, independently of how much information the selected policy has exchanged. Domain_Product<D1,D2> shall provide direct, smash, constraints, congruences and shape-preserving aliases selecting the corresponding reduction classes. Componentwise equality, strictness, emptiness and extrema shall have the explicitly stated query scope below, rather than decide all properties of the concrete intersection. Supported component domains shall satisfy the requirements of every operation and reduction policy actually instantiated.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Intersection meaning is independent of the strength of a policy or a sufficient query.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    template <typename D1, typename D2, typename R>
    class Partially_Reduced_Product;
    template <typename D1, typename D2> class Domain_Product {
    public:
      typedef Partially_Reduced_Product<D1,D2,No_Reduction<D1,D2>> Direct_Product;
      typedef Partially_Reduced_Product<D1,D2,Smash_Reduction<D1,D2>> Smash_Product;
      typedef Partially_Reduced_Product<D1,D2,Constraints_Reduction<D1,D2>> Constraints_Product;
      typedef Partially_Reduced_Product<D1,D2,Congruences_Reduction<D1,D2>> Congruences_Product;
      typedef Partially_Reduced_Product<D1,D2,Shape_Preserving_Reduction<D1,D2>> Shape_Preserving_Product;
    };
    
    VERIFICATION_CRITERIA:

    Check policy aliases, grid/polyhedron intersections with independent restrictions and nonempty components with empty intersection.

    BIBLIOGRAPHY:

    CousotC79 | whole work (background on product domains).

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/contractvalues1.cc; tests/Partially_Reduced_Product/directproduct1.cc; tests/Partially_Reduced_Product/smashproduct1.cc.

  • PPL-SPEC-001434
    2. Dimensioned product construction and extent UID: PPL-SPEC-001434 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Dimension construction shall create two empty or two universe components in n dimensions; default shall be zero-dimensional universe. The structural limit shall be the minimum component limit. An oversized or reserved dimension shall throw std::length_error before extent-proportional storage. space_dimension shall return their common ambient dimension. affine_dimension shall reduce and return the smaller component affine dimension, which need not equal the intersection's affine dimension.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    The product cannot admit dimensions unsupported by either component; affine dimensions can shrink further on intersection.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    explicit Partially_Reduced_Product(dimension_type n=0, Degenerate_Element=UNIVERSE);
    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check both distinguished values and defaults, component limit minimum, invalid dimensions and components whose intersection has smaller affine dimension.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/dimension1.cc.

  • PPL-SPEC-001435
    3. Product copying, assignment and exchange UID: PPL-SPEC-001435 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Same-type copying and assignment shall preserve both component values and the lazy reduction state. Later mutation shall be independent. Assignment shall support self-assignment and return its receiver. The copy complexity argument shall not change exactness. Exchange shall swap both components and reduction state together, including dimension; self-exchange shall preserve the value. Destruction shall release both components.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    A policy state belongs to its component pair and must move with it.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    Partially_Reduced_Product(const Partially_Reduced_Product&, Complexity_Class=ANY_COMPLEXITY);
    ~Partially_Reduced_Product();
    Partially_Reduced_Product& operator=(const Partially_Reduced_Product&);
    void m_swap(Partially_Reduced_Product&);
    template <typename D1, typename D2, typename R>
    void swap(Partially_Reduced_Product<D1,D2,R>&, Partially_Reduced_Product<D1,D2,R>&);
    
    VERIFICATION_CRITERIA:

    Check independent mutation, self-assignment/exchange, unlike dimensions and delayed reduction state.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/directproduct1.cc; tests/Partially_Reduced_Product/fromproduct1.cc.

  • PPL-SPEC-001436
    4. Product construction from descriptor systems UID: PPL-SPEC-001436 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint-system and congruence-system construction shall construct both components from the same input and mark reduction unknown. The resulting intersection shall contain the described set and shall be exact when the combined component constructions represent it exactly. Const sources shall be preserved. Nonconst overloads shall permit the documented second-component recycling while constructing the first from an unconsumed view. Admission and exceptions shall follow both component constructors.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Consuming input for one component must occur only after the other has obtained its value.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    explicit Partially_Reduced_Product(const Constraint_System&);
    explicit Partially_Reduced_Product(Constraint_System&);
    explicit Partially_Reduced_Product(const Congruence_System&);
    explicit Partially_Reduced_Product(Congruence_System&);
    
    VERIFICATION_CRITERIA:

    Check constraints/congruences, const/nonconst sources, dimension and contradiction handling, and distinct component precision.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/congruences1.cc; tests/Partially_Reduced_Product/constraints1.cc.

  • PPL-SPEC-001437
    5. Conversions to a product UID: PPL-SPEC-001437 STATUS: APPROVED COMPONENT: DOMAIN_COMBINATIONS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Simple-domain conversion shall construct both destination components from the source, preserve dimension and contain its represented set. The result shall be exact when the component intersection preserves all source information. Polyhedron conversions shall pass the supplied complexity class; Grid, Box, BD and octagon overloads shall use their component constructors' default complexity. Cross-product conversion shall convert both source component views into destination products and intersect those products, so restrictions contributed by either source component are retained to the precision of the destination. Source values shall remain unchanged apart from permitted cache/reduction changes.

    The valid-use conditions in 🔗 1. Compound-domain values and valid use shall apply. Unless dimension-changing behavior is specified, ambient dimension shall be preserved. Deferred reduction and representation changes shall preserve the stated mathematical result. Borrowed views shall not be retained across an operation that can invalidate their underlying representation.

    RATIONALE:

    Both source components can contribute restrictions that the other cannot express.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members of Partially_Reduced_Product unless qualified otherwise.

    explicit Partially_Reduced_Product(const C_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    explicit Partially_Reduced_Product(const NNC_Polyhedron&, Complexity_Class=ANY_COMPLEXITY);
    explicit Partially_Reduced_Product(const Grid&, Complexity_Class=ANY_COMPLEXITY);
    template <typename Interval> explicit Partially_Reduced_Product(const Box<Interval>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename T> explicit Partially_Reduced_Product(const BD_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename T> explicit Partially_Reduced_Product(const Octagonal_Shape<T>&, Complexity_Class=ANY_COMPLEXITY);
    template <typename E1, typename E2, typename S>
    explicit Partially_Reduced_Product(const Partially_Reduced_Product<E1,E2,S>&,
                                      Complexity_Class=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check every source family, both product component orders, separate restrictions and empty sources.

    SOURCE:

    src/Partially_Reduced_Product_defs.hh; src/Partially_Reduced_Product_inlines.hh; src/Partially_Reduced_Product_templates.hh; src/Partially_Reduced_Product_types.hh; tests/Partially_Reduced_Product/frombdshape1.cc; tests/Partially_Reduced_Product/frombox1.cc; tests/Partially_Reduced_Product/fromgrid1.cc; tests/Partially_Reduced_Product/fromoctagonalshape1.cc; tests/Partially_Reduced_Product/frompolyhedron1.cc; tests/Partially_Reduced_Product/fromproduct1.cc.

  • 1. Read-only iterator types, borrowed positions and value operations UID: PPL-SPEC-001595 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    iterator_to_const<Container> shall store a Container::iterator; const_iterator_to_const<Container> shall store a Container::const_iterator. Both wrappers shall expose the five iterator traits of Container::const_iterator. Admitted containers shall provide bidirectional mutable and constant iterators, with constant-iterator reference and pointer types providing ordinary const element references and pointers. Each selected underlying iterator operation shall be well-formed and satisfy its own lifetime, range and synchronization conditions.

    Default construction shall value-initialize the underlying position. Copying and assignment shall preserve the borrowed position without copying an element or taking ownership of the sequence. Assignment shall return a reference to its target. Conversion from a mutable wrapper to its constant counterpart shall preserve the position and element identity; the reverse conversion shall not be provided. Construction from an underlying position shall remain restricted to the declared friends. Destruction shall destroy the stored iterator without destroying the borrowed container or elements. Underlying exceptions shall propagate with the underlying operation's state guarantees and normal completed-subobject cleanup.

    Position validity and invalidation shall follow the underlying container. Singular positions shall be used only for operations admitted for the underlying singular iterator; element access and movement shall require valid range positions. The adapters shall impose no numerical initialization prerequisite of their own. Element operations shall retain their prerequisites.

    RATIONALE:

    Container traversal needs copyable borrowed positions while disjunct values remain protected by the container interface.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    template <typename Container> class iterator_to_const;
    template <typename Container> class const_iterator_to_const;
    // Both classes expose iterator_category, value_type, difference_type,
    // pointer and reference from the container's constant iterator traits.
    iterator_to_const();
    iterator_to_const(const iterator_to_const&);
    iterator_to_const& operator=(const iterator_to_const&);
    const_iterator_to_const();
    const_iterator_to_const(const const_iterator_to_const&);
    const_iterator_to_const& operator=(const const_iterator_to_const&) = default;
    const_iterator_to_const(const iterator_to_const<Container>&);
    
    VERIFICATION_CRITERIA:

    Check aliases and C++20 bidirectional iterator concepts for the list-backed powerset instantiation. Exercise default/copy/assignment, self-assignment and conversion; reject reverse conversion at compile time. Inspect generic underlying-exception propagation and completed-subobject cleanup. Check that destroying wrappers preserves the collection and erasing an unrelated list element preserves retained positions.

    SOURCE:

    src/iterator_to_const_defs.hh; src/iterator_to_const_inlines.hh; tests/readonlyiteratorsspec1.cc; src/Powerset_defs.hh.

  • PPL-SPEC-001596
    2. Read-only iterator element identity and const access UID: PPL-SPEC-001596 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    At a valid dereferenceable position, operator* shall return the underlying element as the declared constant reference, and operator-> shall return a pointer to that same element as the declared constant pointer. Both mutable-container and constant-container wrappers shall prevent direct mutation through their exposed reference and pointer types. Access shall preserve the stored position and the identity of the borrowed element, without copying it. The valid-use conditions of 🔗 1. Read-only iterator types, borrowed positions and value operations shall apply. An end or singular iterator shall not be dereferenced.

    RATIONALE:

    Read-only element access allows the container to maintain its representation invariants through controlled element replacement.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    // Members of both read-only iterator adapter classes:
    reference operator*() const;
    pointer operator->() const;
    
    VERIFICATION_CRITERIA:

    Check reference/pointer constness at compile time and compare referent addresses from dereference, arrow, independent copies and const conversion. Check every position against an independently constructed value; verify that wrapper destruction preserves element addresses and collection contents.

    SOURCE:

    src/iterator_to_const_defs.hh; src/iterator_to_const_inlines.hh; tests/readonlyiteratorsspec1.cc; src/Powerset_defs.hh.

  • PPL-SPEC-001597
    3. Read-only iterator traversal and interoperable equality UID: PPL-SPEC-001597 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Prefix increment and decrement shall move the stored position by one underlying step and return a reference to the same wrapper. Postfix forms shall make the same movement and return a wrapper holding the preceding position. Copies shall thereafter move independently. Forward and reverse traversal shall follow the underlying sequence order without modifying its elements.

    Equality shall compare the underlying positions; inequality shall be its Boolean complement. Mutable and constant wrappers of the same container type shall support both operand orders, with comparison through the corresponding constant position. Comparisons shall require positions in an underlying comparison domain, including the same sequence when required by that iterator. Movement shall remain within the underlying bidirectional range: increment of its end and decrement of its begin shall not be admitted. Decrement of end shall be admitted for a nonempty range. The conditions of 🔗 1. Read-only iterator types, borrowed positions and value operations shall apply.

    RATIONALE:

    Generic collection algorithms need ordinary bidirectional traversal and consistent equality across mutable and constant collection views.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library. Member excerpts apply to the indicated types.

    // Members of iterator_to_const<Container>:
    iterator_to_const& operator++();
    iterator_to_const operator++(int);
    iterator_to_const& operator--();
    iterator_to_const operator--(int);
    bool operator==(const iterator_to_const&) const;
    bool operator!=(const iterator_to_const&) const;
    // Members of const_iterator_to_const<Container>:
    const_iterator_to_const& operator++();
    const_iterator_to_const operator++(int);
    const_iterator_to_const& operator--();
    const_iterator_to_const operator--(int);
    bool operator==(const const_iterator_to_const&) const;
    bool operator!=(const const_iterator_to_const&) const;
    template <typename Container>
    bool operator==(const iterator_to_const<Container>&,
                    const const_iterator_to_const<Container>&);
    template <typename Container>
    bool operator!=(const iterator_to_const<Container>&,
                    const const_iterator_to_const<Container>&);
    
    VERIFICATION_CRITERIA:

    Check prefix return identities, postfix old values, independent copied positions and both directions of each equality/inequality outcome. Traverse three distinguishable elements forward and backward, use end decrement and standard distance/reverse adapters, and check preserved sequence contents.

    SOURCE:

    src/iterator_to_const_defs.hh; src/iterator_to_const_inlines.hh; tests/readonlyiteratorsspec1.cc; src/Powerset_defs.hh.

  • PPL-SPEC-000545
    5. Constraint-relation textual output and stream failures UID: PPL-SPEC-000545 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Stream output and ascii_dump(s) shall emit exactly the stored assertion names in the order IS_DISJOINT, STRICTLY_INTERSECTS, IS_INCLUDED, SATURATES, separated by `` & `` when more than one is present. The empty set shall emit NOTHING. No trailing separator, newline or numeric flag mask shall be added. The insertion operator shall return the same stream reference. No-argument ascii_dump() and print() shall emit the same representation to std::cerr.

    Output shall preserve the relation value and stream formatting flags and precision; any pending field width shall follow ordinary string-insertion semantics. Stream errors shall follow the stream's error-state and exception-mask rules; a reported stream failure need not roll back bytes already emitted. Calls shall require valid live streams and the prerequisites in 🔗 1. Constraint-relation assertion values and named factories, with caller synchronization for shared output streams. Text output shall not provide a corresponding relation-value input operation.

    RATIONALE:

    Stable names make compound answers readable while ordinary C++ stream failures remain visible to the caller.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    void print() const;
    std::ostream& operator<<(std::ostream& s, const Poly_Con_Relation& r);
    
    VERIFICATION_CRITERIA:

    Check exact text for every assertion subset through stream insertion and ASCII output, capture both no-argument outputs, retain stream identity and formatting, and inject returning and throwing stream-buffer failures with unchanged source values.

    SOURCE:

    src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000550
    10. Generator-relation textual output and stream failures UID: PPL-SPEC-000550 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Stream output and ascii_dump(s) shall emit exactly the stored assertion as SUBSUMES for the singleton subsumption assertion. The empty set shall emit NOTHING. No trailing separator, newline or numeric flag mask shall be added. The insertion operator shall return the same stream reference. No-argument ascii_dump() and print() shall emit the same representation to std::cerr.

    Output shall preserve the relation value and stream formatting flags and precision; any pending field width shall follow ordinary string-insertion semantics. Stream errors shall follow the stream's error-state and exception-mask rules; a reported stream failure need not roll back bytes already emitted. Calls shall require valid live streams and the prerequisites in 🔗 6. Generator-relation assertion values and named factories, with caller synchronization for shared output streams. Text output shall not provide a corresponding relation-value input operation.

    RATIONALE:

    Stable names make compound answers readable while ordinary C++ stream failures remain visible to the caller.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    void print() const;
    std::ostream& operator<<(std::ostream& s, const Poly_Gen_Relation& r);
    
    VERIFICATION_CRITERIA:

    Check exact text for every assertion subset through stream insertion and ASCII output, capture both no-argument outputs, retain stream identity and formatting, and inject returning and throwing stream-buffer failures with unchanged source values.

    SOURCE:

    src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

  • 1. Internal coefficient-row values and valid use UID: PPL-SPEC-000281 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Dense_Row and Sparse_Row shall represent a finite coefficient vector (a0, …, an − 1) with independently declared logical size n. Size zero shall be valid. A row shall impose no mandatory constant or hidden coordinate. The affine expression interpretation shall instead belong to 🔗 1. Affine value, numerical prerequisites and shared zero. Dense storage shall retain every logical position; sparse storage shall permit implicit and explicitly stored zeroes with the same coefficient value, while exposing the stored-position distinction.

    Operations shall require live valid rows, admitted sizes and indices, active library initialization where coefficient constants or scratch storage are used, and synchronization under 🔗 3. Thread initialization, default state and finalization. Successful arithmetic shall require all evaluated coefficient steps/results to be representable in the selected profile. Allocation/numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete row; unchanged sources shall survive failure. A modified target shall remain destructible, without a universal rollback guarantee.

    RATIONALE:

    Raw coefficient storage must preserve vector indices without importing geometric descriptor conventions.

    INTERFACE:

    Internal source headers: Dense_Row_defs.hh and Sparse_Row_defs.hh. Names belong to Parma_Polyhedra_Library.

    class Dense_Row;
    class Sparse_Row;
    
    VERIFICATION_CRITERIA:

    Check literal vectors, zero-sized rows, stored/implicit zeroes and profile-dependent arithmetic prerequisites. Inspect ownership, initialization and mutation contexts.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000282
    2. Dense zero construction, size and reserved capacity UID: PPL-SPEC-000282 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall create a zero-sized row. Sized construction shall create exactly the requested number of zero coefficients. Construction with explicit capacity shall require size <= capacity <= max_size() and reserve that capacity without making additional logical coefficients. The size-only form shall initially reserve its requested size. max_size() shall return numeric_limits<size_t>::max() / sizeof(Coefficient); resource availability shall remain a separate condition from this reported limit.

    RATIONALE:

    Reserved capacity is storage for later growth, rather than additional vector entries.

    INTERFACE:
    Dense_Row();
    Dense_Row(dimension_type size);
    Dense_Row(dimension_type size, dimension_type capacity);
    static dimension_type Dense_Row::max_size();
    dimension_type Dense_Row::size() const;
    
    VERIFICATION_CRITERIA:

    Check default, zero-sized reserved and nonzero rows; infer specified capacity through memory accounting and growth within capacity without infeasible allocations.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000284
    4. Owning row copies, sized copies and storage conversion UID: PPL-SPEC-000284 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Ordinary row copies shall preserve size and every coefficient, own independent storage and survive source mutation/destruction. Dense copies shall retain source capacity unless supplied another admitted capacity. A copy with specified size/capacity shall retain the common source prefix, discard removed positions and zero-extend added positions. Explicit dense capacity shall be at least result size; sparse compatibility capacity shall be ignored. Cross-storage construction shall preserve that same complete coefficient vector. Dense-to-sparse construction may omit zero entries; sparse-to-dense construction shall materialize implicit zeroes. Const-rvalue forms selecting copy constructors shall retain the source value.

    RATIONALE:

    Copying and representation changes must preserve values independently of the source owner.

    INTERFACE:
    Dense_Row(const Dense_Row& y);
    Dense_Row(const Dense_Row& y, dimension_type capacity);
    Dense_Row(const Dense_Row& y, dimension_type size, dimension_type capacity);
    explicit Dense_Row(const Sparse_Row& y);
    Dense_Row(const Sparse_Row& y, dimension_type size, dimension_type capacity);
    Sparse_Row(const Sparse_Row& y); // Explicitly defaulted.
    Sparse_Row(const Sparse_Row& y, dimension_type capacity);
    Sparse_Row(const Sparse_Row& y, dimension_type size, dimension_type capacity);
    explicit Sparse_Row(const Dense_Row& y);
    Sparse_Row(const Dense_Row& y, dimension_type size, dimension_type capacity);
    
    VERIFICATION_CRITERIA:

    Check all copy forms with shorter/equal/longer sizes, explicit stored zeroes, source destruction, source mutation and both storage directions; inject recoverable backing-allocation failure.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000285
    5. Row assignment, whole-row swaps and destruction UID: PPL-SPEC-000285 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful copy assignment shall replace the complete vector, return the target, preserve its distinct source and admit self-assignment. Cross-storage assignment shall preserve values while retaining the target's row type. Copies shall remain independently mutable. Whole-row swaps shall exchange full vectors, including their sizes and owned storage; mixed dense/sparse swaps shall convert storage while exchanging vector values. Self-swaps shall retain value. iter_swap for two vector positions shall swap the owning dense rows. Destruction shall release owned coefficient and backing storage.

    Replacement allocation failure shall preserve the source; target-state guarantees shall follow 🔗 1. Internal coefficient-row values and valid use.

    For trivially destructible coefficient types, Dense_Row transfer construction from a non-const rvalue shall acquire the complete owned storage without allocating or throwing and leave its source empty and reusable. References to dense elements shall follow their storage; distinct-owner transfers shall invalidate element iterators.

    For other coefficient types, dense construction from rvalues shall retain independent, source-preserving copy behavior. Dense assignment from rvalues shall retain independent, source-preserving copy behavior for every coefficient type; self-assignment shall preserve the value.

    Sparse_Row construction and assignment from rvalues shall retain independent, source-preserving copy behavior, including logical extent and explicit stored zeroes. Its copy declarations shall prevent new backing-tree transfer operations from implicitly changing the row-level interface.

    RATIONALE:

    Replacing or exchanging vector owners must not make coefficient values depend on another row lifetime.

    INTERFACE:
    Dense_Row& Dense_Row::operator=(const Dense_Row& y);
    Dense_Row& Dense_Row::operator=(const Sparse_Row& y);
    Sparse_Row& Sparse_Row::operator=(const Sparse_Row& y); // Explicitly defaulted.
    Sparse_Row& Sparse_Row::operator=(const Dense_Row& y);
    void Dense_Row::m_swap(Dense_Row& y);
    void Sparse_Row::m_swap(Sparse_Row& y);
    void swap(Dense_Row& x, Dense_Row& y);
    void swap(Sparse_Row& x, Sparse_Row& y);
    void swap(Dense_Row& x, Sparse_Row& y);
    void swap(Sparse_Row& x, Dense_Row& y);
    void iter_swap(std::vector<Dense_Row>::iterator x, std::vector<Dense_Row>::iterator y);
    Dense_Row::~Dense_Row();
    Sparse_Row::~Sparse_Row(); // Implicitly declared.
    // This transfer overload requires trivially destructible coefficients.
    Dense_Row(Dense_Row&& y) noexcept;
    
    VERIFICATION_CRITERIA:

    Check dense nonthrowing construction traits, zero C++/GMP allocation during construction transfers, exact values and storage ownership, empty and reserved-empty inputs, const-rvalue copies and source reuse. Check independently mutable source-preserving rvalue assignments and self-assignment. Check that sparse rvalue construction and assignment preserve their sources and create independently mutable copies. Verify the same source-preserving dense construction behavior for nontrivial coefficient types. Check chained/self/rvalue assignments, empty and different-sized sources, swaps in every storage pairing, vector iter_swap and destruction independence. Exercise allocation-failure paths.

    SOURCE:

    tests/rowmovespec1.cc; src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000286
    6. Dense resizing and reuse of reserved storage UID: PPL-SPEC-000286 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Resizing shall retain the common prefix, discard removed coefficients and initialize newly introduced coefficients to zero. Removed values shall not reappear after regrowth. resize(n) shall retain current capacity when sufficient. Otherwise, with prior capacity c and maximum capacity M, it shall grow capacity to max(n, min(M, c + floor(c/2))), evaluating the sum without overflow. Thus construction from zero capacity and large one-shot expansions shall allocate the requested extent; repeated small growth shall reserve fewer than half as many spare slots as the requested extent at each reallocation. Retaining capacity after shrinking or an explicit reservation shall remain permitted. resize(n,c) shall require admitted n <= c and set capacity exactly c; zero capacity shall release backing storage. shrink(n) shall require n <= size() and retain capacity. expand_within_capacity(n) shall require size() <= n <= capacity and add zeroes without replacing backing storage. Position changes/reallocation shall invalidate affected borrowed references and iterators.

    RATIONALE:

    Logical growth, logical removal and backing-capacity changes have different effects on storage ownership. Geometric growth amortizes repeated small expansions while bounding spare coefficient storage; explicit-capacity requests retain exact control.

    INTERFACE:
    void Dense_Row::resize(dimension_type n);
    void Dense_Row::resize(dimension_type n, dimension_type capacity);
    void Dense_Row::shrink(dimension_type n);
    void Dense_Row::expand_within_capacity(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check all size/capacity relations, empty reserved rows, prefix preservation, removal/regrowth zeroes and reference stability when no storage replacement or relocation occurs. Check that repeated unit growth uses logarithmically many backing replacements, capacity stays within the stated spare-storage bound, and one-shot/explicit-capacity requests remain exact. Analyze saturation of capacity arithmetic at the maximum admitted extent; exercise allocation failure before replacement.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000292
    12. Insertion and replacement with argument-value independence UID: PPL-SPEC-000292 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Insertion shall require i < size() and return the indexed position. An explicit value shall replace that coefficient using its entry value, including when borrowed from another entry of the same row. No duplicate key shall be created. A value-free insertion shall retain an existing value, or create a stored zero in a missing sparse position. Dense value-free insertion shall return the existing logical slot unchanged. Hints shall have the validity and result-independence specified by 🔗 11. Indexed row search, lower bounds and hint independence. Sparse insertions may reorganize storage and invalidate earlier borrowed positions.

    Member overloads that return references, iterators or nonowning views into the owner shall require an lvalue owner. Matching rvalue calls that would produce such borrows shall be rejected during overload resolution. Temporary iterator and row-view values shall remain usable while their backing owner remains alive.

    RATIONALE:

    Inserting from a borrowed coefficient must preserve its value through storage growth or replacement.

    INTERFACE:
    Dense_Row::iterator Dense_Row::insert(dimension_type i, Coefficient_traits::const_reference x) &;
    Dense_Row::iterator Dense_Row::insert(iterator hint, dimension_type i, Coefficient_traits::const_reference x) &;
    Dense_Row::iterator Dense_Row::insert(dimension_type i) &;
    Dense_Row::iterator Dense_Row::insert(iterator hint, dimension_type i) &;
    Sparse_Row::iterator Sparse_Row::insert(dimension_type i, Coefficient_traits::const_reference x) &;
    Sparse_Row::iterator Sparse_Row::insert(iterator hint, dimension_type i, Coefficient_traits::const_reference x) &;
    Sparse_Row::iterator Sparse_Row::insert(dimension_type i) &;
    Sparse_Row::iterator Sparse_Row::insert(iterator hint, dimension_type i) &;
    
    VERIFICATION_CRITERIA:

    Check new/existing keys, zero/nonzero replacement, all hints, self-entry and other-entry arguments, including sparse growth and storage reorganization. Check lvalue admission and temporary-owner rejection with compile-time client expressions. Preserve temporary iterator/view use and lvalue storage identity in runtime checks.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc.

  • PPL-SPEC-000294
    14. Coordinate insertion and deletion preserve coefficient association UID: PPL-SPEC-000294 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    add_zeroes_and_shift(n,i) shall require i <= size() and admitted nonoverflowing result size/keys. It shall insert n zero positions before i and shift every old position at or after i upward by n. Zero insertion shall preserve the vector. delete_element_and_shift(i) shall require i < size(), remove just that coefficient and shift all later indices down by one. Dense deletion shall retain capacity. Implicit sparse zeroes shall stay implicit unless already explicitly represented. Dense shifts/deletions and sparse deletions shall invalidate prior iterators. Sparse insertion of zero positions shall preserve stored-entry iterator values and update affected indices, retaining their coefficient association.

    For erase_and_reindex(index_map,new_size), index_map shall contain size() entries. Selected coordinates shall be marked not_a_dimension(); the remaining images shall enumerate [0,new_size) in order. The result shall be the stable subsequence of retained coefficients with the specified size. Dense rows shall retain capacity. Sparse rows shall retain surviving explicit stored zeroes without materializing implicit zeroes. The operation shall invalidate ordinary iterators and coefficient references. If a sparse erasure allocation fails, the row shall remain valid at its old size and numbering, with possibly some selected stored entries already erased.

    RATIONALE:

    Coordinate renumbering must move the coefficient associated with each surviving position.

    INTERFACE:
    void Dense_Row::add_zeroes_and_shift(dimension_type n, dimension_type i);
    void Sparse_Row::add_zeroes_and_shift(dimension_type n, dimension_type i);
    void Dense_Row::delete_element_and_shift(dimension_type i);
    void Sparse_Row::delete_element_and_shift(dimension_type i);
    void Dense_Row::erase_and_reindex(
        const std::vector<dimension_type>& index_map, dimension_type new_size);
    void Sparse_Row::erase_and_reindex(
        const std::vector<dimension_type>& index_map, dimension_type new_size);
    
    VERIFICATION_CRITERIA:

    Enumerate front/interior/end insertion and all deletion indices against literal vector insertion/erase, including empty rows, holes, stored zeroes, spare dense capacity and sparse iterator index updates.

    Compare all removal subsets of small vectors, including empty/identity/all removed maps, signed coefficient boundaries, explicit sparse zeroes and spare dense capacity. Check retained stored entries and growth after compaction.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/sparserow1.cc.

  • PPL-SPEC-000301
    21. Dense-row ASCII export and reload UID: PPL-SPEC-000301 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall emit the logical size followed by all coefficients in index order, using size n a0 ... syntax and a terminating newline. ascii_load(s) shall accept a complete compatible representation with an admitted size and representable coefficients, replace size/values and return true. Size zero shall be admitted. A malformed keyword, missing size or missing/malformed coefficient shall return false; trailing input shall be left for subsequent parsing. No rollback shall be promised after failure; owned resources and surviving target destruction shall follow 🔗 1. Internal coefficient-row values and valid use. The zero-argument dump and print forms shall write this representation to the designated diagnostic stream.

    RATIONALE:

    Raw-row reload must restore every logical coefficient, including explicit dense zeroes and extent.

    INTERFACE:
    void Dense_Row::ascii_dump(std::ostream& s) const;
    void Dense_Row::ascii_dump() const;
    bool Dense_Row::ascii_load(std::istream& s);
    void Dense_Row::print() const;
    
    VERIFICATION_CRITERIA:

    Round-trip independent vectors and size zero through replacement targets; check exact format, malformed/truncated tokens, retry after failure and preserved trailing input.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-000302
    22. Sparse-row ASCII export, stored entries and validation UID: PPL-SPEC-000302 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Sparse ASCII export shall report logical size, stored-element count and ascending indexed coefficients, including explicitly stored zeroes, in size n elements k [ i ]= a ... syntax with a terminating newline. Loading a complete compatible representation shall replace logical extent and stored entries and return true. Size zero with zero stored entries shall be valid. Malformed or missing keywords, counts, indices and coefficients, counts greater than the logical extent, and repeated, out-of-order or out-of-extent indices shall report false rather than successful construction of an invalid row. Trailing input shall remain available. No rollback shall be promised on failure; target ownership shall follow 🔗 1. Internal coefficient-row values and valid use. Diagnostic dump/print forms shall use this reloadable representation.

    RATIONALE:

    A sparse loader must preserve both extent and indexed coefficient associations without admitting keys outside the vector.

    INTERFACE:
    void Sparse_Row::ascii_dump(std::ostream& s) const;
    void Sparse_Row::ascii_dump() const;
    bool Sparse_Row::ascii_load(std::istream& s);
    void Sparse_Row::print() const;
    
    VERIFICATION_CRITERIA:

    Check round-trip stored zeroes, holes, count/size zero, exact syntax, malformed and truncated fields, out-of-extent keys, failure retry and trailing input.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/sparserow1.cc; tests/rowstoragebranches1.cc.

  • PPL-SPEC-000303
    23. Row invariants and memory-accounting queries UID: PPL-SPEC-000303 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    OK() shall report satisfaction of row structural invariants without changing values. Dense invariants shall include size <= capacity <= max_size() and backing-storage consistency; OK(n) shall additionally compare logical size with n. Sparse invariants shall require every stored index below logical size; its compatibility OK(capacity) shall ignore that argument.

    Memory queries shall return nonnegative accounting estimates without changing values. For both row types, total shall equal sizeof(row) + external. Dense external accounting shall include actual reserved coefficient slots and external storage owned by live coefficients. Sparse external accounting shall follow its coefficient tree. Compatibility capacity arguments shall not change the reported current storage; neither query shall promise exact allocator bookkeeping or available memory.

    RATIONALE:

    Current storage accounting and structural validity are observable checks rather than estimates of future allocation success.

    INTERFACE:
    bool Dense_Row::OK() const;
    bool Dense_Row::OK(dimension_type n) const;
    memory_size_type Dense_Row::external_memory_in_bytes() const;
    memory_size_type Dense_Row::external_memory_in_bytes(dimension_type capacity) const;
    memory_size_type Dense_Row::total_memory_in_bytes() const;
    memory_size_type Dense_Row::total_memory_in_bytes(dimension_type capacity) const;
    
    bool Sparse_Row::OK() const;
    bool Sparse_Row::OK(dimension_type n) const;
    memory_size_type Sparse_Row::external_memory_in_bytes() const;
    memory_size_type Sparse_Row::external_memory_in_bytes(dimension_type capacity) const;
    memory_size_type Sparse_Row::total_memory_in_bytes() const;
    memory_size_type Sparse_Row::total_memory_in_bytes(dimension_type capacity) const;
    
    VERIFICATION_CRITERIA:

    Check accounting identities for empty/reserved/populated rows and coefficient limbs, ignored compatibility capacity, matching dense size checks and unchanged values through const queries.

    SOURCE:

    src/Dense_Row_defs.hh; src/Dense_Row_inlines.hh; src/Dense_Row_templates.hh; src/Dense_Row.cc; src/Sparse_Row_defs.hh; src/Sparse_Row_inlines.hh; src/Sparse_Row_templates.hh; src/Sparse_Row.cc; tests/rowstoragespec1.cc; tests/denserow1.cc.

  • PPL-SPEC-001466
    1. Optimization and ranking valid use UID: PPL-SPEC-001466 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Solver and ranking interfaces shall use the selected coefficient profile without loss of mathematical information when every intermediate arithmetic operation meets that profile's range and exactness conditions. Initialization shall follow 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization; coordinate indices shall follow 🔗 1. Coordinate type and reserved dimension index. Objects, descriptors, iterators and streams shall remain live and valid throughout each operation.

    A completed mathematical result shall satisfy the applicable solver or ranking contract. Arithmetic, allocation and cancellation exceptions may propagate; exceptional completion shall not constitute a feasibility or termination conclusion. Surviving owned resources shall remain destructible, without a general rollback or further-query guarantee. Separate output coefficients shall refer to distinct writable objects and shall not alias input expression or generator storage. Borrowed views shall not survive a mutation, replacement, destruction or query that can invalidate their backing representation. Accesses that can change solver state, trees or caches shall be externally synchronized. Solver heuristics shall affect search choices rather than the meaning of successfully completed results.

    RATIONALE:

    Exact mathematical conclusions require explicit arithmetic and ownership conditions; resource failure is a separate outcome.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library.

    class MIP_Problem;
    class PIP_Problem;
    class PIP_Tree_Node;
    
    VERIFICATION_CRITERIA:

    Check independently interpreted models, all result classes, unavailable results, ownership during failures and state invalidation after changes.

    SOURCE:

    src/MIP_Problem.cc; src/MIP_Problem_defs.hh; src/MIP_Problem_inlines.hh; src/MIP_Problem_templates.hh; src/MIP_Problem_types.hh; src/PIP_Problem.cc; src/PIP_Problem_defs.hh; src/PIP_Problem_inlines.hh; src/PIP_Problem_templates.hh; src/PIP_Problem_types.hh; src/PIP_Tree.cc; src/PIP_Tree_defs.hh; src/PIP_Tree_inlines.hh; src/PIP_Tree_types.hh; src/termination.cc; src/termination_defs.hh; src/termination_templates.hh; src/termination_types.hh; tests/MIP_Problem/enumeratedmodels1.cc; tests/MIP_Problem/mipfeasibilityhistories1.cc; tests/PIP_Problem/boundedcontexts1.cc; tests/PIP_Problem/contextrefinement1.cc; tests/Polyhedron/termination1.cc; tests/MIP_Problem/mipproblem2.cc.

  • PPL-SPEC-001573
    1. Callback input protocol, lookahead and single-character putback UID: PPL-SPEC-001573 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Numeric parsers must see a coherent byte sequence despite lookahead, partial transfers, putback and transport failures.

    INTERFACE:

    Defining header: c_streambuf_defs.hh. Namespace: Parma_Polyhedra_Library. Standard streambuf operations dispatch to the following overrides; callbacks are private virtual functions that a derived transport may override.

    c_streambuf();
    virtual ~c_streambuf();
    int_type underflow() override;
    int_type uflow() override;
    std::streamsize xsgetn(char_type*, std::streamsize) override;
    int_type pbackfail(int_type = traits_type::eof()) override;
    virtual size_t cb_read(char*, size_t);
    
    VERIFICATION_CRITERIA:

    Check literal binary sequences containing all byte values, repeated peeks, mixed chunk boundaries, empty and zero requests, unget and replacement before/after reads, pending-byte refusal, temporary callback refusal and exceptions. Compare bulk results with successive single-byte reads and verify stream-state/exception-mask integration.

    SOURCE:

    src/c_streambuf_defs.hh; src/c_streambuf_inlines.hh; src/c_streambuf.cc; src/stdiobuf_defs.hh; src/stdiobuf_inlines.hh; src/stdiobuf.cc; tests/cstreambuf1.cc.

  • PPL-SPEC-001574
    2. Callback output, synchronization and failure propagation UID: PPL-SPEC-001574 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Transport refusal must preserve the actual transferred prefix and remain visible through standard stream error handling.

    INTERFACE:

    Defining header: c_streambuf_defs.hh. Namespace: Parma_Polyhedra_Library.

    std::streamsize xsputn(const char_type*, std::streamsize) override;
    int_type overflow(int_type) override;
    int sync() override;
    virtual size_t cb_write(const char*, size_t);
    virtual int cb_sync();
    
    VERIFICATION_CRITERIA:

    Exercise partial/zero writes, all byte values, ordinary/EOF overflow, synchronization success/failure, default callbacks, thrown callbacks, standard stream states and exception masks; interleave input/output and confirm pending input and unget history survive output failures.

    SOURCE:

    src/c_streambuf_defs.hh; src/c_streambuf_inlines.hh; src/c_streambuf.cc; src/stdiobuf_defs.hh; src/stdiobuf_inlines.hh; src/stdiobuf.cc; tests/cstreambuf1.cc.

  • PPL-SPEC-001575
    3. Borrowed stdio input and putback UID: PPL-SPEC-001575 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    The C++ buffer must preserve the caller-owned file and the C byte-stream failure model.

    INTERFACE:

    Defining header: stdiobuf_defs.hh. Namespace: Parma_Polyhedra_Library.

    stdiobuf(FILE*);
    int_type underflow() override;
    int_type uflow() override;
    std::streamsize xsgetn(char_type*, std::streamsize) override;
    int_type pbackfail(int_type = traits_type::eof()) override;
    
    VERIFICATION_CRITERIA:

    Use temporary binary files containing literal byte sequences, all byte values, mixed peeks/reads, actual EOF and short reads, unget and explicit replacement before/after reads. Check literal suffixes and the continued usability of the file after buffer destruction.

    SOURCE:

    src/c_streambuf_defs.hh; src/c_streambuf_inlines.hh; src/c_streambuf.cc; src/stdiobuf_defs.hh; src/stdiobuf_inlines.hh; src/stdiobuf.cc; tests/cstreambuf1.cc.

  • PPL-SPEC-001576
    4. Borrowed stdio output and synchronization UID: PPL-SPEC-001576 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    File output needs explicit transfer and ownership guarantees without inventing atomicity that stdio does not provide.

    INTERFACE:

    Defining header: stdiobuf_defs.hh. Namespace: Parma_Polyhedra_Library.

    std::streamsize xsputn(const char_type*, std::streamsize) override;
    int_type overflow(int_type) override;
    int sync() override;
    
    VERIFICATION_CRITERIA:

    Check every byte through single and bulk output, successful ordinary/EOF flush paths and file survival. Use a portably opened read-only file to exercise write refusal and a controlled failing stdio transport where supported for short writes and failed flush; check standard stream state.

    SOURCE:

    src/c_streambuf_defs.hh; src/c_streambuf_inlines.hh; src/c_streambuf.cc; src/stdiobuf_defs.hh; src/stdiobuf_inlines.hh; src/stdiobuf.cc; tests/cstreambuf1.cc.

  • PPL-SPEC-000536
    6. Indirect-sort failure and cooperative interruption states UID: PPL-SPEC-000536 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 5. Indirect sorting establishes a distinct prefix without resizing, failures while preparing or sorting the private index sequence shall preserve every indexed value and associated record. This shall include recoverable index-storage allocation failure and exceptions from the ordering comparator. Temporary index storage shall be released on every exceptional return.

    Outside library assertion evaluation, cooperative abandonment shall be checked before index preparation, at intervals of at most 1024 ordering comparisons, and again before the first indexed-value mutation. A reported cooperative interruption shall therefore preserve every indexed value and associated record. A caller-owned abandonment request shall remain set until the caller clears it; this comparison-count interval shall not imply an elapsed-time bound.

    An exception from the uniqueness comparator may occur after the indexed values have been sorted. It need not preserve their former order or establish a compact distinct prefix, but shall retain live owners and the complete value permutation and paired associations. A throwing swap shall be outside the algorithm's admitted swap precondition.

    RATIONALE:

    Cancellation and comparison failures must not lose owned rows or detach saturation records from them.

    INTERFACE:

    Internal source header: swapping_sort_templates.hh, with the configured assertion macros from assertions.hh available. Names belong to Parma_Polyhedra_Library::Implementation.

    template <typename Sort_Comparer, typename Unique_Comparer, typename Swapper>
    typename Sort_Comparer::size_type
    indirect_sort_and_unique(typename Sort_Comparer::size_type num_elems,
                             Sort_Comparer sort_cmp,
                             Unique_Comparer unique_cmp,
                             Swapper indirect_swap);
    
    VERIFICATION_CRITERIA:

    Inject an index-vector allocation failure and ordering-comparator exceptions before mutation; request cancellation at entry, during a long index sort and before a short sort commits; verify unchanged complete records and retained requests. Throw during uniqueness after sorting and check live paired permutations without assuming rollback.

    SOURCE:

    src/swapping_sort_templates.hh; tests/swappingsortspec1.cc.

  • PPL-SPEC-000582
    2. Empty, default-element and fill construction UID: PPL-SPEC-000582 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall produce an empty sequence. Size construction shall produce exactly the specified number of value-initialized values, using the vector element-initialization rules. Fill construction shall produce that many element copies of its argument, according to T copy semantics, and preserve the argument. Zero size shall be admitted. Successfully constructed elements shall belong to the new owner, and construction failure shall destroy every element already constructed for that incomplete owner. Parameterized copy construction shall construct each destination element from its corresponding const source element and the supplied additional argument, without default-constructing replacement elements. It shall preserve source order and values and clean up partial destination construction on failure.

    RATIONALE:

    Internal row arrays need unambiguous empty and populated initial values and cleanup after partial element creation.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    Swapping_Vector();
    explicit Swapping_Vector(dimension_type new_size);
    Swapping_Vector(dimension_type new_size, const T& x);
    template <typename Arg>
      requires std::constructible_from<T, const T&, const Arg&>
    Swapping_Vector(const Swapping_Vector& source, const Arg& argument);
    
    VERIFICATION_CRITERIA:

    Check zero/populated default and fill construction, source lifetime/independence for owning elements, and failures at each observed allocation during construction.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc; tests/systemconversionspec1.cc.

  • PPL-SPEC-000583
    3. Implicit copies, moves and destruction preserve element ownership UID: PPL-SPEC-000583 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The implicitly provided copy construction and assignment shall preserve the source sequence and create distinct element objects according to T copy semantics. Copy assignment shall admit self-assignment and return its target. For element types with independent owning copies, the copied values shall remain usable after source mutation or destruction.

    The implicitly provided move construction and assignment shall transfer the source vector's storage and sequence to the target, releasing the assignment target's prior elements. Their source shall remain valid for destruction, clearing and reuse; its prior size or contents shall not be promised after a non-self move. Self-move assignment shall leave a valid owner. Destruction shall destroy all retained elements and release the allocated vector storage.

    RATIONALE:

    Implicit standard-vector ownership operations are part of the wrapper interface even though its source declares no custom special members.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    Swapping_Vector(const Swapping_Vector&);
    Swapping_Vector& operator=(const Swapping_Vector&);
    Swapping_Vector(Swapping_Vector&&);
    Swapping_Vector& operator=(Swapping_Vector&&);
    ~Swapping_Vector();
    
    VERIFICATION_CRITERIA:

    Check independent owned copies and assignments, self-copy, source destruction, moved storage identities, replacement moves and self-move followed by clear/reuse.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc.

  • 5. Reservation transfers element owners and preserves the sequence UID: PPL-SPEC-000585 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Reservation at or below current capacity shall preserve the sequence, capacity, element locations and existing borrows. A successful larger reservation shall establish capacity at least the requested count while preserving size and every element value. Element ownership shall transfer without deep copying retained resources. For nonthrowing move construction, reservation may move-construct the retained elements directly into new backing storage, without constructing intermediate default elements. A nontrivial copy-only type whose noexcept copy satisfies the move-construction trait shall retain the swap path. Other element types shall use default-constructed live replacement slots and unqualified ordinary swaps with standard overloads available. A particular growth factor or exact capacity shall not be promised.

    With the nonthrowing moves or swaps of 🔗 1. Owned element sequence and valid swapping-vector use, a recoverable allocation or replacement-element construction failure shall preserve the original sequence, capacity and element locations and release the incomplete replacement storage.

    RATIONALE:

    Rows with separately owned coefficient storage should relocate by transferring ownership, and failed replacement preparation must leave their owner intact.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    void reserve(dimension_type new_capacity);
    
    VERIFICATION_CRITERIA:

    Check no-op and increasing reservations, exact values and payload identities, move-only relocation without default replacements, copy-only and potentially throwing move fallbacks, and every observed replacement-allocation failure.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; src/Sparse_Row_defs.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc.

  • 6. Resizing retains the prefix and initializes added elements UID: PPL-SPEC-000586 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A successful resize shall establish the requested size, preserve the common prefix and discard the removed suffix. The no-argument form shall value-initialize each added element. The fill form shall initialize each added element as a copy of the argument's value on entry. A live argument borrowed from a retained element shall be admitted, including when growth reallocates storage. Added copies shall have T copy semantics and shall not change the argument's value.

    Shrinking shall retain allocated capacity. Growing shall reserve storage as needed, without copying the retained elements for relocation. A recoverable failure during growth shall preserve the preceding logical sequence; capacity and element locations may have changed after a successful preliminary reservation.

    RATIONALE:

    Row-array growth needs both default values and stable fill-argument meaning even when an argument comes from the current owner.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    void resize(dimension_type new_size);
    void resize(dimension_type new_size, const T& x);
    
    VERIFICATION_CRITERIA:

    Check growth/shrink/regrowth against a literal sequence model, default and external fill values, spare-capacity borrowed fills, preserved owned-resource identities and recoverable growth failures.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc.

  • 7. Appending copies the argument value and popping removes the suffix UID: PPL-SPEC-000587 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A successful push_back(x) shall append one element copy of the argument's entry value and preserve all preceding values. A live argument borrowed from an existing element shall be admitted, including when insertion reallocates storage. The resulting sequence shall have size increased by one, with T copy semantics for its new element. A recoverable construction/allocation failure shall preserve the prior logical sequence; preliminary reservation may have changed capacity and element locations.

    pop_back() shall require a nonempty sequence, destroy exactly the last element and preserve every preceding value and allocated capacity.

    Internal disposable owners may opt into nonthrowing transfer construction. When growth is needed, reserve_consume(n) shall allocate a replacement buffer before transferring any live owner. It shall destroy the old transient owners after committing the replacement. push_back_consume(x) shall require an independent donor that is destroyed or restored before further descriptor use. Prepared transfers of participating descriptor types shall allocate no descriptor backend. Nonparticipating element types shall retain the established reserve and swap paths.

    RATIONALE:

    Appending must preserve the argument value across any storage growth and keep a clear ownership boundary for the final element.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    void push_back(const T& x);
    void reserve_consume(dimension_type new_capacity);
    void push_back_consume(T& x);
    void pop_back();
    
    VERIFICATION_CRITERIA:

    Check allocation-free prepared transfers, storage identity, restoration of internal donors, replacement-allocation failure, and repeated external appends through reallocation, borrowed arguments with spare capacity, independent owned copies, pop/reappend histories and copy-construction failure.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/rowtransferspec1.cc; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc.

  • PPL-SPEC-000591
    11. Allocated-memory accounting includes spare slots and live payloads UID: PPL-SPEC-000591 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When T supplies external_memory_in_bytes(), the wrapper's external-memory query shall return allocated element capacity multiplied by sizeof(T), plus the external memory reported by every live element. It shall preserve sequence, size, capacity and ownership. The count shall describe owned allocation payload, excluding allocator bookkeeping, and shall not predict future allocation success. In particular, clearing shall remove live-element payload from the count while retaining the capacity term.

    RATIONALE:

    Row-vector diagnostics must count spare row slots as well as the coefficient storage held by live rows.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    memory_size_type external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Compute the independent capacity-plus-live-payload identity across construction, reserve, resize, erase, clear, copies and swaps, checking unchanged complete values and owner addresses.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc.

  • PPL-SPEC-000592
    12. Recoverable element-construction failures preserve surviving owners UID: PPL-SPEC-000592 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For admitted element operations with ordinary source-preserving copy semantics, recoverable construction failures shall destroy every newly created element that does not become part of a successful result and release temporary replacement storage. Failed construction of the wrapper shall release its partial vector and elements. Failed reserve shall satisfy 🔗 5. Reservation transfers element owners and preserves the sequence; failed append/resize shall satisfy 🔗 6. Resizing retains the prefix and initializes added elements and 🔗 7. Appending copies the argument value and popping removes the suffix.

    Copy assignment may leave a partially updated element sequence when an element assignment throws, subject to the element type's own valid-state guarantees; it shall not promise universal rollback. Every surviving wrapper shall remain valid for destruction and clearing, and all remaining element ownership shall follow the selected element type's failure guarantees.

    RATIONALE:

    Generic row storage needs failure guarantees that distinguish safe replacement preparation from potentially partial element assignment.

    INTERFACE:

    Internal source header: Swapping_Vector_defs.hh. Names belong to Parma_Polyhedra_Library. Member signatures apply to Swapping_Vector<T>. iterator and const_iterator are the corresponding std::vector<T> types.

    Swapping_Vector(dimension_type new_size);
    Swapping_Vector(dimension_type new_size, const T& x);
    Swapping_Vector& operator=(const Swapping_Vector&);
    void reserve(dimension_type new_capacity);
    void resize(dimension_type new_size);
    void resize(dimension_type new_size, const T& x);
    void push_back(const T& x);
    
    VERIFICATION_CRITERIA:

    Inject each observed allocation and element copy/default construction failure, check source values and resource balance, inspect preserved logical sequences where promised, and clear/reuse valid owners after partial copy-assignment failure.

    SOURCE:

    src/Swapping_Vector_defs.hh; src/Swapping_Vector_inlines.hh; tests/swappingvectorspec1.cc; tests/swappingvectorerase1.cc; tests/systemconversionspec1.cc; tests/systembulktransferspec1.cc.

  • PPL-SPEC-000891
    1. Temporary-cache values, leases and element prerequisites UID: PPL-SPEC-000891 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal temporary mechanism shall manage live objects of the selected type T, either through a pool-backed lease or a local value holder. Each selected operation shall require the element construction, destruction and resource capabilities it actually invokes; copying or moving T shall not be required merely to obtain, use or return a pooled item. Element destruction shall not throw. Clients shall retain T's own numerical/runtime prerequisites. No additional global PPL initialization shall be required for unrelated element types.

    An active pool lease shall give its caller exclusive use of that item's element value until release. A released item shall belong to the cache, and the caller shall not keep accessing it through an old reference. Pool operations that affect a common free list shall not overlap without caller synchronization. Context/teardown conditions shall retain 🔗 12. Cache contexts, teardown and retained storage lifetime.

    RATIONALE:

    Temporary reuse needs ownership and value-lifetime rules independently of any coefficient type.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    template <typename T> class Temp_Reference_Holder;
    template <typename T> class Temp_Value_Holder;
    
    VERIFICATION_CRITERIA:

    Instantiate noncopyable, resource-owning and over-aligned element types without PPL initialization; check unique active leases, borrowed references and supported context histories.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000892
    2. Slow-copy trait selection and built-in GMP classifications UID: PPL-SPEC-000892 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Slow_Copy<T> shall classify ordinary types as false unless a supported specialization selects otherwise. Its GMP integer and rational specializations shall classify mpz_class and mpq_class as true. The classification shall select storage strategy under 🔗 9. Dirty temporary storage strategy; it shall not itself construct, copy, move or initialize an element object. A selected user specialization shall be visible before the corresponding temporary-holder instantiation.

    RATIONALE:

    The storage choice depends on an explicit type trait rather than a runtime guess or extra element copy.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> struct Slow_Copy;
    template <> struct Slow_Copy<mpz_class>;
    template <> struct Slow_Copy<mpq_class>;
    
    VERIFICATION_CRITERIA:

    Check default/GMP/user-specialized trait values and resulting holder bases with type traits, including noncopyable test elements.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000893
    3. Obtaining a fresh or retained pool item UID: PPL-SPEC-000893 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::obtain() shall return a reference to a live item exclusively leased from the calling context's pool. If no cached item is available, it shall allocate a new item and value-initialize its T object. Otherwise it shall remove one cached item from the free pool without reconstructing, copying or resetting its T value. Different simultaneously active leases shall refer to different items. No ordering among several available cached items shall be required. Allocation or element-construction failure shall retain 🔗 11. Allocation and element-construction failure cleanup.

    RATIONALE:

    A dirty temporary may retain a prior value, while a newly allocated item has a distinct construction path.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static Temp_Item& obtain();
    
    VERIFICATION_CRITERIA:

    Compare active item identity sets and exact tracked construction counts; exercise empty/nonempty pools, native value initialization, retained values and failed fresh allocation/construction.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000894
    4. Returning a lease without destroying its value UID: PPL-SPEC-000894 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::release(item) shall return one currently active lease to the calling context's free pool without destroying or resetting its T object or allocating another item. Its value shall remain owned by the cache for later reuse or cleanup. The caller shall release each lease exactly once, shall not release an already cached/dead item, and shall cease access through its old lease. A serialized cross-context handoff shall be admitted when T permits it and the item is returned to a live destination context under 🔗 12. Cache contexts, teardown and retained storage lifetime; returning an item shall not depend on an inaccessible origin-thread identifier.

    RATIONALE:

    Returning storage transfers it to the current cache without ending the element lifetime or requiring a new allocation.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static void release(Temp_Item& item);
    
    VERIFICATION_CRITERIA:

    Disable allocation during returns/reuse, check retained values and construction/destruction counts, exercise several return orders and a type-permitted serialized lease handoff.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 5. Qualified item reference and admitted borrowing UID: PPL-SPEC-000895 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::item() shall return a reference with the declared T& qualification to the same owned object on each call during that item's active lease. For a modifiable T, writes through this reference shall be visible through the lease and to later admitted reuse of that object. The accessor shall not allocate, copy, reconstruct or release the item. The returned reference shall not authorize access after release, holder destruction or actual object cleanup.

    RATIONALE:

    Clients use the temporary value through a borrowed reference, whose lifetime is shorter than retained cache storage.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check exact reference identity, independent active values, serial updates and retained reuse with allocation disabled.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000896
    6. Pool-item construction and ownership restrictions UID: PPL-SPEC-000896 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Clients shall acquire Temp_Item<T> objects through obtain and return them through release. Ordinary client default construction, copy construction and assignment shall be inaccessible; no supported move operation shall transfer a leased item implicitly. The cache shall own item destruction, and a leased item shall not be deleted directly by its caller. Stable live item identity shall be retained through admitted use and return until actual cache cleanup.

    RATIONALE:

    An item is a pool-owned object with an explicit lease protocol rather than a copyable value wrapper.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    
    VERIFICATION_CRITERIA:

    Check inaccessible construction/copy/move/assignment and exact active/reused identities without invoking forbidden direct destruction.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000897
    7. Reference-holder acquisition, access and scope cleanup UID: PPL-SPEC-000897 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A Temp_Reference_Holder<T> shall acquire exactly one pool item on successful construction and return it on destruction, including ordinary exception unwinding. Its item() shall return the leased object under 🔗 5. Qualified item reference and admitted borrowing. Holder destruction shall not destroy the retained T or allocate another item. Each separate default construction shall acquire its own lease. Copy construction, assignment and moving shall be inaccessible. A returned value reference shall remain borrowed only while that holder is live and retains its lease. Calling item() on a temporary reference holder shall be ill-formed.

    RATIONALE:

    A scope-bound holder makes pool return automatic without changing the temporary element's value lifetime.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    Temp_Reference_Holder();
    ~Temp_Reference_Holder();
    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check nested holders, unique active references, reuse after normal exit and throwing scopes, inaccessible copy/move and allocation-free destructor behavior.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000898
    8. Local value-holder construction and lifetime UID: PPL-SPEC-000898 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Value_Holder<T> shall own one local T object, default initialized as a normal member. A class type's default constructor shall run; a fundamental type shall not gain an initial-value guarantee from this holder. Its item() shall return a reference with the declared T& qualification to that same local object. Destruction shall destroy that owned object rather than cache it. The holder itself shall perform no separate pool allocation, copy or move, while retaining resources and construction failures intrinsic to T. Copy construction, assignment and moving shall be inaccessible.

    RATIONALE:

    Fast-copy temporaries use ordinary local lifetime and must not inherit the pool's retained-value behavior or an invented zero-initialization guarantee.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    Temp_Value_Holder();
    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check class construction/destruction and value independence, native types assigned before reads, exact reference identity, no-copy/move traits and element-construction failure cleanup.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 9. Dirty temporary storage strategy UID: PPL-SPEC-000899 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a selected T, Dirty_Temp<T> shall use the Temp_Reference_Holder<T> interface when Slow_Copy<T>::value is true and Temp_Value_Holder<T> when false. It shall retain the chosen holder's ownership, initialization, borrowing and failure rules without adding an element copy, move or numeric initialization stage. The result shall be a dirty temporary; clients shall establish the value required by their computation rather than assume a fresh numerical zero.

    RATIONALE:

    The same internal expression should select an appropriate lifetime strategy without changing value prerequisites.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T, typename Enable = void> class Dirty_Temp;
    
    VERIFICATION_CRITERIA:

    Check both inheritance selections, tracked slow/fast types and native values assigned before use; compare construction/destruction/reuse counts and exception histories.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000900
    10. Dirty-temporary declaration macro and lexical lifetime UID: PPL-SPEC-000900 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    PPL_DIRTY_TEMP(T, id) shall declare a corresponding local Dirty_Temp<T> holder and a T& named id bound to its item(). The type shall be supplied as one preprocessor argument; a type with commas shall use a suitable alias. The caller shall provide a usable fresh identifier and declaration scope, including the generated holder name, and terminate the invocation as a declaration. The macro shall preserve the selected holder lifetime through that lexical scope, including unwinding; id shall not authorize an escaping reference beyond it. The macro shall not copy or implicitly initialize the value beyond 🔗 9. Dirty temporary storage strategy.

    RATIONALE:

    A declaration macro must preserve actual type/reference and scope semantics, including comma-bearing template types passed through aliases.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    PPL_DIRTY_TEMP(Type, identifier);
    using Type_Alias = Template_Type<Argument1, Argument2>;
    PPL_DIRTY_TEMP(Type_Alias, identifier);
    
    VERIFICATION_CRITERIA:

    Compile distinct/nested identifiers and aliased template types; check exact reference types, both storage strategies and cleanup through throwing lexical scopes.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000901
    11. Allocation and element-construction failure cleanup UID: PPL-SPEC-000901 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    If a fresh pool item cannot be allocated, or its T construction throws, the exception shall propagate without leaking the incomplete item's storage or adding an incomplete item to the free pool. Previously active items and cached values shall remain usable and unchanged. Element-owned subresources shall follow the element constructor's own C++ cleanup obligations. A failed holder construction shall not acquire an active lease. A failed local value-holder construction shall likewise retain its element's cleanup protocol. A later successful attempt shall remain possible; obtaining an already cached item shall not require a fresh element construction or item allocation.

    RATIONALE:

    Failure must preserve existing temporary leases and leave no unowned partial cache node.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static Temp_Item& obtain();
    Temp_Reference_Holder();
    Temp_Value_Holder();
    
    VERIFICATION_CRITERIA:

    Inject each new-allocation boundary and a class-constructor exception after member acquisition, verify exact resource/lease preservation and retry through raw, reference-holder and local-holder forms.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 12. Cache contexts, teardown and retained storage lifetime UID: PPL-SPEC-000902 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Each Temp_Item<T> specialization shall maintain an independent free pool. In a thread-safe configuration it shall be thread-local; otherwise it shall be shared static storage requiring serialized conflicting operations. Cached free items shall be destroyed, with their owned values/resources, when that pool's thread or static context is destroyed. Outstanding active leases shall remain the caller's return responsibility and shall not be mistaken for cached free items. Calls shall not use a pool after its teardown has begun or completed.

    An element-permitted lease handoff may outlive the originating thread and be returned to another live context after synchronization; free-pool cleanup shall not destroy that outstanding lease. Cache storage shall not be cleared merely because a separate PPL initialization owner is finalized. These rules shall not relax T's own initialization, thread-affinity or value-lifetime restrictions.

    RATIONALE:

    A pool owns only returned items, and its storage lifetime differs from both active leases and library initialization owners.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    
    VERIFICATION_CRITERIA:

    Check per-type isolation, thread-local cleanup of returned items, synchronized outstanding-lease handoff, final process cleanup with an ordered exit observer, and inspection of PPL lifecycle independence.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 1. Generic threshold-watcher traits and admitted value protocol UID: PPL-SPEC-000851 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Threshold_Watcher<Traits> shall use the selected trait's Threshold and Delta types, current-value provider get(), nonthrowing strict comparison less_than and conversion from_delta. Threshold shall be default constructible, have nonthrowing copy construction, assignment and destruction, and satisfy its own value/resource needs. get() shall produce a value/reference bindable to a const threshold reference for the duration of a check. Conversion shall assign the selected absolute threshold from the supplied delta. Default construction, current-value provision and conversion may report exceptions.

    The comparison shall provide a coherent strict order over the admitted current/pending domain, including false on equal values. The trait shall provide a writable check_function slot accepting, converting to and invocable as void (*)(), initially null with no pending events and owned by the watcher protocol while events remain. This generic mechanism shall require no timer availability or global PPL initialization beyond its selected traits' needs. Thread/lifetime conditions shall retain 🔗 12. Watcher notification lifetimes and exclusive use.

    RATIONALE:

    The generic watcher needs exact trait operations and failure/lifetime conditions independently of the computational-weight backend.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Instantiate independent strict-order traits, including nondefault delta types, throwing threshold-default/get/conversion operations and no PPL initialization.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000852
    2. Flag-notification watcher construction UID: PPL-SPEC-000852 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful flag-form construction shall own one handler bound to the supplied holder and flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, compute/validate the event threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. Construction shall not install the flag or query its priority merely to register the event. The holder/flag shall remain borrowed notification objects. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and a compatible flag. Its synchronous notification shall use release compare-and-exchange to fill only a null holder. It shall not dereference an existing request, query priorities, or replace a nonnull request. Both notification objects shall outlive the watcher; a published flag shall also outlive its readers. Cancellation shall precede clearing or releasing its binding. The same threshold validation, registration failure cleanup and queue exclusivity conditions shall apply.

    RATIONALE:

    Flag notification registration and actual priority-based installation occur at different times.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      std::atomic<const Flag_Base*>& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check initial holder/priority state, exact-deadline notification, cancellation, shared flags, callback isolation and construction failures.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000853
    3. Function-notification watcher construction UID: PPL-SPEC-000853 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful function-form construction shall own one handler retaining the supplied callback under 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure, compute/validate its threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. The callback shall be live and nonnull when its event can dispatch. Construction shall not invoke it. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    RATIONALE:

    Registering a callback must preserve its identity without executing the notification prematurely.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks and before/equal/after threshold checks, cancellation and failure/retry histories with exact invocation counts.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 4. Threshold conversion and already-reached rejection UID: PPL-SPEC-000854 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction shall default-construct a local threshold, invoke the selected from_delta conversion, then obtain the current value and accept the result only if the current value is strictly before that threshold under the admitted comparison. A converted threshold equal to or before the current value shall throw std::invalid_argument and shall not register an event. Exceptions from default construction, conversion or current-value provision shall propagate with 🔗 10. Construction failure cleanup and existing-event preservation. The generic watcher shall not infer another numeric interpretation of a user-defined delta or absolute threshold.

    RATIONALE:

    An already reached threshold must be rejected before it becomes an active event, regardless of how the trait expresses deltas.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Both constructors apply Traits::from_delta, Traits::get and
    // Traits::less_than under the trait protocol above.
    
    VERIFICATION_CRITERIA:

    Check future/equal/past conversions, zero deltas for additive traits, conversion order and each supported pre-registration exception.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000855
    5. Per-trait event ordering and multiplicity UID: PPL-SPEC-000855 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchers shall share their trait's pending queue within the storage policy in 🔗 12. Watcher notification lifetimes and exclusive use: one per thread for an opted-in thread-safe trait, otherwise one shared queue per trait. Each successful construction shall add one event, preserving all existing watchers and nondecreasing threshold order under 🔗 7. Sorted insertion and equivalent-deadline multiplicity. Equivalent future thresholds shall be admitted as distinct events; no relative dispatch order among equivalent events shall be required. Different trait instantiations shall have independent queues and hook slots. Registration shall not dispatch existing events.

    RATIONALE:

    Multiple pending events need independent identities even when their thresholds agree.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Compare distinct/equivalent threshold sets with an independent event model, interleave trait instantiations and preserve existing events through insert/cancel histories.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 6. Published checking function and empty-queue transitions UID: PPL-SPEC-000856 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After successful event registration, the trait's check_function slot shall point to that instantiation's checking action. It shall remain published while any event is pending and become null when the final pending event is canceled or successfully dispatched. Failed construction shall preserve the previous slot value under 🔗 10. Construction failure cleanup and existing-event preservation. Clients shall invoke a published hook only while its queue remains nonempty under the exclusive-use protocol; retaining an old nonnull pointer shall not authorize calling an emptied queue.

    RATIONALE:

    A null hook prevents checkpoint dispatch from entering an empty queue.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Trait protocol: call Traits::check_function() only while its
    // published void (*)() slot is nonnull and remains current.
    
    VERIFICATION_CRITERIA:

    Check null/non-null transitions after every registration, cancel, failure and expiration, including previously captured pointer identity while events remain.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000857
    7. Due-event dispatch and successful expiration UID: PPL-SPEC-000857 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A published check shall obtain the current object from one get() call and inspect pending events in threshold order. While that observed current object is not strictly before the first pending threshold, it shall invoke the event's bound action. Only after that action returns normally shall it mark the watcher expired and remove its pending event. Thus an event exactly at the current threshold shall be due. Processing shall stop at the first future event or an empty queue, retaining 🔗 6. Published checking function and empty-queue transitions.

    If a trait returns a reference to mutable current state, later comparisons in the same dispatch shall observe any admitted serial changes to that object; a value returned by get() shall instead remain the retained value for that check. This mechanism shall not promise elapsed-time notification or invoke the current-value provider separately per event.

    RATIONALE:

    Expiration must follow successful notification and use the selected current-value binding semantics.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Invoke the currently published Traits::check_function hook.
    
    VERIFICATION_CRITERIA:

    Check before/equal/after and several due events, exact action counts, retained future events, one get call, and reference/value provider behavior after a callback advances current state.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000858
    8. Action exceptions and partially completed dispatch UID: PPL-SPEC-000858 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If a notification action throws, dispatch shall propagate that exception without marking or removing the throwing event. Earlier events already notified successfully shall remain expired and removed; later events shall remain pending. The throwing event's callback effects shall not be rolled back. A later admitted check may invoke it again, or destruction may cancel it. The queue and published hook shall remain consistent with the events still pending, and no handler shall leak.

    RATIONALE:

    Cooperative notification may throw to return control while preserving which events have actually completed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Exception outcome of the currently published checking hook.
    
    VERIFICATION_CRITERIA:

    Use a distinct prefix, throwing middle callback and later event; check exception identity/effects, pending hook, retry and cancellation without duplicate notification of the completed prefix.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000859
    9. Watcher destruction, cancellation and handler ownership UID: PPL-SPEC-000859 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Destruction of an unexpired watcher shall cancel its pending event; destruction of an already expired watcher shall not remove another event or notify again. Both shall destroy the watcher-owned handler exactly once. Cancellation shall not invoke the handler or modify external flag objects, and shall retain the active/free queue ownership of 🔗 9. Active-event erasure and successor preservation. Destruction shall retain the admitted nonthrowing trait operations and exclusive-use conditions.

    RATIONALE:

    The watcher owns its action wrapper, while cancellation and completed-expiration cleanup have different queue effects.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    ~Threshold_Watcher();
    
    VERIFICATION_CRITERIA:

    Cancel first/middle/last and sole events, destroy expired watchers in several orders, count handler/storage lifetimes and retain unrelated events.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 10. Construction failure cleanup and existing-event preservation UID: PPL-SPEC-000860 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A reported failure while allocating the handler, default-constructing or converting a threshold, obtaining current state, rejecting an already reached threshold, or allocating its pending node shall release the incomplete watcher-owned handler and any temporary resources acquired for that construction. It shall preserve all previously pending watchers, their notification state and the previously published checking hook. The same trait instantiation shall permit later successful construction and dispatch/cancellation. The nonthrowing copy/assignment/destruction/ comparison prerequisites shall remain those of 🔗 1. Generic threshold-watcher traits and admitted value protocol.

    RATIONALE:

    All pre-registration failure paths must relinquish the newly allocated handler without disturbing existing event owners.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Inject each observable allocation and supported threshold-default/get/conversion failure for both constructor forms, preserve existing event identities/hook/flags and retry.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000861
    11. Noncopyable watcher lifetime identity UID: PPL-SPEC-000861 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A watcher shall retain one lifetime identity for its expired flag, handler and pending position. Copy construction and assignment shall be inaccessible; no public move construction/assignment or default construction shall be supplied. Clients shall keep its address and lifetime stable while an event can reference that state. Separate watcher objects shall be constructed through their own notification constructors.

    RATIONALE:

    Memberwise copying would duplicate a queue position and references to one watcher's expiration state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Public construction is limited to the two notification forms above.
    
    VERIFICATION_CRITERIA:

    Check public construction/copy/move traits and independent event ownership of separately constructed watchers.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 12. Watcher notification lifetimes and exclusive use UID: PPL-SPEC-000862 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction, destruction and checks for one trait's shared queue shall not overlap concurrently or reenter that queue's dispatch. Notification actions shall retain the valid handler/flag/function bindings of 🔗 1. Polymorphic event-action interface and virtual destruction, 🔗 2. Flag-handler binding and binding-preserving copies, 🔗 3. Strict-priority flag installation, 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure and shall not destroy a watcher whose handler or expiration state is being accessed. The trait's current-value result shall remain valid through its use. Clients shall not replace a queue's hook while its events remain.

    In a thread-safe configuration, a trait may opt into per-thread queues with static constexpr bool thread_local_queue = true. Its current-value state and checking slot shall then also be thread-local. Weightwatch_Traits shall use this policy. Watchers and their borrowed bindings shall remain in their constructing thread and be destroyed before that thread exits. Other threads may independently compute, register, cancel and check their own queues. Exclusivity and nonreentrancy shall apply separately to each queue. Traits without that opt-in, and ordinary non-thread-safe configurations, shall retain the shared-state synchronization requirements above.

    RATIONALE:

    Queue state, callback execution and borrowed watcher fields must remain live under the configured queue's single-owner protocol.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Inspect actual queue/handler accesses and trait storage policy. Exercise serial shared traits and simultaneous per-thread weightwatch queues, including independent cancellation and expiry, without destroying executing actions.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/weightwatchspec1.cc.

  • 1. Public coordinate-index set and value lifecycle UID: PPL-SPEC-000021 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public C++ interface shall expose Variables_Set as a public derivative of std::set<dimension_type>. Its stored value shall be a finite set of distinct indices enumerated in increasing numerical order. A coordinate-valid set shall contain only indices i < Variable : : max_space_dimension(). The empty set shall be coordinate-valid. A set shall select coordinates without imposing an ambient dimension on an object that consumes the selection.

    The inherited C++20 std::set<dimension_type> interface shall remain available subject to the overloads actually declared by Variables_Set. Base-class constructors and assignment overloads shall not be implicitly added to the public derived interface. Construction from arbitrary iterator ranges shall be performed by default construction followed by inherited range insertion. Raw-index base operations may store any dimension_type value; they shall not validate coordinate admissibility. Before using the set as a coordinate selection or calling a member that requires coordinate validity, clients shall establish the validity of every stored index, for example using OK().

    Implicit copy construction and copy assignment shall have the C++20 value and exception behavior of the std::set base. Successful copies shall contain exactly the source indices with independently owned nodes. Implicit moves shall transfer the value according to the standard base-container rules; moved-from objects shall remain valid with the state permitted by those rules. Destruction shall release owned nodes. A Variables_Set shall not be deleted through a pointer to its nonvirtual base destructor.

    Operations on existing objects shall require live container objects. Callers shall obey the supported library/thread regime, serialize modifications of a shared instance and prevent unsynchronized modification while another call observes or copies it. No automatic invalid-lifetime or concurrent-use detection shall be required.

    RATIONALE:

    Coordinate selections need an ordered, duplicate-free representation with ordinary value ownership. Public inheritance exposes raw storage operations, so representable indices and valid coordinate indices are distinct contracts.

    INTERFACE:

    Public header: <ppl.hh>. Public type declaration:

    namespace Parma_Polyhedra_Library {
      class Variables_Set : public std::set<dimension_type> {
        // Member declarations are given in the following contracts.
      };
    }
    

    The following contracts describe declared members and applicable inherited operations. Copy/move members and destruction are implicitly declared.

    VERIFICATION_CRITERIA:

    Compile an installed-public-header C++20 client using the type, base conversion, copy/move operations and declared members. Check independent copies, lvalue assignment, self-copy assignment and permitted reuse of moved-from objects. Inject copy-construction and copy-assignment allocation failures, verifying source preservation and the target-state guarantees of the standard base container. Inspect owned-node cleanup and synchronization preconditions.

    SOURCE:

    src/Variables_Set_defs.hh: public inheritance and implicit value members. tests/variablesset1.cc: value, mutation and allocation-failure cases.

  • PPL-SPEC-000022
    2. Empty, singleton and inclusive-range construction UID: PPL-SPEC-000022 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful default construction shall create an empty Variables_Set. Successful construction from a valid Variable v shall create exactly {v.id()}. Successful construction from valid variables v and w shall create exactly {i ∣ v.id() ≤ i ≤ w.id()} when v.id() <= w.id() and the empty set otherwise. Both endpoints shall be included. No ambient dimension or additional indices shall be introduced.

    Failure to allocate storage shall propagate the applicable C++ exception and release resources acquired for the incomplete object. Inputs shall remain unchanged. No successfully constructed destination shall be returned on failure.

    RATIONALE:

    Empty selections, individual coordinates and inclusive consecutive selections are the primitive construction forms used by coordinate operations.

    INTERFACE:

    Public constructor declarations:

    Variables_Set();
    explicit Variables_Set(Variable v);
    Variables_Set(Variable v, Variable w);
    
    VERIFICATION_CRITERIA:

    Check empty, zero singleton, greatest valid singleton, equal endpoints, small inclusive intervals and reversed intervals, including a reversed interval whose first endpoint is the greatest valid index. Compare all stored indices with an independent sequence. Inject failures at each actual allocation in singleton and range construction; check input preservation and successful reconstruction. Do not attempt to allocate a set spanning the entire index range.

    SOURCE:

    src/Variables_Set_inlines.hh: empty and singleton constructors. src/Variables_Set.cc: inclusive-range constructor. tests/variablesset1.cc: construction and failed-construction cases.

  • PPL-SPEC-000023
    3. Index insertion and inherited ordered-set operations UID: PPL-SPEC-000023 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live Variables_Set, successful insert(v) with a valid Variable shall add exactly v.id(). Inserting an already present index shall not create a duplicate. The declared overload shall coexist with the inherited C++20 std::set<dimension_type> insertion overloads. Raw insertion shall store the supplied index value without constructing or validating a Variable.

    Inherited insertion, emplacement, extraction, merging, erasure, clearing, lookup, bounds, comparison and iteration shall have the C++20 semantics of the base container. Forward traversal shall enumerate each stored index once in increasing order; reverse traversal shall enumerate them in decreasing order. Insertion shall preserve existing element references and iterators. Erasure shall invalidate references and iterators to erased elements according to the base-container rules. Callers shall satisfy the standard preconditions for iterator ranges, hints, node ownership and allocator compatibility. A node's key may be changed only while detached, under the inherited node-handle rules. Coordinate use of inserted or changed keys shall additionally require the validity conditions of 🔗 1. Public coordinate-index set and value lifecycle.

    Failed single-element insert allocation shall propagate std::bad_alloc without changing the set. Range insertion and other inherited operations shall have their standard operation-specific exception guarantees; no transactional rollback of an entire partially completed range insertion shall be implied.

    RATIONALE:

    Standard container interoperability supports coordinate-selection algorithms without silently changing raw indices into another mathematical object.

    INTERFACE:

    Declared overload and inherited insertion exposure:

    void insert(Variable v);
    using std::set<dimension_type>::insert;
    

    Other inherited operations retain their standard signatures. The using declaration shown expresses the exposed base overload set; the implementation may name that base using a private alias.

    VERIFICATION_CRITERIA:

    Compare insertion and mutation histories with an independent sorted sequence. Exercise Variable and raw-index insertion, duplicate insertion, hints, iterator ranges, initializer lists, emplacement, node extraction/reinsertion and merge. Check traversal in both directions, lookup and bounds at present/absent indices, iterator/reference stability, erasure and clear. Inject failed new-node insertion and check the complete unchanged set before retry. Check raw invalid indices through storage operations and OK(), without using them as coordinates.

    SOURCE:

    src/Variables_Set_defs.hh: public base operations and insertion overloads. src/Variables_Set_inlines.hh: insertion of a Variable index. tests/variablesset1.cc: ordered-container histories and failed insertion.

  • PPL-SPEC-000025
    5. Inherited set swap and element ownership UID: PPL-SPEC-000025 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live Variables_Set objects satisfying the inherited allocator compatibility preconditions, inherited member swap shall exchange their complete stored sets with the C++20 base-container semantics. A successful self-swap shall preserve the value. References and iterators to stored elements shall remain associated with those elements in the receiving container, subject to the standard exception for past-the-end iterators. Swap shall not require coordinate validity of raw stored indices.

    RATIONALE:

    Ownership exchange must preserve coordinate indices and existing element references without introducing a hidden copy of a selection.

    INTERFACE:

    Inherited member callable form, where base_type denotes std::set<dimension_type>:

    void swap(base_type& other);
    

    The actual inherited exception specification follows the C++20 base container.

    VERIFICATION_CRITERIA:

    Swap distinct empty/nonempty and differently sized sets. Check exact contents, reference and iterator association, dimensions for valid sets and self-swap. Arm allocation failure across member swap and verify it completes without allocating under the selected standard allocator configuration.

    SOURCE:

    src/Variables_Set_defs.hh: inherited std::set member swap. tests/variablesset1.cc: ownership, reference stability and allocation-free swap.

  • PPL-SPEC-000026
    6. Coordinate-set diagnostic output and formatter prerequisites UID: PPL-SPEC-000026 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Diagnostic output shall observe a coordinate-valid set without modifying its indices. With compatible ordinary character formatting and successful output, operator<< shall write "{", each selected Variable in increasing index order preceded by one space, a comma after every Variable except the last, and the final text " }". Thus an empty set shall write "{ }". Variable text shall be produced by the active Variable formatter at each write. The operator shall return the supplied stream reference. It shall not add a newline or request a flush. print() shall perform this output to std::cerr.

    Calls shall require the library/thread initialization protocol of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization to have established a valid active Variable formatter under 🔗 7. Active Variable formatter and initialized thread state. Formatter dispatch shall follow 🔗 8. Variable names, formatter dispatch and output failures. Clients shall synchronize formatter changes, shared streams and shared-set access under the supported thread regime. The formatter shall not mutate the printed set during output. Stream formatting and error reporting shall follow ordinary C++ insertion semantics. Formatter exceptions and stream exceptions shall propagate; ordinary nonthrowing stream failures shall remain observable through the stream state. Partial output may remain after failure, while the set shall remain unchanged.

    RATIONALE:

    Diagnostic text is a formatted view of coordinates and depends on the same initialization and formatter state as individual Variable output.

    INTERFACE:

    Public declarations:

    std::ostream& IO_Operators::operator<<(std::ostream& s,
                                         const Variables_Set& vs);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check literal empty and sparse output, ordering, return-reference identity, absence of newline/flush, custom formatters and forwarding through print(). Check pending width/fill behavior using the actual sequence of character and text insertions. Exercise nonthrowing and throwing stream failures and a throwing formatter, verifying unchanged indices and restoration of test-owned formatter and stream state. Review initialization and thread prerequisites.

    SOURCE:

    src/Variables_Set_defs.hh and src/Variables_Set.cc: output operator. src/globals_defs.hh: generated print forwarding definition. tests/variablesset1.cc: output, formatter and stream-failure cases.

  • PPL-SPEC-000027
    7. Reloadable coordinate-set text export UID: PPL-SPEC-000027 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live Variables_Set and a stream with decimal integer formatting, zero pending field width and the classic C locale, successful ascii_dump(s) shall write a newline, "variables( ", the number of stored indices, " )", a newline, and then each raw stored index in increasing order followed by one space. An empty set shall have no index payload. The operation shall append no additional characters or explicit flush after this sequence. It shall leave the set unchanged and shall not invoke the Variable formatter and shall also permit raw indices that fail coordinate validity. The no-argument overload shall write the same representation to std::cerr under those formatting conditions.

    For coordinate-valid input and compatible producer/consumer formatting, successful loading of this representation under 🔗 8. Coordinate-set text loading and partial failure state shall preserve the selected indices and enclosing dimension. The format shall not promise compatibility with every library version or with arbitrary incompatible locale, numeric base or formatting settings. Stream failure shall follow C++ stream state and exception-mask semantics; partial output may remain and the source set shall remain unchanged.

    RATIONALE:

    Machine-oriented coordinate indices must be reloadable independently of custom human-readable coordinate names.

    INTERFACE:

    Public declarations:

    void ascii_dump(std::ostream& s) const;
    void ascii_dump() const;
    
    VERIFICATION_CRITERIA:

    Compare exact empty and sparse dumps against independently written literals. Round-trip valid sets including the greatest valid index and compare all indices and dimensions. Verify dump ignores a throwing Variable formatter, forwards the no-argument overload to std::cerr and preserves the source after nonthrowing or throwing stream failure.

    SOURCE:

    src/Variables_Set.cc: stream dump implementation. src/globals_defs.hh: generated no-argument dump forwarding definition. tests/variablesset1.cc: literal frames, reload and dump-failure cases.

  • PPL-SPEC-000028
    8. Coordinate-set text loading and partial failure state UID: PPL-SPEC-000028 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_load(s) shall first clear the destination's existing indices. With whitespace-skipping extraction enabled, decimal integer conversion and the classic C locale, it shall accept an opening token "variables(", a nonnegative dimension_type count, a closing token ")" and exactly that count of nonnegative indices below Variable::max_space_dimension(). On successful loading it shall return true and contain exactly the set of extracted indices. Duplicate payload indices shall be collapsed and payload order need not be sorted. Tokens following the declared payload shall remain available to the caller. Loading shall not invoke the Variable formatter.

    Missing, wrong, unextractable or out-of-range required fields shall return false unless the stream's exception mask causes an exception. A false result shall leave the destination empty if the header failed, or containing exactly the successfully inserted prefix of payload indices if a payload extraction failed. Allocation or stream exceptions shall propagate; the old value shall not be restored, and successfully inserted prefix indices may remain. The destination shall remain a live base-container object available for inspection, clear, reassignment and destruction. No unchanged-state guarantee shall be implied.

    A true result shall certify a coordinate-valid set with exactly the loaded indices and their enclosing dimension as checked by 🔗 10. Coordinate-validity checking of raw indices.

    RATIONALE:

    A nontransactional parser must make replacement and valid-prefix state explicit.

    INTERFACE:

    Public declaration:

    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Load independent empty, sparse, unsorted and duplicate-containing literals into nonempty receivers. Check allowed whitespace, exact payload framing and an unconsumed trailing marker. Exercise every bounded truncation, wrong markers, nonnumeric and overflowing counts/indices; check the exact retained prefix before reset. Reject signed-negative counts and out-of-range coordinate indices. Inject allocation failure at payload insertion and throwing stream extraction, checking live prefix state and successful later clear/reload.

    SOURCE:

    src/Variables_Set.cc: ascii_load clear, token parsing and index insertion. tests/variablesset1.cc: valid, malformed and exceptional loading cases.

  • 10. Coordinate-validity checking of raw indices UID: PPL-SPEC-000030 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For any live Variables_Set satisfying its base-container invariants, OK() shall return true exactly when every stored raw index is strictly less than Variable::max_space_dimension(). It shall return true for an empty set. An index equal to the maximum dimension, one greater than that limit, or not_a_dimension() shall make the result false. Invalid raw coordinate indices shall be a defined check outcome and shall not cause std::length_error. The check shall leave every stored index unchanged.

    RATIONALE:

    Raw inherited operations and syntactic loading can introduce indices that do not denote Variables. A boolean invariant check must inspect that state safely before coordinate-semantic operations are attempted.

    INTERFACE:

    Public declaration:

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check empty and sparse valid sets, the greatest valid index, and each distinct invalid boundary index alone and mixed with valid indices. Insert invalid values through raw base operations and through text loading. Require false without an exception and compare complete contents before and after each check. Verify clear or removal restores validity.

    SOURCE:

    src/Variables_Set.cc: raw-index validity check. tests/variablesset1.cc: valid/invalid boundary checking and restoration.

  • PPL-SPEC-000012
    2. Variable value identity and lifetime operations UID: PPL-SPEC-000012 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public Variable type shall represent one Cartesian coordinate by its nonnegative identifier, with limits defined by 🔗 3. Variable construction, coordinate queries and bounds. Its meaning shall depend only on that identifier, independently of C++ object names, other variables and the current output function. Operations on existing variables shall require live valid objects; construction shall require valid source objects only where a source is supplied.

    Implicit copy and move construction shall create a variable with the source's identifier and shall preserve the source. Implicit copy and move assignment shall set the target's identifier to the source's entry identifier, return a reference to the target and preserve a distinct source. Self-assignment shall preserve the identifier. Each variable shall remain an independent value. These value operations and destruction shall require no external storage allocation; destruction shall not alter another variable. Callers shall prevent unsynchronized access to an object while another operation changes its value.

    RATIONALE:

    Coordinate identity is a value, so copying or disposing of a C++ handle must not rename another coordinate or create shared mutable coordinate storage.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    class Variable;
    
    // Callable forms of the implicit public value operations:
    Variable(const Variable& source);
    Variable(Variable&& source);
    Variable& operator=(const Variable& source);
    Variable& operator=(Variable&& source);
    ~Variable();
    
    VERIFICATION_CRITERIA:

    Copy, move and assign variables with zero, ordinary and greatest admitted identifiers. Check source preservation, independent later assignment, returned references, chained assignments and self-copy/self-move assignment. Inspect the scalar representation, implicit special members and absence of external storage; check their C++20 trivial-copy and nonthrowing value-operation traits. Use installed-public-header clients for public exposure and matching-library compatibility. Review synchronization separately from sequential value tests.

    SOURCE:

    src/Variable_defs.hh: public class and scalar representation. tests/variable1.cc: variable_value_operations_preserve_coordinate_identity.

  • 3. Variable construction, coordinate queries and bounds UID: PPL-SPEC-000013 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let S = not_a_dimension(). The query Variable::max_space_dimension() shall return S − 1. Construction from i shall succeed exactly for 0 ≤ i < S − 1, subject to ordinary C++ runtime conditions, and shall create a variable with id() == i and space_dimension() == i+1. In particular, the greatest admitted identifier shall be S − 2; its space dimension shall be S − 1.

    An identifier equal to S − 1 or S shall be rejected with std::length_error without producing a variable. Range rejection shall not rely on wrapping i+1. Exact exception-message text is not prescribed. Queries on a live valid variable shall leave its identifier unchanged and return the exact identifier and enclosing-space dimension. These operations shall not depend on the active formatter or allocate coordinate storage.

    RATIONALE:

    An enclosing space must include the coordinate itself while avoiding the reserved dimension value and unsigned overflow at the upper boundary.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    explicit Variable(dimension_type i);
    static dimension_type max_space_dimension();
    dimension_type id() const;
    dimension_type space_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check zero, ordinary identifiers, alphabet boundaries and the greatest admitted identifier against independent arithmetic. Check exact std::length_error type for both rejected boundary values, then construct and query another valid variable. Inspect the comparison performed before addition and query formulas. Exercise both assertion regimes without allocating a coordinate-sized object.

    SOURCE:

    src/Variable_defs.hh and src/Variable_inlines.hh: constructor and queries. tests/variable1.cc: variable_bounds_and_dimensions.

  • PPL-SPEC-000015
    5. Variable exchange and self-exchange UID: PPL-SPEC-000015 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live valid variables x and y, both x.m_swap(y) and swap(x, y) shall exchange their entry identifiers exactly and leave both variables valid. When both arguments designate the same variable, its identifier shall remain unchanged. Exchange shall allocate no storage and shall not depend on formatted names or the active output function.

    RATIONALE:

    Coordinate values need a constant-storage exchange operation with defined aliasing behavior for generic value manipulation.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    void m_swap(Variable& other);
    void swap(Variable& x, Variable& y);
    
    VERIFICATION_CRITERIA:

    Check member and nonmember exchange of distinct values, equal identifiers, zero and the greatest admitted identifier. Check self-exchange through both entry points. Verify both identifiers, dimensions and validity after each call; inspect the scalar exchange for absence of allocation.

    SOURCE:

    src/Variable_defs.hh and src/Variable_inlines.hh: exchange functions. tests/variable1.cc: variable_swap_exchanges_only_the_two_values.

  • PPL-SPEC-000016
    6. Variable validity and memory accounting UID: PPL-SPEC-000016 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For every live valid variable, OK() shall return true without changing its value. The representation invariant checked by OK() shall be id() < max_space_dimension(). external_memory_in_bytes() shall return zero and total_memory_in_bytes() shall return sizeof(Variable): variables shall own no separately allocated coordinate storage. These queries shall leave the identifier and formatter state unchanged and shall allocate no storage. No operation shall require constructing an invalid object to use this diagnostic.

    RATIONALE:

    Validity and memory reports make the compact coordinate-value representation observable without exposing or manufacturing invalid object states.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check validity and both memory reports for zero, ordinary and greatest admitted identifiers and after copying, assignment and exchange. Compare total memory with sizeof(Variable), preserving identifiers and the active formatter. Inspect the invariant check and scalar representation; do not corrupt an object solely to execute a diagnostic failure path.

    SOURCE:

    src/Variable_defs.hh, src/Variable_inlines.hh and src/Variable.cc: validity and memory-accounting queries. tests/variable1.cc: variable_validity_and_memory_are_value_independent.

  • 7. Active Variable formatter and initialized thread state UID: PPL-SPEC-000017 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public output_function_type shall denote a function accepting an output stream and a Variable value, returning void. set_output_function(p) shall store exactly p without invoking it; get_output_function() shall return the pointer currently stored for the applicable runtime context. Neither operation shall allocate storage or change any variable identifier.

    The applicable initialization and thread-entry protocol of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall establish the default output function before variable insertion is used. In a thread-safe build the stored pointer shall be thread-local. Otherwise it shall be shared within the process, and callers shall serialize formatter changes and uses. Callers shall also synchronize shared-stream access and mutable callback state as needed.

    Storing a null pointer shall be permitted, and a subsequent getter shall return null; insertion shall require a nonnull callable pointer. The caller shall retain any callback dependencies for its use period and restore a callable pointer before subsequent insertion. Setting a formatter shall not acquire ownership of callback dependencies. This interface shall not diagnose every violation of initialization, callback-lifetime or concurrency preconditions.

    RATIONALE:

    Separating the current callback from coordinate identity permits user naming and thread-specific names while making callback validity and ownership explicit.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    typedef void output_function_type(std::ostream& s, const Variable v);
    static void set_output_function(output_function_type* p);
    static output_function_type* get_output_function();
    
    VERIFICATION_CRITERIA:

    Check the initialized default pointer, exact set/get round trips for distinct callbacks, absence of callback invocation during set/get, null storage followed by restoration and unchanged coordinate values. In thread-safe builds initialize workers through the supported thread protocol and check isolated pointers and output on separate streams while preserving the parent pointer. Review the shared-pointer and callback-state synchronization conditions in other builds. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Variable_defs.hh, src/Variable_inlines.hh and src/Variable.cc: formatter type, accessors and configured pointer storage. src/Init.cc: default formatter installation at thread initialization. tests/variable1.cc: variable_formatter_pointer_round_trips_without_calls and variable_formatters_are_thread_local. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • 8. Variable names, formatter dispatch and output failures UID: PPL-SPEC-000018 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live valid variable with identifier i, let q = ⌊i ⁄ 26⌋ and r = i − 26q. Successful direct use of default_output_function shall insert the uppercase character at position r in ABCDEFGHIJKLMNOPQRSTUVWXYZ. If q is nonzero, it shall then insert q as an unsigned integer using the stream's current formatting; otherwise it shall insert no suffix. Character and integer insertions shall honor their applicable stream formatting and locale. The function shall add no separator, newline or explicit flush, and shall not change the active formatter.

    Under 🔗 7. Active Variable formatter and initialized thread state, IO_Operators::operator<< shall invoke the currently active output function exactly once with the supplied stream and variable value, and shall return that same stream reference on normal return. Each insertion shall obtain the pointer active for that call. A callback may change the formatter for subsequent calls; insertion shall not restore the old pointer or undo callback changes to the stream. Direct default formatting shall not consult the active pointer.

    Output shall not change the variable identifier. Stream failures shall follow the stream's state and exception-mask rules. Callback exceptions and applicable C++ resource exceptions shall propagate; partial output and callback changes to formatter or stream state shall remain observable, with no output rollback promised. Callbacks shall satisfy the stream, lifetime and synchronization preconditions and shall not invalidate an object accessed by the call.

    RATIONALE:

    Default coordinate names are compact and deterministic under a given stream format, while direct callback dispatch preserves customization and ordinary C++ stream failure semantics.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    static void default_output_function(std::ostream& s, const Variable v);
    
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Variable v);
    }
    
    VERIFICATION_CRITERIA:

    Check independent expected names across alphabet and quotient boundaries and at the greatest admitted identifier. Check width, fill, alignment, integer base, locale, returned stream identity and absence of an added newline or explicit flush. Check exactly one callback invocation and the passed identifier, direct default formatting with another callback active, callback changes between successive insertions, a prefailed stream, rejecting streams with exceptions disabled and enabled, and a callback that changes state before throwing. Verify unchanged identifiers and retained callback/stream effects on failures.

    SOURCE:

    src/Variable_defs.hh and src/Variable.cc: default output and insertion. tests/variable1.cc: default-name, formatting, dispatch and failure checks.

  • 1. Normalized nonnegative microsecond interval values UID: PPL-SPEC-000821 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Time shall represent an exact nonnegative integral number of microseconds, with maximum value 106  LONG_MAX + 999999. A valid completed value shall have whole seconds in [0,  LONG_MAX] and a residual microsecond count in [0, 999999]. This raw value interface shall be available independently of operating-system watchdog-timer support and shall not require PPL initialization or floating-point state.

    Constructor inputs shall satisfy their stated nonnegative argument preconditions. Concurrent access shall retain ordinary C++ object synchronization requirements. An interval value shall not itself promise elapsed-time measurement, timer resolution or notification scheduling.

    RATIONALE:

    Raw watchdog duration arithmetic needs an exact normalized value domain independent of operating-system timer behavior.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    class Time;
    
    VERIFICATION_CRITERIA:

    Use independent arbitrary-precision total-microsecond oracles for zero, carry boundaries and the largest representable pair without initializing the PPL.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000822
    2. Zero and centisecond construction UID: PPL-SPEC-000822 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall produce the zero interval. Construction from a nonnegative long centisecond count c shall produce exactly 10000c microseconds in normalized form. Every nonnegative long centisecond value, including LONG_MAX, shall be representable by this conversion. Construction shall retain the allocation-free value protocol of 🔗 9. Allocation-free value operations and fatal range policy.

    RATIONALE:

    User timer durations are expressed in centiseconds while internal normalized values use microseconds.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time();
    explicit Time(long centisecs);
    
    VERIFICATION_CRITERIA:

    Compare centisecond values around multiples of100, zero, signed-long upper neighbors and LONG_MAX against independent total-microsecond expectations.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000823
    3. Second/microsecond normalization and excessive results UID: PPL-SPEC-000823 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For nonnegative long arguments s and m, two-argument construction shall represent exactly 106s + m microseconds when that result is within 🔗 1. Normalized nonnegative microsecond interval values. Microseconds at or above one million shall be carried into whole seconds and reduced to a residual less than one million. If this nonnegative mathematical result exceeds the representable maximum, construction shall call std::abort under 🔗 9. Allocation-free value operations and fatal range policy, without signed arithmetic overflow or a constructed C++ exception.

    RATIONALE:

    Normalization must distinguish a valid carry from an unrepresentable duration before overflowing signed seconds.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time(long seconds, long microseconds);
    
    VERIFICATION_CRITERIA:

    Compare all selected second/microsecond boundary combinations with arbitrary-precision normalization, including LONG_MAX microseconds and the largest admitted carried value; monitor excessive results in an isolated process.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000824
    4. Independent value copies and assignment UID: PPL-SPEC-000824 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Copy construction and assignment shall preserve the exact interval value in independent scalar state. Rvalue construction/assignment shall retain the same value semantics, leaving the source value unchanged. Self-assignment shall preserve the interval. Assignment shall return the target object. No copy shall share owned duration state or require allocation, and ordinary destruction shall require no external resource cleanup.

    RATIONALE:

    Interval values are copied scalars rather than timer-resource owners.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time(const Time& y) = default;
    Time& operator=(const Time& y) = default;
    ~Time() = default;
    
    VERIFICATION_CRITERIA:

    Check normal/rvalue copies and assignments, self-assignment, source mutation and independent surviving values with allocation disabled.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000825
    5. Whole-second, residual-microsecond and validity queries UID: PPL-SPEC-000825 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid completed interval, seconds() shall return its whole second count and microseconds() its normalized residual, so their mathematical combination equals the exact value. OK() shall test the stored normalization conditions: nonnegative whole seconds and a residual in [0, 999999]. The queries shall preserve the value and require no allocation. They shall not provide a memory-safe validity check for arbitrary corrupted storage or remove constructor preconditions.

    RATIONALE:

    Normalized components and the invariant checker must agree on the represented duration.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    long seconds() const;
    long microseconds() const;
    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check both components and the checker for every constructed and computed boundary value; inspect the exact validity predicate without manufacturing invalid objects through prohibited constructor inputs.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000826
    6. Exact interval ordering and equality UID: PPL-SPEC-000826 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The six comparison operators shall compare exact total-microsecond values. Equality shall hold exactly for the same duration, regardless of which admitted normalization inputs produced it. Strict and nonstrict order shall have their ordinary mathematical meanings and inequality shall negate equality. Comparing valid values shall not change either operand, allocate or depend on the current clock.

    RATIONALE:

    Pending event order requires exact duration comparisons across whole-second and microsecond boundaries.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    bool operator==(const Time& x, const Time& y);
    // Inequality uses C++20 rewriting of operator==.
    bool operator<(const Time& x, const Time& y);
    bool operator<=(const Time& x, const Time& y);
    bool operator>(const Time& x, const Time& y);
    bool operator>=(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare all ordered pairs of independently valued normalized intervals, alternate equal constructions and maximum boundaries with arbitrary-precision integer order.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000827
    7. Exact addition, aliasing and representability failure UID: PPL-SPEC-000827 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For valid operands with a representable sum, compound addition shall replace the target by their exact total-microsecond sum, normalized into seconds and residual microseconds, and return the target object. Adding an object to itself shall use its value on entry. Free addition shall produce the same exact value without changing either input.

    If the exact sum exceeds 🔗 1. Normalized nonnegative microsecond interval values, both forms shall call std::abort under 🔗 9. Allocation-free value operations and fatal range policy before signed arithmetic overflow, without constructing a C++ exception. A valid microsecond carry shall be included in that representability decision.

    RATIONALE:

    Normalized duration addition must account for both whole seconds and a possible carry at the representable limit.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time& operator+=(const Time& y);
    Time operator+(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Compare independent exact sums for all selected carry/no-carry operand pairs and self-aliasing, preserve free-operation inputs and isolate both excessive whole-second and carry-only failures.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000828
    8. Saturating nonnegative interval subtraction UID: PPL-SPEC-000828 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For valid operands, compound subtraction shall replace the target by max(0, x − y), using their exact values on entry, and return the target object. A needed microsecond borrow shall preserve that exact nonnegative result. Self-subtraction shall yield zero. Free subtraction shall return the same value without modifying either input. Subtraction shall remain within the normalized value domain and shall not allocate or signal an arithmetic-range failure for valid operands.

    RATIONALE:

    Timer differences saturate at zero rather than create negative durations.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time& operator-=(const Time& y);
    Time operator-(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Compare all selected operand pairs with independent max-zero differences, equal/self operands, whole-second ordering and microsecond-borrow boundaries.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • 9. Allocation-free value operations and fatal range policy UID: PPL-SPEC-000829 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Admitted Time construction, copying, queries, comparisons, addition and subtraction shall use no heap allocation, floating-point arithmetic, PPL initialization or operating-system timer operation. Unrepresentable normalization/addition shall report its fatal condition by calling std::abort; it shall not allocate or construct a C++ exception in an attempt to report that condition. No recovery or owned- resource cleanup after process termination shall be promised by this value interface. The caller shall retain any surrounding signal/thread context restrictions.

    RATIONALE:

    The value type is used by watchdog signal paths where exception allocation is not an admissible range-reporting mechanism.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time();
    explicit Time(long centisecs);
    Time(long seconds, long microseconds);
    Time& operator+=(const Time& y);
    Time& operator-=(const Time& y);
    
    VERIFICATION_CRITERIA:

    Disable allocation around all valid value operations and use isolated-process controls to distinguish synchronous abort from C++ exceptions or allocation attempts on the three excessive-result histories.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000871
    1. Watchdog platform availability and initialization prerequisites UID: PPL-SPEC-000871 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchdog timers shall be available when the configured platform provides the required setitimer, sigaction and pthread_sigmask operations. In that configuration, clients shall retain the library/class initialization and exclusive signal-ownership protocols of 🔗 11. Process timer ownership and signal-safe callbacks, 🔗 18. Class initialization and preceding signal action and 🔗 19. Class finalization and pending-notification cleanup. If any required operation is unavailable, all construction forms shall throw std::logic_error and shall neither publish a notification nor modify the supplied flag holder, regardless of the supplied duration. Construction may also report a resource failure while creating its exception object.

    RATIONALE:

    Availability must follow the configured timer/signal capabilities rather than imply that every supported library target has native timers.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Compile controlled configurations with each required capability unavailable; check both constructor forms over positive, zero and negative durations and unchanged notification objects.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000872
    2. Flag-form watchdog registration UID: PPL-SPEC-000872 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful volatile flag-form construction shall own one handler bound to the supplied holder/flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, register one pending event for its admitted duration, and leave those external notification objects borrowed. Registration shall neither install the flag nor query its priority as a notification. At expiration, priority selection shall use the then-current holder and flag. The flag's priority operation shall satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and compatible flag. Expiration shall only record a notification in non-thread-local handler storage. At a subsequent ordinary checkpoint in the constructing thread, release compare-and-exchange shall install the flag only when the holder is null. No existing request shall be dereferenced, replaced, or compared by priority. Among multiple eligible atomic watchdogs the most recently constructed binding shall be tried first. Selected pending atomic notifications shall precede computational-threshold checks, retaining the snapshot rule in 🔗 1. Computational-weight value and current-state binding. This publication need not use a lock-free borrowed holder because it takes place outside signal context.

    Construction, checkpoints and destruction shall use the single watchdog owner/signal-receiving thread. Holder and flag shall remain alive through destruction; a published flag shall additionally outlive its readers. Cancellation may discard an unconsumed notification and shall not clear an already published request. The caller shall cancel before clearing the holder or releasing its flag. A failed construction shall leave no notification binding or pending event behind.

    RATIONALE:

    Flag registration and later signal-context notification require separate ownership and execution rules.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, std::atomic<const Flag_Base*>& holder,
             Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check distinct flag handlers, unchanged registration-time state, serial priority changes, due notification, cancellation and constructor failures under a controlled timer.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000873
    3. Function-form watchdog registration UID: PPL-SPEC-000873 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful function-form construction shall own one handler retaining the supplied function under 🔗 4. Function-handler target binding and copies, register one pending event and not invoke that function merely to register it. A pending callback shall be nonnull, live and satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Dispatch shall invoke that bound function exactly once for its successfully completed event. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    RATIONALE:

    A one-shot notification must preserve callback identity without executing it during registration.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct function callbacks and a controlled timer to check registration, ordering, cancellation, exact callback counts and failed construction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000874
    4. Positive watchdog duration and exact nominal units UID: PPL-SPEC-000874 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When native timers are available, both construction forms shall accept a positive long duration in centiseconds and interpret its nominal value as c ⁄ 100 seconds. A zero or negative duration shall throw std::invalid_argument without registering an event; construction cleanup shall retain 🔗 8. Failed watchdog construction and surviving events. Large positive durations through LONG_MAX shall retain their full logical value under 🔗 7. Logical deadlines and bounded physical timer checkpoints, subject to supported resource or timer-system-call failures. Timer resolution, signal delivery and masked operations shall retain 🔗 11. Process timer ownership and signal-safe callbacks.

    RATIONALE:

    Duration validation and exact nominal units must not silently truncate large supported requests to a kernel checkpoint.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check zero and negative boundaries, centisecond normalization, one-day boundaries and huge positive durations against an independent controlled elapsed-time model.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000875
    5. Stable watcher and notification lifetimes UID: PPL-SPEC-000875 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    An available-platform watchdog shall not be default constructible, copy constructible, move constructible or assignable. Its stable live address shall retain its expiration state and event identity until destruction. Borrowed holder/flag/function objects shall remain valid whenever the event may notify. Clients shall not end a live watchdog's lifetime from its callback or concurrently with signal dispatch; the masking/exclusive-use protocol shall govern admitted cancellation.

    RATIONALE:

    Queue entries borrow watcher expiration state and external notification objects, so their lifetimes cannot be transferred implicitly.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check available-platform type traits, stable simultaneous event identities, distinct expired/unexpired destruction and admitted external binding lifetimes.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000876
    6. Ordered event multiplicity and existing-event preservation UID: PPL-SPEC-000876 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Each successful constructor shall add one distinct event to the shared queue. Equal logical deadlines shall retain all registered events; their relative callback order shall be unspecified. An earlier or later insertion shall preserve every other event's logical deadline and bound notification. Registration and cancellation shall not notify unrelated events merely because the queue or physical timer has changed.

    RATIONALE:

    Distinct watchers remain distinct even when their nominal deadlines coincide or the timer is replaced.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Interleave earlier/equal/later events and cancellation against an independent deadline-to-callback multiset, including previously active timers and multiple due events.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000877
    7. Logical deadlines and bounded physical timer checkpoints UID: PPL-SPEC-000877 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The first event shall establish a relative logical time base. Later registration shall account for elapsed time observed from the armed timer and retain the requested relative duration in its full logical deadline. Each nonzero physical timer request shall be at most one day (86400 seconds), using an intermediate checkpoint when a logical interval is longer. A checkpoint before a pending event's deadline shall not notify it; subsequent checkpoints shall preserve the remaining interval and other event deadlines. Bounded requests shall not imply that every kernel accepts them or guarantee exact elapsed deadlines across arbitrary signal-masked one-shot expiration periods.

    RATIONALE:

    A bounded kernel request must preserve a potentially much longer logical deadline and timer replacement history.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Compare one-day boundary, huge duration, earlier/equal/later insertion and retained/deferred chunk histories with exact controlled timer arithmetic.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 8. Failed watchdog construction and surviving events UID: PPL-SPEC-000878 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When construction reports a supported recoverable exception, it shall release its allocated handler and not leave the failed event pending. Previously live watchdogs shall remain usable with their logical notifications/deadlines preserved. This shall cover invalid duration, handler/node allocation failure, signal-block failure, timer-read failure, invalid successful timer read and timer-arm failure, including a failure while reporting another error. The constructor shall restore its internal critical-section state and caller signal mask before propagation, subject to the fatal restoration rule of 🔗 12. Signal-mask transactions and fatal restoration failures. Internal freed nodes may remain owned by the shared queue's reuse pool.

    RATIONALE:

    A failed constructor must release its own resources without disabling surviving timers or borrowing its unwound stack.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Inject every constructor allocation/system-call failure for both forms, compare existing events before/after and exercise exact later notifications with balanced handler ownership.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000879
    9. Nonthrowing destruction and ordinary cancellation UID: PPL-SPEC-000879 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ~Watchdog() shall not throw. It shall destroy its owned handler exactly once while its timer signal is blocked, before restoring the caller's signal mask. An unexpired watchdog shall remove its own event without notifying it; an expired watchdog shall not remove or notify another event. Cancellation of a nonleading or equal-deadline event shall preserve remaining deadlines; canceling the first event shall schedule the next one or stop the timer when no event remains. If a next deadline is already due, cancellation shall schedule a short nonzero checkpoint rather than dispatch a notification from the destructor. System-call failure and fatal masking outcomes shall retain 🔗 10. Cancellation failure and retained-checkpoint fallback and 🔗 12. Signal-mask transactions and fatal restoration failures.

    RATIONALE:

    Destruction owns cancellation and handler cleanup while notification remains a signal-dispatch operation.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check nonleading/equal/leading/last and already-expired cancellation, pending-signal races, unwinding and due-next-event rescheduling without destructor notification.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 10. Cancellation failure and retained-checkpoint fallback UID: PPL-SPEC-000880 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If cancellation cannot read a valid timer interval, rearm the next event or stop the last timer, it shall still erase the canceled event without propagating that system-call exception. The previous physical timer/bookkeeping shall remain as a checkpoint for remaining events; its later signal shall notify only events whose logical deadlines are due and schedule others for their remaining duration. A failed last-event stop may leave a physical notification, which shall not invoke a canceled handler. Later cancellation/insertion shall remain consistent with the retained checkpoint rather than assume it equals the first remaining event's deadline.

    RATIONALE:

    Nonthrowing cleanup needs a safe scheduling fallback even when a timer cannot be changed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Inject failed reads, invalid read intervals, failed rearm/stop and chained cancellation histories; compare remaining event times and assert canceled objects never notify.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 11. Process timer ownership and signal-safe callbacks UID: PPL-SPEC-000881 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The facility shall reserve ITIMER_PROF/SIGPROF, or ITIMER_REAL/SIGALRM on Cygwin, GNU Hurd and profiling builds. One thread shall own all watchdog operations and receive the selected signal; every other thread shall keep it blocked. These restrictions shall also apply to a thread-safe PPL build, and clients shall not independently replace/use the owned timer or signal while the facility owns them. Callbacks and priority queries of the function/volatile-flag forms shall use only operations valid in asynchronous signal context. The atomic-holder form shall instead record a non-TLS notification in signal context and defer holder publication to ordinary owner code. They shall not throw, construct/destroy watchdogs or reenter their queue. Signal resolution, delivery delays and arbitrary prolonged masked operations shall not imply a hard elapsed-time guarantee.

    RATIONALE:

    The native timer and asynchronous callback context remain process resources despite other thread-local library facilities.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Inspect platform timer/signal selection and documented ownership; use signal-safe counters/holders in controlled and native smoke cases and check exact signal-mask restoration.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 12. Signal-mask transactions and fatal restoration failures UID: PPL-SPEC-000882 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction and cancellation shall block the selected signal while updating shared queue/timer state and restore the caller's exact previous mask afterward, including unrelated blocked signals. Failure to block the signal shall propagate from construction with 🔗 8. Failed watchdog construction and surviving events. The same failure during noexcept cancellation, or any failure to restore the mask, shall invoke std::terminate rather than continue with unprotected state or a newly retained mask. Pending delivery released by mask restoration shall see a consistent published queue and timer state.

    RATIONALE:

    Shared timer transactions must remain protected through both ordinary updates and synchronous delivery on unblocking.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check originally blocked/unblocked and unrelated signals, delivery before/after transaction points, construction block failure and isolated-process fatal block/restore controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 13. Stale timer-notification suppression UID: PPL-SPEC-000883 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On timeout entry, if a successful timer-state read yields a valid nonzero remaining interval, the notification shall be treated as stale and shall return without advancing the logical clock or notifying a replacement event. If the read fails or is invalid, dispatch shall use the timeout fallback of 🔗 14. Due-event signal dispatch and successful one-shot expiration; this fallback shall not promise to preserve a still-armed replacement deadline when the signal was in fact stale. A valid zero interval shall be processed as an actual timeout. Replacing a timer shall not assume that a previously pending signal has been retracted.

    RATIONALE:

    A delayed notification must not consume a newer timer whenever its still-armed state can be established.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Check immediate/delayed/coalesced stale signals, valid zero/nonzero reads and failed/malformed snapshots without equating fallback behavior with guaranteed stale suppression.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000884
    14. Due-event signal dispatch and successful one-shot expiration UID: PPL-SPEC-000884 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An actual timeout outside an active timer transaction shall advance the logical clock by the accounted last requested span, inspect events in deadline order and invoke each event whose deadline is no later than that clock. After its signal-safe action returns, dispatch shall mark it expired and remove it. A future event shall remain pending and be scheduled for its remaining logical interval. When no event remains, the logical alarm shall become inactive. An empty-queue signal shall not invoke a handler. The errno and fatal rearm outcomes shall retain 🔗 16. Fatal signal-context timer-rearm failure and 🔗 20. Timeout and signal-mask errno preservation.

    RATIONALE:

    Successful signal delivery must distinguish due, future and already removed events with exact one-shot ownership.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use independent callback/deadline logs for multiple due events, equal deadlines, remaining future events and empty/canceled queues, including subsequent expired destruction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000885
    15. Deferred timeout accounting inside a transaction UID: PPL-SPEC-000885 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    If an actual timeout is processed while the internal transaction state is active, it shall defer event dispatch by arming a short nonzero checkpoint. The previously consumed timeout span shall remain included in the elapsed-time accounting for that later dispatch; repeated replacement/chunk histories shall not lose the consumed span. A deferred checkpoint by itself shall not notify a future event. Failure to arm this checkpoint shall retain 🔗 16. Fatal signal-context timer-rearm failure.

    RATIONALE:

    A timeout deferred during publication must preserve the elapsed interval already consumed, including a capped long interval.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject timeout delivery at read/publication/transaction boundaries and compare ordinary and chunked deferred histories with a separately maintained logical clock.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 16. Fatal signal-context timer-rearm failure UID: PPL-SPEC-000886 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When timeout dispatch or transaction deferral cannot rearm the required timer, it shall call std::abort. It shall not report that failure by constructing or throwing a C++ exception in signal context. Earlier successfully completed callbacks in that dispatch shall retain their effects up to process termination. This fatal policy shall not be replaced by silently leaving future pending events unscheduled.

    RATIONALE:

    Once pending timeouts cannot be scheduled, continuing would lose required notifications and exception creation is unsafe in signal context.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use isolated-process fatal controls for rearm and deferral failures with allocation disabled and distinguish abort from exception, terminate and silent return.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000887
    17. Timer-read validity and context-specific error channels UID: PPL-SPEC-000887 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A valid timer interval shall have nonnegative seconds representable by long and microseconds in [0, 1000000). A failed timer read shall not be interpreted as a successful sample. During construction, a successful read outside this range shall report std::runtime_error with 🔗 8. Failed watchdog construction and surviving events. During cancellation it shall use 🔗 10. Cancellation failure and retained-checkpoint fallback, and during signal entry it shall use the fallback in 🔗 13. Stale timer-notification suppression. Successful zero and boundary-valid intervals shall retain their ordinary context meaning.

    RATIONALE:

    The same malformed platform snapshot requires different safe reporting in construction, noexcept cleanup and asynchronous dispatch.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject negative seconds/microseconds, excessive microseconds and supported wider-second overflow in each context, with valid zero/nonzero boundary controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 18. Class initialization and preceding signal action UID: PPL-SPEC-000888 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, class initialization shall establish a one-shot timer protocol (zero repeated interval), install the watchdog signal action for the selected signal and preserve its preceding action for later restoration. Failed installation shall report its system-call failure. The caller/library shall provide balanced initialization and finalization, without independently repeated initialization or live watchdogs before setup. If later library initialization fails after this signal action was acquired but before any timer/event was acquired, its internal rollback shall restore the preceding action without modifying an unrelated existing interval timer.

    RATIONALE:

    Signal-handler acquisition and later library setup rollback must preserve the resource that preceded the PPL lifecycle.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void initialize();
    
    VERIFICATION_CRITERIA:

    Check controlled preceding actions and installation failure; inspect and exercise post-acquisition initialization rollback separately from ordinary active-timer finalization.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 19. Class finalization and pending-notification cleanup UID: PPL-SPEC-000889 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, finalization shall require no live pending watchdog events. With the selected signal blocked, it shall stop the owned timer, mark the logical alarm inactive, discard an owned pending notification and restore the preceding signal action. It shall restore the caller's exact mask and preserve errno when it returns. Failure to block, stop the timer, install the discard action, restore the preceding action or restore the mask shall invoke std::terminate. A stale notification from a canceled timer shall not escape later to the preceding client handler.

    RATIONALE:

    Returning signal ownership must dispose of notifications still owned by the timer being finalized.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void finalize();
    
    VERIFICATION_CRITERIA:

    Use controlled previous actions/masks, queued canceled notifications and isolated-process failure controls for each finalization step, with no live pending watchdogs.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 20. Timeout and signal-mask errno preservation UID: PPL-SPEC-000890 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Whenever timeout dispatch returns normally, it shall restore its entry errno, including a stale-signal return, callback effects and successful read/rearm calls that change errno. Signal-mask acquisition and restoration shall preserve the errno with which those individual mask operations were entered. Finalization shall preserve its entry errno on return under 🔗 19. Class finalization and pending-notification cleanup. This shall not turn a reported constructor system-call failure into an unchanged-errno promise.

    RATIONALE:

    Asynchronous notification must not corrupt the interrupted computation's error state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    static void finalize();
    
    VERIFICATION_CRITERIA:

    Set distinct sentinel error values and clobber read/rearm/callback operations in stale, ordinary, deferred and chunked histories; verify successful mask/finalization preservation.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 2. Java library initialization and finalization UID: PPL-SPEC-001689 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Java VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After loading the configured JNI library, initialize_library shall establish native library state and the Java class cache before supported operations. finalize_library shall release that cache, the calling thread's variable stringifier and deterministic-timeout state, and the native initialization owner. A later initialization shall establish a new valid period of use.

    Clients shall release owned objects, cease using borrowed views, and end worker thread participation before finalization. Requests shall alternate valid initialization and finalization; duplicate library requests are outside this protocol. Participating workers shall obey 🔗 6. Thread entry and shared-facility use.

    RATIONALE:

    JNI loading, Java class caching and native initialization have distinct resource lifetimes.

    INTERFACE:

    Package parma_polyhedra_library, class Parma_Polyhedra_Library.

    public static native void initialize_library();
    public static native void finalize_library();
    

    The JNI library shall first be loaded using the host's native-library loading mechanism. The initializing thread owns the library lifecycle.

    VERIFICATION_CRITERIA:

    Load the JNI library and complete two initialize/use/release/finalize cycles, checking native coefficient and solver operations during each cycle. Inspect class-reference and thread-resource cleanup.

    SOURCE:

    interfaces/Java/parma_polyhedra_library/Parma_Polyhedra_Library.java; interfaces/Java/jni/ppl_java_globals.cc; interfaces/Java/jni/ppl_java_common_inlines.hh; interfaces/Java/tests/Native_Handle_test1.java.

  • 3. Java native failure and pending-exception protocol UID: PPL-SPEC-001690 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Java VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported JNI numerical entry points shall contain native exceptions. Native invalid_argument, domain_error, length_error, logic_error and overflow_error shall become the corresponding Java binding exceptions. Supported native interruption shall become Timeout_Exception. Allocation failure shall become a Java exception describing out-of-memory failure; other standard and unexpected native exceptions shall become RuntimeException with a diagnostic.

    A Java exception already pending after a host callback or object creation shall be returned to Java without replacement by a translated native exception. Argument-conversion callbacks shall complete before native access to a receiver that they may release; released receivers shall be rejected. Host-runtime termination and undefined behavior are outside the failure model.

    RATIONALE:

    A host callback failure and a false numerical result must remain distinguishable, and a pending exception carries the original Java cause.

    INTERFACE:

    Package parma_polyhedra_library: native methods of numerical wrappers and Parma_Polyhedra_Library. The reported exception classes are Invalid_Argument_Exception, Domain_Error_Exception, Length_Error_Exception, Logic_Error_Exception, Overflow_Error_Exception, Timeout_Exception and java.lang.RuntimeException. A pending host exception retains its object identity. Operations require the lifecycle of 🔗 2. Java library initialization and finalization.

    VERIFICATION_CRITERIA:

    Check invalid dimensions, released receivers, copy and index admission, release during callbacks, and identity of a callback-thrown exception. Check checked conversion overflow in bounded checked configurations. Inspect every native failure category and failed JNI allocation path; use controlled injection for allocation and otherwise inaccessible failures.

    SOURCE:

    interfaces/Java/jni/ppl_java_common_defs.hh; interfaces/Java/jni/ppl_java_common.cc; interfaces/Java/jni/ppl_java_globals.cc; interfaces/Java/tests/Native_Handle_test1.java.

  • PPL-SPEC-001691
    4. Java owned wrappers and borrowed views UID: PPL-SPEC-001691 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Java VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    An owned numerical wrapper shall release its native allocation through explicit free or managed finalization, without a later cleanup deleting that allocation again. Copy construction shall produce an independent native object. Borrowed-wrapper cleanup shall not delete the underlying owned object.

    Factories shall bind view owners before allocating native cursor storage, or retain native results in an exception-safe owner until all fallible publication steps complete. Failed JNI allocation or native computation shall leave no stranded native result. Replacing a ranking-function output shall release its previous value while preserving ownership of the output wrapper.

    MIP and partial-function wrappers shall reject native access after release. Powerset cursors and disjuncts shall retain their owner, validate its current generation, and reject stale use; disjuncts shall be read-only and copying one shall produce an independent writable object. Cursor operations shall reject boundary and foreign-owner misuse. Mutating or potentially normalizing a powerset shall invalidate its dependent views except for the documented cursor returned by single removal. Stable metadata queries shall preserve them.

    PIP tree views shall retain their problem owner and reject access after owner release or a mutation invalidating the captured tree generation. View cleanup shall leave independently owned problems usable. Managed cleanup timing is controlled by the JVM. Clients shall obey 🔗 2. Java library initialization and finalization and the operation-specific borrowing and synchronization prerequisites.

    RATIONALE:

    Host reachability and native ownership differ; generation checks prevent views from referring to replaced native storage.

    INTERFACE:

    Package parma_polyhedra_library: PPL_Object subclasses, owned numerical constructors and copy constructors, free and managed finalize methods; PIP solution-tree accessors; configured powerset begin_iterator, end_iterator, iterator copying, traversal and get_disjunct methods. Released MIP/partial-function access and invalid borrowed access shall report Invalid_Argument_Exception. A borrowed view is not an independently owned native allocation.

    VERIFICATION_CRITERIA:

    Check both release/finalization orders, repeated cleanup, independent copies, released access and release during conversion. Check powerset owner retention, stale and read-only views, cursor bounds and owner checks; check PIP owner retention and mutation invalidation. Inspect concrete generated finalizers and use allocation-sensitive checks for owned cleanup. Inject JNI object/token and native allocation failures into cursor, partition and ranking-output factories.

    SOURCE:

    interfaces/Java/parma_polyhedra_library/PPL_Object.java; interfaces/Java/jni/ppl_interface_generator_java_classes_cc_code.m4; interfaces/Java/jni/ppl_java_globals.cc; interfaces/Java/tests/Native_Handle_test1.java; interfaces/Java/tests/Powerset_Lifetime_test1.java; interfaces/Java/tests/PIP_Lifetime_test1.java; interfaces/Java/tests/Native_Publication_test1.java; interfaces/Java/tests/jni_native_publication_test.cc.

  • PPL-SPEC-001707
    5. Scoped JNI modified UTF-8 character release UID: PPL-SPEC-001707 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    UTF_Chars_Lease shall adopt one non-null result of a successful GetStringUTFChars call. The JNI environment, Java string and character pointer shall identify that same acquisition, and shall remain valid on the acquiring thread until the lease is destroyed. The adopted acquisition shall have no other owner responsible for release.

    Destruction shall call ReleaseStringUTFChars exactly once with the adopted environment, string and pointer, both at ordinary scope exit and during C++ exception unwinding. The lease shall neither copy the characters nor allocate storage. Copy construction and copy assignment shall be unavailable. Releasing the characters shall preserve any pending Java exception.

    Coefficient import, Java-customized variable output and Java text wrapping shall adopt each successfully acquired character pointer before any subsequent throwing native operation. Coefficient import shall return the value parsed from the acquired decimal characters. The variable formatter shall retain the characters through output. Text wrapping shall release them before allocating the returned Java string. Failed acquisition shall not create a lease and shall retain the entry point's existing JNI failure behavior.

    RATIONALE:

    JNI character storage is not a C++ automatic object. A native conversion, allocation or output failure must still end its lifetime through the matching JNI release operation.

    INTERFACE:

    Namespace Parma_Polyhedra_Library::Interfaces::Java.

    class UTF_Chars_Lease {
    public:
      UTF_Chars_Lease(JNIEnv*, jstring, const char*) noexcept;
      ~UTF_Chars_Lease();
      UTF_Chars_Lease(const UTF_Chars_Lease&) = delete;
      UTF_Chars_Lease& operator=(const UTF_Chars_Lease&) = delete;
    };
    

    Integration points are build_cxx_coeff, Java_Variable_output_function and Java_parma_1polyhedra_1library_IO_wrap_1string. Ownership lasts until destruction; the acquired pointer shall not be used afterwards.

    VERIFICATION_CRITERIA:

    Count successful acquisitions and matching releases during normal coefficient conversion, malformed conversion, checked-coefficient overflow, failing public Variable output and injected allocation failure in public Java text wrapping. Each acquired pointer shall be released once. Check zero releases after failed acquisition or an earlier callback exception, unchanged successful values and text, callback exception identity, and release with a pending Java exception. Exercise the lease directly at ordinary exit and bad_alloc unwinding. Inspect all GetStringUTFChars sites and non-copyability.

    SOURCE:

    interfaces/Java/jni/ppl_java_utf_chars.hh; interfaces/Java/jni/ppl_java_common_inlines.hh; interfaces/Java/jni/ppl_java_common.cc; interfaces/Java/jni/ppl_java_globals.cc; interfaces/Java/tests/JNI_UTF_Chars_test1.java; interfaces/Java/tests/jni_utf_chars_test.cc.

  • PPL-SPEC-001693
    2. OCaml managed native ownership UID: PPL-SPEC-001693 STATUS: APPROVED COMPONENT: OCAML_INTERFACE APPLICABILITY: IF_OCAML VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: OCaml VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Owned domain, MIP and PIP problem handles shall register a custom finalizer which releases the owned native object exactly once when the OCaml runtime finalizes the handle. Independent copies shall own independent allocations. A marked borrowed native pointer shall not be deleted by its wrapper finalizer.

    Factories shall allocate managed native owners before constructing native objects or owned conversion temporaries. Native slots shall contain null or their owned pointer before they can be observed by a finalizer or client. Native-only construction may defer the null-slot write to its failure path before exception translation or any further managed allocation. No subsequent OCaml allocation shall be needed to publish a newly owned native pointer. C++ failures during construction or multi-result computation shall leave no unowned native allocation; partially initialized managed owners shall be safe to finalize.

    Borrowed powerset iterators and read-only disjuncts shall keep their owner in GC-scanned storage and check its generation before native access. PIP tree views shall keep their problem owner reachable and reject generation-invalid access. View collection shall not delete the owner's native allocation. Clients shall respect the library lifecycle and operation-specific view invalidation rules. No collection time or prompt finalization is promised.

    RATIONALE:

    Native pointers are outside the OCaml heap, while owner references must remain visible to its collector.

    INTERFACE:

    Module Ppl_ocaml: abstract configured domain types, mip_problem, pip_problem, pip_tree_node, configured powerset iterator types and constructors, copies and solution/disjunct view accessors. Owned-object reclamation is through OCaml custom-block finalization rather than an explicit user deletion operation.

    VERIFICATION_CRITERIA:

    Create and copy domain and solver handles, collect unreachable wrappers, and check live independent objects remain usable. Compact while a borrowed PIP or powerset view is reachable; check retention and stale-use rejection. Inspect each generated finalizer and native allocation balance. Compare owned inputs with valid borrowed disjuncts in partition and ranking-result factories. Inject failures at each managed-owner allocation and native construction step, including powerset cursors, partition pairs and ranking-function results.

    SOURCE:

    interfaces/OCaml/ppl_interface_generator_ocaml_hh_code.m4; interfaces/OCaml/ppl_ocaml_common_defs.hh; interfaces/OCaml/ppl_ocaml_common_inlines.hh; interfaces/OCaml/ppl_ocaml_common.cc; interfaces/OCaml/ppl_ocaml_globals.ml; interfaces/OCaml/tests/zarith1.ml; interfaces/OCaml/tests/pip_lifetime1.ml; interfaces/OCaml/tests/ppl_interface_generator_ocaml_test_ml.m4; interfaces/OCaml/tests/ppl_interface_generator_ocaml_test_ml_code.m4; generated powerset tests.

  • PPL-SPEC-001694
    3. OCaml native exception translation UID: PPL-SPEC-001694 STATUS: APPROVED COMPONENT: OCAML_INTERFACE APPLICABILITY: IF_OCAML VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: OCaml VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Native exceptions raised by supported OCaml numerical entry points shall be contained. bad_alloc shall raise Out_of_memory and invalid_argument shall raise Invalid_argument. Native overflow, domain, length, logic and runtime errors shall raise the corresponding declared PPL_arithmetic_overflow, PPL_domain_error, PPL_length_error, PPL_logic_error and PPL_internal_error exceptions with diagnostics. Other standard exceptions shall raise PPL_unknown_standard_exception; unexpected native exceptions shall raise PPL_unexpected_error. Supported timeout exceptions shall reset the triggering binding-owned timer and raise PPL_timeout_exception.

    Native handlers and scoped native resources shall finish cleanup before the host exception is raised. If native unwinding leaves local root records from exited frames, the bridge shall restore the prior root chain before any runtime allocation. Diagnostic creation shall preserve the exception type and message when allocation succeeds. Allocation failure during translation shall be reported through the OCaml runtime after native cleanup. Raising an exception does not promise rollback beyond an operation's contract. Well-typed host representations, lifecycle, range and synchronization preconditions apply.

    RATIONALE:

    OCaml callers need a host exception rather than native unwinding across the runtime boundary.

    INTERFACE:

    Module Ppl_ocaml: the exception constructors above, as declared in ppl_ocaml_globals.mli, and supported foreign entry points. String-bearing exceptions carry the native diagnostic. Out_of_memory and PPL_timeout_exception have no diagnostic payload.

    VERIFICATION_CRITERIA:

    Check invalid arguments, invalid dimensions, checked coefficient overflow and supported deterministic or wall-clock interruption. Check diagnostics and recovery after exceptions from handwritten and generated entry points, including a subsequent collection and native call. Inspect all translation categories, local-root lifetimes and temporary-resource cleanup. Exercise allocation failure in the exception bridge in a controlled boundary test.

    SOURCE:

    interfaces/OCaml/ppl_ocaml_common_defs.hh; interfaces/OCaml/ppl_ocaml_globals.ml; interfaces/OCaml/tests/zarith1.ml; interfaces/OCaml/tests/test1.ml; interfaces/OCaml/tests/boundary_contracts1.ml.

  • 2. Prolog success failure and exception outcomes UID: PPL-SPEC-001696 STATUS: APPROVED COMPONENT: PROLOG_INTERFACE APPLICABILITY: IF_PROLOG_CIAO, IF_PROLOG_GNU, IF_PROLOG_SICSTUS, IF_PROLOG_SWI, IF_PROLOG_XSB, IF_PROLOG_YAP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Prolog VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A true numerical predicate shall succeed; a false numerical predicate shall fail normally. Result-producing predicates shall unify the documented output terms on success. Incompatible output bindings shall cause ordinary failure, without changing that into a numerical falsehood or promising rollback of foreign mutations. Newly allocated owned results whose output cannot be unified shall be released.

    Malformed arguments and supported native failures shall be reported through the selected engine's Prolog exception mechanism. Native exception unwinding shall be contained at the foreign boundary. Error terms shall distinguish the common invalid-argument/type/range, arithmetic-overflow, allocation, native logic/runtime and supported interruption categories according to the engine adapter. Ordinary false queries shall not be used to conceal those errors.

    RATIONALE:

    Logical falsehood, failed output unification and an inability to perform a numerical operation have different meanings.

    INTERFACE:

    Configured ppl_* predicates use the success/failure and output arguments specified by the common and generated Prolog predicate documentation. On a supported error they raise the common binding error term through the selected engine adapter; callers may use catch/3. For example:

    ppl_MIP_Problem_is_satisfiable(Problem)
    ppl_MIP_Problem_solve(Problem, Status)
    ppl_delete_MIP_Problem(Problem)
    

    Handles shall satisfy 🔗 3. Prolog owned domain and MIP handles through 🔗 5. Prolog PIP owner and tree generations, as applicable.

    VERIFICATION_CRITERIA:

    Check true/false numerical queries, literal output bindings, incompatible outputs and constructor cleanup. Catch malformed/type/stale-handle errors and supported native categories on each configured engine; inspect containment and error-reporting cleanup.

    SOURCE:

    interfaces/Prolog/ppl_prolog_common_defs.hh; interfaces/Prolog/ppl_prolog_common.cc; interfaces/Prolog/tests/pl_check.pl.

  • PPL-SPEC-001697
    3. Prolog owned domain and MIP handles UID: PPL-SPEC-001697 STATUS: APPROVED COMPONENT: PROLOG_INTERFACE APPLICABILITY: IF_PROLOG_CIAO, IF_PROLOG_GNU, IF_PROLOG_SICSTUS, IF_PROLOG_SWI, IF_PROLOG_XSB, IF_PROLOG_YAP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Prolog VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constructors shall return an opaque typed handle owning the new domain or MIP object. Copy constructors shall create an independent owned object. Deletion shall release the object and invalidate all aliases of its identity. Native access shall first check live owner identity and required native type; malformed, stale, unknown and wrong-type handles shall raise invalid-argument errors through 🔗 2. Prolog success failure and exception outcomes.

    Owner identities shall not wrap or be reused, including across finalization and reinitialization. Registry exhaustion shall reject construction rather than revive an old identity. MIP clear, swap and normal updates shall preserve live problem handles. Finalization shall release registered owned objects. A failed constructor/copy output unification shall discard the unpublished allocation. Term collection and backtracking alone shall not delete a foreign owned object.

    RATIONALE:

    Non-reused typed identities distinguish ownership from native addresses, preventing stale terms from accessing recycled storage.

    INTERFACE:

    Configured domain construction/copy/deletion predicates and the common MIP operations, including:

    ppl_new_MIP_Problem_from_space_dimension(Dimension, Handle)
    ppl_new_MIP_Problem_from_MIP_Problem(Source, Copy)
    ppl_delete_MIP_Problem(Handle)
    

    Handles are opaque terms; applications shall not construct or inspect their encoding. Registry lookup, native use and mutation obey the interface lock.

    VERIFICATION_CRITERIA:

    Check independent copies, deletion/repeated deletion and every MIP entry point with malformed, wrong-type and stale handles. Exercise failed output unification, concrete destruction, address reuse, identity exhaustion and finalize/reinitialize sequences, including checked coefficients narrower than handle identities.

    SOURCE:

    interfaces/Prolog/ppl_prolog_domain_handles.hh; interfaces/Prolog/ppl_prolog_common.cc; interfaces/Prolog/tests/domain_handles1.cc; interfaces/Prolog/tests/pl_check.pl.

  • PPL-SPEC-001698
    4. Prolog powerset iterator and disjunct validity UID: PPL-SPEC-001698 STATUS: APPROVED COMPONENT: PROLOG_INTERFACE APPLICABILITY: IF_PROLOG_CIAO, IF_PROLOG_GNU, IF_PROLOG_SICSTUS, IF_PROLOG_SWI, IF_PROLOG_XSB, IF_PROLOG_YAP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Prolog VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Powerset iterator and disjunct access shall validate live owner identity, required native type and captured owner generation. Potentially normalizing queries and mutations shall invalidate dependent views; documented stable metadata queries shall preserve them. Swap shall invalidate views of both owners. Borrowed disjuncts shall be read-only; copying one shall produce an independent writable object.

    Traversal shall reject end dereference, advancement past the end, movement before the beginning and operations combining different owners. Range removal shall reject reversed ranges. Single removal shall refresh its returned cursor while invalidating other captured cursors and views. Stale iterators shall remain explicitly deletable without dereferencing their former native node until library finalization. Failed view-output unification shall not leak a registry object. Invalid uses shall raise invalid-argument errors.

    RATIONALE:

    An iterator address alone cannot establish ownership or validity after a container changes.

    INTERFACE:

    Configured Pointset_Powerset construction/copy, begin_iterator, end_iterator, iterator-copy, increment/decrement/equality, get_disjunct, single/range-removal and iterator-deletion predicates, with the concrete names generated for the selected disjunct type. Iterators are explicitly owned handles; disjuncts are borrowed read-only views of their registered owner.

    VERIFICATION_CRITERIA:

    Check each boundary, foreign-owner and reversed-range case, read-only rejection, independent copies, normalizing versus stable queries, both swap operands, owner deletion, cursor refresh, failed output unification and release of stale iterators.

    SOURCE:

    interfaces/Prolog/ppl_prolog_domain_handles.hh; generated Prolog domain predicates; interfaces/Prolog/tests/domain_handles1.cc; interfaces/Prolog/tests/pl_check.pl.

  • PPL-SPEC-001699
    5. Prolog PIP owner and tree generations UID: PPL-SPEC-001699 STATUS: APPROVED COMPONENT: PROLOG_INTERFACE APPLICABILITY: IF_PROLOG_CIAO, IF_PROLOG_GNU, IF_PROLOG_SICSTUS, IF_PROLOG_SWI, IF_PROLOG_XSB, IF_PROLOG_YAP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Prolog VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    PIP problem and tree handles shall validate live typed owner identity before native access. A tree view shall additionally match the current problem generation and required node kind. Mutations, clear, swap of either operand, problem deletion and finalization shall invalidate prior tree views. Repeated stable solution queries shall preserve valid current-generation identities.

    Unknown, malformed, stale and wrong-kind handles shall raise invalid-argument errors. Owner and view identity counters shall reject exhaustion rather than wrap; finalization/reinitialization and native-address reuse shall not revive old terms. Registry storage for old tree generations shall be reclaimed when invalidated. Failed constructor/copy/view output unification shall discard unpublished owned resources without deleting an independently owned object.

    RATIONALE:

    PIP solves and mutations can replace an entire tree while reusing native addresses; ownership and generation must therefore be checked independently.

    INTERFACE:

    Common ppl_new_PIP_Problem*, ppl_delete_PIP_Problem, ppl_PIP_Problem_solution, optimizing-solution, mutation and swap predicates, and ppl_PIP_Tree_Node_* queries. Root, descendant and bottom handles belong to a particular live problem generation; a tree view never owns the problem's native tree allocation.

    VERIFICATION_CRITERIA:

    Check every mutation and both swap sides, node-kind errors, roots/descendants/bottom, deletion, repeated deletion, address reuse, failed unification, generation-storage bounds, counter exhaustion and finalization/reinitialization.

    SOURCE:

    interfaces/Prolog/ppl_prolog_pip_handles.hh; interfaces/Prolog/ppl_prolog_common.cc; interfaces/Prolog/tests/pip_handles1.cc; interfaces/Prolog/tests/pl_check.pl.

  • PPL-SPEC-001700
    6. Prolog library lifecycle protocol UID: PPL-SPEC-001700 STATUS: APPROVED COMPONENT: PROLOG_INTERFACE APPLICABILITY: IF_PROLOG_CIAO, IF_PROLOG_GNU, IF_PROLOG_SICSTUS, IF_PROLOG_SWI, IF_PROLOG_XSB, IF_PROLOG_YAP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Prolog VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ppl_initialize shall establish the common native state if it is not already initialized; a repeated request shall succeed harmlessly. ppl_finalize shall release binding-owned interruption resources and registered objects and leave the interface uninitialized; a repeated request shall also be harmless. A subsequent initialization shall permit a new valid period of use without making old handles valid. Fixed interface atom names cached during initialization shall remain valid across the engine's atom and string garbage collection.

    Each engine adapter shall invoke initialization through its documented loading hook or require explicit initialization before numerical predicate use. After finalization, clients shall use only lifecycle operations until the next initialization. The protocol does not require diagnosis of every violation of these call-state preconditions.

    RATIONALE:

    Engine loading hooks differ, while the common lifecycle must remain safe under repeated requests.

    INTERFACE:
    ppl_initialize
    ppl_finalize
    

    Both predicates have arity zero. Automatic hooks depend on the configured Prolog runtime and loading mode; they establish the same common lifecycle.

    VERIFICATION_CRITERIA:

    Check repeated initialize/finalize, use in two valid periods, stale-handle rejection across those periods and each configured engine loading hook. Inspect timer, registry and initialization-owner cleanup. In a fresh XSB engine, collect atoms before using cached names, then check the first returned control-parameter atom in two initialization periods.

    SOURCE:

    interfaces/Prolog/ppl_prolog_common.cc; engine adapters; interfaces/Prolog/tests/pl_check.pl; interfaces/Prolog/XSB/xsb_cached_atoms_gc.P.

PPL-LLR-000134
4. Cooperative computation abandonment UID: PPL-LLR-000134 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis RELATIONS (Parent): RELATIONS (Child): STATEMENT:

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.

RATIONALE:

Expensive computations need a way to return control while retaining a clear distinction between cooperative checks and hard real-time interruption.

COMMENT:

Verification covers native checkpoints, computational-weight monitoring and caller-owned request persistence. Interruption tests and checkpoint-path analysis verify those contracts. The low-level caller-owned request is distinct from binding-owned timeout state, whose cleanup follows 🔗 4. Binding interruption support and state changes. Queue ownership and concurrency preconditions follow 🔗 6. Thread entry and shared-facility use. No hard elapsed-time response bound is promised.

VERIFICATION_CRITERIA:

Exercise caller-owned abandonment requests during solver and polyhedral operations and check exception propagation and persistence until the caller clears the request. Check computational-weight handlers at abandonment checkpoints after their thresholds are reached. Assess binding-owned timeout reset and notification behavior separately under 🔗 4. Binding interruption support and state changes. Review the per-queue ownership and nonreentrancy restrictions for threshold queues under 🔗 6. Thread entry and shared-facility use.

SOURCE:

src/globals_defs.hh and src/globals_inlines.hh: abandonment request ownership, computational-weight checks, and exception dispatch. src/Threshold_Watcher_defs.hh and src/Threshold_Watcher_templates.hh: configured queue ownership and reached-threshold dispatch. tests/PIP_Problem/weightwatch1.cc and tests/Polyhedron/weightwatch1.cc: cooperative interruption scenarios.

  • PPL-SPEC-001553
    6. C deterministic timeout lifecycle UID: PPL-SPEC-001553 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported deterministic requests shall use the native positive scaled computational-weight increment, its admitted circular threshold domain and cooperative checkpoints. Replacing shall cancel the preceding deterministic setting before admitting the replacement; reset shall release its C-owned watcher and notification state. A deterministic interruption shall release that deterministic watcher before reporting the timeout category. It shall not remain active merely because the signal-timeout cleanup path was selected instead. Reset shall clear only the C-owned deterministic request and preserve unrelated borrowed interruption requests. In thread-safe C configurations, each initialized thread shall own its independent watcher, threshold queue, checker and budget counter. Setting, canceling or expiring one thread's budget shall not alter another's. Thread and library finalization shall release the calling thread's remaining C-owned deterministic state before native teardown; a later thread session shall inherit no pending C deterministic timeout.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    An observed timeout must not repeatedly poison independent later computations.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_deterministic_timeout(unsigned long unscaled_weight,
                                      unsigned scale);
    int ppl_reset_deterministic_timeout(void);
    
    VERIFICATION_CRITERIA:

    Force a threshold crossing, check exactly one translated notification, then run an independent query without an explicit client reset; check invalid/replacement/reset/finalization transitions. Exercise simultaneous thread budgets, cross-module native/C watchers, unrelated borrowed requests and finalization/reentry with a pending budget.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/tests/weightwatch1.c; interfaces/C/tests/cerrorsspec1.cc; interfaces/C/tests/deterministictimeouts1.cc.

  • PPL-SPEC-000815
    1. Polymorphic event-action interface and virtual destruction UID: PPL-SPEC-000815 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler shall be an abstract interface with const action dispatch and virtual destruction. Calling act() through a live base reference shall dispatch to the selected derived handler. Deleting an owned derived handler through a base pointer shall run its derived destruction and release its wrapper exactly once. A borrowed handler shall not become owned merely by being passed to a pending event.

    Construction, dispatch and destruction shall require the selected external callback/flag objects and synchronization to remain valid. These wrappers shall not themselves require global PPL initialization or timer availability. A caller invoking actions in a signal handler or shared threshold-watcher context shall retain that surrounding interface's operation and thread/signal restrictions.

    RATIONALE:

    Notification storage relies on const polymorphic dispatch and deletion through its abstract action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler {
    public:
      virtual void act() const = 0;
      virtual ~Handler();
    };
    
    VERIFICATION_CRITERIA:

    Check base-reference action dispatch and derived destruction with owned wrappers, and preserve borrowed external objects across wrapper destruction.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 2. Flag-handler binding and binding-preserving copies UID: PPL-SPEC-000816 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Flag construction shall bind the supplied holder reference and flag object without invoking a priority query, installing the flag or taking ownership of either external object. Copy construction and rvalue construction shall preserve those same bindings; later actions shall observe the holder's current value rather than a pointer-value snapshot made during construction. Ordinary assignment of this reference-binding wrapper shall not be supported.

    The holder shall be a live volatile pointer to const Flag_Base and Flag* shall convert to Flag_Base*. For a nonnull holder, the existing pointee shall belong to the compatible Flag object family, so the implementation's declared base-to-flag cast is well formed and valid. The flag/holder and any nonnull pointee shall outlive their actual access. Wrapper destruction shall not delete or alter them.

    RATIONALE:

    A retained holder reference must follow later client updates, and priority comparison requires a valid concrete flag object behind the base pointer.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    template <typename Flag_Base, typename Flag> class Handler_Flag;
    Handler_Flag(const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check copied/rvalue wrappers, changed holder values after construction, compatible multiple-base pointer adjustment, construction without priority queries and unchanged borrowed-object lifetimes.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 3. Strict-priority flag installation UID: PPL-SPEC-000817 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On act(), a null bound holder shall be set to the bound flag address without querying flag priorities. For a nonnull valid holder, the action shall install the bound flag exactly when the existing flag's observed priority is strictly lower than the bound flag's observed priority. Equal or higher existing priority shall preserve the existing pointer. Priority queries shall supply comparable values consistent with that call's decision; they shall not themselves rebind the holder. External priority changes between calls shall be observed by later actions.

    The operation shall not own/delete flags or allocate a wrapper. If a priority query reports an exception, it shall propagate through ordinary C++ dispatch without an assignment by the handler to the holder; any side effects of the query itself shall remain its own contract.

    RATIONALE:

    Competing abandonment requests need the highest observed priority and a definite equal-priority retention rule.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Flag<Flag_Base, Flag>::act() const;
    
    VERIFICATION_CRITERIA:

    Check null holders, every smaller/equal/larger signed priority pair, dynamic priority changes, compatible base pointers and priority exceptions with unchanged holder identity.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 4. Function-handler target binding and copies UID: PPL-SPEC-000818 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Function construction shall store the supplied function pointer without invoking it. Copy and rvalue construction shall retain the same target. Ordinary assignment shall not be supported. A null pointer may be stored and destroyed without invocation, but shall not be an admitted action target. The callable code shall remain valid at invocation. Construction/copy/destruction shall not call or own the function or allocate auxiliary callback state.

    RATIONALE:

    A function wrapper owns its pointer binding while the callable code and its external state remain the caller's responsibility.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler_Function;
    Handler_Function(void (*function)());
    
    VERIFICATION_CRITERIA:

    Check zero callback calls during construction/copy/destruction, copied target identity by later dispatch, null-bound noninvoked wrappers and nonassignability.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 5. Function action dispatch and callback failure UID: PPL-SPEC-000819 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With a live nonnull target, Handler_Function::act() shall call the stored function exactly once per invocation and return normally exactly when that call returns normally. A callback exception shall propagate with its identity and previously performed callback effects; no rollback of arbitrary callback state shall be required. The wrapper shall remain bound to the same target and permit a later admitted call. No invocation shall silently replace the callback with another target or delete its external state.

    RATIONALE:

    Ordinary callback completion and callback failure must remain observable through the const action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Function::act() const;
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks, a callback that records an effect then throws a unique exception, repeated const/base dispatch and successful retry.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 5. Interruptible thread registration and request lifetime UID: PPL-SPEC-001733 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP, THREAD_SAFE_BUILD VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    A cancellation request refers to another thread's thread-local state, whose address must remain valid during the synchronized lookup and request.

    INTERFACE:

    Namespace Parma_Polyhedra_Library, in thread-safe builds:

    template <typename Function>
    Implementation::Interruptible<Function> make_interruptible(Function f);
    bool interrupt_thread(const std::thread& target,
                          const Throwable* const throwable);
    

    Function shall be copy-constructible and callable through a const object with the supplied argument types.

    Internal Implementation::Interruptible and Abandon_Init own the registration interval, sharing one synchronized thread-id registry.

    VERIFICATION_CRITERIA:

    Use synchronized workers to check accepted requests, rejection for default, unregistered and joined threads, exception-unwinding removal and a second lifetime without a stale request. Check that retracting a registration request and ending the registration preserve a separately published request. Keep the Throwable alive until join. Inspect mutex coverage, destruction order and request delivery at native checkpoints.

    SOURCE:

    src/make_threadable.hh; src/make_threadable.cc; tests/Polyhedron/threadsafe2.cc.

  • 1. Threshold-ordered pending events and caller prerequisites UID: PPL-SPEC-000801 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_List<Traits> shall own a sequence of active event nodes and a separate pool of reusable inactive nodes. Each active event shall contain an owned threshold value and borrowed handler/expired-flag bindings. Traits::less_than shall define a stable strict weak order on admitted threshold values. Threshold copy construction, assignment, destruction and that comparison shall not throw; selected threshold operations shall satisfy their own validity and resource prerequisites.

    Clients shall synchronize access and retain the noncopying owning-list conditions of 🔗 5. Empty owning-list construction and remaining-node destruction. Active node positions shall belong to one list and remain valid only until their event is erased or their owner destroyed. Handlers and flags shall remain alive while their event is active or a borrowed reference is accessed. Inactive pooled nodes may retain old pointer values without accessing those external objects; their old external bindings need not outlive the pool. The queue shall not require global PPL initialization beyond the selected threshold's own needs. Any enclosing watcher interface shall retain its additional thread/signal restrictions.

    RATIONALE:

    Queue ownership, threshold ordering and external notification-object lifetimes have distinct scopes, especially after cancellation recycles a node.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    template <typename Traits> class Pending_List;
    template <typename Threshold> class Pending_Element;
    
    VERIFICATION_CRITERIA:

    Compare independent ordered event models, separate owners, borrowed identities and pool lifetimes with nonthrowing threshold fixtures and no library initialization.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000802
    2. Pending-element construction and embedded-link lifetime UID: PPL-SPEC-000802 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_Element construction shall copy the supplied threshold and bind the supplied handler and flag by reference identity. It shall not invoke the handler, modify the flag or retain a reference to the caller's threshold object. The selected threshold shall satisfy 🔗 1. Threshold-ordered pending events and caller prerequisites.

    The newly constructed element's inherited links shall require binding into a valid ring before traversal, unlinking or destruction, retaining 🔗 2. Embedded-node construction and link initialization. Queue insertion shall establish that binding before exposing the element. A directly constructed element shall be attached by its caller before destruction; completed linked-element destruction shall retain the nonthrowing threshold lifetime and embedded- node contract.

    RATIONALE:

    Attribute construction alone does not initialize the inherited embedded-node links.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_Element(const Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Construct directly into an owning embedded list with a nondefault-constructible threshold; verify the independent threshold copy, borrowed identities, no notification and completed-node destruction.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000803
    3. Element attribute reassignment without relinking UID: PPL-SPEC-000803 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    assign shall replace the owned threshold value and borrowed handler/ flag bindings with the supplied attributes, preserving the element's existing link position. It shall not allocate an event node, invoke a handler or reset either flag. The supplied threshold may alias this element's current threshold; self-value assignment shall retain its meaning. Callers reassigning active elements shall preserve the pending list's ordering before using its ordinary operations. Pooled elements shall be rebound before exposure as new active events.

    RATIONALE:

    Pool reuse requires replacing every event attribute without changing the detached node ownership protocol.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    void assign(const Threshold& deadline, const Handler& handler,
                bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Check every old/new handler/flag pairing, self-borrowed deadline assignment, unchanged node links and no handler/flag side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000804
    4. Threshold, handler and expired-flag reference access UID: PPL-SPEC-000804 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    deadline() shall return a const reference to the owned threshold; handler() shall return a const reference to the bound handler; expired_flag() shall return a mutable reference to the bound Boolean even through a const element wrapper. Access shall preserve all attributes and links. A reference to the threshold shall require the node and threshold object to remain alive, and shall observe any later admitted reassignment. Handler/flag references shall retain the external object's lifetime independently of the element wrapper. Invoking or modifying a returned external object shall be a caller action, not an automatic queue notification.

    RATIONALE:

    Event access must preserve actual external identities and distinguish reference access from notification scheduling.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    const Threshold& deadline() const;
    const Handler& handler() const;
    bool& expired_flag() const;
    
    VERIFICATION_CRITERIA:

    Check exact types/addresses through const and mutable wrappers, independently copied thresholds, explicit caller notification and direct flag mutation.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000805
    5. Pending-element attribute checker scope UID: PPL-SPEC-000805 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted completed element, OK() shall return true without modifying attributes or links. It shall not validate threshold positivity, current-time expiry, external handler policy or list sorting. Its use shall not dereference a handler or flag merely to validate their stored pointer values. This element checker shall not establish the inherited ring's structural validity or make a stale active-event position usable.

    RATIONALE:

    The element checker supplies an embedded-list hook while deadline validity and ownership remain caller/queue obligations.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check live elements before/after attribute replacement and inactive pooled nodes with expired external lifetimes, without accessing stale external bindings.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000806
    6. Queue construction and complete active/free ownership cleanup UID: PPL-SPEC-000806 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall create a valid empty active sequence and empty free pool. Destruction shall release every owned active and pooled node and its threshold exactly once. It shall not delete borrowed handlers or flags, invoke notification actions or change external expired flags. Independent queue owners shall have independent nodes and lifetimes. No supported owner copy/assignment shall be required under 🔗 1. Threshold-ordered pending events and caller prerequisites.

    RATIONALE:

    Both active and recycled nodes remain queue-owned, while notification objects remain externally owned.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_List();
    ~Pending_List();
    
    VERIFICATION_CRITERIA:

    Count threshold construction/destruction across mixed active/free owners, empty owners and separate queues; verify no external handler destruction or notification.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000807
    7. Sorted insertion and equivalent-deadline multiplicity UID: PPL-SPEC-000807 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful insertion shall add exactly one active event with the supplied attributes and return its live position. Traversing the active sequence shall produce nondecreasing threshold order under the supplied strict weak comparison. Every previously active event shall remain with its prior threshold, handler, flag and node identity. Distinct events with equivalent thresholds shall all remain present; their relative order shall not be required by this interface. Insertion shall not act on handlers or modify external flags. Threshold values need not be positive or related to a clock merely to use this internal queue.

    RATIONALE:

    Ordered pending storage supports both timer and computational-weight clients without imposing one client's duration validation on the generic container.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Compare all small insertion permutations, descending histories, duplicate/equivalent thresholds, zero thresholds and exact event identities with an independent ordered model.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000808
    8. Insertion with borrowed active attributes UID: PPL-SPEC-000808 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An insertion's threshold argument may borrow the threshold of an already active element; insertion shall preserve that source and copy its value into the new event. Handlers and flags may be shared among several active events. Their reference identities and preexisting flag values shall remain unchanged by insertion. These aliases shall not permit reuse of erased positions as active-event sources or destruction of external objects still referenced by active events.

    RATIONALE:

    Watchdog records may share external notification state or use an existing active threshold without transferring its ownership.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Insert from each active threshold reference into fresh and recycled nodes, share handler/flag objects and verify all source values and bindings survive.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 9. Active-event erasure and successor preservation UID: PPL-SPEC-000809 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasure shall require a live active position belonging to this queue. It shall remove exactly that event from the active sequence, preserve every other event and its ordering/identity, and return the removed event's next active position or this queue's end. It shall retain the removed node in the reusable pool without destroying its threshold, notifying its handler or changing its flag. The removed position shall cease to denote an active event even while the underlying node remains allocated. Erasure shall not allocate.

    RATIONALE:

    Cancellation removes a logical event while retaining node storage for later low-allocation use.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Erase every possible active position, singleton and repeated front/back histories; check exact successor, unchanged surviving identities and attributes, no allocation or notification and retained threshold lifetimes.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000810
    10. Recycled-node insertion and allocation-free reuse UID: PPL-SPEC-000810 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When inactive nodes are available, insertion shall reuse one of them rather than allocate a new node. It shall replace every event attribute before linking the reused node into the sorted active sequence. The old external handler/flag bindings shall not be accessed during reuse. No particular selection order among available free nodes shall be required. Without an inactive node, insertion shall allocate a new properly aligned event node. Threshold operation costs shall remain those of the admitted nonthrowing threshold type.

    RATIONALE:

    Recycling reduces later event-node allocation while requiring complete replacement of old notification bindings.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Exhaust and replenish pools, disable allocation during reuse, check reused node-address membership and over-alignment, and replace bindings whose former external objects have been destroyed.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000811
    11. Active-event iterator ranges and borrowed traversal UID: PPL-SPEC-000811 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    iterator and const_iterator shall retain the corresponding embedded-list iterator types and 🔗 7. Embedded-list iterator borrowing and valid linked positions, 🔗 8. Embedded-list position binding and lifetime, 🔗 9. Embedded-list typed element access, 🔗 10. Embedded-list bidirectional traversal and 🔗 11. Embedded-list position equality. The public nonconst begin/end members shall bound exactly the active sequence; free nodes shall never appear in that range. End shall be comparable and support retreat when nonempty, but not dereference. Positions shall preserve node identity under other event insertion/erasure, subject to 🔗 1. Threshold-ordered pending events and caller prerequisites. Clients shall not change embedded links or break active threshold ordering through the borrowed element access.

    RATIONALE:

    Only active events participate in scheduling traversal; cached storage and borrowed-node access must not extend event validity.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    using iterator = typename EList<Pending_Element<typename Traits::Threshold>>::iterator;
    using const_iterator = typename EList<Pending_Element<typename Traits::Threshold>>::const_iterator;
    iterator begin();
    iterator end();
    
    VERIFICATION_CRITERIA:

    Compare forward/backward prefix/postfix histories, separate cursor copies and exact event addresses before/after unrelated insertions and erasures; verify free nodes are excluded.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000812
    12. Active emptiness independent of retained pool storage UID: PPL-SPEC-000812 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    empty() shall return true exactly when no active events remain. An empty active sequence shall have equal begin/end positions even if inactive node storage is retained. Emptiness shall not imply that all allocated event nodes have been released. The query shall not notify handlers, modify flags or change the active/free node ownership.

    RATIONALE:

    Logical pending-event emptiness and physical pool emptiness are different resource states.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool empty() const;
    
    VERIFICATION_CRITERIA:

    Check construction, every erase-to-empty history, retained threshold/node counts and subsequent allocation-free insertion.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000813
    13. Queue node checks and threshold-order validation UID: PPL-SPEC-000813 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For safely inspectable active/free rings, OK() shall require both embedded lists' element checks and nondecreasing active threshold order. An empty active list shall pass when its active/free node checks pass. Free nodes shall not require threshold sorting. Checking shall not invoke handlers, dereference expired external bindings, modify flags or change ownership. Corrupted embedded links shall remain outside the checker domain; this operation shall not provide memory-safe diagnosis of arbitrary ownership corruption. Clients may check and repair a threshold-order violation before resuming ordinary queue operations.

    RATIONALE:

    Queue consistency adds threshold order to the embedded-node hooks without validating canceled notification objects or arbitrary corrupted memory.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/sorted states, every adjacent valid-ring order violation and repaired order, unsorted free-node histories and absence of external notification side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000814
    14. Insertion-allocation failure preservation and retry UID: PPL-SPEC-000814 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the nonthrowing threshold and comparison prerequisites of 🔗 1. Threshold-ordered pending events and caller prerequisites, a reported event-node allocation failure shall leave the active sequence, free pool, all existing event attributes, handler bindings and flag values unchanged. No incomplete event node shall remain owned or linked. The same queue shall permit a later successful insertion and ordinary erasure. Erasure and insertion using an available pooled node shall not require an event-node allocation. These guarantees shall not promise recovery from violated threshold or linking preconditions.

    RATIONALE:

    Allocation occurs before an otherwise nonthrowing insertion can commit a new active event.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Fail the observed new-node allocation for empty and populated owners, verify complete event/address/flag/resource preservation, retry insertion and then exercise allocation-disabled pool reuse.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 5. Integer feasibility of parametric compatibility contexts UID: PPL-SPEC-001741 STATUS: APPROVED COMPONENT: PIP_SOLVER APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A native context shall include a constant column. Each row shall denote an inequality whose constant is in column zero and whose remaining coefficients multiply nonnegative integer coordinates. The affine row value shall be required to be nonnegative. The additional row, when supplied, shall have the same logical width and shall be conjoined with the context. A completed query shall return true exactly when that system has a nonnegative integer solution. A rational solution that fails an integrality constraint shall not justify true. Explicitly stored zeroes and differing physical row capacities shall not alter the result.

    The const-input entry points shall preserve the context and any additional row. The destructive entry point may modify and extend its working tableau. A compatibility workspace shall own its scratch storage and shall be noncopyable. Nested queries shall use distinct workspaces. Restoring a context shall replace the logical rows, including zeroing retained coordinates absent from the source. Reuse may retain inactive row allocations and sparse entries holding zero. After failure or interruption, another query shall rebuild or reinitialize the scratch state before relying on it.

    When direct bounded arithmetic has not been proved representable, complete rational pivot rows shall be evaluated exactly and the common positive factor of their numerators and denominator shall be cancelled before admission. Comparison-only products shall retain exact order without requiring them to fit a stored coefficient. When a reduced numerator or denominator cannot be stored, the protected entry points and the workspace overload accepting a const context and an additional row shall replay the original unchanged context in owned unbounded rational working storage. Replay shall preserve reconstructed original-variable column order and enforce integer feasibility of those variables using cuts. It shall not widen the public solution-tree coefficient type.

    Only the internal working-range condition shall trigger replay. Allocation failures and client abandonment exceptions, including client overflow exceptions, shall propagate. Scratch from an unsuccessful query shall not establish any feasibility result.

    RATIONALE:

    Branch and guard pruning depends on integer feasibility of the original parameter context. Ownership and replay must preserve its meaning and the caller's interruption behavior.

    INTERFACE:

    Protected PIP_Tree_Node::compatibility_check overloads and the private PIP_Implementation::Compatibility_Workspace, compatibility_check and exact_compatibility_check declarations in src/PIP_Compatibility.hh. The lower-level mutable overload used by the workspace operates on admitted working storage and may signal that exact replay is needed.

    VERIFICATION_CRITERIA:

    Compare the answers with complete bounded integer enumeration and literal integral and half-integral solutions. Use changing dimensions, stored zeroes and varying row capacities. Compare the input rows before and after both native checks and replay. Check reuse of live slots after restoration and zeroing of recycled rows. Exercise pivot reduction across the coefficient boundary and retry the same workspace after allocation and checkpoint failures. Check that a client overflow is propagated once and that nested calls use independent scratch.

    SOURCE:

    src/PIP_Tree_defs.hh, src/PIP_Tree.cc, src/PIP_Compatibility.hh, src/PIP_Exact_Compatibility.cc, tests/PIP_Problem/compatibilityworkspace1.cc, tests/PIP_Problem/exactcontexts1.cc and tests/PIP_Problem/compatibilityzero1.cc.

  • PPL-SPEC-000536
    6. Indirect-sort failure and cooperative interruption states UID: PPL-SPEC-000536 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 5. Indirect sorting establishes a distinct prefix without resizing, failures while preparing or sorting the private index sequence shall preserve every indexed value and associated record. This shall include recoverable index-storage allocation failure and exceptions from the ordering comparator. Temporary index storage shall be released on every exceptional return.

    Outside library assertion evaluation, cooperative abandonment shall be checked before index preparation, at intervals of at most 1024 ordering comparisons, and again before the first indexed-value mutation. A reported cooperative interruption shall therefore preserve every indexed value and associated record. A caller-owned abandonment request shall remain set until the caller clears it; this comparison-count interval shall not imply an elapsed-time bound.

    An exception from the uniqueness comparator may occur after the indexed values have been sorted. It need not preserve their former order or establish a compact distinct prefix, but shall retain live owners and the complete value permutation and paired associations. A throwing swap shall be outside the algorithm's admitted swap precondition.

    RATIONALE:

    Cancellation and comparison failures must not lose owned rows or detach saturation records from them.

    INTERFACE:

    Internal source header: swapping_sort_templates.hh, with the configured assertion macros from assertions.hh available. Names belong to Parma_Polyhedra_Library::Implementation.

    template <typename Sort_Comparer, typename Unique_Comparer, typename Swapper>
    typename Sort_Comparer::size_type
    indirect_sort_and_unique(typename Sort_Comparer::size_type num_elems,
                             Sort_Comparer sort_cmp,
                             Unique_Comparer unique_cmp,
                             Swapper indirect_swap);
    
    VERIFICATION_CRITERIA:

    Inject an index-vector allocation failure and ordering-comparator exceptions before mutation; request cancellation at entry, during a long index sort and before a short sort commits; verify unchanged complete records and retained requests. Throw during uniqueness after sorting and check live paired permutations without assuming rollback.

    SOURCE:

    src/swapping_sort_templates.hh; tests/swappingsortspec1.cc.

  • 1. Generic threshold-watcher traits and admitted value protocol UID: PPL-SPEC-000851 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Threshold_Watcher<Traits> shall use the selected trait's Threshold and Delta types, current-value provider get(), nonthrowing strict comparison less_than and conversion from_delta. Threshold shall be default constructible, have nonthrowing copy construction, assignment and destruction, and satisfy its own value/resource needs. get() shall produce a value/reference bindable to a const threshold reference for the duration of a check. Conversion shall assign the selected absolute threshold from the supplied delta. Default construction, current-value provision and conversion may report exceptions.

    The comparison shall provide a coherent strict order over the admitted current/pending domain, including false on equal values. The trait shall provide a writable check_function slot accepting, converting to and invocable as void (*)(), initially null with no pending events and owned by the watcher protocol while events remain. This generic mechanism shall require no timer availability or global PPL initialization beyond its selected traits' needs. Thread/lifetime conditions shall retain 🔗 12. Watcher notification lifetimes and exclusive use.

    RATIONALE:

    The generic watcher needs exact trait operations and failure/lifetime conditions independently of the computational-weight backend.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Instantiate independent strict-order traits, including nondefault delta types, throwing threshold-default/get/conversion operations and no PPL initialization.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000852
    2. Flag-notification watcher construction UID: PPL-SPEC-000852 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful flag-form construction shall own one handler bound to the supplied holder and flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, compute/validate the event threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. Construction shall not install the flag or query its priority merely to register the event. The holder/flag shall remain borrowed notification objects. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and a compatible flag. Its synchronous notification shall use release compare-and-exchange to fill only a null holder. It shall not dereference an existing request, query priorities, or replace a nonnull request. Both notification objects shall outlive the watcher; a published flag shall also outlive its readers. Cancellation shall precede clearing or releasing its binding. The same threshold validation, registration failure cleanup and queue exclusivity conditions shall apply.

    RATIONALE:

    Flag notification registration and actual priority-based installation occur at different times.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      std::atomic<const Flag_Base*>& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check initial holder/priority state, exact-deadline notification, cancellation, shared flags, callback isolation and construction failures.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000853
    3. Function-notification watcher construction UID: PPL-SPEC-000853 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful function-form construction shall own one handler retaining the supplied callback under 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure, compute/validate its threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. The callback shall be live and nonnull when its event can dispatch. Construction shall not invoke it. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    RATIONALE:

    Registering a callback must preserve its identity without executing the notification prematurely.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks and before/equal/after threshold checks, cancellation and failure/retry histories with exact invocation counts.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 4. Threshold conversion and already-reached rejection UID: PPL-SPEC-000854 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction shall default-construct a local threshold, invoke the selected from_delta conversion, then obtain the current value and accept the result only if the current value is strictly before that threshold under the admitted comparison. A converted threshold equal to or before the current value shall throw std::invalid_argument and shall not register an event. Exceptions from default construction, conversion or current-value provision shall propagate with 🔗 10. Construction failure cleanup and existing-event preservation. The generic watcher shall not infer another numeric interpretation of a user-defined delta or absolute threshold.

    RATIONALE:

    An already reached threshold must be rejected before it becomes an active event, regardless of how the trait expresses deltas.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Both constructors apply Traits::from_delta, Traits::get and
    // Traits::less_than under the trait protocol above.
    
    VERIFICATION_CRITERIA:

    Check future/equal/past conversions, zero deltas for additive traits, conversion order and each supported pre-registration exception.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000855
    5. Per-trait event ordering and multiplicity UID: PPL-SPEC-000855 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchers shall share their trait's pending queue within the storage policy in 🔗 12. Watcher notification lifetimes and exclusive use: one per thread for an opted-in thread-safe trait, otherwise one shared queue per trait. Each successful construction shall add one event, preserving all existing watchers and nondecreasing threshold order under 🔗 7. Sorted insertion and equivalent-deadline multiplicity. Equivalent future thresholds shall be admitted as distinct events; no relative dispatch order among equivalent events shall be required. Different trait instantiations shall have independent queues and hook slots. Registration shall not dispatch existing events.

    RATIONALE:

    Multiple pending events need independent identities even when their thresholds agree.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Compare distinct/equivalent threshold sets with an independent event model, interleave trait instantiations and preserve existing events through insert/cancel histories.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 6. Published checking function and empty-queue transitions UID: PPL-SPEC-000856 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After successful event registration, the trait's check_function slot shall point to that instantiation's checking action. It shall remain published while any event is pending and become null when the final pending event is canceled or successfully dispatched. Failed construction shall preserve the previous slot value under 🔗 10. Construction failure cleanup and existing-event preservation. Clients shall invoke a published hook only while its queue remains nonempty under the exclusive-use protocol; retaining an old nonnull pointer shall not authorize calling an emptied queue.

    RATIONALE:

    A null hook prevents checkpoint dispatch from entering an empty queue.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Trait protocol: call Traits::check_function() only while its
    // published void (*)() slot is nonnull and remains current.
    
    VERIFICATION_CRITERIA:

    Check null/non-null transitions after every registration, cancel, failure and expiration, including previously captured pointer identity while events remain.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000857
    7. Due-event dispatch and successful expiration UID: PPL-SPEC-000857 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A published check shall obtain the current object from one get() call and inspect pending events in threshold order. While that observed current object is not strictly before the first pending threshold, it shall invoke the event's bound action. Only after that action returns normally shall it mark the watcher expired and remove its pending event. Thus an event exactly at the current threshold shall be due. Processing shall stop at the first future event or an empty queue, retaining 🔗 6. Published checking function and empty-queue transitions.

    If a trait returns a reference to mutable current state, later comparisons in the same dispatch shall observe any admitted serial changes to that object; a value returned by get() shall instead remain the retained value for that check. This mechanism shall not promise elapsed-time notification or invoke the current-value provider separately per event.

    RATIONALE:

    Expiration must follow successful notification and use the selected current-value binding semantics.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Invoke the currently published Traits::check_function hook.
    
    VERIFICATION_CRITERIA:

    Check before/equal/after and several due events, exact action counts, retained future events, one get call, and reference/value provider behavior after a callback advances current state.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000858
    8. Action exceptions and partially completed dispatch UID: PPL-SPEC-000858 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If a notification action throws, dispatch shall propagate that exception without marking or removing the throwing event. Earlier events already notified successfully shall remain expired and removed; later events shall remain pending. The throwing event's callback effects shall not be rolled back. A later admitted check may invoke it again, or destruction may cancel it. The queue and published hook shall remain consistent with the events still pending, and no handler shall leak.

    RATIONALE:

    Cooperative notification may throw to return control while preserving which events have actually completed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Exception outcome of the currently published checking hook.
    
    VERIFICATION_CRITERIA:

    Use a distinct prefix, throwing middle callback and later event; check exception identity/effects, pending hook, retry and cancellation without duplicate notification of the completed prefix.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000859
    9. Watcher destruction, cancellation and handler ownership UID: PPL-SPEC-000859 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Destruction of an unexpired watcher shall cancel its pending event; destruction of an already expired watcher shall not remove another event or notify again. Both shall destroy the watcher-owned handler exactly once. Cancellation shall not invoke the handler or modify external flag objects, and shall retain the active/free queue ownership of 🔗 9. Active-event erasure and successor preservation. Destruction shall retain the admitted nonthrowing trait operations and exclusive-use conditions.

    RATIONALE:

    The watcher owns its action wrapper, while cancellation and completed-expiration cleanup have different queue effects.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    ~Threshold_Watcher();
    
    VERIFICATION_CRITERIA:

    Cancel first/middle/last and sole events, destroy expired watchers in several orders, count handler/storage lifetimes and retain unrelated events.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 10. Construction failure cleanup and existing-event preservation UID: PPL-SPEC-000860 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A reported failure while allocating the handler, default-constructing or converting a threshold, obtaining current state, rejecting an already reached threshold, or allocating its pending node shall release the incomplete watcher-owned handler and any temporary resources acquired for that construction. It shall preserve all previously pending watchers, their notification state and the previously published checking hook. The same trait instantiation shall permit later successful construction and dispatch/cancellation. The nonthrowing copy/assignment/destruction/ comparison prerequisites shall remain those of 🔗 1. Generic threshold-watcher traits and admitted value protocol.

    RATIONALE:

    All pre-registration failure paths must relinquish the newly allocated handler without disturbing existing event owners.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Inject each observable allocation and supported threshold-default/get/conversion failure for both constructor forms, preserve existing event identities/hook/flags and retry.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000861
    11. Noncopyable watcher lifetime identity UID: PPL-SPEC-000861 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A watcher shall retain one lifetime identity for its expired flag, handler and pending position. Copy construction and assignment shall be inaccessible; no public move construction/assignment or default construction shall be supplied. Clients shall keep its address and lifetime stable while an event can reference that state. Separate watcher objects shall be constructed through their own notification constructors.

    RATIONALE:

    Memberwise copying would duplicate a queue position and references to one watcher's expiration state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Public construction is limited to the two notification forms above.
    
    VERIFICATION_CRITERIA:

    Check public construction/copy/move traits and independent event ownership of separately constructed watchers.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 12. Watcher notification lifetimes and exclusive use UID: PPL-SPEC-000862 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction, destruction and checks for one trait's shared queue shall not overlap concurrently or reenter that queue's dispatch. Notification actions shall retain the valid handler/flag/function bindings of 🔗 1. Polymorphic event-action interface and virtual destruction, 🔗 2. Flag-handler binding and binding-preserving copies, 🔗 3. Strict-priority flag installation, 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure and shall not destroy a watcher whose handler or expiration state is being accessed. The trait's current-value result shall remain valid through its use. Clients shall not replace a queue's hook while its events remain.

    In a thread-safe configuration, a trait may opt into per-thread queues with static constexpr bool thread_local_queue = true. Its current-value state and checking slot shall then also be thread-local. Weightwatch_Traits shall use this policy. Watchers and their borrowed bindings shall remain in their constructing thread and be destroyed before that thread exits. Other threads may independently compute, register, cancel and check their own queues. Exclusivity and nonreentrancy shall apply separately to each queue. Traits without that opt-in, and ordinary non-thread-safe configurations, shall retain the shared-state synchronization requirements above.

    RATIONALE:

    Queue state, callback execution and borrowed watcher fields must remain live under the configured queue's single-owner protocol.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Inspect actual queue/handler accesses and trait storage policy. Exercise serial shared traits and simultaneous per-thread weightwatch queues, including independent cancellation and expiry, without destroying executing actions.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/weightwatchspec1.cc.

  • 1. Optional profiler selection and instrumentation protocol UID: PPL-SPEC-001598 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Computational-weight profiling shall be selected by nonzero PPL_PROFILE_ADD_WEIGHT together with NDEBUG. Assertion builds shall retain ordinary weight instrumentation even when the profiling flag is nonzero; profiling-disabled release builds shall retain 🔗 5. Computational-weight instrumentation outside profiling mode. Profiler implementation definitions and automatic calibration shall be present only in the selected profiling configuration. The profiler declaration shall be included after Weightwatch_Traits is complete, with the time declarations required by its interface.

    In profiling mode, WEIGHT_BEGIN() shall call Weight_Profiler::begin(). Each expansion of WEIGHT_ADD(d) or WEIGHT_ADD_MUL(d, f) shall own a function-static profiling point identified by that expansion's file and line. The first execution shall evaluate and capture d as the point's Delta; later executions of that expansion shall reuse it. WEIGHT_ADD shall end a one-iteration sample; WEIGHT_ADD_MUL shall evaluate f once per execution, convert it to unsigned int, and end that many iterations. Expressions and their conversions shall be defined. Deltas intended to vary between calls shall use distinct explicit profiling points instead.

    The profiler shall borrow its file-name string through its last output or destruction. Calls using the shared clock boundary, calibration and statistics shall be serialized, including in a thread-safe library build. A successful POSIX calling-thread CPU clock shall be available. Timing calls shall occur in the same thread over each interval. Admitted statistics shall remain representable in their unsigned int sample/iteration counters; timing differences shall remain representable in the clock arithmetic. No numerical-library initialization prerequisite shall be imposed by the profiler itself. The ordinary weight counter shall retain 🔗 1. Computational-weight value and current-state binding.

    RATIONALE:

    Optional measurement needs a distinct configuration and a stable per-site weight without changing ordinary instrumentation. Shared clock and stream state require explicit serialization.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    // Selected only for NDEBUG && PPL_PROFILE_ADD_WEIGHT:
    #define WEIGHT_BEGIN() /* begin the shared timing interval */
    #define WEIGHT_ADD(delta) /* end one iteration at this point */
    #define WEIGHT_ADD_MUL(delta, factor) /* end factor iterations */
    
    VERIFICATION_CRITERIA:

    Compile and run enabled release, enabled assertion and disabled release variants. Check absence of clock calls and calibration outside the selected configuration. Exercise two calls at one macro expansion with different delta expressions, single evaluation of factors, and distinct one-iteration sites. Inspect borrowed-string lifetime, shared-state restrictions and counter bounds.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 2. Profiler clock boundaries and zero-iteration weight accounting UID: PPL-SPEC-001599 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    begin() shall replace the shared timestamp with the calling thread CPU time. For end(n) with n > 0, the profiler shall add δn to Weightwatch_Traits::weight using that unsigned counter's modular arithmetic, read a new timestamp, and use the preceding shared boundary as the interval start. A nanosecond-field rollover shall retain the elapsed time across the seconds boundary. After subtracting the calibrated overhead a, it shall supply the elapsed nanoseconds e and per-iteration value x = e ⁄ n to 🔗 3. Profiler sample classification and weighted statistics. Timing arithmetic shall use double and its rounding; adjusted times need not be nonnegative.

    For end(0), the profiler shall refresh the shared timestamp without changing the weight, sample counts, iteration counts or accumulated statistics. It shall perform no division by zero or statistical arithmetic for that call. The next sample shall start at the refreshed boundary, so an interval with no iterations shall not be attributed to subsequent work. All calls shall satisfy 🔗 1. Optional profiler selection and instrumentation protocol.

    RATIONALE:

    Per-iteration time is defined only for a positive iteration count. A zero count adds zero computational weight but must still separate timing intervals.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      static void begin();
      void end(unsigned int factor = 1);
    };
    
    VERIFICATION_CRITERIA:

    Use a controlled clock to check direct and borrowed-nanosecond differences, multiple seconds, modular weight wrap, positive counts and default count one. Check zero-count calls before and after samples, their clock refresh, unchanged output/weight, and absence of FE_DIVBYZERO and FE_INVALID. Check that a later positive sample excludes the zero-count interval.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 3. Profiler sample classification and weighted statistics UID: PPL-SPEC-001600 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall capture the source location, delta and timing thresholds, and initialize both the valid and discarded statistical classes to zero. It shall leave the shared timing boundary and computational weight unchanged. For each positive-count sample from 🔗 2. Profiler clock boundaries and zero-iteration weight accounting, let x = e ⁄ n. The sample shall be discarded exactly when x < m or (M > 0 ∧ x > M), where m and M are the minimum and maximum thresholds. Equality with either active threshold shall be valid; a nonpositive maximum threshold shall disable the upper test.

    In the selected class, the sample count shall increase by one and the iteration count N by n. The elapsed-time sum S shall increase by e, and the weighted square sum Q by ex. The first sample shall set both extrema to x; later samples shall retain the minimum and maximum per-iteration values. The other class shall remain unchanged. Classification shall not suppress the computational-weight increment. Statistics shall use double arithmetic with its rounding. The output mean shall be S ⁄ N, and valid-sample population variance Q ⁄ N − (S ⁄ N)2, the iteration-weighted statistics. Floating rounding can make the computed variance negative; no exact-time or nonnegative rounded variance guarantee shall be imposed. 🔗 1. Optional profiler selection and instrumentation protocol shall apply.

    RATIONALE:

    Samples can contain different iteration counts. Weighting the first and second moments by iterations preserves their mathematical interpretation; thresholds separate admitted and discarded timing observations.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      Weight_Profiler(const char* file, int line,
                      Weightwatch_Traits::Delta delta,
                      double min_threshold = 0, double max_threshold = 0);
      void end(unsigned int factor = 1);
    };
    
    VERIFICATION_CRITERIA:

    Check independent weighted sums and moments, initial/extreme/interior samples, both threshold equalities, lower and upper rejection, a disabled upper bound, and valid-only/discarded-only/mixed classes. Verify that discarded observations still add weight, and that zero-count calls preserve an existing report. Check finite exactly representable timing fixtures; inspect rounding limits.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 4. Profiler reports, lifetime output and startup calibration UID: PPL-SPEC-001601 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    output_stats() shall write to std::cout without clearing the stored statistics. Its prefix shall identify the borrowed file and line followed by Weight_Profiler. An unvisited point shall report never reached.. A nonempty valid class shall report samples, iterations, per-iteration extrema, mean, variance and square root of variance. A nonempty discarded class shall report thresholds, samples, iterations, extrema and mean. Both classes shall be reported when nonempty, valid first, with a terminating flushed newline. Numerical formatting shall follow the stream's current state. Stream failures shall follow standard stream behavior; destruction shall call this output operation subject to ordinary nonthrowing-destructor rules.

    Automatic initialization in the selected configuration shall set the shared adjustment to tune_adjustment()'s return value. That internal calibration shall begin a shared interval, set the adjustment to zero, and perform 1000 one-iteration measurements at a function-static point with zero delta and zero thresholds. It shall return that point's stored valid minimum. Its statistics shall remain available for the point's destruction report. Calibration shall not change the computational weight. Direct subsequent calls shall again zero the adjustment, append 1000 measurements to that same point, and return its retained minimum; they shall not install the returned adjustment themselves. Calls shall satisfy 🔗 1. Optional profiler selection and instrumentation protocol.

    RATIONALE:

    Per-point output supplies the observations used to assess computational weights. Startup calibration estimates the measurement infrastructure cost without charging it as algorithmic weight.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      void output_stats();
      ~Weight_Profiler();
      static double tune_adjustment();
    };
    
    VERIFICATION_CRITERIA:

    Check exact report fields against independently calculated values and check unvisited, valid-only, discarded-only and mixed output. Check repeatable output without reset, borrowed label identity, destructor reporting and newline flush. Use a constant-step clock to check the 1001 startup clock reads, zero calibration weight, adjustment subtraction, and the retained calibration report. Inspect stream exception and destructor behavior and exercise explicit recalibration.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 1. Computational-weight value and current-state binding UID: PPL-SPEC-000863 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Weightwatch_Traits::Threshold and Delta shall denote unsigned long long. The computational-weight counter shall initially be zero and get() shall return a const reference to its current counter, without copying or allocating. The returned reference shall observe later admitted serial updates. In a thread-safe configuration, that counter/reference shall belong to the calling thread and shall not be used after that thread exits or from another thread. The checking slot shall initially be null and retain the watcher-owned protocol in 🔗 6. Published checking function and empty-queue transitions. In a thread-safe build the counter, checking slot and Threshold_Watcher<Weightwatch_Traits> queue shall all belong to the calling thread. Each watcher and its borrowed notification bindings shall be used and destroyed in that thread before it exits. Other threads may independently compute, register, cancel and dispatch their own budgets.

    In a thread-safe build, the checking slot shall be a function-pointer proxy: assignment, conversion to void (*)(), invocation and independent copied snapshots shall retain their ordinary meanings. Assigning a local snapshot shall not change the live slot. A live-slot assignment shall not alter another thread's hook or the signal-notification gate. Direct field-address/type-trait compatibility with former raw/shared fields is not required; clients shall be rebuilt with matching library headers. Library and clients shall agree on the bool/function-pointer atomic capability selection; a compatible C++ ABI alone shall not permit mixing dispatcher modes. Clients shall not overwrite their checker while its queue contains events.

    At an owner checkpoint that selects pending atomic-watchdog work, that work shall be published before checking computational thresholds. A notification arriving after the checkpoint's dispatch snapshot may be processed at the next checkpoint. With always-lock-free notification and function-pointer atomics, unexpired timers shall not install an extra checkpoint callback. Otherwise, ordinary owner code shall use a deferred per-thread hook; the signal action shall not access thread-local objects or call a potentially locking atomic operation.

    RATIONALE:

    The budget counter, pending events and checking hook must have the same owner; independent thread budgets must not alter or dispatch one another.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    struct Weightwatch_Traits {
      using Threshold = unsigned long long;
      using Delta = unsigned long long;
      static constexpr bool thread_local_queue = true;
      static const Threshold& get();
      static Threshold weight; // Thread-local in a thread-safe build.
    #ifdef PPL_THREAD_SAFE
      static Implementation::Watchdog::Checkpoint_Hook check_function; // Thread-local.
    #else // !defined(PPL_THREAD_SAFE)
      static void (*check_function)();
    #endif // !defined(PPL_THREAD_SAFE)
    };
    
    VERIFICATION_CRITERIA:

    Check configured slot types, reference identity, serial updates and copied hook snapshots; inspect initial/thread-local declarations and per-queue ownership. Check simultaneous thread budgets and cancellation without serializing independent PPL work. Exercise both admitted function-pointer dispatch and a coherently rebuilt deferred fallback, including cancellation, wrong-thread checkpoints and real timer delivery.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/atomicwatchdogspec1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000864
    2. Exact scaled-weight conversion and representability UID: PPL-SPEC-000864 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    compute_delta(u, s) shall return the exact integer u2s when that result is representable in Delta. For u == 0 it shall return zero for every unsigned scale. For nonzero u, an excessive shift or a scaled result larger than Delta's maximum shall throw std::invalid_argument rather than wrap. The function shall not change the current counter or checking slot. Returning a zero delta shall not imply that an already reached watcher threshold is admissible under 🔗 4. Threshold conversion and already-reached rejection.

    RATIONALE:

    Scaling must distinguish exact increments from an unrepresentable user request independently of watcher registration.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static Delta compute_delta(unsigned long unscaled, unsigned scale);
    
    VERIFICATION_CRITERIA:

    Compare against arbitrary-precision shifts over zero, all bit boundaries and maximum inputs; reject each excessive nonzero scale and overflow and preserve backend state.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000865
    3. Absolute threshold formation and modular aliases UID: PPL-SPEC-000865 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    from_delta(out, d) shall assign the unsigned modular sum of the current weight and the supplied delta to out. It shall admit out aliasing the delta object or the current counter and evaluate the sum from their values before assignment. It shall neither register an event nor invoke a notification. This arithmetic conversion shall not itself validate whether the result is future under 🔗 4. Strict circular ordering of computational weights; watcher construction shall perform that check under 🔗 4. Threshold conversion and already-reached rejection.

    RATIONALE:

    Threshold formation uses defined unsigned wraparound and must retain legitimate input/output aliases.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static void from_delta(Threshold& threshold, const Delta& delta);
    
    VERIFICATION_CRITERIA:

    Compare ordinary and wrapping sums against exact-integer modular arithmetic; cover independent output, output/delta alias, output/current alias and all-three aliases without dispatch.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000866
    4. Strict circular ordering of computational weights UID: PPL-SPEC-000866 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Let N be the number of value bits in Threshold and let d be the unsigned modular difference of b and a, in [0, 2N). less_than(a, b) shall return true exactly when 0 < d < 2N − 1. Equal weights shall compare false; values separated by exactly a half-range shall not acquire an arbitrary orientation. An admitted queue/check history shall keep its current and pending thresholds within a common circular interval shorter than a half-range so that this comparison gives the coherent strict ordering required by 🔗 1. Generic threshold-watcher traits and admitted value protocol. The function shall not allocate, notify or change its operands/backend state.

    RATIONALE:

    A modular counter needs a strict unambiguous local order, including equality, to support duplicate deadlines and exact-threshold dispatch.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static bool less_than(const Threshold& a, const Threshold& b);
    
    VERIFICATION_CRITERIA:

    Compare equal, unequal, wrapping and half-range boundaries against an independent modular-distance oracle; verify duplicate future deadlines, zero-delta rejection and exact-deadline dispatch through the generic watcher.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 5. Computational-weight instrumentation outside profiling mode UID: PPL-SPEC-000867 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    In the normal computational-weight configuration (PPL_PROFILE_ADD_WEIGHT == 0), WEIGHT_BEGIN() shall not change the counter. Outside the assertion suppression of 🔗 6. Assertion-scope instrumentation suppression, WEIGHT_ADD(d) shall add the value of its supplied expression and WEIGHT_ADD_MUL(d, f) shall add the product of the values of both supplied expressions. Each supplied expression shall be evaluated once; the caller shall supply arithmetic expressions with defined evaluation, conversion and multiplication. Accumulation shall retain unsigned modular arithmetic and shall not itself dispatch pending notifications. The same admitted expressions shall have the same mathematical effect in assertion and nonassertion builds.

    An explicitly enabled release-build Weight_Profiler configuration shall follow 🔗 1. Optional profiler selection and instrumentation protocol through 🔗 4. Profiler reports, lifetime output and startup calibration.

    RATIONALE:

    The counter must reflect instrumented arithmetic independently of ordinary build diagnostics, while the optional profiler has a separate role.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    WEIGHT_BEGIN();
    WEIGHT_ADD(delta);
    WEIGHT_ADD_MUL(delta, factor);
    
    VERIFICATION_CRITERIA:

    Check direct and product increments against modular integer arithmetic, compound expressions, argument evaluation counts, wrapping boundaries, no implicit dispatch and assertion suppression in both build modes.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc; tests/MIP_Problem/mipproblem2.cc.

  • 6. Assertion-scope instrumentation suppression UID: PPL-SPEC-000868 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    In builds without NDEBUG, In_Assert shall maintain a nesting count in the calling thread (or the sole configured global context). Its construction shall enter assertion evaluation and destruction shall leave it. asserting() shall be true exactly while that count is nonzero. Balanced nested scopes, including exception unwinding, shall restore the previous state. During such a scope, computational-weight increment macros shall neither increment the counter nor evaluate their increment expressions, and maybe_abandon() shall return without checking thresholds or caller-owned requests. Clients shall retain properly nested, noncopied guard lifetimes. In_Assert shall not be required to exist in builds with NDEBUG.

    RATIONALE:

    Diagnostic assertions must not add computational work or trigger cooperative interruption themselves.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    #ifndef NDEBUG
    class In_Assert {
    public:
      In_Assert();
      ~In_Assert();
      static bool asserting();
    };
    #endif
    
    VERIFICATION_CRITERIA:

    Check nested scopes, suppressed expression side effects, held callbacks/requests and restoration after normal exit and exception unwinding; inspect configured thread-local storage.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 7. Caller-owned abandonment request and exception object UID: PPL-SPEC-000869 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Throwable shall provide a const virtual throw_me() action and virtual destruction. abandon_expensive_computations shall initially be null and shall retain a borrowed pointer to a caller-owned live Throwable. The client shall keep the request object alive through all admitted reads/actions, publish it under the configured synchronization and execution-context rules, and clear/replace the slot before ending that lifetime. The library shall not own/delete the object or clear a request after invoking it. In a thread-safe configuration the request slot shall be thread-local and atomic; the ordinary configuration shall use its declared volatile pointer protocol. Cross-thread publication shall target the intended live slot under the caller's synchronization; thread-local storage shall not turn a write to another thread's own slot into a request for the computing thread.

    RATIONALE:

    Cooperative interruption borrows a client-supplied exception mechanism with explicit persistence and lifetime ownership.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    class Throwable {
    public:
      virtual void throw_me() const = 0;
      virtual ~Throwable();
    };
    extern abandon_type abandon_expensive_computations;
    
    VERIFICATION_CRITERIA:

    Check derived const dispatch, virtual destruction, retained object lifetime and request identity through normal-returning and throwing actions; inspect atomic/thread-local versus volatile declarations.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 8. Cooperative abandonment checkpoint ordering and propagation UID: PPL-SPEC-000870 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Outside 🔗 6. Assertion-scope instrumentation suppression, maybe_abandon() shall first invoke the nonnull computational-weight checking hook. If that action returns, it shall select the current registration-scoped request in a thread-safe build 🔗 5. Interruptible thread registration and request lifetime, if one is present, or read the current caller-owned abandonment slot. It shall invoke the selected nonnull object's const throw_me() action. The read shall observe admitted serial request changes made by the hook. A throwing hook shall propagate its exception and prevent the later action for that invocation. A throwing request action shall likewise propagate. Neither path shall clear a request, undo callback effects or take ownership of its object. A null hook/request shall be skipped. The checkpoint shall not promise a fixed elapsed-time interruption bound.

    RATIONALE:

    Threshold handling precedes the current client request, and interruption effects must remain visible for retry or explicit cancellation.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    void maybe_abandon();
    
    VERIFICATION_CRITERIA:

    Use exact event logs for null/present hook/request combinations, hook publication/clearing of requests, normal/throwing actions, persistent requests and assertion suppression; verify propagated exception identity and action order.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/make_threadable.cc; tests/Polyhedron/threadsafe2.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc; tests/MIP_Problem/mipproblem2.cc.

5. Watchdog scheduling and cancellation scope UID: PPL-LLR-000135 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis RELATIONS (Parent): RELATIONS (Child): STATEMENT:

Where watchdog support is available, the runtime shall accept supported positive timer durations, schedule notifications, and allow cancellation of pending notifications under the documented timer, signal, and thread-ownership restrictions. Failed construction shall not leave a pending event or invalidate existing watchdogs. Unsupported watchdog facilities and invalid durations shall be reported through the documented failure mechanism. Watchdog use shall not imply a hard elapsed-time deadline or a guarantee beyond the documented timer-state failure behavior.

RATIONALE:

Operating-system timer resolution, signal delivery, masked intervals, and scheduling failures constrain the guarantees that a watchdog can provide.

COMMENT:

Verification covers native watchdog availability, duration validation, scheduling, cancellation, construction cleanup and documented timer-failure behavior. Timer fault injection and signal/queue analysis verify those contracts. Platform resolution, signal delays, callback restrictions and documented process-termination paths remain material limits. Binding support is decided separately under 🔗 4. Binding interruption support and state changes; a thread-safe build does not remove the native watchdog's single-owner signal discipline.

VERIFICATION_CRITERIA:

Test positive, zero, negative, and large durations; simultaneous pending events; cancellation; and construction failures. Use controlled timer-system-call failures to verify queue consistency and handler release. Review stale-notification fallback behavior, callback restrictions, and signal-mask restoration without imposing a hard response-time limit.

SOURCE:

src/Watchdog_defs.hh: duration validation, unsupported configurations, construction cleanup, signal ownership, cancellation, and explicit timing limitations. src/Watchdog.cc and src/Watchdog_inlines.hh: timer queue and platform behavior. tests/Watchdog/watchdog1.cc and tests/Watchdog/watchdog2.cc: scheduling and cancellation checks.

  • PPL-SPEC-001552
    5. C signal timeout lifecycle UID: PPL-SPEC-001552 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Supported signal-timeout requests shall arm the native watchdog for the positive centisecond duration under its thread/signal ownership prerequisites. Replacing a timeout shall cancel the preceding signal timeout before admitting and arming its replacement; failure after cancellation shall not restore the old one. Reset shall release the C-owned signal watchdog and its binding-owned notification state. A delivered signal interruption shall report the timeout category and release that signal timeout before notification. Thread-safe C configurations shall reject the unsupported request without arming it. C library finalization shall release any remaining C-owned signal watchdog before native watchdog finalization.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    A C-owned timer must have a finite lifetime and a distinct interruption outcome.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_timeout(unsigned csecs);
    int ppl_reset_timeout(void);
    
    VERIFICATION_CRITERIA:

    Check supported/unsupported requests, invalid and excessive durations, replacement/reset effects, timeout translation and finalization with an armed timer.

    SOURCE:

    interfaces/C/ppl_c_header.h; interfaces/C/ppl_c_implementation_common.cc; interfaces/C/tests/watchdog1.c; interfaces/C/tests/cerrorsspec1.cc.

  • PPL-SPEC-000815
    1. Polymorphic event-action interface and virtual destruction UID: PPL-SPEC-000815 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler shall be an abstract interface with const action dispatch and virtual destruction. Calling act() through a live base reference shall dispatch to the selected derived handler. Deleting an owned derived handler through a base pointer shall run its derived destruction and release its wrapper exactly once. A borrowed handler shall not become owned merely by being passed to a pending event.

    Construction, dispatch and destruction shall require the selected external callback/flag objects and synchronization to remain valid. These wrappers shall not themselves require global PPL initialization or timer availability. A caller invoking actions in a signal handler or shared threshold-watcher context shall retain that surrounding interface's operation and thread/signal restrictions.

    RATIONALE:

    Notification storage relies on const polymorphic dispatch and deletion through its abstract action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler {
    public:
      virtual void act() const = 0;
      virtual ~Handler();
    };
    
    VERIFICATION_CRITERIA:

    Check base-reference action dispatch and derived destruction with owned wrappers, and preserve borrowed external objects across wrapper destruction.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 2. Flag-handler binding and binding-preserving copies UID: PPL-SPEC-000816 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Flag construction shall bind the supplied holder reference and flag object without invoking a priority query, installing the flag or taking ownership of either external object. Copy construction and rvalue construction shall preserve those same bindings; later actions shall observe the holder's current value rather than a pointer-value snapshot made during construction. Ordinary assignment of this reference-binding wrapper shall not be supported.

    The holder shall be a live volatile pointer to const Flag_Base and Flag* shall convert to Flag_Base*. For a nonnull holder, the existing pointee shall belong to the compatible Flag object family, so the implementation's declared base-to-flag cast is well formed and valid. The flag/holder and any nonnull pointee shall outlive their actual access. Wrapper destruction shall not delete or alter them.

    RATIONALE:

    A retained holder reference must follow later client updates, and priority comparison requires a valid concrete flag object behind the base pointer.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    template <typename Flag_Base, typename Flag> class Handler_Flag;
    Handler_Flag(const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check copied/rvalue wrappers, changed holder values after construction, compatible multiple-base pointer adjustment, construction without priority queries and unchanged borrowed-object lifetimes.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 3. Strict-priority flag installation UID: PPL-SPEC-000817 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On act(), a null bound holder shall be set to the bound flag address without querying flag priorities. For a nonnull valid holder, the action shall install the bound flag exactly when the existing flag's observed priority is strictly lower than the bound flag's observed priority. Equal or higher existing priority shall preserve the existing pointer. Priority queries shall supply comparable values consistent with that call's decision; they shall not themselves rebind the holder. External priority changes between calls shall be observed by later actions.

    The operation shall not own/delete flags or allocate a wrapper. If a priority query reports an exception, it shall propagate through ordinary C++ dispatch without an assignment by the handler to the holder; any side effects of the query itself shall remain its own contract.

    RATIONALE:

    Competing abandonment requests need the highest observed priority and a definite equal-priority retention rule.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Flag<Flag_Base, Flag>::act() const;
    
    VERIFICATION_CRITERIA:

    Check null holders, every smaller/equal/larger signed priority pair, dynamic priority changes, compatible base pointers and priority exceptions with unchanged holder identity.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 4. Function-handler target binding and copies UID: PPL-SPEC-000818 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Function construction shall store the supplied function pointer without invoking it. Copy and rvalue construction shall retain the same target. Ordinary assignment shall not be supported. A null pointer may be stored and destroyed without invocation, but shall not be an admitted action target. The callable code shall remain valid at invocation. Construction/copy/destruction shall not call or own the function or allocate auxiliary callback state.

    RATIONALE:

    A function wrapper owns its pointer binding while the callable code and its external state remain the caller's responsibility.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler_Function;
    Handler_Function(void (*function)());
    
    VERIFICATION_CRITERIA:

    Check zero callback calls during construction/copy/destruction, copied target identity by later dispatch, null-bound noninvoked wrappers and nonassignability.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 5. Function action dispatch and callback failure UID: PPL-SPEC-000819 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With a live nonnull target, Handler_Function::act() shall call the stored function exactly once per invocation and return normally exactly when that call returns normally. A callback exception shall propagate with its identity and previously performed callback effects; no rollback of arbitrary callback state shall be required. The wrapper shall remain bound to the same target and permit a later admitted call. No invocation shall silently replace the callback with another target or delete its external state.

    RATIONALE:

    Ordinary callback completion and callback failure must remain observable through the const action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Function::act() const;
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks, a callback that records an effect then throws a unique exception, repeated const/base dispatch and successful retry.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 1. Threshold-ordered pending events and caller prerequisites UID: PPL-SPEC-000801 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_List<Traits> shall own a sequence of active event nodes and a separate pool of reusable inactive nodes. Each active event shall contain an owned threshold value and borrowed handler/expired-flag bindings. Traits::less_than shall define a stable strict weak order on admitted threshold values. Threshold copy construction, assignment, destruction and that comparison shall not throw; selected threshold operations shall satisfy their own validity and resource prerequisites.

    Clients shall synchronize access and retain the noncopying owning-list conditions of 🔗 5. Empty owning-list construction and remaining-node destruction. Active node positions shall belong to one list and remain valid only until their event is erased or their owner destroyed. Handlers and flags shall remain alive while their event is active or a borrowed reference is accessed. Inactive pooled nodes may retain old pointer values without accessing those external objects; their old external bindings need not outlive the pool. The queue shall not require global PPL initialization beyond the selected threshold's own needs. Any enclosing watcher interface shall retain its additional thread/signal restrictions.

    RATIONALE:

    Queue ownership, threshold ordering and external notification-object lifetimes have distinct scopes, especially after cancellation recycles a node.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    template <typename Traits> class Pending_List;
    template <typename Threshold> class Pending_Element;
    
    VERIFICATION_CRITERIA:

    Compare independent ordered event models, separate owners, borrowed identities and pool lifetimes with nonthrowing threshold fixtures and no library initialization.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000802
    2. Pending-element construction and embedded-link lifetime UID: PPL-SPEC-000802 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_Element construction shall copy the supplied threshold and bind the supplied handler and flag by reference identity. It shall not invoke the handler, modify the flag or retain a reference to the caller's threshold object. The selected threshold shall satisfy 🔗 1. Threshold-ordered pending events and caller prerequisites.

    The newly constructed element's inherited links shall require binding into a valid ring before traversal, unlinking or destruction, retaining 🔗 2. Embedded-node construction and link initialization. Queue insertion shall establish that binding before exposing the element. A directly constructed element shall be attached by its caller before destruction; completed linked-element destruction shall retain the nonthrowing threshold lifetime and embedded- node contract.

    RATIONALE:

    Attribute construction alone does not initialize the inherited embedded-node links.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_Element(const Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Construct directly into an owning embedded list with a nondefault-constructible threshold; verify the independent threshold copy, borrowed identities, no notification and completed-node destruction.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000803
    3. Element attribute reassignment without relinking UID: PPL-SPEC-000803 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    assign shall replace the owned threshold value and borrowed handler/ flag bindings with the supplied attributes, preserving the element's existing link position. It shall not allocate an event node, invoke a handler or reset either flag. The supplied threshold may alias this element's current threshold; self-value assignment shall retain its meaning. Callers reassigning active elements shall preserve the pending list's ordering before using its ordinary operations. Pooled elements shall be rebound before exposure as new active events.

    RATIONALE:

    Pool reuse requires replacing every event attribute without changing the detached node ownership protocol.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    void assign(const Threshold& deadline, const Handler& handler,
                bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Check every old/new handler/flag pairing, self-borrowed deadline assignment, unchanged node links and no handler/flag side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000804
    4. Threshold, handler and expired-flag reference access UID: PPL-SPEC-000804 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    deadline() shall return a const reference to the owned threshold; handler() shall return a const reference to the bound handler; expired_flag() shall return a mutable reference to the bound Boolean even through a const element wrapper. Access shall preserve all attributes and links. A reference to the threshold shall require the node and threshold object to remain alive, and shall observe any later admitted reassignment. Handler/flag references shall retain the external object's lifetime independently of the element wrapper. Invoking or modifying a returned external object shall be a caller action, not an automatic queue notification.

    RATIONALE:

    Event access must preserve actual external identities and distinguish reference access from notification scheduling.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    const Threshold& deadline() const;
    const Handler& handler() const;
    bool& expired_flag() const;
    
    VERIFICATION_CRITERIA:

    Check exact types/addresses through const and mutable wrappers, independently copied thresholds, explicit caller notification and direct flag mutation.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000805
    5. Pending-element attribute checker scope UID: PPL-SPEC-000805 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted completed element, OK() shall return true without modifying attributes or links. It shall not validate threshold positivity, current-time expiry, external handler policy or list sorting. Its use shall not dereference a handler or flag merely to validate their stored pointer values. This element checker shall not establish the inherited ring's structural validity or make a stale active-event position usable.

    RATIONALE:

    The element checker supplies an embedded-list hook while deadline validity and ownership remain caller/queue obligations.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check live elements before/after attribute replacement and inactive pooled nodes with expired external lifetimes, without accessing stale external bindings.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000806
    6. Queue construction and complete active/free ownership cleanup UID: PPL-SPEC-000806 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall create a valid empty active sequence and empty free pool. Destruction shall release every owned active and pooled node and its threshold exactly once. It shall not delete borrowed handlers or flags, invoke notification actions or change external expired flags. Independent queue owners shall have independent nodes and lifetimes. No supported owner copy/assignment shall be required under 🔗 1. Threshold-ordered pending events and caller prerequisites.

    RATIONALE:

    Both active and recycled nodes remain queue-owned, while notification objects remain externally owned.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_List();
    ~Pending_List();
    
    VERIFICATION_CRITERIA:

    Count threshold construction/destruction across mixed active/free owners, empty owners and separate queues; verify no external handler destruction or notification.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000807
    7. Sorted insertion and equivalent-deadline multiplicity UID: PPL-SPEC-000807 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful insertion shall add exactly one active event with the supplied attributes and return its live position. Traversing the active sequence shall produce nondecreasing threshold order under the supplied strict weak comparison. Every previously active event shall remain with its prior threshold, handler, flag and node identity. Distinct events with equivalent thresholds shall all remain present; their relative order shall not be required by this interface. Insertion shall not act on handlers or modify external flags. Threshold values need not be positive or related to a clock merely to use this internal queue.

    RATIONALE:

    Ordered pending storage supports both timer and computational-weight clients without imposing one client's duration validation on the generic container.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Compare all small insertion permutations, descending histories, duplicate/equivalent thresholds, zero thresholds and exact event identities with an independent ordered model.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000808
    8. Insertion with borrowed active attributes UID: PPL-SPEC-000808 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An insertion's threshold argument may borrow the threshold of an already active element; insertion shall preserve that source and copy its value into the new event. Handlers and flags may be shared among several active events. Their reference identities and preexisting flag values shall remain unchanged by insertion. These aliases shall not permit reuse of erased positions as active-event sources or destruction of external objects still referenced by active events.

    RATIONALE:

    Watchdog records may share external notification state or use an existing active threshold without transferring its ownership.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Insert from each active threshold reference into fresh and recycled nodes, share handler/flag objects and verify all source values and bindings survive.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 9. Active-event erasure and successor preservation UID: PPL-SPEC-000809 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasure shall require a live active position belonging to this queue. It shall remove exactly that event from the active sequence, preserve every other event and its ordering/identity, and return the removed event's next active position or this queue's end. It shall retain the removed node in the reusable pool without destroying its threshold, notifying its handler or changing its flag. The removed position shall cease to denote an active event even while the underlying node remains allocated. Erasure shall not allocate.

    RATIONALE:

    Cancellation removes a logical event while retaining node storage for later low-allocation use.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Erase every possible active position, singleton and repeated front/back histories; check exact successor, unchanged surviving identities and attributes, no allocation or notification and retained threshold lifetimes.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000810
    10. Recycled-node insertion and allocation-free reuse UID: PPL-SPEC-000810 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When inactive nodes are available, insertion shall reuse one of them rather than allocate a new node. It shall replace every event attribute before linking the reused node into the sorted active sequence. The old external handler/flag bindings shall not be accessed during reuse. No particular selection order among available free nodes shall be required. Without an inactive node, insertion shall allocate a new properly aligned event node. Threshold operation costs shall remain those of the admitted nonthrowing threshold type.

    RATIONALE:

    Recycling reduces later event-node allocation while requiring complete replacement of old notification bindings.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Exhaust and replenish pools, disable allocation during reuse, check reused node-address membership and over-alignment, and replace bindings whose former external objects have been destroyed.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000811
    11. Active-event iterator ranges and borrowed traversal UID: PPL-SPEC-000811 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    iterator and const_iterator shall retain the corresponding embedded-list iterator types and 🔗 7. Embedded-list iterator borrowing and valid linked positions, 🔗 8. Embedded-list position binding and lifetime, 🔗 9. Embedded-list typed element access, 🔗 10. Embedded-list bidirectional traversal and 🔗 11. Embedded-list position equality. The public nonconst begin/end members shall bound exactly the active sequence; free nodes shall never appear in that range. End shall be comparable and support retreat when nonempty, but not dereference. Positions shall preserve node identity under other event insertion/erasure, subject to 🔗 1. Threshold-ordered pending events and caller prerequisites. Clients shall not change embedded links or break active threshold ordering through the borrowed element access.

    RATIONALE:

    Only active events participate in scheduling traversal; cached storage and borrowed-node access must not extend event validity.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    using iterator = typename EList<Pending_Element<typename Traits::Threshold>>::iterator;
    using const_iterator = typename EList<Pending_Element<typename Traits::Threshold>>::const_iterator;
    iterator begin();
    iterator end();
    
    VERIFICATION_CRITERIA:

    Compare forward/backward prefix/postfix histories, separate cursor copies and exact event addresses before/after unrelated insertions and erasures; verify free nodes are excluded.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000812
    12. Active emptiness independent of retained pool storage UID: PPL-SPEC-000812 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    empty() shall return true exactly when no active events remain. An empty active sequence shall have equal begin/end positions even if inactive node storage is retained. Emptiness shall not imply that all allocated event nodes have been released. The query shall not notify handlers, modify flags or change the active/free node ownership.

    RATIONALE:

    Logical pending-event emptiness and physical pool emptiness are different resource states.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool empty() const;
    
    VERIFICATION_CRITERIA:

    Check construction, every erase-to-empty history, retained threshold/node counts and subsequent allocation-free insertion.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000813
    13. Queue node checks and threshold-order validation UID: PPL-SPEC-000813 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For safely inspectable active/free rings, OK() shall require both embedded lists' element checks and nondecreasing active threshold order. An empty active list shall pass when its active/free node checks pass. Free nodes shall not require threshold sorting. Checking shall not invoke handlers, dereference expired external bindings, modify flags or change ownership. Corrupted embedded links shall remain outside the checker domain; this operation shall not provide memory-safe diagnosis of arbitrary ownership corruption. Clients may check and repair a threshold-order violation before resuming ordinary queue operations.

    RATIONALE:

    Queue consistency adds threshold order to the embedded-node hooks without validating canceled notification objects or arbitrary corrupted memory.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/sorted states, every adjacent valid-ring order violation and repaired order, unsorted free-node histories and absence of external notification side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000814
    14. Insertion-allocation failure preservation and retry UID: PPL-SPEC-000814 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the nonthrowing threshold and comparison prerequisites of 🔗 1. Threshold-ordered pending events and caller prerequisites, a reported event-node allocation failure shall leave the active sequence, free pool, all existing event attributes, handler bindings and flag values unchanged. No incomplete event node shall remain owned or linked. The same queue shall permit a later successful insertion and ordinary erasure. Erasure and insertion using an available pooled node shall not require an event-node allocation. These guarantees shall not promise recovery from violated threshold or linking preconditions.

    RATIONALE:

    Allocation occurs before an otherwise nonthrowing insertion can commit a new active event.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Fail the observed new-node allocation for empty and populated owners, verify complete event/address/flag/resource preservation, retry insertion and then exercise allocation-disabled pool reuse.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 1. Normalized nonnegative microsecond interval values UID: PPL-SPEC-000821 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Time shall represent an exact nonnegative integral number of microseconds, with maximum value 106  LONG_MAX + 999999. A valid completed value shall have whole seconds in [0,  LONG_MAX] and a residual microsecond count in [0, 999999]. This raw value interface shall be available independently of operating-system watchdog-timer support and shall not require PPL initialization or floating-point state.

    Constructor inputs shall satisfy their stated nonnegative argument preconditions. Concurrent access shall retain ordinary C++ object synchronization requirements. An interval value shall not itself promise elapsed-time measurement, timer resolution or notification scheduling.

    RATIONALE:

    Raw watchdog duration arithmetic needs an exact normalized value domain independent of operating-system timer behavior.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    class Time;
    
    VERIFICATION_CRITERIA:

    Use independent arbitrary-precision total-microsecond oracles for zero, carry boundaries and the largest representable pair without initializing the PPL.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000822
    2. Zero and centisecond construction UID: PPL-SPEC-000822 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall produce the zero interval. Construction from a nonnegative long centisecond count c shall produce exactly 10000c microseconds in normalized form. Every nonnegative long centisecond value, including LONG_MAX, shall be representable by this conversion. Construction shall retain the allocation-free value protocol of 🔗 9. Allocation-free value operations and fatal range policy.

    RATIONALE:

    User timer durations are expressed in centiseconds while internal normalized values use microseconds.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time();
    explicit Time(long centisecs);
    
    VERIFICATION_CRITERIA:

    Compare centisecond values around multiples of100, zero, signed-long upper neighbors and LONG_MAX against independent total-microsecond expectations.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000823
    3. Second/microsecond normalization and excessive results UID: PPL-SPEC-000823 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For nonnegative long arguments s and m, two-argument construction shall represent exactly 106s + m microseconds when that result is within 🔗 1. Normalized nonnegative microsecond interval values. Microseconds at or above one million shall be carried into whole seconds and reduced to a residual less than one million. If this nonnegative mathematical result exceeds the representable maximum, construction shall call std::abort under 🔗 9. Allocation-free value operations and fatal range policy, without signed arithmetic overflow or a constructed C++ exception.

    RATIONALE:

    Normalization must distinguish a valid carry from an unrepresentable duration before overflowing signed seconds.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time(long seconds, long microseconds);
    
    VERIFICATION_CRITERIA:

    Compare all selected second/microsecond boundary combinations with arbitrary-precision normalization, including LONG_MAX microseconds and the largest admitted carried value; monitor excessive results in an isolated process.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000824
    4. Independent value copies and assignment UID: PPL-SPEC-000824 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Copy construction and assignment shall preserve the exact interval value in independent scalar state. Rvalue construction/assignment shall retain the same value semantics, leaving the source value unchanged. Self-assignment shall preserve the interval. Assignment shall return the target object. No copy shall share owned duration state or require allocation, and ordinary destruction shall require no external resource cleanup.

    RATIONALE:

    Interval values are copied scalars rather than timer-resource owners.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time(const Time& y) = default;
    Time& operator=(const Time& y) = default;
    ~Time() = default;
    
    VERIFICATION_CRITERIA:

    Check normal/rvalue copies and assignments, self-assignment, source mutation and independent surviving values with allocation disabled.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000825
    5. Whole-second, residual-microsecond and validity queries UID: PPL-SPEC-000825 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid completed interval, seconds() shall return its whole second count and microseconds() its normalized residual, so their mathematical combination equals the exact value. OK() shall test the stored normalization conditions: nonnegative whole seconds and a residual in [0, 999999]. The queries shall preserve the value and require no allocation. They shall not provide a memory-safe validity check for arbitrary corrupted storage or remove constructor preconditions.

    RATIONALE:

    Normalized components and the invariant checker must agree on the represented duration.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    long seconds() const;
    long microseconds() const;
    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check both components and the checker for every constructed and computed boundary value; inspect the exact validity predicate without manufacturing invalid objects through prohibited constructor inputs.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000826
    6. Exact interval ordering and equality UID: PPL-SPEC-000826 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The six comparison operators shall compare exact total-microsecond values. Equality shall hold exactly for the same duration, regardless of which admitted normalization inputs produced it. Strict and nonstrict order shall have their ordinary mathematical meanings and inequality shall negate equality. Comparing valid values shall not change either operand, allocate or depend on the current clock.

    RATIONALE:

    Pending event order requires exact duration comparisons across whole-second and microsecond boundaries.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    bool operator==(const Time& x, const Time& y);
    // Inequality uses C++20 rewriting of operator==.
    bool operator<(const Time& x, const Time& y);
    bool operator<=(const Time& x, const Time& y);
    bool operator>(const Time& x, const Time& y);
    bool operator>=(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Check Boolean inequality expressions in both operand orders through C++20 equality rewriting, retaining the stated equality and mismatch behavior. Compare all ordered pairs of independently valued normalized intervals, alternate equal constructions and maximum boundaries with arbitrary-precision integer order.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000827
    7. Exact addition, aliasing and representability failure UID: PPL-SPEC-000827 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For valid operands with a representable sum, compound addition shall replace the target by their exact total-microsecond sum, normalized into seconds and residual microseconds, and return the target object. Adding an object to itself shall use its value on entry. Free addition shall produce the same exact value without changing either input.

    If the exact sum exceeds 🔗 1. Normalized nonnegative microsecond interval values, both forms shall call std::abort under 🔗 9. Allocation-free value operations and fatal range policy before signed arithmetic overflow, without constructing a C++ exception. A valid microsecond carry shall be included in that representability decision.

    RATIONALE:

    Normalized duration addition must account for both whole seconds and a possible carry at the representable limit.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time& operator+=(const Time& y);
    Time operator+(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Compare independent exact sums for all selected carry/no-carry operand pairs and self-aliasing, preserve free-operation inputs and isolate both excessive whole-second and carry-only failures.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000828
    8. Saturating nonnegative interval subtraction UID: PPL-SPEC-000828 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For valid operands, compound subtraction shall replace the target by max(0, x − y), using their exact values on entry, and return the target object. A needed microsecond borrow shall preserve that exact nonnegative result. Self-subtraction shall yield zero. Free subtraction shall return the same value without modifying either input. Subtraction shall remain within the normalized value domain and shall not allocate or signal an arithmetic-range failure for valid operands.

    RATIONALE:

    Timer differences saturate at zero rather than create negative durations.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time& operator-=(const Time& y);
    Time operator-(const Time& x, const Time& y);
    
    VERIFICATION_CRITERIA:

    Compare all selected operand pairs with independent max-zero differences, equal/self operands, whole-second ordering and microsecond-borrow boundaries.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • 9. Allocation-free value operations and fatal range policy UID: PPL-SPEC-000829 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Admitted Time construction, copying, queries, comparisons, addition and subtraction shall use no heap allocation, floating-point arithmetic, PPL initialization or operating-system timer operation. Unrepresentable normalization/addition shall report its fatal condition by calling std::abort; it shall not allocate or construct a C++ exception in an attempt to report that condition. No recovery or owned- resource cleanup after process termination shall be promised by this value interface. The caller shall retain any surrounding signal/thread context restrictions.

    RATIONALE:

    The value type is used by watchdog signal paths where exception allocation is not an admissible range-reporting mechanism.

    INTERFACE:

    Internal source header: Time_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Member excerpts apply to Time; copy/destruction excerpts describe implicitly generated operations.

    Time();
    explicit Time(long centisecs);
    Time(long seconds, long microseconds);
    Time& operator+=(const Time& y);
    Time& operator-=(const Time& y);
    
    VERIFICATION_CRITERIA:

    Disable allocation around all valid value operations and use isolated-process controls to distinguish synchronous abort from C++ exceptions or allocation attempts on the three excessive-result histories.

    SOURCE:

    src/Time_defs.hh; src/Time_inlines.hh; src/Time.cc; src/Watchdog.cc; tests/timespec1.cc; tests/timedeathlegacy1.cc; tests/timedeathlegacy1_time.cc.

  • PPL-SPEC-000871
    1. Watchdog platform availability and initialization prerequisites UID: PPL-SPEC-000871 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchdog timers shall be available when the configured platform provides the required setitimer, sigaction and pthread_sigmask operations. In that configuration, clients shall retain the library/class initialization and exclusive signal-ownership protocols of 🔗 11. Process timer ownership and signal-safe callbacks, 🔗 18. Class initialization and preceding signal action and 🔗 19. Class finalization and pending-notification cleanup. If any required operation is unavailable, all construction forms shall throw std::logic_error and shall neither publish a notification nor modify the supplied flag holder, regardless of the supplied duration. Construction may also report a resource failure while creating its exception object.

    RATIONALE:

    Availability must follow the configured timer/signal capabilities rather than imply that every supported library target has native timers.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Compile controlled configurations with each required capability unavailable; check both constructor forms over positive, zero and negative durations and unchanged notification objects.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000872
    2. Flag-form watchdog registration UID: PPL-SPEC-000872 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful volatile flag-form construction shall own one handler bound to the supplied holder/flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, register one pending event for its admitted duration, and leave those external notification objects borrowed. Registration shall neither install the flag nor query its priority as a notification. At expiration, priority selection shall use the then-current holder and flag. The flag's priority operation shall satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and compatible flag. Expiration shall only record a notification in non-thread-local handler storage. At a subsequent ordinary checkpoint in the constructing thread, release compare-and-exchange shall install the flag only when the holder is null. No existing request shall be dereferenced, replaced, or compared by priority. Among multiple eligible atomic watchdogs the most recently constructed binding shall be tried first. Selected pending atomic notifications shall precede computational-threshold checks, retaining the snapshot rule in 🔗 1. Computational-weight value and current-state binding. This publication need not use a lock-free borrowed holder because it takes place outside signal context.

    Construction, checkpoints and destruction shall use the single watchdog owner/signal-receiving thread. Holder and flag shall remain alive through destruction; a published flag shall additionally outlive its readers. Cancellation may discard an unconsumed notification and shall not clear an already published request. The caller shall cancel before clearing the holder or releasing its flag. A failed construction shall leave no notification binding or pending event behind.

    RATIONALE:

    Flag registration and later signal-context notification require separate ownership and execution rules.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, std::atomic<const Flag_Base*>& holder,
             Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check distinct flag handlers, unchanged registration-time state, serial priority changes, due notification, cancellation and constructor failures under a controlled timer.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000873
    3. Function-form watchdog registration UID: PPL-SPEC-000873 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful function-form construction shall own one handler retaining the supplied function under 🔗 4. Function-handler target binding and copies, register one pending event and not invoke that function merely to register it. A pending callback shall be nonnull, live and satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Dispatch shall invoke that bound function exactly once for its successfully completed event. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    RATIONALE:

    A one-shot notification must preserve callback identity without executing it during registration.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct function callbacks and a controlled timer to check registration, ordering, cancellation, exact callback counts and failed construction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000874
    4. Positive watchdog duration and exact nominal units UID: PPL-SPEC-000874 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When native timers are available, both construction forms shall accept a positive long duration in centiseconds and interpret its nominal value as c ⁄ 100 seconds. A zero or negative duration shall throw std::invalid_argument without registering an event; construction cleanup shall retain 🔗 8. Failed watchdog construction and surviving events. Large positive durations through LONG_MAX shall retain their full logical value under 🔗 7. Logical deadlines and bounded physical timer checkpoints, subject to supported resource or timer-system-call failures. Timer resolution, signal delivery and masked operations shall retain 🔗 11. Process timer ownership and signal-safe callbacks.

    RATIONALE:

    Duration validation and exact nominal units must not silently truncate large supported requests to a kernel checkpoint.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check zero and negative boundaries, centisecond normalization, one-day boundaries and huge positive durations against an independent controlled elapsed-time model.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000875
    5. Stable watcher and notification lifetimes UID: PPL-SPEC-000875 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    An available-platform watchdog shall not be default constructible, copy constructible, move constructible or assignable. Its stable live address shall retain its expiration state and event identity until destruction. Borrowed holder/flag/function objects shall remain valid whenever the event may notify. Clients shall not end a live watchdog's lifetime from its callback or concurrently with signal dispatch; the masking/exclusive-use protocol shall govern admitted cancellation.

    RATIONALE:

    Queue entries borrow watcher expiration state and external notification objects, so their lifetimes cannot be transferred implicitly.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check available-platform type traits, stable simultaneous event identities, distinct expired/unexpired destruction and admitted external binding lifetimes.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000876
    6. Ordered event multiplicity and existing-event preservation UID: PPL-SPEC-000876 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Each successful constructor shall add one distinct event to the shared queue. Equal logical deadlines shall retain all registered events; their relative callback order shall be unspecified. An earlier or later insertion shall preserve every other event's logical deadline and bound notification. Registration and cancellation shall not notify unrelated events merely because the queue or physical timer has changed.

    RATIONALE:

    Distinct watchers remain distinct even when their nominal deadlines coincide or the timer is replaced.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Interleave earlier/equal/later events and cancellation against an independent deadline-to-callback multiset, including previously active timers and multiple due events.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000877
    7. Logical deadlines and bounded physical timer checkpoints UID: PPL-SPEC-000877 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The first event shall establish a relative logical time base. Later registration shall account for elapsed time observed from the armed timer and retain the requested relative duration in its full logical deadline. Each nonzero physical timer request shall be at most one day (86400 seconds), using an intermediate checkpoint when a logical interval is longer. A checkpoint before a pending event's deadline shall not notify it; subsequent checkpoints shall preserve the remaining interval and other event deadlines. Bounded requests shall not imply that every kernel accepts them or guarantee exact elapsed deadlines across arbitrary signal-masked one-shot expiration periods.

    RATIONALE:

    A bounded kernel request must preserve a potentially much longer logical deadline and timer replacement history.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Compare one-day boundary, huge duration, earlier/equal/later insertion and retained/deferred chunk histories with exact controlled timer arithmetic.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 8. Failed watchdog construction and surviving events UID: PPL-SPEC-000878 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When construction reports a supported recoverable exception, it shall release its allocated handler and not leave the failed event pending. Previously live watchdogs shall remain usable with their logical notifications/deadlines preserved. This shall cover invalid duration, handler/node allocation failure, signal-block failure, timer-read failure, invalid successful timer read and timer-arm failure, including a failure while reporting another error. The constructor shall restore its internal critical-section state and caller signal mask before propagation, subject to the fatal restoration rule of 🔗 12. Signal-mask transactions and fatal restoration failures. Internal freed nodes may remain owned by the shared queue's reuse pool.

    RATIONALE:

    A failed constructor must release its own resources without disabling surviving timers or borrowing its unwound stack.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Inject every constructor allocation/system-call failure for both forms, compare existing events before/after and exercise exact later notifications with balanced handler ownership.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000879
    9. Nonthrowing destruction and ordinary cancellation UID: PPL-SPEC-000879 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ~Watchdog() shall not throw. It shall destroy its owned handler exactly once while its timer signal is blocked, before restoring the caller's signal mask. An unexpired watchdog shall remove its own event without notifying it; an expired watchdog shall not remove or notify another event. Cancellation of a nonleading or equal-deadline event shall preserve remaining deadlines; canceling the first event shall schedule the next one or stop the timer when no event remains. If a next deadline is already due, cancellation shall schedule a short nonzero checkpoint rather than dispatch a notification from the destructor. System-call failure and fatal masking outcomes shall retain 🔗 10. Cancellation failure and retained-checkpoint fallback and 🔗 12. Signal-mask transactions and fatal restoration failures.

    RATIONALE:

    Destruction owns cancellation and handler cleanup while notification remains a signal-dispatch operation.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check nonleading/equal/leading/last and already-expired cancellation, pending-signal races, unwinding and due-next-event rescheduling without destructor notification.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 10. Cancellation failure and retained-checkpoint fallback UID: PPL-SPEC-000880 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If cancellation cannot read a valid timer interval, rearm the next event or stop the last timer, it shall still erase the canceled event without propagating that system-call exception. The previous physical timer/bookkeeping shall remain as a checkpoint for remaining events; its later signal shall notify only events whose logical deadlines are due and schedule others for their remaining duration. A failed last-event stop may leave a physical notification, which shall not invoke a canceled handler. Later cancellation/insertion shall remain consistent with the retained checkpoint rather than assume it equals the first remaining event's deadline.

    RATIONALE:

    Nonthrowing cleanup needs a safe scheduling fallback even when a timer cannot be changed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Inject failed reads, invalid read intervals, failed rearm/stop and chained cancellation histories; compare remaining event times and assert canceled objects never notify.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 11. Process timer ownership and signal-safe callbacks UID: PPL-SPEC-000881 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The facility shall reserve ITIMER_PROF/SIGPROF, or ITIMER_REAL/SIGALRM on Cygwin, GNU Hurd and profiling builds. One thread shall own all watchdog operations and receive the selected signal; every other thread shall keep it blocked. These restrictions shall also apply to a thread-safe PPL build, and clients shall not independently replace/use the owned timer or signal while the facility owns them. Callbacks and priority queries of the function/volatile-flag forms shall use only operations valid in asynchronous signal context. The atomic-holder form shall instead record a non-TLS notification in signal context and defer holder publication to ordinary owner code. They shall not throw, construct/destroy watchdogs or reenter their queue. Signal resolution, delivery delays and arbitrary prolonged masked operations shall not imply a hard elapsed-time guarantee.

    RATIONALE:

    The native timer and asynchronous callback context remain process resources despite other thread-local library facilities.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Inspect platform timer/signal selection and documented ownership; use signal-safe counters/holders in controlled and native smoke cases and check exact signal-mask restoration.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 12. Signal-mask transactions and fatal restoration failures UID: PPL-SPEC-000882 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction and cancellation shall block the selected signal while updating shared queue/timer state and restore the caller's exact previous mask afterward, including unrelated blocked signals. Failure to block the signal shall propagate from construction with 🔗 8. Failed watchdog construction and surviving events. The same failure during noexcept cancellation, or any failure to restore the mask, shall invoke std::terminate rather than continue with unprotected state or a newly retained mask. Pending delivery released by mask restoration shall see a consistent published queue and timer state.

    RATIONALE:

    Shared timer transactions must remain protected through both ordinary updates and synchronous delivery on unblocking.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check originally blocked/unblocked and unrelated signals, delivery before/after transaction points, construction block failure and isolated-process fatal block/restore controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 13. Stale timer-notification suppression UID: PPL-SPEC-000883 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On timeout entry, if a successful timer-state read yields a valid nonzero remaining interval, the notification shall be treated as stale and shall return without advancing the logical clock or notifying a replacement event. If the read fails or is invalid, dispatch shall use the timeout fallback of 🔗 14. Due-event signal dispatch and successful one-shot expiration; this fallback shall not promise to preserve a still-armed replacement deadline when the signal was in fact stale. A valid zero interval shall be processed as an actual timeout. Replacing a timer shall not assume that a previously pending signal has been retracted.

    RATIONALE:

    A delayed notification must not consume a newer timer whenever its still-armed state can be established.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Check immediate/delayed/coalesced stale signals, valid zero/nonzero reads and failed/malformed snapshots without equating fallback behavior with guaranteed stale suppression.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000884
    14. Due-event signal dispatch and successful one-shot expiration UID: PPL-SPEC-000884 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An actual timeout outside an active timer transaction shall advance the logical clock by the accounted last requested span, inspect events in deadline order and invoke each event whose deadline is no later than that clock. After its signal-safe action returns, dispatch shall mark it expired and remove it. A future event shall remain pending and be scheduled for its remaining logical interval. When no event remains, the logical alarm shall become inactive. An empty-queue signal shall not invoke a handler. The errno and fatal rearm outcomes shall retain 🔗 16. Fatal signal-context timer-rearm failure and 🔗 20. Timeout and signal-mask errno preservation.

    RATIONALE:

    Successful signal delivery must distinguish due, future and already removed events with exact one-shot ownership.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use independent callback/deadline logs for multiple due events, equal deadlines, remaining future events and empty/canceled queues, including subsequent expired destruction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000885
    15. Deferred timeout accounting inside a transaction UID: PPL-SPEC-000885 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    If an actual timeout is processed while the internal transaction state is active, it shall defer event dispatch by arming a short nonzero checkpoint. The previously consumed timeout span shall remain included in the elapsed-time accounting for that later dispatch; repeated replacement/chunk histories shall not lose the consumed span. A deferred checkpoint by itself shall not notify a future event. Failure to arm this checkpoint shall retain 🔗 16. Fatal signal-context timer-rearm failure.

    RATIONALE:

    A timeout deferred during publication must preserve the elapsed interval already consumed, including a capped long interval.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject timeout delivery at read/publication/transaction boundaries and compare ordinary and chunked deferred histories with a separately maintained logical clock.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 16. Fatal signal-context timer-rearm failure UID: PPL-SPEC-000886 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When timeout dispatch or transaction deferral cannot rearm the required timer, it shall call std::abort. It shall not report that failure by constructing or throwing a C++ exception in signal context. Earlier successfully completed callbacks in that dispatch shall retain their effects up to process termination. This fatal policy shall not be replaced by silently leaving future pending events unscheduled.

    RATIONALE:

    Once pending timeouts cannot be scheduled, continuing would lose required notifications and exception creation is unsafe in signal context.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use isolated-process fatal controls for rearm and deferral failures with allocation disabled and distinguish abort from exception, terminate and silent return.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000887
    17. Timer-read validity and context-specific error channels UID: PPL-SPEC-000887 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A valid timer interval shall have nonnegative seconds representable by long and microseconds in [0, 1000000). A failed timer read shall not be interpreted as a successful sample. During construction, a successful read outside this range shall report std::runtime_error with 🔗 8. Failed watchdog construction and surviving events. During cancellation it shall use 🔗 10. Cancellation failure and retained-checkpoint fallback, and during signal entry it shall use the fallback in 🔗 13. Stale timer-notification suppression. Successful zero and boundary-valid intervals shall retain their ordinary context meaning.

    RATIONALE:

    The same malformed platform snapshot requires different safe reporting in construction, noexcept cleanup and asynchronous dispatch.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject negative seconds/microseconds, excessive microseconds and supported wider-second overflow in each context, with valid zero/nonzero boundary controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 18. Class initialization and preceding signal action UID: PPL-SPEC-000888 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, class initialization shall establish a one-shot timer protocol (zero repeated interval), install the watchdog signal action for the selected signal and preserve its preceding action for later restoration. Failed installation shall report its system-call failure. The caller/library shall provide balanced initialization and finalization, without independently repeated initialization or live watchdogs before setup. If later library initialization fails after this signal action was acquired but before any timer/event was acquired, its internal rollback shall restore the preceding action without modifying an unrelated existing interval timer.

    RATIONALE:

    Signal-handler acquisition and later library setup rollback must preserve the resource that preceded the PPL lifecycle.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void initialize();
    
    VERIFICATION_CRITERIA:

    Check controlled preceding actions and installation failure; inspect and exercise post-acquisition initialization rollback separately from ordinary active-timer finalization.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 19. Class finalization and pending-notification cleanup UID: PPL-SPEC-000889 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, finalization shall require no live pending watchdog events. With the selected signal blocked, it shall stop the owned timer, mark the logical alarm inactive, discard an owned pending notification and restore the preceding signal action. It shall restore the caller's exact mask and preserve errno when it returns. Failure to block, stop the timer, install the discard action, restore the preceding action or restore the mask shall invoke std::terminate. A stale notification from a canceled timer shall not escape later to the preceding client handler.

    RATIONALE:

    Returning signal ownership must dispose of notifications still owned by the timer being finalized.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void finalize();
    
    VERIFICATION_CRITERIA:

    Use controlled previous actions/masks, queued canceled notifications and isolated-process failure controls for each finalization step, with no live pending watchdogs.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 20. Timeout and signal-mask errno preservation UID: PPL-SPEC-000890 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Whenever timeout dispatch returns normally, it shall restore its entry errno, including a stale-signal return, callback effects and successful read/rearm calls that change errno. Signal-mask acquisition and restoration shall preserve the errno with which those individual mask operations were entered. Finalization shall preserve its entry errno on return under 🔗 19. Class finalization and pending-notification cleanup. This shall not turn a reported constructor system-call failure into an unchanged-errno promise.

    RATIONALE:

    Asynchronous notification must not corrupt the interrupted computation's error state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    static void finalize();
    
    VERIFICATION_CRITERIA:

    Set distinct sentinel error values and clobber read/rearm/callback operations in stale, ordinary, deferred and chunked histories; verify successful mask/finalization preservation.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

6. Thread entry and shared-facility use UID: PPL-LLR-000438 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: ALL VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Parent): RELATIONS (Child): STATEMENT:

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.

RATIONALE:

A thread-safe build can provide thread-specific state while retaining restrictions on mutable objects and process-wide interruption facilities.

COMMENT:

Verification covers thread entry and exit, state ownership and supported shared-facility protocols. Thread lifecycle checks and direct state/queue/signal analysis verify the contracts in each supported configuration. The caller must satisfy the declared preconditions; automatic detection of arbitrary sharing or initialization violations is not required. Thread entry and shared-facility conditions complement 🔗 1. Initialization and finalization lifecycle without relaxing 🔗 5. Watchdog scheduling and cancellation scope.

VERIFICATION_CRITERIA:

Review thread-entry and exit protocols across native, C and Java interfaces and the supported regimes of other bindings. Check initialization and finalization sequences and isolation of state promised to be thread-specific. Assess simultaneous-use and object-sharing preconditions and the per-thread computational-weight queues and single-owner native watchdog signals. Do not infer unrestricted sharing from a thread-safe configuration token.

SOURCE:

src/Init_defs.hh and src/Init.cc: library and thread-specific initialization; src/thread_safe.hh: configured thread-local state; src/Threshold_Watcher_defs.hh and src/globals_defs.hh: shared-trait restrictions and per-thread computational-weight queues; src/Watchdog_defs.hh: single-owner signal discipline; interfaces/C/ppl_c_header.h and interfaces/Java/parma_polyhedra_library/Parma_Polyhedra_Library.java: explicit thread entry and exit.

  • PPL-SPEC-001515
    1. C library and thread lifecycle UID: PPL-SPEC-001515 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ppl_initialize shall initialize native library state, published symbolic constants and the calling thread's C variable formatter. ppl_finalize shall release C-owned interruption objects and its native library-initialization owner and restore the preceding native variable formatter. Initialization and finalization shall return zero on success and invalid-argument status for duplicate lifecycle requests. Reinitialization after a completed finalization shall succeed. Independently owned client objects shall be released before finalization.

    New participating threads shall enter and leave using the thread functions in supported configurations. The initializing thread shall use the library lifecycle rather than duplicate thread entry or exit. Thread finalization shall restore that thread's preceding native formatter. Shared lifecycle and interruption ownership shall obey the native synchronization prerequisites.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    Binding-owned timers must not survive the library state on which their callbacks depend.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_initialize(void);
    int ppl_finalize(void);
    int ppl_thread_initialize(void);
    int ppl_thread_finalize(void);
    
    VERIFICATION_CRITERIA:

    Check initialize/finalize/reinitialize sequences, duplicate calls, thread entry where configured, formatter restoration and finalization with armed C interruption facilities.

    SOURCE:

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

  • PPL-SPEC-001518
    4. C rounding and irrational precision controls UID: PPL-SPEC-001518 STATUS: APPROVED COMPONENT: C_INTERFACE APPLICABILITY: IF_C VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: C VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Rounding controls shall apply the native PPL rounding mode or restore the calling thread's saved preceding mode. The precision query shall assign the current irrational-result precision, and setting shall apply the native admission and precision semantics. These controls shall not change exact integer or rational values. Calls involving floating arithmetic shall satisfy the applicable native rounding and thread-entry prerequisites.

    The valid-use and result-category conditions in 🔗 1. C handles, arguments and successful outcomes shall apply.

    RATIONALE:

    C forwarding must retain thread-local numerical prerequisites.

    INTERFACE:

    Public header: <ppl_c.h>.

    int ppl_set_rounding_for_PPL(void);
    int ppl_restore_pre_PPL_rounding(void);
    int ppl_irrational_precision(unsigned *p);
    int ppl_set_irrational_precision(unsigned p);
    
    VERIFICATION_CRITERIA:

    Check precision round trips, invalid settings where supported and rounding restoration/control in configured floating-point environments.

    SOURCE:

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

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

  • 2. Finite coefficient construction, copying and comparison UID: PPL-SPEC-000042 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A default-constructed Coefficient shall have value zero. Construction from a representable native integral input and copying from a live coefficient shall preserve the source integer value. The common native input forms covered here are char, signed char, unsigned char, short, unsigned short, int, unsigned int, long and unsigned long. Copy assignment shall replace the target value with the source's entry value, return a reference to the target and preserve a distinct source. Self-copy assignment shall preserve the value. Later mutation of a value shall not change a distinct copy. Destruction of one value shall not invalidate another value or a separately owned copy of a constant.

    For live finite coefficient values, equality and ordering comparisons shall agree with equality and ordering of their mathematical integers and shall preserve the operands. These obligations shall hold independently of object identity and the current floating-point rounding direction.

    Construction and use shall satisfy the applicable initialized-thread protocol in 🔗 3. Thread initialization, default state and finalization. Callers shall prevent concurrent access to an object while another operation changes it. This contract's integral-input guarantee requires the input value to be representable in the selected profile.

    RATIONALE:

    Coefficients must retain integer value semantics across the selected backend, even when that backend owns dynamically allocated limbs.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit these forms in a C++ client function using PPL names:

    Coefficient zero;
    Coefficient x(7);
    Coefficient y(x);
    Coefficient& target = (y = x);
    y = y;
    bool equal = (x == y);
    bool different = (x != y);
    bool less = (x < y);
    bool less_equal = (x <= y);
    bool greater = (x > y);
    bool greater_equal = (x >= y);
    

    The literals illustrate admitted calls; the value guarantees apply to all representable operands in this contract.

    VERIFICATION_CRITERIA:

    Check default zero, positive and negative integral construction, copy construction, assignment return identity, self-assignment and independent later mutation. Compare all six predicates against an independent integer ordering, including bounded endpoints and large multi-limb GMP values. Destroy original values while retaining copies. Exercise assertion and nonassertion builds.

    SOURCE:

    src/Coefficient_types.hh; src/Checked_Number_inlines.hh; GMP integer provider; tests/coefficient2.cc.

  • 6. Coefficient zero and one constant access UID: PPL-SPEC-000046 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Within the calling thread's active initialization lifetime, Coefficient_zero() and Coefficient_one() shall return coefficients with values zero and one, respectively, through Coefficient_traits::const_reference as defined by 🔗 1. Configured integral coefficient type and return trait. Repeated access shall preserve those values.

    When the trait is a reference, repeated calls on the same thread within that lifetime shall refer to the same corresponding constant object. The caller shall not mutate that borrowed object or retain its use beyond the applicable initialized-thread lifetime. When the trait returns a value, the returned coefficient shall be an independent value. Making and modifying a value copy of either constant shall leave the constant unchanged.

    Initialization and finalization shall follow 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization. In a thread-safe configuration, reference-returning constant storage shall belong to the calling thread and access by an initialized worker shall preserve another initialized thread's constants. Reinitialization shall not revive borrowed references from a preceding lifetime.

    RATIONALE:

    Canonical zero and one avoid repeated construction while the return trait preserves the appropriate value or borrowing convention for the configured representation.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library:

    Coefficient_traits::const_reference Coefficient_zero();
    Coefficient_traits::const_reference Coefficient_one();
    
    VERIFICATION_CRITERIA:

    Across all profiles, check values, exact result types, repeated reference identity where applicable and independent mutation of copies. Run balanced initialization lifetimes. In thread-safe builds, check independently initialized workers while another thread retains its constants. Use initialization failure/retry tests for incomplete GMP constant acquisition. Compile an installed-header client.

    SOURCE:

    src/Coefficient_defs.hh; src/Coefficient_inlines.hh; tests/coefficient1.cc; tests/coefficient2.cc; tests/initialization1.cc.

  • PPL-SPEC-000047
    7. Coefficient constant-stage acquisition and release UID: PPL-SPEC-000047 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal coefficient-constant initialization stage shall be entered only when that thread has no active instance of the stage. In the mpz profile, successful Coefficient_constants_initialize() shall acquire and publish one owned zero coefficient and one owned unit coefficient for that thread. Neither pointer shall be published until both objects have been constructed. If supported recoverable construction failure occurs, partial acquisitions shall be destroyed, both published pointers shall remain null and a later initialization attempt shall be permitted.

    Coefficient_constants_finalize() shall require the initialized stage and completion of all dependent uses. It shall release both owned objects and clear both published pointers. The bounded profiles shall require no owned constant-stage allocation; their initialization and finalization functions shall perform no stage-resource operation. Their accessor storage shall follow 🔗 6. Coefficient zero and one constant access.

    The enclosing initialization transaction shall acquire and release this stage in dependency order under 🔗 3. Thread initialization, default state and finalization. Callers shall not interleave independent stage ownership protocols for the same thread.

    RATIONALE:

    Publishing a complete pair prevents incomplete singleton ownership after failure. Explicit stage release makes retry and reverse-order initialization cleanup possible.

    INTERFACE:

    Internal declarations in Parma_Polyhedra_Library:

    void Coefficient_constants_initialize();
    void Coefficient_constants_finalize();
    

    These operations form an internal initialization stage. Public clients shall use the library/thread initialization interfaces.

    VERIFICATION_CRITERIA:

    Check repeated balanced stage lifetimes, published zero/one values and release of acquired storage. Inject each GMP stage allocation failure and verify null publication, resource cleanup and successful retry before testing dependent objects. Inspect bounded no-op implementations. Exercise enclosing library/thread rollback in initialization3 and initialization4.

    SOURCE:

    src/Coefficient.cc; tests/coefficient2.cc; tests/initialization3.cc; tests/initialization4.cc.

  • PPL-SPEC-001735
    2. Conversion worker queue and shutdown protocol UID: PPL-SPEC-001735 STATUS: APPROVED COMPONENT: COMMAND_LINE_TOOLS APPLICABILITY: IF_CPP, THREAD_SAFE_BUILD VERIFICATION_METHODS: Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Threadsafe_Queue shall serialize access to its FIFO. A successful try_pop shall assign and remove the oldest queued item; an empty queue shall return false without assigning an item. empty is a synchronized observation rather than a reservation. These operations require the element type's used copy/move operations to complete successfully when a completed queue action is required.

    The pool shall select at least one worker. If starting a worker fails, the constructor shall stop and join every worker it has started before propagating the exception.

    For a successfully constructed pool, submissions made before finalize or destruction shall be queued. Workers shall repeatedly claim and invoke queued work. finalize shall request stopping once the queue is drained; destruction shall request that stop and join every worker before returning. Work submitted before stopping shall be invoked once when work and queue operations complete normally. No submission may race with or follow the stop request. Work must not allow an exception to escape its worker entry point. The queue and pool shall not be copied, moved or assigned.

    RATIONALE:

    Queue locking, stop signalling and joining together determine whether a conversion task is executed and whether its storage remains alive.

    INTERFACE:

    Internal templates in the conversion tool:

    template <typename T> class Threadsafe_Queue;
    template <typename Work> class Thread_Pool;
    

    Queue operations: empty, push and try_pop. Pool operations: construction, submit, finalize and destruction. work_type names Work. The pool chooses its worker count from std::thread::hardware_concurrency, using one worker if that value is zero and capping the count by a positive task count when provided.

    VERIFICATION_CRITERIA:

    Inspect mutex ownership and FIFO removal, stop/drain ordering, and joins before queue destruction. Exercise multiple producers/consumers with uniquely numbered nonthrowing work and verify no lost or repeated invocation. Check the one-worker fallback and verify that a failure during partial construction stops and joins every started worker.

    SOURCE:

    demos/ppl_lcdd/Thread_Pool_defs.hh; demos/ppl_lcdd/Thread_Pool_templates.hh; demos/ppl_lcdd/ppl_lcdd.cc.

  • 1. Affine congruence meaning and valid numerical use UID: PPL-SPEC-000141 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For dimension d, integer coefficient expression E(x) = b + ∑d − 1i = 0aixi and nonnegative modulus m, a Congruence shall denote the rational valuations satisfying E(x) = 0 when m = 0, and E(x) ⁄ m ∈ ℤ when m > 0. Coordinates themselves need not be integral. is_equality() and is_proper_congruence() shall distinguish these cases exactly. is_tautological() shall report whether all rational valuations satisfy the relation; is_inconsistent() shall report whether none do. With a nonzero homogeneous coefficient neither predicate shall hold. For a constant expression, the first shall equal its equality/divisibility truth and the second its negation.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization; the caller shall synchronize access overlapping modification of an object. Both dense and sparse storage shall be supported, with default_representation equal to SPARSE. Computed construction, arithmetic, normalization, comparison and transformation guarantees shall require every evaluated coefficient step and result to be representable in the selected numerical profile. Unchecked completion shall not prove this precondition. Allocation and configured numerical exceptions may propagate. Failed construction shall release its owned resources; distinct unchanged sources shall survive failures, while modified destinations shall remain destructible without a universal rollback guarantee.

    RATIONALE:

    Congruence divisibility applies to the affine result, including rational coordinate values, rather than forcing each coordinate to be an integer.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Congruence;
    static constexpr Representation Congruence::default_representation = SPARSE;
    bool Congruence::is_equality() const;
    bool Congruence::is_proper_congruence() const;
    bool Congruence::is_tautological() const;
    bool Congruence::is_inconsistent() const;
    
    VERIFICATION_CRITERIA:

    Evaluate exact rational affine results and test equality or integral quotient independently. Include fractional satisfying and nonsatisfying coordinates, zero dimension, constants and trailing unused coordinates in both storage choices.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000142
    2. Default congruence and shared zero-dimensional values UID: PPL-SPEC-000142 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction shall produce a dimension-zero equality with expression zero and use the requested representation. zero_dim_false() shall return a borrowed dimension-zero inconsistent equality. zero_dim_integrality() shall return a borrowed dimension-zero tautological proper congruence with modulus one. Shared constants shall remain usable until their initialized owning thread is finalized; owned copies shall be independent values.

    RATIONALE:

    Zero coordinates still admit true and false modular conditions. The shared integrality constant is a proper congruence even though it is tautological.

    INTERFACE:
    explicit Congruence(Representation r = default_representation);
    static const Congruence& Congruence::zero_dim_false();
    static const Congruence& Congruence::zero_dim_integrality();
    
    VERIFICATION_CRITERIA:

    Check zero expression/modulus, requested storage, shared classifications and dimensions, and owned copies within balanced initialization.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • PPL-SPEC-000156
    16. Congruence-system meaning and construction UID: PPL-SPEC-000156 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Congruence_System shall denote the conjunction of its retained congruences over rational coordinates. An empty conjunction shall be true. Default construction shall have dimension zero and no rows; the dimensioned empty constructor shall retain its supplied admitted dimension. A singleton constructor from a congruence shall copy that relation and its dimension. Construction from an equality constraint shall make its modulus-zero singleton; inequalities shall throw std::invalid_argument. Construction from a constraint system shall extract its equality rows and retain its ambient dimension, omitting inequalities.

    All constructors shall use requested storage, with default_representation equal to SPARSE. zero_dim_empty() shall borrow a dimension-zero inconsistent singleton, not an empty conjunction, until owning-thread finalization. Initialization, synchronization and numerical/failure preconditions shall follow 🔗 1. Affine congruence meaning and valid numerical use.

    RATIONALE:

    A system's conjunction and ambient space remain meaningful even without nontrivial rows. Equality extraction deliberately omits ordered inequalities.

    INTERFACE:
    class Congruence_System;
    static constexpr Representation Congruence_System::default_representation = SPARSE;
    explicit Congruence_System(Representation r = default_representation);
    explicit Congruence_System(dimension_type d, Representation r = default_representation);
    explicit Congruence_System(const Congruence& cg, Representation r = default_representation);
    explicit Congruence_System(const Constraint& c, Representation r = default_representation);
    explicit Congruence_System(const Constraint_System& cs, Representation r = default_representation);
    static const Congruence_System& Congruence_System::zero_dim_empty();
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/shared inconsistent systems, positive-dimensional empty construction, equality/inequality conversion and extraction from mixed constraint systems using independent rational conjunctions.

    SOURCE:

    src/Congruence_defs.hh; src/Congruence_inlines.hh; src/Congruence.cc; src/Congruence_System_defs.hh; src/Congruence_System_inlines.hh; src/Congruence_System.cc; tests/congruencespec1.cc; tests/exactboundedworking1.cc.

  • 1. Constraint relation meaning and numerical prerequisites UID: PPL-SPEC-000101 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Constraint of dimension d shall describe one relation on rational valuations x ∈ ℚd. With its exposed expression E(x) = b + ∑d − 1i = 0aixi, its three types shall mean E(x) = 0, E(x) ≥ 0 and E(x) > 0, respectively. A coefficient belonging to an internal strictness representation shall not be exposed as a coordinate of this relation.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization. The caller shall synchronize any access overlapping modification of the same object. Both DENSE and SPARSE storage shall be supported and default_representation shall be SPARSE. Computed construction, conversion, normalization, dimension transformation and comparison guarantees shall require representability of every evaluated coefficient arithmetic step in the selected coefficient profile. Unchecked completion shall not establish this precondition. Allocation and configured numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete constraint. Distinct, unchanged sources shall survive a reported failure; otherwise a modified destination shall remain destructible, without a universal unchanged-state guarantee.

    RATIONALE:

    Constraint meaning concerns the admitted valuations, rather than a particular coefficient scale or hidden strictness column.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Constraint;
    enum Constraint::Type { EQUALITY, NONSTRICT_INEQUALITY, STRICT_INEQUALITY };
    static constexpr Representation Constraint::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Evaluate exposed affine expressions with independent rational arithmetic, testing equality, strict boundaries and nonstrict boundaries. Include zero-dimensional relations and trailing unused coordinates in both representations. Check numerical-profile preconditions separately from relation truth.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000103
    3. Default and shared zero-dimensional constraints UID: PPL-SPEC-000103 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction with optional representation shall yield a dimension-zero nonstrict tautology with expression zero. The requested representation shall be used. zero_dim_false() shall return a borrowed dimension-zero inconsistent equality; zero_dim_positivity() shall return a borrowed dimension-zero nonstrict tautology with a positive constant term. Shared objects shall remain usable until their owning initialized thread is finalized. Copying a shared object shall create an independently owned value.

    RATIONALE:

    An empty coordinate space still admits true and false relations, with lifetime distinct from a client-owned copy.

    INTERFACE:
    explicit Constraint(Representation r = default_representation);
    static const Constraint& Constraint::zero_dim_false();
    static const Constraint& Constraint::zero_dim_positivity();
    
    VERIFICATION_CRITERIA:

    Check default type, value and requested representation; classify both shared constants independently; copy them into owned objects and exercise copies during a balanced initialized lifetime.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • 14. Constraint-system conjunction, construction and shared contradiction UID: PPL-SPEC-000114 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Constraint_System shall denote the conjunction of its constraints over its declared rational coordinate space. An empty conjunction shall be true. An empty public range shall not mean an inconsistent set. Conversely, zero_dim_empty() shall return a borrowed, dimension-zero system containing an inconsistent equality and denoting the empty set of valuations. That shared system shall remain alive until its owning initialized thread is finalized.

    Default construction shall create a dimension-zero system with no constraints. Construction from one constraint shall create its singleton conjunction and use that constraint's public dimension. Both shall use the requested representation; default_representation shall be SPARSE. Construction shall own its stored values independently of the source. Use shall satisfy 🔗 1. Constraint relation meaning and numerical prerequisites's initialization, synchronization, arithmetic and failure prerequisites.

    RATIONALE:

    The empty constraint list denotes the universe, whereas an inconsistent singleton denotes no points; the word empty has distinct container and geometric uses.

    INTERFACE:
    class Constraint_System;
    static constexpr Representation Constraint_System::default_representation = SPARSE;
    explicit Constraint_System(Representation r = default_representation);
    explicit Constraint_System(const Constraint& c,
                               Representation r = default_representation);
    static const Constraint_System& Constraint_System::zero_dim_empty();
    
    VERIFICATION_CRITERIA:

    Evaluate default, singleton and shared inconsistent systems independently at rational points. Check dimensions, requested representations, source independence and the distinction between no constraints and no satisfying valuation.

    SOURCE:

    src/Constraint_defs.hh; src/Constraint_inlines.hh; src/Constraint.cc; src/Constraint_System_defs.hh; src/Constraint_System_inlines.hh; src/Constraint_System.cc; tests/constraintspec1.cc.

  • PPL-SPEC-000815
    1. Polymorphic event-action interface and virtual destruction UID: PPL-SPEC-000815 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler shall be an abstract interface with const action dispatch and virtual destruction. Calling act() through a live base reference shall dispatch to the selected derived handler. Deleting an owned derived handler through a base pointer shall run its derived destruction and release its wrapper exactly once. A borrowed handler shall not become owned merely by being passed to a pending event.

    Construction, dispatch and destruction shall require the selected external callback/flag objects and synchronization to remain valid. These wrappers shall not themselves require global PPL initialization or timer availability. A caller invoking actions in a signal handler or shared threshold-watcher context shall retain that surrounding interface's operation and thread/signal restrictions.

    RATIONALE:

    Notification storage relies on const polymorphic dispatch and deletion through its abstract action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler {
    public:
      virtual void act() const = 0;
      virtual ~Handler();
    };
    
    VERIFICATION_CRITERIA:

    Check base-reference action dispatch and derived destruction with owned wrappers, and preserve borrowed external objects across wrapper destruction.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 2. Flag-handler binding and binding-preserving copies UID: PPL-SPEC-000816 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Flag construction shall bind the supplied holder reference and flag object without invoking a priority query, installing the flag or taking ownership of either external object. Copy construction and rvalue construction shall preserve those same bindings; later actions shall observe the holder's current value rather than a pointer-value snapshot made during construction. Ordinary assignment of this reference-binding wrapper shall not be supported.

    The holder shall be a live volatile pointer to const Flag_Base and Flag* shall convert to Flag_Base*. For a nonnull holder, the existing pointee shall belong to the compatible Flag object family, so the implementation's declared base-to-flag cast is well formed and valid. The flag/holder and any nonnull pointee shall outlive their actual access. Wrapper destruction shall not delete or alter them.

    RATIONALE:

    A retained holder reference must follow later client updates, and priority comparison requires a valid concrete flag object behind the base pointer.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    template <typename Flag_Base, typename Flag> class Handler_Flag;
    Handler_Flag(const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check copied/rvalue wrappers, changed holder values after construction, compatible multiple-base pointer adjustment, construction without priority queries and unchanged borrowed-object lifetimes.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 3. Strict-priority flag installation UID: PPL-SPEC-000817 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On act(), a null bound holder shall be set to the bound flag address without querying flag priorities. For a nonnull valid holder, the action shall install the bound flag exactly when the existing flag's observed priority is strictly lower than the bound flag's observed priority. Equal or higher existing priority shall preserve the existing pointer. Priority queries shall supply comparable values consistent with that call's decision; they shall not themselves rebind the holder. External priority changes between calls shall be observed by later actions.

    The operation shall not own/delete flags or allocate a wrapper. If a priority query reports an exception, it shall propagate through ordinary C++ dispatch without an assignment by the handler to the holder; any side effects of the query itself shall remain its own contract.

    RATIONALE:

    Competing abandonment requests need the highest observed priority and a definite equal-priority retention rule.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Flag<Flag_Base, Flag>::act() const;
    
    VERIFICATION_CRITERIA:

    Check null holders, every smaller/equal/larger signed priority pair, dynamic priority changes, compatible base pointers and priority exceptions with unchanged holder identity.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 4. Function-handler target binding and copies UID: PPL-SPEC-000818 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Handler_Function construction shall store the supplied function pointer without invoking it. Copy and rvalue construction shall retain the same target. Ordinary assignment shall not be supported. A null pointer may be stored and destroyed without invocation, but shall not be an admitted action target. The callable code shall remain valid at invocation. Construction/copy/destruction shall not call or own the function or allocate auxiliary callback state.

    RATIONALE:

    A function wrapper owns its pointer binding while the callable code and its external state remain the caller's responsibility.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    class Handler_Function;
    Handler_Function(void (*function)());
    
    VERIFICATION_CRITERIA:

    Check zero callback calls during construction/copy/destruction, copied target identity by later dispatch, null-bound noninvoked wrappers and nonassignability.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 5. Function action dispatch and callback failure UID: PPL-SPEC-000819 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With a live nonnull target, Handler_Function::act() shall call the stored function exactly once per invocation and return normally exactly when that call returns normally. A callback exception shall propagate with its identity and previously performed callback effects; no rollback of arbitrary callback state shall be required. The wrapper shall remain bound to the same target and permit a later admitted call. No invocation shall silently replace the callback with another target or delete its external state.

    RATIONALE:

    Ordinary callback completion and callback failure must remain observable through the const action interface.

    INTERFACE:

    Internal source header: Handler_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog; constructor excerpts apply to the indicated wrapper class.

    void Handler_Function::act() const;
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks, a callback that records an effect then throws a unique exception, repeated const/base dispatch and successful retry.

    SOURCE:

    src/Handler_defs.hh; src/Handler_inlines.hh; src/Handler.cc; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/handlerspec1.cc.

  • 1. Internal affine value, coefficient storage and dispatch prerequisites UID: PPL-SPEC-001622 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For Row equal to Dense_Row or Sparse_Row, a live Linear_Expression_Impl<Row> of dimension d shall own d + 1 coefficient slots. Slot zero shall contain the constant; slot i + 1 shall contain the coefficient of Variable(i). Dense storage shall retain zero slots; valid sparse expression storage shall contain no explicit zero entries. Trailing zero coordinates shall retain the ambient dimension. representation() shall return DENSE or SPARSE accordingly, and max_space_dimension() shall equal Row::max_size()-1.

    Calls shall satisfy the initialization, synchronization, coefficient-range and resource conditions of 🔗 1. Affine value, numerical prerequisites and shared zero. Raw slot indices shall be in [0, d + 1) and half-open windows shall satisfy 0 ≤ s ≤ e ≤ d + 1. A new dimension shall fit the selected backend's maximum; its increment for the constant slot shall be representable. Internal coordinate transformations shall receive in-dimension variables, valid distinct permutation cycles, and growth within that maximum.

    An argument dispatched through Linear_Expression_Interface shall have one of these two concrete backend types. Dispatch shall preserve the operation's meaning for every dense/sparse pairing. Setters and dimension transformations shall implement the coefficient effects of 🔗 5. Ambient dimension queries and trailing-coordinate resizing, 🔗 6. Coefficient access, replacement and zero predicates and 🔗 12. Explicit coefficient-coordinate transformations on these admitted inputs. A const access shall borrow its coefficient according to the selected traits; reads beyond the homogeneous dimension through coefficient(v) shall return zero. Mutations shall invalidate borrowed positions according to their storage.

    The internal row_data() accessor shall borrow the complete read-only row only from a live lvalue expression. Mutable and const temporary expression owners shall be rejected. A row borrow shall not outlive its owner or a mutation that invalidates the underlying coefficient storage.

    coefficient_is_owned(n) shall identify a reference to a stored coefficient in assertion builds when coefficient arguments use reference traits, without changing the expression. With value traits or assertions disabled it shall return false. Internal scalar-independence preconditions shall apply in every build mode; that diagnostic predicate shall not replace them.

    RATIONALE:

    Raw coefficient indices and variable identifiers have different meanings. Internal callers supply the validated dimensions and storage assumptions used by the public interface.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    template <typename Row> class Linear_Expression_Impl;
    static dimension_type max_space_dimension();
    const Row& row_data() const &;
    const Row& row_data() const && = delete;
    Representation representation() const;
    dimension_type space_dimension() const;
    void set_space_dimension(dimension_type);
    Coefficient_traits::const_reference coefficient(Variable) const;
    Coefficient_traits::const_reference inhomogeneous_term() const;
    void set_coefficient(Variable, Coefficient_traits::const_reference);
    void set_inhomogeneous_term(Coefficient_traits::const_reference);
    void swap_space_dimensions(Variable, Variable);
    void shift_space_dimensions(Variable, dimension_type);
    void remove_space_dimensions(const Variables_Set&);
    void permute_space_dimensions(const std::vector<Variable>&);
    // Private diagnostic helper:
    bool coefficient_is_owned(const Coefficient&) const;
    
    VERIFICATION_CRITERIA:

    Check both concrete backends, constant-slot mapping, zero reads beyond the dimension, coordinate transformations and trait-dependent borrowing. Inspect interface dispatch and scalar guards; compare public and backend effects on admitted inputs. Admit read-only row borrows from mutable and const lvalues of both backend types, and reject temporary owners.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001623
    2. Independent backend construction, copying and affine arithmetic UID: PPL-SPEC-001623 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Default construction shall create the zero expression of dimension zero; coefficient and variable construction shall implement 🔗 2. Zero, constant, variable and dimensioned construction. The sizing constructor's Boolean argument shall distinguish its overload and shall not alter its meaning: it shall create the zero expression of the admitted requested dimension. Ordinary, cross-storage and interface-based copy construction shall produce independent coefficients. A dimensioned copy shall retain the selected prefix and zero-extend as necessary. Private construct helpers shall establish those same copied values. Destruction shall release the owned row without changing a distinct source.

    Backend affine additions, subtractions, multiplication, truncating division, negation, normalization and coordinate updates shall implement the value rules of 🔗 7. Affine addition, subtraction and negation, 🔗 8. Integral scalar multiplication and coefficient-wise division, 🔗 9. Explicit scaled accumulation, combination and elimination and 🔗 10. Coefficient normalization and sign normalization. Expression addition and subtraction shall admit self operands. Whole-expression combinations and scaled accumulations shall receive a distinct source; their scalar arguments shall be independent of modified target coefficients. Multiplication and division factors shall likewise be independent of the target. Division shall receive a nonzero divisor. Scaled variable accumulation shall retain the variable's dimension even for a zero factor; zero-factor scaled expression accumulation shall preserve the target's current dimension and value.

    The prerequisites of 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites shall apply. Each operation that returns a backend reference shall return its target. Distinct sources shall retain their values and dimensions.

    RATIONALE:

    Concrete storage and dynamic dispatch must preserve the public affine value while retaining the stronger internal operand-independence conditions.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    Linear_Expression_Impl();
    explicit Linear_Expression_Impl(Coefficient_traits::const_reference);
    Linear_Expression_Impl(Variable);
    Linear_Expression_Impl(dimension_type, bool);
    Linear_Expression_Impl(const Linear_Expression_Impl&);
    template <typename Other>
    Linear_Expression_Impl(const Linear_Expression_Impl<Other>&);
    Linear_Expression_Impl(const Linear_Expression_Interface&);
    Linear_Expression_Impl(const Linear_Expression_Interface&, dimension_type);
    ~Linear_Expression_Impl();
    Linear_Expression_Impl& operator+=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator-=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator+=(Variable);
    Linear_Expression_Impl& operator-=(Variable);
    Linear_Expression_Impl& operator+=(const Linear_Expression_Interface&);
    Linear_Expression_Impl& operator-=(const Linear_Expression_Interface&);
    Linear_Expression_Impl& operator*=(Coefficient_traits::const_reference);
    Linear_Expression_Impl& operator/=(Coefficient_traits::const_reference);
    void negate();
    void normalize();
    void sign_normalize();
    Linear_Expression_Impl& add_mul_assign(Coefficient_traits::const_reference, Variable);
    Linear_Expression_Impl& sub_mul_assign(Coefficient_traits::const_reference, Variable);
    void add_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Interface&);
    void sub_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Interface&);
    // Typed source overloads and private construct helpers:
    template <typename Other>
    Linear_Expression_Impl& operator+=(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    Linear_Expression_Impl& operator-=(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void add_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void sub_mul_assign(Coefficient_traits::const_reference, const Linear_Expression_Impl<Other>&);
    template <typename Other> void construct(const Linear_Expression_Impl<Other>&);
    template <typename Other>
    void construct(const Linear_Expression_Impl<Other>&, dimension_type);
    
    VERIFICATION_CRITERIA:

    Compare copied, truncated and extended values across all storage pairings; mutate copies independently. Check exact coefficient-vector arithmetic, self addition/subtraction, zero factors and returned-target identity using existing public and direct-backend histories.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001624
    3. Raw coefficient access, zero ranges, gcd and support filtering UID: PPL-SPEC-001624 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, get(i) shall return the raw coefficient ai; set(i,n) shall replace it by the entry value of n, removing a sparse entry when zero. is_zero() shall test every slot; all_homogeneous_terms_are_zero() shall exclude slot zero.

    For an admitted window [s, e), all_zeroes shall test every slot, num_zeroes shall count zero slots, and gcd shall return the nonnegative greatest common divisor of those coefficients. An empty or all-zero window shall have gcd zero. The positive gcd shall be representable in the selected coefficient type. first_nonzero(s,e) and last_nonzero(s,e) shall return the least and greatest nonzero slot, respectively, or e if none exists. No-argument last_nonzero() shall return the greatest nonzero slot, or zero for the all-zero vector.

    all_zeroes(vars) shall test precisely the selected homogeneous coefficients. all_zeroes_except(vars,s,e) shall test the window after excluding the selected variable coefficients; slot zero shall never be excluded by a variable set. Empty windows shall satisfy both universal predicates. has_a_free_dimension_helper(indices) shall retain exactly those input raw indices whose coefficients are zero, inserting no new indices. Variable sets and raw indices shall be within the respective admitted extent. All queries shall preserve the expression.

    RATIONALE:

    Internal algebra uses raw coefficient windows, including the constant, and needs consistent empty-window results and absence sentinels.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    Coefficient_traits::const_reference get(dimension_type) const;
    void set(dimension_type, Coefficient_traits::const_reference);
    bool is_zero() const;
    bool all_homogeneous_terms_are_zero() const;
    bool all_zeroes(dimension_type start, dimension_type end) const;
    dimension_type num_zeroes(dimension_type start, dimension_type end) const;
    Coefficient gcd(dimension_type start, dimension_type end) const;
    dimension_type first_nonzero(dimension_type first, dimension_type last) const;
    dimension_type last_nonzero(dimension_type first, dimension_type last) const;
    dimension_type last_nonzero() const;
    bool all_zeroes(const Variables_Set&) const;
    bool all_zeroes_except(const Variables_Set&, dimension_type, dimension_type) const;
    void has_a_free_dimension_helper(std::set<dimension_type>&) const;
    
    VERIFICATION_CRITERIA:

    Compare every window of literal vectors with independent counts, gcds and nonzero positions. Enumerate variable masks and raw-index subsets; include nonzero constants, zero-dimensional expressions, empty windows, negative inputs and both storage types.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001625
    4. Range scaling and exact affine elimination UID: PPL-SPEC-001625 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, mul_assign(c,s,e) shall multiply exactly the raw slots in [s, e) by c; zero shall clear that window. exact_div_assign(c,s,e) shall divide those slots exactly by a nonzero c that divides every selected coefficient. negate(s,e) shall negate precisely those slots. Every operation shall retain dimension and all coefficients outside its window.

    For distinct target x and source y, range linear_combine shall assign xi :  = c1xi + c2yi from entry values for s ≤ i < e, with nonzero scalars. linear_combine_lax shall admit zero scalars as well. Both windows shall fit their respective expressions. Whole-expression forms shall use the maximum input dimension and zero-extend absent coordinates. Scalar arguments shall be live and independent of modified target coefficients. The source shall retain its value and dimension. Empty windows shall preserve the target; valid sparse results shall contain no explicit zeros.

    The raw-index elimination overload shall require equal dimensions, a distinct source and nonzero pivot coefficients xk, yk. With g = gcd(|xk|, |yk|) > 0, it shall replace every target coefficient by (yk ⁄ g)xi − (xk ⁄ g)yi. The selected pivot shall become zero. The variable overload shall use raw index v.space_dimension(). All evaluated coefficient arithmetic, including normalization factors, shall meet the selected profile's representability conditions.

    RATIONALE:

    Elimination is an exact integer combination with reduced factors. Windowed operations must preserve independent prefix and suffix coefficients across storage pairings.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    void mul_assign(Coefficient_traits::const_reference, dimension_type, dimension_type);
    void exact_div_assign(Coefficient_traits::const_reference, dimension_type, dimension_type);
    void negate(dimension_type, dimension_type);
    void linear_combine(const Linear_Expression_Interface&, Variable);
    void linear_combine(const Linear_Expression_Interface&, dimension_type);
    void linear_combine(const Linear_Expression_Interface&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    void linear_combine_lax(const Linear_Expression_Interface&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    void linear_combine(const Linear_Expression_Interface&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                        dimension_type, dimension_type);
    void linear_combine_lax(const Linear_Expression_Interface&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                            dimension_type, dimension_type);
    // Each linear-combination form also has a typed source overload:
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&, dimension_type);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&, Variable);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    template <typename Other>
    void linear_combine_lax(const Linear_Expression_Impl<Other>&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference);
    template <typename Other>
    void linear_combine(const Linear_Expression_Impl<Other>&,
                        Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                        dimension_type, dimension_type);
    template <typename Other>
    void linear_combine_lax(const Linear_Expression_Impl<Other>&,
                            Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                            dimension_type, dimension_type);
    
    VERIFICATION_CRITERIA:

    Use independent integer vectors for all four storage pairings, every admitted small window and signed/zero/unit factors. Check direct and interface-dispatched paths, outside-window preservation, source independence, exact-divisibility cases and the reduced pivot formula.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • 5. Backend equality, comparison and common-variable queries UID: PPL-SPEC-001626 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, full is_equal_to(y) shall require equal dimensions and equal raw coefficient vectors. Range equality shall compare only the admitted common window. Scaled range equality shall test c1xi = c2yi at every selected slot, including when either scalar is zero. Each evaluated scaled product shall be representable. Empty-window equality shall hold.

    compare(y) shall compare homogeneous coefficients in increasing variable order, treating absent trailing coefficients as zero, and compare the constant only if all homogeneous coefficients agree. It shall return -2 or 2 for the first homogeneous difference, -1 or 1 for a constant-only difference, and zero for equal zero-extended affine values. Consequently, different declared dimensions containing only additional zero coefficients may compare as zero while failing full dimension-sensitive equality.

    have_a_common_variable(y,first,last) shall hold exactly when some variable in the admitted half-open variable range has nonzero coefficients in both operands. Constants shall be irrelevant. All queries shall preserve their operands and shall have the same meaning through typed and interface dispatch.

    RATIONALE:

    Dimension-sensitive identity and affine-value ordering serve different internal purposes. Sparse support and dispatch must not change either result.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    bool is_equal_to(const Linear_Expression_Interface&) const;
    bool is_equal_to(const Linear_Expression_Interface&, dimension_type, dimension_type) const;
    bool is_equal_to(const Linear_Expression_Interface&,
                     Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                     dimension_type, dimension_type) const;
    int compare(const Linear_Expression_Interface&) const;
    bool have_a_common_variable(const Linear_Expression_Interface&, Variable, Variable) const;
    template <typename Other> bool is_equal_to(const Linear_Expression_Impl<Other>&) const;
    template <typename Other>
    bool is_equal_to(const Linear_Expression_Impl<Other>&, dimension_type, dimension_type) const;
    template <typename Other>
    bool is_equal_to(const Linear_Expression_Impl<Other>&,
                     Coefficient_traits::const_reference, Coefficient_traits::const_reference,
                     dimension_type, dimension_type) const;
    template <typename Other> int compare(const Linear_Expression_Impl<Other>&) const;
    template <typename Other>
    bool have_a_common_variable(const Linear_Expression_Impl<Other>&, Variable, Variable) const;
    
    VERIFICATION_CRITERIA:

    Compare signed literal vectors and zero-extended unequal dimensions in all storage pairings. Enumerate every common window, zero/nonzero scale pair and common-variable interval, checking direct and dispatched calls and source preservation.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001627
    6. Owned raw iterator handles and borrowed coefficient positions UID: PPL-SPEC-001627 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, begin() and end() shall allocate independent polymorphic iterator handles delimiting the nonzero homogeneous coefficients in increasing variable order. lower_bound(v) shall allocate a handle at the first such variable at least v, or at end. The search variable shall be within the dimension or its one-past position. The caller shall delete each allocated handle through its virtual interface. The handles shall borrow the live expression's row without owning it.

    Direct nested-iterator construction shall require a row of at least one slot and a starting raw index 1 ≤ i ≤ row.size(). It shall borrow that row at the first nonzero slot at or after i, or at end. The row shall outlive every such handle.

    clone() shall allocate an independent handle at the same borrowed position. Advancing or destroying one handle shall preserve another handle's position and the coefficients. Dereference, variable() and index() shall require a live non-end position; index shall be variable().id()+1. Increment shall move to the next nonzero homogeneous coefficient, admitting arrival at end. Decrement shall require a preceding nonzero homogeneous coefficient and shall move to it, including from end. Constant slot zero shall be excluded.

    Equality shall compare positions in the same row and concrete iterator type. Expression mutation shall invalidate borrowed positions as declared for the row; the caller shall obtain new handles afterward. Allocation failures shall propagate without changing the expression or existing handles. The internal zero-skipping helpers shall implement this traversal without changing values.

    RATIONALE:

    Raw polymorphic iterator handles have caller-owned allocation and a separately borrowed coefficient lifetime. Copying a handle must preserve independent traversal state.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    using iterator_interface = Linear_Expression_Interface::const_iterator_interface;
    iterator_interface* begin() const;
    iterator_interface* end() const;
    iterator_interface* lower_bound(Variable) const;
    // Members of Linear_Expression_Impl<Row>::const_iterator:
    explicit const_iterator(const Row&, dimension_type);
    iterator_interface* clone() const;
    void operator++();
    void operator--();
    Coefficient_traits::const_reference operator*() const;
    Variable variable() const;
    dimension_type index() const;
    bool operator==(const iterator_interface&) const;
    // Private traversal helpers:
    void skip_zeroes_forward();
    void skip_zeroes_backward();
    
    VERIFICATION_CRITERIA:

    Exercise forward and reverse paths, constants and trailing zero slots, every lower bound, clone independence and deletion through the base interface in both backends. Check empty traversal and allocation failures without using invalidated handles.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • PPL-SPEC-001628
    7. Backend row export, serialization, diagnostics and accounting UID: PPL-SPEC-001628 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Under 🔗 1. Internal affine value, coefficient storage and dispatch prerequisites, get_row(r) shall replace a dense or sparse output with an independent copy of the complete raw coefficient vector. The copy shall include its logical extent, all constant and trailing zero slots, and shall not borrow the backend's coefficient storage.

    ascii_dump(stream) shall emit size, the raw slot count, and every coefficient in slot order, using the producer grammar of 🔗 13. Reloadable ASCII export and replacement loading. ascii_load(stream) shall implement that raw grammar: require its exact size keyword and a nonzero raw count, replace the row and read exactly that many coefficients. Normal malformed or truncated extraction shall return false; resource and stream exceptions shall propagate. A rejected or throwing load may leave a partially replaced row; only destruction shall be required until the caller restores a valid value. A following token shall remain available after a complete record. The selected coefficient input grammar, stream formatting and exception masks shall retain their ordinary behavior.

    print(stream) and the free stream insertion shall implement the affine format and variable formatter dispatch of 🔗 14. Human-readable affine output and formatter dispatch; insertion shall return its stream. Source values shall be preserved by export and print. OK() shall return false for a row of size zero, and sparse OK() shall also reject any explicit stored zero, with its documented diagnostic to std::cerr. This local check shall not inspect unrelated domain state. external_memory_in_bytes() shall report the owned row's external storage; total_memory_in_bytes() shall add sizeof(*this).

    RATIONALE:

    A raw backend export must preserve both the affine coefficient vector and its owning storage, while failed loading has a deliberately limited lifetime guarantee.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library. Backend member excerpts apply to Linear_Expression_Impl<Row> unless a nested or free interface is named.

    void get_row(Dense_Row&) const;
    void get_row(Sparse_Row&) const;
    void ascii_dump(std::ostream&) const;
    bool ascii_load(std::istream&);
    void print(std::ostream&) const;
    bool OK() const;
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    template <typename Row>
    std::ostream& operator<<(std::ostream&, const Linear_Expression_Impl<Row>&);
    
    VERIFICATION_CRITERIA:

    Overwrite differently sized prepopulated rows, then mutate source and outputs independently. Check exact dumps, valid reloads, malformed/truncated input, suffix retention, ordinary stream failures, formatting and accounting identities in both backends.

    SOURCE:

    src/Linear_Expression_Impl_defs.hh; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; src/Linear_Expression_Impl.cc; tests/linearexpression1.cc; tests/linearexpressionspec1.cc; tests/linearexpressionbranches1.cc; tests/expressionbackendspec1.cc.

  • 1. Generator kinds and numerical prerequisites UID: PPL-SPEC-000181 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Generator shall describe one of four geometric objects in a declared ambient dimension: an included rational point, a rational closure point, a ray direction or a line direction. For homogeneous integer coefficients ai and positive divisor d, point and closure-point coordinates shall be ai ⁄ d. A line shall admit arbitrary real multiples of its nonzero direction; a ray shall admit nonnegative real multiples. Closure points shall retain their distinct kind and shall not assert boundary inclusion. Internal divisor/strictness fields shall not become public coordinates.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization and require caller synchronization for overlapping modification of an object. Dense and sparse storage shall be supported, with default_representation equal to SPARSE. Computed construction, normalization, transformation and comparison guarantees shall require representability of every evaluated coefficient step/result in the selected profile. Unchecked completion shall not prove those preconditions. Allocation and numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete generator; distinct unchanged sources shall survive failures, while modified destinations shall remain destructible without universal rollback.

    RATIONALE:

    Point inclusion, closure and directional reachability have different geometric meanings even when their coordinate coefficients coincide.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Generator;
    enum Generator::Type { LINE, RAY, POINT, CLOSURE_POINT };
    static constexpr Representation Generator::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Use independent exact rational point coordinates and direction-proportionality checks; distinguish positive ray scales from signed line scales and included points from closure points. Exercise all supported storage choices and trailing coordinates.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • PPL-SPEC-000184
    4. Default generator and shared zero-dimensional origins UID: PPL-SPEC-000184 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction shall create the dimension-zero included origin using requested storage. zero_dim_point() and zero_dim_closure_point() shall return borrowed dimension-zero origins of their respective distinct types, with positive divisor. Shared values shall remain alive until owning-thread finalization. Owned copies shall retain their values independently.

    RATIONALE:

    The origin exists in dimension zero, but included-origin and closure-origin descriptors still have distinct topological roles.

    INTERFACE:
    explicit Generator(Representation r = default_representation);
    static const Generator& Generator::zero_dim_point();
    static const Generator& Generator::zero_dim_closure_point();
    
    VERIFICATION_CRITERIA:

    Check requested/default storage, kinds, dimensions and positive divisors for defaults/shared values and independent copies during balanced initialization.

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • 15. Generator-system hull meaning and construction UID: PPL-SPEC-000195 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Generator_System with lines L, rays R, included points P and closure points C shall generate exactly the real vectors

     ∑p ∈ Pλpp +  ∑c ∈ Cγcc +  ∑r ∈ Rρrr +  ∑l ∈ Lτll, 

    where λp, γc, ρr ≥ 0, τl ∈ ℝ, ∑pλp + ∑cγc = 1 and ∑pλp > 0. Thus a system without an included supporting point shall generate the empty set, even when directions or closure points are stored. Its meaning shall be a generated hull, not a conjunction of point membership conditions.

    Default construction shall have dimension zero and no rows. Singleton construction shall own a copy of its generator and adopt its dimension. Requested storage shall be used, with default SPARSE. zero_dim_univ() shall borrow the singleton included origin generating the universe of the zero-dimensional space until owning-thread finalization. Use/failure prerequisites shall follow 🔗 1. Generator kinds and numerical prerequisites.

    RATIONALE:

    Positive total weight on included points distinguishes an NNC hull from the closed convex hull of closure points alone.

    INTERFACE:
    class Generator_System;
    static constexpr Representation Generator_System::default_representation = SPARSE;
    Generator_System(Representation r = default_representation);
    explicit Generator_System(const Generator& g, Representation r = default_representation);
    static const Generator_System& Generator_System::zero_dim_univ();
    
    VERIFICATION_CRITERIA:

    Check empty, direction-only, closure-only and supported systems with independent low-dimensional generated sets. Include a closed segment, an open segment with interior supporting point, a ray and a line through an offset point; distinguish zero-dimensional empty and universal systems.

    BIBLIOGRAPHY:

    BagnaraHZ05FAC | Section 4.1, Definition 4.2 and Theorem 4.4

    SOURCE:

    src/Generator_defs.hh; src/Generator_inlines.hh; src/Generator.cc; src/Generator_System_defs.hh; src/Generator_System_inlines.hh; src/Generator_System.cc; tests/generatorspec1.cc.

  • 1. Grid-generator values and integer versus continuous displacement UID: PPL-SPEC-000221 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A Grid_Generator shall describe a rational included point, a rational parameter displacement vector, or a continuous line direction, in its public ambient dimension. For a point or parameter with numerators ai and positive divisor d, coordinates shall be ai ⁄ d. Parameters shall retain their exact rational step, including sign and magnitude; integer multiples of that step shall contribute to a generated grid. Lines shall contribute arbitrary real multiples of their direction. Hidden divisor fields shall not be public coordinates.

    Both storage representations shall be supported; default_representation shall be SPARSE. Initialization and synchronization shall follow 🔗 3. Thread initialization, default state and finalization. Computed construction, transformation, scaling and comparison guarantees shall require all evaluated coefficient steps/results to be representable in the selected profile; unchecked completion shall not prove that condition. Allocation/numerical exceptions may propagate. Failed construction shall release resources owned by the incomplete grid generator; distinct unchanged sources shall survive failures, while modified targets shall remain destructible without universal rollback.

    RATIONALE:

    A parameter is a sized displacement vector rather than a scale-free direction. Its exact value is separate from the integer span it contributes to a grid.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Grid_Generator;
    enum Grid_Generator::Type { LINE, PARAMETER, POINT };
    static constexpr Representation Grid_Generator::default_representation = SPARSE;
    
    VERIFICATION_CRITERIA:

    Compare independent rational point/parameter vectors and line proportionality. Distinguish rational/integral displacements, scaled and opposite parameters, continuous lines and integer steps.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation BagnaraDHMZ07 | Section 3, The Generator Representation

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000224
    4. Rational grid-point construction, defaults and shared origin UID: PPL-SPEC-000224 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    grid_point(e,d,r) shall construct the rational point with coordinates ai ⁄ d, ignoring the expression constant, retaining dimension and using requested storage. A negative nonzero divisor shall reverse numerator signs and become positive; common factors may be removed while preserving rational coordinates. Zero divisor shall throw std::invalid_argument. A divisor borrowed from the unchanged input expression shall use its entry value.

    Omitted expression/divisor arguments shall denote the dimension-zero origin and divisor one. Representation-only and expression/representation forms shall use divisor one. Default construction shall produce that origin using requested storage. zero_dim_point() shall borrow the zero-dimensional origin until owning-thread finalization; owned copies shall be independent.

    RATIONALE:

    A rational supporting point fixes a grid offset and differs from a periodic parameter at the same coordinate vector.

    INTERFACE:
    static Grid_Generator Grid_Generator::grid_point(
      const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = default_representation);
    static Grid_Generator Grid_Generator::grid_point(Representation r);
    static Grid_Generator Grid_Generator::grid_point(const Linear_Expression& e, Representation r);
    Grid_Generator grid_point(const Linear_Expression& e = Linear_Expression::zero(),
      Coefficient_traits::const_reference d = Coefficient_one(), Representation r = Grid_Generator::default_representation);
    Grid_Generator grid_point(Representation r);
    Grid_Generator grid_point(const Linear_Expression& e, Representation r);
    explicit Grid_Generator(Representation r = default_representation);
    static const Grid_Generator& Grid_Generator::zero_dim_point();
    
    VERIFICATION_CRITERIA:

    Check all static/free/default forms, positive/negative divisors, origins in different dimensions, exact rational coordinates and shared lifetime, input aliases and zero-divisor rejection.

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc.

  • PPL-SPEC-000235
    15. Grid-generator-system integer-affine span and construction UID: PPL-SPEC-000235 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For lines L, parameters Q and included points P, a Grid_Generator_System shall generate the real vectors

     ∑l ∈ Lτll +  ∑q ∈ Qkqq +  ∑p ∈ Pzpp,   τl ∈ ℝ,  kq, zp ∈ ℤ,   ∑p ∈ Pzp = 1.

    Without a point the generated grid shall be empty, even with stored nonzero lines/parameters. Integer affine combinations of multiple points shall not be replaced by convex combinations. Default construction shall make a zero-dimensional system with no rows; an explicit dimension constructor shall retain its supplied admitted dimension. Singleton construction shall copy its generator and dimension, including a zero parameter. Ordinary insertion shall separately follow 🔗 17. Grid-generator insertion, zero steps and ownership transfer. Requested storage shall be used, with default SPARSE. zero_dim_univ() shall borrow the singleton zero-dimensional origin until owning-thread finalization. Numerical/use/failure prerequisites shall follow 🔗 1. Grid-generator values and integer versus continuous displacement.

    RATIONALE:

    Grid generation combines integer affine offsets and integer parameter steps with continuous line spans; a convex hull would admit incorrect fractional displacements.

    INTERFACE:
    class Grid_Generator_System;
    static constexpr Representation Grid_Generator_System::default_representation = SPARSE;
    explicit Grid_Generator_System(Representation r = default_representation);
    explicit Grid_Generator_System(dimension_type dim, Representation r = default_representation);
    explicit Grid_Generator_System(const Grid_Generator& g, Representation r = default_representation);
    static const Grid_Generator_System& Grid_Generator_System::zero_dim_univ();
    
    VERIFICATION_CRITERIA:

    Check supporting-point absence, rational offsets, half-integer steps, points at zero and two generating even integers, continuous line directions and zero-dimensional empty/universal systems against independent lattice equations.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2.4, equation (1) and parameter representation BagnaraDHMZ07 | Section 3, The Generator Representation

    SOURCE:

    src/Grid_Generator_defs.hh; src/Grid_Generator_inlines.hh; src/Grid_Generator.cc; src/Grid_Generator_System_defs.hh; src/Grid_Generator_System_inlines.hh; src/Grid_Generator_System.cc; tests/gridgeneratorspec1.cc; tests/gridgeneratorbranches1.cc.

  • 1. Initialization owners and automatic C++ initialization UID: PPL-SPEC-000031 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Translation-unit ownership keeps initialized facilities available during static and automatic object lifetimes. First/last-owner and thread-exit conditions make the ownership boundary and its synchronization explicit.

    INTERFACE:

    Public header: <ppl.hh>. Initialization-owner declarations:

    namespace Parma_Polyhedra_Library {
      class Init {
      public:
        Init();
        ~Init();
      };
    }
    

    The header-selection macro is PPL_NO_AUTOMATIC_INITIALIZATION; it shall be selected consistently across participating C++ client translation units before their first public-header inclusion.

    VERIFICATION_CRITERIA:

    Compile and run a public-header client with initialized objects in more than one translation unit, including their static construction and destruction. Exercise nested explicit owners and confirm that destroying an inner owner preserves live models, formatter selection and rounding state. Exercise repeated whole-library lifetimes after all dependent objects have been destroyed. Inspect first/last-owner transitions and configuration-dependent ownership. Inject supported construction failures and check acquired-resource cleanup, formatter, precision and rounding restoration, and absence of an owner from a failed construction. Check restoration of a preceding signal action and preservation of caller-owned timer state and pending notifications on failure. Review guard noncopying and serialized first/last-owner prerequisites. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/initializer.hh: per-translation-unit automatic owner. src/Init_defs.hh and src/Init.cc: initialization-owner lifetime. tests/initialization1.cc: nested owners and repeated explicit lifetimes. tests/initialization2.cc and tests/initialization2_aux.cc: automatic initialization across translation units. tests/initialization3.cc: first-owner failure, resource cleanup and retry. tests/initialization4.cc: native rounding-initialization failure fixture. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • PPL-SPEC-000032
    2. Explicit whole-library initialization and finalization UID: PPL-SPEC-000032 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    An explicit initialization mode supports applications and bindings that own the library lifetime themselves. Idempotent entry and a single release avoid interpreting repeated requests as additional independent ownership.

    INTERFACE:

    Public whole-library entry points:

    namespace Parma_Polyhedra_Library {
      void initialize();
      void finalize();
    }
    

    Their definitions are selected by the public-header initialization macro as described in 🔗 1. Initialization owners and automatic C++ initialization.

    VERIFICATION_CRITERIA:

    Build a client with automatic initialization disabled and no automatically initializing helper translation unit. Check repeated initialization while a custom formatter, precision and live numerical models are present; confirm that one finalization ends that owned lifetime. Repeat balanced lifetimes and check fresh default state. Inject a first-owner allocation failure and confirm that a later initialization establishes usable state. In a separate automatically initialized client, call all four entry points while models and a custom formatter are live and confirm that they do not alter the active lifetime.

    SOURCE:

    src/initializer.hh: public entry points and macro-dependent no-ops. src/Init.cc: explicit-owner acquisition and release. tests/initialization1.cc: explicit initialization and repeated lifetimes. tests/initialization2.cc: automatic-mode no-op entry points. tests/initialization3.cc: explicit acquisition failure and successful retry. tests/initialization4.cc: failure after native rounding initialization.

  • PPL-SPEC-000033
    3. Thread initialization, default state and finalization UID: PPL-SPEC-000033 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    Constants, formatter callbacks, irrational precision and saved rounding state must have an explicit thread lifetime. Idempotent entry preserves active state; reentry after cleanup deliberately establishes a new default state.

    INTERFACE:

    Public thread-lifetime declarations:

    namespace Parma_Polyhedra_Library {
      class Thread_Init {
      public:
        Thread_Init();
        ~Thread_Init();
      };
      void thread_initialize();
      void thread_finalize();
    }
    

    The entry-point functions act only when automatic initialization was disabled before public-header inclusion. Thread_Init guards also support worker entry in automatically initialized C++ clients.

    VERIFICATION_CRITERIA:

    Check usable numerical constants and representative expressions and domains within explicitly initialized thread lifetimes. Set a custom formatter and precision, repeat thread entry, and confirm that active state is unchanged. Finalize after destroying dependent objects, reenter, and confirm the default formatter and precision. In thread-safe configurations run two initialized workers while preserving distinct caller and worker state; check rounding restoration on worker exit and caller-state isolation. Exercise both direct guards and the manual entry protocol in their supported contexts. Review partial-construction cleanup with injected failures and object cleanup before thread and whole-library finalization. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Init_defs.hh and src/Init.cc: Thread_Init and initialized state. src/initializer.hh: manual thread entry and exit. src/thread_safe.hh: configuration-dependent thread-local storage. tests/initialization1.cc: manual thread entry, reentry and worker isolation. tests/initialization2.cc: direct worker guard within an automatic lifetime. tests/initialization3.cc: manual and direct thread-entry failure and retry. tests/initialization4.cc: failure after native thread rounding initialization. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • 4. Rounding-state exchange during an initialized thread lifetime UID: PPL-SPEC-000034 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    A client may need its own rounding direction between PPL computations. Saving once per thread lifetime gives restoration a stable meaning across repeated exchanges.

    INTERFACE:

    Public rounding exchange declarations:

    namespace Parma_Polyhedra_Library {
      void set_rounding_for_PPL();
      void restore_pre_PPL_rounding();
    }
    

    Availability of platform rounding control is selected by the configured PPL_CAN_CONTROL_FPU value.

    VERIFICATION_CRITERIA:

    For every supported incoming rounding direction, initialize the thread, check upward rounding and a representative upward-rounded computation, exchange to the saved direction and back repeatedly, and confirm restoration after finalization. Include nested library owners to ensure that they do not replace the saved direction. In a thread-safe configuration check worker restoration and isolation from the calling thread. Compile and inspect the no-control configuration so that no unsupported rounding-control operation is introduced. Keep rounding direction checks distinct from claims about the complete floating-point environment. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Init_defs.hh and src/Init_inlines.hh: rounding-exchange interface. src/Init.cc: saving, establishing and restoring thread rounding direction. tests/initialization1.cc: repeated lifetimes and direction exchanges. tests/initialization2.cc: restoration by a direct worker guard. tests/initialization3.cc: restoration after failed thread construction. tests/initialization4.cc: restoration after native rounding state changes. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • 5. Interruptible thread registration and request lifetime UID: PPL-SPEC-001733 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP, THREAD_SAFE_BUILD VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    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.

    RATIONALE:

    A cancellation request refers to another thread's thread-local state, whose address must remain valid during the synchronized lookup and request.

    INTERFACE:

    Namespace Parma_Polyhedra_Library, in thread-safe builds:

    template <typename Function>
    Implementation::Interruptible<Function> make_interruptible(Function f);
    bool interrupt_thread(const std::thread& target,
                          const Throwable* const throwable);
    

    Function shall be copy-constructible and callable through a const object with the supplied argument types.

    Internal Implementation::Interruptible and Abandon_Init own the registration interval, sharing one synchronized thread-id registry.

    VERIFICATION_CRITERIA:

    Use synchronized workers to check accepted requests, rejection for default, unregistered and joined threads, exception-unwinding removal and a second lifetime without a stale request. Check that retracting a registration request and ending the registration preserve a separately published request. Keep the Throwable alive until join. Inspect mutex coverage, destruction order and request delivery at native checkpoints.

    SOURCE:

    src/make_threadable.hh; src/make_threadable.cc; tests/Polyhedron/threadsafe2.cc.

  • 1. Affine value, numerical prerequisites and shared zero UID: PPL-SPEC-000071 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A live Linear_Expression of space dimension d, with homogeneous coefficients ai and inhomogeneous term b, shall denote the function E(x) = b + ∑d − 1i = 0aixi on rational valuations. The constant term shall not occupy a coordinate. Trailing zero coefficients shall remain part of the declared ambient dimension.

    Use shall satisfy 🔗 3. Thread initialization, default state and finalization. The caller shall synchronize access to an object while another operation modifies it. The valid representations shall be DENSE and SPARSE; default_representation shall be SPARSE. zero() shall return a borrowed, constant expression of dimension zero and value zero. The returned object shall remain alive until its owning initialized thread is finalized.

    The computed arithmetic guarantees of 🔗 7. Affine addition, subtraction and negation, 🔗 8. Integral scalar multiplication and coefficient-wise division, 🔗 9. Explicit scaled accumulation, combination and elimination and 🔗 10. Coefficient normalization and sign normalization shall require every evaluated coefficient arithmetic step and result to be representable in the selected coefficient profile. Checked arithmetic may report overflow; unchecked completion shall not prove that this precondition held. Allocation failures may propagate. Failed construction shall release resources owned by the incomplete expression. Distinct, unchanged operands shall remain valid after a reported failure. Other modified objects shall be destructible; no universal rollback is promised.

    RATIONALE:

    An expression has an affine value independently of its storage or any constraint later formed from it. Shared numerical prerequisites delimit arithmetic guarantees without weakening that value meaning.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    class Linear_Expression;
    enum Representation { DENSE, SPARSE };
    static constexpr Representation Linear_Expression::default_representation = SPARSE;
    static const Linear_Expression& Linear_Expression::zero();
    
    VERIFICATION_CRITERIA:

    Evaluate explicit coefficient vectors independently over rational valuations, including dimension zero and trailing zeros. Check the shared zero during a balanced initialized lifetime and verify both supported representations. Inspect construction cleanup and failure paths without inferring unpromised rollback.

    SOURCE:

    src/Linear_Expression_defs.hh; src/Linear_Expression_inlines.hh; src/Linear_Expression.cc; src/Linear_Expression_Impl_inlines.hh; src/Linear_Expression_Impl_templates.hh; tests/linearexpressionspec1.cc; tests/linearexpressionfailure1.cc.

  • 1. Interval-linear-form meaning and numerical prerequisites UID: PPL-SPEC-000921 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a selected interval type C, a live Linear_Form<C> of dimension d, with coefficient intervals Ai and constant interval B, shall represent the interval-affine expression B + ∑d − 1i = 0Aixi. At each real valuation x, it shall denote the set of sums obtained by choosing each coefficient and the constant independently from their intervals. Repeated use of an interval object shall not establish correlations between those choices. The constant shall occupy no variable coordinate. The declared dimension shall retain trailing zero coefficients.

    C shall provide the interval construction, copying, predicates and arithmetic required by the selected operation. Stored values shall satisfy its initialization, canonical-value and metadata prerequisites. Each successful arithmetic operation shall retain the interval operations' enclosure guarantees and selected numerical-profile conditions; no common optimality or finite-bound guarantee shall be inferred. Native floating-point arithmetic shall require the selected supported boundary format and its rounding-state prerequisites. Storage access shall add no numerical rounding requirement. Shared-facility initialization shall be required where the selected coefficient operation, expression conversion or output formatter requires it; unrelated storage shall add no initialization owner.

    Callers shall synchronize access against overlapping modification and obey shared-temporary restrictions in the selected configuration. Allocation and coefficient exceptions may propagate. Failed construction shall release resources owned by the incomplete form. Unchanged operands shall remain unchanged; modified destinations shall remain destructible, with no universal rollback guarantee.

    RATIONALE:

    Independent interval choices distinguish interval algebra from symbolic cancellation and make the numerical assumptions of every operation explicit.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> class Linear_Form;
    
    VERIFICATION_CRITERIA:

    Derive affine values with independent rational coefficient/valuation choices; check zero dimensions, trailing zeros, uncertain signs, native enclosures and source preservation. Inspect partial-construction cleanup and selected scalar/runtime prerequisites.

    BIBLIOGRAPHY:

    Mine04 | Whole work (background on floating-point expressions modeled by interval linear forms).

    SOURCE:

    src/Linear_Form_defs.hh; src/Linear_Form_inlines.hh; src/Linear_Form_templates.hh; tests/linearformspec1.cc; tests/linearformstorage1.cc; tests/linearformscalar1.cc; tests/linearformvariables1.cc; tests/linearformoutput1.cc; tests/linearformlegacy1.cc; tests/linearformpublic1.cc; tests/inactiveboundcodec.hh.

  • 1. Public partial coordinate-map type and valid use UID: PPL-SPEC-000001 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public C++ interface shall expose Partial_Function as a value type representing a finite injective partial map M from dimension indices to dimension indices. Each mapped source shall have exactly one image, and distinct mapped sources shall have distinct images. Neither a stored source nor a stored image shall equal the reserved value not_a_dimension(), the maximum value of dimension_type. An unmapped index shall have no image.

    The map shall impose no implicit ambient dimension, contiguity of mapped indices, or requirement that its images cover a contiguous range. Limits on achievable storage shall remain distinct from the index type's value range and from the coordinate limits of numerical objects consuming a map. In particular, the insertion range shall not be narrowed to the smaller range accepted by Variable formatting.

    Operations on existing objects shall require live, valid maps. Successful moves between distinct objects shall leave the source as a valid empty map, as defined by 🔗 9. Move construction and empty source and 🔗 10. Move assignment and empty source. Within the library's supported thread-use contexts, callers shall prevent unsynchronized mutation of an instance while another call observes, copies or prints it, and shall serialize mutations of that instance. No additional concurrent-use regime shall be inferred from the type being a value type.

    RATIONALE:

    A coordinate-map value has a meaning independent of its storage extent and of the domain that consumes it. Its index range, storage capacity, printing range and consumer limits are distinct.

    COMMENT:

    Map storage uses dimension indices independently of configured coefficient arithmetic and rounding modes. Diagnostic printing uses the formatter and thread state described by 🔗 8. Coordinate-map diagnostic printing and output failures.

    INTERFACE:

    Public header: <ppl.hh>. Public type declaration:

    namespace Parma_Polyhedra_Library {
      class Partial_Function;
    }
    

    Member declarations in the following contracts belong to this class. Indices use the public dimension_type and not_a_dimension() names.

    VERIFICATION_CRITERIA:

    Compile representative C++20 clients against the configured installed public header and matching library. Review the generated public exposure and configuration-dependent assertion layout. Compare valid maps against an independent finite collection of distinct source/image pairs, including sparse domains, noncontiguous images and image zero. Review the covered-use, post-failure and synchronization conditions against the operation contracts. Do not infer an achievable allocation for every value of dimension_type or unrestricted concurrency from successful sequential tests.

    SOURCE:

    src/Partial_Function_defs.hh: public type and member declarations. src/globals_types.hh and src/globals_inlines.hh: dimension_type and reserved index. src/Makefile.am: Partial_Function headers in generated public ppl.hh. tests/partialfunction2.cc: direct finite-map query and copying scenarios. tests/partialfunction3.cc: installed-public-header C++20 client.

  • 8. Coordinate-map diagnostic printing and output failures UID: PPL-SPEC-000008 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Printing shall observe a valid map under 🔗 1. Public partial coordinate-map type and valid use without changing its represented mapping. Calls shall require the library and calling thread's applicable initialization protocol to have established a valid active Variable output function under 🔗 7. Active Variable formatter and initialized thread state and 🔗 3. Thread initialization, default state and finalization. Callers shall obey the supported thread regime and synchronize changes to the active formatter and access to a shared stream; the formatter shall not mutate the printed map during the call.

    When the map is empty and output succeeds, print shall write the literal text "empty", a newline and a flush. For a nonempty map whose source and image indices are all constructible as Variable objects, successful output shall process pairs in increasing source order. For each pair it shall write the source Variable using the Variable formatter active for that write, the literal separator " --> ", the image Variable using the formatter active for its write, and a trailing newline. Each Variable write shall use the formatter then active in the calling thread where formatting state is thread-specific; names shall not be fixed independently of it. A callback's permitted change to that formatting state may therefore affect subsequent Variable writes. Text insertions shall honor the stream's current formatting state. Specified literals identify the inserted character sequences, not a canonical byte layout independent of that state. Printing shall not promise restoration of formatting state changed by a formatter.

    A map index outside Variable's accepted identifier range shall be permitted to cause std::length_error during printing, without changing the map. Stream, formatter and resource failures may also propagate their C++ exceptions. Stream failure without an enabled exception shall be observable through the stream state; a normal void return shall not alone establish complete output. After any such failure the output may be partial, but the map shall remain valid and unchanged. Exact diagnostic messages are not prescribed.

    RATIONALE:

    Diagnostic printing depends on the map and active naming convention. Storage-valid map indices can exceed the printable Variable range. Stream failure can occur after earlier output, leaving partial output.

    COMMENT:

    Diagnostic output has no reloadability or cross-version stability guarantee. Formatting depends on the active output function and its thread context.

    INTERFACE:

    Public const member declaration:

    void print(std::ostream& s) const;
    

    The stream shall be live and usable under its own C++ contract. Complete output requires the stream to continue accepting output and the formatter to complete its writes. A Variable identifier shall be strictly smaller than Variable::max_space_dimension(); this additional print limit shall not change the valid insertion range in 🔗 3. Injective insertion and failure atomicity.

    VERIFICATION_CRITERIA:

    Check empty output including flush, and independently derive the ordered pair sequence for sparse maps. Check default formatting and configured field width and fill for both empty and nonempty maps, and integer formatting for nonempty maps, without assuming format-independent bytes. Exercise the default and a custom Variable formatter under the applicable initialization/thread protocol, including a callback that changes the formatter for subsequent writes. With a small source index, insert image not_a_dimension()-1 and check the admitted std::length_error without changing the map. Use failing streams with and without enabled exceptions and a throwing formatter; check stream state, allowed partial output and continued map validity. Review synchronization and restore any formatter/thread state used by verification activities.

    SOURCE:

    src/Partial_Function.cc: print ordering, separator, empty flush and Variable construction. src/Variable_inlines.hh and src/Variable.cc: accepted Variable identifiers and active output function. src/Init.cc and src/Init_inlines.hh: initialization of applicable Variable formatting state. tests/partialfunction2.cc: empty and default-name output checks in the direct Partial_Function scenarios. tests/partialfunction2.cc: partial_function_empty_print_flushes, partial_function_print_uses_current_variable_formatter, partial_function_print_honors_stream_formatting, partial_function_print_failures_preserve_map_and_formatter_state and partial_function_print_keeps_thread_formatters_independent.

  • PPL-SPEC-000009
    9. Move construction and empty source UID: PPL-SPEC-000009 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Move construction from a valid map under 🔗 1. Public partial coordinate-map type and valid use shall create a distinct valid map with exactly the source's mapping on entry and shall leave the source as a valid empty map. The source shall support the same queries, insertions, assignments and destruction as any other empty map. Subsequent valid changes to either object shall not change the other's map.

    If construction of the destination's empty storage fails, resources acquired for the incomplete destination shall be released and the source shall remain unchanged and valid. After the empty storage has been constructed, transferring the represented map shall not allocate storage or throw.

    The move constructor's exception specification shall be nonthrowing exactly when default construction of its configured storage containers is nonthrowing, as expressed by the declaration below. The debug codomain container shall contribute to that condition only when present.

    RATIONALE:

    Transferring a coordinate map avoids copying its stored pairs. An empty, reusable source preserves the value-type invariants after transfer. The exception specification accounts for the containers' actual construction guarantees instead of requiring every standard-library implementation to construct an empty container without throwing.

    INTERFACE:

    Public move constructor declaration:

    Partial_Function(Partial_Function&& source)
      noexcept(noexcept(std::vector<dimension_type>())
    #ifndef NDEBUG
               && noexcept(std::set<dimension_type>())
    #endif
               );
    
    VERIFICATION_CRITERIA:

    Move-construct empty and sparse nonempty maps, including image zero. Compare the destination with an independent pair collection and check source emptiness, absent-output preservation and the defined empty maximum-query exception. Insert into the source after transfer and check independence from the destination. Inspect member construction and representation exchange, including cleanup and source preservation if an actual empty-storage allocation fails. Compare allocation observations during move construction with those for default construction of the same configured empty storage, and check both empty and nonempty sources. Inject failures at any observed empty-storage allocation stage and check source preservation. Check the exception specification in configurations with and without the debug codomain container, against the configured containers' construction traits.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: move constructor and representation exchange. tests/partialfunction2.cc: partial_function_move_construction_transfers_and_empties_source. tests/partialfunction1.cc: move_construction_allocates_only_for_empty_storage.

  • PPL-SPEC-000010
    10. Move assignment and empty source UID: PPL-SPEC-000010 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Move assignment between distinct valid maps under 🔗 1. Public partial coordinate-map type and valid use shall replace the target's mapping with exactly the source's mapping on entry and leave the source as a valid empty map. Both maps shall support subsequent queries, insertions, assignments and destruction. Subsequent changes to either map shall not change the other's represented value.

    Self-move-assignment shall leave the map unchanged. Move assignment shall return a reference to its target, including self-move-assignment. It shall not allocate storage or throw. Storage retained by an empty map shall remain owned by that map and shall not imply the presence of any mapped pair.

    RATIONALE:

    Move assignment permits reuse of an existing target without copying pairs. Defined empty-source and self-assignment behavior preserves map validity and allows continued use of both objects without inspecting storage internals.

    INTERFACE:

    Public move assignment declaration:

    Partial_Function& operator=(Partial_Function&& source) noexcept;
    
    VERIFICATION_CRITERIA:

    Move-assign empty and sparse maps into empty and nonempty targets. Check exact target replacement, source emptiness and returned-reference identity. Reuse both objects with valid insertions and queries, including a source that receives storage previously owned by the target. Check self-move-assignment through a reference alias and chained assignments whose selected overloads are move assignments. Check the nonthrowing exception specification and arm allocation failure during assignment to check absence of allocation, including self-assignment and empty and nonempty source/target combinations. Inspect clearing and representation exchange.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: move assignment and representation exchange. tests/partialfunction2.cc: partial_function_move_assignment_replaces_and_empties_source. tests/partialfunction1.cc: move_assignment_does_not_allocate.

  • 1. Threshold-ordered pending events and caller prerequisites UID: PPL-SPEC-000801 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_List<Traits> shall own a sequence of active event nodes and a separate pool of reusable inactive nodes. Each active event shall contain an owned threshold value and borrowed handler/expired-flag bindings. Traits::less_than shall define a stable strict weak order on admitted threshold values. Threshold copy construction, assignment, destruction and that comparison shall not throw; selected threshold operations shall satisfy their own validity and resource prerequisites.

    Clients shall synchronize access and retain the noncopying owning-list conditions of 🔗 5. Empty owning-list construction and remaining-node destruction. Active node positions shall belong to one list and remain valid only until their event is erased or their owner destroyed. Handlers and flags shall remain alive while their event is active or a borrowed reference is accessed. Inactive pooled nodes may retain old pointer values without accessing those external objects; their old external bindings need not outlive the pool. The queue shall not require global PPL initialization beyond the selected threshold's own needs. Any enclosing watcher interface shall retain its additional thread/signal restrictions.

    RATIONALE:

    Queue ownership, threshold ordering and external notification-object lifetimes have distinct scopes, especially after cancellation recycles a node.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    template <typename Traits> class Pending_List;
    template <typename Threshold> class Pending_Element;
    
    VERIFICATION_CRITERIA:

    Compare independent ordered event models, separate owners, borrowed identities and pool lifetimes with nonthrowing threshold fixtures and no library initialization.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000802
    2. Pending-element construction and embedded-link lifetime UID: PPL-SPEC-000802 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Pending_Element construction shall copy the supplied threshold and bind the supplied handler and flag by reference identity. It shall not invoke the handler, modify the flag or retain a reference to the caller's threshold object. The selected threshold shall satisfy 🔗 1. Threshold-ordered pending events and caller prerequisites.

    The newly constructed element's inherited links shall require binding into a valid ring before traversal, unlinking or destruction, retaining 🔗 2. Embedded-node construction and link initialization. Queue insertion shall establish that binding before exposing the element. A directly constructed element shall be attached by its caller before destruction; completed linked-element destruction shall retain the nonthrowing threshold lifetime and embedded- node contract.

    RATIONALE:

    Attribute construction alone does not initialize the inherited embedded-node links.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_Element(const Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Construct directly into an owning embedded list with a nondefault-constructible threshold; verify the independent threshold copy, borrowed identities, no notification and completed-node destruction.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000803
    3. Element attribute reassignment without relinking UID: PPL-SPEC-000803 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    assign shall replace the owned threshold value and borrowed handler/ flag bindings with the supplied attributes, preserving the element's existing link position. It shall not allocate an event node, invoke a handler or reset either flag. The supplied threshold may alias this element's current threshold; self-value assignment shall retain its meaning. Callers reassigning active elements shall preserve the pending list's ordering before using its ordinary operations. Pooled elements shall be rebound before exposure as new active events.

    RATIONALE:

    Pool reuse requires replacing every event attribute without changing the detached node ownership protocol.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    void assign(const Threshold& deadline, const Handler& handler,
                bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Check every old/new handler/flag pairing, self-borrowed deadline assignment, unchanged node links and no handler/flag side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000804
    4. Threshold, handler and expired-flag reference access UID: PPL-SPEC-000804 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    deadline() shall return a const reference to the owned threshold; handler() shall return a const reference to the bound handler; expired_flag() shall return a mutable reference to the bound Boolean even through a const element wrapper. Access shall preserve all attributes and links. A reference to the threshold shall require the node and threshold object to remain alive, and shall observe any later admitted reassignment. Handler/flag references shall retain the external object's lifetime independently of the element wrapper. Invoking or modifying a returned external object shall be a caller action, not an automatic queue notification.

    RATIONALE:

    Event access must preserve actual external identities and distinguish reference access from notification scheduling.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    const Threshold& deadline() const;
    const Handler& handler() const;
    bool& expired_flag() const;
    
    VERIFICATION_CRITERIA:

    Check exact types/addresses through const and mutable wrappers, independently copied thresholds, explicit caller notification and direct flag mutation.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000805
    5. Pending-element attribute checker scope UID: PPL-SPEC-000805 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted completed element, OK() shall return true without modifying attributes or links. It shall not validate threshold positivity, current-time expiry, external handler policy or list sorting. Its use shall not dereference a handler or flag merely to validate their stored pointer values. This element checker shall not establish the inherited ring's structural validity or make a stale active-event position usable.

    RATIONALE:

    The element checker supplies an embedded-list hook while deadline validity and ownership remain caller/queue obligations.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check live elements before/after attribute replacement and inactive pooled nodes with expired external lifetimes, without accessing stale external bindings.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000806
    6. Queue construction and complete active/free ownership cleanup UID: PPL-SPEC-000806 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall create a valid empty active sequence and empty free pool. Destruction shall release every owned active and pooled node and its threshold exactly once. It shall not delete borrowed handlers or flags, invoke notification actions or change external expired flags. Independent queue owners shall have independent nodes and lifetimes. No supported owner copy/assignment shall be required under 🔗 1. Threshold-ordered pending events and caller prerequisites.

    RATIONALE:

    Both active and recycled nodes remain queue-owned, while notification objects remain externally owned.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    Pending_List();
    ~Pending_List();
    
    VERIFICATION_CRITERIA:

    Count threshold construction/destruction across mixed active/free owners, empty owners and separate queues; verify no external handler destruction or notification.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000807
    7. Sorted insertion and equivalent-deadline multiplicity UID: PPL-SPEC-000807 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Successful insertion shall add exactly one active event with the supplied attributes and return its live position. Traversing the active sequence shall produce nondecreasing threshold order under the supplied strict weak comparison. Every previously active event shall remain with its prior threshold, handler, flag and node identity. Distinct events with equivalent thresholds shall all remain present; their relative order shall not be required by this interface. Insertion shall not act on handlers or modify external flags. Threshold values need not be positive or related to a clock merely to use this internal queue.

    RATIONALE:

    Ordered pending storage supports both timer and computational-weight clients without imposing one client's duration validation on the generic container.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Compare all small insertion permutations, descending histories, duplicate/equivalent thresholds, zero thresholds and exact event identities with an independent ordered model.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000808
    8. Insertion with borrowed active attributes UID: PPL-SPEC-000808 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An insertion's threshold argument may borrow the threshold of an already active element; insertion shall preserve that source and copy its value into the new event. Handlers and flags may be shared among several active events. Their reference identities and preexisting flag values shall remain unchanged by insertion. These aliases shall not permit reuse of erased positions as active-event sources or destruction of external objects still referenced by active events.

    RATIONALE:

    Watchdog records may share external notification state or use an existing active threshold without transferring its ownership.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Insert from each active threshold reference into fresh and recycled nodes, share handler/flag objects and verify all source values and bindings survive.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • 9. Active-event erasure and successor preservation UID: PPL-SPEC-000809 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Erasure shall require a live active position belonging to this queue. It shall remove exactly that event from the active sequence, preserve every other event and its ordering/identity, and return the removed event's next active position or this queue's end. It shall retain the removed node in the reusable pool without destroying its threshold, notifying its handler or changing its flag. The removed position shall cease to denote an active event even while the underlying node remains allocated. Erasure shall not allocate.

    RATIONALE:

    Cancellation removes a logical event while retaining node storage for later low-allocation use.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Erase every possible active position, singleton and repeated front/back histories; check exact successor, unchanged surviving identities and attributes, no allocation or notification and retained threshold lifetimes.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000810
    10. Recycled-node insertion and allocation-free reuse UID: PPL-SPEC-000810 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When inactive nodes are available, insertion shall reuse one of them rather than allocate a new node. It shall replace every event attribute before linking the reused node into the sorted active sequence. The old external handler/flag bindings shall not be accessed during reuse. No particular selection order among available free nodes shall be required. Without an inactive node, insertion shall allocate a new properly aligned event node. Threshold operation costs shall remain those of the admitted nonthrowing threshold type.

    RATIONALE:

    Recycling reduces later event-node allocation while requiring complete replacement of old notification bindings.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    
    VERIFICATION_CRITERIA:

    Exhaust and replenish pools, disable allocation during reuse, check reused node-address membership and over-alignment, and replace bindings whose former external objects have been destroyed.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000811
    11. Active-event iterator ranges and borrowed traversal UID: PPL-SPEC-000811 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    iterator and const_iterator shall retain the corresponding embedded-list iterator types and 🔗 7. Embedded-list iterator borrowing and valid linked positions, 🔗 8. Embedded-list position binding and lifetime, 🔗 9. Embedded-list typed element access, 🔗 10. Embedded-list bidirectional traversal and 🔗 11. Embedded-list position equality. The public nonconst begin/end members shall bound exactly the active sequence; free nodes shall never appear in that range. End shall be comparable and support retreat when nonempty, but not dereference. Positions shall preserve node identity under other event insertion/erasure, subject to 🔗 1. Threshold-ordered pending events and caller prerequisites. Clients shall not change embedded links or break active threshold ordering through the borrowed element access.

    RATIONALE:

    Only active events participate in scheduling traversal; cached storage and borrowed-node access must not extend event validity.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    using iterator = typename EList<Pending_Element<typename Traits::Threshold>>::iterator;
    using const_iterator = typename EList<Pending_Element<typename Traits::Threshold>>::const_iterator;
    iterator begin();
    iterator end();
    
    VERIFICATION_CRITERIA:

    Compare forward/backward prefix/postfix histories, separate cursor copies and exact event addresses before/after unrelated insertions and erasures; verify free nodes are excluded.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000812
    12. Active emptiness independent of retained pool storage UID: PPL-SPEC-000812 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    empty() shall return true exactly when no active events remain. An empty active sequence shall have equal begin/end positions even if inactive node storage is retained. Emptiness shall not imply that all allocated event nodes have been released. The query shall not notify handlers, modify flags or change the active/free node ownership.

    RATIONALE:

    Logical pending-event emptiness and physical pool emptiness are different resource states.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool empty() const;
    
    VERIFICATION_CRITERIA:

    Check construction, every erase-to-empty history, retained threshold/node counts and subsequent allocation-free insertion.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000813
    13. Queue node checks and threshold-order validation UID: PPL-SPEC-000813 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For safely inspectable active/free rings, OK() shall require both embedded lists' element checks and nondecreasing active threshold order. An empty active list shall pass when its active/free node checks pass. Free nodes shall not require threshold sorting. Checking shall not invoke handlers, dereference expired external bindings, modify flags or change ownership. Corrupted embedded links shall remain outside the checker domain; this operation shall not provide memory-safe diagnosis of arbitrary ownership corruption. Clients may check and repair a threshold-order violation before resuming ordinary queue operations.

    RATIONALE:

    Queue consistency adds threshold order to the embedded-node hooks without validating canceled notification objects or arbitrary corrupted memory.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check empty/singleton/sorted states, every adjacent valid-ring order violation and repaired order, unsorted free-node histories and absence of external notification side effects.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000814
    14. Insertion-allocation failure preservation and retry UID: PPL-SPEC-000814 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the nonthrowing threshold and comparison prerequisites of 🔗 1. Threshold-ordered pending events and caller prerequisites, a reported event-node allocation failure shall leave the active sequence, free pool, all existing event attributes, handler bindings and flag values unchanged. No incomplete event node shall remain owned or linked. The same queue shall permit a later successful insertion and ordinary erasure. Erasure and insertion using an available pooled node shall not require an event-node allocation. These guarantees shall not promise recovery from violated threshold or linking preconditions.

    RATIONALE:

    Allocation occurs before an otherwise nonthrowing insertion can commit a new active event.

    INTERFACE:

    Internal source headers: Pending_List_defs.hh and Pending_Element_defs.hh. Names belong to Parma_Polyhedra_Library::Implementation::Watchdog. Members for element contracts apply to Pending_Element<Threshold>; queue contracts apply to Pending_List<Traits>.

    iterator insert(const typename Traits::Threshold& deadline, const Handler& handler,
                    bool& expired_flag);
    iterator erase(iterator position);
    
    VERIFICATION_CRITERIA:

    Fail the observed new-node allocation for empty and populated owners, verify complete event/address/flag/resource preservation, retry insertion and then exercise allocation-disabled pool reuse.

    SOURCE:

    src/Pending_List_defs.hh; src/Pending_List_inlines.hh; src/Pending_List_templates.hh; src/Pending_Element_defs.hh; src/Pending_Element_inlines.hh; src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_templates.hh; src/Watchdog.cc; tests/pendinglistspec1.cc; tests/pendinglist1.cc.

  • PPL-SPEC-000891
    1. Temporary-cache values, leases and element prerequisites UID: PPL-SPEC-000891 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal temporary mechanism shall manage live objects of the selected type T, either through a pool-backed lease or a local value holder. Each selected operation shall require the element construction, destruction and resource capabilities it actually invokes; copying or moving T shall not be required merely to obtain, use or return a pooled item. Element destruction shall not throw. Clients shall retain T's own numerical/runtime prerequisites. No additional global PPL initialization shall be required for unrelated element types.

    An active pool lease shall give its caller exclusive use of that item's element value until release. A released item shall belong to the cache, and the caller shall not keep accessing it through an old reference. Pool operations that affect a common free list shall not overlap without caller synchronization. Context/teardown conditions shall retain 🔗 12. Cache contexts, teardown and retained storage lifetime.

    RATIONALE:

    Temporary reuse needs ownership and value-lifetime rules independently of any coefficient type.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    template <typename T> class Temp_Reference_Holder;
    template <typename T> class Temp_Value_Holder;
    
    VERIFICATION_CRITERIA:

    Instantiate noncopyable, resource-owning and over-aligned element types without PPL initialization; check unique active leases, borrowed references and supported context histories.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000892
    2. Slow-copy trait selection and built-in GMP classifications UID: PPL-SPEC-000892 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Slow_Copy<T> shall classify ordinary types as false unless a supported specialization selects otherwise. Its GMP integer and rational specializations shall classify mpz_class and mpq_class as true. The classification shall select storage strategy under 🔗 9. Dirty temporary storage strategy; it shall not itself construct, copy, move or initialize an element object. A selected user specialization shall be visible before the corresponding temporary-holder instantiation.

    RATIONALE:

    The storage choice depends on an explicit type trait rather than a runtime guess or extra element copy.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> struct Slow_Copy;
    template <> struct Slow_Copy<mpz_class>;
    template <> struct Slow_Copy<mpq_class>;
    
    VERIFICATION_CRITERIA:

    Check default/GMP/user-specialized trait values and resulting holder bases with type traits, including noncopyable test elements.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000893
    3. Obtaining a fresh or retained pool item UID: PPL-SPEC-000893 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::obtain() shall return a reference to a live item exclusively leased from the calling context's pool. If no cached item is available, it shall allocate a new item and value-initialize its T object. Otherwise it shall remove one cached item from the free pool without reconstructing, copying or resetting its T value. Different simultaneously active leases shall refer to different items. No ordering among several available cached items shall be required. Allocation or element-construction failure shall retain 🔗 11. Allocation and element-construction failure cleanup.

    RATIONALE:

    A dirty temporary may retain a prior value, while a newly allocated item has a distinct construction path.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static Temp_Item& obtain();
    
    VERIFICATION_CRITERIA:

    Compare active item identity sets and exact tracked construction counts; exercise empty/nonempty pools, native value initialization, retained values and failed fresh allocation/construction.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000894
    4. Returning a lease without destroying its value UID: PPL-SPEC-000894 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::release(item) shall return one currently active lease to the calling context's free pool without destroying or resetting its T object or allocating another item. Its value shall remain owned by the cache for later reuse or cleanup. The caller shall release each lease exactly once, shall not release an already cached/dead item, and shall cease access through its old lease. A serialized cross-context handoff shall be admitted when T permits it and the item is returned to a live destination context under 🔗 12. Cache contexts, teardown and retained storage lifetime; returning an item shall not depend on an inaccessible origin-thread identifier.

    RATIONALE:

    Returning storage transfers it to the current cache without ending the element lifetime or requiring a new allocation.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static void release(Temp_Item& item);
    
    VERIFICATION_CRITERIA:

    Disable allocation during returns/reuse, check retained values and construction/destruction counts, exercise several return orders and a type-permitted serialized lease handoff.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 5. Qualified item reference and admitted borrowing UID: PPL-SPEC-000895 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Item<T>::item() shall return a reference with the declared T& qualification to the same owned object on each call during that item's active lease. For a modifiable T, writes through this reference shall be visible through the lease and to later admitted reuse of that object. The accessor shall not allocate, copy, reconstruct or release the item. The returned reference shall not authorize access after release, holder destruction or actual object cleanup.

    RATIONALE:

    Clients use the temporary value through a borrowed reference, whose lifetime is shorter than retained cache storage.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check exact reference identity, independent active values, serial updates and retained reuse with allocation disabled.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000896
    6. Pool-item construction and ownership restrictions UID: PPL-SPEC-000896 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Clients shall acquire Temp_Item<T> objects through obtain and return them through release. Ordinary client default construction, copy construction and assignment shall be inaccessible; no supported move operation shall transfer a leased item implicitly. The cache shall own item destruction, and a leased item shall not be deleted directly by its caller. Stable live item identity shall be retained through admitted use and return until actual cache cleanup.

    RATIONALE:

    An item is a pool-owned object with an explicit lease protocol rather than a copyable value wrapper.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    
    VERIFICATION_CRITERIA:

    Check inaccessible construction/copy/move/assignment and exact active/reused identities without invoking forbidden direct destruction.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000897
    7. Reference-holder acquisition, access and scope cleanup UID: PPL-SPEC-000897 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A Temp_Reference_Holder<T> shall acquire exactly one pool item on successful construction and return it on destruction, including ordinary exception unwinding. Its item() shall return the leased object under 🔗 5. Qualified item reference and admitted borrowing. Holder destruction shall not destroy the retained T or allocate another item. Each separate default construction shall acquire its own lease. Copy construction, assignment and moving shall be inaccessible. A returned value reference shall remain borrowed only while that holder is live and retains its lease. Calling item() on a temporary reference holder shall be ill-formed.

    RATIONALE:

    A scope-bound holder makes pool return automatic without changing the temporary element's value lifetime.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    Temp_Reference_Holder();
    ~Temp_Reference_Holder();
    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check nested holders, unique active references, reuse after normal exit and throwing scopes, inaccessible copy/move and allocation-free destructor behavior.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000898
    8. Local value-holder construction and lifetime UID: PPL-SPEC-000898 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Temp_Value_Holder<T> shall own one local T object, default initialized as a normal member. A class type's default constructor shall run; a fundamental type shall not gain an initial-value guarantee from this holder. Its item() shall return a reference with the declared T& qualification to that same local object. Destruction shall destroy that owned object rather than cache it. The holder itself shall perform no separate pool allocation, copy or move, while retaining resources and construction failures intrinsic to T. Copy construction, assignment and moving shall be inaccessible.

    RATIONALE:

    Fast-copy temporaries use ordinary local lifetime and must not inherit the pool's retained-value behavior or an invented zero-initialization guarantee.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    Temp_Value_Holder();
    T& item() &;
    
    VERIFICATION_CRITERIA:

    Check class construction/destruction and value independence, native types assigned before reads, exact reference identity, no-copy/move traits and element-construction failure cleanup.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 9. Dirty temporary storage strategy UID: PPL-SPEC-000899 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a selected T, Dirty_Temp<T> shall use the Temp_Reference_Holder<T> interface when Slow_Copy<T>::value is true and Temp_Value_Holder<T> when false. It shall retain the chosen holder's ownership, initialization, borrowing and failure rules without adding an element copy, move or numeric initialization stage. The result shall be a dirty temporary; clients shall establish the value required by their computation rather than assume a fresh numerical zero.

    RATIONALE:

    The same internal expression should select an appropriate lifetime strategy without changing value prerequisites.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T, typename Enable = void> class Dirty_Temp;
    
    VERIFICATION_CRITERIA:

    Check both inheritance selections, tracked slow/fast types and native values assigned before use; compare construction/destruction/reuse counts and exception histories.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000900
    10. Dirty-temporary declaration macro and lexical lifetime UID: PPL-SPEC-000900 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    PPL_DIRTY_TEMP(T, id) shall declare a corresponding local Dirty_Temp<T> holder and a T& named id bound to its item(). The type shall be supplied as one preprocessor argument; a type with commas shall use a suitable alias. The caller shall provide a usable fresh identifier and declaration scope, including the generated holder name, and terminate the invocation as a declaration. The macro shall preserve the selected holder lifetime through that lexical scope, including unwinding; id shall not authorize an escaping reference beyond it. The macro shall not copy or implicitly initialize the value beyond 🔗 9. Dirty temporary storage strategy.

    RATIONALE:

    A declaration macro must preserve actual type/reference and scope semantics, including comma-bearing template types passed through aliases.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    PPL_DIRTY_TEMP(Type, identifier);
    using Type_Alias = Template_Type<Argument1, Argument2>;
    PPL_DIRTY_TEMP(Type_Alias, identifier);
    
    VERIFICATION_CRITERIA:

    Compile distinct/nested identifiers and aliased template types; check exact reference types, both storage strategies and cleanup through throwing lexical scopes.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • PPL-SPEC-000901
    11. Allocation and element-construction failure cleanup UID: PPL-SPEC-000901 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    If a fresh pool item cannot be allocated, or its T construction throws, the exception shall propagate without leaking the incomplete item's storage or adding an incomplete item to the free pool. Previously active items and cached values shall remain usable and unchanged. Element-owned subresources shall follow the element constructor's own C++ cleanup obligations. A failed holder construction shall not acquire an active lease. A failed local value-holder construction shall likewise retain its element's cleanup protocol. A later successful attempt shall remain possible; obtaining an already cached item shall not require a fresh element construction or item allocation.

    RATIONALE:

    Failure must preserve existing temporary leases and leave no unowned partial cache node.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    static Temp_Item& obtain();
    Temp_Reference_Holder();
    Temp_Value_Holder();
    
    VERIFICATION_CRITERIA:

    Inject each new-allocation boundary and a class-constructor exception after member acquisition, verify exact resource/lease preservation and retry through raw, reference-holder and local-holder forms.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 12. Cache contexts, teardown and retained storage lifetime UID: PPL-SPEC-000902 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Each Temp_Item<T> specialization shall maintain an independent free pool. In a thread-safe configuration it shall be thread-local; otherwise it shall be shared static storage requiring serialized conflicting operations. Cached free items shall be destroyed, with their owned values/resources, when that pool's thread or static context is destroyed. Outstanding active leases shall remain the caller's return responsibility and shall not be mistaken for cached free items. Calls shall not use a pool after its teardown has begun or completed.

    An element-permitted lease handoff may outlive the originating thread and be returned to another live context after synchronization; free-pool cleanup shall not destroy that outstanding lease. Cache storage shall not be cleared merely because a separate PPL initialization owner is finalized. These rules shall not relax T's own initialization, thread-affinity or value-lifetime restrictions.

    RATIONALE:

    A pool owns only returned items, and its storage lifetime differs from both active leases and library initialization owners.

    INTERFACE:

    Internal source headers: Temp_defs.hh, Temp_inlines.hh, Temp_templates.hh and Slow_Copy.hh. Names belong to Parma_Polyhedra_Library except the declaration macro. Member excerpts apply to their corresponding class template.

    template <typename T> class Temp_Item;
    
    VERIFICATION_CRITERIA:

    Check per-type isolation, thread-local cleanup of returned items, synchronized outstanding-lease handoff, final process cleanup with an ordered exit observer, and inspection of PPL lifecycle independence.

    SOURCE:

    src/Temp_defs.hh; src/Temp_inlines.hh; src/Temp_templates.hh; src/Slow_Copy.hh; src/thread_safe.hh; src/Init.cc; tests/tempcachespec1.cc; tests/tempcacheallocation.hh.

  • 1. Generic threshold-watcher traits and admitted value protocol UID: PPL-SPEC-000851 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Threshold_Watcher<Traits> shall use the selected trait's Threshold and Delta types, current-value provider get(), nonthrowing strict comparison less_than and conversion from_delta. Threshold shall be default constructible, have nonthrowing copy construction, assignment and destruction, and satisfy its own value/resource needs. get() shall produce a value/reference bindable to a const threshold reference for the duration of a check. Conversion shall assign the selected absolute threshold from the supplied delta. Default construction, current-value provision and conversion may report exceptions.

    The comparison shall provide a coherent strict order over the admitted current/pending domain, including false on equal values. The trait shall provide a writable check_function slot accepting, converting to and invocable as void (*)(), initially null with no pending events and owned by the watcher protocol while events remain. This generic mechanism shall require no timer availability or global PPL initialization beyond its selected traits' needs. Thread/lifetime conditions shall retain 🔗 12. Watcher notification lifetimes and exclusive use.

    RATIONALE:

    The generic watcher needs exact trait operations and failure/lifetime conditions independently of the computational-weight backend.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Instantiate independent strict-order traits, including nondefault delta types, throwing threshold-default/get/conversion operations and no PPL initialization.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000852
    2. Flag-notification watcher construction UID: PPL-SPEC-000852 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful flag-form construction shall own one handler bound to the supplied holder and flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, compute/validate the event threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. Construction shall not install the flag or query its priority merely to register the event. The holder/flag shall remain borrowed notification objects. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and a compatible flag. Its synchronous notification shall use release compare-and-exchange to fill only a null holder. It shall not dereference an existing request, query priorities, or replace a nonnull request. Both notification objects shall outlive the watcher; a published flag shall also outlive its readers. Cancellation shall precede clearing or releasing its binding. The same threshold validation, registration failure cleanup and queue exclusivity conditions shall apply.

    RATIONALE:

    Flag notification registration and actual priority-based installation occur at different times.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      std::atomic<const Flag_Base*>& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check initial holder/priority state, exact-deadline notification, cancellation, shared flags, callback isolation and construction failures.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000853
    3. Function-notification watcher construction UID: PPL-SPEC-000853 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Successful function-form construction shall own one handler retaining the supplied callback under 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure, compute/validate its threshold under 🔗 4. Threshold conversion and already-reached rejection, and register exactly one pending event. The callback shall be live and nonnull when its event can dispatch. Construction shall not invoke it. Failure shall retain 🔗 10. Construction failure cleanup and existing-event preservation.

    RATIONALE:

    Registering a callback must preserve its identity without executing the notification prematurely.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct callbacks and before/equal/after threshold checks, cancellation and failure/retry histories with exact invocation counts.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 4. Threshold conversion and already-reached rejection UID: PPL-SPEC-000854 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction shall default-construct a local threshold, invoke the selected from_delta conversion, then obtain the current value and accept the result only if the current value is strictly before that threshold under the admitted comparison. A converted threshold equal to or before the current value shall throw std::invalid_argument and shall not register an event. Exceptions from default construction, conversion or current-value provision shall propagate with 🔗 10. Construction failure cleanup and existing-event preservation. The generic watcher shall not infer another numeric interpretation of a user-defined delta or absolute threshold.

    RATIONALE:

    An already reached threshold must be rejected before it becomes an active event, regardless of how the trait expresses deltas.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Both constructors apply Traits::from_delta, Traits::get and
    // Traits::less_than under the trait protocol above.
    
    VERIFICATION_CRITERIA:

    Check future/equal/past conversions, zero deltas for additive traits, conversion order and each supported pre-registration exception.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000855
    5. Per-trait event ordering and multiplicity UID: PPL-SPEC-000855 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchers shall share their trait's pending queue within the storage policy in 🔗 12. Watcher notification lifetimes and exclusive use: one per thread for an opted-in thread-safe trait, otherwise one shared queue per trait. Each successful construction shall add one event, preserving all existing watchers and nondecreasing threshold order under 🔗 7. Sorted insertion and equivalent-deadline multiplicity. Equivalent future thresholds shall be admitted as distinct events; no relative dispatch order among equivalent events shall be required. Different trait instantiations shall have independent queues and hook slots. Registration shall not dispatch existing events.

    RATIONALE:

    Multiple pending events need independent identities even when their thresholds agree.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Compare distinct/equivalent threshold sets with an independent event model, interleave trait instantiations and preserve existing events through insert/cancel histories.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 6. Published checking function and empty-queue transitions UID: PPL-SPEC-000856 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After successful event registration, the trait's check_function slot shall point to that instantiation's checking action. It shall remain published while any event is pending and become null when the final pending event is canceled or successfully dispatched. Failed construction shall preserve the previous slot value under 🔗 10. Construction failure cleanup and existing-event preservation. Clients shall invoke a published hook only while its queue remains nonempty under the exclusive-use protocol; retaining an old nonnull pointer shall not authorize calling an emptied queue.

    RATIONALE:

    A null hook prevents checkpoint dispatch from entering an empty queue.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Trait protocol: call Traits::check_function() only while its
    // published void (*)() slot is nonnull and remains current.
    
    VERIFICATION_CRITERIA:

    Check null/non-null transitions after every registration, cancel, failure and expiration, including previously captured pointer identity while events remain.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000857
    7. Due-event dispatch and successful expiration UID: PPL-SPEC-000857 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A published check shall obtain the current object from one get() call and inspect pending events in threshold order. While that observed current object is not strictly before the first pending threshold, it shall invoke the event's bound action. Only after that action returns normally shall it mark the watcher expired and remove its pending event. Thus an event exactly at the current threshold shall be due. Processing shall stop at the first future event or an empty queue, retaining 🔗 6. Published checking function and empty-queue transitions.

    If a trait returns a reference to mutable current state, later comparisons in the same dispatch shall observe any admitted serial changes to that object; a value returned by get() shall instead remain the retained value for that check. This mechanism shall not promise elapsed-time notification or invoke the current-value provider separately per event.

    RATIONALE:

    Expiration must follow successful notification and use the selected current-value binding semantics.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Invoke the currently published Traits::check_function hook.
    
    VERIFICATION_CRITERIA:

    Check before/equal/after and several due events, exact action counts, retained future events, one get call, and reference/value provider behavior after a callback advances current state.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000858
    8. Action exceptions and partially completed dispatch UID: PPL-SPEC-000858 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If a notification action throws, dispatch shall propagate that exception without marking or removing the throwing event. Earlier events already notified successfully shall remain expired and removed; later events shall remain pending. The throwing event's callback effects shall not be rolled back. A later admitted check may invoke it again, or destruction may cancel it. The queue and published hook shall remain consistent with the events still pending, and no handler shall leak.

    RATIONALE:

    Cooperative notification may throw to return control while preserving which events have actually completed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    // Exception outcome of the currently published checking hook.
    
    VERIFICATION_CRITERIA:

    Use a distinct prefix, throwing middle callback and later event; check exception identity/effects, pending hook, retry and cancellation without duplicate notification of the completed prefix.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000859
    9. Watcher destruction, cancellation and handler ownership UID: PPL-SPEC-000859 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Destruction of an unexpired watcher shall cancel its pending event; destruction of an already expired watcher shall not remove another event or notify again. Both shall destroy the watcher-owned handler exactly once. Cancellation shall not invoke the handler or modify external flag objects, and shall retain the active/free queue ownership of 🔗 9. Active-event erasure and successor preservation. Destruction shall retain the admitted nonthrowing trait operations and exclusive-use conditions.

    RATIONALE:

    The watcher owns its action wrapper, while cancellation and completed-expiration cleanup have different queue effects.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    ~Threshold_Watcher();
    
    VERIFICATION_CRITERIA:

    Cancel first/middle/last and sole events, destroy expired watchers in several orders, count handler/storage lifetimes and retain unrelated events.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 10. Construction failure cleanup and existing-event preservation UID: PPL-SPEC-000860 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A reported failure while allocating the handler, default-constructing or converting a threshold, obtaining current state, rejecting an already reached threshold, or allocating its pending node shall release the incomplete watcher-owned handler and any temporary resources acquired for that construction. It shall preserve all previously pending watchers, their notification state and the previously published checking hook. The same trait instantiation shall permit later successful construction and dispatch/cancellation. The nonthrowing copy/assignment/destruction/ comparison prerequisites shall remain those of 🔗 1. Generic threshold-watcher traits and admitted value protocol.

    RATIONALE:

    All pre-registration failure paths must relinquish the newly allocated handler without disturbing existing event owners.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Flag_Base, typename Flag>
    Threshold_Watcher(const typename Traits::Delta& delta,
                      const Flag_Base* volatile& holder, Flag& flag);
    Threshold_Watcher(const typename Traits::Delta& delta, void (*function)());
    
    VERIFICATION_CRITERIA:

    Inject each observable allocation and supported threshold-default/get/conversion failure for both constructor forms, preserve existing event identities/hook/flags and retry.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • PPL-SPEC-000861
    11. Noncopyable watcher lifetime identity UID: PPL-SPEC-000861 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A watcher shall retain one lifetime identity for its expired flag, handler and pending position. Copy construction and assignment shall be inaccessible; no public move construction/assignment or default construction shall be supplied. Clients shall keep its address and lifetime stable while an event can reference that state. Separate watcher objects shall be constructed through their own notification constructors.

    RATIONALE:

    Memberwise copying would duplicate a queue position and references to one watcher's expiration state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    // Public construction is limited to the two notification forms above.
    
    VERIFICATION_CRITERIA:

    Check public construction/copy/move traits and independent event ownership of separately constructed watchers.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc.

  • 12. Watcher notification lifetimes and exclusive use UID: PPL-SPEC-000862 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction, destruction and checks for one trait's shared queue shall not overlap concurrently or reenter that queue's dispatch. Notification actions shall retain the valid handler/flag/function bindings of 🔗 1. Polymorphic event-action interface and virtual destruction, 🔗 2. Flag-handler binding and binding-preserving copies, 🔗 3. Strict-priority flag installation, 🔗 4. Function-handler target binding and copies and 🔗 5. Function action dispatch and callback failure and shall not destroy a watcher whose handler or expiration state is being accessed. The trait's current-value result shall remain valid through its use. Clients shall not replace a queue's hook while its events remain.

    In a thread-safe configuration, a trait may opt into per-thread queues with static constexpr bool thread_local_queue = true. Its current-value state and checking slot shall then also be thread-local. Weightwatch_Traits shall use this policy. Watchers and their borrowed bindings shall remain in their constructing thread and be destroyed before that thread exits. Other threads may independently compute, register, cancel and check their own queues. Exclusivity and nonreentrancy shall apply separately to each queue. Traits without that opt-in, and ordinary non-thread-safe configurations, shall retain the shared-state synchronization requirements above.

    RATIONALE:

    Queue state, callback execution and borrowed watcher fields must remain live under the configured queue's single-owner protocol.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Threshold_Watcher_defs.hh. The template belongs to Parma_Polyhedra_Library. Member excerpts apply to Threshold_Watcher<Traits>; hook expressions describe the required trait-owned callback-slot protocol.

    template <typename Traits> class Threshold_Watcher;
    
    VERIFICATION_CRITERIA:

    Inspect actual queue/handler accesses and trait storage policy. Exercise serial shared traits and simultaneous per-thread weightwatch queues, including independent cancellation and expiry, without destroying executing actions.

    SOURCE:

    src/Threshold_Watcher_defs.hh; src/Threshold_Watcher_inlines.hh; src/Threshold_Watcher_templates.hh; src/Pending_List_defs.hh; tests/thresholdwatcherspec1.cc; tests/thresholdwatcherlegacy1.cc; tests/thresholdwatcherlegacy1_handler.cc; tests/weightwatchspec1.cc.

  • 1. Public coordinate-index set and value lifecycle UID: PPL-SPEC-000021 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public C++ interface shall expose Variables_Set as a public derivative of std::set<dimension_type>. Its stored value shall be a finite set of distinct indices enumerated in increasing numerical order. A coordinate-valid set shall contain only indices i < Variable : : max_space_dimension(). The empty set shall be coordinate-valid. A set shall select coordinates without imposing an ambient dimension on an object that consumes the selection.

    The inherited C++20 std::set<dimension_type> interface shall remain available subject to the overloads actually declared by Variables_Set. Base-class constructors and assignment overloads shall not be implicitly added to the public derived interface. Construction from arbitrary iterator ranges shall be performed by default construction followed by inherited range insertion. Raw-index base operations may store any dimension_type value; they shall not validate coordinate admissibility. Before using the set as a coordinate selection or calling a member that requires coordinate validity, clients shall establish the validity of every stored index, for example using OK().

    Implicit copy construction and copy assignment shall have the C++20 value and exception behavior of the std::set base. Successful copies shall contain exactly the source indices with independently owned nodes. Implicit moves shall transfer the value according to the standard base-container rules; moved-from objects shall remain valid with the state permitted by those rules. Destruction shall release owned nodes. A Variables_Set shall not be deleted through a pointer to its nonvirtual base destructor.

    Operations on existing objects shall require live container objects. Callers shall obey the supported library/thread regime, serialize modifications of a shared instance and prevent unsynchronized modification while another call observes or copies it. No automatic invalid-lifetime or concurrent-use detection shall be required.

    RATIONALE:

    Coordinate selections need an ordered, duplicate-free representation with ordinary value ownership. Public inheritance exposes raw storage operations, so representable indices and valid coordinate indices are distinct contracts.

    INTERFACE:

    Public header: <ppl.hh>. Public type declaration:

    namespace Parma_Polyhedra_Library {
      class Variables_Set : public std::set<dimension_type> {
        // Member declarations are given in the following contracts.
      };
    }
    

    The following contracts describe declared members and applicable inherited operations. Copy/move members and destruction are implicitly declared.

    VERIFICATION_CRITERIA:

    Compile an installed-public-header C++20 client using the type, base conversion, copy/move operations and declared members. Check independent copies, lvalue assignment, self-copy assignment and permitted reuse of moved-from objects. Inject copy-construction and copy-assignment allocation failures, verifying source preservation and the target-state guarantees of the standard base container. Inspect owned-node cleanup and synchronization preconditions.

    SOURCE:

    src/Variables_Set_defs.hh: public inheritance and implicit value members. tests/variablesset1.cc: value, mutation and allocation-failure cases.

  • PPL-SPEC-000026
    6. Coordinate-set diagnostic output and formatter prerequisites UID: PPL-SPEC-000026 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Diagnostic output shall observe a coordinate-valid set without modifying its indices. With compatible ordinary character formatting and successful output, operator<< shall write "{", each selected Variable in increasing index order preceded by one space, a comma after every Variable except the last, and the final text " }". Thus an empty set shall write "{ }". Variable text shall be produced by the active Variable formatter at each write. The operator shall return the supplied stream reference. It shall not add a newline or request a flush. print() shall perform this output to std::cerr.

    Calls shall require the library/thread initialization protocol of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization to have established a valid active Variable formatter under 🔗 7. Active Variable formatter and initialized thread state. Formatter dispatch shall follow 🔗 8. Variable names, formatter dispatch and output failures. Clients shall synchronize formatter changes, shared streams and shared-set access under the supported thread regime. The formatter shall not mutate the printed set during output. Stream formatting and error reporting shall follow ordinary C++ insertion semantics. Formatter exceptions and stream exceptions shall propagate; ordinary nonthrowing stream failures shall remain observable through the stream state. Partial output may remain after failure, while the set shall remain unchanged.

    RATIONALE:

    Diagnostic text is a formatted view of coordinates and depends on the same initialization and formatter state as individual Variable output.

    INTERFACE:

    Public declarations:

    std::ostream& IO_Operators::operator<<(std::ostream& s,
                                         const Variables_Set& vs);
    void print() const;
    
    VERIFICATION_CRITERIA:

    Check literal empty and sparse output, ordering, return-reference identity, absence of newline/flush, custom formatters and forwarding through print(). Check pending width/fill behavior using the actual sequence of character and text insertions. Exercise nonthrowing and throwing stream failures and a throwing formatter, verifying unchanged indices and restoration of test-owned formatter and stream state. Review initialization and thread prerequisites.

    SOURCE:

    src/Variables_Set_defs.hh and src/Variables_Set.cc: output operator. src/globals_defs.hh: generated print forwarding definition. tests/variablesset1.cc: output, formatter and stream-failure cases.

  • PPL-SPEC-000012
    2. Variable value identity and lifetime operations UID: PPL-SPEC-000012 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public Variable type shall represent one Cartesian coordinate by its nonnegative identifier, with limits defined by 🔗 3. Variable construction, coordinate queries and bounds. Its meaning shall depend only on that identifier, independently of C++ object names, other variables and the current output function. Operations on existing variables shall require live valid objects; construction shall require valid source objects only where a source is supplied.

    Implicit copy and move construction shall create a variable with the source's identifier and shall preserve the source. Implicit copy and move assignment shall set the target's identifier to the source's entry identifier, return a reference to the target and preserve a distinct source. Self-assignment shall preserve the identifier. Each variable shall remain an independent value. These value operations and destruction shall require no external storage allocation; destruction shall not alter another variable. Callers shall prevent unsynchronized access to an object while another operation changes its value.

    RATIONALE:

    Coordinate identity is a value, so copying or disposing of a C++ handle must not rename another coordinate or create shared mutable coordinate storage.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    class Variable;
    
    // Callable forms of the implicit public value operations:
    Variable(const Variable& source);
    Variable(Variable&& source);
    Variable& operator=(const Variable& source);
    Variable& operator=(Variable&& source);
    ~Variable();
    
    VERIFICATION_CRITERIA:

    Copy, move and assign variables with zero, ordinary and greatest admitted identifiers. Check source preservation, independent later assignment, returned references, chained assignments and self-copy/self-move assignment. Inspect the scalar representation, implicit special members and absence of external storage; check their C++20 trivial-copy and nonthrowing value-operation traits. Use installed-public-header clients for public exposure and matching-library compatibility. Review synchronization separately from sequential value tests.

    SOURCE:

    src/Variable_defs.hh: public class and scalar representation. tests/variable1.cc: variable_value_operations_preserve_coordinate_identity.

  • 7. Active Variable formatter and initialized thread state UID: PPL-SPEC-000017 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public output_function_type shall denote a function accepting an output stream and a Variable value, returning void. set_output_function(p) shall store exactly p without invoking it; get_output_function() shall return the pointer currently stored for the applicable runtime context. Neither operation shall allocate storage or change any variable identifier.

    The applicable initialization and thread-entry protocol of 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization shall establish the default output function before variable insertion is used. In a thread-safe build the stored pointer shall be thread-local. Otherwise it shall be shared within the process, and callers shall serialize formatter changes and uses. Callers shall also synchronize shared-stream access and mutable callback state as needed.

    Storing a null pointer shall be permitted, and a subsequent getter shall return null; insertion shall require a nonnull callable pointer. The caller shall retain any callback dependencies for its use period and restore a callable pointer before subsequent insertion. Setting a formatter shall not acquire ownership of callback dependencies. This interface shall not diagnose every violation of initialization, callback-lifetime or concurrency preconditions.

    RATIONALE:

    Separating the current callback from coordinate identity permits user naming and thread-specific names while making callback validity and ownership explicit.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    typedef void output_function_type(std::ostream& s, const Variable v);
    static void set_output_function(output_function_type* p);
    static output_function_type* get_output_function();
    
    VERIFICATION_CRITERIA:

    Check the initialized default pointer, exact set/get round trips for distinct callbacks, absence of callback invocation during set/get, null storage followed by restoration and unchanged coordinate values. In thread-safe builds initialize workers through the supported thread protocol and check isolated pointers and output on separate streams while preserving the parent pointer. Review the shared-pointer and callback-state synchronization conditions in other builds. Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

    SOURCE:

    src/Variable_defs.hh, src/Variable_inlines.hh and src/Variable.cc: formatter type, accessors and configured pointer storage. src/Init.cc: default formatter installation at thread initialization. tests/variable1.cc: variable_formatter_pointer_round_trips_without_calls and variable_formatters_are_thread_local. tests/threadsafepublic1.cc: Check independent public-header workers, default formatter and precision, parent-state isolation and worker rounding restoration.

  • 8. Variable names, formatter dispatch and output failures UID: PPL-SPEC-000018 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live valid variable with identifier i, let q = ⌊i ⁄ 26⌋ and r = i − 26q. Successful direct use of default_output_function shall insert the uppercase character at position r in ABCDEFGHIJKLMNOPQRSTUVWXYZ. If q is nonzero, it shall then insert q as an unsigned integer using the stream's current formatting; otherwise it shall insert no suffix. Character and integer insertions shall honor their applicable stream formatting and locale. The function shall add no separator, newline or explicit flush, and shall not change the active formatter.

    Under 🔗 7. Active Variable formatter and initialized thread state, IO_Operators::operator<< shall invoke the currently active output function exactly once with the supplied stream and variable value, and shall return that same stream reference on normal return. Each insertion shall obtain the pointer active for that call. A callback may change the formatter for subsequent calls; insertion shall not restore the old pointer or undo callback changes to the stream. Direct default formatting shall not consult the active pointer.

    Output shall not change the variable identifier. Stream failures shall follow the stream's state and exception-mask rules. Callback exceptions and applicable C++ resource exceptions shall propagate; partial output and callback changes to formatter or stream state shall remain observable, with no output rollback promised. Callbacks shall satisfy the stream, lifetime and synchronization preconditions and shall not invalidate an object accessed by the call.

    RATIONALE:

    Default coordinate names are compact and deterministic under a given stream format, while direct callback dispatch preserves customization and ordinary C++ stream failure semantics.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    static void default_output_function(std::ostream& s, const Variable v);
    
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Variable v);
    }
    
    VERIFICATION_CRITERIA:

    Check independent expected names across alphabet and quotient boundaries and at the greatest admitted identifier. Check width, fill, alignment, integer base, locale, returned stream identity and absence of an added newline or explicit flush. Check exactly one callback invocation and the passed identifier, direct default formatting with another callback active, callback changes between successive insertions, a prefailed stream, rejecting streams with exceptions disabled and enabled, and a callback that changes state before throwing. Verify unchanged identifiers and retained callback/stream effects on failures.

    SOURCE:

    src/Variable_defs.hh and src/Variable.cc: default output and insertion. tests/variable1.cc: default-name, formatting, dispatch and failure checks.

  • PPL-SPEC-000871
    1. Watchdog platform availability and initialization prerequisites UID: PPL-SPEC-000871 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Watchdog timers shall be available when the configured platform provides the required setitimer, sigaction and pthread_sigmask operations. In that configuration, clients shall retain the library/class initialization and exclusive signal-ownership protocols of 🔗 11. Process timer ownership and signal-safe callbacks, 🔗 18. Class initialization and preceding signal action and 🔗 19. Class finalization and pending-notification cleanup. If any required operation is unavailable, all construction forms shall throw std::logic_error and shall neither publish a notification nor modify the supplied flag holder, regardless of the supplied duration. Construction may also report a resource failure while creating its exception object.

    RATIONALE:

    Availability must follow the configured timer/signal capabilities rather than imply that every supported library target has native timers.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Compile controlled configurations with each required capability unavailable; check both constructor forms over positive, zero and negative durations and unchanged notification objects.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000872
    2. Flag-form watchdog registration UID: PPL-SPEC-000872 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful volatile flag-form construction shall own one handler bound to the supplied holder/flag under 🔗 2. Flag-handler binding and binding-preserving copies and 🔗 3. Strict-priority flag installation, register one pending event for its admitted duration, and leave those external notification objects borrowed. Registration shall neither install the flag nor query its priority as a notification. At expiration, priority selection shall use the then-current holder and flag. The flag's priority operation shall satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    In a thread-safe build an additional overload shall borrow an atomic pointer holder and compatible flag. Expiration shall only record a notification in non-thread-local handler storage. At a subsequent ordinary checkpoint in the constructing thread, release compare-and-exchange shall install the flag only when the holder is null. No existing request shall be dereferenced, replaced, or compared by priority. Among multiple eligible atomic watchdogs the most recently constructed binding shall be tried first. Selected pending atomic notifications shall precede computational-threshold checks, retaining the snapshot rule in 🔗 1. Computational-weight value and current-state binding. This publication need not use a lock-free borrowed holder because it takes place outside signal context.

    Construction, checkpoints and destruction shall use the single watchdog owner/signal-receiving thread. Holder and flag shall remain alive through destruction; a published flag shall additionally outlive its readers. Cancellation may discard an unconsumed notification and shall not clear an already published request. The caller shall cancel before clearing the holder or releasing its flag. A failed construction shall leave no notification binding or pending event behind.

    RATIONALE:

    Flag registration and later signal-context notification require separate ownership and execution rules.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    // Thread-safe builds only.
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, std::atomic<const Flag_Base*>& holder,
             Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check distinct flag handlers, unchanged registration-time state, serial priority changes, due notification, cancellation and constructor failures under a controlled timer.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc; tests/atomicwatchdogspec1.cc.

  • PPL-SPEC-000873
    3. Function-form watchdog registration UID: PPL-SPEC-000873 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available, correctly initialized platform, successful function-form construction shall own one handler retaining the supplied function under 🔗 4. Function-handler target binding and copies, register one pending event and not invoke that function merely to register it. A pending callback shall be nonnull, live and satisfy 🔗 11. Process timer ownership and signal-safe callbacks. Dispatch shall invoke that bound function exactly once for its successfully completed event. Failure shall retain 🔗 8. Failed watchdog construction and surviving events.

    RATIONALE:

    A one-shot notification must preserve callback identity without executing it during registration.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Use distinct function callbacks and a controlled timer to check registration, ordering, cancellation, exact callback counts and failed construction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000874
    4. Positive watchdog duration and exact nominal units UID: PPL-SPEC-000874 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When native timers are available, both construction forms shall accept a positive long duration in centiseconds and interpret its nominal value as c ⁄ 100 seconds. A zero or negative duration shall throw std::invalid_argument without registering an event; construction cleanup shall retain 🔗 8. Failed watchdog construction and surviving events. Large positive durations through LONG_MAX shall retain their full logical value under 🔗 7. Logical deadlines and bounded physical timer checkpoints, subject to supported resource or timer-system-call failures. Timer resolution, signal delivery and masked operations shall retain 🔗 11. Process timer ownership and signal-safe callbacks.

    RATIONALE:

    Duration validation and exact nominal units must not silently truncate large supported requests to a kernel checkpoint.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Check zero and negative boundaries, centisecond normalization, one-day boundaries and huge positive durations against an independent controlled elapsed-time model.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000875
    5. Stable watcher and notification lifetimes UID: PPL-SPEC-000875 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    An available-platform watchdog shall not be default constructible, copy constructible, move constructible or assignable. Its stable live address shall retain its expiration state and event identity until destruction. Borrowed holder/flag/function objects shall remain valid whenever the event may notify. Clients shall not end a live watchdog's lifetime from its callback or concurrently with signal dispatch; the masking/exclusive-use protocol shall govern admitted cancellation.

    RATIONALE:

    Queue entries borrow watcher expiration state and external notification objects, so their lifetimes cannot be transferred implicitly.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check available-platform type traits, stable simultaneous event identities, distinct expired/unexpired destruction and admitted external binding lifetimes.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000876
    6. Ordered event multiplicity and existing-event preservation UID: PPL-SPEC-000876 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Each successful constructor shall add one distinct event to the shared queue. Equal logical deadlines shall retain all registered events; their relative callback order shall be unspecified. An earlier or later insertion shall preserve every other event's logical deadline and bound notification. Registration and cancellation shall not notify unrelated events merely because the queue or physical timer has changed.

    RATIONALE:

    Distinct watchers remain distinct even when their nominal deadlines coincide or the timer is replaced.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Interleave earlier/equal/later events and cancellation against an independent deadline-to-callback multiset, including previously active timers and multiple due events.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000877
    7. Logical deadlines and bounded physical timer checkpoints UID: PPL-SPEC-000877 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The first event shall establish a relative logical time base. Later registration shall account for elapsed time observed from the armed timer and retain the requested relative duration in its full logical deadline. Each nonzero physical timer request shall be at most one day (86400 seconds), using an intermediate checkpoint when a logical interval is longer. A checkpoint before a pending event's deadline shall not notify it; subsequent checkpoints shall preserve the remaining interval and other event deadlines. Bounded requests shall not imply that every kernel accepts them or guarantee exact elapsed deadlines across arbitrary signal-masked one-shot expiration periods.

    RATIONALE:

    A bounded kernel request must preserve a potentially much longer logical deadline and timer replacement history.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    
    VERIFICATION_CRITERIA:

    Compare one-day boundary, huge duration, earlier/equal/later insertion and retained/deferred chunk histories with exact controlled timer arithmetic.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 8. Failed watchdog construction and surviving events UID: PPL-SPEC-000878 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When construction reports a supported recoverable exception, it shall release its allocated handler and not leave the failed event pending. Previously live watchdogs shall remain usable with their logical notifications/deadlines preserved. This shall cover invalid duration, handler/node allocation failure, signal-block failure, timer-read failure, invalid successful timer read and timer-arm failure, including a failure while reporting another error. The constructor shall restore its internal critical-section state and caller signal mask before propagation, subject to the fatal restoration rule of 🔗 12. Signal-mask transactions and fatal restoration failures. Internal freed nodes may remain owned by the shared queue's reuse pool.

    RATIONALE:

    A failed constructor must release its own resources without disabling surviving timers or borrowing its unwound stack.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    Watchdog(long centiseconds, void (*function)());
    template <typename Flag_Base, typename Flag>
    Watchdog(long centiseconds, const Flag_Base* volatile& holder, Flag& flag);
    
    VERIFICATION_CRITERIA:

    Inject every constructor allocation/system-call failure for both forms, compare existing events before/after and exercise exact later notifications with balanced handler ownership.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000879
    9. Nonthrowing destruction and ordinary cancellation UID: PPL-SPEC-000879 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ~Watchdog() shall not throw. It shall destroy its owned handler exactly once while its timer signal is blocked, before restoring the caller's signal mask. An unexpired watchdog shall remove its own event without notifying it; an expired watchdog shall not remove or notify another event. Cancellation of a nonleading or equal-deadline event shall preserve remaining deadlines; canceling the first event shall schedule the next one or stop the timer when no event remains. If a next deadline is already due, cancellation shall schedule a short nonzero checkpoint rather than dispatch a notification from the destructor. System-call failure and fatal masking outcomes shall retain 🔗 10. Cancellation failure and retained-checkpoint fallback and 🔗 12. Signal-mask transactions and fatal restoration failures.

    RATIONALE:

    Destruction owns cancellation and handler cleanup while notification remains a signal-dispatch operation.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check nonleading/equal/leading/last and already-expired cancellation, pending-signal races, unwinding and due-next-event rescheduling without destructor notification.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 10. Cancellation failure and retained-checkpoint fallback UID: PPL-SPEC-000880 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    If cancellation cannot read a valid timer interval, rearm the next event or stop the last timer, it shall still erase the canceled event without propagating that system-call exception. The previous physical timer/bookkeeping shall remain as a checkpoint for remaining events; its later signal shall notify only events whose logical deadlines are due and schedule others for their remaining duration. A failed last-event stop may leave a physical notification, which shall not invoke a canceled handler. Later cancellation/insertion shall remain consistent with the retained checkpoint rather than assume it equals the first remaining event's deadline.

    RATIONALE:

    Nonthrowing cleanup needs a safe scheduling fallback even when a timer cannot be changed.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Inject failed reads, invalid read intervals, failed rearm/stop and chained cancellation histories; compare remaining event times and assert canceled objects never notify.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 11. Process timer ownership and signal-safe callbacks UID: PPL-SPEC-000881 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The facility shall reserve ITIMER_PROF/SIGPROF, or ITIMER_REAL/SIGALRM on Cygwin, GNU Hurd and profiling builds. One thread shall own all watchdog operations and receive the selected signal; every other thread shall keep it blocked. These restrictions shall also apply to a thread-safe PPL build, and clients shall not independently replace/use the owned timer or signal while the facility owns them. Callbacks and priority queries of the function/volatile-flag forms shall use only operations valid in asynchronous signal context. The atomic-holder form shall instead record a non-TLS notification in signal context and defer holder publication to ordinary owner code. They shall not throw, construct/destroy watchdogs or reenter their queue. Signal resolution, delivery delays and arbitrary prolonged masked operations shall not imply a hard elapsed-time guarantee.

    RATIONALE:

    The native timer and asynchronous callback context remain process resources despite other thread-local library facilities.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    
    VERIFICATION_CRITERIA:

    Inspect platform timer/signal selection and documented ownership; use signal-safe counters/holders in controlled and native smoke cases and check exact signal-mask restoration.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 12. Signal-mask transactions and fatal restoration failures UID: PPL-SPEC-000882 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction and cancellation shall block the selected signal while updating shared queue/timer state and restore the caller's exact previous mask afterward, including unrelated blocked signals. Failure to block the signal shall propagate from construction with 🔗 8. Failed watchdog construction and surviving events. The same failure during noexcept cancellation, or any failure to restore the mask, shall invoke std::terminate rather than continue with unprotected state or a newly retained mask. Pending delivery released by mask restoration shall see a consistent published queue and timer state.

    RATIONALE:

    Shared timer transactions must remain protected through both ordinary updates and synchronous delivery on unblocking.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    ~Watchdog() noexcept;
    
    VERIFICATION_CRITERIA:

    Check originally blocked/unblocked and unrelated signals, delivery before/after transaction points, construction block failure and isolated-process fatal block/restore controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 13. Stale timer-notification suppression UID: PPL-SPEC-000883 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On timeout entry, if a successful timer-state read yields a valid nonzero remaining interval, the notification shall be treated as stale and shall return without advancing the logical clock or notifying a replacement event. If the read fails or is invalid, dispatch shall use the timeout fallback of 🔗 14. Due-event signal dispatch and successful one-shot expiration; this fallback shall not promise to preserve a still-armed replacement deadline when the signal was in fact stale. A valid zero interval shall be processed as an actual timeout. Replacing a timer shall not assume that a previously pending signal has been retracted.

    RATIONALE:

    A delayed notification must not consume a newer timer whenever its still-armed state can be established.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Check immediate/delayed/coalesced stale signals, valid zero/nonzero reads and failed/malformed snapshots without equating fallback behavior with guaranteed stale suppression.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000884
    14. Due-event signal dispatch and successful one-shot expiration UID: PPL-SPEC-000884 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    An actual timeout outside an active timer transaction shall advance the logical clock by the accounted last requested span, inspect events in deadline order and invoke each event whose deadline is no later than that clock. After its signal-safe action returns, dispatch shall mark it expired and remove it. A future event shall remain pending and be scheduled for its remaining logical interval. When no event remains, the logical alarm shall become inactive. An empty-queue signal shall not invoke a handler. The errno and fatal rearm outcomes shall retain 🔗 16. Fatal signal-context timer-rearm failure and 🔗 20. Timeout and signal-mask errno preservation.

    RATIONALE:

    Successful signal delivery must distinguish due, future and already removed events with exact one-shot ownership.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use independent callback/deadline logs for multiple due events, equal deadlines, remaining future events and empty/canceled queues, including subsequent expired destruction.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000885
    15. Deferred timeout accounting inside a transaction UID: PPL-SPEC-000885 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    If an actual timeout is processed while the internal transaction state is active, it shall defer event dispatch by arming a short nonzero checkpoint. The previously consumed timeout span shall remain included in the elapsed-time accounting for that later dispatch; repeated replacement/chunk histories shall not lose the consumed span. A deferred checkpoint by itself shall not notify a future event. Failure to arm this checkpoint shall retain 🔗 16. Fatal signal-context timer-rearm failure.

    RATIONALE:

    A timeout deferred during publication must preserve the elapsed interval already consumed, including a capped long interval.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject timeout delivery at read/publication/transaction boundaries and compare ordinary and chunked deferred histories with a separately maintained logical clock.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 16. Fatal signal-context timer-rearm failure UID: PPL-SPEC-000886 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When timeout dispatch or transaction deferral cannot rearm the required timer, it shall call std::abort. It shall not report that failure by constructing or throwing a C++ exception in signal context. Earlier successfully completed callbacks in that dispatch shall retain their effects up to process termination. This fatal policy shall not be replaced by silently leaving future pending events unscheduled.

    RATIONALE:

    Once pending timeouts cannot be scheduled, continuing would lose required notifications and exception creation is unsafe in signal context.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Use isolated-process fatal controls for rearm and deferral failures with allocation disabled and distinguish abort from exception, terminate and silent return.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • PPL-SPEC-000887
    17. Timer-read validity and context-specific error channels UID: PPL-SPEC-000887 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    A valid timer interval shall have nonnegative seconds representable by long and microseconds in [0, 1000000). A failed timer read shall not be interpreted as a successful sample. During construction, a successful read outside this range shall report std::runtime_error with 🔗 8. Failed watchdog construction and surviving events. During cancellation it shall use 🔗 10. Cancellation failure and retained-checkpoint fallback, and during signal entry it shall use the fallback in 🔗 13. Stale timer-notification suppression. Successful zero and boundary-valid intervals shall retain their ordinary context meaning.

    RATIONALE:

    The same malformed platform snapshot requires different safe reporting in construction, noexcept cleanup and asynchronous dispatch.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    class Watchdog;
    extern "C" void PPL_handle_timeout(int signum);
    
    VERIFICATION_CRITERIA:

    Inject negative seconds/microseconds, excessive microseconds and supported wider-second overflow in each context, with valid zero/nonzero boundary controls.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 18. Class initialization and preceding signal action UID: PPL-SPEC-000888 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, class initialization shall establish a one-shot timer protocol (zero repeated interval), install the watchdog signal action for the selected signal and preserve its preceding action for later restoration. Failed installation shall report its system-call failure. The caller/library shall provide balanced initialization and finalization, without independently repeated initialization or live watchdogs before setup. If later library initialization fails after this signal action was acquired but before any timer/event was acquired, its internal rollback shall restore the preceding action without modifying an unrelated existing interval timer.

    RATIONALE:

    Signal-handler acquisition and later library setup rollback must preserve the resource that preceded the PPL lifecycle.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void initialize();
    
    VERIFICATION_CRITERIA:

    Check controlled preceding actions and installation failure; inspect and exercise post-acquisition initialization rollback separately from ordinary active-timer finalization.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 19. Class finalization and pending-notification cleanup UID: PPL-SPEC-000889 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    On an available platform, finalization shall require no live pending watchdog events. With the selected signal blocked, it shall stop the owned timer, mark the logical alarm inactive, discard an owned pending notification and restore the preceding signal action. It shall restore the caller's exact mask and preserve errno when it returns. Failure to block, stop the timer, install the discard action, restore the preceding action or restore the mask shall invoke std::terminate. A stale notification from a canceled timer shall not escape later to the preceding client handler.

    RATIONALE:

    Returning signal ownership must dispose of notifications still owned by the timer being finalized.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    static void finalize();
    
    VERIFICATION_CRITERIA:

    Use controlled previous actions/masks, queued canceled notifications and isolated-process failure controls for each finalization step, with no live pending watchdogs.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 20. Timeout and signal-mask errno preservation UID: PPL-SPEC-000890 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Whenever timeout dispatch returns normally, it shall restore its entry errno, including a stale-signal return, callback effects and successful read/rearm calls that change errno. Signal-mask acquisition and restoration shall preserve the errno with which those individual mask operations were entered. Finalization shall preserve its entry errno on return under 🔗 19. Class finalization and pending-notification cleanup. This shall not turn a reported constructor system-call failure into an unchanged-errno promise.

    RATIONALE:

    Asynchronous notification must not corrupt the interrupted computation's error state.

    INTERFACE:

    Public C++ header: ppl.hh; defining source header: Watchdog_defs.hh. Names belong to Parma_Polyhedra_Library. Constructor/destructor and static member excerpts apply to Watchdog. Static class lifecycle members exist only when the required timer/signal operations are available; PPL_handle_timeout is the internal signal-entry bridge.

    extern "C" void PPL_handle_timeout(int signum);
    static void finalize();
    
    VERIFICATION_CRITERIA:

    Set distinct sentinel error values and clobber read/rearm/callback operations in stale, ordinary, deferred and chunked histories; verify successful mask/finalization preservation.

    SOURCE:

    src/Watchdog_defs.hh; src/Watchdog_inlines.hh; src/Watchdog.cc; src/Init.cc; tests/Watchdog/watchdog1.cc; tests/Watchdog/watchdog2.cc; tests/Watchdog/watchdogtimerfixture.hh; tests/Watchdog/watchdoglifecyclespec1.cc; tests/Watchdog/watchdogunavailablespec1.cc; tests/watchdogpublic1.cc.

  • 1. Optional profiler selection and instrumentation protocol UID: PPL-SPEC-001598 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Computational-weight profiling shall be selected by nonzero PPL_PROFILE_ADD_WEIGHT together with NDEBUG. Assertion builds shall retain ordinary weight instrumentation even when the profiling flag is nonzero; profiling-disabled release builds shall retain 🔗 5. Computational-weight instrumentation outside profiling mode. Profiler implementation definitions and automatic calibration shall be present only in the selected profiling configuration. The profiler declaration shall be included after Weightwatch_Traits is complete, with the time declarations required by its interface.

    In profiling mode, WEIGHT_BEGIN() shall call Weight_Profiler::begin(). Each expansion of WEIGHT_ADD(d) or WEIGHT_ADD_MUL(d, f) shall own a function-static profiling point identified by that expansion's file and line. The first execution shall evaluate and capture d as the point's Delta; later executions of that expansion shall reuse it. WEIGHT_ADD shall end a one-iteration sample; WEIGHT_ADD_MUL shall evaluate f once per execution, convert it to unsigned int, and end that many iterations. Expressions and their conversions shall be defined. Deltas intended to vary between calls shall use distinct explicit profiling points instead.

    The profiler shall borrow its file-name string through its last output or destruction. Calls using the shared clock boundary, calibration and statistics shall be serialized, including in a thread-safe library build. A successful POSIX calling-thread CPU clock shall be available. Timing calls shall occur in the same thread over each interval. Admitted statistics shall remain representable in their unsigned int sample/iteration counters; timing differences shall remain representable in the clock arithmetic. No numerical-library initialization prerequisite shall be imposed by the profiler itself. The ordinary weight counter shall retain 🔗 1. Computational-weight value and current-state binding.

    RATIONALE:

    Optional measurement needs a distinct configuration and a stable per-site weight without changing ordinary instrumentation. Shared clock and stream state require explicit serialization.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    // Selected only for NDEBUG && PPL_PROFILE_ADD_WEIGHT:
    #define WEIGHT_BEGIN() /* begin the shared timing interval */
    #define WEIGHT_ADD(delta) /* end one iteration at this point */
    #define WEIGHT_ADD_MUL(delta, factor) /* end factor iterations */
    
    VERIFICATION_CRITERIA:

    Compile and run enabled release, enabled assertion and disabled release variants. Check absence of clock calls and calibration outside the selected configuration. Exercise two calls at one macro expansion with different delta expressions, single evaluation of factors, and distinct one-iteration sites. Inspect borrowed-string lifetime, shared-state restrictions and counter bounds.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 2. Profiler clock boundaries and zero-iteration weight accounting UID: PPL-SPEC-001599 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    begin() shall replace the shared timestamp with the calling thread CPU time. For end(n) with n > 0, the profiler shall add δn to Weightwatch_Traits::weight using that unsigned counter's modular arithmetic, read a new timestamp, and use the preceding shared boundary as the interval start. A nanosecond-field rollover shall retain the elapsed time across the seconds boundary. After subtracting the calibrated overhead a, it shall supply the elapsed nanoseconds e and per-iteration value x = e ⁄ n to 🔗 3. Profiler sample classification and weighted statistics. Timing arithmetic shall use double and its rounding; adjusted times need not be nonnegative.

    For end(0), the profiler shall refresh the shared timestamp without changing the weight, sample counts, iteration counts or accumulated statistics. It shall perform no division by zero or statistical arithmetic for that call. The next sample shall start at the refreshed boundary, so an interval with no iterations shall not be attributed to subsequent work. All calls shall satisfy 🔗 1. Optional profiler selection and instrumentation protocol.

    RATIONALE:

    Per-iteration time is defined only for a positive iteration count. A zero count adds zero computational weight but must still separate timing intervals.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      static void begin();
      void end(unsigned int factor = 1);
    };
    
    VERIFICATION_CRITERIA:

    Use a controlled clock to check direct and borrowed-nanosecond differences, multiple seconds, modular weight wrap, positive counts and default count one. Check zero-count calls before and after samples, their clock refresh, unchanged output/weight, and absence of FE_DIVBYZERO and FE_INVALID. Check that a later positive sample excludes the zero-count interval.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 3. Profiler sample classification and weighted statistics UID: PPL-SPEC-001600 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Construction shall capture the source location, delta and timing thresholds, and initialize both the valid and discarded statistical classes to zero. It shall leave the shared timing boundary and computational weight unchanged. For each positive-count sample from 🔗 2. Profiler clock boundaries and zero-iteration weight accounting, let x = e ⁄ n. The sample shall be discarded exactly when x < m or (M > 0 ∧ x > M), where m and M are the minimum and maximum thresholds. Equality with either active threshold shall be valid; a nonpositive maximum threshold shall disable the upper test.

    In the selected class, the sample count shall increase by one and the iteration count N by n. The elapsed-time sum S shall increase by e, and the weighted square sum Q by ex. The first sample shall set both extrema to x; later samples shall retain the minimum and maximum per-iteration values. The other class shall remain unchanged. Classification shall not suppress the computational-weight increment. Statistics shall use double arithmetic with its rounding. The output mean shall be S ⁄ N, and valid-sample population variance Q ⁄ N − (S ⁄ N)2, the iteration-weighted statistics. Floating rounding can make the computed variance negative; no exact-time or nonnegative rounded variance guarantee shall be imposed. 🔗 1. Optional profiler selection and instrumentation protocol shall apply.

    RATIONALE:

    Samples can contain different iteration counts. Weighting the first and second moments by iterations preserves their mathematical interpretation; thresholds separate admitted and discarded timing observations.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      Weight_Profiler(const char* file, int line,
                      Weightwatch_Traits::Delta delta,
                      double min_threshold = 0, double max_threshold = 0);
      void end(unsigned int factor = 1);
    };
    
    VERIFICATION_CRITERIA:

    Check independent weighted sums and moments, initial/extreme/interior samples, both threshold equalities, lower and upper rejection, a disabled upper bound, and valid-only/discarded-only/mixed classes. Verify that discarded observations still add weight, and that zero-count calls preserve an existing report. Check finite exactly representable timing fixtures; inspect rounding limits.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 4. Profiler reports, lifetime output and startup calibration UID: PPL-SPEC-001601 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    output_stats() shall write to std::cout without clearing the stored statistics. Its prefix shall identify the borrowed file and line followed by Weight_Profiler. An unvisited point shall report never reached.. A nonempty valid class shall report samples, iterations, per-iteration extrema, mean, variance and square root of variance. A nonempty discarded class shall report thresholds, samples, iterations, extrema and mean. Both classes shall be reported when nonempty, valid first, with a terminating flushed newline. Numerical formatting shall follow the stream's current state. Stream failures shall follow standard stream behavior; destruction shall call this output operation subject to ordinary nonthrowing-destructor rules.

    Automatic initialization in the selected configuration shall set the shared adjustment to tune_adjustment()'s return value. That internal calibration shall begin a shared interval, set the adjustment to zero, and perform 1000 one-iteration measurements at a function-static point with zero delta and zero thresholds. It shall return that point's stored valid minimum. Its statistics shall remain available for the point's destruction report. Calibration shall not change the computational weight. Direct subsequent calls shall again zero the adjustment, append 1000 measurements to that same point, and return its retained minimum; they shall not install the returned adjustment themselves. Calls shall satisfy 🔗 1. Optional profiler selection and instrumentation protocol.

    RATIONALE:

    Per-point output supplies the observations used to assess computational weights. Startup calibration estimates the measurement infrastructure cost without charging it as algorithmic weight.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and Weight_Profiler_defs.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Member excerpts apply to Weight_Profiler.

    class Weight_Profiler {
    public:
      void output_stats();
      ~Weight_Profiler();
      static double tune_adjustment();
    };
    
    VERIFICATION_CRITERIA:

    Check exact report fields against independently calculated values and check unvisited, valid-only, discarded-only and mixed output. Check repeatable output without reset, borrowed label identity, destructor reporting and newline flush. Use a constant-step clock to check the 1001 startup clock reads, zero calibration weight, adjustment subtraction, and the retained calibration report. Inspect stream exception and destructor behavior and exercise explicit recalibration.

    SOURCE:

    src/globals_defs.hh; src/Weight_Profiler_defs.hh; src/Weight_Profiler.cc; tests/weightprofilerspec1.cc; tests/weightprofilerimpl1.cc; tests/weightprofilertestclock.hh.

  • 1. Computational-weight value and current-state binding UID: PPL-SPEC-000863 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Weightwatch_Traits::Threshold and Delta shall denote unsigned long long. The computational-weight counter shall initially be zero and get() shall return a const reference to its current counter, without copying or allocating. The returned reference shall observe later admitted serial updates. In a thread-safe configuration, that counter/reference shall belong to the calling thread and shall not be used after that thread exits or from another thread. The checking slot shall initially be null and retain the watcher-owned protocol in 🔗 6. Published checking function and empty-queue transitions. In a thread-safe build the counter, checking slot and Threshold_Watcher<Weightwatch_Traits> queue shall all belong to the calling thread. Each watcher and its borrowed notification bindings shall be used and destroyed in that thread before it exits. Other threads may independently compute, register, cancel and dispatch their own budgets.

    In a thread-safe build, the checking slot shall be a function-pointer proxy: assignment, conversion to void (*)(), invocation and independent copied snapshots shall retain their ordinary meanings. Assigning a local snapshot shall not change the live slot. A live-slot assignment shall not alter another thread's hook or the signal-notification gate. Direct field-address/type-trait compatibility with former raw/shared fields is not required; clients shall be rebuilt with matching library headers. Library and clients shall agree on the bool/function-pointer atomic capability selection; a compatible C++ ABI alone shall not permit mixing dispatcher modes. Clients shall not overwrite their checker while its queue contains events.

    At an owner checkpoint that selects pending atomic-watchdog work, that work shall be published before checking computational thresholds. A notification arriving after the checkpoint's dispatch snapshot may be processed at the next checkpoint. With always-lock-free notification and function-pointer atomics, unexpired timers shall not install an extra checkpoint callback. Otherwise, ordinary owner code shall use a deferred per-thread hook; the signal action shall not access thread-local objects or call a potentially locking atomic operation.

    RATIONALE:

    The budget counter, pending events and checking hook must have the same owner; independent thread budgets must not alter or dispatch one another.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    struct Weightwatch_Traits {
      using Threshold = unsigned long long;
      using Delta = unsigned long long;
      static constexpr bool thread_local_queue = true;
      static const Threshold& get();
      static Threshold weight; // Thread-local in a thread-safe build.
    #ifdef PPL_THREAD_SAFE
      static Implementation::Watchdog::Checkpoint_Hook check_function; // Thread-local.
    #else // !defined(PPL_THREAD_SAFE)
      static void (*check_function)();
    #endif // !defined(PPL_THREAD_SAFE)
    };
    
    VERIFICATION_CRITERIA:

    Check configured slot types, reference identity, serial updates and copied hook snapshots; inspect initial/thread-local declarations and per-queue ownership. Check simultaneous thread budgets and cancellation without serializing independent PPL work. Exercise both admitted function-pointer dispatch and a coherently rebuilt deferred fallback, including cancellation, wrong-thread checkpoints and real timer delivery.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/atomicwatchdogspec1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000864
    2. Exact scaled-weight conversion and representability UID: PPL-SPEC-000864 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    compute_delta(u, s) shall return the exact integer u2s when that result is representable in Delta. For u == 0 it shall return zero for every unsigned scale. For nonzero u, an excessive shift or a scaled result larger than Delta's maximum shall throw std::invalid_argument rather than wrap. The function shall not change the current counter or checking slot. Returning a zero delta shall not imply that an already reached watcher threshold is admissible under 🔗 4. Threshold conversion and already-reached rejection.

    RATIONALE:

    Scaling must distinguish exact increments from an unrepresentable user request independently of watcher registration.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static Delta compute_delta(unsigned long unscaled, unsigned scale);
    
    VERIFICATION_CRITERIA:

    Compare against arbitrary-precision shifts over zero, all bit boundaries and maximum inputs; reject each excessive nonzero scale and overflow and preserve backend state.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000865
    3. Absolute threshold formation and modular aliases UID: PPL-SPEC-000865 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    from_delta(out, d) shall assign the unsigned modular sum of the current weight and the supplied delta to out. It shall admit out aliasing the delta object or the current counter and evaluate the sum from their values before assignment. It shall neither register an event nor invoke a notification. This arithmetic conversion shall not itself validate whether the result is future under 🔗 4. Strict circular ordering of computational weights; watcher construction shall perform that check under 🔗 4. Threshold conversion and already-reached rejection.

    RATIONALE:

    Threshold formation uses defined unsigned wraparound and must retain legitimate input/output aliases.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static void from_delta(Threshold& threshold, const Delta& delta);
    
    VERIFICATION_CRITERIA:

    Compare ordinary and wrapping sums against exact-integer modular arithmetic; cover independent output, output/delta alias, output/current alias and all-three aliases without dispatch.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • PPL-SPEC-000866
    4. Strict circular ordering of computational weights UID: PPL-SPEC-000866 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Let N be the number of value bits in Threshold and let d be the unsigned modular difference of b and a, in [0, 2N). less_than(a, b) shall return true exactly when 0 < d < 2N − 1. Equal weights shall compare false; values separated by exactly a half-range shall not acquire an arbitrary orientation. An admitted queue/check history shall keep its current and pending thresholds within a common circular interval shorter than a half-range so that this comparison gives the coherent strict ordering required by 🔗 1. Generic threshold-watcher traits and admitted value protocol. The function shall not allocate, notify or change its operands/backend state.

    RATIONALE:

    A modular counter needs a strict unambiguous local order, including equality, to support duplicate deadlines and exact-threshold dispatch.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    static bool less_than(const Threshold& a, const Threshold& b);
    
    VERIFICATION_CRITERIA:

    Compare equal, unequal, wrapping and half-range boundaries against an independent modular-distance oracle; verify duplicate future deadlines, zero-delta rejection and exact-deadline dispatch through the generic watcher.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 5. Computational-weight instrumentation outside profiling mode UID: PPL-SPEC-000867 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    In the normal computational-weight configuration (PPL_PROFILE_ADD_WEIGHT == 0), WEIGHT_BEGIN() shall not change the counter. Outside the assertion suppression of 🔗 6. Assertion-scope instrumentation suppression, WEIGHT_ADD(d) shall add the value of its supplied expression and WEIGHT_ADD_MUL(d, f) shall add the product of the values of both supplied expressions. Each supplied expression shall be evaluated once; the caller shall supply arithmetic expressions with defined evaluation, conversion and multiplication. Accumulation shall retain unsigned modular arithmetic and shall not itself dispatch pending notifications. The same admitted expressions shall have the same mathematical effect in assertion and nonassertion builds.

    An explicitly enabled release-build Weight_Profiler configuration shall follow 🔗 1. Optional profiler selection and instrumentation protocol through 🔗 4. Profiler reports, lifetime output and startup calibration.

    RATIONALE:

    The counter must reflect instrumented arithmetic independently of ordinary build diagnostics, while the optional profiler has a separate role.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    WEIGHT_BEGIN();
    WEIGHT_ADD(delta);
    WEIGHT_ADD_MUL(delta, factor);
    
    VERIFICATION_CRITERIA:

    Check direct and product increments against modular integer arithmetic, compound expressions, argument evaluation counts, wrapping boundaries, no implicit dispatch and assertion suppression in both build modes.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc; tests/MIP_Problem/mipproblem2.cc.

  • 6. Assertion-scope instrumentation suppression UID: PPL-SPEC-000868 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    In builds without NDEBUG, In_Assert shall maintain a nesting count in the calling thread (or the sole configured global context). Its construction shall enter assertion evaluation and destruction shall leave it. asserting() shall be true exactly while that count is nonzero. Balanced nested scopes, including exception unwinding, shall restore the previous state. During such a scope, computational-weight increment macros shall neither increment the counter nor evaluate their increment expressions, and maybe_abandon() shall return without checking thresholds or caller-owned requests. Clients shall retain properly nested, noncopied guard lifetimes. In_Assert shall not be required to exist in builds with NDEBUG.

    RATIONALE:

    Diagnostic assertions must not add computational work or trigger cooperative interruption themselves.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    #ifndef NDEBUG
    class In_Assert {
    public:
      In_Assert();
      ~In_Assert();
      static bool asserting();
    };
    #endif
    
    VERIFICATION_CRITERIA:

    Check nested scopes, suppressed expression side effects, held callbacks/requests and restoration after normal exit and exception unwinding; inspect configured thread-local storage.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 7. Caller-owned abandonment request and exception object UID: PPL-SPEC-000869 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Throwable shall provide a const virtual throw_me() action and virtual destruction. abandon_expensive_computations shall initially be null and shall retain a borrowed pointer to a caller-owned live Throwable. The client shall keep the request object alive through all admitted reads/actions, publish it under the configured synchronization and execution-context rules, and clear/replace the slot before ending that lifetime. The library shall not own/delete the object or clear a request after invoking it. In a thread-safe configuration the request slot shall be thread-local and atomic; the ordinary configuration shall use its declared volatile pointer protocol. Cross-thread publication shall target the intended live slot under the caller's synchronization; thread-local storage shall not turn a write to another thread's own slot into a request for the computing thread.

    RATIONALE:

    Cooperative interruption borrows a client-supplied exception mechanism with explicit persistence and lifetime ownership.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    class Throwable {
    public:
      virtual void throw_me() const = 0;
      virtual ~Throwable();
    };
    extern abandon_type abandon_expensive_computations;
    
    VERIFICATION_CRITERIA:

    Check derived const dispatch, virtual destruction, retained object lifetime and request identity through normal-returning and throwing actions; inspect atomic/thread-local versus volatile declarations.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc.

  • 8. Cooperative abandonment checkpoint ordering and propagation UID: PPL-SPEC-000870 STATUS: APPROVED COMPONENT: RUNTIME APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Outside 🔗 6. Assertion-scope instrumentation suppression, maybe_abandon() shall first invoke the nonnull computational-weight checking hook. If that action returns, it shall select the current registration-scoped request in a thread-safe build 🔗 5. Interruptible thread registration and request lifetime, if one is present, or read the current caller-owned abandonment slot. It shall invoke the selected nonnull object's const throw_me() action. The read shall observe admitted serial request changes made by the hook. A throwing hook shall propagate its exception and prevent the later action for that invocation. A throwing request action shall likewise propagate. Neither path shall clear a request, undo callback effects or take ownership of its object. A null hook/request shall be skipped. The checkpoint shall not promise a fixed elapsed-time interruption bound.

    RATIONALE:

    Threshold handling precedes the current client request, and interruption effects must remain visible for retry or explicit cancellation.

    INTERFACE:

    Defining C++ headers: globals_defs.hh and globals_inlines.hh. Names belong to Parma_Polyhedra_Library unless a macro is shown. Computational-weight watchers retain 🔗 12. Watcher notification lifetimes and exclusive use.

    void maybe_abandon();
    
    VERIFICATION_CRITERIA:

    Use exact event logs for null/present hook/request combinations, hook publication/clearing of requests, normal/throwing actions, persistent requests and assertion suppression; verify propagated exception identity and action order.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; src/globals.cc; src/make_threadable.cc; tests/Polyhedron/threadsafe2.cc; src/thread_safe.hh; tests/weightwatchspec1.cc; tests/weightwatchlegacy1.cc; tests/Polyhedron/weightwatch1.cc; tests/MIP_Problem/mipproblem2.cc.

  • 2. Java library initialization and finalization UID: PPL-SPEC-001689 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: Java VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    After loading the configured JNI library, initialize_library shall establish native library state and the Java class cache before supported operations. finalize_library shall release that cache, the calling thread's variable stringifier and deterministic-timeout state, and the native initialization owner. A later initialization shall establish a new valid period of use.

    Clients shall release owned objects, cease using borrowed views, and end worker thread participation before finalization. Requests shall alternate valid initialization and finalization; duplicate library requests are outside this protocol. Participating workers shall obey 🔗 6. Thread entry and shared-facility use.

    RATIONALE:

    JNI loading, Java class caching and native initialization have distinct resource lifetimes.

    INTERFACE:

    Package parma_polyhedra_library, class Parma_Polyhedra_Library.

    public static native void initialize_library();
    public static native void finalize_library();
    

    The JNI library shall first be loaded using the host's native-library loading mechanism. The initializing thread owns the library lifecycle.

    VERIFICATION_CRITERIA:

    Load the JNI library and complete two initialize/use/release/finalize cycles, checking native coefficient and solver operations during each cycle. Inspect class-reference and thread-resource cleanup.

    SOURCE:

    interfaces/Java/parma_polyhedra_library/Parma_Polyhedra_Library.java; interfaces/Java/jni/ppl_java_globals.cc; interfaces/Java/jni/ppl_java_common_inlines.hh; interfaces/Java/tests/Native_Handle_test1.java.

  • PPL-SPEC-001730
    8. Native Java floating-point environment lifetime UID: PPL-SPEC-001730 STATUS: APPROVED COMPONENT: JAVA_INTERFACE APPLICABILITY: IF_JAVA VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    When PPL_CAN_CONTROL_FPU is true, successful construction of Java_FPU_Guard shall save the calling thread's floating-point environment and establish the rounding required by PPL. Failure to save the environment shall throw std::runtime_error before changing the rounding direction. Destruction shall restore the saved environment on normal return and exception unwinding, subject to the host's successful floating-point environment operations. The guard shall be constructed after Java argument conversions that may execute host code and before the native floating-point numerical operation. The lifetime shall remain on the same thread. Copy construction and copy assignment shall be unavailable. When FPU control is unavailable the guard shall perform no FPU changes and shall not make unsupported floating-point operations valid.

    RATIONALE:

    The JVM may reset its floating-point state during callbacks, and native rounding must not leak into subsequent Java execution.

    INTERFACE:

    Namespace Parma_Polyhedra_Library::Interfaces::Java:

    class Java_FPU_Guard {
    public:
      Java_FPU_Guard();
      ~Java_FPU_Guard();
      Java_FPU_Guard(const Java_FPU_Guard&) = delete;
      Java_FPU_Guard& operator=(const Java_FPU_Guard&) = delete;
    };
    
    VERIFICATION_CRITERIA:

    For every available host rounding direction, verify upward native rounding, correct interval computation, and restoration after return and unwinding. On x86/SSE check restoration when x87 and SSE initially disagree. Inspect guard placement after conversion callbacks and before native numerical operations.

    SOURCE:

    interfaces/Java/jni/ppl_java_rounding.hh; interfaces/Java/tests/jni_rounding1.cc; interfaces/Java/jni/ppl_interface_generator_java_classes_cc_code.m4.