Parma Polyhedra Library requirements
C++ interface requirements
PPL-LLR-000311
1. Public C++ access to supported facilities UID: PPL-LLR-000311 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Parent): RELATIONS (Child): STATEMENT:

The public C++ interface shall expose the configured library's supported numerical facilities and their public value types through the documented public headers, preserving the declared numerical meanings and public type contracts of those facilities.

RATIONALE:

C++ is the primary interface through which clients directly use domains, descriptors and solvers.

COMMENT:

Verification covers the public C++ header and type-exposure contracts. Client compilation and mathematical behavior checks verify those contracts. 🔗 2. Installation of configured public artifacts owns installation completeness and deployment information; public C++ facility and type exposure is distinct from installation packaging. No additional client language-edition promise is introduced here.

VERIFICATION_CRITERIA:

Compile and link representative clients using the public C++ types and facilities in each selected supported configuration. Compare behavior with the corresponding mathematical obligations and review exclusions for unavailable facilities. Use installed-client checks together with 🔗 2. Installation of configured public artifacts to establish that the public interface remains usable after installation.

SOURCE:

doc/definitions.dox: PPL_CXX_interface and use_of_library; src/ppl_header.hh; src/Makefile.am: public header generation and installation.

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

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

  • 1. Binary floating-format fields and numerical metadata UID: PPL-SPEC-001584 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The binary representation descriptors shall expose unsigned storage fields and metadata for IEEE binary16, binary32, binary64 and binary128, and Intel 80-bit double-extended format. Their radix shall be two. Exponent-field width, fraction width and bias shall respectively be (5, 10, 15), (8, 23, 127), (11, 52, 1023), (15, 112, 16383) and (15, 63, 16383). The Intel format shall store its integer bit explicitly; the IEEE normal formats shall use an implicit leading one.

    The metadata members shall be immutable constant expressions with inline definitions. Taking their addresses in independent translation units shall refer to the same objects.

    EXPONENT_MAX shall equal the bias, EXPONENT_MIN shall be one minus the bias, and EXPONENT_MIN_DENORM shall be EXPONENT_MIN minus the fraction width. The smallest positive subnormal shall consequently be 2 EXPONENT_MIN_DENORM. The format enumeration shall identify the corresponding descriptor. Single-word descriptors shall expose word; multiword descriptors shall expose msp and lsp, with their layout selected by the configured word order. Intel sign and exponent shall occupy the low 16 bits of msp; padding shall not be a numerical field.

    For the binary16 and binary32 single-word descriptors, SGN_MASK shall select only the sign bit and EXP_MASK shall select only the exponent field. Their respective mask pairs shall be (0x8000,0x7c00) and (0x80000000,0x7f800000). Masking shall exclude all fraction bits and exponent masking shall be independent of sign.

    Raw descriptor operations shall use unsigned fields and GMP integer storage. They shall be usable independently of native hardware availability of that floating format and shall require no FPU rounding-state setup. Callers shall provide live objects and valid initialized fields before inspection, plus synchronization for overlapping access. These binary descriptor rules shall not extend to the hexadecimal descriptor types.

    RATIONALE:

    The format model must distinguish field precision from exponent range and retain subnormal scales even when the host has no matching native type.

    INTERFACE:

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

    struct float_ieee754_half;
    struct float_ieee754_single;
    struct float_ieee754_double;
    struct float_ieee754_quad;
    struct float_intel_double_extended;
    // Each descriptor exposes BASE, EXPONENT_BITS, MANTISSA_BITS,
    // EXPONENT_BIAS, EXPONENT_MIN, EXPONENT_MAX,
    // EXPONENT_MIN_DENORM and floating_point_format.
    
    VERIFICATION_CRITERIA:

    Check literal metadata for all five descriptors without native arithmetic. Check address-taking and object identity across independent translation units. Check unsigned field widths, configured low/high word order and each smallest-subnormal exponent against independently stated format constants. Check the single-word masks and exhaust all binary16 words against an independent arithmetic extraction of their five exponent bits.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • PPL-SPEC-001585
    2. Classification of raw binary floating encodings UID: PPL-SPEC-001585 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For initialized IEEE descriptor fields, inf_sign shall return minus one for negative infinity, plus one for positive infinity and zero otherwise. zero_sign shall similarly distinguish negative zero and positive zero, returning zero for every other encoding. is_nan shall be true exactly when all exponent bits are one and at least one fraction bit is nonzero. Sign shall not affect NaN recognition. Every fraction bit, including bits in either stored word, shall distinguish a NaN from infinity.

    The same results shall hold for canonical Intel encodings: infinity shall have an all-ones exponent and exactly the explicit integer bit in its significand; a canonical NaN shall have an all-ones exponent, the integer bit set and a nonzero fraction. Canonical finite normal encodings shall have the integer bit set, and subnormal/zero encodings an exponent and integer bit of zero. Other Intel encodings shall not be admitted by this classification contract. Padding bits of msp shall not affect Intel classification. Inputs shall remain unchanged and the conditions of 🔗 1. Binary floating-format fields and numerical metadata shall apply.

    RATIONALE:

    Classification must inspect the entire significand, preserving signed zeros and distinguishing low-word NaN payloads from infinity.

    INTERFACE:

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

    int inf_sign() const;
    int zero_sign() const;
    bool is_nan() const;
    
    VERIFICATION_CRITERIA:

    Use literal signed zero, subnormal, normal, finite-limit and infinity encodings. Exhaust binary16 encodings and exercise every fraction bit in canonical NaNs of each wider format; verify source-field preservation.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • PPL-SPEC-001586
    3. Raw floating sign inspection and negation UID: PPL-SPEC-001586 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    sign_bit shall return the stored sign bit. negate shall toggle exactly that bit, preserving exponent, significand and other stored bits. Two negations shall restore every field, including zero, infinity and NaN payloads. Sign inspection shall preserve every field. The descriptor and lifetime conditions of 🔗 1. Binary floating-format fields and numerical metadata shall apply.

    RATIONALE:

    Sign manipulation is a representation operation and must preserve payload and magnitude information independently of floating arithmetic.

    INTERFACE:

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

    bool sign_bit() const;
    void negate();
    
    VERIFICATION_CRITERIA:

    Exhaust signed binary16 bit patterns; check normal, subnormal, zero, infinity and NaN payload cases for every wider binary descriptor. Compare literal unsigned fields after one and two negations.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • PPL-SPEC-001587
    4. Adjacent binary floating magnitudes UID: PPL-SPEC-001587 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For canonical binary encodings, inc shall replace a finite magnitude with its immediately succeeding representable magnitude, retaining sign; dec shall replace a nonzero finite or infinite magnitude with its immediately preceding representable magnitude, retaining sign. Thus increment of either signed zero shall produce the same-sign smallest subnormal; decrement of the smallest subnormal shall produce the same-sign zero. The largest finite magnitude shall increment to infinity, whose decrement shall recover that finite magnitude. Calls shall exclude NaNs, decrement of zero and increment of infinity.

    Carries and borrows shall cross stored-word boundaries. Intel transitions between the largest subnormal and least normal shall clear or set the explicit integer bit as required for a canonical encoding. The conditions of 🔗 1. Binary floating-format fields and numerical metadata shall apply. Numerical ordering of negative operands shall follow the preserved sign and changed magnitude.

    RATIONALE:

    Directed conversion needs one representable step at boundaries, including subnormal/normal transitions where the Intel integer bit changes.

    INTERFACE:

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

    void inc();
    void dec();
    
    VERIFICATION_CRITERIA:

    Check both signs at zero/subnormal, subnormal/normal, significand carry and finite/infinite boundaries. Include cross-word carry/borrow and inverses for all admissible paired magnitudes, with literal field oracles.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • PPL-SPEC-001588
    5. Largest finite binary floating magnitude UID: PPL-SPEC-001588 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    set_max(negative) shall overwrite the descriptor with the largest finite magnitude and the requested sign. IEEE encodings shall use the largest finite exponent field and all fraction bits one; Intel encoding shall also set its explicit integer bit. Prior field values shall not influence the result. The value shall classify as finite, nonzero and of the requested sign. The conditions of 🔗 1. Binary floating-format fields and numerical metadata shall apply.

    RATIONALE:

    An inward overflow bound must be finite and must not depend on stale bits in a previously used representation object.

    INTERFACE:

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

    void set_max(bool negative);
    
    VERIFICATION_CRITERIA:

    Poison every destination field, request each sign and compare all fields with literal maximum-finite encodings. Check classification and successor to the corresponding infinity.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • PPL-SPEC-001589
    6. Assembly of binary floating fields from an integer significand UID: PPL-SPEC-001589 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    build(negative,mantissa,exponent) shall overwrite every numerical field with the requested sign, biased exponent and significand. For IEEE formats with fraction width f, the stored fraction shall be the remainder of m on division by 2f, where m is the integer mantissa on entry; its possible leading normal bit shall be implicit. Intel storage shall contain all 64 significand bits, including its explicit integer bit. The stored exponent shall be exponent + EXPONENT_BIAS. A zero mantissa and zero biased exponent shall produce the requested signed zero, independently of prior destination bits and host unsigned long width. The Intel builder shall clear nonnumerical high msp bits.

    Callers shall provide a live GMP integer mantissa with 0 ≤ m < 2f + 1 for IEEE formats or 0 ≤ m < 264 for Intel, and an exponent whose biased value lies within the exponent field. Mantissa and destination storage shall be disjoint. This shall assemble fields without numerical rounding or normalization; callers needing a canonical finite or special encoding shall provide compatible fields. The mantissa shall be mutable workspace: its numerical value after the call need not equal its entry value, but it shall remain a valid GMP integer. The conditions of 🔗 1. Binary floating-format fields and numerical metadata shall apply.

    RATIONALE:

    Integer-to-field assembly must initialize zero as well as nonzero payloads; GMP export of zero does not write a destination word.

    INTERFACE:

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

    void build(bool negative, mpz_t mantissa, int exponent);
    
    VERIFICATION_CRITERIA:

    Poison every field and build signed zero, smallest/largest subnormal, least normal, unit, greatest finite and infinity encodings from independent integer bit patterns. Check word-spanning significands in 32- and 64-bit-long builds. For x87 native conversion, check exact subnormal-unit rational bounds on both sides of zero and at the first-subnormal boundary.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/float1.cc; tests/floatrepresentationsspec1.cc; tests/constantaddresses1.cc; tests/constantaddresses_aux.cc.

  • 1. Mathematical interpretation of bounded-integer wrapping attributes UID: PPL-SPEC-001041 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The modeled attributes identified by 🔗 1. Modeled bounded-integer type identity shall have the following mathematical meanings. A width w shall describe M = 2w. The unsigned value range shall be the integers in [0, M − 1]; the signed two's-complement range shall be the integers in [ − M ⁄ 2, M ⁄ 2 − 1].

    For an unwrapped integer z, unsigned wrapping shall choose the unique integer r in the unsigned range congruent to z modulo M. Signed wrapping shall choose r when r < M ⁄ 2 and r − M otherwise. Negative unwrapped values shall use the same nonnegative unsigned residue, independently of a host language's signed remainder convention.

    OVERFLOW_WRAPS shall use this modular interpretation. OVERFLOW_UNDEFINED shall permit arbitrary modeled result values after overflow, rather than choosing a particular residue; this arithmetic-result abstraction shall not model every other possible effect of language undefined behavior. OVERFLOW_IMPOSSIBLE shall retain only the transitions whose unwrapped result is within the selected value range.

    A modeled width, including 128 bits, shall not assert the existence of a native scalar type or a configured coefficient type of that width. The numerical operations computing an abstraction shall retain their separate computational range and availability prerequisites. Attribute identity and factory/getter behavior shall remain as specified by 🔗 1. Modeled bounded-integer type identity.

    RATIONALE:

    Modeled overflow and host arithmetic have separate mathematical roles: unbounded intermediate arithmetic determines which bounded result interpretation applies.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    enum Bounded_Integer_Type_Width {
      BITS_8=8, BITS_16=16, BITS_32=32, BITS_64=64, BITS_128=128
    };
    enum Bounded_Integer_Type_Representation { UNSIGNED, SIGNED_2_COMPLEMENT };
    enum Bounded_Integer_Type_Overflow {
      OVERFLOW_WRAPS, OVERFLOW_UNDEFINED, OVERFLOW_IMPOSSIBLE
    };
    
    VERIFICATION_CRITERIA:

    Compare actual interval/Box operations with literal integer division and nonnegative remainder oracles. Check both encodings, all five modeled widths, negative values, period boundaries, signed half-period boundaries and the distinct three overflow interpretations. Exercise 128-bit modeled limits through GMP endpoint storage without assuming a native int128 type; reuse the metadata identity checks of 🔗 1. Modeled bounded-integer type identity.

    BIBLIOGRAPHY:

    SimonK07 | Section 2.2, binary signed/unsigned semantics; PDF page index 2 (zero-based).

    SOURCE:

    src/globals_types.hh; doc/definitions.dox: Approximating Bounded Integers.

    tests/wrappingspec1.cc; tests/wrappingoracle.hh; tests/wrappingpublic1.cc.

  • 2. Interval abstraction of wrapped integer images with refinement UID: PPL-SPEC-001042 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 interval X, an admitted width and representation from 🔗 1. Mathematical interpretation of bounded-integer wrapping attributes, and the entry interval J denoted by refinement, wrap_assign shall produce an interval containing every

    {wrapw, r(z) ∣ z ∈ X∩ℤ}∩J.

    The completed interval shall be contained in the receiving profile's outward interval conversion of J; exact conversion shall imply containment in J itself. refinement may denote an arbitrary valid interval or singleton; it need not lie inside the modeled value range. A refinement inside that range shall therefore bound the completed result to that range. An empty receiver shall remain empty. A receiver unbounded in either direction may conservatively become the refinement itself, and noninteger input points need not all be eliminated. No universal least-hull or complete integer filtering guarantee shall be inferred. With exact arithmetic, closed integral endpoints and a closed integral refinement inside the modeled range, the result shall be the least interval hull of the retained wrapped integer images.

    The receiver may be the refinement interval, and a singleton refinement may borrow either of its boundary objects. Those calls shall use both entry values. A refinement with distinct storage shall retain its value. Returned I_Result shape and definite status claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations for the whole operation, including its entry-to-result change claims.

    The validity, policy, active-payload, lifetime and synchronization conditions of 🔗 1. Interval types, initial storage and independent value copies shall apply. The selected backend shall support any actually evaluated power-of-two subtraction and signed/unsigned residue at the supplied exponent, as specified by its scalar contracts. Exact precision claims shall require exact endpoint conversion, modular arithmetic and any intermediate unit adjustment. Computational range failures, resources, shared temporaries and caller-owned FPU state shall retain those scalar contracts. An admitted modeled width alone shall not establish these backend capabilities. Valid calls shall require no additional PPL initialization. Underlying failures may leave partly updated storage; there shall be no aggregate rollback guarantee.

    RATIONALE:

    A refinement can clip a modular image without making the modular image itself convex; entry-value aliases and truthful aggregate result claims remain independent obligations.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    // Member of Interval<Boundary,Info>:
    template <Interval_Source From>
    I_Result
    wrap_assign(Bounded_Integer_Type_Width w,
                Bounded_Integer_Type_Representation r,
                const From& refinement);
    
    VERIFICATION_CRITERIA:

    Check returned logical shape and entry-to-result change claims on full-period assignment, split/join and intersection paths, including unchanged copied refinements, receiving aliases, borrowed scalars, empty inputs and signed residues. Enumerate concrete wrapped integers in bounded translated intervals using an independent quotient/remainder oracle. Include all endpoint topologies, fractions, one/full/multiple periods, sign discontinuities, empty/ray/universe inputs and arbitrary refinements inside, partly outside and disjoint from the modeled range. Check witness containment, refinement containment and the stated closed-integral least-hull guarantee. Exercise distinct-source preservation, same-interval and borrowed-boundary aliases, meaningful shape/change flags and native/GMP admitted backend prerequisites.

    BIBLIOGRAPHY:

    SimonK07 | Sections 5.1–5.4, explicit wrapping; PDF page indices 7–10 (zero-based).

    SOURCE:

    src/Interval_defs.hh; src/Boundary_defs.hh;

    tests/wrappingspec1.cc; tests/wrappingoracle.hh; tests/wrappingpublic1.cc; tests/intervalresultsspec1.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-001647
    5. Threshold-aware CC76 box convergence certificates UID: PPL-SPEC-001647 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    CC76_Certificate shall record a finite remaining level for a nonempty Box<ITV> whose boundary type represents the ordered default stopping points T = { − 2,  − 1, 0, 1, 2}. An unbounded endpoint shall contribute zero. A closed endpoint at a finite carrier extent shall also contribute zero; an open endpoint there shall contribute one. Any other finite lower endpoint at b shall contribute 2 + 2#{t ∈ T : t < b} + o, where o is one for an open endpoint and zero for a closed endpoint. A finite upper endpoint shall instead count stopping points strictly greater than its value. The certificate level shall be the sum over both endpoints of every coordinate.

    Default construction shall describe the zero-dimensional universe. Copying and assignment shall preserve the stored level. Comparison shall return 1, 0 or -1 according as the receiver's level is greater than, equal to or less than the argument's level. Compare shall order larger levels first. Comparison with a box shall compute its certificate and use the same ordering. Equal levels shall not imply equal sets. Inclusion alone shall not promise a nonincreasing level: an endpoint moving inside a threshold cell may also open.

    For a fixed dimension and interval policy, consider a nonempty previous box and a containing candidate, widened by the tokenless default CC76 overload of 🔗 2. Default box widening and precision-sensitive delay tokens. Each endpoint level shall be nonincreasing over that widened step, and every strict set increase shall strictly decrease the sum. The sum shall be between zero and 26 times the dimension, proving finite stabilization for this base widening and supplying the finite certificate required by 🔗 3. Certificate-based powerset widening. This compatibility shall not extend to arbitrary iterator-supplied stopping points, delayed widening or limited extrapolation without a separate argument.

    Empty box construction shall throw std::invalid_argument. Unrepresentable stopping points shall retain the boundary conversion's exception, or throw std::invalid_argument if the converted values are not strictly ordered. A dimension for which 26 times the dimension would overflow dimension_type shall throw std::length_error. The box lifetime, initialization and numerical prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Queries may normalize lazy caches without changing the represented set.

    RATIONALE:

    If a finite endpoint moves outward, CC76 moves it to a stopping point beyond its previous value or extends it to the carrier extent. The threshold count or the finite-endpoint contribution then drops by at least one, dominating any one-bit openness increase. If the endpoint value does not move, containment permits only unchanged membership or closing an open endpoint. Summing these finite descending ranks supplies a certificate; affine dimension and facet count alone miss movement through stopping points.

    INTERFACE:

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

    CC76_Certificate();
    template <typename ITV> explicit CC76_Certificate(const Box<ITV>&);
    CC76_Certificate(const CC76_Certificate&);
    CC76_Certificate& operator=(const CC76_Certificate&);
    int compare(const CC76_Certificate&) const;
    template <typename ITV> int compare(const Box<ITV>&) const;
    struct Compare {
      bool operator()(const CC76_Certificate&, const CC76_Certificate&) const;
    };
    
    VERIFICATION_CRITERIA:

    Check defaults, copies, assignment and ordering. Distinguish threshold progress from unchanged H79 facets. Enumerate nested rational endpoint cases with strict and closed boundaries on both sides, including within-cell growth, exact hits and becoming unbounded. Include a bounded carrier without a special infinity representation and check extension to both carrier limits. Check a disjunctive ascending history that stabilizes under certified BHZ03 while ordinary joins keep growing, and reject empty construction. Inspect the finite-rank argument independently of these sample histories.

    BIBLIOGRAPHY:

    BagnaraHZ06STTT | Section 2.1, finite convergence certificates; Section 7, Definition 16 and Theorem 3, certificate-based powerset widening. BagnaraHZ06STTTerratum | Corrected figures for the preceding article.

    SOURCE:

    src/CC76_Certificate_types.hh; src/CC76_Certificate_defs.hh; src/CC76_Certificate_inlines.hh; tests/cc76certificatespec1.cc; tests/Box/bhz03widening1.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.

  • PPL-SPEC-000961
    1. Dimension-preserving box coordinate forgetting UID: PPL-SPEC-000961 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty box, forgetting a selected coordinate shall replace its factor by the selected interval profile's universe, leaving every other factor and the ambient dimension unchanged. Forgetting a set of coordinates shall apply that meaning to all selected positions. The result shall exactly denote existential elimination of those values with the same positions restored as unrestricted coordinates. An empty source shall remain empty, including when emptiness is carried only by a factor being forgotten. Forgetting no coordinates shall preserve the value.

    An out-of-dimension variable, or any member of a selected set outside the ambient dimension, shall throw std::invalid_argument. This validation shall apply also to empty boxes. Valid coordinate selections shall use the coordinate identity and lifetime rules for Variable and Variables_Set.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Forgetting values retains coordinate identity and differs from deleting coordinate positions.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void unconstrain(Variable var);
    void unconstrain(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Compare all coordinate subsets of independent small Cartesian products; retain empty sources with a selected or unselected empty factor, zero-dimensional empty/universe, ambient dimensions and untouched factors. Check single-coordinate/set equivalence and invalid selections.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000962
    2. Unrestricted and zero-fixed box coordinate extension UID: PPL-SPEC-000962 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Adding m coordinates shall preserve every old coordinate in its original position and append the new coordinates at the highest indices. add_space_dimensions_and_embed(m) shall append unrestricted factors. add_space_dimensions_and_project(m) shall append factors containing exactly zero. Each completed result shall exactly denote the corresponding Cartesian extension. Empty sources shall remain empty, including empty zero-dimensional sources; zero-dimensional universe shall extend to the corresponding unrestricted or zero-fixed product. Adding zero coordinates shall preserve the value.

    If the resulting ambient dimension would exceed max_space_dimension(), the operation shall throw std::length_error before attempting coordinate allocation of that size. Successful dimensions shall remain subject to resource availability.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Unrestricted extension and extension fixed to zero represent different sets.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void add_space_dimensions_and_embed(dimension_type m);
    void add_space_dimensions_and_project(dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare literal unrestricted and zero-factor suffixes in dimensions zero through three, nonempty/empty sources and lazy empty factors. Check no-op calls, coordinate order and dimension overflow rejection without large allocation.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000963
    3. Ordered Cartesian box concatenation UID: PPL-SPEC-000963 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    concatenate_assign(y) shall replace the destination by the exact Cartesian product of its entry value and y's entry value, with destination coordinates preceding source coordinates. The ambient dimensions shall add. Either empty operand shall make the result empty. Zero-dimensional universe shall act as the identity on either side; zero-dimensional empty shall retain its empty-set meaning.

    A distinct source shall remain unchanged. Self-concatenation shall be admitted and shall use the entry factors twice, with independently mutable factor storage after success. The two tuples in a self-product shall be chosen independently. Dimension overflow shall throw std::length_error; successful dimensions shall remain subject to allocation/resource availability.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Cartesian composition must preserve operand order and separate the values selected for each tuple.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void concatenate_assign(const Box& y);
    
    VERIFICATION_CRITERIA:

    Compare ordered factor sequences of independently chosen boxes, empty and zero-dimensional operands, lazy emptiness on either side and self-products. Mutate original/appended coordinates after success to check independent storage and retained sources.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000964
    4. Selected-coordinate box projection and compaction UID: PPL-SPEC-000964 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_space_dimensions(vars) shall existentially project away exactly the selected coordinates. Surviving factors shall retain their relative order and shall receive contiguous indices starting at zero. The resulting dimension shall be the entry dimension minus the selected set's cardinality. For boxes this projection shall be exact. Empty sources shall remain empty, even if the only empty factor is removed. Removing every coordinate from a nonempty box shall give zero-dimensional universe; removing every coordinate from empty shall give zero-dimensional empty. Removing no coordinates shall preserve the value.

    A selected coordinate outside the entry ambient dimension shall throw std::invalid_argument, including for empty inputs.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Existential projection removes positions while preserving the order of surviving coordinates.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Enumerate coordinate subsets of independent factor vectors, including removal of every/no coordinate, empty factors at all positions and nonadjacent removed positions. Compare surviving order and zero-dimensional meaning; check invalid selections.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000965
    5. Trailing-coordinate box projection UID: PPL-SPEC-000965 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_higher_space_dimensions(d) shall exactly project onto the first d entry coordinates. The ambient dimension shall become d and retained factors shall preserve order and values. An empty source shall remain empty regardless of which factors carried emptiness. Projection to dimension zero shall yield universe exactly for a nonempty source, and empty for an empty source. Requesting the current dimension shall preserve the value.

    If d exceeds the entry ambient dimension, the operation shall throw std::invalid_argument. It shall not extend the box.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Trailing projection has the same empty-set semantics as general coordinate removal.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void remove_higher_space_dimensions(dimension_type d);
    
    VERIFICATION_CRITERIA:

    Compare each prefix dimension against an independent existential projection, including zero/all retained coordinates, empty sources and emptiness stored only in a discarded factor. Check excessive-dimension rejection and agreement with selected-coordinate projection.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000966
    6. Injective partial box coordinate remapping UID: PPL-SPEC-000966 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry ambient dimension n, the supplied mapping shall be a stable injective partial function on indices from zero through n-1, with image exactly the contiguous indices from zero through m-1 for some m no greater than n. The operation shall exactly project away unmapped coordinates and place each retained entry factor at its mapped index. The result shall have dimension m. Empty sources shall remain empty. An empty mapping shall give zero-dimensional universe for a nonempty source and zero-dimensional empty for an empty source. A zero-dimensional source shall retain its value.

    The mapping object shall provide the protocol shown below. has_empty_codomain() shall report whether the map is nowhere defined; max_in_codomain() shall return the maximum image when nonempty; maps(i,j) shall report membership in the domain and, on true, assign the image to j. Whenever callbacks are used, the empty-codomain query shall precede the others, and a true result shall preclude maximum/image queries. No callback shall be required for a zero-dimensional source. Values and mapping callbacks shall meet their own resource, lifetime and synchronization prerequisites. A mapping violating the stated mathematical/protocol preconditions shall be outside the contract.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Coordinate remapping combines projection with a specified renaming, without conflating or duplicating coordinates.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    template <typename Partial_Function>
    void map_space_dimensions(const Partial_Function& pfunc);
    // Required const operations on the mapping argument:
    bool has_empty_codomain() const;
    dimension_type max_in_codomain() const;
    bool maps(dimension_type i, dimension_type& j) const;
    
    VERIFICATION_CRITERIA:

    Compare partial injections, permutations, empty maps and removal-plus-permutation against independent factor-index vectors. Exercise callback ordering and short-circuiting with a protocol-checking adapter; retain empty/lazy-empty and zero-dimensional values. 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/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc. tests/coordinatemappingfixture.hh; tests/Box/mapspacedims1.cc;

  • PPL-SPEC-000967
    7. Box coordinate expansion and replica precision UID: PPL-SPEC-000967 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid existing coordinate var, expand_space_dimension(var,m) shall append m factors with the entry factor's value. Original coordinates shall retain their values and indices. Each new factor shall own independently mutable storage. The resulting box shall be the least Cartesian interval enclosure, in the selected factor profile, of the coordinate-expansion relation: the original selected value may be chosen independently of the replica value, while all replicas in a concrete expanded tuple use a common selected-factor value. The box enclosure may choose different values for different replicas. No original-to-replica equality shall be imposed. Empty sources shall remain empty. Adding no replicas shall preserve the value.

    An out-of-dimension coordinate shall throw std::invalid_argument, including when m is zero or the box is empty. If the final dimension exceeds max_space_dimension(), the operation shall throw std::length_error. Successful dimensions shall remain subject to resource availability.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Box expansion copies admissible coordinate values; the Cartesian representation abstracts relationships among multiple replicas.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void expand_space_dimension(Variable var, dimension_type m);
    
    VERIFICATION_CRITERIA:

    Compare appended factors against independent entry-factor copies for zero/one/multiple replicas, singleton/nonsingleton factors and empty sources. Include tuples with distinct replica values in the abstract enclosure and distinct original/replica values in the concrete relation. Check storage independence, invalid coordinates and overflow.

    BIBLIOGRAPHY:

    GopanDMDRS04 | Whole work (background on expansion and folding of summarized dimensions).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.cc.

  • PPL-SPEC-000968
    8. Box coordinate folding and interval enclosure UID: PPL-SPEC-000968 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid destination coordinate dest and selected set vars that excludes it, folding shall replace the destination factor by the least interval of the selected profile containing the union of its entry factor and all selected entry factors. It shall then remove the selected coordinates, compacting the remaining positions in their original order. Other retained factors shall preserve their entry values. This shall be the least box enclosure of the alternatives obtained by choosing either the original destination or one selected coordinate for the surviving destination value. Gaps between those alternatives may be included by the interval hull. Empty sources shall remain empty. An empty selected set shall preserve the value.

    An out-of-dimension destination or selected coordinate, or inclusion of the destination in the selected set, shall throw std::invalid_argument. Destination validity shall be required even for an empty selected set and for an empty box.

    The validity, numerical, initialization, synchronization and resource prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Operations requiring Variables_Set or mapping objects shall retain those objects' own interface prerequisites. A distinct borrowed source shall remain unchanged unless explicitly included in the destination mutation. Underlying allocation or endpoint exceptions shall retain their own guarantees; no general rollback guarantee shall be inferred.

    RATIONALE:

    Folding combines coordinate alternatives and removes their positions; interval enclosure makes its precision explicit.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Box<ITV>:

    void fold_space_dimensions(const Variables_Set& vars, Variable dest);
    
    VERIFICATION_CRITERIA:

    Compute interval union hulls independently, including disjoint factors, tied extrema with different endpoint openness, unbounded factors, destination shifts after removal and multiple/nonadjacent selected positions. Compare untouched factors, empty/lazy-empty and zero-selection values; check all invalid selection classes.

    BIBLIOGRAPHY:

    GopanDMDRS04 | Whole work (background on expansion and folding of summarized dimensions).

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxcoordinatesspec1.cc; tests/boxpublic1.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-000972
    4. Owned box memory accounting UID: PPL-SPEC-000972 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall report the sum of the owned coordinate sequence's allocated slot storage and the external memory reported by every live interval element. If K coordinate slots are allocated and n elements are live, slot storage shall contribute K * sizeof(ITV); each live element's external storage shall be counted once, including elements in a logically empty box. Inactive logical factors shall not cause owned allocated storage to disappear from the accounting.

    total_memory_in_bytes() shall report sizeof(Box<ITV>) plus that external count. Object/slot sizes shall be those of the selected build and interval profile. The result shall exclude allocator bookkeeping and independently owned library temporaries or other objects. Successful calls shall require each selected interval's memory query to be well-formed and the sum to fit memory_size_type. The queries shall preserve the represented value, ambient dimension and owned storage.

    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:

    Memory reports describe retained owned storage, which can exceed the storage needed for the current mathematical value.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    // Members of Box<ITV>:
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check total/external identity, no endpoint-owned storage for native scalar factors, interval-owned GMP limb storage, retained capacity after dimension removal, copies, empty storage and swaps. Compare independent owned-allocation observations and per-element codec/accounting prerequisites without treating allocator metadata as object storage.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/globals_defs.hh; tests/boxtextspec1.cc.

  • PPL-SPEC-001220
    5. Box representation invariant query UID: PPL-SPEC-001220 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live, well-owned and safely indexable box whose selected interval operations are admitted, OK() shall check the following representation conditions. If a current nonempty cache claim is present, the coordinate product shall have no empty factor. Unless the box is certified empty, every coordinate factor shall pass its selected interval OK() query. A violation of a checked condition shall return false; passing these checks shall return true. Zero-dimensional empty and universe shall both pass. Certified empty boxes may retain inactive coordinate storage; its interval validity shall not be a condition of this query.

    The receiver's mathematical value, dimension, owned coordinate storage and cached claims shall remain unchanged. The query may copy the box and query interval emptiness on that temporary. Allocation or interval-operation exceptions may propagate; discarded query temporaries shall release their owned storage. Debug builds may emit a diagnostic for an inconsistent nonempty claim; exact diagnostic wording shall not be part of the result.

    The interval admission and synchronization conditions of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply to the operations used by the query. Diagnostic use may inspect safely owned but inconsistent cache claims or safely queryable invalid factors. It shall not inspect arbitrary damaged pointers, broken lifetimes or non-indexable fabricated storage. A true result shall not certify arbitrary client preconditions, minimum storage, or that the box is nonempty.

    RATIONALE:

    The Cartesian product is empty exactly when a factor is empty. A cached nonempty claim must agree with that fact. Factors of an explicitly empty box are inactive and need not describe an independent product.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Box<ITV>:

    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check valid empty, universe, bounded and lazily classified products in zero and positive dimensions, retaining value, cache and storage snapshots. Use the existing narrow status-access fixture to present a safely owned empty factor with a contradictory nonempty cache; require a false result. Use a well-formed diagnostic interval profile to require false when an active factor rejects its own invariant check, and true when the same factor is inactive in a certified empty box. Include successful direct public-header calls without automatic or explicit PPL initialization.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxpublicstatespec1.cc; tests/boxstatepublic1.cc.

  • PPL-SPEC-000951
    1. Cartesian box values, coordinate identity and valid use UID: PPL-SPEC-000951 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box<ITV> shall represent a Cartesian product of its coordinate intervals over the ordinary real carrier. A point shall belong exactly when each coordinate belongs to its corresponding factor; distinct coordinates shall impose no additional relationships. An empty factor shall make the product empty. The ambient dimension shall remain part of the value even for an empty box. In dimension zero, universe shall contain the unique empty tuple and shall differ from empty. interval_type shall name ITV; Rational_Box shall select Rational_Interval factors.

    Selected interval operations shall be well-formed and their information policy shall admit the required empty, universe and endpoint values. Active numerical payloads shall be initialized and rational payloads canonical. Clients shall retain the selected endpoint operation's finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Basic construction, copying, exchange and valid-coordinate factor access shall require no additional PPL initialization. Reporting dimension-incompatible coordinate arguments shall retain an initialized library/thread context under 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization, including the live coefficient constants used by that reporting path. Other APIs using separately initialized descriptors or facilities shall retain their own prerequisites.

    Boxes and borrowed arguments shall remain live throughout a call. Access shall be synchronized against mutation; logically const queries may update cached information and shall be synchronized where those updates could overlap. Cached status shall not change the represented product. Empty boxes may retain inactive coordinate storage; clients shall use the public empty-aware coordinate access contract rather than infer meaningful factors from internal empty storage.

    RATIONALE:

    A box is a dimensioned Cartesian set, so zero-dimensional universe, empty products and inactive empty storage need explicit meanings.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    template <typename ITV> class Box;
    // Member of Box<ITV>:
    typedef ITV interval_type;
    typedef Box<Rational_Interval> Rational_Box;
    
    VERIFICATION_CRITERIA:

    Compare independent Cartesian membership descriptions, empty factors and zero-dimensional empty/universe; instantiate rational and integral core value operations without automatic or explicit PPL initialization; separately check coordinate-validation outcomes under initialized library/thread context. 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; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.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-000952
    2. Dimensioned empty and universe box construction UID: PPL-SPEC-000952 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Box(d,kind) shall construct a box of ambient dimension d: empty for EMPTY and the complete declared Cartesian carrier for UNIVERSE. Default construction shall give zero-dimensional universe. Each active universe factor shall have the selected interval's universe meaning; custom interval/information constructors shall retain their per-element state rather than be required to share copied identity.

    max_space_dimension() shall return the dimension limit of this box profile. Construction above that limit shall throw std::length_error before attempting coordinate storage of that size. Dimensions within the limit shall remain subject to actual allocation/resource availability; the reported limit shall not promise successful allocation. Construction shall not require interpreting inactive interval payloads of an empty box.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Construction must distinguish mathematical dimension validity from physical resource availability.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    explicit Box(dimension_type d=0,Degenerate_Element kind=UNIVERSE);
    static dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check default and explicit empty/universe construction in dimensions 0, 1, 2 and larger small cases, exact zero-dimensional meaning and above-limit rejection without allocating at the limit. Reuse custom per-element constructor regressions.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • 3. Owned box copying, assignment and cleanup UID: PPL-SPEC-000953 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Same-profile copying shall preserve ambient dimension and represented set while independently owning all mutable coordinate/metadata storage. The copy constructor's complexity argument shall not change that result. Assignment shall replace the receiving value even when dimensions differ and shall return the receiving object; self-assignment shall preserve its value. Destruction shall release owned resources without modifying other live values.

    On successful return, subsequent mutation or destruction of either owner shall not change the other owner's represented value. Empty and lazy cached states shall retain correct mathematical meaning after copying/assignment.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Copying a dimensioned product must preserve meaning while retaining independent endpoint ownership.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    Box(const Box& y,Complexity_Class complexity=ANY_COMPLEXITY);
    Box& operator=(const Box& y);
    // The implicit destructor releases the owned coordinate representation.
    
    VERIFICATION_CRITERIA:

    Check copy construction under each complexity argument, assignment between different dimensions, empty/nonempty/lazy states, returned identity and self-assignment. Mutate/destroy donor and receiver independently and check retained endpoint values. 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; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc. tests/interfacedboxpolicies1.cc: Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

  • 4. Upward box conversion between interval profiles UID: PPL-SPEC-000954 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Box<Other_ITV> shall preserve ambient dimension and enclose every source point under the receiving interval policies. An established empty source shall give empty. For other sources the conversion shall use receiving coordinate enclosures rather than trust cached facts whose validity can change through endpoint conversion. With exactly representable endpoints and supported membership, it shall preserve the represented set exactly. Otherwise endpoint conversion or relaxed openness may enlarge the product. The complexity argument shall not change this profile-conversion result. The separate source shall remain unchanged and the receiving value shall own independent coordinate storage.

    Selected source/destination interval assignments shall be well-formed and satisfy their own admitted conversion prerequisites.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Interval conversion can change emptiness knowledge and boundary precision, so the target must reconstruct valid cached meaning.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    template <typename Other_ITV>
    explicit Box(const Box<Other_ITV>& y,
                 Complexity_Class complexity=ANY_COMPLEXITY);
    
    VERIFICATION_CRITERIA:

    Check exact same-family profile conversions, fractional outward integral endpoints, relaxed openness, marked and lazily empty sources, empty/universe zero-dimensional values and independent ownership. Compare literal source-point containment and receiving endpoints.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000955
    5. Whole box exchange across different dimensions UID: PPL-SPEC-000955 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    m_swap(y) and free swap(x,y) shall exchange complete box values, including dimensions, coordinate ownership and cached status. Different dimensions and empty/nonempty states shall be permitted. Self-exchange shall preserve the value. References into exchanged coordinate storage shall follow that storage's owner; callers shall not assume a reference continues to identify the original logical coordinate value. Exchange of the standard owned coordinate sequence/status shall not perform per-endpoint numerical conversions or require coefficient range operations.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Whole-owner exchange must retain dimensions and status alongside the factors.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    void m_swap(Box& y);
    template <typename ITV> void swap(Box<ITV>& x,Box<ITV>& y);
    
    VERIFICATION_CRITERIA:

    Exchange different dimensions, empty/nonempty values, universe and lazy states through both forms; check both resulting mathematical values, self-exchange and active endpoint reference ownership.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000956
    6. Ambient and affine box dimension queries UID: PPL-SPEC-000956 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall return the ambient coordinate count, including for empty boxes. affine_dimension() shall return zero for empty boxes; otherwise it shall equal the number of nonsingleton coordinate factors over the ordinary real carrier. Both empty and universe in ambient dimension zero shall therefore have affine dimension zero. These queries shall not change the represented set or ambient dimension.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Ambient coordinate count differs from the dimension of a nonempty Cartesian set affine hull.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    dimension_type space_dimension() const;
    dimension_type affine_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check independent factor counts over empty, singleton, mixed finite and unbounded products in dimensions 0, 1 and 2; retain ambient dimension on empty boxes and after copying/conversion.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • 7. Empty-aware borrowed coordinate interval access UID: PPL-SPEC-000957 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    get_interval(v) shall return a const interval reference for an existing coordinate. For a nonempty box it shall denote that coordinate's factor. For an empty box it shall denote an empty interval, independently of any inactive internal coordinate payload. Different empty queries may share an internal interval; clients shall not infer distinct ownership or identity from those references.

    An out-of-dimension variable shall throw std::invalid_argument before returning a reference, including on an empty box. A reference into an active factor shall require its owning coordinate storage to remain live and free of invalidating owner operations. A shared empty reference shall require its owning library/thread context to remain live. Clients shall not mutate through these const views.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    The public factor view must hide meaningless factor storage in an empty Cartesian product.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    const ITV& get_interval(Variable v) const;
    
    VERIFICATION_CRITERIA:

    Compare every active factor with literal endpoints, check shared empty denotation in all small positive dimensions, out-of-range rejection on empty/nonempty values and live borrowed-reference histories without invalidating mutations. 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; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.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-000958
    8. Explicit coordinate factor replacement UID: PPL-SPEC-000958 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty box, set_interval(v,i) shall replace only the selected factor with the supplied interval's entry value, retaining ambient dimension and the other factors. A resulting empty factor shall make the box empty. The source interval shall remain unchanged; borrowing the same or another active factor as the source shall be permitted without changing its entry value during replacement.

    For a one-dimensional empty box, replacing its sole factor shall establish that supplied one-dimensional interval, which may make the box nonempty. For an already empty box of dimension at least two, replacing one factor shall retain the empty box. An out-of-dimension variable shall throw std::invalid_argument without replacing factors. The operation shall update emptiness knowledge as needed so later queries reflect the resulting product.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Factor replacement is a low-level coordinate operation whose one-dimensional empty recovery and higher-dimensional empty behavior must be explicit.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    void set_interval(Variable v,const ITV& i);
    
    VERIFICATION_CRITERIA:

    Replace each active factor, including same/other-factor source references, preserved other coordinates and empty results. Check one-dimensional empty recovery, higher-dimensional empty retention, invalid variables and subsequent repeated classification queries. 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; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.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-000959
    9. Exact ordinary box classification UID: PPL-SPEC-000959 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The following Boolean queries shall report exact properties of the represented ordinary real Cartesian set. is_empty() shall decide emptiness and is_universe() equality with the ambient universe. is_topologically_closed() shall decide topological closure; is_bounded() shall decide boundedness; is_discrete() shall be true exactly for empty boxes or products of singleton factors. contains_integer_point() shall be true exactly when the product contains an integer-coordinate point. In dimension zero the universe shall be nonempty, closed, bounded, discrete and contain the empty integer tuple; empty shall be closed, bounded, discrete and contain no integer point.

    constrains(v) shall be true for empty boxes and, for a nonempty box, exactly when that coordinate's factor differs from universe. A variable outside the ambient dimension shall throw std::invalid_argument. Queries may establish cached facts without changing the mathematical set.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Set classification must retain exact empty and zero-dimensional conventions independently of cached evaluation order.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    bool is_empty() const;
    bool is_universe() const;
    bool is_topologically_closed() const;
    bool is_bounded() const;
    bool is_discrete() const;
    bool contains_integer_point() const;
    bool constrains(Variable v) const;
    
    VERIFICATION_CRITERIA:

    Compare independent factor/topology/integer-witness models over every small ordinary endpoint topology, empty and unbounded products, rational intervals with no integer witness, all coordinate positions and cached query orders. Check invalid constrains variables.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000960
    10. Box set relations, dimension-sensitive equality and compatible hashes UID: PPL-SPEC-000960 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For equal ambient dimensions, contains(y) shall decide Y ⊆ X, strictly_contains(y) proper inclusion and is_disjoint_from(y) empty intersection. Empty sets and zero-dimensional sets shall follow their ordinary set meanings. These methods shall throw std::invalid_argument when ambient dimensions differ, including for empty operands.

    Free equality shall be true exactly for boxes with equal dimensions and equal represented sets; different dimensions shall compare unequal without a dimension exception. Free inequality shall negate equality. Equal boxes shall have equal hash_code() values; collisions between unequal boxes shall be permitted. Relations and hashing shall leave mathematical values unchanged and shall not depend on distinct cached evaluation histories.

    The validity, synchronization, numerical and runtime prerequisites of 🔗 1. Cartesian box values, coordinate identity and valid use shall apply. Underlying allocation or endpoint failure shall retain its own guarantees; no general rollback promise shall be inferred.

    RATIONALE:

    Dimension is part of box identity, while Boolean relation APIs and equality intentionally have different mismatch outcomes.

    INTERFACE:

    Public header: <ppl.hh>; members and free functions in Parma_Polyhedra_Library, with member excerpts applying to Box<ITV>:

    bool contains(const Box& y) const;
    bool strictly_contains(const Box& y) const;
    bool is_disjoint_from(const Box& y) const;
    int32_t hash_code() const;
    template <typename ITV> bool operator==(const Box<ITV>& x,const Box<ITV>& 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. Compare same-dimension Cartesian inclusion/disjointness independently over empty, point, bounded, open and unbounded factors; check operand order, properness, reflexivity and cached histories. Check all dimension-mismatch outcomes and equal-value hash agreement without requiring collision freedom.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; src/Rational_Box.hh; tests/boxvaluesspec1.cc; tests/boxpublic1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-001221
    11. Explicit empty box assignment UID: PPL-SPEC-001221 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    set_empty() shall replace the receiver's entry set X ⊆ Rn by ⌀ ⊆ Rn. It shall preserve the ambient dimension and shall be idempotent, including in dimension zero. Subsequent empty-aware queries and coordinate access shall observe the empty value under 🔗 7. Empty-aware borrowed coordinate interval access and 🔗 9. Exact ordinary box classification.

    The operation shall retain the owned coordinate storage and the stored interval objects. Those factors shall become inactive; it shall not need to assign an empty value to each factor or query their numerical payloads. Borrowed references to retained factors shall retain their storage lifetime, but shall not independently denote the current box's factors while the box is empty. Independent copies shall remain unchanged.

    The receiver shall have safely owned coordinate storage and externally synchronized access. The operation shall require no numerical arithmetic, no additional PPL initialization, no allocation and no interval-profile callback, and shall not change hardware rounding state.

    RATIONALE:

    Emptiness annihilates a Cartesian product without requiring every retained factor to be rewritten. The ambient dimension and owned storage are independent of the represented set becoming empty.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Box<ITV>:

    void set_empty();
    
    VERIFICATION_CRITERIA:

    Check zero and positive dimensions, empty/universe and finite factor histories, repeated calls and independent copies. Observe empty-aware factor access and retained factor addresses/capacities through the existing narrow fixture. A diagnostic interval profile whose callbacks reject use shall confirm that explicit empty assignment does not inspect or rewrite inactive factors. Check direct public-header use without initialization and unchanged hardware rounding state in an initialized runtime.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxpublicstatespec1.cc; tests/boxstatepublic1.cc.

  • 1. Same-storage checked compound arithmetic UID: PPL-SPEC-000903 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let N be Checked_Number<T, Policy>, where T is one of the eleven native integer types, mpz_class, mpq_class or a configured supported native floating format. The entry destination and right operand shall be finite admitted values, except for the infinite-divisor remainder case of 🔗 6. Remainder with a policy-admitted infinite divisor. For a raw T right operand or a Checked_Number<T, Other_Policy> right operand, the compound operators +=, -=, *=, /= and %= shall apply, respectively, add_assign_r, sub_assign_r, mul_assign_r, div_assign_r and rem_assign_r to the destination and the right operand's entry values.

    The supplied direction shall be Policy::ROUND_DEFAULT_OPERATOR. The resulting numerical Result shall be delivered exactly once to Policy::handle_result, after the numerical operation. These same-storage forms shall require no constructor default and shall perform no numerical conversion of the right operand. A distinct checked source's policy handler and defaults shall not be consulted. If the destination handler returns, each operator shall return a reference to the destination.

    Numerical values, result classes/relations, range outcomes and the corresponding domain, resource, alias and rounding prerequisites shall follow the underlying scalar operations:

    In particular, division/remainder shall require a nonzero divisor; unchecked bounded use and exactness requests shall meet their stated representability conditions. The direction selected by the policy shall be admitted for the operation. Native floating directed/strict arithmetic shall satisfy its upward hardware-direction/backend-setup prerequisite. Shared rational remainder temporaries shall satisfy their synchronization condition. No coefficient-constant initialization shall be required by the wrapper.

    The right operand may share destination storage, including through its raw reference, and each mathematical occurrence shall use its entry value. A distinct source shall remain unchanged. A handler exception shall propagate, leaving the destination live and reusable; its old payload need not be retained. Handler acceptance of an unsupported numerical outcome shall not promise a represented answer; an unspecified payload shall not be inspected before valid reuse. Object lifetime and access overlapping mutation shall follow 🔗 1. Finite checked scalar storage and copying. Hardware direction and exception-status effects shall follow the underlying numerical operation.

    RATIONALE:

    Same-storage compound arithmetic needs an operator rounding choice and one result decision, without an unrelated source-construction policy decision.

    INTERFACE:

    Public header: <ppl.hh>; members of an admitted Parma_Polyhedra_Library::Checked_Number<T, Policy>:

    Checked_Number& operator+=(const T& y);
    template <typename Other_Policy>
    Checked_Number& operator+=(const Checked_Number<T, Other_Policy>& y);
    Checked_Number& operator-=(const T& y);
    template <typename Other_Policy>
    Checked_Number& operator-=(const Checked_Number<T, Other_Policy>& y);
    Checked_Number& operator*=(const T& y);
    template <typename Other_Policy>
    Checked_Number& operator*=(const Checked_Number<T, Other_Policy>& y);
    Checked_Number& operator/=(const T& y);
    template <typename Other_Policy>
    Checked_Number& operator/=(const Checked_Number<T, Other_Policy>& y);
    Checked_Number& operator%=(const T& y);
    template <typename Other_Policy>
    Checked_Number& operator%=(const Checked_Number<T, Other_Policy>& y);
    
    VERIFICATION_CRITERIA:

    Check all five operations across scalar families, raw/same-policy/other-policy sources, self/raw aliases and destination reference identity. Use independent literal numerical outcomes, recording/throwing handlers and policies without constructor defaults or implicit conversion capability. Check exactly one operator result, selected directions, range outcomes, source preservation and reusable destinations after handler exceptions under valid numerical and hardware prerequisites.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedarithmeticoperatorsspec1.cc.

  • 2. Same-policy checked binary arithmetic values UID: PPL-SPEC-000904 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For two finite N = Checked_Number<T, Policy> operands admitted by 🔗 1. Same-storage checked compound arithmetic, binary +, -, *, / and % shall produce a new N with the result of their corresponding numerical operation on the two entry values, in the written operand order. Both operands may be the same object and shall remain unchanged. The result shall own storage independent of both operands.

    The arithmetic direction shall be Policy::ROUND_DEFAULT_OPERATOR and its numerical Result shall be delivered exactly once to Policy::handle_result. No constructor rounding default or conversion handler call shall be required merely to form or return the result. Elision or copying on return shall not change the numerical-handler count. If the handler throws, its exception shall propagate and no result object shall be delivered; the source operands shall remain unchanged.

    Numerical outcome meanings, admissibility, hardware/resource prerequisites and accepted unsupported-result reuse shall follow 🔗 1. Same-storage checked compound arithmetic. Available resources shall suffice for the result object and underlying operation. The returned object shall be live, assignable and destructible.

    RATIONALE:

    Returning an owned arithmetic value does not require reconverting an already selected scalar representation or consulting a constructor default.

    INTERFACE:

    Public header: <ppl.hh>; related function templates in Parma_Polyhedra_Library for admitted T and Policy:

    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator+(
        const Checked_Number<T, Policy>& x,
        const Checked_Number<T, Policy>& y);
    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator-(
        const Checked_Number<T, Policy>& x,
        const Checked_Number<T, Policy>& y);
    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator*(
        const Checked_Number<T, Policy>& x,
        const Checked_Number<T, Policy>& y);
    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator/(
        const Checked_Number<T, Policy>& x,
        const Checked_Number<T, Policy>& y);
    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator%(
        const Checked_Number<T, Policy>& x,
        const Checked_Number<T, Policy>& y);
    
    VERIFICATION_CRITERIA:

    Check the exact checked result type, all five operations, identical source objects, preserved sources and independent later result mutation. Use a policy without constructor defaults and record one arithmetic-handler call, including with return-copy elision disabled. Check throwing-handler cleanup and unchanged source operands under admitted scalar/hardware conditions.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedarithmeticoperatorsspec1.cc.

  • PPL-SPEC-000905
    3. Mixed operand conversion before checked arithmetic UID: PPL-SPEC-000905 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a checked N = Checked_Number<T, Policy> operand, a raw native operand of scalar type S shall first be converted into an N using Policy::ROUND_DEFAULT_CONSTRUCTOR. The native families here shall be the PPL Is_Native scalar families in 🔗 1. Same-storage checked compound arithmetic, with configured availability for floating formats. Binary +, -, *, / and % shall then apply their numerical operation using Policy::ROUND_DEFAULT_OPERATOR, preserving the written operand order. The result type shall be N. This conversion shall occur even when S and T are the same type.

    A compound operator on N with a raw or checked right operand of a different underlying scalar type S shall likewise first construct an N temporary from the right operand using the constructor default, then operate on the destination's entry value and that converted value using the operator default. The returned reference shall identify the destination. Same-storage direct compound forms shall retain 🔗 1. Same-storage checked compound arithmetic.

    The constructor-conversion Result shall be delivered first to Policy::handle_result. If the handler returns, the arithmetic Result shall then be delivered once to that handler. Each completed stage shall contribute one call, in that order. The conversion and arithmetic may use different directions and classifications. Neither stage shall dispatch a checked source's own policy handler. The source and conversion prerequisites of 🔗 2. Finite checked scalar converting construction and assignment shall apply. If the conversion handler returns, its converted value shall be finite and meet the chosen arithmetic's operand preconditions; unsupported conversion payloads shall not be admitted as further numerical operands.

    A conversion-handler exception shall stop before arithmetic. A compound destination shall then retain its entry value. An arithmetic-handler exception may follow destination mutation, with the live/reusable guarantee of 🔗 1. Same-storage checked compound arithmetic. Free binary operators shall preserve their original source operands in either case. Numerical answers shall describe the converted operand, rather than presume exact preservation of an inexactly converted source. Underlying result semantics, lifetime, resources, rounding/backend setup and synchronization prerequisites shall follow 🔗 1. Same-storage checked compound arithmetic.

    RATIONALE:

    Mixed convenience arithmetic first chooses a destination representation. Its conversion rounding and result decision can affect the later expression, so they must be distinguished from the arithmetic rounding and decision.

    INTERFACE:

    Public header: <ppl.hh>; effective related function declarations in Parma_Polyhedra_Library:

    template <Native_Number S, typename T, typename Policy>
    Checked_Number<T, Policy>
    operator+(const S& x, const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy, Native_Number S>
    Checked_Number<T, Policy>
    operator+(const Checked_Number<T, Policy>& x, const S& y);
    
    template <Native_Number S, typename T, typename Policy>
    Checked_Number<T, Policy>
    operator-(const S& x, const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy, Native_Number S>
    Checked_Number<T, Policy>
    operator-(const Checked_Number<T, Policy>& x, const S& y);
    
    template <Native_Number S, typename T, typename Policy>
    Checked_Number<T, Policy>
    operator*(const S& x, const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy, Native_Number S>
    Checked_Number<T, Policy>
    operator*(const Checked_Number<T, Policy>& x, const S& y);
    
    template <Native_Number S, typename T, typename Policy>
    Checked_Number<T, Policy>
    operator/(const S& x, const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy, Native_Number S>
    Checked_Number<T, Policy>
    operator/(const Checked_Number<T, Policy>& x, const S& y);
    
    template <Native_Number S, typename T, typename Policy>
    Checked_Number<T, Policy>
    operator%(const S& x, const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy, Native_Number S>
    Checked_Number<T, Policy>
    operator%(const Checked_Number<T, Policy>& x, const S& y);
    

    Within Checked_Number<T, Policy>, the different-storage compound instantiations shall use:

    template <Native_Or_Checked_Number From>
    Checked_Number<T, Policy>&
    operator+=(const From& y);
    template <Native_Or_Checked_Number From>
    Checked_Number<T, Policy>&
    operator-=(const From& y);
    template <Native_Or_Checked_Number From>
    Checked_Number<T, Policy>&
    operator*=(const From& y);
    template <Native_Or_Checked_Number From>
    Checked_Number<T, Policy>&
    operator/=(const From& y);
    template <Native_Or_Checked_Number From>
    Checked_Number<T, Policy>&
    operator%=(const From& y);
    
    VERIFICATION_CRITERIA:

    Use exactly representable and fractional native/GMP/checked sources with opposite constructor/operator directions. Check both free-operator operand orders, same-type raw operands, different-storage compound operands, conversion-then-arithmetic callback sequences and literal converted-value answers. Throw independently at the first and second stages and check source preservation, compound entry preservation before arithmetic and reuse after arithmetic-handler rejection. Require the actual checked return/reference types and no source-policy handler/default dependency.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedarithmeticoperatorsspec1.cc.

  • 4. Checked unary signs and prefix increment or decrement UID: PPL-SPEC-000906 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For finite N = Checked_Number<T, Policy> values admitted by 🔗 1. Same-storage checked compound arithmetic, unary + shall return an independent copy with the same value, including a native floating zero's sign. It shall consult no rounding default and invoke no policy handler.

    Unary - shall return a new N whose value and numerical outcome follow neg_assign_r with Policy::ROUND_DEFAULT_OPERATOR. Its source shall remain unchanged. Native integer, unbounded integer, rational and native floating meanings shall follow 🔗 2. Native integer negation and absolute value, 🔗 1. Exact named arithmetic on unbounded integer storage, 🔗 4. Rational sign assignments and integral-valued rounding operations and 🔗 2. Exact finite native floating-point negation and absolute value, respectively.

    Prefix ++ and -- shall apply add_assign_r or sub_assign_r to the destination's entry value and mathematical one, using the operator default. After handler acceptance they shall return a reference to the modified destination. Unary minus and each prefix operation shall deliver its numerical Result exactly once to Policy::handle_result and shall require no constructor default or extra conversion-handler call.

    Domain/range, admitted directions, synchronization, resources and numerical backend/rounding prerequisites shall follow the corresponding operation and 🔗 1. Same-storage checked compound arithmetic. A handler exception shall propagate; prefix destinations shall remain live and reusable without a rollback promise. Unary result ownership and throwing-handler source preservation shall follow 🔗 2. Same-policy checked binary arithmetic values.

    RATIONALE:

    Copying a unary positive value has different policy needs from numerical negation or mutation by one. Prefix updates can report their arithmetic outcome without constructing a converted return value.

    INTERFACE:

    Public header: <ppl.hh>; related function templates in Parma_Polyhedra_Library:

    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator+(
        const Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    Checked_Number<T, Policy> operator-(
        const Checked_Number<T, Policy>& x);
    

    Members of Checked_Number<T, Policy>:

    Checked_Number& operator++();
    Checked_Number& operator--();
    
    VERIFICATION_CRITERIA:

    Check exact result/reference types, unary-copy independence and absence of handler/default requirements. For unary minus and prefix updates, record one operator result with no constructor default, check zero/sign/range and native floating signed zero, source preservation and returned destination identity. Throw at each arithmetic-handler boundary and verify the relevant source/live-destination guarantees under admitted hardware conditions.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedarithmeticoperatorsspec1.cc.

  • PPL-SPEC-001195
    5. Checked postfix increment and decrement entry snapshots UID: PPL-SPEC-001195 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite admitted entry value of N = Checked_Number<T, Policy>, postfix ++ and -- shall first obtain an independently owned same-type snapshot of that entry value. The snapshot shall preserve the finite value, including a native floating zero's sign, with the copying meaning of 🔗 1. Finite checked scalar storage and copying.

    The numerical update shall apply add_assign_r or sub_assign_r, respectively, to the entry receiver and mathematical one, using Policy::ROUND_DEFAULT_OPERATOR. The operation shall deliver its numerical Result exactly once to Policy::handle_result. If the handler returns and construction of the returned value completes, the operator shall return the owned entry snapshot. Subsequent modification or destruction of either object shall not change or invalidate the other. Obtaining and returning the snapshot shall require no constructor rounding default and shall invoke no policy conversion handler.

    The scalar families, policy capabilities, admitted directions, arithmetic and range meanings, resource and synchronization conditions, and numerical backend/FPU prerequisites shall follow 🔗 1. Same-storage checked compound arithmetic and the corresponding prefix update in 🔗 4. Checked unary signs and prefix increment or decrement. Canonical rational entry storage shall have a positive denominator. Handler acceptance of an unsupported numerical outcome shall not promise a represented receiver answer; an unspecified receiver payload shall not be inspected before valid reuse.

    If construction of the entry snapshot fails, the receiver's entry value shall be preserved. An arithmetic or handler exception shall propagate, leaving the receiver live and reusable; its entry value need not be preserved. A failure while constructing the returned value after the numerical update shall not require receiver rollback. Hardware direction and exception-status effects shall follow the underlying arithmetic operation; the snapshot itself shall require no additional FPU setup or library initialization.

    RATIONALE:

    Postfix operators return an earlier value while updating the receiver. An owned checked copy preserves that value without introducing an unrelated scalar-conversion policy decision after the update.

    INTERFACE:

    Public header: <ppl.hh>; members of an admitted Parma_Polyhedra_Library::Checked_Number<T, Policy>:

    Checked_Number operator++(int);
    Checked_Number operator--(int);
    
    VERIFICATION_CRITERIA:

    Check the exact return type, entry snapshot and updated receiver against literal increment/decrement values for each admitted scalar family. Modify and destroy independent snapshot/receiver objects and check their ownership, including native floating signed zero and large GMP values. Use policies with an operator default and handler but no constructor default or implicit conversion permission. Record exactly one arithmetic result and no conversion-handler call. Exercise accepted and throwing arithmetic handlers, valid receiver reuse after failure, admitted range boundaries and saved native hardware conditions. Distinguish failure of the initial snapshot from failure after the update; impose no general receiver rollback guarantee.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedarithmeticoperatorsspec1.cc.

  • 6. Remainder with a policy-admitted infinite divisor UID: PPL-SPEC-001654 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported same-storage remainder backend, the dividend shall denote a finite value a under its own source policy and the divisor shall represent either signed infinity admitted by its own source policy. The value a shall be representable as finite under the destination policy. Storage shall be a supported native integer, mpz_class, mpq_class or configured native floating type; an infinity unavailable for the selected storage/policy shall not be supplied.

    rem_assign_r(to, x, y, dir) shall store the exact entry value a and return V_EQ for either infinity sign and every admitted rounding request, including ROUND_NOT_NEEDED and ROUND_STRICT_RELATION. Each source shall be classified using its own policy. Distinct source objects not sharing destination storage shall remain unchanged. The output may alias either source through an admitted same-storage interface; the operation shall use the mathematical entry values under the source policies. The named call shall not invoke a result handler or require a rounding default.

    The corresponding same-storage operator%= shall retain the operator rounding default, destination-reference result and single destination-handler dispatch of 🔗 1. Same-storage checked compound arithmetic. It shall require no source-policy handler or implicit source conversion. Finite-divisor behavior shall retain the selected scalar backend's contract.

    Objects and special representations shall be live and admitted by their policies. Finite rational operands shall be canonical with positive denominator; an admitted PPL infinite representation shall follow 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage or 🔗 4. Typed special-value assignment to native floating-point storage. The scalar backend's resource, synchronization, initialization and hardware prerequisites shall apply. Calls shall preserve hardware direction. No behavior for an infinite dividend or NaN operand shall be inferred from this contract.

    RATIONALE:

    For finite a, every finite divisor with |b| > |a| gives trunc(a ⁄ b) = 0 and remainder a. Extending the remainder to either signed infinity by this stable value preserves the finite dividend independently of how the source policies encode specials.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The first form is the named function for admitted same-storage arguments; the second is a member of Checked_Number<T, Policy>.

    Result rem_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    template <typename Other_Policy>
    Checked_Number& operator%=(const Checked_Number<T, Other_Policy>& y);
    
    VERIFICATION_CRITERIA:

    Use public special constructors and remainder interfaces with distinct finite and extended policies. Check both infinity signs, signed and zero dividends, fractional rationals, supported native storage and finite native extrema. Compare named results/statuses, both destination aliases and compound destination identity/handler counts. Preserve distinct sources and hardware direction. Retain same-policy and finite-divisor controls.

    SOURCE:

    src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedspecialwrappersspec1.cc.

  • 1. Extended greatest common divisor and least common multiple UID: PPL-SPEC-001660 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted argument types, gcd_assign_r and lcm_assign_r shall interpret each source's specials according to that source's own policy. A source-policy NaN shall take precedence over infinity and shall request NaN assignment through the destination policy.

    For non-NaN inputs, magnitudes shall use the nonnegative-integer divisibility order with one additional greatest element ∞, above zero as well as positive integers. The signs of infinities shall not affect these divisor operations. With either source infinite, the gcd shall be the other source's magnitude; two infinities shall give positive infinity. With either source infinite, the lcm shall be positive infinity, including when the other source is zero.

    These mathematical values shall be independent of destination representability. Computing the selected absolute value or special-value assignment shall retain that operation's destination-policy range checks, rounding and result code. An unsupported NaN shall return a NaN-class result with V_UNREPRESENTABLE and no destination-value promise. An unsupported positive infinity shall retain the selected special-assignment outcome, including any directed finite bound. Finite-input gcd/lcm shall retain 🔗 2. Native integer greatest common divisor and least common multiple for native integers and 🔗 1. Exact unbounded integer greatest common divisor and least common multiple for unbounded integers; floating storage shall require finite integral operands and representable Euclidean intermediates.

    All arguments shall have the same admitted raw storage type: a standard native integer, mpz_class, or a supported native floating-point type. Each argument may be raw or use an admitted Checked_Number policy. The destination may alias either source, and the sources may be the same object. Every source value shall mean its entry value; distinct sources shall retain their values. Live storage, supported numerical operations, sufficient resources and synchronization shall be required. Calls shall use an admitted rounding request and shall invoke no result handler. ROUND_NOT_NEEDED shall require an exact representable result and admitted intermediates. No coefficient-profile limit shall replace the selected scalar storage's own range and resource conditions.

    RATIONALE:

    Adding a greatest divisibility element preserves the ordinary finite meanings and defines the existing infinity/zero cases without applying extended-real multiplication to divisor operations. This lattice convention alone does not define Bezout coefficients for infinity.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The signatures denote the admitted raw/checked argument combinations:

    template <typename To, typename X, typename Y>
    Result gcd_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    template <typename To, typename X, typename Y>
    Result lcm_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Cross finite negative, zero and positive operands with both infinity signs and NaN. Use independent finite gcd/lcm values and the explicit greatest- element convention. Check source/output aliases, source-policy classification, destination policies with and without specials, supported requests, unchanged distinct sources and output recovery after an unrepresentable outcome.

    SOURCE:

    src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; tests/checkedcontractedges1.cc, whose number-theory oracle records the added-greatest-element convention.

  • PPL-SPEC-001661
    2. Floating storage for exact integral Bezout computation UID: PPL-SPEC-001661 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For supported native floating storage F and finite integral source entry values x, y, gcdext_assign_r shall assign a nonnegative gcd g and integral coefficients s, t satisfying xs + yt = g. Two zero sources shall give zero. No particular coefficient pair shall be required.

    Sources, their absolute values, conversions, mathematical Euclidean integer quotients, remainders, and every evaluated coefficient product, difference and sign restoration shall be finite and exactly representable in the selected storage. A noninteger rounded division temporary may be used to derive the exact integer quotient. The requested result shall be V_EQ for admitted ordinary and strict requests, including ROUND_NOT_NEEDED.

    All five arguments shall have the same raw type F, either raw or wrapped in admitted checked policies; the finite inputs shall be admitted by their source policies. The three outputs shall be live, independent and distinct from both sources. Sources may share an object and shall retain their values. The configured floating-rounding protocol and nontrapping arithmetic environment shall be in force, available resources shall suffice, and objects shall be synchronized. The hardware rounding direction shall be preserved. No rounding default or result handler shall be required or invoked.

    RATIONALE:

    Floating storage does not make real division into Euclidean integer division. For positive magnitudes with a representable integer quotient, downward division remains between that quotient and the next integer; truncation therefore recovers the exact Euclidean quotient.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The signature denotes supported same-raw-storage combinations:

    template <typename G, typename S, typename T, typename X, typename Y>
    Result gcdext_assign_r(G& g, S& s, T& t,
                           const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check independent exact gcds, integral coefficients and unbounded Bezout reconstruction over small signed and zero inputs. Include a positive ratio just below three that upward division can round to three, both source orders, sign combinations and valid result requests. Establish the exact representability of every required recurrence intermediate.

    SOURCE:

    src/checked_inlines.hh; src/checked_float_inlines.hh; tests/floatingbezout1.cc.

  • PPL-SPEC-001662
    3. Finite Bezout domain and nonfinite operand rejection UID: PPL-SPEC-001662 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted same-raw-storage argument combinations, gcdext_assign_r shall recognize each source's NaN and infinities using that source's own policy before updating the coefficient outputs. With any such nonfinite operand, it shall request NaN assignment to g through the gcd output's policy and leave s and t unchanged. This shall include either infinity sign, two infinite operands and NaN/infinity combinations. No generalized Bezout identity shall be asserted for infinite operands.

    A destination policy admitting NaN shall produce its NaN representation and return V_NAN. Otherwise the result shall be V_NAN | V_UNREPRESENTABLE with no value promise for g. Rejection shall apply to supported ordinary rounding requests and their strict-relation forms; ROUND_NOT_NEEDED shall require admitted finite input and an exact representable computation.

    Finite inputs shall retain 🔗 1. Bounded native integer Bezout assignment for native integers and 🔗 2. Exact unbounded integer Bezout coefficients for unbounded integers. Supported floating storage shall require finite integral source values and exact representable conversions and Euclidean coefficient intermediates. A successful result shall have nonnegative g and coefficients satisfying xs + yt = g, without requiring a particular coefficient pair. The extended gcd/lcm convention in 🔗 1. Extended greatest common divisor and least common multiple shall not expand this finite Bezout domain.

    The raw storage shall be a supported native integer, mpz_class or native floating-point type, shared by all five arguments. Arguments may be raw or use admitted checked policies. All three outputs shall be live, pairwise distinct and separate from both sources. Sources may be the same object and shall retain their entry values. Objects shall be synchronized and resources sufficient. The operation shall require no rounding default or result handler and shall invoke no handler; named assignment shall retain the single-handler protocol in 🔗 3. Checked integral divisor functions and Bezout outputs. Surviving outputs shall remain live and reassignable after rejection, without a rollback promise for g.

    RATIONALE:

    An extra greatest element in the divisibility order determines gcd/lcm but does not provide an integer linear identity involving infinity. Explicit rejection avoids presenting an arbitrary signed selector as a Bezout result or relying on multiplication of zero by infinity.

    INTERFACE:

    Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. The signature denotes admitted raw/checked argument combinations:

    template <typename G, typename S, typename T, typename X, typename Y>
    Result gcdext_assign_r(G& g, S& s, T& t,
                           const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check independent finite gcd values and exact Bezout reconstruction across source signs, zeros, ordinary raw endpoints and supported numerical profiles. Cross infinities and NaN with each other and finite partners in both orders. Check unchanged coefficient sentinels and sources, destination policies with and without NaN, supported rejection requests, output recovery and exactly one named-operation handler decision after the output update.

    SOURCE:

    src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/extendeddivisorcontract1.cc.

  • PPL-SPEC-001710
    1. Conversion of policy-admitted scalar special values UID: PPL-SPEC-001710 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    assign_r and value construction from a scalar source shall classify an admitted source NaN or signed infinity under that source's policy and request the corresponding destination special assignment. Infinity shall retain its sign and the requested direction; NaN shall use ROUND_IGNORE. Finite sources shall retain their ordinary conversion contracts, including finite source endpoint values that another policy would reserve as special.

    For native floating-to-floating NaN assignment, this guarantee shall require the destination's check_fpu_nan_result capability. For a cross-policy checked constructor or assignment, conversion and handler dispatch shall follow 🔗 1. Operation-specific numerical policy capabilities and 🔗 2. Finite checked scalar converting construction and assignment; accepting a result in a handler shall not make an unsupported payload representable. Same-type copies shall retain 🔗 1. Same-type checked copying of admitted special values. Placement construction shall complete exactly one underlying object, retaining the ownership and failure rules of 🔗 7. Raw scalar placement construction and exact assignment.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; admitted scalar combinations of assign_r, construct and the value-converting Checked_Number constructors and assignment operators. Internal dispatch: Checked::assign_ext and Checked::construct_ext and their selected scalar backends.

    VERIFICATION_CRITERIA:

    Cross GMP integer/rational, native integer and available native floating sources and destinations. Check both infinity signs and NaN, supported and unsupported destination representations, inward saturation, outward rejection, source preservation, cross-policy finite endpoints, handler counts/throws, fresh placement ownership and destination recovery. Compare every status with the existing special-marker contract rather than a guessed payload.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_float_inlines.hh; tests/floatingarithmetic1.cc; tests/coefficient1.cc; tests/longdouble1.cc.

  • PPL-SPEC-001711
    2. Unary and binary-scale transformations of scalar special values UID: PPL-SPEC-001711 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For non-native scalar encodings, floor_assign_r, ceil_assign_r and trunc_assign_r shall propagate an admitted signed infinity unchanged. neg_assign_r shall reverse its sign and abs_assign_r shall select positive infinity. Each shall propagate an admitted source NaN through NaN assignment. The four power-of-two transformations add_2exp_assign_r, sub_2exp_assign_r, mul_2exp_assign_r and div_2exp_assign_r shall preserve either infinity sign and propagate NaN. These special branches shall not evaluate a finite power or finite arithmetic intermediate.

    For a supported native floating type, the same mathematical special values shall be retained by its unary and power-of-two operations. NaN diagnosis as V_NAN shall require check_fpu_nan_result; no NaN payload or sign shall be prescribed. Successful native infinity transformations may retain lazy result classification; classification of the stored value shall still identify the correct infinity. Native exponent admission and FPU state shall retain the corresponding finite operation's prerequisites.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; the five named unary _assign_r interfaces and the four named _2exp_assign_r interfaces above. Internal dispatch: the corresponding Checked::*_ext and native floating kernels.

    VERIFICATION_CRITERIA:

    Cross NaN and both infinity signs with all five unary operations and all four power transforms. Check signed infinity results, source/output aliases, NaN classification, supported result flags, finite recovery and preservation of separate sources. Keep finite signed-zero tests allocated to their finite unary contracts.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_float_inlines.hh; tests/floatingarithmetic1.cc; tests/float1.cc.

  • PPL-SPEC-001712
    3. Extended scalar binary arithmetic and enabled fault diagnosis UID: PPL-SPEC-001712 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For non-native special encodings, an admitted source NaN shall request NaN assignment before binary arithmetic. Addition or subtraction with an infinite operand shall select the extended-real sign, except that opposite infinities added with check_inf_add_inf enabled shall diagnose V_INF_ADD_INF and equal infinities subtracted with check_inf_sub_inf enabled shall diagnose V_INF_SUB_INF. An infinite product with a nonzero partner shall use the product of the operand signs. Infinity times zero shall require check_inf_mul_zero and diagnose V_INF_MUL_ZERO.

    For div_assign_r and idiv_assign_r, finite input divided by either admitted infinity shall give exact zero. Infinity divided by a finite nonzero value shall give the signed infinity. With the corresponding check enabled, infinity divided by infinity shall diagnose V_INF_DIV_INF and a zero divisor shall diagnose V_DIV_ZERO. Finite nonzero division and truncated quotient conventions shall remain separate contracts.

    Supported native floating arithmetic shall obey the same defined extended mathematical values and enabled operation-specific causes. When check_fpu_nan_result is enabled, a resulting NaN not already diagnosed by an enabled cause check shall return V_NAN. Native result codes may retain lazy infinity classification. With several simultaneous invalid conditions, no common diagnostic priority across scalar backends shall be required; the result shall be NaN-class. For nontrapping IEEE native floating storage with check_div_zero disabled, an integral quotient of a finite nonzero numerator by signed zero shall be the infinity whose sign is the exclusive-or of the source signs. No native integer division by zero shall be inferred from this floating convention. A transparent IEEE native integral quotient with NaN operands, infinity/infinity or zero/zero shall propagate a NaN payload without promising an ordered result relation.

    An operation-specific diagnosed cause shall be passed through destination NaN assignment, preserving the cause and any V_UNREPRESENTABLE flag.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; admitted combinations of add_assign_r, sub_assign_r, mul_assign_r, div_assign_r and idiv_assign_r. Internal dispatch: the corresponding Checked::*_ext and scalar kernels.

    VERIFICATION_CRITERIA:

    Compare literal extended-real tables for negative/positive finite values, zero, both infinities and NaN across supported scalar/policy combinations. Check each enabled cause independently, rather than prescribing a priority for simultaneous faults. Exercise aliases, unchanged distinct sources, finite recovery and native transparent NaN quotient paths. Check handlers separately against their received cause and exception contract.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; tests/checkedcontractedges1.cc; tests/floatingarithmetic1.cc; tests/float1.cc; tests/checkedstatementpaths1.cc.

  • PPL-SPEC-001713
    4. Nonfinite remainder operands and enabled modulus faults UID: PPL-SPEC-001713 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For non-native encodings, rem_assign_r shall propagate a source-policy NaN from either operand before modulus checks. With check_inf_mod enabled, an infinite dividend shall diagnose V_INF_MOD. With check_div_zero enabled, finite remainder by zero shall diagnose V_MOD_ZERO. A finite dividend and admitted infinite divisor shall retain 🔗 6. Remainder with a policy-admitted infinite divisor.

    smod_2exp_assign_r and umod_2exp_assign_r shall propagate a source-policy NaN; an infinite source with check_inf_mod enabled shall diagnose V_INF_MOD. Finite signed/unsigned residue conventions and exponent admission shall retain their scalar contracts.

    The native floating implementations shall diagnose the same enabled infinity and zero-divisor causes. With check_fpu_nan_result enabled, an otherwise undiagnosed NaN result shall be V_NAN. A NaN combined with another fault need not have the same diagnostic priority as a non-native encoding. Cause results shall use destination NaN assignment and retain any V_UNREPRESENTABLE flag.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; rem_assign_r, smod_2exp_assign_r and umod_2exp_assign_r for their admitted scalar combinations.

    VERIFICATION_CRITERIA:

    Check NaN in each operand, signed infinite dividends, zero divisors and both dyadic modulus forms. Check exact causes where only one fault applies, NaN class for combined faults, unsupported NaN destinations, source/output aliases, source preservation and a subsequent finite operation.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; tests/floatingarithmetic1.cc; tests/checkedcontractedges1.cc; tests/checkedstatementpaths1.cc.

  • PPL-SPEC-001714
    5. Extended accumulated products and enabled fault diagnosis UID: PPL-SPEC-001714 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_mul_assign_r and sub_mul_assign_r shall use the accumulator's entry value and both factor entry values. With non-native special encodings, a NaN admitted by any of their own policies shall request NaN assignment. Otherwise determine the product sign from the factors, reverse that contribution for subtraction and combine it with the entry accumulator. A determined infinity shall be assigned through the destination policy. Entirely finite operands shall retain their scalar accumulation contract.

    Infinity times zero shall require check_inf_mul_zero and diagnose V_INF_MUL_ZERO. Adding opposing accumulator/product infinities with check_inf_add_inf shall diagnose V_INF_ADD_INF; subtracting equal accumulator/product infinities with check_inf_sub_inf shall diagnose V_INF_SUB_INF. A native floating implementation shall retain these enabled causes and, with check_fpu_nan_result, diagnose an otherwise undetected NaN result as V_NAN. Multiple simultaneous faults shall not require one diagnostic priority across backends. Cause results shall use destination NaN assignment and retain any V_UNREPRESENTABLE flag.

    These special cases shall not change the fused/nonfused finite precision choice specified by 🔗 3. Configured native accumulation precision and truthful result relations. The accumulator shall be interpreted under its own policy, not a factor's policy.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; admitted combinations of add_mul_assign_r(to, x, y, dir) and sub_mul_assign_r(to, x, y, dir).

    VERIFICATION_CRITERIA:

    Cross accumulator and factor signs, finite zero, both infinities and NaN with independent extended-real product/sum tables. Check zero times an infinite right as well as left factor, the enabled causes, accumulator and factor policies independently, permitted aliases and finite recovery. Retain the separate exact or directed finite accumulation controls.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_float_inlines.hh; tests/checkedcontractedges1.cc; tests/floatingarithmetic1.cc.

  • PPL-SPEC-001715
    6. Square-root special values and enabled negative-input diagnosis UID: PPL-SPEC-001715 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a non-native admitted special encoding, sqrt_assign_r shall propagate a source NaN, assign positive infinity for positive infinity and diagnose negative infinity as V_SQRT_NEG through destination NaN assignment. A finite negative operand with check_sqrt_neg enabled shall diagnose V_SQRT_NEG. Disabling that finite-domain check shall retain the selected finite kernel's precondition.

    A supported native floating implementation with check_fpu_nan_result shall propagate source NaN as V_NAN; with check_sqrt_neg it shall diagnose negative values, including negative infinity, as V_SQRT_NEG. Positive infinity shall remain positive infinity; its result relation may retain the native kernel's lazy information. NaN payload/sign shall not be prescribed. Finite nonnegative roots, signed zero, directed result relations and rational irrational-precision ownership shall retain their separate contracts.

    Arguments shall use a supported raw scalar type or an admitted Checked_Number instantiation, with well-formed selected operations and live storage. A source's own policy shall interpret its reserved encodings; an encoding reserved only by another policy shall retain its source-policy meaning. Finite rational operands shall be canonical. Resources, synchronization, shared temporaries and caller-owned FPU state shall satisfy the corresponding finite scalar contract. Native floating exceptions shall be nontrapping. Signalling NaNs shall be outside this contract.

    Special assignment shall retain the destination-policy outcomes of 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 4. Typed special-value assignment to native floating-point storage, including directed finite saturation or V_UNREPRESENTABLE when the requested class is unsupported. An unrepresentable or NaN-class result shall not license inspecting an unspecified payload; a supported NaN shall remain queryable through the PPL classification interface. The destination shall remain reusable. No strong rollback guarantee shall be implied.

    The named result-returning interfaces shall invoke no result handler. Their admitted convenience wrappers shall use the defaults and handlers specified by 🔗 1. Operation-specific numerical policy capabilities. Supported output aliases shall use entry values; distinct sources shall remain unchanged. ROUND_NOT_NEEDED shall require an admitted exact result and shall not be used for NaN or an invalid operation. Disabling a diagnostic check shall not expand a native integer or GMP operation's admitted domain. Finite arithmetic and range outcomes shall retain their separate contracts.

    RATIONALE:

    Extended values and enabled diagnostic causes require an explicit contract separate from finite arithmetic and destination representability.

    INTERFACE:

    Public header: <ppl.hh>; sqrt_assign_r(to, source, dir) for admitted native integer, GMP integer/rational and native floating scalar combinations.

    VERIFICATION_CRITERIA:

    Check NaN and both infinity signs, finite negative values with checks enabled, destination policies admitting or rejecting NaN, exact diagnostic causes, aliases, unchanged separate sources and finite-root recovery. Keep finite rational enclosure/precision checks allocated to their own contracts.

    SOURCE:

    src/checked_ext_inlines.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; tests/floatingarithmetic1.cc; tests/float1.cc.

  • 1. Checked named unary functions and function policy UID: PPL-SPEC-000907 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let N be Checked_Number<T, Policy> for a native integer type, mpz_class, mpq_class or a configured supported native floating format. For finite admitted entry values, floor_assign, ceil_assign, trunc_assign, neg_assign and abs_assign shall apply their corresponding _r numerical operation with Policy::ROUND_DEFAULT_FUNCTION. The one-argument form shall use the destination's own entry value; the two-argument form shall use the source's entry value and may have identical source and destination storage.

    Each completed numerical operation shall deliver its Result exactly once to Policy::handle_result. The functions shall return void. No constructor or operator rounding default, implicit scalar conversion or extra conversion-handler decision shall be required. A handler exception shall propagate; the destination shall remain live and reusable, without requiring preservation of its previous payload. A distinct source shall remain unchanged.

    Numerical values, result relations/classes, finite-range outcomes and operation-specific admitted directions shall follow 🔗 1. Native integer floor, ceiling and truncation identity, 🔗 2. Native integer negation and absolute value, 🔗 1. Exact named arithmetic on unbounded integer storage, 🔗 4. Rational sign assignments and integral-valued rounding operations, 🔗 1. Finite native floating-point floor, ceiling and truncation and 🔗 2. Exact finite native floating-point negation and absolute value, for their respective scalar families and operations. In particular, a floor/ceiling/truncation status shall describe the specified transformed result rather than assert that the original nonintegral source was unchanged.

    Lifetimes, synchronization, resources, admitted numerical policies and required backend/hardware setup shall follow the underlying operation. No coefficient-constant initialization shall be required by these wrappers. An unsupported accepted result shall not promise a represented numerical payload; such storage shall be validly reassigned before numerical use.

    RATIONALE:

    Named transformations select the function policy separately from the policy used by arithmetic operators or construction.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void floor_assign(Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    void ceil_assign(Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    void trunc_assign(Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    void neg_assign(Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    void abs_assign(Checked_Number<T, Policy>& x);
    
    template <typename T, typename Policy>
    void floor_assign(Checked_Number<T, Policy>& x,
                          const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy>
    void ceil_assign(Checked_Number<T, Policy>& x,
                          const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy>
    void trunc_assign(Checked_Number<T, Policy>& x,
                          const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy>
    void neg_assign(Checked_Number<T, Policy>& x,
                          const Checked_Number<T, Policy>& y);
    
    template <typename T, typename Policy>
    void abs_assign(Checked_Number<T, Policy>& x,
                          const Checked_Number<T, Policy>& y);
    
    VERIFICATION_CRITERIA:

    Check every named transformation and arity with independent literal integer/fractional answers, finite signs and signed zero, same-source aliases and distinct source preservation. Use recording and throwing handlers and a policy that supplies only the function default. Require void return types, one callback, admitted range outcomes and live destination reuse after handler rejection.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • PPL-SPEC-000908
    2. Checked named remainder and exact quotient UID: PPL-SPEC-000908 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the finite same-type, same-policy N scalar families in 🔗 1. Checked named unary functions and function policy, rem_assign(x, y, z) shall apply rem_assign_r(x, y, z, Policy::ROUND_DEFAULT_FUNCTION). exact_div_assign(x, y, z) shall apply division with ROUND_NOT_NEEDED independently of all policy rounding defaults. Each function shall return void and deliver the numerical Result exactly once to the destination policy's handler, after the operation. Exact division shall require a handler but no function, constructor or operator rounding default.

    Division/remainder shall require a nonzero divisor. Remainder shall use the truncated-quotient convention and numerical outcome contract in 🔗 3. Exact native truncated quotient and remainder, 🔗 4. Exact truncated unbounded integer quotient and remainder, 🔗 5. Truncated rational quotient and signed rational remainder or 🔗 2. Exact truncating remainder of finite native floating values. Exact quotient admissibility and results shall follow the exactness request for 🔗 2. Directed native integer division and delegated truncation, 🔗 3. Directed unbounded integer division and explicit delegated convention, 🔗 3. Exact finite rational addition, subtraction, multiplication and division or 🔗 3. Finite native floating-point division by a nonzero value, respectively. For native-integer or mpz_class storage, exact division shall require mathematical divisibility. Bounded checked range outcomes shall retain 🔗 3. Coefficient remainder assignment and exact division and 🔗 4. Checked native arithmetic range outcomes; a handler-returning unsupported outcome shall not permit use of an unspecified payload.

    The destination may be either source; every mathematical occurrence shall use its entry value. Distinct sources shall remain unchanged. The handler exception, surviving destination, object, resource, synchronization and backend/hardware conditions of 🔗 1. Checked named unary functions and function policy shall apply, including serialization of any shared rational remainder temporaries.

    RATIONALE:

    Exact quotient has a fixed exactness request, while remainder is a named function with a function rounding default; their policy requirements differ.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void rem_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                    const Checked_Number<T, Policy>& z);
    
    template <typename T, typename Policy>
    void exact_div_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                          const Checked_Number<T, Policy>& z);
    
    VERIFICATION_CRITERIA:

    Check zero and signed finite remainders and exactly divisible quotients across scalar families, nonzero all-source aliases and either source alias. Use a handler-only policy with no rounding defaults for exact division, a function-only policy for remainder, literal results/statuses, void return types and handler exceptions with reusable destinations. Preserve the independently specified checked range obligations.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • 3. Checked integral divisor functions and Bezout outputs UID: PPL-SPEC-000909 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For N = Checked_Number<T, Policy> with native integer or mpz_class storage, gcd_assign, lcm_assign and gcdext_assign shall invoke their corresponding _r operation using Policy::ROUND_DEFAULT_FUNCTION. The result shall be delivered exactly once to that policy's handler, after all numerical output updates, and the wrapper shall return void. No constructor or operator default, implicit conversion or separate output-policy handler call shall be required.

    Native gcd/lcm and their checked finite-range outcomes shall follow 🔗 2. Native integer greatest common divisor and least common multiple; native Bezout output/intermediate representability and output/source separation shall follow 🔗 1. Bounded native integer Bezout assignment. Unbounded divisor and Bezout meanings shall follow 🔗 1. Exact unbounded integer greatest common divisor and least common multiple and 🔗 2. Exact unbounded integer Bezout coefficients. All outputs shall be live same-type, same-policy objects. In particular, Bezout outputs shall obey their pairwise separation and source-alias conditions, and no unique coefficient pair beyond the prescribed identity shall be required. Gcd/lcm aliases shall use source entry values.

    A distinct source shall remain unchanged. Handler exceptions shall propagate, leaving surviving output objects live and reusable without a rollback promise. Numerical policies, admitted directions, resources, synchronization and initialization independence shall follow the named underlying operation.

    RATIONALE:

    One policy decision describes each multi-output numerical operation; it must not become one decision per output object.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void gcd_assign(Checked_Number<T, Policy>& g, const Checked_Number<T, Policy>& a,
                    const Checked_Number<T, Policy>& b);
    
    template <typename T, typename Policy>
    void lcm_assign(Checked_Number<T, Policy>& m, const Checked_Number<T, Policy>& a,
                    const Checked_Number<T, Policy>& b);
    
    template <typename T, typename Policy>
    void gcdext_assign(Checked_Number<T, Policy>& g, Checked_Number<T, Policy>& s,
                       Checked_Number<T, Policy>& t, const Checked_Number<T, Policy>& a,
                       const Checked_Number<T, Policy>& b);
    
    VERIFICATION_CRITERIA:

    Check zero/equal/coprime/noncoprime integer sources with literal gcd/lcm results and an independent unbounded Bezout identity. Admit only valid bounded intermediate arithmetic. Exercise gcd/lcm destination aliases and separated Bezout outputs, function-only policy capabilities, exactly one handler call, void return types, exceptions and live-output reassignment.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • PPL-SPEC-000910
    4. Checked named product accumulation UID: PPL-SPEC-000910 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the finite same-type, same-policy N scalar families in 🔗 1. Checked named unary functions and function policy, add_mul_assign(x, y, z) and sub_mul_assign(x, y, z) shall call their corresponding product- accumulation _r operation using Policy::ROUND_DEFAULT_FUNCTION. The complete returned numerical Result shall be delivered exactly once to the policy handler; the wrapper shall return void. There shall be no extra handler decision for a product intermediate, constructor default or operator default.

    The mathematical entry-destination value, all source/destination alias patterns and numerical outcomes shall follow 🔗 1. Native integer accumulated products and intermediate overflow, 🔗 2. Exact unbounded integer product accumulation, 🔗 7. Exact rational product accumulation and subtraction or 🔗 1. Finite native floating addition of an accumulated product, 🔗 2. Finite native floating subtraction of an accumulated product and 🔗 3. Configured native accumulation precision and truthful result relations, for the selected scalar family. In particular, native integral intermediate failure and native floating fused/nonfused precision shall retain their stated contracts; these wrappers shall not promise a stronger single-step numerical algorithm.

    Distinct sources shall remain unchanged. Handler exceptions and surviving destinations, lifetimes, supported directions, resources, synchronization and required native floating setup shall follow 🔗 1. Checked named unary functions and function policy and the numerical operation.

    RATIONALE:

    The wrapper reports the result already chosen by the numerical accumulation algorithm without introducing an additional intermediate policy decision.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void add_mul_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                        const Checked_Number<T, Policy>& z);
    
    template <typename T, typename Policy>
    void sub_mul_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                        const Checked_Number<T, Policy>& z);
    
    VERIFICATION_CRITERIA:

    Use literal accumulated sum/difference answers, zero/product cancellation and each admitted source/destination alias. Record one function-policy result and check no constructor/operator default is needed. Check void return type, direction-sensitive finite answers, source preservation, one throwing handler and surviving destination reuse, using the existing numerical contracts for intermediate failures.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • PPL-SPEC-000911
    5. Checked named scaling by powers of two UID: PPL-SPEC-000911 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the finite same-type, same-policy N scalar families in 🔗 1. Checked named unary functions and function policy, mul_2exp_assign(x, y, exp) and div_2exp_assign(x, y, exp) shall call the corresponding _r operation with Policy::ROUND_DEFAULT_FUNCTION and the supplied unsigned int exponent. The numerical Result shall be delivered exactly once to the handler after the operation; the wrapper shall return void and require no constructor or operator rounding default.

    Exponent admission, exact multiplication and directed division meanings, range outcomes and represented precision shall follow 🔗 1. Native integer arithmetic with exact powers of two, 🔗 2. Directed native integer division by powers of two, 🔗 5. Unbounded integer arithmetic with powers of two, 🔗 6. Exact rational operations with powers of two and 🔗 2. Finite native multiplication and division by a power of two, for the respective scalar family. The exponent shall not be narrowed or interpreted as a signed exponent.

    The destination may be the source, using its entry value. A distinct source shall remain unchanged. Handler exceptions, surviving destination reuse and the object/resource/synchronization/rounding/backend conditions of 🔗 1. Checked named unary functions and function policy and the underlying operation shall apply.

    RATIONALE:

    Named scaling preserves the exponent and function-policy choice while reusing the scalar family's directed numerical semantics.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void mul_2exp_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                         unsigned int exp);
    
    template <typename T, typename Policy>
    void div_2exp_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y,
                         unsigned int exp);
    
    VERIFICATION_CRITERIA:

    Check zero/nonzero exponents, multiplication and inexact integral division with literal power-of-two answers and status relations. Exercise source aliases, same-type source preservation, function-only policies, void return, one callback and handler rejection/reuse under admitted exponent/backend conditions.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • PPL-SPEC-000912
    6. Checked named nonnegative square root UID: PPL-SPEC-000912 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the finite same-type, same-policy N scalar families in 🔗 1. Checked named unary functions and function policy, with a nonnegative source, sqrt_assign(x, y) shall call sqrt_assign_r using Policy::ROUND_DEFAULT_FUNCTION. It shall deliver the numerical Result exactly once to the handler and return void. No constructor or operator rounding default shall be required.

    Native integral, unbounded integral, canonical rational and supported native floating roots shall follow 🔗 1. Directed native integer square-root assignment, 🔗 3. Directed unbounded integer square roots, 🔗 2. Finite rational square root at the selected irrational precision and 🔗 1. Directed and delegated square root of a finite native value, respectively. In particular, rational roots shall use the calling precision and its ownership/synchronization conditions in 🔗 3. Selection and ownership of irrational rational precision; the wrapper shall not select a different precision. Admitted exactness requests shall retain their underlying root prerequisites.

    The destination may be the source, using its entry value. A distinct source shall remain unchanged. Handler exceptions, live destination reuse, object/resource/synchronization conditions and required backend/hardware setup shall follow 🔗 1. Checked named unary functions and function policy and the numerical root operation.

    RATIONALE:

    Square-root storage and exactness are selected by the numerical backend and precision; the named wrapper adds the function policy decision only.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for the admitted T and Policy:

    template <typename T, typename Policy>
    void sqrt_assign(Checked_Number<T, Policy>& x, const Checked_Number<T, Policy>& y);
    
    VERIFICATION_CRITERIA:

    Check zero, perfect squares and direction-sensitive nonperfect integral roots with independent literal root inequalities. Include a rational root at a controlled precision, source aliases, preserved source/precision, function-only policy capability, void return, one numerical callback and handler rejection followed by valid destination reuse.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkednamedfunctionsspec1.cc.

  • 1. Finite checked scalar storage and copying UID: PPL-SPEC-000556 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For T drawn from the eleven standard native integer types, mpz_class, mpq_class or a configured supported native floating format, Checked_Number<T, Policy> shall own one scalar value. Its policy shall admit that scalar's representation and the operations used below. Finite rational storage shall be canonical, with positive denominator.

    Native_Number<T> shall have the truth value of Is_Native<T>::value. The default classification shall include the scalar families above and shall exclude bool, wide character types, checked wrappers and cv-qualified or reference types; it shall not strip qualifiers. Existing trait specializations shall continue to determine admission. This numeric classification shall not require Boolean equality or alter symbolic Variable comparisons. Native_Or_Checked_Number<T> shall have the truth value of Is_Native_Or_Checked<T>::value and classify raw scalars or checked wrappers. Its default classification shall exclude marker types and retain the same qualifier and trait-specialization rules. Numeric function templates shall use these classifications as constraints without requiring regular Boolean equality for unrelated symbolic types.

    Default construction shall produce finite mathematical zero. Native floating zero shall initially have positive sign. Same-type copy construction and copy assignment shall preserve the source value, including a finite native floating zero's sign. The copied object's storage shall be independent of the source: changing or destroying one shall not change or invalidate the other. Same-object copy assignment shall preserve the value and return a reference to that object. Distinct-object copy assignment shall return a reference to the destination and preserve the source. Copying shall not invoke a policy conversion handler or require a rounding default.

    A default-constructed or copied object shall be live, assignable and destructible. Copying shall require sufficient resources for the underlying scalar copy. Sources and existing assignment destinations shall be live; callers shall synchronize access overlapping modification of either object. No library initialization, coefficient constants or FPU rounding setup shall be required.

    RATIONALE:

    An owned scalar copy permits independently mutable numerical objects without changing the selected policy or invoking a numerical conversion.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Checked_Number<T, Policy>:

    template <typename T>
    concept Native_Number = bool(Is_Native<T>::value);
    template <typename T>
    concept Native_Or_Checked_Number = bool(Is_Native_Or_Checked<T>::value);
    
    Checked_Number();
    Checked_Number(const Checked_Number& source);
    Checked_Number& operator=(const Checked_Number& source);
    
    VERIFICATION_CRITERIA:

    Check zero initialization, same-object assignment, distinct-object copy and assignment for all admitted scalar families and supported policies. Modify and destroy sources after copying, including large unbounded integers and nonintegral rationals, and confirm independent retained values. Cover native floating negative zero and boundary values. Use a recording policy to confirm that no handler or rounding default is consulted.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/Is_Native.hh; tests/commonhelpersspec1.cc; tests/checkedscalarsspec1.cc; tests/numericpublic1.cc.

  • 2. Finite checked scalar converting construction and assignment UID: PPL-SPEC-000557 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Finite value-converting Checked_Number<T, Policy> constructors shall convert their admitted native, unbounded integer, rational or checked scalar source with the numerical meaning and preconditions of the corresponding assign_r operation. An explicit direction shall select that conversion; a constructor without a direction shall use Policy::ROUND_DEFAULT_CONSTRUCTOR. A C-string constructor shall use the numeric input meaning of 🔗 1. Exact finite numeric token syntax through 🔗 4. Numeric text input into supported native floating destinations, with that explicit or default constructor direction. The string shall point to an accessible null-terminated token.

    After conversion returns a Result, construction shall pass it once to Policy::handle_result. On normal handler return, the new object's stored value and any destination-value limitations shall be those of the conversion result. Handler exceptions shall propagate; a constructor that throws shall not produce a usable object. Numerical source objects shall remain unchanged.

    Assignment from an admitted source of a different checked type or from a native, unbounded integer or rational source shall use assign_r with Policy::ROUND_DEFAULT_OPERATOR. It shall pass the result once to the handler and, on normal handler return, return a reference to the destination. Same-type copy assignment shall instead follow 🔗 1. Finite checked scalar storage and copying. A handler that throws shall not imply rollback of an assignment; guarantees for the surviving destination shall follow the numerical operation involved.

    Required policy members shall follow 🔗 1. Operation-specific numerical policy capabilities. A finite source shall be admissible to its policy and the destination conversion; ROUND_NOT_NEEDED shall retain its exactness and intermediate-operation preconditions. Source lifetimes, resources, synchronization, shared-temporary serialization and any FPU prerequisites shall be those of the corresponding conversion or input contract. No additional library initialization shall be required by the wrapper.

    RATIONALE:

    The wrapper shall preserve the numerical contract of explicit conversions while adding the selected rounding default and result handling.

    INTERFACE:

    Public header: <ppl.hh>; representative admitted members of Parma_Polyhedra_Library::Checked_Number<T, Policy>:

    Checked_Number(int source, Rounding_Dir dir);
    Checked_Number(int source);
    Checked_Number(const mpz_class& source, Rounding_Dir dir);
    Checked_Number(const mpq_class& source, Rounding_Dir dir);
    Checked_Number(const char* source, Rounding_Dir dir);
    Checked_Number(const char* source);
    template <typename From, typename From_Policy>
    Checked_Number(const Checked_Number<From, From_Policy>& source,
                   Rounding_Dir dir);
    template <typename From, typename From_Policy>
    explicit Checked_Number(const Checked_Number<From, From_Policy>& source);
    template <typename From>
    Checked_Number& operator=(const From& source);
    

    The corresponding admitted scalar constructor overloads shall include the remaining standard native integer types, configured supported native floating formats and default-direction unbounded integer and rational forms.

    VERIFICATION_CRITERIA:

    Compare exact finite constructor and assignment values with literal integer and rational oracles across all admitted scalar destinations and representative native, GMP and checked sources. Include distinct source/destination policies, explicit and differing default directions, fractional input to integral storage, numeric strings and handler exceptions. Verify handler call counts, returned references, source preservation and independence after later mutation. Use the existing conversion contracts for range and inexactness outcomes.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedscalarsspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000558
    3. Checked scalar storage references and value conversion UID: PPL-SPEC-000558 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live finite Checked_Number<T, Policy> admitted by 🔗 1. Finite checked scalar storage and copying, mutable raw_value() and the corresponding free raw_value shall return references to the same owned T object. Their const overloads shall return const references to that object without copying or changing its value. A reference shall remain associated with the same storage object until its owner is destroyed; changing the owned value shall not rebind it. Callers that modify raw storage shall maintain its representation and policy prerequisites, including canonical rational form.

    The conversion shall participate only when Policy::convertible is a constant expression with a true Boolean value. A missing, false or nonconstant flag shall leave default construction and raw access available without advertising this conversion. Policy access granted to the checked class shall remain usable for this decision.

    Where conversion is enabled, conversion to T shall return an independent value copy, preserving the finite value and native floating zero sign. Altering that copy shall not alter the checked object. Raw access and this value conversion shall not invoke a result handler or numerical rounding. The policy restrictions of 🔗 1. Operation-specific numerical policy capabilities shall apply to underlying value conversion. No initialization or FPU rounding setup shall be required; callers shall synchronize access overlapping modification of the owner.

    RATIONALE:

    Direct storage access permits common numerical adapters to operate on the owned scalar, while permitted value conversion preserves ownership.

    INTERFACE:

    Public header: <ppl.hh>; members and related functions in PPL:

    T& Checked_Number<T, Policy>::raw_value();
    const T& Checked_Number<T, Policy>::raw_value() const;
    // Participates only for a constant true Policy::convertible flag.
    Checked_Number<T, Policy>::operator T() const;
    template <typename T, typename Policy>
    T& raw_value(Checked_Number<T, Policy>& source);
    template <typename T, typename Policy>
    const T& raw_value(const Checked_Number<T, Policy>& source);
    
    VERIFICATION_CRITERIA:

    Check exact reference types and address identity of all four raw access forms. Retain references across assignments and swaps, mutate through each mutable reference and confirm the checked value changes. For convertible policies, mutate converted copies and confirm independence, including GMP allocation and native floating negative zero. Confirm no handler calls and unchanged FPU rounding state. Reject missing, false and nonconstant conversion flags in conversion traits; retain default construction and raw access. Admit constant true integral flags and flags accessible through checked-class friendship.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedscalarsspec1.cc; tests/numericpublic1.cc; tests/numericpoliciesspec1.cc.

  • PPL-SPEC-000559
    4. Checked scalar value swap UID: PPL-SPEC-000559 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live Checked_Number<T, Policy> objects with the same scalar type and policy and admitted finite or special values, swap(x, y) shall exchange their stored values, including native floating zero signs and admitted infinity signs. An admitted NaN shall remain NaN; ordered equality shall not be required to compare it with its former value. Policies shall remain the template policies of their respective objects. Same-object swap shall preserve the value. Existing raw references shall continue to refer to their original owned storage objects and shall observe the exchanged values.

    Swap shall not perform numerical conversion, consult a rounding default or invoke a result handler. It shall require the scalar's swap resources and representation prerequisites, and shall preserve both objects' assignability and destructibility on successful return. Callers shall synchronize access overlapping modification of either object. No initialized library state or FPU rounding setup shall be required.

    RATIONALE:

    Exchanging owned numerical values shall not introduce an additional rounding or result-handling decision.

    INTERFACE:

    Public header: <ppl.hh>; related function in PPL:

    template <typename T, typename Policy>
    void swap(Checked_Number<T, Policy>& x,
              Checked_Number<T, Policy>& y);
    
    VERIFICATION_CRITERIA:

    Exchange distinct positive, negative, zero, boundary and dynamically allocated scalar values. Test same-object swap, repeated swap, retained raw references, independent later mutation and native floating signed zero. Use policies without rounding defaults or handlers and a recording policy to verify that swap requires neither facility.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedscalarsspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000560
    5. Checked scalar memory-size inspection UID: PPL-SPEC-000560 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live finite checked scalar admitted by 🔗 1. Finite checked scalar storage and copying, external_memory_in_bytes(x) shall report the same memory-size metric as that query applied to the owned scalar x.raw_value(). total_memory_in_bytes(x) shall likewise report the corresponding owned scalar's total-size metric. For native integer and supported native floating storage, external size shall be zero and total size shall be sizeof(T). For GMP integer and rational storage, the metric shall include the owned scalar's allocated limb storage according to the underlying memory queries. It shall describe allocated storage, rather than only significant digits.

    Both queries shall preserve the object and any retained raw references and shall neither invoke policy handlers nor perform numerical rounding. Results shall fit memory_size_type. Callers shall synchronize inspection with modification of the inspected object. No library initialization or FPU rounding setup shall be required.

    RATIONALE:

    The numerical wrapper shall expose the storage metric of its owned scalar without adding a separate allocation or changing the represented value.

    INTERFACE:

    Public header: <ppl.hh>; related functions in PPL:

    template <typename T, typename Policy>
    memory_size_type total_memory_in_bytes(const Checked_Number<T, Policy>& x);
    template <typename T, typename Policy>
    memory_size_type external_memory_in_bytes(const Checked_Number<T, Policy>& x);
    
    VERIFICATION_CRITERIA:

    Check exact native sizes and zero external allocation for every standard integer and supported floating type. For GMP integers and rationals, compare wrapper and owned-scalar metrics before and after growing both numerator and denominator storage, copying and swapping. Confirm total size includes the scalar object and its external allocation, preserved numerical values and references, and absence of policy handling or rounding changes.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedscalarsspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-001197
    6. Complete checked-wrapper placement construction without a handler UID: PPL-SPEC-001197 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted call to the result-returning free construct function with To = Checked_Number<T, Policy>, the destination shall denote suitably aligned storage sufficient for that complete wrapper, with no live complete wrapper occupying it. T shall be an admitted native integer, configured native floating format, mpz_class or mpq_class. A numerical source shall be live and initialized; a typed special marker shall have its existing marker meaning. Source storage shall not overlap the unconstructed destination. The selected source/destination policies, scalar conversion and rounding request shall satisfy their existing numerical, representation, resource, initialization, FPU and synchronization prerequisites.

    On normal return, a complete destination wrapper and its owned scalar shall have begun their lifetimes. The wrapper shall admit destruction and subsequent supported assignment. The represented result and returned Result shall have the selected checked conversion or typed-special assignment meaning. A failure or unrepresentable result shall not promise a numerical payload that its result and policy do not otherwise define. The source shall be preserved. The free function shall apply its existing exactness-request translation and result check once, without invoking a policy result handler or requiring a constructor rounding default. Both deduced calls and calls that explicitly specify To and From shall have this meaning.

    If conversion throws after an owned class scalar has been initialized, ordinary constructor unwinding shall destroy that scalar. No complete destination wrapper is returned from the failed construction. This rule shall not imply an allocation rollback guarantee for the containing row or a live wrapper that the caller must destroy after a failed constructor. Raw native/GMP construction routes and ordinary public wrapper constructors shall retain their existing contracts; in particular, this no-handler function shall not replace the result handling of an ordinary converting constructor.

    RATIONALE:

    A raw scalar subobject construction does not itself start the enclosing non-implicit-lifetime checked wrapper. Constructing the complete wrapper centrally permits all free construction callers, including upward DB-row conversion, to use the intended wrapper type. A private no-handler entry keeps result-returning construction distinct from an ordinary converting constructor and gives initialized class members language-provided cleanup.

    INTERFACE:

    Public header: <ppl.hh>; free functions in PPL, with the admitted destination restriction above. Existing enable conditions and overload selection remain.

    template <typename To, typename From>
    Result construct(To& destination, const From& source, Rounding_Dir dir);
    

    Internal private tagged construction and its checked-destination access helper implement the complete-object lifetime. They are not additional public constructors or new conversion-policy defaults.

    VERIFICATION_CRITERIA:

    1. Exercise numerical and typed-special free construction in aligned raw wrapper storage, both with deduction and explicit two-template arguments, using policies without rounding defaults or an available result handler. Check the returned relation/class, source preservation, supported replacement and destruction. Include native, MPZ and canonical MPQ scalar families. 2. Inspect the complete wrapper placement-new and the private constructor's live member access, one request translation and one result check. Verify that no destination member function is called before complete wrapper construction and that initialized class scalar cleanup is supplied on constructor failure. 3. Check upward row conversion with fresh coherent normal and fallback storage profiles, preserving numerical values and sources without an extra conversion handler. Check raw-native and raw-GMP construction results and their independent replacement and destruction behavior under their existing contracts.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/DB_Row_templates.hh; tests/checkedscalarsspec1.cc; tests/dbrowownedhistories1.cc.

  • 1. Same-type checked copying of admitted special values UID: PPL-SPEC-000850 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Checked_Number<T, Policy> with an underlying native integer, mpz_class, mpq_class or configured supported native floating type, a source shall contain an infinity or quiet NaN admitted by its policy. Same-type copy construction and copy assignment shall preserve that special value's class and an infinity's sign. They shall require no rounding default, numerical conversion or policy result handler and shall not invoke a handler. Same-object copy assignment shall preserve the value. Both same-object and distinct-object assignment shall return a reference to the destination; a distinct source shall remain unchanged.

    Each copied object shall own independently mutable storage. Replacing or destroying the source shall not change or invalidate a copy, and replacing one copy shall not change any other object. A live assignment destination may initially hold a finite or admitted special value. Construction and assignment shall retain normal C++ member/resource cleanup. Available resources shall suffice for underlying scalar copying. Finite copying shall retain 🔗 1. Finite checked scalar storage and copying.

    The valid special representations and finite-reuse prerequisites shall follow 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage or 🔗 4. Typed special-value assignment to native floating-point storage according to storage. Ordinary GMP numerical operations shall not be applied to copied PPL special representations. Native floating NaN payload/sign selection shall not be prescribed, and a signaling NaN shall not be admitted. Source/destination access overlapping mutation shall be synchronized. Calls shall require no library initialization, coefficient-constant stage or FPU setup and shall preserve hardware direction. Native floating exception/status conditions shall follow 🔗 4. Typed special-value assignment to native floating-point storage; unavailable formats shall not be instantiated.

    RATIONALE:

    Same-type copying preserves an owned numerical value without converting it or rerunning a policy handler, including for supported special states.

    INTERFACE:

    Public header: <ppl.hh>; members of the admitted Parma_Polyhedra_Library::Checked_Number<T, Policy>:

    Checked_Number(const Checked_Number& source);
    Checked_Number& operator=(const Checked_Number& source);
    
    VERIFICATION_CRITERIA:

    For each storage family and special-admission policy, copy each admitted infinity/NaN, exercise self-assignment and every finite/special destination state, and require returned destination identity and unchanged sources. Replace and destroy sources, mutate independent copies and verify retained special values. Use large prior GMP allocations, handler traps and policies without rounding defaults. Check configured floating formats and every hardware direction without initialization.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_int_inlines.hh; src/checked_float_inlines.hh; tests/checkedspecialcopyspec1.cc.

  • PPL-SPEC-000916
    1. Checked typed special-value factory results UID: PPL-SPEC-000916 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let N be an admitted Checked_Number<T, Policy> marker-construction instantiation from 🔗 1. Checked special-marker construction and policy assignment. plus_infinity<N>(), minus_infinity<N>() and not_a_number<N>() shall construct and return an independently owned N from, respectively, PLUS_INFINITY, MINUS_INFINITY and NOT_A_NUMBER. The return type shall be exactly N. Admission shall require that the corresponding typed marker can implicitly construct N; these factory instantiations shall have the same scalar availability and policy capability conditions as that constructor.

    Each call shall use Policy::ROUND_DEFAULT_CONSTRUCTOR and deliver the marker-construction Result exactly once to Policy::handle_result. No operator/function rounding default, additional conversion or return-copy handler decision shall be required. Copy elision shall not affect this count. Special payloads, finite fallback endpoints, unsupported-result meaning and valid reuse shall follow 🔗 1. Checked special-marker construction and policy assignment and its underlying marker contracts. A returned object after handler acceptance shall remain live, assignable and destructible; acceptance alone shall not promise a represented answer for an unsupported construction.

    A handler exception shall propagate, and no result object shall be delivered. Normal cleanup shall preserve the owned-storage guarantees in 🔗 1. Same-type checked copying of admitted special values. Exception classification supplied by Extended_Number_Policy::handle_result shall retain 🔗 8. Exception classification of numerical result codes; an available NaN representation shall not prevent a policy from rejecting its construction result.

    No existing numeric object shall be modified. The typed marker objects shall remain unchanged. Resource, scalar/policy, synchronization and backend conditions shall follow the corresponding marker constructor. No extra library initialization or coefficient-constant stage shall be required.

    RATIONALE:

    Special-value factories select the marker constructor already provided by the checked scalar policy and add ownership of the returned value.

    INTERFACE:

    Public header: <ppl.hh>; function-template instantiations in Parma_Polyhedra_Library for admitted checked N:

    template <typename N>
    N plus_infinity();
    
    template <typename N>
    N minus_infinity();
    
    template <typename N>
    N not_a_number();
    
    VERIFICATION_CRITERIA:

    Check exact return types, all three markers across admitted native/GMP and configured floating storage, constructor-default directions and one handler call. Use policies without operator/function defaults, both infinity/NaN support choices, independent later result mutation and return-copy elision disabled. Check policy exceptions, cleanup and valid returned-object reuse without inspecting unsupported payloads.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedspecialfactoriesspec1.cc.

  • 1. Checked special-marker construction and policy assignment UID: PPL-SPEC-000848 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Checked_Number<T, Policy>, the underlying type T shall be an admitted native integer, mpz_class, mpq_class or configured supported native floating-point type. Native floating-point policies shall admit the format's infinities and quiet NaN. Marker types shall be Minus_Infinity, Plus_Infinity and Not_A_Number.

    The explicit-direction marker constructor shall assign the special marker using the supplied direction and deliver that numerical Result exactly once to Policy::handle_result. It shall require that handler but no policy default direction. The default-direction marker constructor shall instead use Policy::ROUND_DEFAULT_CONSTRUCTOR and deliver the result exactly once to that same handler. Assignment from a marker shall use Policy::ROUND_DEFAULT_OPERATOR, deliver its result exactly once to the handler and return a reference to the destination if the handler returns. An assignment default shall not be required merely to construct an object, nor a constructor default merely to assign to a live object.

    Numerical payloads, supported/unsupported classes, representability flags and admitted directions shall follow 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage or 🔗 4. Typed special-value assignment to native floating-point storage according to storage. In particular, supported NaN representation shall not produce a false unrepresentability flag. A NaN marker shall retain an empty ordered relation and shall not admit ROUND_NOT_NEEDED. Handler acceptance shall not turn an unsupported numerical result into a represented number: such an accepted object shall remain reusable as a destination, without inspecting its unspecified payload.

    A handler exception shall propagate. Failed construction shall not leave a completed destination object; already constructed members shall have normal C++ cleanup. If assignment's handler throws, the destination shall remain live and reusable but need not retain its old payload. No strong assignment rollback shall be required. Marker sources shall remain unchanged. Underlying object ownership and cleanup shall follow 🔗 1. Finite checked scalar storage and copying.

    Object access overlapping mutation shall be synchronized, and resources shall suffice for underlying objects. Calls shall require no library initialization, coefficient-constant stage or FPU setup and shall preserve hardware direction. Unavailable floating-point formats shall not be instantiated. Native floating-point exception/status conditions shall follow 🔗 4. Typed special-value assignment to native floating-point storage.

    RATIONALE:

    Convenience construction and assignment apply a caller-selected result policy. That policy must receive the actual numerical outcome once, with the correct default source and ordinary C++ exception/lifetime effects.

    INTERFACE:

    Public header: <ppl.hh>; members of an admitted Checked_Number<T, Policy>:

    template <Special_Marker Special>
    Checked_Number(const Special&, Rounding_Dir dir, bool ignored = false);
    
    template <Special_Marker Special>
    Checked_Number(const Special&, bool ignored = false);
    
    template <typename From>
    Checked_Number& operator=(const From&);
    

    The optional Boolean parameter shall be ignored for either value.

    The assignment instantiations admitted here shall have From equal to one of the three special-marker types.

    VERIFICATION_CRITERIA:

    Use recording and throwing policies to check exact handler call counts and results, explicit directions without defaults, constructor-only and assignment-only defaults, and distinct constructor/operator rounding choices. Check supported and unsupported marker outcomes across storage families, returned assignment identity, unchanged markers, handler exceptions and destination reuse after assignment failure. Cross both values of the ignored Boolean parameter. Check all admitted requests, available floating formats and hardware directions without initialization; require truthful supported-NaN flags.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; tests/checkedspecialwrappersspec1.cc.

  • 1. Configured integral coefficient type and return trait UID: PPL-SPEC-000041 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public Coefficient alias shall designate the configured integral coefficient type. The mpz profile shall select mpz_class (also named GMP_Integer). For each supported width n ∈ {8, 16, 32, 64}, checked-intN shall select Checked_Number<intN_t, Bounded_Integer_Coefficient_Policy> and native-intN shall select Checked_Number<intN_t, Checked_Number_Transparent_Policy<intN_t>>. Here N in a profile or type name denotes that selected width.

    The bounded profiles shall represent the mathematical integers from  − 2n − 1 through 2n − 1 − 1, inclusive. The mpz profile shall have no fixed-width integer range limit; available resources still limit computations. A native profile shall not promise overflow checking. The selection shall not introduce a global 128-bit coefficient type or change the meaning of coordinate indices.

    Coefficient_traits shall be Coefficient_traits_template<Coefficient>. Its const_reference shall be const Coefficient& for mpz and both 64-bit bounded profiles, and Coefficient for the 8-, 16- and 32-bit bounded profiles. This trait shall determine whether a constant accessor returns a borrowed reference or a value, as specified by 🔗 6. Coefficient zero and one constant access.

    RATIONALE:

    Profile identity determines range, overflow policy and whether returned constants are borrowed values. A common alias does not erase these configuration-dependent contracts.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. The configured header shall expose one selected coefficient alias and its trait alias. Representative configured declarations:

    // mpz configuration:
    typedef mpz_class Coefficient;
    typedef Coefficient_traits_template<Coefficient> Coefficient_traits;
    
    // checked-int8 configuration instead:
    // typedef Checked_Number<int8_t,
    //   Bounded_Integer_Coefficient_Policy> Coefficient;
    
    // native-int8 configuration instead:
    // typedef Checked_Number<int8_t,
    //   Checked_Number_Transparent_Policy<int8_t>> Coefficient;
    

    The same bounded forms shall apply with int16_t, int32_t or int64_t for the other configured widths.

    VERIFICATION_CRITERIA:

    For all nine configured profiles, check the selected type, width, signed range and exact return-trait type at compile time. Check that the coefficient-kind selection is unique. Compile clients against the matching public header; distinguish these checks from unrelated native 128-bit capabilities.

    SOURCE:

    src/Coefficient_types.hh; src/GMP_Integer_types.hh; configure.ac; tests/coefficient2.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.

  • 3. Exact ordinary integral coefficient arithmetic UID: PPL-SPEC-000043 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live finite coefficients with mathematical entry values a and b, successfully materialized addition, subtraction and multiplication shall produce a + b, a − b and ab, respectively. Unary plus shall preserve the value and unary minus shall produce  − a.

    Compound addition, subtraction and multiplication shall replace the target by the corresponding result computed from the operands' entry values and return a reference to the target. This shall include an operand that is the target itself. Prefix increment and decrement shall change the value by one and return a reference to the changed target. Postfix forms shall make the same change and return an independent value equal to the target's entry value.

    The mathematical result of every evaluated arithmetic step shall be representable in the selected bounded profile. Operand values shall remain unchanged unless they designate the assigned target. Results formed by the GMP expression-template provider shall be evaluated while their referenced operands remain alive. The initialized-thread and synchronization prerequisites of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Checked overflow reporting is specified by 🔗 5. Checked coefficient overflow and result-policy dispatch; native overflow is outside the successful-result preconditions.

    RATIONALE:

    Exact integer arithmetic is the common foundation of the domains. Entry-value semantics make self-aliasing and increment/decrement results precise without constraining backend expression representation.

    INTERFACE:

    Public header: <ppl.hh>. The selected provider shall admit these materializing forms for live Coefficient operands a and b:

    Coefficient sum(a + b);
    Coefficient difference(a - b);
    Coefficient product(a * b);
    Coefficient positive(+a);
    Coefficient negative(-a);
    Coefficient& added = (a += b);
    Coefficient& subtracted = (a -= b);
    Coefficient& multiplied = (a *= b);
    Coefficient& incremented = ++a;
    Coefficient old_increment(a++);
    Coefficient& decremented = --a;
    Coefficient old_decrement(a--);
    

    Intermediate arithmetic expression types may differ between providers. Materializing the result as Coefficient shall produce the stated integer value.

    VERIFICATION_CRITERIA:

    Compare zero, mixed signs, cancellation, products and representable endpoint-adjacent results with literal or independently computed integer answers. Check compound return identity, preservation of distinct operands, self-add/subtract/multiply within range, and prefix/postfix entry values. Include multi-limb GMP cases and avoid executing native overflow. Check results after independent operand mutations.

    SOURCE:

    src/Coefficient_types.hh; src/Checked_Number_inlines.hh; GMP integer provider; tests/coefficient2.cc.

  • 4. Coefficient quotient and remainder with truncation toward zero UID: PPL-SPEC-000044 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live finite coefficients with entry values a and nonzero b, a successfully materialized quotient shall be q = trunc(a ⁄ b). A materialized remainder shall be r = a − bq, with |r| < |b|; a nonzero remainder shall have the sign of a. Quotient calculation shall require q to be representable. In a bounded profile, dividing the least representable integer by -1 shall therefore be outside this successful-quotient precondition.

    Remainder calculation shall admit every representable dividend and nonzero representable divisor, including that least-integer/-1 pair, and shall return zero for that pair. The mathematical definition of r shall not require the caller to compute an unrepresentable bounded quotient or intermediate product.

    Compound division and remainder shall compute the corresponding result from entry values, replace the target and return a reference to it. The divisor may designate that target when its entry value is nonzero. Distinct operands shall remain unchanged. No zero-divisor rejection guarantee shall be inferred from these valid-input contracts. Materialization, thread initialization and synchronization shall follow 🔗 3. Exact ordinary integral coefficient arithmetic.

    RATIONALE:

    Negative operands distinguish truncation toward zero from floor division. Remainder can remain representable even where its corresponding bounded quotient is not.

    INTERFACE:

    Public header: <ppl.hh>. For live Coefficient operands a and b satisfying the respective preconditions:

    Coefficient quotient(a / b);
    Coefficient remainder(a % b);
    Coefficient& divided = (a /= b);
    Coefficient& reduced = (a %= b);
    

    The quotient and remainder forms shall have the same stated conventions in GMP, checked bounded and native bounded profiles.

    VERIFICATION_CRITERIA:

    Use literal quotient/remainder answers for every sign combination, exact and inexact division, zero dividends, unit divisors and bounded endpoints. Verify reconstruction with an unbounded oracle, not overflowing bounded intermediates. Check MIN remainder -1 separately from the excluded native quotient. Exercise compound/self-aliasing forms and preserve distinct operands.

    SOURCE:

    src/Coefficient_types.hh; src/Checked_Number_inlines.hh; src/checked_int_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.

  • 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-000048
    8. Coefficient scaling and truncated division by powers of two UID: PPL-SPEC-000048 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live finite coefficient with entry value a and an unsigned exponent e, successful mul_2exp_assign(x, y, e) shall assign a2e to x, where a is y's entry value. Successful div_2exp_assign(x, y, e) shall assign trunc(a ⁄ 2e) to x. Truncation shall be toward zero for either sign. The exponent zero shall preserve the input value.

    The destination may be the source itself. A distinct source shall remain unchanged. A successful bounded multiplication result shall be representable. For native bounded multiplication, the exponent shall additionally be less than the selected width. These conditions shall include multiplying -1 by the power whose exponent is one less than that width, producing the least representable integer without undefined intermediate signed overflow.

    Bounded division shall admit every unsigned int exponent; an exponent at least as large as the coefficient width shall produce zero. Checked bounded multiplication shall also admit every such exponent: a zero source shall produce zero, while a nonzero source with an exponent at least as large as the width shall report overflow. The mpz profile shall admit the unsigned int exponent range subject to available computational resources.

    Checked bounded multiplication whose result is outside the coefficient range, with other input prerequisites satisfied, shall report std::overflow_error and retain the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. Native bounded operations shall not promise overflow detection. The initialized-thread and synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply.

    RATIONALE:

    Scaling by powers of two is an integer operation, including at the negative range boundary. A representable result must not be invalidated by an overflowing signed intermediate. Division must retain the same truncation convention as ordinary integer quotient calculation.

    INTERFACE:

    Public header: <ppl.hh>. For Coefficient operands in Parma_Polyhedra_Library, the selected provider shall admit:

    void mul_2exp_assign(Coefficient& x, const Coefficient& y,
                        unsigned int exp);
    void div_2exp_assign(Coefficient& x, const Coefficient& y,
                        unsigned int exp);
    

    For a bounded profile these callable forms are supplied by function-template instantiations for the configured coefficient type.

    VERIFICATION_CRITERIA:

    Check zero and nonzero exponents, positive and negative inputs, zero values, destination/source aliasing and preservation of distinct sources. Include the negative sign-bit boundary in every bounded width, multi-limb GMP values, and literal signed-division answers. Compare checked positive and negative overflow with the required exception and explicitly reassign surviving outputs. Run native valid-result cases under undefined-behavior sanitization and confirm that introducing an overflowing signed intermediate is detected by the boundary regression.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh: GMP helpers. src/Checked_Number_inlines.hh: bounded coefficient helper dispatch. src/checked_int_inlines.hh: bounded scaling and division. tests/coefficient2.cc: configured dyadic arithmetic and boundary cases.

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

  • 1. Modeled bounded-integer type identity UID: PPL-SPEC-000981 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Concrete_Expression_Type::bounded_integer() shall create a value identifying the supplied modeled width, representation and overflow interpretation. The admitted widths shall be BITS_8, BITS_16, BITS_32, BITS_64 and BITS_128; representations shall be UNSIGNED and SIGNED_2_COMPLEMENT; overflow interpretations shall be OVERFLOW_WRAPS, OVERFLOW_UNDEFINED and OVERFLOW_IMPOSSIBLE. The result shall classify as bounded integer and not floating point, and its matching-kind getters shall return those attributes exactly.

    These shall describe analyzed arithmetic, independently of native host integer types and of the configured coefficient storage. Modeling 128 bits shall not require a native 128-bit type. The factory and accessors shall require no PPL initialization, arithmetic evaluation or FPU setup.

    RATIONALE:

    Modeled integer meaning must retain width, sign representation and overflow choices without confusing them with host storage capabilities.

    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.

    static Concrete_Expression_Type bounded_integer(
      Bounded_Integer_Type_Width width,
      Bounded_Integer_Type_Representation representation,
      Bounded_Integer_Type_Overflow overflow);
    bool is_bounded_integer() const;
    bool is_floating_point() const;
    Bounded_Integer_Type_Width bounded_integer_type_width() const;
    Bounded_Integer_Type_Representation bounded_integer_type_representation() const;
    Bounded_Integer_Type_Overflow bounded_integer_type_overflow() const;
    
    VERIFICATION_CRITERIA:

    Check all 30 named attribute combinations, including 128 bits, under supported and no-native-FP configurations without initialization; compare every matching-kind getter and discriminator.

    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.

  • PPL-SPEC-000982
    2. Modeled floating-point format identity UID: PPL-SPEC-000982 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Concrete_Expression_Type::floating_point() shall create a value identifying the supplied modeled format. The admitted formats shall be IEEE754_HALF, IEEE754_SINGLE, IEEE754_DOUBLE, IEEE754_QUAD, INTEL_DOUBLE_EXTENDED, IBM_SINGLE and IBM_DOUBLE. The value shall classify as floating point and not bounded integer; its matching-kind format getter shall return the supplied format exactly.

    A modeled format shall remain available as metadata when host arithmetic in that format is unavailable. This factory shall not construct a host floating-point value or imply that every numerical algorithm supports every modeled format. It shall require no PPL initialization or FPU setup.

    RATIONALE:

    Analyzed format identity and availability of a host implementation are different capabilities.

    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.

    static Concrete_Expression_Type floating_point(Floating_Point_Format format);
    bool is_bounded_integer() const;
    bool is_floating_point() const;
    Floating_Point_Format floating_point_format() const;
    
    VERIFICATION_CRITERIA:

    Check all seven named formats without numerical evaluation or initialization, including formats unavailable natively and an actual no-native-FP configuration.

    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.

  • PPL-SPEC-000983
    3. Type-descriptor copying and validity diagnostics UID: PPL-SPEC-000983 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Implicit copying and assignment of Concrete_Expression_Type shall preserve its discriminator and complete matching-kind attributes as independent values. Assigning the other category shall replace the previous category and attributes. Getter calls shall require the matching category; querying inactive-category fields shall not be a supported way to convert a descriptor.

    OK() shall accept descriptors constructed from the named admitted attributes and reject stored invalid attribute combinations. Factories shall not be required to throw for unnamed enumeration values. Values used solely for validity diagnostics shall still lie within the enumeration's C++ value range; a rejected descriptor shall not be used as an admitted expression type. Copying, assignment and diagnostics shall require no PPL initialization or FPU setup.

    RATIONALE:

    Category-safe queries and independent metadata values prevent accidental reinterpretation of unrelated attributes.

    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.

    Concrete_Expression_Type(const Concrete_Expression_Type&);
    Concrete_Expression_Type& operator=(const Concrete_Expression_Type&);
    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check copies/self-assignment/category replacement and preserved donors; exercise unnamed in-range widths 0/24/255, overflow 3 and format 7 solely through OK(), and inspect inactive-field invariant checks.

    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.

  • PPL-SPEC-000984
    4. Target-specific concrete-expression adapter protocol UID: PPL-SPEC-000984 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    A target used with the concrete-expression analysis templates shall provide specializations for the expression base and the supported binary, unary, cast, integer-constant, floating-constant and approximable-reference node adapters. Each node kind shall have a distinct KIND matching the base expression's kind() result. type() shall return the node's modeled numeric type. The base adapter shall derive unambiguously and nonvirtually from Concrete_Expression_Common<Target>; a kind-specific adapter shall have the corresponding concrete base lineage required for its downcast.

    Binary adapters shall expose distinct ADD, SUB, MUL, DIV, REM, BAND, BOR, BXOR, LSHIFT and RSHIFT operator identities and borrowed left/right expression pointers. Unary adapters shall expose UPLUS, UMINUS and BNOT and a borrowed argument pointer. Cast adapters shall expose their borrowed argument pointer. A target used with the general linearize() template shall provide all adapters and operator names needed to instantiate its dispatch, even if a particular input uses fewer kinds.

    Nodes, children and target-specific payloads shall remain live, type-correct and unchanged throughout analysis. Argument pointers for an admitted operation shall be nonnull; the analyzed graph shall have no recursion cycle. The PPL common adapters shall not take ownership of target nodes or supply a runtime polymorphic deletion protocol. Target-owned storage and callbacks shall retain their own lifetime and synchronization prerequisites.

    RATIONALE:

    Explicit target adapters let an analyzer expose its own expression graph without copying it into a PPL-owned tree.

    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> class Concrete_Expression;
    template <typename Target> class Binary_Operator;
    template <typename Target> class Unary_Operator;
    template <typename Target> class Cast_Operator;
    template <typename Target> class Integer_Constant;
    template <typename Target> class Floating_Point_Constant;
    template <typename Target> class Approximable_Reference;
    typedef int Concrete_Expression_Kind;
    typedef int Concrete_Expression_BOP;
    typedef int Concrete_Expression_UOP;
    // Required target-provided member signatures, on their corresponding adapters:
    Concrete_Expression_Type type() const;
    Concrete_Expression_Kind kind() const;
    Concrete_Expression_BOP binary_operator() const;
    const Concrete_Expression<Target>* left_hand_side() const;
    const Concrete_Expression<Target>* right_hand_side() const;
    Concrete_Expression_UOP unary_operator() const;
    const Concrete_Expression<Target>* argument() const;
    
    VERIFICATION_CRITERIA:

    Instantiate a target with distinct nonconsecutive kind/operator codes, borrowed children and every required adapter; verify payload/type/child identities and valid analysis dispatch without assuming a particular host AST layout.

    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.

  • PPL-SPEC-000985
    5. Checked-kind concrete adapter access UID: PPL-SPEC-000985 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live well-formed target expression, is<Derived>() shall return true exactly when the target's current kind equals Derived<Target>::KIND. It shall not change the expression or acquire its ownership. The mutable and const as<Derived>() operations shall return pointers to the same actual derived node with the respective qualification. Their caller shall first establish a matching kind and correct actual inheritance/dynamic node type. A mismatched cast shall be outside the admitted interface; this shall not be a checked RTTI or allocating conversion.

    RATIONALE:

    Kind tests and borrowed static downcasts require consistent target tags and preserve node identity.

    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>
    template <template <typename T> class Derived>
    bool Concrete_Expression_Common<Target>::is() const;
    template <typename Target>
    template <template <typename T> class Derived>
    Derived<Target>* Concrete_Expression_Common<Target>::as();
    template <typename Target>
    template <template <typename T> class Derived>
    const Derived<Target>* Concrete_Expression_Common<Target>::as() const;
    
    VERIFICATION_CRITERIA:

    Check all kind-test combinations across six node categories and const/mutable casts of each matching actual type; compare exact original pointers and retain payloads/children.

    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.

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

  • 7. Oracle reference-to-coordinate associations UID: PPL-SPEC-000987 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    get_associated_dimensions() shall provide the possible coordinate identities denoted by an approximable reference. On true return, its output set shall contain every possible associated coordinate and shall not contain not_a_dimension(). An empty successful set shall remain distinguishable from a single identity and multiple possible identities; it shall not by itself authorize a numerical enclosure. On false return the set shall not establish a usable association. Returned coordinate identities shall remain consistent with coordinate-value queries and the affine store during the analysis call. The oracle shall not transfer ownership of the target reference or create a new coordinate merely by reporting its identity.

    RATIONALE:

    Symbolic reference identity and numerical value information are different queries; multiple aliases require conservative handling.

    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.

    virtual bool get_associated_dimensions(
      const Approximable_Reference<Target>& expression,
      std::set<dimension_type>& result) const = 0;
    
    VERIFICATION_CRITERIA:

    Check typed associations for empty/single/multiple coordinate sets, failure/retry and independent output ownership; verify linearization rejects unavailable/empty associations and conservatively handles multiple identities.

    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-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-000143
    3. Congruence creation from affine operand differences UID: PPL-SPEC-000143 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    create and operator%= shall construct modulus-one congruences relating their operand expressions. The satisfying condition shall be E(x) − F(x) ∈ ℤ; a scalar operand shall denote a constant. The result dimension shall be the maximum operand dimension, including trailing zero coordinates. Sources shall be preserved. create shall use the requested representation; operator%= shall use default_representation. Reversing operands shall preserve the satisfying set, without requiring the same coefficient signs. The recycle-input constructor shall transfer an expression's coefficient value and representation, use its nonnegative modulus argument's entry value, and leave the transferred expression valid and independently destructible. A modulus borrowed from that expression shall be admitted. Numerical prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    The congruence construction symbol creates a descriptor rather than assigning to the affine operand.

    INTERFACE:
    static Congruence Congruence::create(const Linear_Expression& e1,
      const Linear_Expression& e2, Representation r = default_representation);
    static Congruence Congruence::create(const Linear_Expression& e,
      Coefficient_traits::const_reference n, Representation r = default_representation);
    static Congruence Congruence::create(Coefficient_traits::const_reference n,
      const Linear_Expression& e, Representation r = default_representation);
    Congruence operator%=(const Linear_Expression& e1, const Linear_Expression& e2);
    Congruence operator%=(const Linear_Expression& e, Coefficient_traits::const_reference n);
    Congruence(Linear_Expression& le, Coefficient_traits::const_reference m, Recycle_Input);
    
    VERIFICATION_CRITERIA:

    Compare all create/operator forms with independent rational operand differences, unequal dimensions, constants and variable conversions. Check modulus one, selected/default representation and unchanged sources.

    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.

  • 6. Congruence dimensions and coefficient-coordinate transformations UID: PPL-SPEC-000146 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall return the expression dimension limit and space_dimension() the public ambient dimension. Dimension arguments and results shall lie within the limit. Dimensioned copies and set_space_dimension(n) shall retain the constant and lower-index coefficients, zero-extend new coordinates or discard removed trailing coefficients, while preserving modulus. Copies without explicit storage shall retain source storage.

    swap_space_dimensions shall exchange two in-dimension coefficients. permute_space_dimensions shall require distinct in-dimension variables and move each cycle coefficient to the following coordinate, wrapping the last to the first. Empty/singleton cycles shall preserve the value. shift_space_dimensions(v,n) shall require v.id() <= space_dimension(), insert n zero coefficients before that position and increase dimension by n. These transformations shall retain modulus, constant term and representation. Discarding coefficients shall not mean existential projection of the original solution set.

    RATIONALE:

    Descriptor coordinates transform coefficient positions, independently of the arithmetic progression selected by the modulus.

    INTERFACE:
    static dimension_type Congruence::max_space_dimension();
    dimension_type Congruence::space_dimension() const;
    Congruence(const Congruence& cg, dimension_type new_space_dimension);
    Congruence(const Congruence& cg, dimension_type new_space_dimension, Representation r);
    void Congruence::set_space_dimension(dimension_type n);
    void Congruence::swap_space_dimensions(Variable x, Variable y);
    void Congruence::permute_space_dimensions(const std::vector<Variable>& cycle);
    void Congruence::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Transform independent coefficient vectors and compare rational divisibility, including zero dimension, shrink/extend, nonzero discarded coefficients and front/interior/end insertion. Check constant, modulus and representation preservation.

    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-000147
    7. Borrowed congruence coefficients, modulus and expression view UID: PPL-SPEC-000147 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed coefficient and expression accessors shall require an lvalue receiver, with corresponding const && overloads deleted in every coefficient profile. Copying a borrowed expression view shall not extend the owning descriptor's lifetime.

    coefficient(v) shall return the indicated homogeneous coefficient when v.id() < space_dimension() and otherwise throw std::invalid_argument. inhomogeneous_term() and modulus() shall return the current constant and modulus. Configured reference returns shall borrow their owner until modification or destruction.

    expression() shall return a read-only borrowed adapter exposing the public affine expression with the same dimension, coefficients and constant. Uses covered here shall require the owner to remain alive and unchanged. Materializing the view as a Linear_Expression shall make an independent value. Queries shall preserve the congruence.

    RATIONALE:

    A congruence separates its affine expression from its modulus; neither returned view transfers ownership.

    INTERFACE:
    Coefficient_traits::const_reference Congruence::coefficient(Variable v) const &;
    Coefficient_traits::const_reference Congruence::inhomogeneous_term() const &;
    Coefficient_traits::const_reference Congruence::modulus() const;
    typedef Expression_Adapter_Transparent<Linear_Expression> Congruence::expr_type;
    Congruence::expr_type Congruence::expression() const &;
    
    VERIFICATION_CRITERIA:

    Check every exposed term, first/later rejected coordinates including dimension zero, copied borrowed values and independent materialized views after source mutation.

    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-000148
    8. Explicit modulus replacement and multiplicative modulus syntax UID: PPL-SPEC-000148 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For nonnegative m, set_modulus(m) shall replace only the modulus with its input entry value, admitting a borrowed coefficient from the same congruence. Zero shall select equality. It shall preserve dimension and representation.

    For coefficient factor k, operator/=(k) shall multiply the entry modulus by |k|, preserving all affine coefficients and return the target reference. The factor may reference the modulus or a coefficient in the same object; its entry value shall be used. Nonmutating operator/ shall apply that operation to an independent copy, preserving the source. Multiplication by zero shall yield modulus zero; an existing zero modulus shall remain zero for any factor. These operations shall not divide the coefficients. Every computed absolute value/product shall satisfy 🔗 1. Affine congruence meaning and valid numerical use's arithmetic prerequisites.

    RATIONALE:

    The slash notation selects or multiplies a modulus, rather than performing affine division. Entry-value rules make borrowed scalar inputs unambiguous.

    INTERFACE:
    void Congruence::set_modulus(Coefficient_traits::const_reference m);
    Congruence& Congruence::operator/=(Coefficient_traits::const_reference k);
    Congruence operator/(const Congruence& cg, Coefficient_traits::const_reference k);
    
    VERIFICATION_CRITERIA:

    Check zero/positive modulus replacement, positive/negative/zero factors, chained factors, equality preservation, source independence and return identity. Exercise modulus self-alias, expression-coefficient factors and borrowed constant replacement within representable ranges.

    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-000149
    9. Scaling expression and modulus together UID: PPL-SPEC-000149 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonnegative factor k, scale(k) shall multiply every homogeneous coefficient, the constant and modulus by the factor's entry value. Positive factors shall preserve the satisfying set. A zero factor shall produce the tautological equality with the same dimension. Dimension and representation shall be preserved.

    The factor shall not borrow a coefficient of the affine expression being modified. Borrowing the modulus shall be admitted and shall use its entry value consistently for expression and modulus. Arithmetic prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    Positive common scaling is a representation change; zero scaling deliberately collapses the condition to a tautology.

    INTERFACE:
    void Congruence::scale(Coefficient_traits::const_reference factor);
    
    VERIFICATION_CRITERIA:

    Compare all coefficient and modulus products independently for zero, one and larger positive factors. Check rational satisfaction preservation for positive factors, dimension retention for zero and self-modulus borrowing.

    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-000150
    10. Sign, constant-residue and common-factor normalization UID: PPL-SPEC-000150 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    sign_normalize() shall negate the affine expression exactly when its first nonzero homogeneous coefficient is negative, preserving modulus. An expression without nonzero homogeneous coefficients shall retain its sign. normalize() shall apply that sign rule, then, for positive modulus m, replace the constant with its unique residue in [0, m). Zero-modulus normalization shall not reduce the constant by a modulus.

    strong_normalize() shall additionally divide the expression and modulus by their nonnegative common greatest divisor when that divisor exceeds one. The zero expression with positive modulus shall reduce to modulus one. Each operation shall preserve the satisfying set, dimension and representation and shall be idempotent. They may change the affine expression value while preserving the modular relation. Arithmetic prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    Canonical residue and scale conventions concern congruence meaning, not preservation of the unqualified affine expression value.

    INTERFACE:
    void Congruence::sign_normalize();
    void Congruence::normalize();
    void Congruence::strong_normalize();
    
    VERIFICATION_CRITERIA:

    Check first-nonzero signs, constant-only inputs, negative constants, zero modulus, common factors and zero expressions. Derive residues/GCDs independently and compare rational satisfaction before/after each normalization, with repeated application.

    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-000151
    11. Congruence semantic equivalence UID: PPL-SPEC-000151 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Congruence operator== shall report whether equal-dimension operands admit the same rational valuations, independently of storage and equivalent common scales, signs or constant residues. Different public dimensions shall compare unequal. Tautologies of the same dimension shall compare equivalent, including zero-modulus and positive-modulus forms. The same shall hold for inconsistent congruences even when their moduli differ. operator!= shall negate that result. Both shall preserve operands. Arithmetic prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    Canonical coefficient comparison must still account for relations that denote the entire space or the empty set.

    INTERFACE:
    bool operator==(const Congruence& x, const Congruence& y);
    bool operator!=(const Congruence& x, const Congruence& y);
    
    VERIFICATION_CRITERIA:

    Check positive/common and negative expression scales, added modulus multiples in constants, non-equivalent periodic spacings, different dimensions and representations, and all constant tautology/inconsistency classes against independent rational predicates.

    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-000152
    12. Rational affine substitution preimage of a congruence UID: PPL-SPEC-000152 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an in-dimension variable v, an independent affine expression e of dimension at most the target dimension, and positive denominator q, affine_preimage(v,e,q) shall replace the congruence by the condition obtained by substituting xv = e(x) ⁄ q into its entry relation. The result shall retain the original public dimension and representation. If the entry coefficient of v is zero the congruence shall be unchanged. Otherwise its new modulus shall be qm; the new affine expression shall be q(E(x) − avvx) + ave(x). A bounded profile shall retain this storage formula whenever its completed values fit. If they do not fit, it may store an equivalent primitive row using a proper constant residue and positive common-factor cancellation, admitting only completed reduced values. The source expression shall be preserved. The denominator shall not borrow from the target's affine expression; borrowing its modulus shall be admitted using entry values. Arithmetic prerequisites in 🔗 1. Affine congruence meaning and valid numerical use shall apply.

    RATIONALE:

    Multiplying both substituted expression and modulus by the positive denominator represents rational substitution using integer coefficients.

    INTERFACE:
    void Congruence::affine_preimage(Variable v, const Linear_Expression& e,
                                   Coefficient_traits::const_reference denominator);
    
    VERIFICATION_CRITERIA:

    Evaluate the original congruence at independently substituted rational points and compare the result. Include zero/nonzero selected coefficients, source dimensions below/equal to target, constant/noninvertible substitutions, negative coefficients, equality/proper moduli and borrowed modulus denominator. Check the literal stored scale and signed constant for an admitted result with a nontrivial common factor, in both representations.

    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-000154
    14. Readable congruence and system output UID: PPL-SPEC-000154 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Congruence output shall print homogeneous terms in increasing variable order, using the active formatter in 🔗 7. Active Variable formatter and initialized thread state, followed by " = " and the negated constant. A zero homogeneous part shall print 0. A proper congruence shall append " (mod ", its positive modulus and ")"; an equality shall omit that suffix. Coefficient signs, unit magnitudes and * separators shall follow the affine output conventions in 🔗 14. Human-readable affine output and formatter dispatch.

    System output shall print its publicly iterated nontrivial rows after strong normalization of copies, separated by ", ", or true for an empty range. Operators shall return the supplied stream, add no newline and preserve their objects. print() shall use that output on std::cerr. Evaluated coefficient negations shall be representable in the selected profile.

    RATIONALE:

    Human-readable modular conditions use public coordinates and may normalize system-row copies without changing stored values.

    INTERFACE:
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Congruence& cg);
      std::ostream& operator<<(std::ostream& s, const Congruence_System& cgs);
    }
    void Congruence::print() const;
    void Congruence_System::print() const;
    
    VERIFICATION_CRITERIA:

    Check literal equality/proper displays, unit/nonunit signs, constants, custom variable formatting, system separators and empty output. Check stream identity, standard-error printing and unchanged source fields.

    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-000155
    15. Congruence and system invariant and memory queries UID: PPL-SPEC-000155 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() shall report the checked representation invariants of its congruence or system. Values produced by successful operations under the stated valid input and arithmetic conditions shall satisfy those invariants. For each type, total_memory_in_bytes() shall equal sizeof that type plus external_memory_in_bytes(). Queries shall preserve dimensions, coefficients, moduli and representation. Counts shall not promise allocator overhead, process memory consumption or a dense/sparse size ordering.

    RATIONALE:

    Storage diagnostics and ownership accounting do not determine satisfiability or process memory consumption.

    INTERFACE:
    bool Congruence::OK() const;
    memory_size_type Congruence::total_memory_in_bytes() const;
    memory_size_type Congruence::external_memory_in_bytes() const;
    bool Congruence_System::OK() const;
    memory_size_type Congruence_System::total_memory_in_bytes() const;
    memory_size_type Congruence_System::external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check valid constants, all modulus forms, copies/conversions and empty/mixed systems. Verify accounting identities and unchanged semantic fields without architecture-specific byte expectations.

    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-000159
    19. Filtered system iteration, emptiness and retained row counts UID: PPL-SPEC-000159 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    begin() and end() shall delimit retained nontautological rows. empty() shall report that this range is empty and shall not decide satisfiability of a nonempty conjunction. Exposed rows shall share the system's declared dimension. has_linear_equalities(), num_equalities() and num_proper_congruences() shall inspect/count retained stored rows, including tautologies omitted by public iteration.

    The forward iterator shall borrow its system, expose row references/pointers, and support copied or assigned independent positions. Prefix increment shall return the advanced iterator; postfix shall return its entry-position copy. Comparison shall require positions in the same unchanged system. Default iterators shall admit copying, assignment and destruction before being assigned a valid position. Mutation/destruction shall invalidate iterators and borrowed rows.

    RATIONALE:

    Public iteration suppresses tautologies, whereas retained row-kind counts describe stored rows rather than the mathematical rank or minimum description.

    INTERFACE:
    class Congruence_System::const_iterator;
    Congruence_System::const_iterator Congruence_System::begin() const;
    Congruence_System::const_iterator Congruence_System::end() const;
    bool Congruence_System::empty() const;
    bool Congruence_System::has_linear_equalities() const;
    dimension_type Congruence_System::num_equalities() const;
    dimension_type Congruence_System::num_proper_congruences() const;
    
    Congruence_System::const_iterator::const_iterator();
    Congruence_System::const_iterator::const_iterator(const const_iterator& y);
    Congruence_System::const_iterator::~const_iterator();
    Congruence_System::const_iterator& Congruence_System::const_iterator::operator=(const const_iterator& y);
    const Congruence& Congruence_System::const_iterator::operator*() const;
    const Congruence* Congruence_System::const_iterator::operator->() const;
    Congruence_System::const_iterator& Congruence_System::const_iterator::operator++();
    Congruence_System::const_iterator Congruence_System::const_iterator::operator++(int);
    bool Congruence_System::const_iterator::operator==(const const_iterator& y) const;
    bool Congruence_System::const_iterator::operator!=(const const_iterator& y) const;
    
    VERIFICATION_CRITERIA:

    Check empty, tautology-only, mixed and inconsistent systems; verify retained counts separately from public-range length. Exercise prefix/postfix, copied/default-assigned positions, borrowed pointer identity and shared row dimensions.

    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-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-000102
    2. Relational construction from affine operands UID: PPL-SPEC-000102 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The relational operators ==, >=, <=, > and < applied to affine operands shall construct constraints denoting those mathematical relations. They shall accept two expressions, two variables, or an expression and a coefficient in either order. Variables shall denote coordinate functions and coefficients shall denote constants. The result dimension shall be the maximum operand dimension, including unused trailing coordinates. Equality shall have type EQUALITY; the ordered operators shall select the corresponding strict or nonstrict inequality type. Operands shall be preserved. Results shall use Constraint::default_representation.

    Coefficient normalization may rescale the relation without changing its truth. For equalities and closed nonstrict inequalities produced directly by these operators, coefficients and the constant term shall have common divisor one unless all are zero. Equality's first nonzero homogeneous coefficient shall be positive; inequality orientation shall be preserved. These conventions shall not imply that every later strict constraint has a primitive exposed coefficient vector. The prerequisites of 🔗 1. Constraint relation meaning and numerical prerequisites shall apply.

    RATIONALE:

    Relational operators construct geometric descriptors; expression equality here does not return a boolean expression-value comparison.

    INTERFACE:

    For Linear_Expression operands e and f, Variable operands x and y, and Coefficient operand n, the following forms shall be admitted in a C++ function using PPL names:

    Constraint ee_equal(e == f), vv_equal(x == y), en_equal(e == n), ne_equal(n == e);
    Constraint ee_ge(e >= f), vv_ge(x >= y), en_ge(e >= n), ne_ge(n >= e);
    Constraint ee_le(e <= f), vv_le(x <= y), en_le(e <= n), ne_le(n <= e);
    Constraint ee_gt(e > f), vv_gt(x > y), en_gt(e > n), ne_gt(n > e);
    Constraint ee_lt(e < f), vv_lt(x < y), en_lt(e < n), ne_lt(n < e);
    
    VERIFICATION_CRITERIA:

    Compare all overloads with independently evaluated operand relations at rational points on and around boundaries. Include unequal dimensions in both orders, common coefficient factors, equal operands, constants of both signs and unchanged sources. Check relation type, declared dimensions and the stated normalization conventions.

    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.

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

  • 6. Constraint dimensions and explicit coordinate transformations UID: PPL-SPEC-000106 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall report the expression dimension limit and space_dimension() shall report the constraint's public ambient dimension. Dimension arguments and resulting dimensions shall not exceed that limit; all referenced existing coordinates shall lie within the current dimension.

    Dimensioned copy construction and set_space_dimension(n) shall retain coordinates below the lesser dimension and the constant term, insert zero coefficients on extension, and discard removed trailing coefficients on shrinking. Normalization may rescale retained coefficients without changing the transformed relation. Dimensioned copies without an explicit storage choice shall retain source representation. remove_space_dimensions(vars) shall discard selected coefficients, compact surviving coordinates in their original order, and return true. Removing none or all shall be admitted.

    swap_space_dimensions shall exchange the designated coefficients; permute_space_dimensions shall require a cycle of distinct coordinates and move each listed coefficient to the next listed coordinate, wrapping the last to the first. Cycles of fewer than two entries shall preserve the value. shift_space_dimensions(v,n) shall insert n zero coordinate coefficients before v.id(), where v.id() <= space_dimension(), shifting the suffix and increasing the public dimension by n. A zero shift shall preserve value. These operations shall preserve relation type and representation. They shall describe coefficient transformation rather than existential projection of satisfying points. Arithmetic prerequisites in 🔗 1. Constraint relation meaning and numerical prerequisites shall apply.

    RATIONALE:

    Descriptor coordinate removal substitutes zero for removed terms before reindexing; it does not eliminate variables existentially.

    INTERFACE:
    static dimension_type Constraint::max_space_dimension();
    dimension_type Constraint::space_dimension() const;
    Constraint(const Constraint& c, dimension_type space_dim);
    Constraint(const Constraint& c, dimension_type space_dim, Representation r);
    void Constraint::set_space_dimension(dimension_type n);
    bool Constraint::remove_space_dimensions(const Variables_Set& vars);
    void Constraint::swap_space_dimensions(Variable x, Variable y);
    void Constraint::permute_space_dimensions(const std::vector<Variable>& cycle);
    void Constraint::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Transform independent coefficient vectors and compare relation truth at rational valuations. Include strict constraints so hidden strictness storage cannot be exposed or lost; test shrinking, extending, empty/all removals, inverse swaps/cycles and insertion at front/interior/end.

    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-000107
    7. Constraint kind, coefficients and borrowed expression access UID: PPL-SPEC-000107 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed coefficient and expression accessors shall require an lvalue receiver, with corresponding const && overloads deleted in every coefficient profile. Copying a borrowed expression view shall not extend the owning descriptor's lifetime.

    type() and the four kind predicates shall identify equality, either inequality, nonstrict inequality and strict inequality exactly. coefficient(v) shall return the corresponding homogeneous coefficient when v.id() < space_dimension() and otherwise throw std::invalid_argument. inhomogeneous_term() shall return the public constant term. A configured reference return shall remain borrowed until modification or destruction of its owning constraint.

    expression() shall return a read-only borrowed adapter exposing precisely the affine expression in 🔗 1. Constraint relation meaning and numerical prerequisites, with the same public dimension, homogeneous coefficients and constant term and without a hidden strictness coordinate. The view shall require its owning constraint to remain alive and unchanged for the uses covered here. Materializing it as a Linear_Expression shall produce an independent value. Queries shall preserve their source.

    RATIONALE:

    Public affine coefficients have geometric meaning independently of internal representation columns.

    INTERFACE:
    Constraint::Type Constraint::type() const;
    bool Constraint::is_equality() const;
    bool Constraint::is_inequality() const;
    bool Constraint::is_nonstrict_inequality() const;
    bool Constraint::is_strict_inequality() const;
    Coefficient_traits::const_reference Constraint::coefficient(Variable v) const &;
    Coefficient_traits::const_reference Constraint::inhomogeneous_term() const &;
    typedef Expression_Hide_Last<Linear_Expression> Constraint::expr_type;
    Constraint::expr_type Constraint::expression() const &;
    
    VERIFICATION_CRITERIA:

    Check all type/predicate combinations and in-range coefficients for each relation type. Reject the first and a later out-of-range coordinate, including dimension zero. Copy each view to a standalone expression and verify dimensions/coefficients and independence after source mutation.

    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-000108
    8. Exact tautology and inconsistency classification UID: PPL-SPEC-000108 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_tautological() shall hold exactly when every rational valuation in the declared ambient dimension satisfies the constraint. is_inconsistent() shall hold exactly when none does. An expression with a nonzero public homogeneous coefficient shall satisfy neither predicate. For constant b, equality shall be tautological exactly at b = 0 and inconsistent otherwise; nonstrict inequality shall be tautological at b ≥ 0 and inconsistent at b < 0; strict inequality shall be tautological at b > 0 and inconsistent at b ≤ 0. These queries shall preserve the object.

    RATIONALE:

    A single affine relation can be classified completely from its coefficients; a system of nontrivial constraints requires separate satisfiability analysis.

    INTERFACE:
    bool Constraint::is_tautological() const;
    bool Constraint::is_inconsistent() const;
    
    VERIFICATION_CRITERIA:

    Exhaust constant signs for every relation type at zero and positive dimensions. Check nonconstant constraints with independent witnesses satisfying and violating the relation, including strict boundaries and both storage choices.

    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-000109
    9. Semantic equivalence and exact descriptor identity UID: PPL-SPEC-000109 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_equivalent_to(y) and constraint operator== shall report equality of the satisfying sets when the public dimensions agree, independently of storage and internal strictness topology. Different public dimensions shall compare nonequivalent. Tautologies of the same dimension shall be equivalent even if their types or constant forms differ; the same shall hold for inconsistent constraints. Nontrivial equivalence shall respect relation type, positive rescaling of inequalities, and arbitrary nonzero rescaling of equalities. Inequality expressions shall negate semantic equivalence.

    is_equal_to(y) shall report complete identity of the stored normalized descriptor, including internal topology, relation kind, coefficient sequence and dimension, independently of dense/sparse storage. A positive identity result shall imply semantic equivalence; a negative result shall not establish nonequivalence. Queries shall preserve operands. Numerical prerequisites in 🔗 1. Constraint relation meaning and numerical prerequisites shall apply.

    RATIONALE:

    Mathematical equivalence and stored identity support different client decisions, especially for strict constraints and constant relations.

    INTERFACE:
    bool Constraint::is_equivalent_to(const Constraint& y) const;
    bool Constraint::is_equal_to(const Constraint& y) const;
    bool operator==(const Constraint& x, const Constraint& 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 equivalent positive/negative equality scales, positive inequality scales, different relations and dimensions, cross-representation copies, all tautology/inconsistency forms and public nonstrict constraints obtained through NNC systems. Validate equivalence expectations with independent rational truth conditions, rather than using the query as its own oracle.

    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.

  • PPL-SPEC-000112
    12. Readable constraint and system output UID: PPL-SPEC-000112 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Constraint output shall print nonzero homogeneous terms in increasing coordinate order, followed by " = ", " >= " or " > " according to public type, and the negated inhomogeneous term. A zero homogeneous part shall print 0. Unit coefficient magnitudes shall omit the numeral and *; other magnitudes shall use *. Signs shall use a leading minus or the separators " + " and " - ". Coordinates shall use the active formatter in 🔗 7. Active Variable formatter and initialized thread state. Type output shall print EQUALITY, NONSTRICT_INEQUALITY or STRICT_INEQUALITY for the corresponding Constraint::Type value.

    System output shall print its publicly iterated constraints separated by ", ", or true when that range is empty. Output operators shall return the supplied stream, add no newline and preserve their objects. Each type's print() shall use that output on std::cerr. Formatting arithmetic shall require representability of all evaluated coefficient negations.

    RATIONALE:

    Human output describes public relations and hides internal strictness machinery, while each system uses its public iterator range.

    INTERFACE:
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Constraint& c);
      std::ostream& operator<<(std::ostream& s, const Constraint::Type& t);
      std::ostream& operator<<(std::ostream& s, const Constraint_System& cs);
    }
    void Constraint::print() const;
    void Constraint_System::print() const;
    
    VERIFICATION_CRITERIA:

    Check literal equality/nonstrict/strict displays with unit and nonunit coefficients, signs, zero homogeneous parts and custom coordinate names. Check exact type names, empty and multirow system separators, stream identity and redirected standard-error print output.

    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-000113
    13. Constraint and system invariants and memory accounting UID: PPL-SPEC-000113 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() on a constraint or system shall report the checked representation invariants. Values produced by successful operations under their preconditions shall satisfy those invariants. For each type, total_memory_in_bytes() shall equal sizeof that object's type plus external_memory_in_bytes(). Memory queries shall preserve relation meaning, dimensions and representation. Their counts shall not promise allocator overhead, process resident memory or a fixed ordering between sparse and dense storage.

    RATIONALE:

    Representation diagnostics and owned-storage accounting are available independently of geometric satisfiability.

    INTERFACE:
    bool Constraint::OK() const;
    memory_size_type Constraint::total_memory_in_bytes() const;
    memory_size_type Constraint::external_memory_in_bytes() const;
    bool Constraint_System::OK() const;
    memory_size_type Constraint_System::total_memory_in_bytes() const;
    memory_size_type Constraint_System::external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check invariants and accounting identities for constants, every relation kind, empty/singleton/mixed systems, copies and representation conversions. Confirm all semantic observations remain unchanged without imposing target-specific memory totals.

    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-000117
    17. System emptiness and retained constraint-kind queries UID: PPL-SPEC-000117 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    empty() shall return whether the public iterator range has no nontrivial constraints. Tautological stored rows shall be omitted from that range, so a system containing only tautologies shall be empty under this query. The query shall not determine whether a nonempty conjunction is satisfiable.

    has_equalities() shall report whether a retained stored row is an equality, including a tautological equality omitted by public iteration. has_strict_inequalities() shall report whether a retained row is a nontautological strict inequality; tautological strict rows and internal strictness bounds shall not make it true. These properties shall concern the retained descriptor representation and shall not claim a minimal equivalent system. Queries shall preserve conjunction and dimensions.

    RATIONALE:

    Container emptiness and stored relation kinds differ from the satisfiability of a conjunction, and public iteration deliberately omits tautologies.

    INTERFACE:
    bool Constraint_System::empty() const;
    bool Constraint_System::has_equalities() const;
    bool Constraint_System::has_strict_inequalities() const;
    
    VERIFICATION_CRITERIA:

    Check truly empty and tautology-only systems, tautological equality rows, strict tautologies, nontrivial strict rows and inconsistent rows. Use a contradictory pair of individually nontrivial inequalities to establish that nonempty is not a satisfiability decision.

    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-000118
    18. Read-only forward iteration over nontrivial constraints UID: PPL-SPEC-000118 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    begin() and end() shall delimit the system's retained, non-tautological constraints. Each exposed row shall have the system's declared public dimension. Iteration order shall not be a semantic ordering guarantee. Dereference and member selection at a non-end position shall borrow its constraint. Prefix increment shall advance and return the iterator; postfix increment shall return an independent copy of its entry position.

    Iterator copy construction and assignment shall preserve the borrowed system and position while allowing subsequent navigation of independent copies. Iterators shall be compared only within the same unchanged system. Default iterators shall admit copying, assignment and destruction; they shall not be dereferenced or advanced until assigned a valid position. Modification or destruction of the system shall invalidate its iterators and borrowed row references.

    RATIONALE:

    Read-only iteration exposes an equivalent conjunction while preserving ownership in the system and filtering tautologies.

    INTERFACE:
    typedef Constraint_System_const_iterator Constraint_System::const_iterator;
    Constraint_System::const_iterator Constraint_System::begin() const;
    Constraint_System::const_iterator Constraint_System::end() const;
    Constraint_System_const_iterator();
    Constraint_System_const_iterator(const Constraint_System_const_iterator& y);
    Constraint_System_const_iterator::~Constraint_System_const_iterator();
    Constraint_System_const_iterator&
    Constraint_System_const_iterator::operator=(const Constraint_System_const_iterator& y);
    const Constraint& Constraint_System_const_iterator::operator*() const;
    const Constraint* Constraint_System_const_iterator::operator->() const;
    Constraint_System_const_iterator& Constraint_System_const_iterator::operator++();
    Constraint_System_const_iterator Constraint_System_const_iterator::operator++(int);
    bool Constraint_System_const_iterator::operator==(const Constraint_System_const_iterator& y) const;
    bool Constraint_System_const_iterator::operator!=(const Constraint_System_const_iterator& y) const;
    
    VERIFICATION_CRITERIA:

    Check empty and tautology-filtered ranges and mixed relation kinds; compare the iterated conjunction with an independent oracle. Check copied/default-assigned positions, prefix return identity, postfix entry position, pointer/reference identity and row dimensions.

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

  • PPL-SPEC-000120
    20. Extracting equality constraints from a congruence system UID: PPL-SPEC-000120 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from a Congruence_System shall produce the conjunction of its zero-modulus equality rows converted according to 🔗 10. Conversion of equality congruences to constraints. Proper congruences shall be omitted rather than converted to equalities or used as periodic constraints. The result shall retain the congruence system's declared public dimension even when no equality survives, use the requested representation, and preserve its source. Arithmetic prerequisites in 🔗 1. Constraint relation meaning and numerical prerequisites shall apply.

    RATIONALE:

    The conversion extracts only the affine equality part of a congruence system; the result is not a representation of its periodic conditions.

    INTERFACE:
    explicit Constraint_System(const Congruence_System& cgs,
                               Representation r = default_representation);
    
    VERIFICATION_CRITERIA:

    Use mixed equality/proper-congruence systems, proper-only systems and empty systems with positive dimension. Compare the resulting equality conjunction independently over rational points, verify retained dimension/representation and unchanged source.

    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-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-001645
    1. Descriptor collection identity and affine comparison UID: PPL-SPEC-001645 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For live valid constraint systems or generator systems, free equality shall compare their retained internal row sequences under 🔗 22. Internal sequence equality and bookkeeping scope: ambient dimension, row count, pending boundary and corresponding row values shall agree. Storage representation, capacity and sorted certificates shall not affect the result. Inequality shall negate equality. These predicates shall preserve their operands. Equality shall not minimize, reorder, remove duplicate rows or decide geometric equivalence of the represented conjunctions or hulls. Row-empty systems shall follow the underlying dimension/boundary rule without an additional topology comparison.

    The free compare(x,y) for linear expressions shall forward the zero-extended affine ordering of 🔗 5. Backend equality, comparison and common-variable queries. It shall return -2 or 2 at the first differing homogeneous coefficient, -1 or 1 for a constant-only difference, and zero when all zero-extended coefficients agree. Equal affine values with different declared dimensions may therefore compare as zero. Initialization, coefficient arithmetic, lifetimes and synchronized access shall follow the selected descriptor or expression query.

    RATIONALE:

    Stored descriptor sequence identity and zero-extended affine ordering are useful implementation queries with meanings distinct from geometric set equivalence.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless stated otherwise.

    bool operator==(const Constraint_System&, const Constraint_System&);
    bool operator!=(const Constraint_System&, const Constraint_System&);
    bool operator==(const Generator_System&, const Generator_System&);
    bool operator!=(const Generator_System&, const Generator_System&);
    int compare(const Linear_Expression&, const Linear_Expression&);
    
    VERIFICATION_CRITERIA:

    Check copied and differently stored collections, differing dimensions, row order/count, duplicate rows and unchanged operands. Compare signed affine vectors, constant-only differences, unequal zero tails and both argument orders against literal expected return codes.

    SOURCE:

    src/Constraint_System_inlines.hh; src/Generator_System_inlines.hh; src/Linear_Expression_inlines.hh; tests/descriptorequalityspec1.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. Borrowed expression-view construction and one-level access UID: PPL-SPEC-001566 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Expression_Adapter<T> shall borrow a const reference to its raw_type. Construction from a temporary raw owner shall be rejected by deleted rvalue overloads, including the transparent and hiding adapters. Copies and temporary adapter values may query their still-live lvalue raw owner. The raw expression shall outlive the adapter and every borrowed iterator or coefficient reference. Copying an adapter shall retain that binding; destroying it shall not destroy or modify the raw expression. Changes to the live raw expression shall be visible on subsequent queries; previously obtained references and iterators retain the raw type's invalidation rules.

    inner() shall return the one-level T::const_reference view of the same raw expression. representation() shall report the raw representation. Expression_Adapter_Transparent<T> shall add no transformation to T's view. Construction and copying shall not copy coefficient storage.

    RATIONALE:

    Borrowed descriptor views must not be confused with independent expression values.

    INTERFACE:

    The templates belong to Parma_Polyhedra_Library. Their defining headers are Expression_Adapter_defs.hh, Expression_Hide_Inhomo_defs.hh and Expression_Hide_Last_defs.hh; each includes its inline implementation.

    template <typename T> class Expression_Adapter;
    template <typename T> class Expression_Adapter_Transparent;
    template <typename T> class Expression_Hide_Inhomo;
    template <typename T> class Expression_Hide_Last;
    // On Expression_Adapter<T>:
    inner_type inner() const;
    Representation representation() const;
    // Public adapter constructors:
    explicit Expression_Adapter_Transparent(const raw_type&);
    explicit Expression_Hide_Inhomo(const raw_type&);
    Expression_Hide_Last(const raw_type&, bool hide_last);
    // The corresponding const raw_type&& constructors are deleted.
    
    VERIFICATION_CRITERIA:

    Check rejection of temporary raw owners and admission of temporary views; check binding and one-level type/reference identities, copies and destruction; mutate coefficients, dimension and representation between queries without retaining invalidated positions. Confirm independent exported values remain unchanged.

    SOURCE:

    src/Expression_Adapter_defs.hh; src/Expression_Adapter_inlines.hh; src/Expression_Hide_Inhomo_defs.hh; src/Expression_Hide_Inhomo_inlines.hh; src/Expression_Hide_Last_defs.hh; src/Expression_Hide_Last_inlines.hh; tests/expressionadaptersspec1.cc; tests/expressionhideinhomo1.cc; tests/expressionhidelast1.cc.

  • 2. Expression-view coefficients, iterators and independent row export UID: PPL-SPEC-001567 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a view with visible dimension d and visible coefficient vector a = (a0, …, ad), inhomogeneous_term() and get(0) shall return a0; get(i) for 1 ≤ i ≤ d shall return ai. coefficient(Variable(k)) and get(Variable(k)) shall return ak + 1 for 0 ≤ k < d. These are borrowed const accesses. The transformations defining a and d are specified in 🔗 4. Expression view with a hidden inhomogeneous coefficient and 🔗 5. Expression view with an optional hidden final coordinate; a transparent view shall retain its inner view's coefficients and dimension.

    begin()/end() shall delimit the nonzero homogeneous coefficients in increasing variable order, excluding the constant and every hidden last coordinate. lower_bound(v) shall select the first such variable at least v, or end(); a one-past-visible-dimension variable is admitted. Mutations shall follow 🔗 1. Borrowed expression-view construction and one-level access.

    Each get_row(r) shall replace the dense or sparse output with an independent copy of all d + 1 visible coefficients, including zero slots. Altering that output shall not alter the raw expression, and later raw mutations shall not alter the output copy.

    RATIONALE:

    All consumers of a descriptor view need the same visible coefficient vector, including iterators and materialized copies.

    INTERFACE:

    The templates belong to Parma_Polyhedra_Library. Their defining headers are Expression_Adapter_defs.hh, Expression_Hide_Inhomo_defs.hh and Expression_Hide_Last_defs.hh; each includes its inline implementation.

    dimension_type space_dimension() const;
    Coefficient_traits::const_reference inhomogeneous_term() const;
    Coefficient_traits::const_reference coefficient(Variable) const;
    Coefficient_traits::const_reference get(dimension_type) const;
    Coefficient_traits::const_reference get(Variable) const;
    const_iterator begin() const;
    const_iterator end() const;
    const_iterator lower_bound(Variable) const;
    void get_row(Dense_Row&) const;
    void get_row(Sparse_Row&) const;
    
    VERIFICATION_CRITERIA:

    Compare all slots, ordered nonzero iteration and every lower bound with literal vectors in both representations, including constants, trailing zeros and a hidden nonzero final slot. Overwrite prepopulated rows of different sizes and mutate each copy independently.

    SOURCE:

    src/Expression_Adapter_defs.hh; src/Expression_Adapter_inlines.hh; src/Expression_Hide_Inhomo_defs.hh; src/Expression_Hide_Inhomo_inlines.hh; src/Expression_Hide_Last_defs.hh; src/Expression_Hide_Last_inlines.hh; tests/expressionadaptersspec1.cc; tests/expressionhideinhomo1.cc; tests/expressionhidelast1.cc.

  • 3. Expression-view predicates, coefficient ranges and support filtering UID: PPL-SPEC-001568 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    With the vector and dimension in 🔗 2. Expression-view coefficients, iterators and independent row export, is_zero() shall hold exactly when every visible coefficient is zero; all_homogeneous_terms_are_zero() shall ignore a0. For 0 ≤ s ≤ e ≤ d + 1, range queries shall use the half-open raw-slot range [s, e): all_zeroes shall test every slot; num_zeroes shall count zero slots; gcd shall return their nonnegative greatest common divisor, with zero for an empty or all-zero range. first_nonzero(s,e) and last_nonzero(s,e) shall return the least/greatest nonzero slot or e if none exists. No-argument last_nonzero() shall return the greatest nonzero slot, or zero if no such slot exists.

    all_zeroes(vars) shall test only the selected variable coefficients; all_zeroes_except(vars,s,e) shall test the range after excluding those variables, with slot zero never excluded by a variable set. has_a_free_dimension_helper(indices) shall remove precisely the selected raw slots whose visible coefficients are nonzero, inserting no new indices. Variable sets and raw indices shall be within the visible dimension.

    Full is_equal_to(y) shall require equal dimensions and equal visible coefficients. Range equality shall compare the selected slots; scaled equality shall test c1ai = c2bi for every selected slot. Both operands shall admit the selected range; an operand passed to an overload requiring conversion to raw_type shall support that conversion. Scaled products shall satisfy the configured coefficient arithmetic's representability preconditions. The coefficient prerequisites in 🔗 1. Affine value, numerical prerequisites and shared zero shall apply, including representability of the nonnegative gcd and of each scaled product when required by the configured arithmetic. Underlying numerical exceptions shall propagate without modifying the borrowed expression. Empty-range equality shall hold. have_a_common_variable(y,first,last) shall hold exactly when some variable in the valid half-open variable range has nonzero coefficients in both operands; constants shall be irrelevant.

    RATIONALE:

    Raw coefficient slots and variable identifiers have distinct meanings, and empty-range sentinels must remain consistent under adaptation.

    INTERFACE:

    The templates belong to Parma_Polyhedra_Library. Their defining headers are Expression_Adapter_defs.hh, Expression_Hide_Inhomo_defs.hh and Expression_Hide_Last_defs.hh; each includes its inline implementation.

    bool is_zero() const;
    bool all_homogeneous_terms_are_zero() const;
    bool all_zeroes(const Variables_Set&) 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 last_nonzero() const;
    dimension_type last_nonzero(dimension_type first, dimension_type last) const;
    dimension_type first_nonzero(dimension_type first, dimension_type last) const;
    bool all_zeroes_except(const Variables_Set&, dimension_type, dimension_type) const;
    void has_a_free_dimension_helper(std::set<dimension_type>&) const;
    template <typename E> bool is_equal_to(const E&) const;
    template <typename E>
    bool is_equal_to(const E&, dimension_type start, dimension_type end) const;
    template <typename E>
    bool is_equal_to(const E&, Coefficient_traits::const_reference c1,
                     Coefficient_traits::const_reference c2,
                     dimension_type start, dimension_type end) const;
    template <typename E>
    bool have_a_common_variable(const E&, Variable first, Variable last) const;
    
    VERIFICATION_CRITERIA:

    Use independent small integer vectors to enumerate every valid subrange, zero mask, support search and selected-index filter. Check equal and unequal dimensions, constants and scaled operands of both signs, zero multipliers, common-variable boundaries and both representations without coefficient overflow.

    SOURCE:

    src/Expression_Adapter_defs.hh; src/Expression_Adapter_inlines.hh; src/Expression_Hide_Inhomo_defs.hh; src/Expression_Hide_Inhomo_inlines.hh; src/Expression_Hide_Last_defs.hh; src/Expression_Hide_Last_inlines.hh; tests/expressionadaptersspec1.cc; tests/expressionhideinhomo1.cc; tests/expressionhidelast1.cc.

  • 4. Expression view with a hidden inhomogeneous coefficient UID: PPL-SPEC-001569 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Expression_Hide_Inhomo<T> shall preserve its inner view's dimension and homogeneous coefficients and expose zero as the inhomogeneous coefficient, even when the raw constant is nonzero. All queries and row exports in 🔗 2. Expression-view coefficients, iterators and independent row export and 🔗 3. Expression-view predicates, coefficient ranges and support filtering shall use this transformed vector. Hiding the constant shall neither alter it in the raw expression nor hide any homogeneous coefficient. In a composition, the transformation shall apply to the one-level inner view, retaining the same borrowed raw object.

    RATIONALE:

    Geometric generator numerators must omit divisors or other raw constant metadata from their affine expression views.

    INTERFACE:

    The templates belong to Parma_Polyhedra_Library. Their defining headers are Expression_Adapter_defs.hh, Expression_Hide_Inhomo_defs.hh and Expression_Hide_Last_defs.hh; each includes its inline implementation.

    template <typename T>
    class Expression_Hide_Inhomo;
    
    VERIFICATION_CRITERIA:

    Check constant-only, zero and mixed expressions, hidden nonzero constants, every range including or excluding slot zero, scaled comparison with nonzero other constants, selected index zero, exported rows and compositions with hidden-last views. Include live raw mutations.

    SOURCE:

    src/Expression_Adapter_defs.hh; src/Expression_Adapter_inlines.hh; src/Expression_Hide_Inhomo_defs.hh; src/Expression_Hide_Inhomo_inlines.hh; src/Expression_Hide_Last_defs.hh; src/Expression_Hide_Last_inlines.hh; tests/expressionadaptersspec1.cc; tests/expressionhideinhomo1.cc; tests/expressionhidelast1.cc.

  • 5. Expression view with an optional hidden final coordinate UID: PPL-SPEC-001570 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Expression_Hide_Last<T>(raw,false) shall preserve its inner view. With hide_last == true, the inner dimension shall remain positive for every operation, and the view shall expose dimension one less, omitting exactly the inner view's final homogeneous coefficient. The constant and preceding coefficients shall remain unchanged. All queries and row exports in 🔗 2. Expression-view coefficients, iterators and independent row export and 🔗 3. Expression-view predicates, coefficient ranges and support filtering shall use this prefix. The stored hiding choice shall remain fixed; the currently hidden coordinate shall follow the inner view's current dimension after a valid raw resize.

    compare(x,y) for two matching hidden-last adapter types shall compare their homogeneous coefficient sequences lexicographically in increasing variable order, treating missing trailing coefficients as zero. It shall return  − 2, zero or 2 according to the first unequal coefficient. Constants, hidden coefficients and trailing zero dimensions shall not affect this comparison. It shall neither mutate its operands nor compare affine constants.

    RATIONALE:

    Strictness and generator metadata occupy a raw final slot that must not become a public coordinate; homogeneous ordering is distinct from affine equality.

    INTERFACE:

    The templates belong to Parma_Polyhedra_Library. Their defining headers are Expression_Adapter_defs.hh, Expression_Hide_Inhomo_defs.hh and Expression_Hide_Last_defs.hh; each includes its inline implementation.

    template <typename T>
    class Expression_Hide_Last;
    template <typename T>
    int compare(const Expression_Hide_Last<T>&, const Expression_Hide_Last<T>&);
    
    VERIFICATION_CRITERIA:

    Compare hidden and transparent prefixes against literal vectors, including a single raw variable, zero visible support, nonzero hidden coefficients, growth and shrinkage. Check lexicographic signs for mismatched leading supports, unequal matching coefficients, unequal dimensions and ignored constants, in both representations.

    SOURCE:

    src/Expression_Adapter_defs.hh; src/Expression_Adapter_inlines.hh; src/Expression_Hide_Inhomo_defs.hh; src/Expression_Hide_Inhomo_inlines.hh; src/Expression_Hide_Last_defs.hh; src/Expression_Hide_Last_inlines.hh; tests/expressionadaptersspec1.cc; tests/expressionhideinhomo1.cc; tests/expressionhidelast1.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.

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

  • PPL-SPEC-001716
    1. Addition and subtraction of intervals admitting infinity points UID: PPL-SPEC-001716 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For extended-real entry sets X and Y, add_assign(x,y) and sub_assign(x,y) shall enclose the hull of all their defined extended-real sums and differences. Opposite infinities shall have no sum and equal infinities no difference; these undefined pairs shall contribute no value. With exact endpoint operations and supported membership the enclosure shall be exact. If there is no defined pair, the result shall be empty.

    A finite nonempty interval combined with an included infinity singleton shall give the corresponding signed infinity, reversing the right infinity for subtraction. Equal-sign infinity singleton sums and opposite-sign singleton differences shall retain the defined infinity. For rays, a finite extremum shall be attained exactly when its required source extrema are attained; a same-sign infinite sum shall be included if either operand can attain that infinity. Opposite outward rays shall retain every defined finite sum, independently of whether their infinite endpoints are included.

    Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.

    The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.

    RATIONALE:

    Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.

    INTERFACE:

    Public header: <ppl.hh>; Interval::add_assign and Interval::sub_assign for compatible extended-real interval operands.

    VERIFICATION_CRITERIA:

    Check finite/infinity singleton permutations, same/opposite infinity pairs, both open/closed finite ray endpoints, included/excluded infinite endpoints, opposite rays and each output alias. Derive expected sets from explicit extended-real pairs rather than applying ordinary-real contracts to infinity.

    SOURCE:

    src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.

  • 2. Sign-stable extended interval products and quotients UID: PPL-SPEC-001717 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For two nonempty extended-real intervals each wholly strictly positive or wholly strictly negative, mul_assign(x,y) and div_assign(x,y) shall enclose the interval hull of all defined extended-real products or quotients. A zero endpoint may be approached but shall not be included under this sign-stable contract. Infinity divided by infinity shall be undefined and contribute no value; finite values divided by an included infinity shall contribute zero. With exact admitted endpoint operations and supported membership, the resulting enclosure shall be exact for these sign-stable operands.

    The signs shall select the mathematical orientation of the result. An infinite product shall be included when an applicable infinite factor is included and a nonzero partner exists. A quotient's zero endpoint shall be included when a finite numerator can be divided by an included infinity; an infinite quotient shall be included when an included infinite numerator has a finite nonzero denominator. Endpoint limits alone shall not establish attainment. These rules shall allow zero and infinity inclusion to vary independently in a ray quotient.

    Intervals shall be initialized and valid over a common extended-real carrier whose numerical and information policies admit both actual infinity points and their exclusion. An excluded infinite endpoint shall denote an unbounded finite extent, not an included point. NaN shall not be an interval element. The receiving policy shall admit empty results and the required endpoint membership. Scalar kernels and every finite intermediate shall meet their range, policy, resource, canonical-rational, synchronization, temporary-storage and caller-owned FPU prerequisites. An inexact endpoint operation or an unsupported membership distinction may enlarge an image but shall not exclude defined results.

    The receiver may alias either interval operand, using both entry sets; distinct operands shall remain unchanged. Failures shall retain the scalar operation's guarantees without a universal rollback promise. Returned I_Result claims shall retain 🔗 1. Interval result possibilities and status-flag set operations. Ordinary-real intervals shall retain 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction.

    RATIONALE:

    Included infinity points affect defined arithmetic pairs and endpoint attainment differently from excluded unbounded finite limits.

    INTERFACE:

    Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for compatible, strictly one-sign extended intervals.

    VERIFICATION_CRITERIA:

    Cross positive/negative rays with bounded nonzero intervals and other rays. Vary finite endpoint openness and infinite endpoint inclusion independently. Compare literal expected sign-oriented sets, zero/infinity attainment and unchanged separate inputs. Exercise exact rational endpoints and admitted receiver aliases; retain zero-crossing divisor tests under their separate ordinary-interval abstraction contract.

    SOURCE:

    src/Interval_templates.hh; src/Interval_inlines.hh; tests/intervalinfinityarithmetic1.cc.

  • PPL-SPEC-001718
    3. Degenerate and singular extended interval products and quotients UID: PPL-SPEC-001718 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For initialized, valid intervals over a common extended-real carrier, mul_assign(x,y) and div_assign(x,y) shall enclose every defined extended-real product or quotient of their entry sets. NaN shall not be an interval element. Zero times infinity, infinity divided by infinity and division by zero shall be undefined and shall contribute no value. An empty operand shall yield an empty result.

    With exact admitted endpoint operations and supported membership, an infinity singleton multiplied by a finite interval shall yield empty if that interval contains only zero, the appropriately signed infinity if its nonzero elements have one sign, and the interval hull of both infinity points if both signs occur. An included zero shall contribute no extra product. Products of infinity singletons shall retain the product sign. An infinity singleton divided by a finite interval shall have the analogous sign-dependent image of its nonzero denominator elements. Dividing an infinity singleton by another infinity singleton or by a zero singleton shall yield empty. Dividing a nonempty finite interval by an included infinity singleton shall yield the zero singleton.

    For a finite strictly positive or strictly negative numerator interval and a one-sided finite denominator interval approaching zero, division shall enclose the correspondingly signed unbounded ray. An infinite bound that arises only as a limit shall be excluded when the receiving policy can express that distinction. For a denominator with both negative and positive finite elements, a conservative universe result shall be permitted, including when the exact quotient has disconnected pieces. When a nonempty finite numerator is divided by a denominator containing zero and values of both signs, the returned I_Result shall include I_SINGULARITIES under 🔗 1. Interval result possibilities and status-flag set operations. A singularity indication shall not assert that an undefined pair has a value.

    The source and receiving policies shall admit the required actual infinity points, empty results and finite scalar operations. An excluded infinite endpoint shall denote an unbounded finite extent. Numerical intermediates, resources, canonical-rational values, synchronization, shared temporaries and caller-owned FPU state shall meet the scalar kernels' prerequisites. Inexact arithmetic or an unsupported membership distinction may enlarge the result but shall not exclude defined values. Receiver aliases shall use both entry sets; distinct operands shall remain unchanged. Scalar failures shall retain their own guarantees without a universal rollback promise. Sign-stable cases shall retain 🔗 2. Sign-stable extended interval products and quotients, and ordinary-real interval division shall retain 🔗 4. Ordinary interval division and zero-divisor abstraction.

    RATIONALE:

    Infinity singletons, zero operands and zero-crossing divisors are outside the strictly one-sign operand domain and need explicit defined-pair and conservative-enclosure rules.

    INTERFACE:

    Public header: <ppl.hh>; Interval::mul_assign and Interval::div_assign for policies admitting actual infinity points.

    VERIFICATION_CRITERIA:

    Compare literal infinity, empty, zero, ray and universe results for both infinity signs and positive, negative, zero, mixed-sign and empty partners. Check finite division by an infinity singleton, infinity divided by infinity, one-sided zero limits and zero-crossing divisors. Repeat with open and closed endpoint policies and available native floating types. Check direct and supported aliased outputs, unchanged separate sources and singularity flags where specified.

    SOURCE:

    src/Interval_inlines.hh; src/Interval_templates.hh; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000920
    1. Infinity ordering and unordered scalar predicates UID: PPL-SPEC-000920 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The named Boolean comparisons in 🔗 1. Exact scalar sign and ordering and 🔗 2. Mixed finite floating and exact scalar ordering shall admit the supported infinity and quiet-NaN representations of their operand types and policies. Minus infinity shall be less than every finite value, which shall be less than plus infinity. Equal-sign infinities shall compare equal; opposite-sign infinities shall compare unequal. Finite values shall retain those existing exact comparison contracts, including mixed storage and signedness.

    Whenever either operand is NaN, equal, less_than, less_or_equal, greater_than and greater_or_equal shall return false; not_equal shall return true, including a NaN compared with itself. The corresponding six PPL operators shall have the same meanings when at least one operand is checked. This shall not redefine built-in operators between two raw native values.

    For operands that are finite or infinite, cmp shall return a negative, zero or positive int according to that extended ordering. sgn shall return -1 for minus infinity and 1 for plus infinity; finite results shall retain their existing contract. Neither ordered cmp nor sgn shall admit a NaN operand under this contract. No result-handler dispatch or constructor/operator/function rounding default shall be required.

    Special representations shall be admitted only under their configured native-format or checked-policy capabilities, following 🔗 1. Native floating-point NaN and infinity predicates, 🔗 1. Typed special-marker assignment to native integer storage, 🔗 2. Typed special-marker assignment to GMP integer and rational storage and 🔗 1. Checked special-marker construction and policy assignment. A reserved bit pattern shall retain its finite meaning in another policy that does not reserve it. Native floating sources shall require the corresponding configured support; NaN sources shall be quiet. Finite rational payloads shall remain canonical; admitted rational special payloads shall retain their separate representation contract. Objects may alias the same operand and shall remain live and unchanged throughout the query.

    Resource and synchronization prerequisites for finite comparisons shall retain 🔗 1. Exact scalar sign and ordering and 🔗 2. Mixed finite floating and exact scalar ordering. No library/thread initialization, coefficient-constant stage or FPU rounding setup shall be required. Queries shall preserve the hardware rounding direction; floating exception flags shall follow the selected native comparison operations.

    RATIONALE:

    Extended domain bounds need mathematical infinity ordering, while NaN must remain unordered rather than acquire an order from its storage encoding.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL instantiations for the admitted raw or checked scalar types X and Y:

    bool equal(const X& x, const Y& y);
    bool not_equal(const X& x, const Y& y);
    bool less_than(const X& x, const Y& y);
    bool less_or_equal(const X& x, const Y& y);
    bool greater_than(const X& x, const Y& y);
    bool greater_or_equal(const X& x, const Y& y);
    int cmp(const X& x, const Y& y);  // Non-NaN operands.
    int sgn(const X& x);             // Non-NaN operand.
    

    The operators ==, !=, <, <=, > and >= shall be admitted when at least one argument is checked.

    VERIFICATION_CRITERIA:

    Use an independent finite/infinity/unordered table across native and checked storage, same and mixed types, both operand orders and self aliases. Check all six predicates/operators, ordered cmp and infinite sgn, advertised special capabilities, different policy interpretations of identical stored patterns, exact return types, no handler/default dependency, unchanged source representations and hardware modes. Cover disabled floating support using the remaining admitted integral/GMP scope.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; src/checked_inlines.hh; src/checked_float_inlines.hh; tests/extendedorderingspec1.cc; tests/numericpublic1.cc.

  • 1. Finite native floating addition of an accumulated product UID: PPL-SPEC-000521 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The accumulator and both sources shall be live admitted same-format native or Checked_Number<F, Check_Overflow_Policy<F>> objects as in 🔗 4. Rounding, result classes and state for finite native binary arithmetic, with finite entry values z, a and b. add_mul_assign_r shall accumulate z + ab using the configured native multiply/add precision in 🔗 3. Configured native accumulation precision and truthful result relations. Its rounding request, result class/relation and hardware prerequisites shall follow 🔗 3. Configured native accumulation precision and truthful result relations. A directed result shall bound the exact real expression z + ab in the requested direction.

    The accumulator may alias either source and both sources may alias each other, including all three arguments sharing one object. The expression shall use entry values for every occurrence. Distinct source objects shall remain unchanged. No configured coefficient range or rational irrational-precision setting shall restrict the calculation. Object, resource, synchronization and initialization conditions shall follow 🔗 3. Configured native accumulation precision and truthful result relations.

    RATIONALE:

    Product accumulation needs entry-accumulator semantics and a bound on the complete real expression even when an available native implementation uses more than one rounding.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To, Left and Right types:

    Result add_mul_assign_r(To& to, const Left& x, const Right& y,
                            Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact dyadic rational expression oracles across source signs, cancellation, signed zeros, precision limits and subnormals. Cross all raw/checked forms and every accumulator/source alias whose entry values coincide. Check conservative directions, configured precision, statuses, source preservation and hardware state.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingaccumulationspec1.cc.

  • PPL-SPEC-000522
    2. Finite native floating subtraction of an accumulated product UID: PPL-SPEC-000522 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For finite accumulator and source entry values z, a and b and the types/preconditions in 🔗 1. Finite native floating addition of an accumulated product, sub_mul_assign_r shall accumulate z − ab using the configured native multiply/add precision and rounding protocol in 🔗 3. Configured native accumulation precision and truthful result relations. A directed result shall bound that exact real expression in the requested direction. Operand and accumulator aliases shall use their entry values, including all-three aliasing. Distinct sources shall remain unchanged; other prerequisites and preservation conditions shall follow 🔗 1. Finite native floating addition of an accumulated product.

    RATIONALE:

    Subtracting a product must reverse the product sign before applying the directed bound to the full accumulated expression.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To, Left and Right types:

    Result sub_mul_assign_r(To& to, const Left& x, const Right& y,
                            Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check independent exact expressions with both product signs, cancellation, zeros, subnormal and precision-boundary inputs. Include downward cases that distinguish negation after rounding from changing the fused operation, all admitted aliases, raw/checked forms and hardware preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingaccumulationspec1.cc.

  • 3. Configured native accumulation precision and truthful result relations UID: PPL-SPEC-000523 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For each supported native format, when the matching fast-FMA path is enabled by the configured PPL_HAVE_DECL_FMA* capability, native FP_FAST_FMA* macro and platform support, a product accumulation shall use one final rounding of the exact complete expression. Otherwise, evaluation may use either a single contracted operation rounded in the destination format F, or separate product and addition operations in the configured native evaluation format E. E shall contain the values of F and shall be established from the supported compiler/backend settings and floating-point control state. It may equal F. For an x87 evaluation path with a 64-bit significand precision control, E is the binary extended format with 64 significand bits and the x87 exponent range. An intermediate product may be narrowed to F for storage and then reloaded exactly into E. The final result shall be narrowed to F.

    Let rdT denote rounding to format T in direction d. For exact finite entry values z, a and b, a separate addition-of-product path shall therefore produce one of

    rdF(rdE(z + rdE(ab))) or rdF(rdE(z + rdF(rdE(ab)))).

    Only paths enabled by the configured compiler/backend and control state shall be admitted. Subtraction shall replace ab by  − ab before any product rounding. For directed requests, every arithmetic step and narrowing store shall preserve the requested bound: downward for ROUND_DOWN and upward for ROUND_UP. An implementation may equivalently negate an upward bound to obtain a downward bound, provided that rounding occurs before the final negation. Consequently, separate evaluation need not produce the closest F bound on the complete expression. No other conservative value shall be admitted solely because it bounds that expression.

    ROUND_IGNORE shall use the caller's hardware direction at each step. ROUND_NOT_NEEDED shall require every rounded step of the selected precision path to be exact and finite, and shall preserve the exact complete expression. ROUND_STRICT_RELATION shall not change value selection. Directed, strict or exactness requests shall require an upward native hardware direction; unflagged ROUND_IGNORE shall admit every supported hardware direction. Backend setup, floating-point exception and resource conditions, hardware preservation, live-object/synchronization requirements and initialization independence shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic.

    For a finite result, unflagged downward/upward/delegated requests may return V_GE/V_LE/V_LGE respectively. With strict relation requested and sufficient inexact information, a directed request shall distinguish equality from the corresponding strict inequality. A strict delegated result shall contain the actual comparison between the exact complete expression and the stored value; intermediate rounding flags shall not by themselves justify excluding equality. When the available information cannot establish a strict comparison, the returned weak relation shall retain every possible actual comparison. Exactness requests shall use the exactness result rules in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. Computed infinities shall carry their actual result class and relation, including an infinite directed bound caused by an intermediate overflow in a nonfused evaluation.

    Signed zeros shall follow the selected precision path. A zero product shall use the exclusive-or of the factor signs, inverted for subtraction. At a final addition, two zero summands of the same sign shall retain that sign; opposite signs or exact cancellation of nonzero summands shall produce negative zero only for downward evaluation. A nonzero exact value of a rounded step that underflows to zero shall retain its sign. In a separate evaluation, these addition rules shall use the evaluated and, if stored, narrowed product, including its zero sign, rather than the exact complete-expression sign.

    RATIONALE:

    Native multiply/add fusion, intermediate evaluation width and product storage are configuration dependent. Specifying their exact rounding paths preserves the permitted native implementation while excluding arbitrary conservative answers. Monotonicity of addition and directed rounding preserves the requested bound through each arithmetic and storage step; intermediate inexactness alone does not establish a strict comparison in every delegated mode.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To, Left and Right types:

    Result add_mul_assign_r(To& to, const Left& x, const Right& y,
                            Rounding_Dir dir);
    Result sub_mul_assign_r(To& to, const Left& x, const Right& y,
                            Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact dyadic complete-expression and format-rounding oracles under fused and supported nonfused paths. Establish evaluation format and control precision independently of the observed result. Cover both retained and storage-narrowed products, directed bounds, caller-mode delegation, nearest-even double-rounding separators, signed zero at every step, subnormal/overflow boundaries, exactness preconditions and truth of every returned relation. Include cancellation separating the extended, fused-F and staged-F results, and reject conservative values outside the specified paths. Capture native oracle inputs and outputs at their storage width. Assess all raw/checked instantiations, aliases and hardware preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingaccumulationspec1.cc.

  • 1. Finite native floating-point addition and subtraction UID: PPL-SPEC-000481 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted source/destination types and rounding requests in 🔗 4. Rounding, result classes and state for finite native binary arithmetic, add_assign_r(to, x, y, dir) shall compute the exact-real expression a + b and sub_assign_r the expression a − b, where a and b are the finite represented entry values of the two sources. The destination shall hold the rounded value and the returned Result shall describe it as specified there. Overflow into an infinite bound shall not introduce a bounded coefficient intermediate.

    For an exact zero sum, equal-sign zero operands shall retain their common sign. All other exact-zero sums, including cancellation of nonzero values, shall produce negative zero under downward evaluation and positive zero under upward, toward-zero or nearest-even evaluation. For subtraction this rule shall apply to the signs of x and the negation of y. A nonzero exact result rounded to zero shall retain that real result's sign.

    Source aliases, object validity, preservation, synchronization, backend setup, initialization independence and floating-point state prerequisites shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic.

    RATIONALE:

    Addition and subtraction supply native directed bounds while preserving cancellation and IEEE signed-zero distinctions needed by subsequent numerical operations.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for the admitted same-format To, Left and Right types:

    Result add_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    Result sub_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare exact dyadic sums and differences with independent rational oracles for all admitted raw/checked operand forms. Include cancellation, signed zeros, adjacent values, precision loss, subnormal boundaries and range-limit results. Check tight bounds, statuses, zero signs, aliases, distinct-source preservation and hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingarithmeticspec1.cc; tests/numericpublic1.cc.

  • 2. Finite native floating-point multiplication UID: PPL-SPEC-000482 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted source/destination types and rounding requests in 🔗 4. Rounding, result classes and state for finite native binary arithmetic, mul_assign_r(to, x, y, dir) shall compute the exact-real product ab of the finite represented source entry values. It shall assign the rounded product and return the Result specified there. A zero product, including one produced by underflow, shall have the exclusive-or of the source sign bits. This shall include both signs of zero, ordinary values, finite extrema and subnormals.

    No bounded coefficient intermediate shall limit the native format's range. Source aliases, object validity, preservation, synchronization, backend setup, initialization independence and floating-point state prerequisites shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic.

    RATIONALE:

    A native product must bound its exact represented operands through both precision loss and underflow. Its zero sign remains defined even when the exact nonzero product is too small for finite nonzero storage.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for the admitted same-format To, Left and Right types:

    Result mul_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent exact rational products across signs, signed zeros, significand boundaries, powers of two, subnormal/half-subnormal cases and finite range limits. Cross all admitted operand forms, check tight directed/delegated values, statuses, zero signs, aliases and state preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingarithmeticspec1.cc; tests/numericpublic1.cc.

  • 3. Finite native floating-point division by a nonzero value UID: PPL-SPEC-000483 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted source/destination types and rounding requests in 🔗 4. Rounding, result classes and state for finite native binary arithmetic, div_assign_r(to, x, y, dir) shall require a nonzero finite divisor and a finite numerator. It shall compute the exact-real quotient a ⁄ b from their represented entry values, assign its rounded value and return the Result specified there. A zero quotient, including one produced by underflow, shall have the exclusive-or of the source sign bits.

    The quotient may be nondyadic and shall not be described as exact merely because the division completed. No bounded coefficient intermediate shall limit the native format's range. Source aliases, object validity, preservation, synchronization, backend setup, initialization independence and floating-point state prerequisites shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic.

    RATIONALE:

    Finite division needs a nonzero-divisor precondition and a distinction between exact dyadic quotients and conservative bounds on nondyadic real quotients.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for the admitted same-format To, Left and Right types:

    Result div_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare quotients with exact rational oracles for signed ratios such as one- third, exact powers of two, signed-zero numerators, precision boundaries, subnormals, tiny nonzero divisors and finite range limits. Cross all admitted raw/checked forms and aliases, checking tight bounds, precision statuses, zero signs, source preservation and hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingarithmeticspec1.cc; tests/numericpublic1.cc.

  • 4. Rounding, result classes and state for finite native binary arithmetic UID: PPL-SPEC-000484 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The native storage format F shall be configured and supported as in 🔗 1. Supported exact integer and rational conversion to native floating storage. Each destination and source shall be F or Checked_Number<F, Check_Overflow_Policy<F>>, with the same format for all operands. Sources shall be finite and shall meet the particular operation's mathematical preconditions in 🔗 1. Finite native floating-point addition and subtraction, 🔗 2. Finite native floating-point multiplication or 🔗 3. Finite native floating-point division by a nonzero value. Let q be that operation's exact-real result.

    ROUND_DOWN shall assign the greatest native representable bound no greater than q, and ROUND_UP the least bound no less than it, including subnormal and infinite bounds. Without a strict flag it shall return the downward weak relation V_GE or upward V_LE. With ROUND_STRICT_RELATION and definite native inexact information, an exact result shall have relation VR_EQ, an inexact downward result VR_GT and an inexact upward result VR_LT. If native inexact information is unavailable, the corresponding weak relation shall be returned.

    ROUND_IGNORE shall evaluate using the current hardware direction, including nearest-even midpoint selection. An unflagged request shall have lazy relation VR_LGE. A strict delegated request with definite inexact information shall have VR_EQ for exactness and VR_NE for inexactness; unavailable information shall give VR_LGE. ROUND_NOT_NEEDED shall require q to be exactly representable as a finite value. It shall assign that exact value, return V_EQ in an assertion-enabled build and may return lazy V_LGE in a build defining NDEBUG. A strict no-rounding-needed request shall retain that precondition and return V_EQ.

    The returned class shall be VC_NORMAL for a finite computed value, VC_PLUS_INFINITY for positive infinity and VC_MINUS_INFINITY for negative infinity, combined with the corresponding relation. These native values shall be representable without V_UNREPRESENTABLE. For an exact real magnitude exceeding the finite maximum, inward directed evaluation shall return the signed finite endpoint and outward evaluation the corresponding infinity. Delegated range behavior shall follow the native hardware mode and nearest-overflow threshold in 🔗 6. Range limits in conversion of finite native scalars to floating point. A finite inward endpoint shall not promise an integer-overflow annotation.

    Directed, strict and no-rounding-needed requests shall require upward hardware rounding. An unflagged delegated request shall require no particular current direction. Calls shall preserve that direction; accrued exception flags shall be unspecified and floating-point exceptions shall be nontrapping. Native FPU backend setup shall follow 🔗 1. Directed native integral conversion to native floating-point storage. No library/thread initialization object shall be required on backends requiring no setup, and no coefficient-constant stage or shared numerical temporary pool shall be required.

    The destination shall be live and assignable. It may be either source; the sources may designate the same object; and storage may be shared through a checked object's raw-value reference. Results shall use both source entry values. Sources with storage distinct from the destination shall remain unchanged. Callers shall synchronize access against concurrent mutation. The _r interfaces shall return their results without policy-handler dispatch.

    RATIONALE:

    Native binary arithmetic needs one consistent meaning for rounded payloads, relation precision, result classes and the FPU environment. A correct mathematical bound does not excuse an incorrect annotation of an infinite computed value.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for the admitted same-format To, Left and Right types:

    Result add_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    Result sub_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    Result mul_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    Result div_assign_r(To& to, const Left& x, const Right& y,
                        Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Cross the binary operations and admitted raw/checked source/destination forms with exact rational value oracles. Check adjacent directed bounds, all hardware modes for unflagged delegation, nearest-even ties, weak/strict/unknown classifications, valid exactness requests, finite and infinite range results, signed zeros and source/destination aliases. Verify unchanged direction, no initialization-stage dependence on setup-free backends and compilation without unavailable native formats.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingarithmeticspec1.cc; tests/numericpublic1.cc.

  • 1. Native floating-point NaN and infinity predicates UID: PPL-SPEC-000321 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The admitted storage type F shall be a configured supported native float, double or long double as in 🔗 1. Supported exact integer and rational conversion to native floating storage. T shall be F itself or Checked_Number<F, P>, where P is Check_Overflow_Policy<F>, Checked_Number_Transparent_Policy<F> or Extended_Number_Policy. A source shall contain a finite value, either infinity or a quiet NaN of that native format.

    is_not_a_number(x) shall be true exactly for a NaN. is_minus_infinity(x) shall be true exactly for negative infinity, and is_plus_infinity(x) exactly for positive infinity. infinity_sign(x) shall return  − 1 for negative infinity, 1 for positive infinity and zero otherwise, including for a NaN and either signed zero. These queries shall not interpret a finite endpoint or a subnormal as an infinity.

    The source shall be live and shall remain unchanged, including its zero sign. Concurrent access shall be prevented while another operation modifies it. No library initialization object, thread initialization or coefficient constant stage shall be required. Floating-point exceptions shall be nontrapping. Calls shall require no particular hardware rounding direction and shall preserve that direction. Floating-point exception-status flags shall be unspecified. Unavailable native source formats shall not be instantiated.

    RATIONALE:

    Numeric clients must distinguish ordinary finite values from unordered values and signed infinities before choosing valid arithmetic operations.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted T:

    bool is_not_a_number(const T& x);
    bool is_minus_infinity(const T& x);
    bool is_plus_infinity(const T& x);
    int infinity_sign(const T& x);
    
    VERIFICATION_CRITERIA:

    For every configured format and admitted policy, independently construct finite signed extrema, subnormals, signed zeros, quiet NaNs of both signs and both infinities. Check exact Boolean/sign answers for raw and wrapped sources under every hardware rounding mode. Preserve sources and direction; compile unavailable-format configurations without their instantiations.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingclassificationspec1.cc; tests/numericpublic1.cc.

  • 2. Selective classification of native floating-point checked values UID: PPL-SPEC-000322 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Checked_Number<F, P> with the storage types, policies and source values in 🔗 1. Native floating-point NaN and infinity predicates, classify(nan, inf, sign) shall return the following Result, applying these rules in order:

    • For a NaN, if nan or sign is true, it shall return V_NAN.
    • If inf is true, a negative infinity shall return V_EQ_MINUS_INFINITY and a positive infinity V_EQ_PLUS_INFINITY.
    • If sign is true, a negative value shall return V_LT, a positive value V_GT and either signed zero V_EQ. This rule shall include infinities whose infinity classification was not requested.
    • Otherwise it shall return lazy V_LGE. This shall include a NaN when neither NaN nor sign classification was requested.

    The same requested-field rules shall apply to a custom policy providing the selected classification capabilities. A source shall not contain NaN when its policy has has_nan == false, nor infinity when it has has_infinity == false. Finite-only custom policies shall therefore admit every request mask on their valid finite sources.

    Omitting arguments shall request all three classifications. A normal V_LT or V_GT shall characterize the value's sign relative to zero; it shall not describe an arithmetic rounding error. The class and relation fields shall have the meanings in 🔗 1. Numerical result classes and relation meanings. Source validity, availability, synchronization, initialization independence and floating-point state conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates.

    RATIONALE:

    Selective classification permits a caller to request only the distinctions it needs while retaining the special unordered meaning of NaN when its sign is requested.

    INTERFACE:

    Public header: <ppl.hh>; member of the admitted Checked_Number<F, P>:

    Result classify(bool nan = true, bool inf = true,
                    bool sign = true) const;
    
    VERIFICATION_CRITERIA:

    Exhaust all eight Boolean request combinations against an independent decision table for each admitted policy and configured format. Check positive/negative finite values, both zeros, subnormals, both infinities and quiet NaNs, plus the default all-true request. Verify exact Result codes, source preservation and unchanged hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingclassificationspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000323
    3. Native floating-point extended integrality and quiet-NaN rejection UID: PPL-SPEC-000323 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted raw or checked source type in 🔗 1. Native floating-point NaN and infinity predicates, is_integer(x) shall return true exactly when the source's represented binary value is a finite integer or an admitted signed infinity. It shall return false for a quiet NaN. Either signed zero shall be integral. This is membership in the extended integral domain ℤ∪{ − ∞,  + ∞}; infinity shall not thereby be identified with a member of ℤ. A caller requiring ordinary integer membership shall additionally exclude both infinities. Every finite representable value with zero fractional part shall be integral even when its magnitude exceeds every configured bounded coefficient range.

    The result shall not depend on the current hardware rounding direction. Source validity, availability, preservation, synchronization, initialization independence and floating-point state conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates.

    RATIONALE:

    Finite integrality is a property of the exact represented value rather than a chosen rounding direction or coefficient width. Accepting the admitted infinities gives the predicate the same extended-domain convention across the numerical backends; a separate finiteness check distinguishes ordinary integer membership.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted T:

    bool is_integer(const T& x);
    
    VERIFICATION_CRITERIA:

    Compare finite sources with independent significand/power-of-two rational oracles. Include both zeros, signed proper fractions, halves, subnormals, precision boundaries and finite maxima, both admitted signed infinities and quiet NaNs. Require identical answers under every hardware direction for raw and checked values, preserving source and direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingclassificationspec1.cc; tests/numericpublic1.cc.

  • 4. Typed special-value assignment to native floating-point storage UID: PPL-SPEC-000324 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live assignable destination of an admitted raw or checked type in 🔗 1. Native floating-point NaN and infinity predicates, assign_r from Minus_Infinity shall store negative infinity and return V_EQ_MINUS_INFINITY. Assignment from Plus_Infinity shall store positive infinity and return V_EQ_PLUS_INFINITY. Assignment from Not_A_Number shall store a quiet NaN and return V_NAN. These results shall be representable and shall not carry V_UNREPRESENTABLE. The supplied marker shall remain unchanged.

    Infinity markers shall admit all four base directions in 🔗 4. Rounding-direction intent, composition and inspection, with or without ROUND_STRICT_RELATION. A NaN marker shall admit ROUND_DOWN, ROUND_UP and ROUND_IGNORE, with or without the strict flag. It shall not require an ordered NaN relation: V_NAN shall retain its empty relation. The _r interface shall return the result without policy-handler dispatch.

    Callers shall prevent concurrent destination access while another operation modifies it. Configured-format availability, initialization independence and floating-point state conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates. The value supplied on entry in the destination shall impose no numerical precondition on the replacement. The stored NaN's payload and sign shall be unspecified.

    RATIONALE:

    Typed markers let clients assign special values without depending on a native bit pattern or policy-specific sentinel representation.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted T and the three marker types Special:

    Result assign_r(T& to, const Special& marker, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Assign each marker to raw and admitted checked destinations for every valid direction/strict flag and hardware mode. Independently classify the stored values and signs with native facilities, require exact Result codes and representability, preserve marker and hardware direction, and replace previously finite, infinite and NaN destinations. Ensure result-returning NaN assignment does not dispatch a throwing extended-number policy.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingclassificationspec1.cc; tests/numericpublic1.cc.

  • 1. Supported exact integer and rational conversion to native floating storage UID: PPL-SPEC-000201 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For each of float, double and long double whose corresponding PPL_SUPPORTED_FLOAT, PPL_SUPPORTED_DOUBLE or PPL_SUPPORTED_LONG_DOUBLE is nonzero, assign_r shall admit finite mpz_class and canonical finite mpq_class sources. The configured native binary format shall determine precision and finite range; it shall not inherit a bounded global-coefficient limit. Rational canonical form shall follow 🔗 1. Exact rational assignment from rational and integral sources.

    When the source value is exactly representable as a finite destination value, the conversion shall assign that value and return V_EQ. This shall hold for all four base directions in 🔗 4. Rounding-direction intent, composition and inspection, with or without ROUND_STRICT_RELATION. Rational or integer zero shall produce a native zero; no distinct rational negative-zero value shall be implied.

    The native destination adapter shall use Check_Overflow_Policy<T>. The _r conversion shall return its Result without invoking a policy handler or automatically throwing a numeric overflow exception. Computed infinities shall be representable in these supported native formats, and the outcomes in 🔗 5. Floating conversion overflow thresholds and computed-value classes shall not carry V_UNREPRESENTABLE.

    The destination shall be a live assignable native object and the source shall remain unchanged. Callers shall prevent concurrent access to either object while another operation modifies it. No library initialization object, thread initialization or coefficient-constant stage shall be required. Configured native-format availability shall remain a prerequisite; a configuration disabling those supported types shall not promise these instantiations. For an available instantiation, conversion shall require no particular current FPU rounding direction and shall preserve that direction. Available resources shall limit temporary unbounded-integer computations.

    RATIONALE:

    An exact integer or rational conversion can construct a native binary value directly. Its correctness and relation need not depend on a host floating-point rounding mode or the global coefficient width.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for a configured supported native floating-point type T:

    Result assign_r(T& to, const mpz_class& from, Rounding_Dir dir);
    Result assign_r(T& to, const mpq_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check zero, both signs, exact significand powers of two, maximum finite values, minimum normal values and subnormal values for every supported destination type. Compare exact integer-significand/power-of-two values independently of decimal conversion, require V_EQ for all valid directions and strict flags, preserve sources and check every supported hardware rounding mode. Compile a configuration with FPU control disabled without instantiating unavailable floating-point conversions.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingconversionspec1.cc; tests/numericpublic1.cc.

  • 2. Directed conversion to adjacent finite normal floating-point bounds UID: PPL-SPEC-000202 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For source value a within the destination finite range, with |a| at least the smallest positive normal value and not exactly representable, base direction ROUND_DOWN shall assign the greatest representable destination value less than a; base direction ROUND_UP shall assign the least representable value greater than a. The destination types, sources and object prerequisites shall follow 🔗 1. Supported exact integer and rational conversion to native floating storage.

    The downward call shall return V_GT and the upward call shall return V_LT. These shall be definite exact-to-computed relations as defined by 🔗 1. Numerical result classes and relation meanings, whether or not the request carries ROUND_STRICT_RELATION. Both bounds shall be finite and adjacent in the native value set. A source halfway between adjacent values shall follow the specified bound direction; no nearest-even tie rule shall replace it. Exact representable values shall instead follow 🔗 1. Supported exact integer and rational conversion to native floating storage.

    RATIONALE:

    A directed conversion selects an adjacent representable bound. Halfway inputs distinguish that obligation from nearest rounding, and an unbounded source can expose lost low significand bits precisely.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for a configured supported native floating-point type T:

    Result assign_r(T& to, const mpz_class& from, Rounding_Dir dir);
    Result assign_r(T& to, const mpq_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Construct exact rational quarter, half and three-quarter points between independently established adjacent native values, including either sign, binade boundaries and the largest finite pair. Check the two exact endpoint values and strict Result codes. Include integer halfway values just beyond the exact-integer precision threshold through both mpz and mpq source paths, without overflowing native oracle arithmetic.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingconversionspec1.cc; tests/numericpublic1.cc.

  • 3. Directed conversion in the subnormal and underflow range UID: PPL-SPEC-000203 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Let δ be the smallest positive representable native subnormal value and let N be the smallest positive normal value. For a finite rational source with 0 < |a| < N, ROUND_DOWN shall assign the greatest native value not exceeding a, and ROUND_UP the least native value not less than a. Zero and every supported subnormal value shall be included when selecting these bounds. Source, destination and lifetime prerequisites shall follow 🔗 1. Supported exact integer and rational conversion to native floating storage.

    An exactly representable subnormal shall return V_EQ. Otherwise the downward result shall return V_GT and the upward result V_LT, with or without a strict-relation flag. In particular, 0 < a < δ shall yield zero downward and δ upward;  − δ < a < 0 shall yield  − δ downward and zero upward. No sign-bit value shall be prescribed for a computed zero. The results shall be normal-class numerical bounds with no unrepresentable-storage flag.

    RATIONALE:

    Underflow must retain an outward bound even when a nonzero rational is smaller than every native nonzero value. Treating these cases as unconditional zero would lose the requested direction.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for a configured supported native floating-point type T:

    Result assign_r(T& to, const mpz_class& from, Rounding_Dir dir);
    Result assign_r(T& to, const mpq_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact minimum and larger subnormals, fractions below the minimum, their signs, subnormal halfway points, and the pair straddling the largest subnormal and smallest normal value. Establish rational values with integer powers of two and independently compare the returned zero/subnormal endpoints, exact or strict relations and storage flags under all hardware rounding states.

    SOURCE:

    tests/floatrepresentationsspec1.cc; src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingconversionspec1.cc.

  • 4. Delegated and exactness requests for floating-point conversion UID: PPL-SPEC-000204 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite source within the destination finite range, ROUND_IGNORE shall select the representable value obtained by rounding toward zero. An exact representable source shall return V_EQ. A positive inexact source shall return V_GT and a negative inexact source shall return V_LT. Adding ROUND_STRICT_RELATION shall preserve these definite relations. Destination types, source validity and object prerequisites shall follow 🔗 1. Supported exact integer and rational conversion to native floating storage.

    ROUND_NOT_NEEDED shall require an exact source value representable as a finite destination value. With or without the strict flag, it shall assign that value and return V_EQ in assertion and nonassertion builds. Delegated requests outside the finite range shall follow 🔗 5. Floating conversion overflow thresholds and computed-value classes. These software conversions shall not infer their result from the hardware inexact flag or modify the current hardware rounding direction.

    RATIONALE:

    Delegation does not imply nearest rounding. For these integer-based conversions the toward-zero construction and exact remainder determine a definite relation without hardware inexact-state ownership.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for a configured supported native floating-point type T:

    Result assign_r(T& to, const mpz_class& from, Rounding_Dir dir);
    Result assign_r(T& to, const mpq_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check positive and negative nonrepresentable rational values under ignore requests with and without strict relation, including subnormal and precision-boundary cases. Require toward-zero values and definite classifications. Exercise exact normal, subnormal, zero and endpoint values under both forms of no-rounding-needed request in both build modes.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingconversionspec1.cc.

  • 5. Floating conversion overflow thresholds and computed-value classes UID: PPL-SPEC-000205 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported destination type in 🔗 1. Supported exact integer and rational conversion to native floating storage, let p be its binary precision, emax its max_exponent, H = 2emax and M = (2p − 1)2emax − p, its largest finite value. Each source shall be a finite integer or canonical rational and satisfy the object prerequisites of 🔗 1. Supported exact integer and rational conversion to native floating storage. An optional strict-relation flag shall not change the following outcomes.

    For M < a < H, ROUND_DOWN and ROUND_IGNORE shall assign M and return V_GT. ROUND_UP shall assign positive infinity and return V_LT_PLUS_INFINITY. For  − H < a <  − M, ROUND_UP and ROUND_IGNORE shall assign  − M and return V_LT; ROUND_DOWN shall assign negative infinity and return V_GT_MINUS_INFINITY. Computed infinity shall carry its corresponding infinity class, including when obtained by stepping past a finite endpoint.

    For a ≥ H, ROUND_DOWN shall assign M and return V_GT_SUP; ROUND_UP and ROUND_IGNORE shall assign positive infinity and return V_LT_PLUS_INFINITY. For a ≤  − H, ROUND_UP shall assign  − M and return V_LT_INF; ROUND_DOWN and ROUND_IGNORE shall assign negative infinity and return V_GT_MINUS_INFINITY.

    These numeric range outcomes shall be returned directly, without policy exception dispatch, and shall leave the destination usable. The native infinities shall be representable, so V_UNREPRESENTABLE shall be absent. ROUND_NOT_NEEDED shall exclude these out-of-range sources.

    RATIONALE:

    A finite inward rounding immediately beyond the endpoint differs from clamping a value whose unrestricted-exponent rounded result is itself outside the finite format. In every case the reported class must agree with a computed infinite bound.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for a configured supported native floating-point type T:

    Result assign_r(T& to, const mpz_class& from, Rounding_Dir dir);
    Result assign_r(T& to, const mpq_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check integer and rational sources just beyond both finite endpoints, H and its negative, and larger magnitude values. Require inward endpoint values, outward infinity signs and exact Result classes/flags for every admitted direction. Check both signs and source paths around the finite-to-infinity successor/predecessor transition, then reassign destinations and preserve sources.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingconversionspec1.cc.

  • 1. Finite native addition and subtraction of a power of two UID: PPL-SPEC-000504 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination shall have the admitted same-format native or Checked_Number<F, Check_Overflow_Policy<F>> types in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The source shall be finite with represented value a. The exponent e shall be less than CHAR_BIT * sizeof(unsigned long long), and 2e shall be exactly representable and finite in F.

    add_2exp_assign_r shall compute a + 2e and sub_2exp_assign_r shall compute a − 2e. They shall assign the corresponding rounded value and return the result class/relation in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The power-of-two operand shall introduce no intermediate conversion error. Zero-result signs shall follow the addition/subtraction rules in 🔗 1. Finite native floating-point addition and subtraction with a positive second operand 2e.

    Source/destination aliases, source preservation, object validity, synchronization, direction and exactness prerequisites, native backend setup, initialization independence and floating-point exception conditions shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic. Neither the source value nor the exponent shall be converted through the configured coefficient type.

    RATIONALE:

    Adding an exactly represented power of two avoids an unintended source-constant approximation while retaining the ordinary native rounding and range rules.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To and From types:

    Result add_2exp_assign_r(To& to, const From& from,
                               unsigned exp, Rounding_Dir dir);
    Result sub_2exp_assign_r(To& to, const From& from,
                               unsigned exp, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exponent zero, significand-neighbor exponents and the largest admitted exponent with exact integer/dyadic rational oracles. Include cancellation to signed zero, subnormals, precision-loss cases and finite range endpoints. Cross raw/checked forms, directed/delegated/strict statuses, nearest-even selection, aliases and hardware-state preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingdyadicspec1.cc.

  • PPL-SPEC-000505
    2. Finite native multiplication and division by a power of two UID: PPL-SPEC-000505 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the source/destination types, finite source value a and exponent preconditions in 🔗 1. Finite native addition and subtraction of a power of two, mul_2exp_assign_r shall compute a2e and div_2exp_assign_r shall compute a ⁄ 2e. They shall assign the rounded value and return the result class/relation in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The positive power-of-two operand shall be exact and nonzero. A zero result, including one caused by underflow, shall retain the source sign.

    A power-of-two scale shall not promise exactness when exponent-range or subnormal precision limits require approximation. Exponent zero shall preserve the represented source value; its status precision shall still follow the native binary arithmetic protocol. Source aliases, source preservation, object validity, synchronization, direction and exactness prerequisites, native backend setup, initialization independence and floating-point exception conditions shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic. No bounded coefficient intermediate shall limit the native format's value range.

    RATIONALE:

    Binary scaling is exact while the shifted significand fits the destination format, but underflow and range crossings still require explicit conservative outcomes.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To and From types:

    Result mul_2exp_assign_r(To& to, const From& from,
                               unsigned exp, Rounding_Dir dir);
    Result div_2exp_assign_r(To& to, const From& from,
                               unsigned exp, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact dyadic scaling oracles at exponent zero, precision boundaries and the largest admitted exponent. Exercise exact powers, signed zeros, normal/subnormal transitions, half-subnormal underflow, large finite magnitudes and inward range endpoints for raw/checked forms. Check tight rounded values, weak/strict/delegated statuses, aliases, source preservation and hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingdyadicspec1.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-001014
    3. Finite floating-format value inclusion UID: PPL-SPEC-001014 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the seven named floating-format identifiers, is_less_precise_than(first, second) shall return false exactly when every finite mathematical value representable in second is also representable in first. It shall compare modeled value sets, including precision and exponent/subnormal range, independently of the analyzer's native formats. Equal formats shall return false. Incomparable value sets shall return true in both directions; the predicate shall not establish a total ranking. Distinctions between signed zeros or special NaN/infinity encodings shall not alter this finite mathematical-value relation.

    The query shall require no PPL initialization, FPU setup or native floating-point availability. Arguments shall be the seven named identifiers specified by 🔗 2. Modeled floating-point format identity.

    RATIONALE:

    A cast can omit extra rounding only when finite source values fit the destination value set; a single precision number is insufficient for incomparable formats.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library. Member excerpts apply to the indicated class templates.

    bool is_less_precise_than(Floating_Point_Format first,
                              Floating_Point_Format second);
    
    VERIFICATION_CRITERIA:

    Check every one of the 49 ordered pairs against independently characterized binade ranges and dyadic coefficient grids, including both incomparable IEEE/IBM pairs, in native and no-native-FP configurations without initialization.

    SOURCE:

    src/Float_defs.hh; src/Float_inlines.hh; tests/floatingformatsspec1.cc; tests/float1.cc; tests/ownedexpressionpublic1.cc.

  • 1. Truncated native floating quotient before storage rounding UID: PPL-SPEC-000506 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination types shall be the admitted same-format native or Checked_Number<F, Check_Overflow_Policy<F>> types in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. Both sources shall be finite, with represented values a and b, and b ≠ 0. Let n = trunc(a ⁄ b), where truncation is toward zero in exact real arithmetic. idiv_assign_r shall round and store n in F; it shall not substitute truncation of an already rounded real quotient.

    ROUND_DOWN shall select the greatest representable value not exceeding n; ROUND_UP shall select the least representable value not less than n, with admitted infinite endpoints as in 🔗 5. Floating conversion overflow thresholds and computed-value classes. For n in the finite native range, ROUND_IGNORE shall round n toward zero, independently of the caller's hardware direction. Outside that range, it shall follow the explicit delegated overflow value-selection rules in 🔗 5. Floating conversion overflow thresholds and computed-value classes, including their signed infinite endpoints. ROUND_NOT_NEEDED shall require n to be finite and exactly representable in F. Adding ROUND_STRICT_RELATION shall retain the same value-selection rules. For a finite result, the returned relation shall be V_EQ, V_GT or V_LT according as n is equal to, greater than or less than the stored value. Infinite endpoints shall carry their actual result class and relation: positive infinity shall return V_LT_PLUS_INFINITY and negative infinity shall return V_GT_MINUS_INFINITY, also for nonstrict requests. A zero result shall have the exclusive-or of the source signs.

    The native hardware direction shall be upward, except that an exactly representable integral real quotient a ⁄ b shall require no particular hardware direction. The operation shall preserve the hardware direction. Native backend setup, live-object and source/destination alias rules, exception conditions and initialization independence shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The operands may alias each other. Distinct source objects shall remain unchanged. Resources for exact integer/rational temporaries shall be available, and their temporary pools shall be serialized in a build without thread-safe support. Neither the configured coefficient range nor irrational-precision settings shall restrict the quotient.

    RATIONALE:

    Truncating an approximate real quotient can cross an integer boundary. The integer quotient must be established before any unavoidable destination precision loss, including when the mathematical quotient exceeds the native format's consecutive-integer range.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To, Left and Right types:

    Result idiv_assign_r(To& to, const Left& left, const Right& right,
                         Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact dyadic source extraction and an independent integer quotient oracle. Check all source signs, signed zero, rounded quotients adjacent to integer boundaries, consecutive-integer precision limits, exact large quotients and inexact large integer storage. Exercise direct, strict, delegated and admitted exactness requests, finite/infinite range endpoints, raw/checked combinations, operand and destination aliases, source preservation and hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingresiduesspec1.cc.

  • 2. Exact truncating remainder of finite native floating values UID: PPL-SPEC-000507 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the finite same-format source/destination types and nonzero divisor in 🔗 1. Truncated native floating quotient before storage rounding, rem_assign_r shall assign exactly r = a − trunc(a ⁄ b)b. It shall satisfy |r| < |b|; a nonzero remainder shall have the sign of a and a zero remainder shall retain the first source's sign. The reconstruction identity shall use the mathematical truncated quotient, even when that integer is not exactly representable in F.

    All four valid rounding directions, with or without ROUND_STRICT_RELATION, shall return V_EQ and the same exact value. No particular hardware direction or inexact-flag support shall be required; the hardware direction shall remain unchanged. Native backend availability, object validity, source/destination and source/source aliases, source preservation, initialization independence and exception conditions shall follow 🔗 1. Truncated native floating quotient before storage rounding, without its upward-direction or exact-temporary resource prerequisites. No irrational-precision setting or coefficient range shall affect the remainder.

    RATIONALE:

    Finite binary floating values admit an exact truncating remainder even when their integer quotient is too large to store exactly in the same format. Explicit signs and reconstruction semantics distinguish this operation from nearest-integer remainder conventions.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To, Left and Right types:

    Result rem_assign_r(To& to, const Left& left, const Right& right,
                        Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare with exact dyadic dividend reconstruction for every source sign combination, exact and inexact division, signed zero, subnormal operands and extreme quotient magnitudes. Exercise all eight requests under every available hardware direction, raw/checked forms, all admitted aliases and exact result classification without relying on the native quotient operation as the oracle.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingresiduesspec1.cc.

  • 3. Exact centered native residue modulo a power of two UID: PPL-SPEC-000508 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source/destination types shall be as in 🔗 1. Finite native addition and subtraction of a power of two, with finite source value a and an admitted exponent e; let m = 2e. smod_2exp_assign_r shall assign the unique value s ∈ [ − m ⁄ 2, m ⁄ 2) congruent to a modulo an integer multiple of m. This residue shall be exactly representable in F. If it is zero, its native sign shall equal the source's sign. In particular the positive half-modulus shall map to the negative half-modulus.

    The result shall be V_EQ for every valid rounding request, including ordinary, strict and exactness requests. This exact relation shall not depend on native inexact-information availability or preexisting exception flags. The truncating remainder is exact, and either centering correction subtracts two representable magnitudes within a factor of two. Thus cancellation is exact and no rounded arithmetic protocol or inexact-status query is needed.

    No particular hardware direction shall be required for these exact calculations. The operation shall preserve the hardware direction. Native backend setup, object validity, synchronization, destination/source aliases, source preservation, initialization independence and floating-point exception conditions shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic. No bounded coefficient intermediate or irrational-precision setting shall limit the result.

    RATIONALE:

    Centered modular reduction needs a precise choice at the half-modulus boundary. The power-of-two modulus and exact cancellation permit the centered residue without approximation, including for nonintegral native inputs.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To and From types:

    Result smod_2exp_assign_r(To& to, const From& from, unsigned exp,
                              Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact rational modular reduction at zero, both half-modulus boundaries and their immediate neighbors, exact modulus multiples, subnormals and large magnitudes. Cover both adjustment branches and the unadjusted branch, exponent limits, all available hardware directions, relation precision, exactness requests, signed zeros and raw/checked aliases.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingresiduesspec1.cc.

  • 4. Rounded nonnegative native residue modulo a power of two UID: PPL-SPEC-000509 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the source/destination types, finite source value a and admitted power-of-two modulus m in 🔗 3. Exact centered native residue modulo a power of two, umod_2exp_assign_r shall compute the unique mathematical residue u ∈ [0, m) congruent to a modulo an integer multiple of m. Let r = a − trunc(a ⁄ m)m.

    When r ≥ 0, the operation shall store r exactly and return V_EQ for every valid request, without a hardware-direction prerequisite. When r < 0, it shall round and store r + m using the value, relation-precision, hardware-direction and exactness rules for native addition in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The returned relation shall compare the exact mathematical u with the stored value. A directed upward or delegated bound may equal m when u is not representable; the rounded value shall not be reduced again. ROUND_NOT_NEEDED shall require u to be exactly representable. If the mathematical residue is zero, the stored zero shall retain the source sign.

    The operation shall preserve the hardware direction. Backend setup, live objects, synchronization, aliases, source preservation, initialization independence and floating-point exception conditions shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic. No coefficient-range limit or irrational-precision setting shall restrict the calculation.

    RATIONALE:

    For a negative tiny source, the nonnegative residue can lie immediately below the modulus without being representable. Directed rounding must bound that mathematical residue and may therefore reach the modulus itself.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted same-format To and From types:

    Result umod_2exp_assign_r(To& to, const From& from, unsigned exp,
                              Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare with independent exact rational residues for both source signs, modulus multiples, half-modulus neighbors, negative subnormals and very large inputs. Check directed and delegated endpoint selection, strict and weak relations, admitted exactness requests, exponent limits, signed zeros, source/destination aliases, raw/checked forms and hardware preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingresiduesspec1.cc.

  • 1. Supported finite native floating-to-integral scalar conversion UID: PPL-SPEC-000241 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source shall be a finite float, double or long double whose corresponding configured PPL_SUPPORTED_FLOAT, PPL_SUPPORTED_DOUBLE or PPL_SUPPORTED_LONG_DOUBLE is nonzero. Its mathematical value shall be the exact represented binary value, without a decimal approximation. A destination shall be one of the eleven native integral types or Checked_Number<T, Check_Overflow_Policy<T>> types in 🔗 1. Exact conversion between native and checked integral scalars. Native destinations shall use that overflow policy through their _r adapter and shall reserve no payload for infinity or NaN.

    For an integral source value representable in the destination, assign_r shall assign that exact integer. Either sign of native floating-point zero shall produce integer zero. Directed ROUND_DOWN and ROUND_UP requests, with or without a strict flag, shall return V_EQ for these exact inputs. Delegated and no-rounding-needed classifications shall follow 🔗 3. Delegated floating-to-integral truncation and exactness requests.

    The destination shall be a live assignable object and a distinct source shall remain unchanged. Callers shall prevent concurrent access to an object while another operation modifies it. No library initialization object, thread initialization or coefficient-constant stage shall be required. A directed request on a nonintegral source shall require the hardware rounding mode to be upward, as established by the rounding protocol in 🔗 4. Rounding-state exchange during an initialized thread lifetime; exact integral inputs shall not require a particular mode. Every call shall preserve the current hardware rounding direction. The _r interface shall return Result without policy-handler dispatch or automatic numeric overflow exceptions. Unavailable source types shall not be instantiated.

    RATIONALE:

    An integral scalar conversion depends on the represented source value and destination policy. Exact inputs do not require a floating approximation, while the nonintegral directed kernel has an explicit hardware-rounding prerequisite.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source and destination types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For every configured native floating source and all native/checked destination types, check zero, both signs and representable integral endpoints using an independent significand/power-of-two oracle. Require directed V_EQ and exact values under every supported hardware mode, preserve sources and direction state, and compile unavailable configurations without source-type instantiations.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingtointegerspec1.cc; tests/numericpublic1.cc.

  • 2. Directed finite floating-to-integral rounding within range UID: PPL-SPEC-000242 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite source value a and admitted source/destination types from 🔗 1. Supported finite native floating-to-integral scalar conversion, ROUND_DOWN shall assign ⌊a⌋ and ROUND_UP shall assign ⌈a⌉ whenever that requested integer is representable. A nonintegral source shall require the upward hardware rounding mode in 🔗 1. Supported finite native floating-to-integral scalar conversion. An optional ROUND_STRICT_RELATION flag shall not change the mathematical result.

    A nonintegral downward result shall return V_GT and a nonintegral upward result shall return V_LT, with exact-to-computed orientation from 🔗 1. Numerical result classes and relation meanings. An integral source shall return V_EQ. A source just outside the destination's integer endpoints whose requested rounded integer is an endpoint shall produce that ordinary definite relation, without an integer-range-overflow annotation. This shall include upward rounding of a negative proper fraction to unsigned zero.

    Out-of-range rounded integers shall follow 🔗 4. Floating-to-integral range detection and reusable destinations. Source, object-synchronization, lifetime and hardware-mode preservation shall follow 🔗 1. Supported finite native floating-to-integral scalar conversion.

    RATIONALE:

    A conversion selects the requested integer bound. The original floating value may lie beyond an integer endpoint even though the requested bound is a valid endpoint, so source range and rounded-result range must be distinguished.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source and destination types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact dyadic proper and improper fractions of both signs and verify floor/ceiling with an independent integer quotient/remainder oracle. Cover strict and nonstrict requests, interior integers and adjacent fractions at every destination endpoint, including inward rounding from outside and unsigned zero. Preserve upward hardware mode and distinct sources.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingtointegerspec1.cc.

  • 3. Delegated floating-to-integral truncation and exactness requests UID: PPL-SPEC-000243 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted source and destination types in 🔗 1. Supported finite native floating-to-integral scalar conversion, ROUND_IGNORE shall assign trunc(a) toward zero when that integer is representable. With no strict flag, the successful conversion shall return V_LGE for integral and nonintegral source values. No particular current hardware direction shall be required for this truncating request.

    ROUND_NOT_NEEDED shall require an exact integral source value representable in the destination. For that valid request, the integer value shall be preserved under any current hardware rounding direction. Without a strict flag, its result shall be V_EQ in an assertion-enabled build and may be lazy V_LGE in a build defining NDEBUG, following the internal request translation in 🔗 7. Internal no-rounding-needed request and result checking.

    With ROUND_STRICT_RELATION, a delegated request shall determine the definite relation: V_GT for a positive inexact source truncated toward zero, V_LT for a negative inexact source, and V_EQ for an integral source. A strict no-rounding-needed request shall retain its exact integral precondition and return V_EQ. Range failures under delegated requests shall follow 🔗 4. Floating-to-integral range detection and reusable destinations. Object validity, source preservation and hardware-direction preservation shall follow 🔗 1. Supported finite native floating-to-integral scalar conversion.

    RATIONALE:

    Truncation and relation precision are separate requests. A lazily classified exact payload must not be confused with a determined equality relation, and strict requests must resolve that distinction.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source and destination types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check signed dyadic truncation under ignore requests with documented V_LGE results, exact no-rounding-needed inputs in both build modes and all hardware states, and definite relations for each strict form. Include zero, proper fractions, endpoint-adjacent inputs, both destination forms and preservation of sources and hardware direction.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingtointegerspec1.cc; tests/numericpublic1.cc.

  • 4. Floating-to-integral range detection and reusable destinations UID: PPL-SPEC-000244 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the admitted types and valid hardware prerequisites in 🔗 1. Supported finite native floating-to-integral scalar conversion, let q be the requested floor, ceiling or truncated integer defined by 🔗 2. Directed finite floating-to-integral rounding within range and 🔗 3. Delegated floating-to-integral truncation and exactness requests. If q lies below the destination minimum, ROUND_UP shall store that minimum and return V_LT_INF; ROUND_DOWN or ROUND_IGNORE shall return V_GT_MINUS_INFINITY | V_UNREPRESENTABLE. If q lies above the maximum, ROUND_DOWN shall store that maximum and return V_GT_SUP; ROUND_UP or ROUND_IGNORE shall return V_LT_PLUS_INFINITY | V_UNREPRESENTABLE. An optional strict flag shall not change these range outcomes.

    A requested integer within range shall follow the ordinary classifications of 🔗 2. Directed finite floating-to-integral rounding within range and 🔗 3. Delegated floating-to-integral truncation and exactness requests. Checking range shall not itself require an undefined native floating-to-integer cast, including when a floating source format cannot represent the destination's maximum integer exactly. A failed range request shall not report a wrapped integer as successful. An unrepresentable result shall leave the destination assignable and destructible without a payload-value guarantee. ROUND_NOT_NEEDED shall exclude out-of-range inputs. These result codes shall be returned directly without automatic policy exception dispatch.

    RATIONALE:

    Safe conversion must guard the actual requested integer range before any narrowing native cast. A finite source can exceed a destination bound even when the source format rounds that bound to a different floating value.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source and destination types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use unbounded dyadic oracles for every signed/unsigned endpoint and neighboring representable floating values. Include the largest source-representable integer inside each destination, the first outside it, large finite source maxima and negative values targeting unsigned storage. Require exact range codes, inward endpoints, outward flags, reusable outputs and no undefined-behavior sanitizer findings under valid hardware modes.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingtointegerspec1.cc.

  • 1. Finite native floating-point floor, ceiling and truncation UID: PPL-SPEC-000325 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination shall have admitted raw or checked types in 🔗 1. Native floating-point NaN and infinity predicates with the same native storage format F. The source shall be finite, with exact represented value a. floor_assign_r shall assign ⌊a⌋; ceil_assign_r shall assign ⌈a⌉; and trunc_assign_r shall assign trunc(a) toward zero. Each result shall be exactly representable in F and shall return V_EQ for all four base directions in 🔗 4. Rounding-direction intent, composition and inspection, with or without the strict-relation flag. This exact relation shall describe the specified integer-valued function, even when its value differs from the source. When a result is zero, it shall have the source's sign.

    A nonintegral source shall require the current hardware rounding direction to be upward. An integral source shall require no particular current hardware direction. Calls shall preserve that direction. A source may be the destination itself or designate its raw storage; the result shall be computed from the source's entry value. Source and destination may also share storage through a checked object's raw-value reference. A source with distinct storage shall remain unchanged. The destination shall be live and assignable. Object synchronization, availability, initialization independence and nontrapping floating-point conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates. The _r interfaces shall return the result without policy-handler dispatch.

    RATIONALE:

    Rounding a finite binary value to an integer-valued value in the same format has an exact mathematical result. Hardware prerequisites and signed-zero behavior remain part of the callable interface.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted To and From with the same native storage format:

    Result floor_assign_r(To& to, const From& from, Rounding_Dir dir);
    Result ceil_assign_r(To& to, const From& from, Rounding_Dir dir);
    Result trunc_assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact significand/power-of-two rational oracles for positive and negative fractions, halves, signed zeros, subnormals, precision boundaries and finite maxima. Check every admitted source/destination policy combination, all direction/strict requests, same-object and raw-storage aliases, zero signs and preserved sources. Use upward hardware mode for nonintegral inputs and every hardware mode for integral inputs.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingunaryspec1.cc.

  • 2. Exact finite native floating-point negation and absolute value UID: PPL-SPEC-000326 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-format admitted raw or checked source/destination types in 🔗 1. Finite native floating-point floor, ceiling and truncation and a finite source with represented value a, neg_assign_r shall assign  − a and abs_assign_r shall assign |a|. Both shall return V_EQ under all four base directions, with or without ROUND_STRICT_RELATION. Negation shall reverse a zero's sign. Absolute value shall produce positive zero for either signed zero. All finite extrema and subnormals shall retain their exact magnitudes, independent of the configured global coefficient range.

    No particular current hardware rounding direction shall be required, and calls shall preserve that direction. Destination validity, source aliases, source preservation, synchronization, availability, initialization independence and floating-point exception conditions shall follow 🔗 1. Finite native floating-point floor, ceiling and truncation. The _r interfaces shall return their result without policy-handler dispatch.

    RATIONALE:

    A native floating-point sign change and magnitude extraction need no bounded coefficient intermediate and introduce no approximation for finite operands.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted To and From with the same native storage format:

    Result neg_assign_r(To& to, const From& from, Rounding_Dir dir);
    Result abs_assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For every configured format and admitted source/destination policy combination, compare exact dyadic values and sign bits at signed zeros, subnormals, ordinary values and finite extrema. Check all direction/strict requests, all hardware modes, self/raw-storage aliases and distinct-source preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingunaryspec1.cc.

  • PPL-SPEC-000327
    3. Sign of a finite native floating-point value UID: PPL-SPEC-000327 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted raw or checked source type in 🔗 1. Native floating-point NaN and infinity predicates whose represented value a is finite, sgn(x) shall return  − 1 when a < 0, zero when a = 0 and 1 when a > 0. Both signed zeros shall return zero. A negative subnormal shall remain negative and a positive subnormal positive.

    Source validity, preservation, synchronization, availability, initialization independence and floating-point state conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates. The result shall require no arithmetic in the configured coefficient type and shall be independent of hardware direction.

    RATIONALE:

    A complete sign query must distinguish zero from nonzero native values at every scale without imposing an unrelated coefficient-width limit.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted From:

    int sgn(const From& x);
    
    VERIFICATION_CRITERIA:

    Check signed zeros, both signs of subnormal/normal values, precision boundaries and finite extrema for raw and all admitted checked types. Compare with the exact rational sign under every hardware mode, preserving the source and direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingunaryspec1.cc.

  • 4. Ordered comparison of finite native floating-point values UID: PPL-SPEC-000328 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For admitted raw or checked operand types in 🔗 1. Native floating-point NaN and infinity predicates with the same native storage format and finite represented values a and b, cmp(x, y) shall return a negative integer exactly when a < b, zero exactly when a = b and a positive integer exactly when a > b.

    equal, not_equal, less_than, less_or_equal, greater_than and greater_or_equal shall return the truth values of a = b, a ≠ b, a < b, a ≤ b, a > b and a ≥ b, respectively. The corresponding PPL operators ==, !=, <, <=, > and >= shall return those same truth values when at least one operand is checked. Oppositely signed zeros shall compare equal. The operands may designate the same object or raw storage.

    Both operand objects shall remain unchanged. Source validity, synchronization, availability, initialization independence and floating-point state conditions shall follow 🔗 1. Native floating-point NaN and infinity predicates. Comparison shall require no bounded coefficient intermediate and no particular hardware rounding direction, and shall preserve that direction.

    RATIONALE:

    Clients need a total ordering for finite represented values that treats signed zeros equally and preserves distinctions between adjacent nonzero values.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations for admitted Left and Right with the same native storage format:

    int cmp(const Left& x, const Right& y);
    bool equal(const Left& x, const Right& y);
    bool not_equal(const Left& x, const Right& y);
    bool less_than(const Left& x, const Right& y);
    bool less_or_equal(const Left& x, const Right& y);
    bool greater_than(const Left& x, const Right& y);
    bool greater_or_equal(const Left& x, const Right& y);
    

    The six comparison operators shall be available when at least one operand is Checked_Number.

    VERIFICATION_CRITERIA:

    Cross every admitted same-format operand-policy combination and compare ordered pairs against exact rational oracles. Include equal/self-aliased operands, oppositely signed zeros, adjacent values, subnormals, finite extrema and mixed signs. Check cmp sign, all six named predicates and every available checked comparison operator under all hardware modes, preserving both sources.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/floatingunaryspec1.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-001583
    5. Stored ordering of polyhedral generators UID: PPL-SPEC-001583 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    compare(x,y) shall order valid generator rows of the same topology without changing either source. Callers shall provide this common-topology precondition, as in rows of one generator system. Its result shall be negative, zero or positive according to the stored ordering, with magnitude at most two. Lines shall precede all other kinds, returning magnitude two when this rule decides the order.

    For two necessarily-closed rows, comparison shall use their stored expressions: homogeneous coefficients in increasing variable order followed by the divisor field, with absent trailing coefficients treated as zero. A homogeneous coefficient difference shall return magnitude two and a divisor-field difference magnitude one, using the sign of the first difference.

    For NNC rows, comparison shall first use the public homogeneous coefficients in the same order with zero padding. A difference shall return magnitude two. With equal homogeneous coefficients, two lines shall compare equal; otherwise a ray shall precede a point or closure point with magnitude one, and two rays shall compare equal. Remaining point or closure-point rows shall compare divisors and then stored epsilon coefficients, returning their signed comparison with magnitude one when unequal.

    The ordering shall be of stored row descriptions, not lexicographic order of rational point coordinates and not generator equivalence. Source validity, coefficient representability and synchronization prerequisites of 🔗 1. Generator kinds and numerical prerequisites shall apply.

    RATIONALE:

    Generator-system algorithms need a deterministic row ordering whose tie breakers retain divisor and topology information independently of geometric equivalence.

    INTERFACE:

    Public header: <ppl.hh>; names belong to Parma_Polyhedra_Library.

    int compare(const Generator& x, const Generator& y);
    
    VERIFICATION_CRITERIA:

    Use literal normalized rows to exercise line priority, homogeneous differences, zero padding, ray/point priority, divisor differences and epsilon tie breaking. Check both orders, equality, transitivity on a fixed catalogue, both storage representations and each common topology; preserve each source.

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

  • 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-000187
    7. Generator dimensions and dimensioned copying UID: PPL-SPEC-000187 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    space_dimension() shall report public ambient dimension and max_space_dimension() the expression dimension limit. Requested/result sizes shall not exceed that limit. Dimensioned copies and set_space_dimension(n) shall retain lower-index coordinates, zero-extend new coordinates or discard removed trailing coordinates. Normalization may rescale an equivalent direction or numerator/divisor tuple. Kind and storage shall remain unchanged. Resizing a line or ray shall require a nonzero retained direction; removal that can collapse a direction shall instead follow 🔗 9. Removing generator coordinates and collapsed directions. Dimensioned copies without explicit storage shall retain source storage.

    RATIONALE:

    Dimensioned generator copies transform coordinate tuples, while a zero direction cannot remain a valid line or ray.

    INTERFACE:
    static dimension_type Generator::max_space_dimension();
    dimension_type Generator::space_dimension() const;
    Generator(const Generator& g, dimension_type space_dim);
    Generator(const Generator& g, dimension_type space_dim, Representation r);
    void Generator::set_space_dimension(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check point/closure shrink/extend to and from dimension zero, direction resizing that retains nonzero coefficients, trailing zeros, and equivalent rational coordinates/directions after normalization.

    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.

  • PPL-SPEC-000188
    8. Generator coordinate permutation and zero insertion UID: PPL-SPEC-000188 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Swapping two in-dimension coordinates shall exchange their coefficients. A cycle of distinct in-dimension variables shall move each coefficient to the following listed coordinate, wrapping last to first; empty/singleton cycles shall preserve the generator. shift_space_dimensions(v,n) shall require v.id() <= space_dimension() and an admitted result dimension; it shall insert n zero coordinate slots before that position and increase dimension by n. A zero shift shall preserve value.

    These operations shall preserve kind and storage, and preserve applicable rational point coordinates or direction values according to their stated coordinate correspondence. Equivalent normalization may change stored scales. Divisor and internal strictness fields shall not become coordinates.

    RATIONALE:

    Coordinate rearrangement must respect topological and rational scaling information stored alongside the homogeneous tuple.

    INTERFACE:
    void Generator::swap_space_dimensions(Variable x, Variable y);
    void Generator::permute_space_dimensions(const std::vector<Variable>& cycle);
    void Generator::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check every kind with inverse/self swaps, longer and empty cycles, leading zeros and front/interior/end insertion against independent tuple transformations.

    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.

  • PPL-SPEC-000189
    9. Removing generator coordinates and collapsed directions UID: PPL-SPEC-000189 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    remove_space_dimensions(vars) shall require selected indices within the public dimension, discard those coefficients and compact surviving coordinates in their original order. Points and closure points shall retain their kind and rational remaining coordinates and return true. A line or ray whose retained direction is nonzero shall retain its geometric direction kind and return true. If its entire direction is removed, it shall become the included origin in the remaining coordinate space and return false. Removing no coordinates shall be admitted. Storage shall be retained and normalization may rescale equivalent tuples.

    RATIONALE:

    A removed direction contributes no displacement; the return status distinguishes that collapse from a surviving directional descriptor.

    INTERFACE:
    bool Generator::remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Remove none, interior, trailing and all coordinates from every kind. Check normalized remaining rational tuples, surviving directions, and the origin/type/false result when every nonzero direction component disappears.

    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.

  • PPL-SPEC-000190
    10. Generator type, coefficients, divisor and borrowed expression UID: PPL-SPEC-000190 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed coefficient and expression accessors shall require an lvalue receiver, with corresponding const && overloads deleted in every coefficient profile. Copying a borrowed expression view shall not extend the owning descriptor's lifetime.

    The kind predicates and type() shall identify the four public kinds exactly; is_line_or_ray() shall identify the two directional kinds. coefficient(v) shall expose a homogeneous numerator/direction coefficient for an in-dimension variable and otherwise throw std::invalid_argument. divisor() shall return a positive divisor for a point or closure point and otherwise throw std::invalid_argument.

    expression() shall borrow a read-only affine adapter with the public dimension and homogeneous coefficients, constant term zero, and no hidden strictness coordinate. It shall not encode the point divisor as a constant. The owner shall remain alive and unchanged for uses covered here. Copying that view to a Linear_Expression shall make an independent value. Configured coefficient references shall borrow their owner until mutation or destruction. Queries shall preserve source value.

    RATIONALE:

    A public expression view gives numerators/directions, while obtaining a rational point still requires the separate divisor.

    INTERFACE:
    Generator::Type Generator::type() const;
    bool Generator::is_line() const;
    bool Generator::is_ray() const;
    bool Generator::is_line_or_ray() const;
    bool Generator::is_point() const;
    bool Generator::is_closure_point() const;
    Coefficient_traits::const_reference Generator::coefficient(Variable v) const &;
    Coefficient_traits::const_reference Generator::divisor() const &;
    typedef Expression_Hide_Last<Expression_Hide_Inhomo<Linear_Expression>> Generator::expr_type;
    Generator::expr_type Generator::expression() const &;
    
    VERIFICATION_CRITERIA:

    Check predicate tables, in-range values, rejected first/later coordinates and rejected directional divisor access. Materialize views for every kind and verify zero constant, hidden-column exclusion and independence after source modification.

    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-000191
    11. Geometric equivalence and stored generator identity UID: PPL-SPEC-000191 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_equivalent_to and generator equality shall compare equal-dimension, equal-kind geometric objects independently of storage and internal topology. Point and closure-point comparisons shall use exact rational coordinates and keep their kinds distinct. Ray directions shall compare equivalent exactly for positive proportionality; line directions shall admit either nonzero proportionality sign. Different dimensions or kinds shall compare unequal. Inequality expressions shall negate equivalence.

    is_equal_to shall compare the complete stored normalized descriptor, including topology and fields, independently of dense/sparse storage. Positive identity shall imply equivalence; negative identity shall not imply geometric inequality. Queries shall preserve operands. Arithmetic prerequisites in 🔗 1. Generator kinds and numerical prerequisites shall apply.

    RATIONALE:

    Normalizing numerators without their divisor can change point coordinates, and positive versus signed proportionality distinguishes rays from lines.

    INTERFACE:
    bool Generator::is_equivalent_to(const Generator& y) const;
    bool Generator::is_equal_to(const Generator& y) const;
    bool operator==(const Generator& x, const Generator& 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. Compare exact rational points with common/different scales, same/opposite ray and line directions, kind differences and trailing dimensions. Include equivalent/different included points and directions promoted through NNC generator systems, preserving divisor information.

    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.

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

  • PPL-SPEC-000193
    13. Readable generator, type and system output UID: PPL-SPEC-000193 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Generator output shall use l(...), r(...), p(...) and c(...) for its respective kind. Inside, it shall print the homogeneous numerator or direction using active variable formatting and the coefficient sign/unit conventions of 🔗 14. Human-readable affine output and formatter dispatch. A zero tuple shall print 0. For point/closure divisor other than one it shall append / and that divisor, putting parentheses around a nonzero numerator expression. Type output shall print LINE, RAY, POINT or CLOSURE_POINT exactly.

    System output shall print its public iterator range separated by ", ", or false when there are no generators. Operators shall return the supplied stream, add no newline and preserve source values. Each type's print() shall use that output on std::cerr. Formatting coefficient negations shall satisfy the selected arithmetic profile's preconditions.

    RATIONALE:

    Readable output preserves kind and rational scaling, while an empty generator list describes an empty generated set.

    INTERFACE:
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Generator& g);
      std::ostream& operator<<(std::ostream& s, const Generator::Type& type);
      std::ostream& operator<<(std::ostream& s, const Generator_System& gs);
    }
    void Generator::print() const;
    void Generator_System::print() const;
    
    VERIFICATION_CRITERIA:

    Check literal all-kind/type formats, rational/nonrational origins, signs, custom coordinate names, empty and multirow systems, separators, return identity and redirected standard-error output.

    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.

  • PPL-SPEC-000194
    14. Generator and system invariants and memory accounting UID: PPL-SPEC-000194 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() shall report the checked representation invariants of its generator or system. Values produced by successful operations under their valid-input and arithmetic preconditions shall satisfy them. Each type's total memory count shall equal its sizeof plus its external memory count. Queries shall preserve geometric fields, kind, dimension and storage. Counts shall not promise allocator overhead, process resident memory or dense/sparse size ordering.

    RATIONALE:

    Ownership accounting and storage invariants concern valid representations rather than deciding membership in a generated polyhedron.

    INTERFACE:
    bool Generator::OK() const;
    memory_size_type Generator::total_memory_in_bytes() const;
    memory_size_type Generator::external_memory_in_bytes() const;
    bool Generator_System::OK() const;
    memory_size_type Generator_System::total_memory_in_bytes() const;
    memory_size_type Generator_System::external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check all kinds and rational tuples, empty/populated systems, copies/conversions and memory identities with preserved semantic fields, without architecture-specific byte totals.

    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.

  • 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-000198
    18. System dimensions, coordinate truncation and container emptiness UID: PPL-SPEC-000198 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall report the generator limit and space_dimension() the declared ambient dimension. For admitted dimension n, resizing shall zero-extend new coordinates or discard removed trailing coordinates in every generator. Points/closure points shall retain the corresponding remaining rational coordinates; lines/rays whose directions collapse to zero shall be removed. The resulting generated hull shall have the corresponding coordinate image, including when no supporting point was present. Representation shall be retained.

    empty() shall report absence of stored generators, not geometric emptiness of a direction-only or closure-only generated hull. clear() shall remove all generators and reset dimension zero while retaining storage. An empty system may be resized to positive ambient dimension.

    RATIONALE:

    Generator coordinate projection drops collapsed directions, while container emptiness remains distinct from the need for a supporting included point.

    INTERFACE:
    static dimension_type Generator_System::max_space_dimension();
    dimension_type Generator_System::space_dimension() const;
    void Generator_System::set_space_dimension(dimension_type n);
    bool Generator_System::empty() const;
    void Generator_System::clear();
    
    VERIFICATION_CRITERIA:

    Check positive-dimensional empty systems, every-kind resizing, collapsed directions removed during shrinking, zero-dimensional projections, clear/reuse and direction-only systems that are nonempty containers but generate no points.

    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-000199
    19. Read-only forward iteration over public generators UID: PPL-SPEC-000199 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    begin() and end() shall delimit a generator collection with the system's public dimension and the same generated hull. It may suppress a closure point immediately followed by an included point at the same rational coordinates. No public iteration order or duplicate multiplicity shall be promised. Dereference/member access shall borrow a retained generator.

    Iterator copy/assignment shall preserve borrowed system and position with independent later navigation. Prefix increment shall return the advanced iterator; postfix shall return its entry-position copy. Comparison shall require iterators into the same unchanged system. Defaults shall admit copying, assignment and destruction before valid-position assignment. Modification/destruction shall invalidate iterators and borrowed rows.

    RATIONALE:

    Equivalent included and closure-point companions need not both be exposed, while remaining generators must preserve the same hull.

    INTERFACE:
    typedef Generator_System_const_iterator Generator_System::const_iterator;
    Generator_System::const_iterator Generator_System::begin() const;
    Generator_System::const_iterator Generator_System::end() const;
    Generator_System_const_iterator();
    Generator_System_const_iterator(const Generator_System_const_iterator& y);
    Generator_System_const_iterator::~Generator_System_const_iterator();
    Generator_System_const_iterator& Generator_System_const_iterator::operator=(const Generator_System_const_iterator& y);
    const Generator& Generator_System_const_iterator::operator*() const;
    const Generator* Generator_System_const_iterator::operator->() const;
    Generator_System_const_iterator& Generator_System_const_iterator::operator++();
    Generator_System_const_iterator Generator_System_const_iterator::operator++(int);
    bool Generator_System_const_iterator::operator==(const Generator_System_const_iterator& y) const;
    bool Generator_System_const_iterator::operator!=(const Generator_System_const_iterator& y) const;
    
    VERIFICATION_CRITERIA:

    Check empty, mixed and matching-companion ranges, exact rational coordinates and public dimensions. Exercise copied/default-assigned positions, prefix/postfix return semantics and borrowed pointer/reference identity.

    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.

  • 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-000227
    7. Grid-generator dimensions and coordinate removal UID: PPL-SPEC-000227 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall equal the linear-expression limit minus one, reserving the internal divisor coordinate. space_dimension() shall report public dimension. Dimensioned copies and resizing shall require admitted result dimensions, retain lower-index coordinates and zero-extend or discard trailing coordinates. Explicit-storage copies shall use their argument; other copies shall retain source storage.

    remove_space_dimensions(vars) shall require in-dimension selected indices, discard those coordinate coefficients, compact retained coordinates in their original order and return true. Removing none/all shall be admitted. Kind, storage and applicable rational remaining coordinates shall be retained. A transformed zero parameter or zero line direction shall contribute no displacement, without supplying a supporting point.

    RATIONALE:

    A reserved divisor field must follow dimension changes without being mistaken for a coordinate; collapsed steps contribute zero displacement.

    INTERFACE:
    static dimension_type Grid_Generator::max_space_dimension();
    dimension_type Grid_Generator::space_dimension() const;
    Grid_Generator(const Grid_Generator& g, dimension_type space_dim);
    Grid_Generator(const Grid_Generator& g, dimension_type space_dim, Representation r);
    void Grid_Generator::set_space_dimension(dimension_type n);
    bool Grid_Generator::remove_space_dimensions(const Variables_Set& vars);
    
    VERIFICATION_CRITERIA:

    Check dimensioned copies, zero/trailing dimensions, shrink/extend and none/interior/all removals for all kinds. Compare exact rational vectors or retained line spans, preserving divisor and kind while excluding hidden columns.

    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-000228
    8. Grid-generator coordinate permutation and zero insertion UID: PPL-SPEC-000228 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Swapping in-dimension variables shall exchange their coordinate coefficients. A cycle shall require distinct in-dimension variables and move each listed coefficient to the following listed position, wrapping last to first. Empty and singleton cycles shall preserve the object. Inserting zero coordinates before v.id() <= space_dimension() shall shift the suffix and increase dimension by the requested admitted amount; a zero shift shall preserve value. Kinds, storage and applicable rational point/parameter values shall follow that coordinate correspondence. A line may be reoriented by equivalent sign normalization; a parameter's sign and exact step shall be preserved.

    RATIONALE:

    Sign normalization valid for continuous lines would change an explicitly directed parameter vector.

    INTERFACE:
    void Grid_Generator::swap_space_dimensions(Variable x, Variable y);
    void Grid_Generator::permute_space_dimensions(const std::vector<Variable>& cycle);
    void Grid_Generator::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Use independent tuple swaps/cycles and front/interior/end zero insertion, including negative-leading parameters, zero parameters and rational points with nonunit divisors.

    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-000229
    9. Grid-generator kind, coefficient, divisor and expression queries UID: PPL-SPEC-000229 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Borrowed coefficient and expression accessors shall require an lvalue receiver, with corresponding const && overloads deleted in every coefficient profile. Copying a borrowed expression view shall not extend the owning descriptor's lifetime.

    Kind predicates and type() shall identify line, parameter and point; is_line_or_parameter() and is_parameter_or_point() shall identify their named unions. coefficient(v) shall expose a public coordinate numerator or direction coefficient, rejecting v.id() >= space_dimension() with std::invalid_argument. divisor() shall return a positive divisor for parameters/points and reject lines with std::invalid_argument. all_homogeneous_terms_are_zero() shall inspect only public homogeneous coordinates, excluding divisor fields.

    expression() shall borrow a read-only view of the public homogeneous coefficients, with public dimension and constant zero, hiding divisor fields. The owner shall remain alive and unchanged for covered view uses. Materializing the view shall yield an independent Linear_Expression. Configured returned references shall borrow until owner mutation/destruction. Queries shall preserve source values.

    RATIONALE:

    Public homogeneous queries exclude both the point divisor and the parameter's separate internal divisor coordinate.

    INTERFACE:
    Grid_Generator::Type Grid_Generator::type() const;
    bool Grid_Generator::is_line() const;
    bool Grid_Generator::is_parameter() const;
    bool Grid_Generator::is_point() const;
    bool Grid_Generator::is_line_or_parameter() const;
    bool Grid_Generator::is_parameter_or_point() const;
    Coefficient_traits::const_reference Grid_Generator::coefficient(Variable v) const &;
    Coefficient_traits::const_reference Grid_Generator::divisor() const &;
    bool Grid_Generator::all_homogeneous_terms_are_zero() const;
    typedef Expression_Hide_Last<Expression_Hide_Inhomo<Linear_Expression>> Grid_Generator::expr_type;
    Grid_Generator::expr_type Grid_Generator::expression() const &;
    
    VERIFICATION_CRITERIA:

    Check every predicate combination, exact coefficients/divisors, zero tests, first/later out-of-range access and line-divisor rejection. Materialize views and verify hidden-column exclusion and independence.

    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-000231
    11. Value-preserving scaling to a common positive divisor UID: PPL-SPEC-000231 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, scale_to_divisor(d) shall require a positive d that is an exact multiple of the current positive divisor. It shall set the divisor to d and multiply all public numerators by the same positive ratio, preserving exact rational vector, kind, dimension and storage. Reusing the current divisor shall preserve exact fields. Borrowed inputs from the same object shall use their entry values. For a line and any admitted positive d it shall do nothing. Numerical prerequisites in 🔗 1. Grid-generator values and integer versus continuous displacement shall apply.

    RATIONALE:

    Common-denominator maintenance preserves an exact parameter step, unlike plain divisor replacement.

    INTERFACE:
    void Grid_Generator::scale_to_divisor(Coefficient_traits::const_reference d);
    
    VERIFICATION_CRITERIA:

    Check exact multiples, unchanged divisor, point/parameter rational preservation, borrowed divisor and positive coefficient multiples, line no-op and representable product boundaries.

    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-000232
    12. Grid-generator equivalence and stored identity UID: PPL-SPEC-000232 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_equivalent_to and equality shall compare equal-kind, equal-dimension generators independently of storage. Points and parameters shall compare their exact rational vectors, including parameter sign and magnitude. Opposite parameter vectors may generate the same integer span but shall remain distinct parameter values. Lines shall compare their real direction spans, admitting opposite nonzero scales. Different dimensions/kinds shall compare unequal. Inequality shall negate equivalence.

    is_equal_to shall compare complete stored fields and kind independently of storage. Positive identity shall imply equivalence; a negative identity shall not prove different geometric values. Queries shall preserve sources. Numerical prerequisites in 🔗 1. Grid-generator values and integer versus continuous displacement shall apply.

    RATIONALE:

    Exact parameter vectors and the grids generated by their integer spans support different equivalence questions.

    INTERFACE:
    bool Grid_Generator::is_equivalent_to(const Grid_Generator& y) const;
    bool Grid_Generator::is_equal_to(const Grid_Generator& y) const;
    bool operator==(const Grid_Generator& x, const Grid_Generator& 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. Compare independently equal rational tuples with unreduced common factors, changed point/parameter magnitudes and opposite signs, line scales/signs, dimensions and representations. Include transformed lines whose leading nonzero sign changes after removal.

    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-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-000234
    14. Readable grid-generator, kind and system output UID: PPL-SPEC-000234 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Grid-generator output shall use l(...), q(...) or p(...) for line, parameter or point, printing public homogeneous coefficients with the active formatter and sign/unit conventions of 🔗 14. Human-readable affine output and formatter dispatch. Zero tuples shall print 0. A nonunit point/parameter divisor shall be printed after /, with parentheses around a nonzero numerator expression. Kind output shall print LINE, PARAMETER or POINT.

    System output shall print its public generators separated by ", ", or false for an empty range. Output shall return the supplied stream, add no newline and preserve source values. Each type's print() shall use that output on std::cerr. Evaluated coefficient negations shall be representable.

    RATIONALE:

    Display retains parameter step size and rational scaling without exposing internal divisor columns.

    INTERFACE:
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Grid_Generator& g);
      std::ostream& operator<<(std::ostream& s, const Grid_Generator::Type& type);
      std::ostream& operator<<(std::ostream& s, const Grid_Generator_System& gs);
    }
    void Grid_Generator::print() const;
    void Grid_Generator_System::print() const;
    
    VERIFICATION_CRITERIA:

    Check literal all-kind/type output, unreduced parameters, rational/zero vectors, custom variable names, empty/multirow systems, separators, stream identity and standard-error printing.

    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-000238
    18. System dimensions, row-kind counts and read-only iteration UID: PPL-SPEC-000238 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall return Grid_Generator::max_space_dimension() - 1 and space_dimension() the public ambient dimension. empty() shall mean no stored rows, independently of whether the generated grid lacks a supporting point. num_rows(), num_parameters() and num_lines() shall count retained stored generators of their named scope; has_points() shall report a retained point. clear() shall remove all rows and reset dimension zero while retaining storage.

    begin()/end() shall expose retained generators sharing system dimension, without promising geometric sorted order or duplicate multiplicity. Forward iterators shall borrow rows, support independent copied/assigned positions, return the advanced iterator from prefix increment and entry-position copy from postfix increment. Comparison shall require one unchanged system. Defaults shall admit copying/assignment/destruction before valid-position assignment. System mutation/destruction shall invalidate iterators and rows.

    RATIONALE:

    Container counts, presence of a supporting point and geometric generated-grid emptiness answer different questions.

    INTERFACE:
    static dimension_type Grid_Generator_System::max_space_dimension();
    dimension_type Grid_Generator_System::space_dimension() const;
    bool Grid_Generator_System::empty() const;
    dimension_type Grid_Generator_System::num_rows() const;
    dimension_type Grid_Generator_System::num_parameters() const;
    dimension_type Grid_Generator_System::num_lines() const;
    bool Grid_Generator_System::has_points() const;
    void Grid_Generator_System::clear();
    class Grid_Generator_System::const_iterator;
    Grid_Generator_System::const_iterator Grid_Generator_System::begin() const;
    Grid_Generator_System::const_iterator Grid_Generator_System::end() const;
    Grid_Generator_System::const_iterator::const_iterator();
    Grid_Generator_System::const_iterator::const_iterator(const const_iterator& y);
    Grid_Generator_System::const_iterator::~const_iterator();
    Grid_Generator_System::const_iterator& Grid_Generator_System::const_iterator::operator=(const const_iterator& y);
    const Grid_Generator& Grid_Generator_System::const_iterator::operator*() const;
    const Grid_Generator* Grid_Generator_System::const_iterator::operator->() const;
    Grid_Generator_System::const_iterator& Grid_Generator_System::const_iterator::operator++();
    Grid_Generator_System::const_iterator Grid_Generator_System::const_iterator::operator++(int);
    bool Grid_Generator_System::const_iterator::operator==(const const_iterator& y) const;
    bool Grid_Generator_System::const_iterator::operator!=(const const_iterator& y) const;
    
    VERIFICATION_CRITERIA:

    Check empty, zero-parameter-only and all-kind systems, exact row/kind counts and supporting-point presence. Check shared dimensions, copied/default-assigned iterator positions, prefix/postfix return semantics and borrowed pointer identity.

    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-000239
    19. Grid-generator and system invariants and memory queries UID: PPL-SPEC-000239 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() shall report checked storage invariants, without promising canonical normalization of every valid parameter representation. Successful operations under their preconditions shall produce values satisfying those invariants. Each type's total memory count shall equal its sizeof plus external memory count. Queries shall preserve geometric fields, kind, dimension and storage. Counts shall not promise allocator overhead, process memory or a dense/sparse size ordering.

    RATIONALE:

    Unreduced but valid rational step representations must remain admissible while ownership accounting remains exact at its declared scope.

    INTERFACE:
    bool Grid_Generator::OK() const;
    memory_size_type Grid_Generator::total_memory_in_bytes() const;
    memory_size_type Grid_Generator::external_memory_in_bytes() const;
    bool Grid_Generator_System::OK() const;
    memory_size_type Grid_Generator_System::total_memory_in_bytes() const;
    memory_size_type Grid_Generator_System::external_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check all kinds, zero/unreduced parameters, copies/conversions and empty/mixed systems. Verify invariants and memory identities with unchanged fields without target-specific byte constants.

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

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

  • PPL-SPEC-001594
    1. IBM hexadecimal format metadata for expression analysis UID: PPL-SPEC-001594 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    float_ibm_single and float_ibm_double shall provide compile-time numerical metadata for the short and long IBM hexadecimal formats used by floating-expression analysis. Both shall expose radix BASE == 16, characteristic width EXPONENT_BITS == 7 and excess-64 bias EXPONENT_BIAS == 64. MANTISSA_BITS shall count stored fraction bits: 24 for the short format and 56 for the long format, corresponding to six and fourteen hexadecimal digits. The short descriptor shall also expose floating_point_format == IBM_SINGLE.

    Reading these constants shall require no library initialization, floating hardware support or FPU rounding-state setup. Their use in rounded analysis shall retain the numerical and initialization prerequisites of the selected consumer, including 🔗 11. Descriptor-based relative rounding error and 🔗 1. Descriptor absolute-error interval. The cached enumeration-based query shall retain its supported-format domain in 🔗 2. Enumeration-based cached absolute error.

    RATIONALE:

    Expression analysis needs the analyzed format's radix, fraction precision and bias independently of the analyzer's native arithmetic. Stating the precision unit prevents interpreting a bit count as a hexadecimal digit count when selecting rounding-error bounds.

    INTERFACE:

    Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library.

    struct float_ibm_single {
      static constexpr unsigned int BASE = 16;
      static constexpr unsigned int EXPONENT_BITS = 7;
      static constexpr unsigned int MANTISSA_BITS = 24;
      static constexpr int EXPONENT_BIAS = 64;
      static constexpr Floating_Point_Format floating_point_format = IBM_SINGLE;
    };
    struct float_ibm_double {
      static constexpr unsigned int BASE = 16;
      static constexpr unsigned int EXPONENT_BITS = 7;
      static constexpr unsigned int MANTISSA_BITS = 56;
      static constexpr int EXPONENT_BIAS = 64;
    };
    
    VERIFICATION_CRITERIA:

    Use constant expressions to check every exposed metadata value and the short-format identifier independently of native IBM hardware. Check the existing short and long expression-analysis error bounds against exact rational hexadecimal quantization, including underflow, both signs and consumer rejection of unsupported cached format selections.

    SOURCE:

    src/Float_defs.hh; src/Float_templates.hh; src/Linear_Form_templates.hh; tests/floatrepresentationsspec1.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/ownedexpressionspec1.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.

  • 1. Exact conversion between native and checked integral scalars UID: PPL-SPEC-000161 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The native integral types covered here shall be char , signed char , unsigned char , short , unsigned short , int , unsigned int , long , unsigned long , long long and unsigned long long . An integral source or destination may instead be Checked_Number<T, Check_Overflow_Policy<T>> for one of those native types T . For these integral types, the policy shall reserve no integer payload for infinity or NaN. The scalar wrapper range shall be the full native range, independent of the selected global coefficient profile.

    For a source value representable in the destination, assign_r shall assign that exact integer and return V_EQ . This shall hold for the four base directions in 🔗 4. Rounding-direction intent, composition and inspection , with or without the strict flag. The source may be the destination when its type admits both roles; the entry value shall be preserved. Native destinations shall use that same overflow policy through their _r adapter. Out-of-range outcomes shall follow 🔗 5. Integral scalar conversion range outcomes .

    The returned Result shall report the conversion directly; the _r operation shall not invoke the destination policy's handle_result . The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage.

    RATIONALE:

    Finite integral embedding and narrowing have the same exact meaning when the value fits. A checked scalar policy belongs to the instantiated scalar, rather than to whichever global coefficient alias was configured.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above.

    VERIFICATION_CRITERIA:

    Exercise every listed native source/destination type pair and native/wrapper source/destination combination. Check exact status and values for common signed values, zero and all endpoints that fit the destination, with all admitted directions and exact self-aliases. Preserve distinct sources and compare endpoints with unbounded integer values.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc ; tests/numericpublic1.cc. tests/smallconstantassign1.cc.

  • PPL-SPEC-000162
    2. Exact conversion from an unbounded integer to integral storage UID: PPL-SPEC-000162 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite mpz_class source whose integer value is representable in a native or checked integral destination admitted by 🔗 1. Exact conversion between native and checked integral scalars , assign_r shall assign that exact integer and return V_EQ . It shall admit both signed and unsigned destination ranges, including the least signed integer and the maximum unsigned integer.

    The four base directions in 🔗 4. Rounding-direction intent, composition and inspection , with or without the strict flag, shall not change the exact value or classification. Out-of-range outcomes shall follow 🔗 5. Integral scalar conversion range outcomes . The _r conversion shall return its result directly without policy-handler dispatch. The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage.

    RATIONALE:

    An unbounded integer can represent a destination endpoint exactly, including a signed minimum whose positive magnitude does not fit in that signed type.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above; From shall be mpz_class.

    VERIFICATION_CRITERIA:

    Use an unbounded integer oracle for each signed and unsigned endpoint, zero, both signs and representable interior values. Check native and checked destinations with every direction and strict flag, exact status and source preservation. Include native types as wide as long long and unsigned long long.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc ; tests/numericpublic1.cc.

  • 3. Directed rational-to-integral conversion within range UID: PPL-SPEC-000163 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite canonical rational source with value a , assign_r with base direction ROUND_DOWN shall assign ⌊a⌋ ; with base direction ROUND_UP it shall assign ⌈a⌉ . The destination shall be one of the native or checked integral types in 🔗 1. Exact conversion between native and checked integral scalars . Canonical rational representation shall follow 🔗 1. Exact rational assignment from rational and integral sources .

    For a directed integer result representable in the destination, an integral source value shall produce V_EQ . A nonintegral value rounded downward shall produce V_GT and a nonintegral value rounded upward shall produce V_LT , with exact-to-computed relation orientation as in 🔗 1. Numerical result classes and relation meanings . Adding ROUND_STRICT_RELATION shall preserve these values and definite classifications.

    Out-of-range outcomes for either destination form shall follow 🔗 6. Rational conversion at and beyond integral endpoints . This conversion shall return Result without policy-handler dispatch. The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage. Rational-source conversions shall use thread-local temporary storage in a thread-safe build; callers shall serialize those conversions across threads in a non-thread-safe build.

    RATIONALE:

    Rational conversion selects a neighboring integer according to the requested direction. Its exact relation can be established from integer quotient and remainder without floating-point approximation.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above; From shall be mpq_class.

    VERIFICATION_CRITERIA:

    Use literal fractions and an independent integer quotient/remainder oracle for both signs, exact integers, halves and proper fractions. Check floor/ceiling values and definite result relations in every native and checked destination, including rounded values equal to either endpoint and source values just outside an endpoint that round inward.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc .

  • 4. Truncated rational-to-integral conversion and lazy relation requests UID: PPL-SPEC-000164 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite canonical rational source with value a , base direction ROUND_IGNORE shall assign trunc(a) , toward zero, when that integer is representable in a destination from 🔗 1. Exact conversion between native and checked integral scalars . With no strict-relation flag, successful conversion shall return V_LGE ; it shall not claim exactness from an unchanged integer payload alone.

    ROUND_NOT_NEEDED shall require a to be an integer representable in the destination. For that valid use, the assigned integer shall be exact. With no strict-relation flag, the returned classification may be lazy V_LGE in a build defining NDEBUG ; the assertion-enabled request translation in 🔗 7. Internal no-rounding-needed request and result checking shall instead establish V_EQ .

    When ROUND_STRICT_RELATION is supplied with either base direction, the conversion shall report the definite relation requested by 🔗 4. Rounding-direction intent, composition and inspection . A nonintegral positive value truncated toward zero shall produce V_GT ; a nonintegral negative value shall produce V_LT ; an integral value shall produce V_EQ . The exactness and representability preconditions of ROUND_NOT_NEEDED shall still apply when it carries that flag.

    Truncation range failures under ROUND_IGNORE shall follow 🔗 6. Rational conversion at and beyond integral endpoints . The returned result shall not cause automatic policy-handler dispatch. The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage. Rational-source conversions shall use thread-local temporary storage in a thread-safe build; callers shall serialize those conversions across threads in a non-thread-safe build.

    RATIONALE:

    A lazy relation and an exact assigned payload are distinct observations. A strict relation request must determine which side of the truncated integer contains the rational value.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above; From shall be mpq_class.

    VERIFICATION_CRITERIA:

    Check signed truncation answers and lazy V_LGE results for unflagged ignore requests. Check exact representable no-rounding-needed values in assertion and nonassertion builds, with their documented classifications. Independently check definite relations for strict requests, including negative proper fractions, positive proper fractions and exact integers. Preserve source components.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc .

  • 5. Integral scalar conversion range outcomes UID: PPL-SPEC-000165 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a native integral, checked integral or mpz_class source, a native integral or Checked_Number<T, Check_Overflow_Policy<T>> destination shall detect a source integer outside its full native T range. The native source and destination types shall be those in 🔗 1. Exact conversion between native and checked integral scalars . This shall be a Result -returning conversion; an arithmetic range failure shall not invoke handle_result or throw an overflow exception automatically.

    If the source is below the destination minimum, ROUND_UP shall store that minimum and return V_LT_INF . ROUND_DOWN or ROUND_IGNORE shall return V_GT_MINUS_INFINITY | V_UNREPRESENTABLE . If the source is above the destination maximum, ROUND_DOWN shall store that maximum and return V_GT_SUP . ROUND_UP or ROUND_IGNORE shall return V_LT_PLUS_INFINITY | V_UNREPRESENTABLE . An optional strict-relation flag shall not change these range outcomes.

    An unrepresentable result shall not promise a meaningful destination payload; the destination shall remain assignable and destructible. ROUND_NOT_NEEDED shall require an exact representable result and shall therefore exclude these out-of-range requests, with or without a strict flag. These guarantees shall not extend to a Checked_Number destination whose policy disables overflow checking. The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage.

    RATIONALE:

    A checked conversion returning Result must expose both the safe inward endpoint and the inability to represent the outward bound. It must allow its caller to choose subsequent policy handling.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above; To shall be an admitted native or checked destination type.

    VERIFICATION_CRITERIA:

    Generate integers immediately outside every checked signed/unsigned range using an unbounded oracle. For native and checked integral sources, test each type pair whenever the source can represent the out-of-range value; also use mpz sources for every endpoint. Verify exact result codes, inward stored endpoints, unrepresentability flags, lack of automatic exception dispatch and reusable outputs.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc .

  • 6. Rational conversion at and beyond integral endpoints UID: PPL-SPEC-000166 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite canonical rational source and a native or checked integral destination from 🔗 1. Exact conversion between native and checked integral scalars , assign_r shall distinguish a representable directed or truncated integer from range failure without policy-handler dispatch. Canonical representation shall follow 🔗 1. Exact rational assignment from rational and integral sources .

    If truncating the rational toward zero already lies below or above the destination range, the conversion shall return the corresponding range outcome specified in 🔗 5. Integral scalar conversion range outcomes for the requested base direction. If that truncation lies within range but subsequent upward rounding would increase the maximum, it shall return V_LT_PLUS_INFINITY | V_UNREPRESENTABLE . If subsequent downward rounding would decrease the minimum, it shall return V_GT_MINUS_INFINITY | V_UNREPRESENTABLE . These shall not be reported as successful wrapped integers.

    Representable rounded values shall follow 🔗 3. Directed rational-to-integral conversion within range or 🔗 4. Truncated rational-to-integral conversion and lazy relation requests , including a rational just beyond an endpoint whose requested integer rounds inward to that endpoint. An unrepresentable outcome shall preserve destination assignability and destructibility without a payload value promise. ROUND_NOT_NEEDED shall admit only exact representable integer results. A Checked_Number destination whose policy disables overflow checking shall remain outside this range-detection guarantee. The destination shall be live and assignable. A distinct source shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit temporary integer storage. Rational-source conversions shall use thread-local temporary storage in a thread-safe build; callers shall serialize those conversions across threads in a non-thread-safe build.

    RATIONALE:

    Fractional endpoint crossings can fail during the directed increment or decrement even when the truncated quotient fits. They differ from a quotient already outside the destination range.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    

    The admitted source and destination types shall be as stated above; From shall be mpq_class and To an admitted native or checked destination type.

    VERIFICATION_CRITERIA:

    Use exact thirds and halves immediately inside and outside every signed and unsigned endpoint, plus integral and fractional values more than one unit beyond it. Compare quotient/remainder-derived range cases and exact returned flags, both directed signs and strict requests; check valid unflagged lazy truncation separately. Require inward endpoint values and reusable outputs while preserving source components.

    SOURCE:

    src/checked_int_inlines.hh ; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh ; tests/integerconversionspec1.cc .

  • PPL-SPEC-000051
    1. Integral coefficient representation access and sign comparison UID: PPL-SPEC-000051 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live finite Coefficient, raw_value(x) shall return a reference to its underlying stored integer. The mutable overload shall refer to mutable storage and the const overload shall refer to const storage. In the mpz profile, that object shall be x itself and the referenced type shall be mpz_class. In bounded profiles it shall be the configured signed native integer member; both member x.raw_value() and free raw_value(x) shall refer to that same member. A returned reference shall remain valid only while its owning coefficient remains alive. A caller changing the raw value shall supply a finite value representable by that storage and satisfy its policy invariants; raw mutation shall not perform an arithmetic overflow check.

    sgn(x) shall return -1, 0 or 1 exactly when the entry integer value is negative, zero or positive. cmp(x, y) shall return an int whose sign agrees with the ordering of the entry integer values. The magnitude of a nonzero comparison result shall not be prescribed. Neither query shall change either coefficient. These queries shall admit the entire selected integer range, including the bounded minimum.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Raw access exposes representation identity; sign comparison exposes only mathematical order and must remain independent of backend comparison magnitudes.

    INTERFACE:

    Public header: <ppl.hh>; PPL names shall admit the following calls for mutable Coefficient x and const Coefficient y:

    auto& mutable_storage = raw_value(x);
    const auto& constant_storage = raw_value(y);
    int sign = sgn(y);
    int ordering = cmp(x, y);
    

    The exact reference types shall be as specified above. The GMP sign function is supplied by its integer provider. The member accessor forms shall apply only to the Checked_Number profiles.

    VERIFICATION_CRITERIA:

    Check exact reference types and addresses, mutate a raw value within range and observe the owning coefficient, and preserve const operands. Check signs and all comparison sign outcomes for zero, both signs, equal distinct objects, bounded endpoints and multi-limb GMP values.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000052
    2. Coefficient negation and absolute-value assignment UID: PPL-SPEC-000052 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live finite coefficients with source entry value a, neg_assign(x, y) shall assign  − a and abs_assign(x, y) shall assign |a|, where y supplies a. The one-argument forms shall apply the same operation to the destination's own entry value. The two-argument destination may be the source itself.

    A successful bounded result shall be representable. In checked profiles, negating or taking the absolute value of the least representable integer shall report std::overflow_error and retain the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. A native bounded caller shall satisfy the representability precondition.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Named assignments must retain the same mathematical sign conventions as ordinary coefficient arithmetic, including supported in-place use.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit:

    void neg_assign(Coefficient& x);
    void neg_assign(Coefficient& x, const Coefficient& y);
    void abs_assign(Coefficient& x);
    void abs_assign(Coefficient& x, const Coefficient& y);
    

    Bounded forms shall be the corresponding function-template instantiations.

    VERIFICATION_CRITERIA:

    Check all four forms for zero and both signs, explicit two-argument self-aliasing, preservation of a distinct source, and large GMP values. Check bounded endpoint-adjacent results and require overflow exceptions for both checked MIN operations, then reassign surviving outputs.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000053
    3. Coefficient remainder assignment and exact division UID: PPL-SPEC-000053 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For source entry values a and nonzero b, rem_assign(x, y, z) shall assign r = a − btrunc(a ⁄ b), where y supplies a and z supplies b. A nonzero remainder shall have the dividend's sign and satisfy |r| < |b|. This shall admit the bounded minimum divided by -1 and assign zero without requiring a representable quotient.

    exact_div_assign(x, y, z) shall require nonzero b and exact divisibility of a by b. On success it shall assign a ⁄ b. The quotient shall be representable for successful bounded use. A checked quotient outside that range shall report std::overflow_error with the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. No invalid divisor or nondivisibility rejection shall be promised.

    For either operation the destination may be either source, including when both sources denote the same nonzero object; calculations shall use entry values.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Exact division has a stronger input precondition than truncated quotient calculation. An explicit remainder assignment must preserve the already defined signed convention even where the corresponding bounded quotient cannot be represented.

    INTERFACE:

    Public header: <ppl.hh>. For operands satisfying the respective preconditions, the selected provider shall admit:

    void rem_assign(Coefficient& x, const Coefficient& y,
                    const Coefficient& z);
    void exact_div_assign(Coefficient& x, const Coefficient& y,
                          const Coefficient& z);
    

    The bounded forms shall be function-template instantiations.

    VERIFICATION_CRITERIA:

    Check every dividend/divisor sign combination, exact and inexact remainders, zero dividends and unit divisors against literal or unbounded answers. Exercise separate output, dividend alias, divisor alias and all-same nonzero arguments. Check MIN remainder -1 and checked MIN exact division by -1 separately.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000054
    4. Coefficient greatest common divisor and least common multiple UID: PPL-SPEC-000054 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live finite source entry values a and b, gcd_assign(x, y, z) shall assign the nonnegative greatest common divisor g. It shall assign zero for two zero sources and |a| when the other source is zero. lcm_assign(x, y, z) shall assign zero if either source is zero; otherwise it shall assign the positive least common multiple |a ⁄ g| |b|.

    The destination may be either source, and the two sources may be the same object. Each calculation shall use their entry values. A successful bounded result shall be representable. For native bounded least-common-multiple calculation with two nonzero sources, both source absolute values shall additionally be representable. Native intermediate arithmetic shall be representable; in particular, no overflow shall be required to form a representable result.

    In checked profiles, an unrepresentable nonnegative divisor or multiple, or an unrepresentable intermediate absolute value, shall report std::overflow_error with the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. The zero-multiple case shall not require taking the absolute value of a nonzero source.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Nonnegative normalization removes sign ambiguity, while explicit zero and alias rules make these common divisor primitives usable by reduction algorithms.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit:

    void gcd_assign(Coefficient& x, const Coefficient& y,
                    const Coefficient& z);
    void lcm_assign(Coefficient& x, const Coefficient& y,
                    const Coefficient& z);
    

    Bounded forms shall be function-template instantiations.

    VERIFICATION_CRITERIA:

    Check zeros, every sign combination, coprime and noncoprime inputs, equal inputs and all destination/source alias arrangements. Verify literal expected answers and divisibility with an unbounded oracle. Include large GMP values, representable bounded MIN gcd results, zero LCM with MIN, and checked positive-range overflow.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; src/checked_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000055
    5. Extended integral greatest common divisor UID: PPL-SPEC-000055 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live finite source entry values a and b, successful gcdext_assign(g, s, t, a, b) shall assign the nonnegative greatest common divisor to g and integer coefficients to s and t satisfying as + bt = g. For two zero inputs, g shall be zero; no particular Bezout coefficients shall be required. Other cases shall also not prescribe a unique pair of Bezout coefficients.

    The three output objects shall be pairwise distinct and shall be distinct from both source objects. The source objects may be the same object. This contract shall not admit other aliasing. All bounded output values and each evaluated Euclidean coefficient, quotient, product and difference shall be representable for successful bounded use. When the second source is nonzero, the absolute values of both bounded sources shall additionally be representable. When the second source is zero, the first absolute value shall be representable.

    Checked unrepresentable source absolute-value acquisition shall report std::overflow_error with the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. This shall not promise that the unchecked native intermediate expressions within the extended Euclidean algorithm report overflow; the stated intermediate preconditions remain applicable in every bounded profile.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    The Bezout identity is the portable result. Its coefficients need not coincide across backends, and multiple outputs require an explicit nonaliasing and intermediate-range contract.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit:

    void gcdext_assign(Coefficient& g, Coefficient& s, Coefficient& t,
                       const Coefficient& a, const Coefficient& b);
    

    Bounded forms shall be the corresponding function-template instantiations.

    VERIFICATION_CRITERIA:

    Check the Bezout identity using unbounded arithmetic, nonnegative gcd, zero combinations, equal and mixed-sign inputs, swapped inputs and coprime/noncoprime cases. Use small exhaustive bounded operands whose every algorithm intermediate is representable, plus large GMP inputs. Check checked MIN absolute-value failures and reassign all surviving outputs.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; src/checked_inlines.hh; tests/coefficient4.cc.

  • 6. Integral product accumulation and subtraction UID: PPL-SPEC-000056 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For destination and source entry values d, a and b, successful add_mul_assign(x, y, z) shall assign d + ab and successful sub_mul_assign(x, y, z) shall assign d − ab. The destination may be either or both sources, and the two sources may be the same object; each operand shall be interpreted at entry.

    Successful bounded use shall require both the product ab and the final sum or difference to be representable. These shall be two arithmetic steps, with no promise of a wider fused accumulator. A checked overflow in either step shall report std::overflow_error with the surviving-output guarantee of 🔗 5. Checked coefficient overflow and result-policy dispatch. This shall include an unrepresentable product whose addition to or subtraction from the destination could have cancelled into range: the operation may fail at that intermediate step. Native bounded callers shall satisfy both representability conditions.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Product accumulation is useful without an extra coefficient object, but a bounded two-step computation does not imply fused mathematical range.

    INTERFACE:

    Public header: <ppl.hh>. The selected coefficient provider shall admit:

    void add_mul_assign(Coefficient& x, const Coefficient& y,
                        const Coefficient& z);
    void sub_mul_assign(Coefficient& x, const Coefficient& y,
                        const Coefficient& z);
    

    Bounded forms shall be function-template instantiations.

    VERIFICATION_CRITERIA:

    Check zero, mixed signs, cancellation and all operand alias patterns with entry-value answers. Include multi-limb GMP products. For checked profiles separately overflow the product in both signs with positive, zero and negative destinations, and overflow only the final sum or difference. Require overflow also when a product overflow could have cancelled into range; reassign surviving outputs.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; src/checked_int_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000057
    7. Nonnegative integer square-root assignment UID: PPL-SPEC-000057 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live finite source with nonnegative entry value a, sqrt_assign(x, y) shall assign q = ⌊√(a)⌋. Equivalently q ≥ 0 and q2 ≤ a < (q + 1)2. The destination may be the source itself and shall use its entry value. Every nonnegative input representable in the selected profile shall be admitted; verifying the mathematical inequalities shall not require the caller to form their possibly unrepresentable bounded squares. No negative input rejection guarantee shall be inferred from this contract.

    The initialized-thread and object-synchronization conditions of 🔗 2. Finite coefficient construction, copying and comparison shall apply. Distinct source objects shall remain unchanged. The mpz profile shall be subject to available computational resources.

    RATIONALE:

    Integer square root is the floor of the nonnegative real root. Specifying inequalities avoids dependence on floating-point conversion or rounding.

    INTERFACE:

    Public header: <ppl.hh>. The selected provider shall admit:

    void sqrt_assign(Coefficient& x, const Coefficient& y);
    

    For bounded profiles this shall be a function-template instantiation.

    VERIFICATION_CRITERIA:

    Check zero, one, exact squares, neighboring nonsquares, separate and aliased outputs, every nonnegative int8 value and the maximum of every bounded width. Establish both root inequalities using unbounded arithmetic. Include GMP values beyond floating-point exactness and large perfect-square neighbors.

    SOURCE:

    src/GMP_Integer_defs.hh and src/GMP_Integer_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; src/checked_int_inlines.hh; tests/coefficient4.cc.

  • PPL-SPEC-000729
    1. Ordinary interval additive inversion UID: PPL-SPEC-000729 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    neg_assign(x) shall replace the receiver by an outward interval enclosure of { − a ∣ a ∈ X}, where X is the source entry set. Empty shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be exact: source upper/lower endpoints shall become negated lower/upper endpoints, with their respective membership interchanged. Unbounded lower/upper extents shall exchange sign and side. An inexact conversion or unsupported openness shall enlarge the result without excluding source images.

    Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Additive inversion reverses endpoint order and membership while remaining safe when the receiver is the source.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:

    template <Interval_Source From>
    I_Result neg_assign(const From& x);
    
    VERIFICATION_CRITERIA:

    Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare all finite rational endpoint orders/topologies and scalar values with the independent negated endpoint model. Include empty, source/receiver aliasing, rays, universe, same-family integer endpoints and supported directed conversion.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • 2. Ordinary interval addition and subtraction UID: PPL-SPEC-000730 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_assign(x,y) shall enclose {a + b ∣ a ∈ X, b ∈ Y}; sub_assign(x,y) shall enclose {a − b ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, these interval images shall be exact. For finite nonempty operands, addition shall use the sums of lower endpoints and upper endpoints. Subtraction shall use the first lower minus second upper endpoint, and first upper minus second lower endpoint. An extremum shall be attained exactly when both required source extrema are attained. Ordinary unbounded extents shall propagate according to these set images. Inexact conversion or unsupported openness may enlarge the result.

    Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Addition and subtraction use different endpoint pairings; subtraction must preserve the source entry endpoints under either operand alias.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:

    template <Interval_Source From1, Interval_Source From2>
    I_Result add_assign(const From1& x,const From2& y);
    template <Interval_Source From1, Interval_Source From2>
    I_Result sub_assign(const From1& x,const From2& y);
    
    VERIFICATION_CRITERIA:

    Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Compare exact rational endpoint/cell models with every finite topology and endpoint order, both operand orders, scalar forms, empty cases and each receiver alias. Check ordinary rays/universe and same-family integral arithmetic and directed integral division.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • 3. Ordinary interval multiplication UID: PPL-SPEC-000731 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    mul_assign(x,y) shall enclose {ab ∣ a ∈ X, b ∈ Y}. An empty operand shall give empty. With exact admitted endpoint operations and supported endpoint membership, the result shall be the exact interval image. For finite nonempty operands its extrema shall be the least and greatest of the four endpoint products. Endpoint membership shall account for every tied extremizer and for an attained zero in either operand; it shall not infer that zero is excluded merely because one nonzero factor approaches an excluded endpoint. Ordinary unbounded endpoints shall retain their limiting meaning, including a singleton zero multiplied by an unbounded interval. Inexact conversion or unsupported openness may enlarge the result.

    Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Multiplication needs sign-sensitive extrema and zero-attainment rules in addition to numerical endpoint products.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:

    template <Interval_Source From1, Interval_Source From2>
    I_Result mul_assign(const From1& x,const From2& y);
    
    VERIFICATION_CRITERIA:

    Check returned logical shape and definite status claims against the independently calculated image and receiver entry set, including exact operations and receiving aliases. Independently evaluate all four exact finite endpoint products and tied/zero attainment for every source topology/sign combination. Include both operand orders, scalar forms, empty and zero singletons, each receiver alias and the dedicated ordinary unbounded-zero/ray regressions.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • 4. Ordinary interval division and zero-divisor abstraction UID: PPL-SPEC-000732 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    div_assign(x,y) shall enclose {a ⁄ b ∣ a ∈ X, b ∈ Y, b ≠ 0}. An empty operand or a divisor consisting only of zero shall give empty. A divisor with negative and positive values shall give universe as the specified conservative interval abstraction, including when a tighter interval image could be representable. A divisor with only one nonzero sign, possibly with zero as an endpoint, shall retain every defined quotient; zero-denominator pairs shall not become mathematical results. The negative-and-positive divisor branch shall return I_UNIVERSE | I_SINGULARITIES. It shall not infer exactness of the quotient image from exact assignment of the universe representation.

    For finite nonempty operands whose divisor has finite endpoints strictly on one side of zero, exact admitted endpoint operations and supported membership shall give the exact interval image. Its extrema shall be the least/greatest of the four endpoint quotients; attainment shall account for all ties and an attained zero numerator. A one-sided divisor approaching zero may require an unbounded endpoint. Inexact conversion or unsupported openness may enlarge the result.

    Operands shall be initialized and valid intervals or admitted finite scalar singletons over the ordinary real carrier. The receiving policy shall admit the result, including empty and unbounded sets where required. Active rational payloads shall be canonical. The selected source/destination numerical combinations shall have well-formed underlying endpoint operations; the generic signatures shall not promise every possible cross-family instantiation. Each selected operation and all its intermediates shall satisfy the boundary type's range, resource, policy, shared-temporary and caller-owned FPU prerequisites. Separate operands shall remain unchanged. The receiver may alias an interval operand or both interval operands; scalar references shall not borrow numerical storage overwritten during the operation. Access shall be synchronized against mutation. No additional library initialization shall be required. Underlying failure shall retain the underlying numerical/allocation guarantees; a general rollback guarantee shall not be implied. Returned I_Result values shall obey the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Excluding undefined zero-denominator pairs differs from choosing a conservative universe. A zero numerator has only zero defined quotients, while a numerator and divisor both crossing zero can have every real quotient, so the same conservative branch cannot uniformly certify either exactness or inexactness.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:

    template <Interval_Source From1, Interval_Source From2>
    I_Result div_assign(const From1& x,const From2& y);
    
    VERIFICATION_CRITERIA:

    Compare four-corner rational quotient extrema and tied/zero attainment for all finite topologies with a divisor bounded away from zero. Check empty/zero divisors, negative/positive divisor signs, strict crossing with a zero numerator, one-sided zero limits, scalar forms and each receiver alias. Check directed integral quotient enclosures. Check result claims for zero, one-sided and crossing numerators over a divisor crossing zero, including both exact and inexact universe images and each receiver alias. Distinguish zero-only and empty divisors from the crossing singularity branch.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000733
    5. Ordinary interval arithmetic value operators UID: PPL-SPEC-000733 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The free binary +, -, * and / operators shall return an independent interval value of the interval operand's boundary/information type, with the corresponding semantics of 🔗 2. Ordinary interval addition and subtraction, 🔗 3. Ordinary interval multiplication and 🔗 4. Ordinary interval division and zero-divisor abstraction. They shall support two intervals of that type, an interval followed by an admitted scalar singleton, and a scalar followed by an interval. Operand order shall be preserved for subtraction and division. Separate returned values shall not share mutable owned endpoint storage with their operands.

    Operands shall satisfy the corresponding assignment operation's numerical, policy and runtime prerequisites. Operand values shall remain unchanged on successful return. Access shall be synchronized with mutation. Allocation or numerical exceptions shall propagate with the corresponding operation's guarantees. No additional library initialization shall be required.

    RATIONALE:

    Value operators must retain directed assignment semantics, operand order and independent ownership.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info> and free operators in Parma_Polyhedra_Library:

    template <typename B,typename Info>
    Interval<B,Info> operator+(const Interval<B,Info>& x,
                                const Interval<B,Info>& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator+(const Interval<B,Info>& x,const T& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator+(const T& x,const Interval<B,Info>& y);
    template <typename B,typename Info>
    Interval<B,Info> operator-(const Interval<B,Info>& x,
                                const Interval<B,Info>& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator-(const Interval<B,Info>& x,const T& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator-(const T& x,const Interval<B,Info>& y);
    template <typename B,typename Info>
    Interval<B,Info> operator*(const Interval<B,Info>& x,
                                const Interval<B,Info>& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator*(const Interval<B,Info>& x,const T& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator*(const T& x,const Interval<B,Info>& y);
    template <typename B,typename Info>
    Interval<B,Info> operator/(const Interval<B,Info>& x,
                                const Interval<B,Info>& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator/(const Interval<B,Info>& x,const T& y);
    template <typename B, typename Info, Interval_Singleton T>
    Interval<B,Info>
    operator/(const T& x,const Interval<B,Info>& y);
    
    VERIFICATION_CRITERIA:

    Exercise all twelve overload forms against independent literal rational results, including asymmetric subtraction/division, empty and zero-divisor cases. Mutate/destroy operands and returned values independently to check storage ownership; retain no-initialization and numerical configuration controls.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalarithmeticspec1.cc; tests/Box/intervalcontracts1.cc.

  • 1. Interval construction from ordinary real constraints UID: PPL-SPEC-000718 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Interval_Constraint_Source<T> shall have the truth value of std::is_convertible_v<const T&, const I_Constraint_Base&>. Constraint members shall use that classification, retaining implicit conversions and excluding inaccessible, ambiguous and explicit-only conversions.

    build() shall initialize the receiver as its universe. build(c) shall replace it with an outward interval enclosure of the values satisfying the supplied ordinary real constraint. Under exact boundary conversion and supported openness, an ordinary equality or ordered inequality shall give the exact interval predicate. Disequality shall give the interval hull of its punctured carrier, which may be universe. Unsupported endpoint strictness or inexact conversion may enlarge that enclosure.

    For this ordinary real carrier, V_LGE, V_GT_MINUS_INFINITY and V_LT_PLUS_INFINITY shall build universe without inspecting a cutoff; V_EMPTY and V_NAN shall build empty without inspecting a cutoff. Their unused cutoff storage need not be initialized or bound. The ordinary finite relations shall be V_LT, V_LE, V_GT, V_GE, V_EQ and V_NE. An included-infinity carrier shall not be inferred from these ordinary-real special-relation rules.

    build(c1,c2) shall intersect the single-constraint interval enclosures. With exact endpoint conversion, supported openness and interval-valued individual predicates, the result shall denote their exact conjunction. Otherwise it shall enclose the conjunction; taking a hull of a disequality before intersection may retain its removed point. A V_LGE constraint shall be neutral, and either V_NAN constraint shall give empty without reading its cutoff. Separate constraint objects and cutoff values shall remain unchanged.

    Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Constructing an interval from a predicate must distinguish exact interval predicates from a disconnected disequality abstraction and ignore irrelevant cutoff storage.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <typename T>
    concept Interval_Constraint_Source =
      std::is_convertible_v<const T&, const I_Constraint_Base&>;
    
    I_Result build();
    template <Interval_Constraint_Source C>
    I_Result build(const C& c);
    template <Interval_Constraint_Source C1, Interval_Constraint_Source C2>
    I_Result build(const C1& c1,const C2& c2);
    
    VERIFICATION_CRITERIA:

    Compare all ordinary relations and ordered pairs of finite constraints with independent endpoint-and-cell predicate hulls. Check universe/empty logical relations using cutoffs that fail if read, neutral/contradictory paired relations, stable separate sources, exact open endpoints and inexact rational-to-integer conversion.

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalvaluesspec1.cc; tests/intervalconstructionspec1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000719
    2. Constraint refinement through interval abstraction UID: PPL-SPEC-000719 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    add_constraint(c) shall replace receiving entry set A by an outward interval enclosure of its intersection with the interval abstraction of c described by 🔗 1. Interval construction from ordinary real constraints. The represented result shall retain every input value satisfying c and shall introduce no value outside A.

    With exact conversion, supported openness and an interval-valued constraint, the result shall be the exact set intersection. A disequality shall first be replaced by its interval hull; this refinement shall not promise removal of the excluded point when that hull fills the puncture. An unconstrained constraint shall preserve A; a false constraint shall give empty. The receiver shall be initialized and valid, and the ordinary-real carrier and admitted relation set shall follow 🔗 1. Interval construction from ordinary real constraints. Separate constraint/cutoff objects shall remain unchanged.

    Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Intersecting with a sound interval abstraction gives conservative refinement while making its disequality precision explicit.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Constraint_Source C>
    I_Result add_constraint(const C& c);
    
    VERIFICATION_CRITERIA:

    For all finite endpoint orders/topologies, compare refinement with the intersection of the original literal set and the independent constraint hull. Include empty and universe receivers, tautology, contradiction, equality, disequality, open boundaries and preserved cutoffs. Confirm satisfying-value inclusion and absence of points outside the entry interval.

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalconstructionspec1.cc.

  • PPL-SPEC-000720
    3. Independent outward endpoint extension UID: PPL-SPEC-000720 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty initialized valid receiver, lower_extend() shall replace its lower endpoint by the lower extent of the receiving carrier, and upper_extend() shall analogously replace its upper endpoint by the upper extent. The other endpoint shall remain unchanged. The result shall contain the entry interval and remain valid under its information policy.

    lower_extend(c) shall admit finite relations V_GT, V_GE and V_EQ. It shall replace the lower endpoint by the lesser of its entry endpoint and the cutoff, taking an open cutoff for V_GT and a closed cutoff otherwise. upper_extend(c) shall analogously admit V_LT, V_LE and V_EQ and take the greater endpoint, with an open cutoff for V_LT and a closed cutoff otherwise. Equal limits shall be included when either alternative includes them. Conversion shall be outward when the selected scalar cannot store a cutoff exactly.

    For either constrained overload, V_LGE shall perform the corresponding unconstrained extension without reading a cutoff; V_NAN shall preserve the receiver without reading a cutoff. Those unused cutoff values need not be initialized or bound. The ignored V_NAN overload shall also admit an empty valid receiver and preserve it. It shall return I_ANY | I_EXACT | I_UNCHANGED without certifying nonemptiness. The other admitted constrained operations shall require a nonempty receiver. Other relations shall lie outside these endpoint-extension overloads' admitted protocol. Separate cutoff sources shall remain unchanged. Endpoint metadata shall preserve unbounded extent meaning independently of an inactive payload.

    Arguments shall be live and valid constraints under 🔗 4. Interval constraints retain relation and cutoff ownership; borrowed cutoffs shall remain live and retain stable values throughout the operation. Active finite rational cutoffs shall be canonical. Receiving boundary/information policies shall admit the result, including empty values where possible. Numerical conversion, policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites shall follow the selected endpoint operations. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees. Returned I_Result values shall have the logical shape/status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Endpoint extension must enlarge one side without disturbing the other. Ignoring a descriptor preserves the represented set, including an empty set, without establishing that set's shape.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    I_Result lower_extend();
    I_Result upper_extend();
    template <Interval_Constraint_Source C>
    I_Result lower_extend(const C& c);
    template <Interval_Constraint_Source C>
    I_Result upper_extend(const C& c);
    
    VERIFICATION_CRITERIA:

    Check each admitted finite relation against independent minimum/maximum endpoint formulas, including already unbounded sides, inward/no-op cutoffs, equal open/closed limits and both signs. Check unchanged opposite endpoints, nonempty-receiver prerequisites for active extensions, source preservation and unconstrained/no-op relations with unreadable cutoffs. Check ignored descriptors on empty, singleton, proper and universe receivers; verify exact/unchanged claims and defer uncertain emptiness to the actual representation.

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalconstructionspec1.cc; tests/intervalresultsspec1.cc.

  • 1. Threshold interval widening and finite stabilization UID: PPL-SPEC-000721 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For nonempty intervals with the previous set Y contained in the receiving current set X, CC76_widening_assign(y,first,last) shall replace the receiver by an interval containing X and Y. This interface shall use the same boundary/information type for both operands. The range shall use readable, multipass bidirectional iterators. It shall be finite, sorted in nondecreasing numerical order and stable throughout the call; its finite threshold values shall be exactly representable by the boundary type. Duplicate thresholds and an empty range shall be permitted. The range shall not alias endpoint storage changed by the operation.

    A finite upper endpoint that has increased numerically from Y to X shall be replaced by the least threshold not below that endpoint, or by the upper carrier extent when no such threshold exists. A finite lower endpoint that has decreased numerically shall be replaced by the greatest threshold not above it, or by the lower carrier extent when no such threshold exists. A threshold equal to the current endpoint shall be retained. Other finite endpoints shall remain unchanged; an existing unbounded endpoint shall remain unbounded. Finite endpoint openness shall be retained when moving to a threshold. Extending to a carrier extent shall use that policy's unbounded-endpoint representation. Self-aliasing shall preserve the represented set.

    For a fixed finite threshold range and an ascending input sequence, the recurrence shall first enclose the previous widened result and the next input, then widen that enclosure against the previous widened result. Starting from a nonempty interval, this recurrence shall stabilize after finitely many changes: each endpoint can pass only through the finite threshold set and its carrier extent; endpoint membership can weaken only finitely often. This guarantee shall require exact admitted comparisons, assignments and a fixed policy/range throughout the recurrence.

    Operands shall be live, initialized and valid intervals over the declared ordinary real carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.

    RATIONALE:

    A widening needs both an upper-bound property and a finite-stabilization argument under its actual operand order and threshold discipline.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Like From, typename Iterator>
    void
    CC76_widening_assign(const From& y, Iterator first, Iterator last);
    
    VERIFICATION_CRITERIA:

    Enumerate nested ordinary rational intervals, open/closed endpoints, rays, sorted threshold sets with duplicates, exact threshold hits and exhaustion. Check independent predecessor/successor threshold choices, both inclusions, unchanged source/range and self-aliasing. Exercise pointer, vector and bidirectional-list ranges, ascending recurrences and separately inspect the finite-threshold convergence argument.

    BIBLIOGRAPHY:

    BagnaraHZ08SCP | Section 2 (journal background on PPL widening and convergence). CousotC76 | Whole work (original widening framework).

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc; tests/boxconvergencespec1.cc; tests/boxconvergenceoracle.hh; tests/boxsetoracle.hh; tests/boxconvergencepublic1.cc.

  • PPL-SPEC-000722
    2. Meet-preserving interval context simplification UID: PPL-SPEC-000722 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    simplify_using_context_assign(y) shall replace entry interval A by a valid interval S satisfying A ⊆ S and S∩C = A∩C, where C is the entry context. It shall return true exactly when that intersection is nonempty. An empty receiver or context shall return false without changing the receiver.

    For disjoint nonempty intervals, a receiver lying below its context shall retain its separating upper bound and remove its lower bound; a receiver lying above shall retain its separating lower bound and remove its upper bound. For intersecting intervals, each finite receiver bound made redundant by a finite context bound shall be removed. The operation shall not promise a unique or globally minimal representation. Endpoint membership shall be respected when deciding separation and redundancy. Self-aliasing shall be permitted and shall retain the entry-context intersection.

    Operands shall be live, initialized and valid intervals over the declared ordinary real carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.

    RATIONALE:

    Context simplification can remove bounds while preserving precisely the information relevant inside the context.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Like From>
    bool
    simplify_using_context_assign(const From& y);
    
    VERIFICATION_CRITERIA:

    Compare original/result intersections with an independent endpoint-and-cell model over every finite endpoint topology, empty sets, rays, universes and self-aliasing. Check exact Boolean meaning, whole-input inclusion, unchanged separate contexts and expected removal of redundant or nonseparating bounds.

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000723
    3. Interval construction disjoint from a supplied context UID: PPL-SPEC-000723 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    empty_intersection_assign(y) shall replace the receiver by a valid interval disjoint from the supplied entry context C. An empty context shall give universe. Otherwise it shall prefer a representable nonempty component on the lower side of C, then one on the upper side; if neither can be represented, it shall give empty. The policy shall admit an empty result. The original receiver contents shall not restrict the result, and the context may alias the receiver.

    Under exact open rational boundaries over the ordinary real carrier, a finite lower context endpoint shall give its entire lower complement component, with complementary endpoint membership; otherwise a finite upper endpoint shall give its entire upper complement component. An ordinary real universe shall give empty. More generally, conversion of a complement cutoff shall round inward to avoid context values. Where a closed-only discrete boundary type must exclude an exact cutoff, the adjacent representable boundary shall be used when available. For dense closed-only rational boundaries at a closed context endpoint, no inclusion-maximal cutoff exists; the deterministic interior cutoff shall differ by one toward the selected component's interior. Included infinities shall be considered only under policies that admit and represent them; a lone infinity may itself form a representable complement component. An unrepresentable component shall not be reported as nonempty.

    Operands shall be live, initialized and valid intervals over the declared declared carrier. Active rational payloads shall be canonical. The selected numerical operations shall satisfy their range, resource, policy, shared-temporary and caller-owned FPU prerequisites. The result shall be admitted by the receiving boundary/information policy. Access shall be synchronized with modification. Separate interval sources shall remain unchanged. No additional library initialization shall be required. Underlying numerical or allocation failure shall retain the underlying operation's guarantees; no general rollback guarantee shall be implied.

    RATIONALE:

    Constructing a disjoint interval requires inward conversion and a deterministic component choice; dense closed-only rational boundaries do not support a universal maximal-cutoff promise.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Like From>
    void
    empty_intersection_assign(const From& y);
    
    VERIFICATION_CRITERIA:

    Check exhaustive ordinary rational contexts against literal complement components, including every open/closed boundary, rays, empty/universe, independent old receiver values and self-aliasing. Check cross-boundary inward rounding, closed integer/floating adjacent cutoffs, bounded endpoint exhaustion, dense closed rational fallback and admitted infinity singletons with the existing dedicated interval regressions.

    SOURCE:

    src/Interval_defs.hh; src/Interval_templates.hh; tests/intervalcontextspec1.cc; tests/Box/intervalcontracts1.cc.

  • 1. Interval result possibilities and status-flag set operations UID: PPL-SPEC-000681 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    I_Result shall encode possible result shapes using independent bits: I_EMPTY = 1, I_SINGLETON = 2, I_SOME = 4 for a nonsingleton non-universe result, and I_UNIVERSE = 8. I_NOT_EMPTY shall be their three nonempty alternatives, I_ANY all four alternatives, I_NOT_UNIVERSE the first three and I_NOT_DEGENERATE the singleton and nonsingleton non-universe alternatives. A set shape bit shall mean that shape remains possible, not that every named possibility is established.

    Independent status bits shall be I_EXACT = 16, I_INEXACT = 32, I_CHANGED = 64, I_UNCHANGED = 128 and I_SINGULARITIES = 256. They shall mean definite exactness, definite inexactness, definite set change, definite absence of set change, and undefined combinations of operand values, respectively. Their absence shall not establish the corresponding opposite claim. The operation producing a result shall determine which claims it establishes.

    For bit sets A, B within these nine positions, a | b shall encode A∪B, a & b shall encode A∩B, and a - b shall encode A⧵B. These operators shall not reconcile logically conflicting claims or mutate their operands. They shall require no numerical or library initialization.

    combine(lower, upper) shall accept numerical endpoint Result values and return I_ANY with no definite status claim. Numerical endpoint outcomes alone shall not establish interval shape, set-operation exactness or entry-to-result change. In particular, numerical V_EQ outcomes shall not be reinterpreted as logical I_EMPTY or I_CHANGED bits.

    RATIONALE:

    Shape alternatives and definite status claims occupy separate fields. Numerical endpoint equality does not establish the exactness of a disconnected union or difference, and does not compare an operation result with the receiving entry set.

    INTERFACE:

    Internal helper headers: intervals_defs.hh and Interval_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.

    enum I_Result {
      I_EMPTY = 1U, I_SINGLETON = 2U, I_SOME = 4U, I_UNIVERSE = 8U,
      I_NOT_EMPTY = I_SINGLETON | I_SOME | I_UNIVERSE,
      I_ANY = I_EMPTY | I_NOT_EMPTY,
      I_NOT_UNIVERSE = I_EMPTY | I_SINGLETON | I_SOME,
      I_NOT_DEGENERATE = I_SINGLETON | I_SOME,
      I_EXACT = 16, I_INEXACT = 32, I_CHANGED = 64,
      I_UNCHANGED = 128, I_SINGULARITIES = 256
    };
    I_Result operator|(I_Result a, I_Result b);
    I_Result operator&(I_Result a, I_Result b);
    I_Result operator-(I_Result a, I_Result b);
    I_Result combine(Result lower, Result upper);
    
    VERIFICATION_CRITERIA:

    Check every named encoding and every pair of nine-bit sets against independent Boolean-vector union, intersection and difference oracles. Check numerical result pairs, including rounded, overflow, exceptional and both infinity outcomes, produce only unknown logical shape possibilities. Check the resulting records through actual scalar assignment and logical emptiness consumers.

    SOURCE:

    src/intervals_defs.hh; src/Interval_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc; tests/intervalresultsspec1.cc.

  • 3. Interval-constraint relation adapter preserves supported relation codes UID: PPL-SPEC-000683 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    I_Constraint_Rel constructed from a supported Relation_Symbol shall preserve its numerical relation encoding: equality, strict/nonstrict less, strict/nonstrict greater and disequality shall correspond to V_EQ, V_LT, V_LE, V_GT, V_GE and V_NE. Construction from Result shall require a defined result code satisfying result_relation_class(result) == result; it shall retain that code unchanged. Codes with unrelated status fields shall not meet that precondition.

    Its public rel member and conversion to Result shall return the stored code; ordinary copying and assignment shall retain it independently. No cutoff value or numerical initialization shall be required. Interpreting that relation with a cutoff shall follow the selected constraint operation's supported relation/class prerequisites.

    RATIONALE:

    Relation symbols and numerical relation/class codes need one explicit bridge without accidentally treating unrelated status flags as a cutoff relation.

    INTERFACE:

    Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint.

    struct I_Constraint_Rel {
      Result rel;
      I_Constraint_Rel(Result result);
      I_Constraint_Rel(Relation_Symbol symbol);
      operator Result() const;
    };
    
    VERIFICATION_CRITERIA:

    Check all six symbol mappings and the defined projection-valid finite/infinite codes, copied values and conversion results without initialization.

    SOURCE:

    src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc.

  • PPL-SPEC-000709
    1. Exact interval integer-point existence UID: PPL-SPEC-000709 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an initialized valid interval with represented set I, contains_integer_point() shall return true exactly when I∩ℤ ≠ ⌀. Empty intervals shall return false; ordinary real-unbounded nonempty intervals shall return true. A singleton at positive or negative infinity shall return false: an admitted extended infinite value shall not be classified as an integer.

    For finite bounds l, u, the least admitted integer shall be ⌈l⌉ for a closed lower endpoint and ⌊l⌋ + 1 for an open lower endpoint. The greatest admitted integer shall be ⌊u⌋ for a closed upper endpoint and ⌈u⌉ − 1 for an open upper endpoint. The query shall report whether that least integer exceeds the greatest integer, returning false exactly in that case. It shall preserve boundary values and metadata.

    The finite ceil/floor values and unit adjustments used to establish this exact decision shall be representable exactly by the boundary scalar, and their numerical operations shall satisfy the scalar's policy, resource, shared-temporary and caller-owned FPU prerequisites. Rational values shall be canonical. Inspection shall be synchronized with modification of the interval. The query shall require no additional library initialization.

    RATIONALE:

    A complete integer-point decision must account for strict endpoint membership and distinguish an included infinite value from an unbounded range of finite numbers.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    bool contains_integer_point() const;
    
    VERIFICATION_CRITERIA:

    Compare open/closed rational endpoint pairs with independent arbitrary- precision floor/ceiling integer bounds. Cover empty intervals, finite singletons, intervals between consecutive integers, positive/negative fractions, closed-only and integer-bound presets, rays, universe and admitted signed infinity singletons. Exercise supported native floating boundaries within the exact arithmetic range and confirm source preservation.

    SOURCE:

    src/Interval_defs.hh; tests/intervalintegerspec1.cc.

  • 2. Interval endpoint normalization around integer points UID: PPL-SPEC-000710 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() shall preserve every integer point of the receiving interval while replacing effective finite endpoints by closed integral endpoints. Empty intervals shall remain unchanged. A finite closed lower bound l shall become ⌈l⌉; a finite open lower bound shall become ⌊l⌋ + 1. A finite closed upper bound u shall become ⌊u⌋; a finite open upper bound shall become ⌈u⌉ − 1.

    For an ordinary real interval, these replacements shall yield the interval hull of its integer points, becoming empty when no integer point remains. Unbounded endpoints shall retain their unbounded meaning without requiring evaluation of an inactive numerical payload. Normalization shall be idempotent and may retain noninteger interior values between distinct integer endpoints. For a policy admitting infinity as an element, the operation shall preserve the extended endpoint values; it shall not establish that every retained element is an integer or that its result is the least interval hull of the finite integer points.

    The interval shall be initialized and valid, and its policy shall admit any resulting empty value. Active finite numerical payloads shall be initialized. The relevant rounded integers and unit adjustments shall be representable exactly for the stated exact endpoint guarantee. Numerical policy, resources, shared-temporary serialization and caller-owned FPU state shall satisfy the scalar floor/ceiling and unit-arithmetic contracts. Callers shall synchronize modification. The operation shall require no additional library initialization; underlying numerical failure shall retain the scalar operation's guarantees.

    RATIONALE:

    Rounding the effective endpoints removes finite boundary portions that cannot contain an integer while retaining all integer solutions. A convex interval can still contain noninteger interior values.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    void drop_some_non_integer_points();
    
    VERIFICATION_CRITERIA:

    Check independent exact floor/ceiling endpoint formulas on exhaustive quarter-grid rational intervals with all endpoint topologies. Confirm preserved integer membership, closed effective endpoints, empty results and idempotence. Include rays, universe, integer-bound and closed-only presets, supported native floating formats within the exact range, and the stated retention of admitted extended endpoints.

    SOURCE:

    src/Interval_defs.hh; tests/intervalintegerspec1.cc.

  • PPL-SPEC-000716
    1. Existential interval relation refinement UID: PPL-SPEC-000716 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For receiving entry set A, witness set B and relation R, refine_existential(rel, x) shall produce an outward interval enclosure of

    {a ∈ A ∣ ∃b ∈ B : a R b}.

    With exact endpoint conversion and supported membership distinctions, the result shall be the least receiving-profile interval containing that set. An empty witness shall produce empty. Equality shall reduce to intersection. Disequality with a nonsingleton witness shall preserve A; disequality with a singleton shall remove that point before taking the interval hull. For finite ordered witnesses, strict inequalities shall use the opposite extreme regardless of its attainment: strict less-than uses the supremum and strict greater-than the infimum, excluding that limit. For a nonstrict inequality, that limit shall be retained exactly when the witness attains it. Unbounded finite ranges shall remain distinct from included infinite values under an extended carrier.

    The admitted relations shall be LESS_THAN, LESS_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, EQUAL and NOT_EQUAL. Unsupported openness or inexact boundary conversion may enlarge the exact filtered hull, but shall not exclude any value that satisfies the stated quantified predicate.

    The receiver and any interval operand shall be initialized and valid, with compatible ordered carriers. The receiving policy shall admit empty results where possible. Scalar witnesses shall denote admitted singleton values. Active payloads shall be initialized and rational payloads canonical. Boundary conversions and comparisons shall satisfy the numerical policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall retain their meaning without requiring numerical evaluation of their payloads. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical failure shall propagate with the scalar operation's guarantees, without a universal rollback promise.

    The receiver may alias the witness interval. The result shall use both operands' entry sets; a distinct witness shall remain unchanged. The returned I_Result shall obey the logical shape and status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Existential filtering keeps a value whenever at least one witness satisfies the relation. Strictness and attainment determine whether the limiting value itself survives.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source From>
    I_Result
    refine_existential(Relation_Symbol rel, const From& x);
    
    VERIFICATION_CRITERIA:

    Compare all six relations against independent exact endpoint predicates, then take the hull of the retained literal endpoint-and-open-cell set. Include empty and singleton witnesses, all finite endpoint topologies, rays and universe, scalar witnesses, distinct-source preservation and receiver aliasing. Check limiting-value attainment for strict and nonstrict inequalities. Exercise policies admitting signed infinity values separately from ordinary unbounded finite intervals, and outward conversion where exact representation is unavailable.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalrefinementspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000717
    2. Universal interval relation refinement UID: PPL-SPEC-000717 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For receiving entry set A, witness set B and relation R, refine_universal(rel, x) shall produce an outward interval enclosure of

    {a ∈ A ∣ ∀b ∈ B : a R b}.

    With exact endpoint conversion and supported membership distinctions, the result shall be the least receiving-profile interval containing that set. An empty witness shall preserve A by vacuity. A nonempty witness shall leave an empty receiver empty. Equality shall yield empty for a nonsingleton witness and intersection for a singleton. Disequality shall produce an enclosure of the interval hull of A⧵B. For ordinary finite ordered witnesses, strict less-than shall use the infimum and admit that limit exactly when the witness does not attain it; strict greater-than shall analogously use the supremum. Nonstrict less-than and greater-than shall admit the corresponding limiting value. Infinite extrema shall be interpreted through their endpoint membership and carrier; a metadata-encoded unbounded endpoint shall not be treated as a finite stored payload.

    The admitted relations shall be LESS_THAN, LESS_OR_EQUAL, GREATER_THAN, GREATER_OR_EQUAL, EQUAL and NOT_EQUAL. Unsupported openness or inexact boundary conversion may enlarge the exact filtered hull, but shall not exclude any value that satisfies the stated quantified predicate.

    The receiver and any interval operand shall be initialized and valid, with compatible ordered carriers. The receiving policy shall admit empty results where possible. Scalar witnesses shall denote admitted singleton values. Active payloads shall be initialized and rational payloads canonical. Boundary conversions and comparisons shall satisfy the numerical policy, finite-range, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall retain their meaning without requiring numerical evaluation of their payloads. Access shall be synchronized against modification. No additional library initialization shall be required. Underlying numerical failure shall propagate with the scalar operation's guarantees, without a universal rollback promise.

    The receiver may alias the witness interval. The result shall use both operands' entry sets; a distinct witness shall remain unchanged. The returned I_Result shall obey the logical shape and status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    RATIONALE:

    Universal filtering uses the most restrictive witness and preserves all receiver values for an empty witness set. The limit can satisfy a strict relation when every witness lies strictly beyond it.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source From>
    I_Result
    refine_universal(Relation_Symbol rel, const From& x);
    
    VERIFICATION_CRITERIA:

    Compare all six relations against independent exact endpoint predicates, then take the hull of the retained literal endpoint-and-open-cell set. Include empty and singleton witnesses, all finite endpoint topologies, rays and universe, scalar witnesses, distinct-source preservation and receiver aliasing. Check limiting-value attainment for strict and nonstrict inequalities. Exercise policies admitting signed infinity values separately from ordinary unbounded finite intervals, and outward conversion where exact representation is unavailable.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalrefinementspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000711
    1. Interval assignment and directed enclosure UID: PPL-SPEC-000711 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    assign(x) shall replace the receiving interval by an outward enclosure of the source singleton or interval, using the receiving boundary and information policies. An empty source shall produce an empty interval. When both endpoints and their membership distinctions are representable exactly, assignment shall preserve the represented set. Otherwise its converted lower endpoint shall not exclude source values below it and its converted upper endpoint shall not exclude source values above it; unsupported strictness may be relaxed. Source infinity membership shall remain distinct from an unbounded finite range under policies that admit that distinction. Self-assignment shall preserve the represented set. A separate source shall remain unchanged.

    assign(EMPTY) shall establish empty denotation; assign(UNIVERSE) shall establish the entire declared carrier. Assignment from admitted MINUS_INFINITY or PLUS_INFINITY shall establish the corresponding singleton. set_infinities() shall establish the interval from included negative infinity to included positive infinity; these operations shall require a policy that admits those included values. The templated assignment operator shall perform the corresponding assignment and return the receiving object. Constructors delegating to these assignments shall establish the same set.

    Returned I_Result values shall obey the logical shape and status meanings of 🔗 1. Interval result possibilities and status-flag set operations; only established claims shall be reported.

    The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.

    RATIONALE:

    Assignment must distinguish mathematical set preservation from outward endpoint conversion when source and destination policies differ.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    I_Result assign(Degenerate_Element e);
    template <Special_Marker From>
    I_Result
    assign(const From& value);
    I_Result set_infinities();
    template <Interval_Source From>
    I_Result assign(const From& x);
    template <Interval_Source T>
    Interval& operator=(const T& x);
    
    VERIFICATION_CRITERIA:

    Check empty, universe, finite singleton, all finite endpoint topologies, rays and self-assignment. Compare exact same-profile results with an independent real-set model. Check inexact rational-to-integer enclosure, separate-source preservation and admitted included-infinity assignments. For scalar two, self-assignment, copied intervals, both included infinities and rounded conversions, check every returned definite claim against the independently known resulting set and entry-to-result change. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.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-000712
    2. Interval hull assignment UID: PPL-SPEC-000712 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry sets X, Y, join_assign(x,y) shall produce an outward enclosure of their interval hull hull(X∪Y). join_assign(x) shall use the receiving interval's entry set as X and the argument's set as Y. Empty operands shall be neutral. Under exact endpoint conversion with supported membership conditions, the result shall be the least interval of the receiving profile that contains both input sets. Equal limiting endpoints shall be included when either input includes that endpoint. A gap between the sets may be filled by the hull.

    The receiver may alias either or both interval arguments. Results shall use their entry values, and distinct sources shall remain unchanged. Returned I_Result claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations; a conversion result shall not falsely establish exactness or a particular shape.

    The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.

    RATIONALE:

    The interval join is the least enclosing interval when representable; it need not equal a disconnected union.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source From>
    I_Result join_assign(const From& x);
    template <Interval_Source From1, Interval_Source From2>
    I_Result join_assign(const From1& x, const From2& y);
    
    VERIFICATION_CRITERIA:

    Check disconnected unions with exact endpoints without inferring exactness of the literal union. Check returned claims for changed results, receiver aliases and empty-source no-ops. Compare the hull of literal endpoint-and-open-cell unions against both overloads, with empty, universe, disjoint, nested and touching sets, every endpoint topology, rays and each receiver alias. Check source preservation and mixed scalar operands. Check directed enclosure when endpoint conversion is inexact.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000713
    3. Geometric interval union gap decision UID: PPL-SPEC-000713 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    can_be_exactly_joined_to(x) shall return true exactly when the union of the receiving interval and the argument is itself an interval: there shall be no omitted point or gap between their represented sets. Touching finite limits shall join without a gap when at least one touching endpoint is included. Two open limits at that same finite value shall leave a gap. Neither operand shall be changed.

    Both operands shall be nonempty, and neither shall be a singleton at an included infinity. They shall have compatible ordered carriers for their comparison operations. The decision shall concern their geometric union; it shall not certify that an endpoint of a different scalar or information policy can be represented exactly by the receiving interval's policy.

    The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.

    RATIONALE:

    Gap detection and endpoint representability are different properties. Conflating them could incorrectly certify a rounded hull as an exact union.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source Type>
    bool can_be_exactly_joined_to(const Type& x) const;
    
    VERIFICATION_CRITERIA:

    Compare with literal unions of independent endpoint-and-cell sets. Cover finite and unbounded overlapping, separated, contained and touching intervals, all four touching endpoint topologies and source preservation. Include a gap-free mixed-boundary union whose limiting endpoint is not exactly representable by the receiver.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000714
    4. Interval intersection assignment UID: PPL-SPEC-000714 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry sets X, Y, intersect_assign(x,y) shall produce an outward enclosure of X∩Y under destination endpoint conversion. intersect_assign(x) shall use the receiving interval's entry set as X. For exactly representable endpoints and supported membership conditions, the result shall denote the exact intersection. Equal limiting endpoints shall be included only when both operands include them. Disjoint sets and any empty operand shall produce an empty interval when that result is admitted.

    The receiver may alias either or both interval arguments; the result shall use their entry values and preserve distinct sources. On success the return shall be I_EMPTY exactly when the represented result is empty and I_NOT_EMPTY otherwise. This shape indication shall not assert that a cross-policy rounded enclosure equals the mathematical intersection.

    The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.

    RATIONALE:

    Intersection requires both endpoint membership conditions and an explicit emptiness outcome, including when the receiver aliases an input.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source From>
    I_Result intersect_assign(const From& x);
    template <Interval_Source From1, Interval_Source From2>
    I_Result intersect_assign(const From1& x, const From2& y);
    
    VERIFICATION_CRITERIA:

    Compare both overloads with literal endpoint-and-cell intersection. Include empty and universe operands, all relative endpoint orders and topologies, rays, singleton intersections, source preservation and each receiver alias. Check the returned shape and mixed-boundary outward enclosure.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc.

  • PPL-SPEC-000715
    5. Interval enclosure of set difference UID: PPL-SPEC-000715 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For entry sets X, Y, difference_assign(x,y) shall produce an outward enclosure of hull(X⧵Y). difference_assign(y) shall use the receiving interval's entry set as X. For exact endpoints with supported complementary openness, the result shall be the least interval containing the literal set difference. Removing all of X shall yield empty; removing nothing shall preserve X. Removing an interior interval while leaving nonempty portions on both sides shall preserve the hull across the removed interior. A removed included endpoint shall become excluded, and a removed open limit shall remain included when it belongs to X. Endpoint conversion or unsupported openness may enlarge that exact hull under the receiving policy; it shall not exclude a surviving value.

    The receiver may alias either or both interval arguments. Results shall use entry values and distinct sources shall remain unchanged. Returned I_Result claims shall have the meanings of 🔗 1. Interval result possibilities and status-flag set operations; no shape or exactness claim shall be inferred from unestablished endpoint conversion information.

    The receiving interval shall have a policy that admits the result, including empty values where possible. Operands shall be initialized and valid; scalar operands shall denote admitted singleton values. Active numerical payloads shall be initialized and rational payloads canonical. The selected scalar operations shall meet their finite-range, policy, resource, shared-temporary and caller-owned FPU prerequisites. Inactive metadata-encoded endpoints shall not require evaluation as numerical values. Access shall be synchronized with modification. No additional library initialization shall be required. Underlying numerical or allocation failure shall propagate with the underlying operation's guarantees; there shall be no universal rollback guarantee.

    RATIONALE:

    A literal difference can be disconnected. Its interval abstraction must preserve surviving values and use complementary membership at a newly exposed limit.

    INTERFACE:

    Public header: <ppl.hh>; members of Parma_Polyhedra_Library::Interval<Boundary, Info>:

    template <Interval_Source From>
    I_Result difference_assign(const From& x);
    template <Interval_Source From1, Interval_Source From2>
    I_Result difference_assign(const From1& x, const From2& y);
    
    VERIFICATION_CRITERIA:

    Compare both overloads with the hull of literal endpoint-and-cell difference. Include empty operands, containment, equality, disjointness, left/right truncation, interior holes, all touching topologies, rays, universe, singleton removal and each receiver alias. Check distinct sources remain unchanged and mixed-policy results enclose surviving values. Check returned shape, exactness and change claims for interior holes, removed-all cases and no-op differences against the literal difference and receiving entry set.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; tests/intervalsetsspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalresultsspec1.cc.

  • PPL-SPEC-000724
    1. Interval construction from a scalar numeric literal UID: PPL-SPEC-000724 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Interval(s) shall enclose the scalar denoted by the numeric string s, parsing under the selected boundary type's numeric syntax and rounding the lower endpoint downward and the upper endpoint upward. An exactly representable finite scalar shall give its singleton when the policy admits it. Inexact endpoint conversion shall give an outward enclosure, with supported endpoint strictness reflecting strict conversion. Under policies that admit and represent an exact signed infinity as a point, an exact infinity literal shall give that signed singleton. Infinity used only as an unbounded endpoint shall retain the receiving carrier's meaning. Unknown numeric syntax and a rejected NaN literal shall throw std::invalid_argument. This constructor shall parse a scalar numeric literal rather than bracketed interval text; the scalar syntax and conversion rules shall follow 🔗 1. Exact finite numeric token syntax through 🔗 4. Numeric text input into supported native floating destinations. The source bytes shall remain unchanged.

    Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.

    RATIONALE:

    A scalar literal and a bracketed interval use different input interfaces, while conversion must retain a sound numerical enclosure.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.

    explicit Interval(const char* s);
    
    VERIFICATION_CRITERIA:

    Check exact integers, canonical fractions, decimal/scaled forms, inexact rational-to-integer conversion, unknown/truncated syntax and admitted signed infinity literals. Compare literal mathematical endpoints and unchanged source text.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.

  • PPL-SPEC-000725
    2. Readable interval presentation and output delivery UID: PPL-SPEC-000725 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Insertion with operator<< shall return the supplied stream and leave the interval's mathematical value unchanged. It shall print an empty interval as []. A singleton shall be printed through its scalar lower endpoint without interval brackets. Otherwise it shall print a lower bracket, the lower endpoint, , ``, the upper endpoint and an upper bracket; open endpoints shall use parentheses and closed endpoints square brackets. Metadata-encoded lower/upper infinities shall print as ``-inf and +inf without reading their inactive numerical payloads. Other endpoints shall use the numeric output rules of 🔗 5. Mathematical numeric output and stream delivery status.

    The interval shall be initialized and valid. Formatting and delivery failure shall follow the supplied stream and selected scalar output operations. The returned stream state shall report delivery failure under ordinary stream rules; no independent Boolean status or machine-reload guarantee shall be implied. In particular, singleton presentation shall not be a bracketed input record under 🔗 3. Bracketed interval stream parsing and rejection.

    Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.

    RATIONALE:

    Readable singleton output is intentionally scalar text; machine persistence has its own framed interface.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.

    template <typename Boundary, typename Info>
    std::ostream& operator<<(std::ostream& os,
                             const Interval<Boundary, Info>& x);
    
    VERIFICATION_CRITERIA:

    Check exact ordinary empty, singleton, bounded open/closed and ray presentations, inactive metadata endpoints, unchanged denotation, returned stream identity and both returning and throwing delivery failures.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.

  • PPL-SPEC-000726
    3. Bracketed interval stream parsing and rejection UID: PPL-SPEC-000726 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Extraction with operator>> shall consume a bracketed interval record and return the supplied stream. It shall recognize leading whitespace, [] for empty, or a lower [/(, numeric lower endpoint, comma, numeric upper endpoint and closing ]/). Whitespace may surround numeric tokens and delimiters. It shall leave subsequent records or suffix text available. Scalar singleton text without brackets shall not satisfy this grammar.

    Valid finite records shall be enclosed using downward lower conversion and upward upper conversion, respecting supported requested openness and strict conversion. Reversed finite endpoints, or coincident exact finite endpoints with either endpoint excluded, shall denote empty when the policy admits empty. An exact coincident signed-infinity pair shall denote its singleton only when both endpoints are closed and the boundary/information policy admits and represents that point; excluding either endpoint shall give empty under those policies. Unbounded finite ranges and included infinity points shall remain distinct according to the receiving carrier.

    Malformed syntax, missing delimiters/endpoints and rejected NaN endpoints shall set failbit and return the supplied stream, or throw according to its exception mask. The destination shall remain unchanged for a syntactic failure before a complete accepted record has been parsed. Successful parsing shall establish the record's interval independently of the preceding destination value; a default-constructed destination shall be admissible. Underlying numerical or allocation exceptions shall retain their own state guarantees. No general rewind of consumed input shall be promised.

    Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.

    RATIONALE:

    Bracketed input needs framing, directed conversion and a defined distinction between syntactic failure and numerical exceptions.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.

    template <typename Boundary, typename Info>
    std::istream& operator>>(std::istream& is,
                             Interval<Boundary, Info>& x);
    
    VERIFICATION_CRITERIA:

    Enumerate endpoint topologies, exact and fractional cuts, empty/reversed/coincident records, leading whitespace and suffix/multiple records. Check malformed/truncated input, preserved initialized destination on syntactic failure, exception-mask behavior, recovery by replacing the stream, and admitted infinity-point/open-infinity cases.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc.

  • 4. Reloadable interval metadata and endpoint export UID: PPL-SPEC-000727 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_dump(s) shall export one interval record as the labels info, lower and upper in that order, separated from their metadata/payload values by spaces, followed by a newline. Metadata shall use 🔗 8. Metadata ASCII representation and stream failure states, and active endpoints shall use their scalar ASCII representation under 🔗 1. Exact scalar ASCII persistence through 🔗 4. Scalar ASCII stream delivery and failure handling. A metadata-encoded SPECIAL endpoint shall instead have canonical zero payload, without inspecting its inactive numerical storage. The represented set and all active endpoint values shall remain unchanged; inactive payload bytes need not be preserved.

    The source shall be initialized and valid. The record shall be reloadable with the corresponding interval type, compatible metadata/number formats and compatible stream formatting under 🔗 5. Compatible interval record loading and partial failure state. Stream failure shall be observable through its state or configured exception mask; output shall not report a separate success value.

    Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.

    RATIONALE:

    Machine export must preserve interval metadata and avoid reading numerical storage whose value is carried entirely by metadata.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.

    void ascii_dump(std::ostream& s) const;
    
    VERIFICATION_CRITERIA:

    Round-trip every ordinary endpoint topology, rays, empty/universe and finite singleton records; inspect exact label order, newline framing, metadata and canonical inactive payloads. Check concatenation, source preservation and returning/throwing output failures.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc; tests/intervalcodecspec1.cc; tests/inactiveboundcodec.hh.

  • 5. Compatible interval record loading and partial failure state UID: PPL-SPEC-000728 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ascii_load(s) shall read info, its metadata representation, lower, its scalar payload, upper and its scalar payload in order. It shall return true after the complete compatible record is loaded, leaving subsequent records or suffix tokens available. Loading a complete record exported by 🔗 4. Reloadable interval metadata and endpoint export under compatible formatting shall preserve its mathematical set, endpoint membership and metadata meaning. Canonical inactive zero payloads shall not replace the infinity meaning carried by SPECIAL flags.

    The stream shall carry a representation compatible with the receiving boundary/information types, including an admitted metadata/payload combination whenever loading succeeds. This low-level record interface shall not promise validation of arbitrary metadata claims or cross-type, cross-version or cross-platform format compatibility. An existing initialized destination or a default-constructed destination with live storage shall be admissible for a complete compatible replacement.

    An absent or wrong label, failed component extraction, or failed check of 🔗 3. Interval shape and endpoint classification shall return false. Input may have been consumed and the destination may contain partially loaded components. A rollback or usable mathematical interval shall not be assumed. Before subsequent mathematical use, the caller shall establish a valid complete value, for example by a successful compatible replacement. Stream exceptions shall propagate according to the configured mask, with partial state permitted. Metadata/scalar parsing shall retain their own formatting and failure guarantees.

    Clients shall supply live streams or a live null-terminated input string as applicable. Stream access and interval mutation shall be synchronized. The selected boundary/information policies shall admit the intended result; active numerical values shall satisfy their own range, canonical-form, resource and caller-owned FPU prerequisites. No additional library initialization shall be required. Allocation exceptions shall propagate. Stream/scalar exceptions shall follow those operations and the stream exception mask; exceptions escaping them shall propagate. Partial input/output may remain.

    RATIONALE:

    A staged low-level loader can preserve complete exported records without promising transactional replacement or validation of all possible raw metadata words.

    INTERFACE:

    Public header: <ppl.hh>; member excerpts apply to Parma_Polyhedra_Library::Interval<Boundary, Info>; stream operators belong to Parma_Polyhedra_Library.

    bool ascii_load(std::istream& s);
    
    VERIFICATION_CRITERIA:

    Check exact same-type record round trips and all metadata/active boundary meanings; load into distinct preceding values and fresh storage. Check each missing/wrong label, each failed/truncated endpoint, suffix preservation, sequential loads, recovery through a complete replacement and exception-enabled input.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Interval_templates.hh; tests/intervaltextspec1.cc; tests/Box/intervalcontracts1.cc; tests/intervalinfinityscalartext1.cc; tests/intervalcodecspec1.cc; tests/inactiveboundcodec.hh.

  • 1. Interval types, initial storage and independent value copies UID: PPL-SPEC-000701 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Interval<Boundary, Info> shall own two boundary objects and one metadata object, expose their types as boundary_type and info_type, and use Info to select endpoint openness, special boundary representations and admitted empty/extended values. A metadata-based special-boundary encoding shall not be combined with a boundary type whose numerical limits already provide infinity. Rational_Interval shall use canonical mpq_class boundaries with open endpoints available. Integer_Interval shall use mpz_class boundaries with closed endpoints. Both presets shall admit empty intervals and represent unbounded endpoints through metadata; their concrete intervals shall exclude infinity as an element.

    Default construction shall default-construct the owned boundary and metadata objects. It shall not establish a common empty or universe value across all boundary types. Callers shall initialize an interval with a supported construction, assignment or build operation before using its numerical value. Construction from a supported scalar, interval or degenerate element shall have the value meaning of the corresponding assignment operation.

    Interval_Singleton<T> and Interval_Like<T> shall have the truth values of Is_Singleton<T>::value and Is_Interval<T>::value. Interval_Source<T> shall classify their union, preserving existing trait specializations and qualifier rules. The default interval classification shall retain implicit const-reference conversions to Interval_Base and exclude inaccessible, ambiguous and explicit-only conversions. These classifications shall not impose Boolean regularity on symbolic types. The forwarding constructor shall participate when overload resolution makes the receiver's existing assign(source) operation available. Sources without an admitted assignment overload shall be excluded. This admission check shall not instantiate the assignment body or extend the underlying endpoint operations' supported combinations. The separate scalar-text constructor shall remain available.

    Copy construction and same-type copy assignment of initialized valid intervals shall preserve the represented interval, active boundary values and metadata. Their owned storage shall be independent; changing or destroying one object shall not change the other's value. Same-object assignment shall preserve the value and return that object's reference. Distinct-object copy assignment shall return the destination reference. Destruction shall release the owned boundary and metadata objects. Copying shall require the resources and failure guarantees of their ordinary scalar/metadata copies; no strong rollback guarantee shall be inferred when an underlying copy throws.

    Boundary values and metadata shall satisfy their numerical and representation contracts. Source/destination objects shall be live and initialized for any operation that reads their values. Callers shall synchronize overlapping modifications and respect the scalar operations' shared-temporary and FPU prerequisites. Storage construction and same-type copying shall add no library-initialization or numerical-rounding prerequisite.

    RATIONALE:

    Explicit ownership and initial-state rules permit temporary storage without making an uninitialized native endpoint into a usable numerical value. Copies preserve independently mutable interval values.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    template <typename T>
    concept Interval_Singleton = bool(Is_Singleton<T>::value);
    template <typename T>
    concept Interval_Like = bool(Is_Interval<T>::value);
    template <typename T>
    concept Interval_Source =
      bool(Is_Singleton<T>::value || Is_Interval<T>::value);
    
    template <typename Boundary, typename Info> class Interval;
    typedef Interval<mpq_class, Rational_Interval_Info> Rational_Interval;
    typedef Interval<mpz_class, Integer_Interval_Info> Integer_Interval;
    
    Interval();
    template <typename T>
      requires requires (Interval& target, const T& value) {
        target.assign(value);
      }
    explicit Interval(const T& source);
    Interval(const Interval& source);
    Interval& operator=(const Interval& source);
    ~Interval();
    
    VERIFICATION_CRITERIA:

    Check positive and negative source/constraint admission, trait specializations, implicit versus inaccessible/ambiguous/explicit conversions, forwarding and text constructor participation. Check preset type/policy traits, initialization before native reads, independent copies and assignments, self-assignment, source destruction, open endpoints, empty/universe values and large GMP endpoint allocation. Check each configured binding alias with finite rational range crossings, outward enclosure, independent equal-box intersection and empty-box join.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc; tests/commonhelpersspec1.cc; tests/numericpublic1.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-000702
    2. Interval endpoint and metadata references UID: PPL-SPEC-000702 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live interval, mutable lower(), upper() and info() shall return references to its owned lower boundary, upper boundary and metadata objects. Their const overloads shall return const references to those same objects, without copying or changing them. The references shall retain their owner storage identities across value assignments and swaps and shall remain valid until the owner is destroyed.

    Callers that read an endpoint shall ensure that its payload is initialized and meaningful for the current representation. A metadata-encoded unbounded endpoint shall not imply a readable numerical payload. Callers that mutate an endpoint or metadata directly shall establish a valid complete representation, including canonical rational values and consistent openness and special-boundary flags, before another interval operation reads it. Direct mutation shall not automatically perform numerical conversion, normalize the interval or repair other fields.

    Access itself shall require no library initialization or FPU setup. Reads shall be synchronized with overlapping owner modification; numerical writes shall obey the written scalar's prerequisites.

    RATIONALE:

    Borrowed storage references permit controlled endpoint updates while retaining ownership and making representation responsibilities explicit.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    Boundary& lower();
    const Boundary& lower() const;
    Boundary& upper();
    const Boundary& upper() const;
    Info& info();
    const Info& info() const;
    
    VERIFICATION_CRITERIA:

    Check reference types/address identity, const/mutable correspondence, retained identities after assignments/swaps, valid canonical endpoint mutation and explicit metadata changes without implicit normalization.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • 3. Interval shape and endpoint classification UID: PPL-SPEC-000703 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an initialized valid interval, is_empty() shall report whether its lower/upper endpoint predicates admit no common value; is_singleton() shall report a single admitted value. Openness at equal finite endpoints shall distinguish an empty interval from a closed singleton.

    lower_is_open() and upper_is_open() shall report whether the respective endpoint value is excluded under the boundary/metadata policy. The boundary-infinity queries shall identify outward unbounded endpoints. The domain-infimum/supremum queries shall identify the selected numerical domain's least/greatest extent, which may be a finite native limit in a bounded domain. is_bounded() shall return true exactly when neither endpoint is an outward boundary infinity. is_universe() shall return true exactly when the represented interval contains every value of the configured number carrier. Its endpoints shall reach the domain's infimum and supremum, and shall include those extent values whenever they belong to the carrier. Opening a finite domain-limit endpoint, or excluding an infinite endpoint admitted as an element of an extended carrier, shall therefore prevent the universe classification. A bounded numerical domain can have a bounded universe representation.

    For policies admitting actual extended infinity values, infinity_sign() shall return 1 when the lower endpoint is reverse positive infinity, -1 when the upper endpoint is reverse negative infinity, and 0 otherwise, checking the lower case first. Ordinary finite intervals and the real-unbounded universe shall return zero.

    These queries shall preserve endpoint and metadata values. They shall require initialized valid representations, sufficient comparison resources, synchronization against modification, and the comparisons' scalar/FPU and shared-temporary prerequisites. They shall add no initialization requirement.

    RATIONALE:

    Shape, openness, unboundedness and the selected endpoint domain are separate properties; finite native domain limits must not be confused with infinity.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    bool is_empty() const;
    bool is_singleton() const;
    bool lower_is_open() const;
    bool upper_is_open() const;
    bool lower_is_boundary_infinity() const;
    bool upper_is_boundary_infinity() const;
    bool lower_is_domain_inf() const;
    bool upper_is_domain_sup() const;
    bool is_bounded() const;
    bool is_universe() const;
    int infinity_sign() const;
    
    VERIFICATION_CRITERIA:

    Check every open/closed finite endpoint combination, reversed and equal endpoints, empty/singleton values, rays, universe, bounded native domain limits and admitted extended infinity singletons, preserving all inspected values.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • PPL-SPEC-000704
    4. Exact interval set comparisons UID: PPL-SPEC-000704 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For initialized valid intervals and admitted scalar singleton operands, contains(y) shall report set inclusion of the argument in the receiving interval. strictly_contains(y) shall report inclusion with unequal represented sets. is_disjoint_from(y) shall report that the two sets have empty intersection. The interval comparison operators == and != shall report represented-set equality and its complement. These operators shall apply when at least one operand is an interval; they shall not change the raw scalar operators' contracts.

    Every interval shall contain the empty interval. The empty interval shall strictly contain no interval; a nonempty interval shall strictly contain the empty interval. Empty operands shall be disjoint from all operands. Equal closed endpoints shall have the same singleton meaning regardless of the admitted endpoint storage type. Open/closed contact shall determine whether touching intervals intersect. An interval with integer endpoints shall not thereby discard noninteger interior points.

    Mixed representations shall compare their endpoint meanings without changing the operands or narrowing an exact value merely to the other's storage width. Source values shall be canonical and admissible to their policies; comparison resources, shared-temporary serialization, synchronization and any required caller-owned FPU state shall follow the scalar comparison contracts. No additional library initialization shall be required.

    RATIONALE:

    Exact inclusion and disjointness must preserve endpoint topology and set meaning across admitted scalar representations.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    template <typename T> bool contains(const T& y) const;
    template <typename T> bool strictly_contains(const T& y) const;
    template <typename T> bool is_disjoint_from(const T& y) const;
    template <typename T1, typename T2> bool operator==(const T1& x, const T2& y);
    template <typename T1, typename T2> bool operator!=(const T1& x, const T2& y);
    
    VERIFICATION_CRITERIA:

    Use independent rational membership predicates for exhaustive finite open/closed interval pairs and scalar points. Check empty identities, proper inclusion, equality symmetry, touching endpoints, rays/universe and mixed rational/integer/native representations.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • PPL-SPEC-000705
    5. Interval closure and endpoint exclusion UID: PPL-SPEC-000705 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    is_always_topologically_closed() shall return true exactly when the metadata policy cannot store open endpoints. is_topologically_closed() shall return true for that policy, for an empty interval, or when every finite endpoint is closed. An outward infinite endpoint shall not prevent this real-topology closure classification.

    topological_closure_assign() shall retain empty intervals and clear openness at each finite endpoint of a nonempty interval when openness is supported. It shall preserve numerical endpoints and outward unbounded endpoints. For ordinary real intervals excluding infinity as an element, the represented result shall be their real topological closure under the admitted endpoint policy. Closure shall be idempotent.

    For a nonempty interval with openness support, remove_inf() shall mark its lower endpoint open and remove_sup() its upper endpoint open. These operations shall exclude a currently included finite infimum/supremum; they shall not move the numerical endpoints. Opening an endpoint of a singleton may make it empty. For a policy without openness support both calls shall leave the interval unchanged.

    Objects shall be live, initialized and valid, and permit any resulting empty value. Callers shall synchronize modification. The flag operations shall perform no scalar arithmetic or result-handler dispatch; queries shall retain their underlying endpoint-comparison prerequisites.

    RATIONALE:

    Finite openness determines real topological closure. Removing an infimum or supremum is an endpoint-exclusion operation, including when that endpoint is finite.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    static bool is_always_topologically_closed();
    bool is_topologically_closed() const;
    void topological_closure_assign();
    void remove_inf();
    void remove_sup();
    
    VERIFICATION_CRITERIA:

    Check all finite endpoint openness combinations, singleton/empty values, rays and universe, numeric endpoint preservation, closure idempotence, finite endpoint exclusion and the closed-only policy no-op.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • PPL-SPEC-000706
    6. Interval swap and owned boundary memory UID: PPL-SPEC-000706 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For two initialized valid intervals of the same type, member m_swap and related swap shall exchange both owned boundary values and the metadata as one successful interval value exchange. Same-object swap shall preserve the represented interval. Retained endpoint and metadata references shall remain attached to their original owner storage and observe the exchanged contents. Swap shall require the underlying scalar and metadata swap resources; it shall not promise rollback if one of those operations throws.

    For PPL's nonallocating interval metadata policies, external_memory_in_bytes() shall equal the sum of the owned lower and upper scalar external-memory metrics. total_memory_in_bytes() shall equal sizeof(*this) plus that external size. GMP endpoint metrics shall include retained allocated limbs according to their scalar memory contracts; native scalar endpoints shall add no external allocation. These queries shall preserve numerical values, metadata and borrowed storage identities. Their sums shall fit memory_size_type. A user-defined metadata extension that owns additional external allocation shall require its own accounting contract.

    Objects shall be live and represent initialized valid intervals. Swap shall support valid metadata-encoded unbounded endpoints without reading an indeterminate inactive native payload as a numerical value. Callers shall synchronize mutation and inspection. Swaps and memory queries shall add no numerical-rounding or library-initialization requirement.

    RATIONALE:

    Endpoint storage and metadata together determine the value. Owned scalar allocation must be counted independently of significant numerical digits.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    void m_swap(Interval& other);
    template <typename Boundary, typename Info>
    void swap(Interval<Boundary, Info>& x, Interval<Boundary, Info>& y);
    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check distinct/self swaps of finite/open, empty and universe intervals, retained storage references, independent later mutation and large GMP allocations. Compare scalar external metrics with interval sums and total object size.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • PPL-SPEC-000707
    7. Interval endpoint constraint views UID: PPL-SPEC-000707 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a nonempty initialized valid interval, lower_constraint() shall return an interval-constraint object with the lower endpoint's relation and cutoff; upper_constraint() shall do the corresponding upper endpoint. A finite open lower endpoint shall use V_GT and a closed lower endpoint V_GE; finite open/closed upper endpoints shall use V_LT/V_LE. A metadata-encoded special unbounded endpoint shall produce an unconstrained V_LGE constraint with no initialized cutoff required.

    For an effective numerical cutoff, the returned object shall use the default storage criterion of 🔗 4. Interval constraints retain relation and cutoff ownership. A borrowed cutoff shall refer to that same owned boundary and reflect its later valid numerical changes; an owned cutoff shall retain an independent snapshot. In both cases the returned relation shall be a snapshot of the relation at construction and shall not change when the interval's metadata changes later. Borrowed constraints shall not outlive their interval owner.

    These queries shall preserve the interval. The interval shall be nonempty, and callers shall not read an unconstrained returned object's unbound cutoff. Lifetimes, canonical numerical representation, sufficient copy resources, synchronization and comparison prerequisites shall follow 🔗 4. Interval constraints retain relation and cutoff ownership and the interval classification contracts.

    RATIONALE:

    A boundary view combines a relation snapshot with the selected cutoff ownership; relation metadata must not be mistaken for a live link to later topology changes.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    I_Constraint<boundary_type> lower_constraint() const;
    I_Constraint<boundary_type> upper_constraint() const;
    
    VERIFICATION_CRITERIA:

    Check each finite open/closed relation, unbounded special endpoints, borrowed GMP addresses and later value changes, independent native cutoff copies, relation snapshots after metadata changes and valid owner lifetimes.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc.

  • PPL-SPEC-000708
    8. Interpreting logical interval emptiness flags UID: PPL-SPEC-000708 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    check_empty(result) shall interpret the logical shape possibilities of 🔗 1. Interval result possibilities and status-flag set operations. An explicit I_EMPTY shape field shall return true without needing an endpoint emptiness calculation. An explicit I_NOT_EMPTY shape field shall return false. For every other shape field, the query shall report the receiving interval's actual endpoint emptiness. Other status bits shall not change this interpretation.

    The input shall use the logical I_Result bit protocol. It shall not be an unrelated scalar Result or an unconverted packing of endpoint result codes. Explicit shape claims shall be supplied consistently with the operation whose result they describe when the caller uses this return value to decide that operation's actual emptiness. This helper shall not validate those claims against the interval's geometry.

    The receiving object shall have an initialized valid representation whenever an endpoint calculation is required. The query shall preserve it and retain the scalar comparison, synchronization and resource prerequisites of is_empty(). It shall require no additional initialization.

    RATIONALE:

    A logical result can carry a definite shape or defer the decision to the represented endpoints. Explicit shape claims and scalar endpoint results are different protocols.

    INTERFACE:

    Public header: <ppl.hh>. Members belong to Parma_Polyhedra_Library::Interval<Boundary, Info>; free functions and preset aliases belong to PPL. Template forms below denote admitted instantiations.

    bool check_empty(I_Result result) const;
    
    VERIFICATION_CRITERIA:

    Check definite empty/nonempty shape records, uncertain alternative sets, status-only records and combined status flags on empty, finite nonempty and universe intervals, preserving the receiver and comparing deferred answers with independent set emptiness. Check all nine-bit input words and uncertain records produced by scalar assignment and ignored endpoint-extension descriptors on empty and nonempty receivers.

    SOURCE:

    src/Interval_defs.hh; src/Interval_inlines.hh; src/Rational_Interval.hh; src/Integer_Interval.hh; tests/intervalvaluesspec1.cc; tests/intervalresultsspec1.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.

  • 5. Ambient dimension queries and trailing-coordinate resizing UID: PPL-SPEC-000075 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    max_space_dimension() shall return the common maximum supported expression dimension. space_dimension() shall return the declared ambient dimension, including unused trailing coordinates. For n <= max_space_dimension(), successful set_space_dimension(n) shall retain the constant term and coefficients with indices below the lesser of the old and new dimensions. Extension shall give all new coordinates zero coefficients. Shrinking shall discard removed coefficients. Resizing to the current dimension shall preserve all coefficients. These operations shall retain the representation.

    RATIONALE:

    Expression resizing erases coefficient slots rather than performing existential projection of a pointset.

    INTERFACE:
    static dimension_type Linear_Expression::max_space_dimension();
    dimension_type Linear_Expression::space_dimension() const;
    void Linear_Expression::set_space_dimension(dimension_type n);
    
    VERIFICATION_CRITERIA:

    Check zero-dimensional extension, unchanged size, nonzero trailing-coordinate truncation, all-coordinate removal and subsequent extension. Compare coefficients and evaluations with an independent vector resize, for dense and sparse storage.

    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.

  • 6. Coefficient access, replacement and zero predicates UID: PPL-SPEC-000076 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Coefficient accessors shall require an lvalue receiver, with the corresponding const && overloads deleted in every coefficient profile. References shall not outlive their owning expression.

    coefficient(v) shall return the stored homogeneous coefficient when v.id() is within the declared dimension, and zero otherwise. inhomogeneous_term() shall return the constant term. Returned references, where the configured trait returns references, shall be borrowed until the expression is modified or destroyed.

    For a variable within the declared dimension, set_coefficient(v,n) shall replace only that coefficient. set_inhomogeneous_term(n) shall replace only the constant term. Both shall preserve dimension and representation. Scalar inputs may be borrowed from the expression being modified; their entry values shall be used.

    is_zero() shall hold exactly when every homogeneous coefficient and the constant term are zero. all_homogeneous_terms_are_zero() shall disregard the constant term. For a Variables_Set whose indices are within the expression dimension, all_zeroes(vars) shall hold exactly when every selected homogeneous coefficient is zero. An empty selection shall satisfy that predicate. is_equal_to(other) shall hold exactly when the declared space dimensions, constant terms and all homogeneous coefficients are equal, independently of representation. It shall not test equality of zero sets; expressions differing by a nonunit scale shall generally compare unequal.

    RATIONALE:

    A missing homogeneous coefficient is zero, while overwriting a term must not silently extend the ambient dimension. Constant and homogeneous zero tests answer different questions.

    INTERFACE:
    Coefficient_traits::const_reference
    Linear_Expression::coefficient(Variable v) const &;
    Coefficient_traits::const_reference
    Linear_Expression::inhomogeneous_term() const &;
    void Linear_Expression::set_coefficient(Variable v,
                                          Coefficient_traits::const_reference n);
    void Linear_Expression::set_inhomogeneous_term(
      Coefficient_traits::const_reference n);
    bool Linear_Expression::is_zero() const;
    bool Linear_Expression::all_homogeneous_terms_are_zero() const;
    bool Linear_Expression::all_zeroes(const Variables_Set& vars) const;
    bool Linear_Expression::is_equal_to(const Linear_Expression& other) const;
    
    VERIFICATION_CRITERIA:

    Check sparse absent terms and out-of-dimension reads, replacement by zero and nonzero values, untouched coefficients and dimensions, constant-only and total zero, empty and mixed selected zero sets. Copy borrowed values before mutation.

    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.

  • 7. Affine addition, subtraction and negation UID: PPL-SPEC-000077 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For operands denoting E and F, expression addition and subtraction shall produce E + F and E − F, using zero coefficients for missing trailing coordinates and the maximum input dimension. Mixed variable forms shall treat a variable as its coordinate function. Mixed coefficient forms shall treat a coefficient as a dimension-zero constant. Unary plus shall return an independent copy; unary minus and neg_assign shall negate every coefficient, including the constant, without changing dimension.

    Compound addition and subtraction shall update the target from entry values, return a reference to it, retain its representation, and permit the target as the expression source. Distinct sources shall remain unchanged. Zero cancellation shall retain the computed maximum dimension. An operation adding or subtracting a variable beyond the supported expression dimension shall throw std::length_error before modifying the target. The numerical prerequisites of 🔗 1. Affine value, numerical prerequisites and shared zero shall apply.

    RATIONALE:

    Affine equality is stronger than equality of the zero sets of expressions. Independent evaluation detects unintended scaling or sign changes.

    INTERFACE:

    For Linear_Expression operands e and f, Variable operands v and w, and Coefficient operand n, these forms shall be available in a C++ function using PPL names:

    Linear_Expression sum(e + f), difference(e - f);
    Linear_Expression vv_sum(v + w), vv_difference(v - w);
    Linear_Expression ev_sum(e + v), ve_sum(v + e);
    Linear_Expression ev_difference(e - v), ve_difference(v - e);
    Linear_Expression en_sum(e + n), ne_sum(n + e);
    Linear_Expression en_difference(e - n), ne_difference(n - e);
    Linear_Expression positive(+e), negative(-e);
    Linear_Expression& expression_sum = (e += f);
    Linear_Expression& expression_difference = (e -= f);
    Linear_Expression& variable_sum = (e += v);
    Linear_Expression& variable_difference = (e -= v);
    Linear_Expression& constant_sum = (e += n);
    Linear_Expression& constant_difference = (e -= n);
    neg_assign(e);
    
    VERIFICATION_CRITERIA:

    Compare all overloads against independent affine sums and differences over rational valuations. Include unequal dimensions in both orders, dense/sparse combinations, self-addition/subtraction, constant changes, zero cancellation, return identity, source preservation and oversized variable rejection.

    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.

  • 8. Integral scalar multiplication and coefficient-wise division UID: PPL-SPEC-000078 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Multiplication by a coefficient c shall multiply every stored coefficient and the constant term by c, producing the affine function cE. Multiplication by zero shall retain the expression's dimension. operator*= shall update and return the target and retain its representation. Both scalar operand orders shall be available for a new result.

    For nonzero divisor c, operator/= shall replace each homogeneous coefficient and the constant term separately by its integral quotient rounded towards zero. It shall retain dimension and representation and return the target. This shall denote affine division E ⁄ c when all coefficients are divisible by c; otherwise it shall denote the expression formed from those truncated coefficients. No rational-coefficient result is implied. The scalar passed to a mutating operation shall not reference a coefficient owned by that target. The numerical prerequisites of 🔗 1. Affine value, numerical prerequisites and shared zero shall apply.

    RATIONALE:

    Integer-coefficient division can change an affine function by truncating its coefficients. Exact scalar division is a special case that must not be confused with the general operation.

    INTERFACE:
    Linear_Expression operator*(const Linear_Expression& e,
                                Coefficient_traits::const_reference n);
    Linear_Expression operator*(Coefficient_traits::const_reference n,
                                const Linear_Expression& e);
    Linear_Expression& operator*=(Linear_Expression& e,
                                  Coefficient_traits::const_reference n);
    Linear_Expression& operator/=(Linear_Expression& e,
                                  Coefficient_traits::const_reference n);
    
    VERIFICATION_CRITERIA:

    Check both signs and zero multipliers, exact and inexact division with positive and negative divisors, constant terms and trailing dimensions. Compare quotient coefficients with an independent GMP truncating-division oracle and evaluate the resulting affine functions at rational points.

    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.

  • 9. Explicit scaled accumulation, combination and elimination UID: PPL-SPEC-000079 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Variable accumulation shall add or subtract cxv to the target, extending its dimension when needed. Expression accumulation shall add or subtract cF and use the maximum input dimension. linear_combine(y,c1,c2) shall assign c1E + c2F and require both multipliers nonzero. linear_combine_lax shall have that same meaning while admitting zero multipliers. Both shall retain the maximum input dimension, even when its coefficient cancels, and retain the target representation.

    For equal-dimension distinct expressions with nonzero coefficients a and b at v, linear_combine(y,v) shall assign (b ⁄ g)E − (a ⁄ g)F, where g = gcd(|a|, |b|). The chosen coordinate coefficient shall therefore be zero. The variable shall lie in that dimension.

    Expression sources shall be distinct from the target. Scalar multipliers shall not reference a coefficient owned by the target. Distinct sources shall be preserved. Numerical prerequisites in 🔗 1. Affine value, numerical prerequisites and shared zero shall apply.

    RATIONALE:

    Eliminating a coefficient requires a specified scaled combination, not merely an expression that happens to have zero in that slot.

    INTERFACE:
    Linear_Expression& add_mul_assign(Linear_Expression& e,
      Coefficient_traits::const_reference n, Variable v);
    Linear_Expression& sub_mul_assign(Linear_Expression& e,
      Coefficient_traits::const_reference n, Variable v);
    void add_mul_assign(Linear_Expression& e,
      Coefficient_traits::const_reference n, const Linear_Expression& y);
    void sub_mul_assign(Linear_Expression& e,
      Coefficient_traits::const_reference n, const Linear_Expression& y);
    void Linear_Expression::linear_combine(const Linear_Expression& y,
      Coefficient_traits::const_reference c1,
      Coefficient_traits::const_reference c2);
    void Linear_Expression::linear_combine_lax(const Linear_Expression& y,
      Coefficient_traits::const_reference c1,
      Coefficient_traits::const_reference c2);
    void Linear_Expression::linear_combine(const Linear_Expression& y, Variable v);
    
    VERIFICATION_CRITERIA:

    Use dense/sparse cross products and unequal dimensions, positive and negative factors, zero factors for lax combinations, variable extension and accumulation return identity. Independently compute all coefficient vectors and rational evaluations. For elimination include shared factors and all coefficient-sign pairs.

    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.

  • 10. Coefficient normalization and sign normalization UID: PPL-SPEC-000080 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    normalize() shall divide all homogeneous coefficients and the constant term by their common nonnegative greatest common divisor when it is nonzero. The all-zero expression shall remain zero. sign_normalize() shall negate all coefficients and the constant term exactly when the first nonzero homogeneous coefficient, in increasing variable order, is negative. An expression having no nonzero homogeneous coefficient shall be unchanged by sign normalization, including a negative constant.

    Both operations shall retain dimension and representation and be idempotent. Normalization can scale the affine value; sign normalization can negate it. Neither operation shall promise affine-value preservation merely because its result has the same zero set. The numerical prerequisites of 🔗 1. Affine value, numerical prerequisites and shared zero shall apply.

    RATIONALE:

    Primitive coefficients and a chosen leading sign are useful descriptor conventions, but they change affine values unless the chosen scale is one.

    INTERFACE:
    void Linear_Expression::normalize();
    void Linear_Expression::sign_normalize();
    
    VERIFICATION_CRITERIA:

    Check all-zero, positive and negative constants, coprime coefficients, a shared divisor, leading zero gaps, each sign of the first nonzero coefficient and unused trailing coordinates. Compare exact expected coefficients and rational evaluation scaling, and repeat each operation to establish idempotence.

    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.

  • PPL-SPEC-000081
    11. Ordered iteration of nonzero homogeneous coefficients UID: PPL-SPEC-000081 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The owning expression's iterator-position accessors shall require an lvalue receiver, with the corresponding const && overloads deleted. Iterators shall not extend the owning expression's lifetime.

    begin() and end() shall delimit homogeneous nonzero coefficients in increasing coordinate order; the constant term and zero coefficients shall not occur. end() shall be the past-the-end position. lower_bound(v) shall return the first such coefficient whose variable identifier is at least v.id(), or end() when none exists; callers shall supply v.id() <= space_dimension(), including the past-the-end coordinate.

    Dereferencing a valid non-end iterator shall return its coefficient; variable() shall return its coordinate and index() shall return that coordinate's identifier plus one. Prefix increment/decrement shall navigate the sequence and return the changed iterator. Decrement shall require a preceding element; decrementing a nonempty sequence's end shall yield its last element. Iterator copies and assignment shall own independent positions, while borrowing the same expression. Iterators shall be compared only within the same unchanged expression. Mutating or destroying the expression shall invalidate them. A default iterator shall admit destruction or replacement; copying, dereferencing or navigating it is not required.

    visit_nonzero_coefficients(visitor) const & shall invoke the callback exactly once with a concrete borrowed, bidirectional range of the same ordered nonzero homogeneous terms. The callback shall accept dense and sparse ranges and return the same type for both. Representation shall be selected once; constructing, traversing and copying range iterators shall not allocate. Range begin and end access shall take constant time; locating their positions may be performed when constructing the view. The callback result and exceptions shall propagate unchanged. Owner rvalues shall be rejected. A range or iterator returned by the callback shall borrow the expression and shall obey the same invalidation rules. Adapter visitors shall honor the visible dimension and omit hidden descriptor coordinates.

    RATIONALE:

    Logical nonzero iteration hides storage differences. The public iterator index also includes the constant-slot offset, unlike a Variable identifier.

    INTERFACE:
    template <typename Visitor>
    decltype(auto) Linear_Expression::visit_nonzero_coefficients(Visitor&&) const &;
    class Linear_Expression::const_iterator;
    Linear_Expression::const_iterator Linear_Expression::begin() const &;
    Linear_Expression::const_iterator Linear_Expression::end() const &;
    Linear_Expression::const_iterator Linear_Expression::lower_bound(Variable v) const &;
    
    explicit Linear_Expression::const_iterator::const_iterator();
    Linear_Expression::const_iterator::const_iterator(const const_iterator& i);
    Linear_Expression::const_iterator::~const_iterator();
    Linear_Expression::const_iterator&
    Linear_Expression::const_iterator::operator=(const const_iterator& i);
    Linear_Expression::const_iterator& Linear_Expression::const_iterator::operator++();
    Linear_Expression::const_iterator& Linear_Expression::const_iterator::operator--();
    Linear_Expression::const_iterator::reference
    Linear_Expression::const_iterator::operator*() const;
    Variable Linear_Expression::const_iterator::variable() const;
    dimension_type Linear_Expression::const_iterator::index() const;
    bool Linear_Expression::const_iterator::operator==(const const_iterator& i) const;
    bool Linear_Expression::const_iterator::operator!=(const const_iterator& i) const;
    void Linear_Expression::const_iterator::m_swap(const_iterator& i);
    
    VERIFICATION_CRITERIA:

    Compare forward and reverse sequences with independently listed indices and coefficients for empty, constant, gapped and trailing-zero expressions in both representations. Check lower bounds at and between supported positions, copied/assigned iterator independence, return identity, member swap and replacement of a default iterator. Check the concrete visitor against independent coefficient lists, prefix visibility, exception propagation, rvalue rejection and an armed allocation failure.

    SOURCE:

    src/Linear_Expression_Coefficients.hh; src/Linear_Expression_templates.hh; 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.

  • 12. Explicit coefficient-coordinate transformations UID: PPL-SPEC-000082 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For variables within the expression dimension, swap_space_dimensions shall exchange exactly their coefficients and retain the constant term. permute_space_dimensions(cycle) shall require distinct, in-dimension variables. It shall move each listed coordinate coefficient to the following listed coordinate, and the last to the first. Empty and singleton cycles shall preserve the expression.

    remove_space_dimensions(vars) shall require in-dimension indices, discard their coefficients, and compact retained coordinates in their original order. Removing none shall preserve the expression; removing all shall retain only the constant term. shift_space_dimensions(v,n) shall require v.id() <= space_dimension() and a resulting dimension not exceeding max_space_dimension(). It shall insert n zero coefficients immediately before v, shift subsequent coefficients by n, and increase the dimension accordingly. Insertion at the old dimension shall append zeros. A zero shift shall preserve the expression.

    These transformations shall preserve the inhomogeneous term and representation. They shall implement the stated coefficient rearrangement, with no claim that discarding a nonzero coefficient preserves the original affine value.

    RATIONALE:

    Descriptor coefficient transformation is distinct from existential pointset projection. Explicit placement makes the resulting affine meaning unambiguous.

    INTERFACE:
    void Linear_Expression::swap_space_dimensions(Variable v1, Variable v2);
    void Linear_Expression::permute_space_dimensions(
      const std::vector<Variable>& cycle);
    void Linear_Expression::remove_space_dimensions(const Variables_Set& vars);
    void Linear_Expression::shift_space_dimensions(Variable v, dimension_type n);
    
    VERIFICATION_CRITERIA:

    Use independently permuted, filtered and shifted coefficient vectors. Check self-swaps, empty/singleton and longer cycles, zero and nonzero moved coefficients, removal of no/all/interior coordinates, zero shifts, insertion at front/interior/end and preserved constant terms in both representations.

    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.

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

  • 14. Human-readable affine output and formatter dispatch UID: PPL-SPEC-000084 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The output operator shall display the nonzero homogeneous terms in increasing variable order, followed by a nonzero constant term. It shall use the active Variable formatter specified by 🔗 7. Active Variable formatter and initialized thread state. For coefficient magnitudes other than one it shall put * between the coefficient and variable; a magnitude of one shall be omitted. Later positive and negative terms shall be separated by " + " and " - " respectively, with a minus sign also preceding a negative first term. A zero expression shall display 0. No newline shall be added. The supplied stream shall be returned. print() shall use the same display on std::cerr.

    Output shall preserve coefficients, dimension and representation. Its formatting arithmetic shall satisfy the selected coefficient profile's preconditions, including representability of any negated coefficient. The human-readable display shall not substitute for the reloadable representation in 🔗 13. Reloadable ASCII export and replacement loading.

    RATIONALE:

    Readable output uses coordinate naming supplied by the client, whereas machine reload requires explicit coefficient slots and dimensions.

    INTERFACE:
    namespace IO_Operators {
      std::ostream& operator<<(std::ostream& s, const Linear_Expression& e);
    }
    void Linear_Expression::print() const;
    
    VERIFICATION_CRITERIA:

    Check literal output for zero, constants, both leading signs, unit magnitudes, gaps and mixed signs. Install an indexed variable formatter and verify dispatch and stream identity. Redirect std::cerr to check print without a newline and verify the expression remains unchanged.

    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.

  • PPL-SPEC-000085
    15. Invariant query and memory accounting UID: PPL-SPEC-000085 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() shall report whether the expression's owned representation satisfies its checked storage invariants. Expressions produced by successful operations under their stated preconditions shall satisfy those invariants. external_memory_in_bytes() shall report the memory accounted for by its owned representation, including that representation object. total_memory_in_bytes() shall equal sizeof(Linear_Expression) plus external_memory_in_bytes(). These queries shall preserve the expression's coefficients, dimension and representation. Memory counts shall not promise allocator overhead, a fixed dense-to-sparse ordering or exact process memory consumption.

    RATIONALE:

    An owning interface object accounts separately for itself and its dynamically selected representation. Storage diagnostics do not measure process resident memory.

    INTERFACE:
    bool Linear_Expression::OK() const;
    memory_size_type Linear_Expression::external_memory_in_bytes() const;
    memory_size_type Linear_Expression::total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check valid empty, constant, dense and sparse expressions, resized copies and representation conversions. Verify the total/external identity and preservation of every observable value without imposing architecture-specific byte totals.

    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.

  • 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-000922
    2. Zero and interval-constant construction UID: PPL-SPEC-000922 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Default construction shall produce dimension zero and the singleton-zero constant. Construction from an initialized interval n shall produce dimension zero and an independent copy of that interval as the constant. Both forms shall report zero coefficients at every valid queried variable. The constant constructor shall preserve empty, bounded, open, singleton and unbounded values admitted by C.

    RATIONALE:

    Constants and ambient dimensions are separate; default construction creates a usable zero rather than an uninitialized interval.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    Linear_Form();
    explicit Linear_Form(const C& n);
    
    VERIFICATION_CRITERIA:

    Check literal zero/constant intervals, dimension zero, out-of-dimension zero queries, source mutation after construction and admitted open/empty/unbounded constants.

    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-000923
    3. Variable and variable-difference construction UID: PPL-SPEC-000923 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Variable v shall produce dimension v.space_dimension(), singleton coefficient one at v.id(), singleton zero at every other coordinate and a singleton-zero constant. The explicitly selected interval-type overload for v-w shall produce dimension max(v.space_dimension(), w.space_dimension()). Distinct variables shall have singleton coefficients one and minus one, respectively; equal variables shall produce all singleton-zero coefficients while retaining that dimension. The selected interval representation shall enclose the signed unit values even when its boundary type is unsigned.

    A variable dimension exceeding max_space_dimension() shall cause std::length_error before a coefficient vector of that dimension is constructed.

    RATIONALE:

    Dimensioned variable forms provide the basis for building affine expressions without losing high zero coordinates after exact cancellation.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    Linear_Form(Variable v);
    template <typename C>
    Linear_Form<C> operator-(Variable v, Variable w);
    
    VERIFICATION_CRITERIA:

    Check equal/different/high variable indices, literal signed-unit coefficients, every remaining zero coordinate, unsigned-boundary enclosure, rejected dimensions and subsequent successful small 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-000924
    4. Conversion from integral affine expressions UID: PPL-SPEC-000924 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Construction from Linear_Expression e shall preserve its declared dimension and enclose each integer coefficient and constant in the corresponding interval of C. Exactly representable integer values shall be singleton intervals; other supported conversions shall retain their coefficient-conversion enclosure guarantees. Source representation shall not alter the mathematical result, and the source shall remain unchanged. A source dimension greater than max_space_dimension() shall cause std::length_error. Reading e shall retain its configured coefficient profile and initialization prerequisites.

    RATIONALE:

    Integral expressions enter interval analysis through explicit coefficient conversion while retaining their ambient coordinates.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    Linear_Form(const Linear_Expression& e);
    
    VERIFICATION_CRITERIA:

    Convert independent literal integer vectors from dense/sparse expressions, zero/trailing dimensions and values above exact native precision; check enclosures, source preservation and oversized sparse-source rejection.

    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.

  • 6. Dimensions and borrowed coefficient access UID: PPL-SPEC-000926 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Coefficient accessors shall require an lvalue receiver, with the corresponding const && overloads deleted. References shall not outlive the owning form.

    max_space_dimension() shall report the maximum ambient dimension admitted by the form's coefficient-vector representation. This limit shall not promise that allocating every admitted dimension will succeed. space_dimension() shall return the declared ambient dimension. inhomogeneous_term() shall return a const reference to the owned constant. For a valid variable inside that dimension, coefficient(v) shall return a const reference to its owned coefficient. A valid variable outside the declared dimension shall return a const reference to a singleton zero, without extending the form or allocating a coefficient for that variable.

    Owned coefficient references shall be usable until destruction or an operation that may replace/reallocate or transfer the owning vector. The shared zero shall remain usable during its owning type/context lifetime; callers shall not destroy or modify it through a cast.

    RATIONALE:

    Borrowing an absent zero coefficient does not change ambient dimension, while vector ownership determines view validity.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    const C& coefficient(Variable v) const &;
    const C& inhomogeneous_term() const &;
    
    VERIFICATION_CRITERIA:

    Check reference types and repeated identity for owned cells, zero queries far beyond declared dimensions without growth, constants, trailing dimensions and the representation limit without attempting maximal allocation.

    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-000927
    7. Unary copying and coefficient-wise negation UID: PPL-SPEC-000927 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Unary plus shall return an independent value copy with the same dimension. Unary minus shall return an independent form whose coefficient intervals, including the constant, enclose their entry-value negations. negate() shall apply the same interval negation to the current form and preserve its dimension. Negation shall exchange lower/upper roles and endpoint openness according to C. It shall not cancel an uncertain interval to zero.

    RATIONALE:

    Unary operations retain ambient coordinates and interval uncertainty while distinguishing a new value from in-place modification.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> Linear_Form<C> operator+(const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator-(const Linear_Form<C>& f);
    void negate();
    
    VERIFICATION_CRITERIA:

    Use independent rational endpoint negation for positive/negative/straddling/open coefficients and constants; compare unary and in-place results, dimensions and unchanged donors.

    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-000928
    8. Addition of interval linear forms UID: PPL-SPEC-000928 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a+b and a+=b, the result dimension shall be the maximum of the entry dimensions. Each common coefficient interval and the constant shall enclose the sum of the corresponding entry intervals. Coefficients belonging only to the larger form shall be preserved. Compound assignment shall return a by reference; noncompound addition shall return an independent form and preserve both operands. Same-object addition shall use the entry coefficient intervals and their independent-choice interval meaning.

    RATIONALE:

    Padding missing coordinates by exact zero preserves the meaning of addition across ambient dimensions.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C>
    Linear_Form<C> operator+(const Linear_Form<C>& a, const Linear_Form<C>& b);
    template <typename C>
    Linear_Form<C>& operator+=(Linear_Form<C>& a, const Linear_Form<C>& b);
    
    VERIFICATION_CRITERIA:

    Derive sums independently over rational endpoint pairs and valuations for both dimension orders, constants, trailing zeros and same-object updates; check return references and unchanged independent inputs.

    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-000929
    9. Subtraction of interval linear forms UID: PPL-SPEC-000929 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a-b and a-=b, the result dimension shall be the maximum of the entry dimensions. Each coefficient interval and constant shall enclose the corresponding entry interval difference. A coordinate present only in a shall be preserved; one present only in b shall be negated. Compound assignment shall return a by reference; the independent result shall preserve both operands. Same-object subtraction shall retain independent interval-choice semantics: subtracting an uncertain interval from itself shall not imply a singleton-zero coefficient.

    RATIONALE:

    Interval subtraction encloses all independently chosen differences, even for aliased operand objects.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C>
    Linear_Form<C> operator-(const Linear_Form<C>& a, const Linear_Form<C>& b);
    template <typename C>
    Linear_Form<C>& operator-=(Linear_Form<C>& a, const Linear_Form<C>& b);
    
    VERIFICATION_CRITERIA:

    Check independent difference endpoints and affine valuations in both dimension orders, copied/aliased operands, zero tails and open coefficients; require uncertain self-differences to retain their widths.

    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-000930
    10. Variable addition, subtraction and dimension extension UID: PPL-SPEC-000930 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Adding or subtracting a valid variable shall add or subtract singleton one at its coordinate, preserve every other entry coefficient and constant, and set dimension to the maximum of the form's entry dimension and the variable dimension. The reflected v-f shall negate every coefficient of f then add singleton one at v.id(). Compound operations shall return the modified form by reference. Returning operations shall preserve their operands. Exact cancellation shall not shrink the declared dimension. A variable dimension above max_space_dimension() shall cause std::length_error and leave the existing form unchanged.

    RATIONALE:

    Variable overloads must agree with interval-affine value meaning while safely extending coordinates.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> Linear_Form<C> operator+(Variable v, const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator+(const Linear_Form<C>& f, Variable v);
    template <typename C> Linear_Form<C> operator-(Variable v, const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator-(const Linear_Form<C>& f, Variable v);
    template <typename C> Linear_Form<C>& operator+=(Linear_Form<C>& f, Variable v);
    template <typename C> Linear_Form<C>& operator-=(Linear_Form<C>& f, Variable v);
    
    VERIFICATION_CRITERIA:

    Check every overload below/inside/above the entry dimension, literal coordinate updates, reflected signs, cancellation with retained dimensions, rejected maximal variables and retry.

    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-000931
    11. Interval scalar translation and reflected subtraction UID: PPL-SPEC-000931 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Adding or subtracting an interval scalar shall change only the constant interval, by the corresponding interval sum or difference, and retain the form's dimension and homogeneous coefficients. n-f shall negate the homogeneous coefficients and produce the interval difference of entry scalar n and the entry constant. Returning operations shall preserve all inputs. Compound operations shall return the destination reference and use the scalar's entry value when it is borrowed from that form, including its constant.

    RATIONALE:

    Translating a form changes its constant without rewriting variable coefficients or silently correlating interval choices.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> Linear_Form<C> operator+(const C& n, const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator+(const Linear_Form<C>& f, const C& n);
    template <typename C> Linear_Form<C> operator-(const C& n, const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator-(const Linear_Form<C>& f, const C& n);
    template <typename C> Linear_Form<C>& operator+=(Linear_Form<C>& f, const C& n);
    template <typename C> Linear_Form<C>& operator-=(Linear_Form<C>& f, const C& n);
    
    VERIFICATION_CRITERIA:

    Compare independent rational endpoint sums/differences for both scalar positions, straddling/open intervals, zero and high dimensions, borrowed coefficients/constants and compound return identities.

    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-000932
    12. Interval scalar multiplication UID: PPL-SPEC-000932 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Multiplying a form by interval scalar n shall preserve its declared dimension and produce coefficient intervals, including the constant, that enclose every product of the corresponding entry coefficient and the entry scalar. Both returning orders shall preserve their operands and return an independent form. Compound multiplication shall return the modified form reference. A scalar borrowed from the destination shall denote its entry interval for every coefficient update; changing an earlier coefficient shall not change that scalar's meaning for later updates.

    RATIONALE:

    All coefficients must use one entry scalar interval, including when the caller borrowed it from the destination.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> Linear_Form<C> operator*(const C& n, const Linear_Form<C>& f);
    template <typename C> Linear_Form<C> operator*(const Linear_Form<C>& f, const C& n);
    template <typename C> Linear_Form<C>& operator*=(Linear_Form<C>& f, const C& n);
    
    VERIFICATION_CRITERIA:

    Compute all four rational endpoint products independently for signed/zero/straddling scalars, verify affine enclosures over valuations and input preservation, and include scalar references borrowed from constant and homogeneous cells.

    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-000933
    13. Division by an admitted nonzero interval scalar UID: PPL-SPEC-000933 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a supported interval divisor that excludes zero, compound division shall preserve the dimension and enclose, at every coefficient and constant, all quotients of the entry coefficient interval by the entry divisor interval. It shall return the destination reference. The divisor's entry interval shall apply to every coefficient even when borrowed from the destination. Callers shall satisfy the selected interval division's domain, representability and rounding prerequisites; this interface shall not imply that division by zero is admitted.

    RATIONALE:

    Coefficient-wise division needs a stable nonzero scalar value and an explicit valid numerical domain.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C>
    Linear_Form<C>& operator/=(Linear_Form<C>& f, const C& n);
    
    VERIFICATION_CRITERIA:

    Derive rational endpoint quotients for positive/negative singleton/nonsingleton divisors, compare independent affine values and return identity, and include valid borrowed homogeneous/constant divisors.

    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-000934
    14. Coefficient equality with implicit trailing zeros UID: PPL-SPEC-000934 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Equality shall return true exactly when the constants compare equal under C and every homogeneous coefficient compares equal after padding the shorter form with singleton-zero intervals. Different declared dimensions alone shall not imply inequality. Inequality shall be the logical complement of equality. Neither operation shall modify its inputs or dimensions. This comparison shall compare interval coefficients; it shall not assert relational equivalence after correlating uncertain coefficient choices.

    RATIONALE:

    An ambient zero tail does not change an interval-affine coefficient description.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    template <typename C> bool operator==(const Linear_Form<C>& a, const Linear_Form<C>& b);
    // 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 both argument orders, equal/unequal constants and internal cells, trailing zero/nonzero/uncertain cells, all-zero dimensions, self-comparison and unchanged dimensions.

    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-000935
    15. Ownership-preserving swap UID: PPL-SPEC-000935 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Member and free swap shall exchange the complete owned coefficient values and declared dimensions of two forms without numerical conversion. Future mutation of either form shall affect its received value independently. Same-object swap shall preserve its value and dimension. Swap shall not require copying or re-evaluating every interval coefficient.

    RATIONALE:

    Ownership exchange is a representation operation and must not alter interval meaning.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    void m_swap(Linear_Form& other);
    template <typename C> void swap(Linear_Form<C>& a, Linear_Form<C>& b);
    
    VERIFICATION_CRITERIA:

    Check both swap forms across zero/different dimensions, open/empty/unbounded/large rational values, self-swap, repeated cycles, snapshots and coefficient-copy/allocation inspection.

    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-000936
    16. Coefficient integrity and finite-bound classification UID: PPL-SPEC-000936 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    OK() shall return true when every owned interval coefficient satisfies its interval invariant predicate, and false when any such predicate returns false. overflows() shall return false exactly when the constant and every stored homogeneous coefficient satisfy C::is_bounded(); otherwise it shall return true. The latter shall classify the current coefficient bounds, not certify past arithmetic exactness or the absence of modeled floating-point rounding error. Both queries shall preserve the form and its dimension.

    RATIONALE:

    Current interval validity and finite-bound availability are separate from numerical error proofs.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    bool OK() const;
    bool overflows() const;
    
    VERIFICATION_CRITERIA:

    Check finite forms, unbounded constant/early/late coefficients, zero tails, recovery by assignment; inspect every owned coefficient path and propagation of an individual interval invariant failure.

    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-000938
    18. Human-readable affine composition UID: PPL-SPEC-000938 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Stream insertion shall return the supplied stream and preserve the form. It shall display nonzero homogeneous coefficients in increasing variable index order using the current variable formatter. A first singleton-minus-one coefficient shall display a leading minus; singleton-one factors shall omit the coefficient/product marker. A later minus-one coefficient shall use the separator " - "; every other later nonzero coefficient shall use " + ", displaying its interval and "*" when it is not singleton one. The nonzero constant shall follow existing variable terms with " + " and use C's display. If all coefficients are zero, the zero interval shall be displayed. A negative nonunit coefficient or constant shall retain its coefficient display rather than being rewritten into a subtraction. Coefficient display shall use the stream locale/format settings and retain the variable formatter's prerequisites. It shall not serve as the reloadable machine format. print() shall display the same form on standard error without adding a newline.

    RATIONALE:

    Literal coefficient and separator rules make public display stable while reserving reloadable metadata for ASCII serialization.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    namespace IO_Operators {
      template <typename C>
      std::ostream& operator<<(std::ostream& stream, const Linear_Form<C>& f);
    }
    void print() const;
    
    VERIFICATION_CRITERIA:

    Compare literal strings for zero/constant/unit/nonunit/negative/interval coefficients, gaps and canceled tails; check stream identity, formatter restoration, source preservation and separate machine round trips.

    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-000939
    19. Owned vector and interval memory accounting UID: PPL-SPEC-000939 STATUS: APPROVED COMPONENT: EXPRESSION_ANALYSIS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    external_memory_in_bytes() shall count allocated vector capacity in bytes and the external memory reported by every constructed coefficient interval. It shall not charge the form for shared zero storage borrowed by out-of-dimension queries. total_memory_in_bytes() shall equal the external count plus sizeof(*this). Counts shall retain the selected coefficient memory-reporting contracts and require representable aggregate byte counts; allocator bookkeeping outside those reports shall not be inferred.

    RATIONALE:

    Capacity and live coefficient payloads jointly determine memory owned by the form.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check total/external identity, vector-capacity lower bounds, large GMP endpoint payload growth, unchanged counts after distant zero queries and ownership transfer through swaps/copies.

    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-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-000941
    21. Format-specific relative-error linear form UID: PPL-SPEC-000941 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 form with nonempty bounded supported floating-point intervals, relative_error(format, result) shall preserve the entry dimension and replace result by a form whose coefficient at each coordinate and constant encloses the corresponding magnitude bound multiplied by [ − u, u]. The magnitude bound shall be the maximum absolute value of that entry interval's endpoints. The relative-error unit u shall be 2 − 10, 2 − 23, 2 − 52, 2 − 112 and 2 − 63 for IEEE754_HALF, IEEE754_SINGLE, IEEE754_DOUBLE, IEEE754_QUAD and INTEL_DOUBLE_EXTENDED, respectively. It shall be 2 − 20 for IBM_SINGLE and 2 − 52 for IBM_DOUBLE.

    The source shall remain unchanged unless it is also result; in that case the complete result shall still use the source's entry intervals and dimension. This operation shall construct the relative-error component; it shall not alone establish a complete floating-point linearization or supply a separate absolute error term for underflow. All evaluated boundary and interval operations shall satisfy their supported-format, rounding and representability prerequisites.

    RATIONALE:

    Analyzed-format error units and entry-value alias semantics are needed to compose a sound rounding-error form.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member excerpts belong to Linear_Form<C>.

    void relative_error(Floating_Point_Format format, Linear_Form& result) const;
    
    VERIFICATION_CRITERIA:

    Use independently specified powers of two and rational magnitude products for every named format, zero/unequal-dimensional outputs, signed/zero/uncertain coefficients, preserved donors and same-object output.

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

  • 1. Directed native integral conversion to native floating-point storage UID: PPL-SPEC-000341 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The destination shall be a configured supported native floating-point type F in 🔗 1. Supported exact integer and rational conversion to native floating storage, or Checked_Number<F, Check_Overflow_Policy<F>>. The source shall be one of the eleven native integral types in 🔗 1. Exact conversion between native and checked integral scalars, or its Checked_Number<I, Check_Overflow_Policy<I>> wrapper, with integer value a. It shall be independent of the configured Coefficient alias.

    Within the destination finite range, ROUND_DOWN shall assign the greatest representable value no greater than a; ROUND_UP shall assign the least representable value no less than a. Exactly representable integers shall preserve their values. Source-range crossings shall follow 🔗 6. Range limits in conversion of finite native scalars to floating point. Zero shall produce positive zero.

    Let p be std::numeric_limits<F>::digits and w the native source type's object width CHAR_BIT * sizeof(I). When p > w, conversion shall return V_EQ under every directed/strict request and shall require no particular hardware rounding direction. Otherwise, downward conversion shall return V_GE and upward conversion V_LE without the strict flag. With that flag and available definite native inexact information, an exact result shall return V_EQ and an inexact result V_GT downward or V_LT upward. If definite inexact information is unavailable, the corresponding weak relation shall be returned. These potentially inexact directed conversions shall require upward hardware rounding and shall preserve that direction.

    The destination shall be live and assignable, and a distinct source shall remain unchanged. Callers shall synchronize access against concurrent object mutation. Floating-point exceptions shall be nontrapping; accrued flags shall be unspecified. Native conversions using FPU control or inexact queries shall require an available backend. On IA-32 backends using SSE, runtime SSE detection shall have completed before those facilities are used, through 🔗 1. Initialization owners and automatic C++ initialization and 🔗 3. Thread initialization, default state and finalization or fpu_initialize_control_functions(). C99-fenv and SPARC backends shall require no library or thread initialization object. No coefficient-constant stage or shared numerical temporary pool shall be required. The _r interface shall return the conversion result without policy-handler dispatch.

    RATIONALE:

    Native integer embedding can remain exact or provide adjacent directed bounds without introducing an intermediate bounded coefficient. Result precision and native floating-point state prerequisites are part of that conversion interface.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted integral From and floating To types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Cross every configured destination format with all eleven native integral types and their checked wrappers. Check full endpoints, zero, signed values and precision-boundary integers against independent unbounded-integer/dyadic oracles. Require adjacent directed bounds, exact or weak/strict classifications as specified, positive zero, preserved sources and hardware direction; use every hardware mode for uniform exact embeddings.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc. tests/smallconstantassign1.cc.

  • PPL-SPEC-000342
    2. Delegated and exactness native integral conversion to native floating point UID: PPL-SPEC-000342 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the integral source/destination types in 🔗 1. Directed native integral conversion to native floating-point storage, ROUND_IGNORE shall use the current hardware rounding direction to convert a. Within finite range it shall use the nearest allowed destination value in that direction; nearest-even hardware mode shall resolve exact midpoints toward an even significand. Range behavior shall follow 🔗 6. Range limits in conversion of finite native scalars to floating point. ROUND_NOT_NEEDED shall require the source integer to be exactly representable as a finite destination value and shall assign that value.

    When p > w as defined in 🔗 1. Directed native integral conversion to native floating-point storage, all these requests shall return V_EQ. Otherwise, an unflagged delegated request shall return V_LGE. A strict delegated request with definite native inexact information shall return V_EQ for an exact result and V_NE for an inexact result; if that information is unavailable it shall return V_LGE. An unflagged no-rounding-needed request shall return V_EQ in an assertion-enabled build and may return lazy V_LGE in a build defining NDEBUG. A strict no-rounding-needed request shall retain its exact-representability precondition and return V_EQ.

    Unflagged delegated and no-rounding-needed requests shall require no particular current hardware direction and shall preserve it. A strict delegated request that uses inexact queries shall require upward hardware direction and preserve it. Source/destination validity, synchronization, backend setup, initialization independence, exception conditions and result-returning behavior shall follow 🔗 1. Directed native integral conversion to native floating-point storage.

    RATIONALE:

    Delegation preserves the caller-selected native rounding behavior, while a no- rounding-needed request carries an exact-representability precondition. A strict inexact result can be known to differ without specifying which side was chosen by a delegated mode.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for the integral-source conversions in 🔗 1. Directed native integral conversion to native floating-point storage:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check delegated conversions under every hardware mode with independent exact integer and adjacent-native-value distance oracles, including nearest-even midpoints. Check exactness requests only for exactly representable finite inputs in both build modes. Test uniform exact source types separately from potentially inexact source types, strict exact/inexact statuses, unavailable- inexact-information fallbacks, source preservation and hardware direction.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc. tests/smallconstantassign1.cc.

  • 3. Exact native floating-point assignment to the same or a wider native format UID: PPL-SPEC-000343 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination shall be raw or Checked_Number<T, Check_Overflow_Policy<T>> instances of configured supported native floating-point types. The source shall be finite. When sizeof(From_native) <= sizeof(To_native) and the configured destination format contains every finite source value exactly, assign_r shall preserve the represented value and return V_EQ for every base direction, with or without ROUND_STRICT_RELATION. Either signed zero shall retain its sign. This shall include same-format assignments and native double/long double formats having equal precision and storage size.

    Source and destination may be the same object or share storage through a checked object's raw-value reference when their native types agree. The conversion shall use the source entry value. A source with distinct storage shall remain unchanged, and later destination mutation shall not affect it. No particular hardware rounding direction, native inexact query, library or thread initialization object, coefficient-constant stage or shared numerical temporary pool shall be required. Calls shall preserve hardware direction. Destination validity, object synchronization, availability, exception conditions and result-returning behavior shall follow 🔗 1. Directed native integral conversion to native floating-point storage.

    RATIONALE:

    An exact embedding between native formats is independent of a global coefficient width and does not require the FPU to establish an approximation direction.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted floating-point To and From types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Cross every configured source/destination format pair admitting the exact route, with raw and checked sources/destinations. Compare exact dyadic values and zero signs at subnormals, normal boundaries, precision limits and finite source maxima. Check all direction/strict requests, every hardware mode, self/raw-storage aliases and independent copies without initialization stages.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc.

  • 4. Directed narrowing between finite native floating-point formats UID: PPL-SPEC-000344 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For configured native source/destination formats and raw or checked types in 🔗 3. Exact native floating-point assignment to the same or a wider native format with sizeof(From_native) > sizeof(To_native), the source shall be finite with exact represented value a. When a lies within destination finite range, ROUND_DOWN shall assign the greatest representable value no greater than a; ROUND_UP shall assign the least representable value no less than a. This shall include transitions between normal, subnormal and signed-zero values. A zero result shall retain the source's sign. Source-range crossings shall follow 🔗 6. Range limits in conversion of finite native scalars to floating point.

    Without ROUND_STRICT_RELATION, downward conversion shall return V_GE and upward conversion V_LE, even for an exactly representable source. With the flag and definite native inexact information, it shall return V_EQ for exactness, V_GT for an inexact downward result and V_LT for an inexact upward result. When definite inexact information is unavailable, it shall return the corresponding weak relation.

    These directed conversions shall require upward hardware rounding and shall preserve that direction. The source shall remain unchanged and the destination shall be live and assignable. Object synchronization, backend setup, availability, initialization independence, exception conditions and result-returning behavior shall follow 🔗 1. Directed native integral conversion to native floating-point storage.

    RATIONALE:

    Native narrowing must preserve the selected bound even across underflow into subnormal or zero values. A weak relation remains meaningful when a backend cannot resolve native inexactness.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted floating-point To and From types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For every actual narrowing pair and raw/checked combination, use exact significand rational oracles at midpoint neighborhoods, precision limits, normal/subnormal transitions and tiny nonzero inputs. Check tight bounds, signed zeros, exact/weak/strict classifications, source preservation and unchanged upward hardware direction. Exercise definite and unavailable native inexact classifications.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc.

  • PPL-SPEC-000345
    5. Delegated and exactness native floating-point narrowing UID: PPL-SPEC-000345 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the narrowing source/destination types in 🔗 4. Directed narrowing between finite native floating-point formats, ROUND_IGNORE shall convert the source's finite represented value using the current hardware direction. The nearest-even mode shall resolve exact midpoints toward an even significand. A zero result shall retain the source's sign. Source-range crossings shall follow 🔗 6. Range limits in conversion of finite native scalars to floating point. ROUND_NOT_NEEDED shall require a source value exactly representable as a finite destination value and shall preserve that value and zero sign.

    An unflagged delegated request shall return V_LGE. With the strict flag and definite native inexact information, it shall return V_EQ for an exact result and V_NE for an inexact result; unavailable inexact information shall give V_LGE. An unflagged no-rounding-needed request shall return V_EQ in an assertion-enabled build and may return lazy V_LGE in a build defining NDEBUG. A strict no-rounding-needed request shall retain its exact-representability precondition and return V_EQ.

    Unflagged delegated and no-rounding-needed requests shall admit every current hardware direction and preserve it. A strict delegated request using native inexact queries shall require upward hardware direction and preserve it. Source/destination validity, source preservation, synchronization, backend setup, availability, initialization independence, exception conditions and result-returning behavior shall follow 🔗 4. Directed narrowing between finite native floating-point formats.

    RATIONALE:

    Native delegation and an asserted exact conversion have different preconditions and classifications. Their value guarantees do not disappear when lazy status information is returned.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted floating-point To and From types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check delegated rounding in every hardware direction using exact dyadic distance and nearest-even midpoint oracles, for all actual narrowing pairs and raw/checked combinations. Check valid no-rounding-needed sources in both build modes, strict exact/inexact statuses, zero signs, source preservation and direction. Keep exactly representable and inexact source sets distinct.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc.

  • 6. Range limits in conversion of finite native scalars to floating point UID: PPL-SPEC-000346 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the native scalar conversions in 🔗 1. Directed native integral conversion to native floating-point storage and 🔗 4. Directed narrowing between finite native floating-point formats, let M be the destination's maximum finite value and let a be a finite source outside [ − M, M]. For a > M, downward conversion shall assign M and upward conversion positive infinity. For a <  − M, upward conversion shall assign  − M and downward conversion negative infinity.

    Delegated conversion shall use the current hardware direction. Toward-zero mode shall choose the finite endpoint; directed modes shall choose the corresponding endpoint or infinity above. In nearest-even mode, let u = 2emax − p be the last finite binade's spacing, where std::numeric_limits<F>::max_exponent is emax and destination precision is p. A magnitude below M + u ⁄ 2 shall choose the finite endpoint; a magnitude at or above that threshold shall choose the corresponding infinity.

    Every finite computed endpoint shall have class VC_NORMAL and shall use the weak/strict relation of its conversion request. Every computed positive infinity shall have class VC_PLUS_INFINITY and every computed negative infinity VC_MINUS_INFINITY, with the corresponding conversion relation. These native infinities shall be representable, without V_UNREPRESENTABLE. The conversion shall not promise an integer-overflow annotation for a finite directed endpoint. No-rounding-needed requests shall retain their finite exact-representability precondition and shall not admit these source values. Object, state, availability and backend prerequisites shall follow the applicable conversion above.

    RATIONALE:

    A directed finite endpoint and an infinite bound can both be valid approximations. The result class must nevertheless describe the value actually stored, independently of how precisely its relation is reported.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted floating-point To and From types:

    Result assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use both signs of source values immediately beyond the destination maximum, the nearest-overflow midpoint and much larger finite values for every narrowing format pair. Check directed and delegated values, exact class fields, weak/strict relations and representability; repeat for native integral sources whenever their available width reaches this range. Preserve sources and hardware direction, with no invalid native casts or no-rounding-needed requests.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/nativefloatingconversionspec1.cc.

  • PPL-SPEC-000842
    1. Native integer accumulated products and intermediate overflow UID: PPL-SPEC-000842 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven native integer storage types and same-storage raw/checked forms in 🔗 1. Exact same-storage native integer arithmetic, entry values d, a and b shall denote the destination and two sources. When the product p = ab and complete expression are within the destination policy's finite interval, add_mul_assign_r shall assign d + p and sub_mul_assign_r shall assign d − p. They shall return V_EQ for each valid rounding request, including a strict relation flag.

    When overflow checking is enabled and p is finite and representable, an unrepresentable final sum or difference shall have the range outcome of 🔗 4. Checked native arithmetic range outcomes. An unrepresentable product may cause an intermediate-overflow failure even if cancellation would bring the complete expression into range. V_UNKNOWN_NEG_OVERFLOW and V_UNKNOWN_POS_OVERFLOW shall identify the sign of that intermediate product overflow and promise no numeric answer. If the destination policy admits NaN, such a diagnostic shall leave its NaN representation; otherwise its payload shall be unspecified and reusable. No exactness, infinity or finite-result meaning shall be inferred from that payload.

    An intermediate overflow may instead yield the range outcome of 🔗 4. Checked native arithmetic range outcomes when the complete expression is outside the finite interval. Every reported relation shall describe the complete expression's ordering relative to its reported computed value; an intermediate overflow shall not justify a false final-result relation. A successful finite answer shall equal the complete expression, including if an implementation recovers it after an intermediate range limit. No wider or fused accumulator shall be required.

    With overflow checking disabled, both product and final expression shall be finite and representable. ROUND_NOT_NEEDED shall require those same two representability conditions. Entry values shall be finite for their own policies and lie in the destination policy's finite interval. The finite interval and raw destination policy shall follow 🔗 1. Exact same-storage native integer arithmetic.

    The destination may be either source, the sources may share an object, and all arguments may be the same object. Each occurrence shall use its entry value, including the initial destination. Distinct sources shall remain unchanged. Calls shall require no rounding default or result handler and shall not invoke a handler. Live-object, synchronization, initialization and hardware-direction prerequisites shall follow 🔗 1. Exact same-storage native integer arithmetic. Configured coefficient convenience operations shall retain 🔗 6. Integral product accumulation and subtraction.

    RATIONALE:

    A bounded two-step accumulator has distinct product and final range limits. Intermediate failure can be reported honestly without confusing it with a proved bound on the complete expression.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result add_mul_assign_r(To& to, const X& x, const Y& y,
                            Rounding_Dir dir);
    Result sub_mul_assign_r(To& to, const X& x, const Y& y,
                            Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded integer products and complete-expression oracles for all native storage types and reserved-value policies. Check exact products, final-only overflow, both product-overflow signs, cancellation, zero and nonzero destinations, all admitted requests and every alias pattern. Check that range relations apply to the complete expression, unknown diagnostics identify the product-overflow sign, distinct sources remain unchanged, no handler is invoked, outputs remain reusable and hardware direction is preserved without initialization.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_int_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegeraccumulationspec1.cc.

  • PPL-SPEC-000831
    1. Exact same-storage native integer arithmetic UID: PPL-SPEC-000831 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For each of the eleven standard native integer storage types I, add_assign_r, sub_assign_r and mul_assign_r shall assign the exact mathematical sum, difference and product of their entry operands when the result is within the destination's finite range. They shall return V_EQ for each valid rounding direction, with or without ROUND_STRICT_RELATION. A rounding request shall not introduce a fractional approximation to an integer sum, difference or product.

    Each argument shall have underlying storage type I, either as a raw integer or an admitted Checked_Number<I, Policy>. Entry operands shall be finite for their own source policies and lie in the destination policy's finite interval. That interval shall account for reserved representations as specified by 🔗 1. Bounded checked integer limits and reserved endpoints. A raw destination shall use the full native integer interval and overflow checking; a checked destination shall use its selected policy. If checking is disabled, the exact operation result shall be within that finite interval. Enabled range checking shall have the additional outcomes of 🔗 4. Checked native arithmetic range outcomes.

    The output may alias either input, the two read-only inputs may alias each other, and all three arguments may be the same object. Every occurrence in the mathematical expression shall use its entry value. Distinct source objects shall remain unchanged. Named calls shall require no rounding default or result handler and shall not dispatch a handler. Objects shall be live and access overlapping mutation shall be synchronized. Calls shall require no library initialization, coefficient-constant stage or FPU setup and preserve hardware direction. Configured coefficient operators shall retain 🔗 3. Exact ordinary integral coefficient arithmetic; unbounded integer arithmetic shall retain 🔗 1. Exact named arithmetic on unbounded integer storage.

    RATIONALE:

    Exact integer arithmetic must retain its meaning across storage widths, signedness and policies without invoking a convenience-interface handler.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result add_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result sub_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result mul_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded integer oracles across all eleven storage types, signed and unsigned endpoints, cancellation, zero, product sign combinations and representability boundaries. Check all valid exact requests, raw and checked operands, source preservation and every admitted alias. Exercise policies with and without overflow checking within their valid ranges.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerarithmeticspec1.cc.

  • 2. Directed native integer division and delegated truncation UID: PPL-SPEC-000832 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For argument types, entry-operand finite ranges and lifetime/alias prerequisites from 🔗 1. Exact same-storage native integer arithmetic, let the divisor b be nonzero and let q = a ⁄ b be the exact rational quotient. div_assign_r with ROUND_DOWN shall assign ⌊q⌋; with ROUND_UP it shall assign ⌈q⌉. A successful result shall give a relation containing the exact ordering of q relative to the stored integer. With ROUND_STRICT_RELATION, it shall identify precisely equality, strict greater-than or strict less-than through V_EQ, V_GT or V_LT.

    ROUND_IGNORE shall store the quotient truncated toward zero and may return a relation containing equality and either strict order. A strict request shall identify the exact relation between q and that stored integer. ROUND_NOT_NEEDED shall require an exact representable quotient; it shall store that quotient and return a relation admitting equality. A strict exactness request shall return V_EQ. An out-of-range quotient shall follow 🔗 4. Checked native arithmetic range outcomes when checking is enabled, and shall be outside the unchecked successful-result precondition otherwise.

    Quotient rounding and relation classification shall use entry operands even if the destination aliases the dividend or divisor. Sources not sharing the destination shall remain unchanged. Calls shall retain the handler, initialization, synchronization and hardware-direction conditions of 🔗 1. Exact same-storage native integer arithmetic.

    RATIONALE:

    Bounded integer division needs a defined rounding convention and an honest relation to the exact rational quotient, including delegated truncation.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result div_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Derive floor, ceiling and truncation from independent unbounded integer quotient/remainder calculations for every sign combination. Check exact and inexact quotients, zero dividends, full signed and unsigned endpoints, all admitted rounding and strictness requests, source aliases and preserved entry values. Assess checked range failure separately from successful representable division.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerarithmeticspec1.cc.

  • 3. Exact native truncated quotient and remainder UID: PPL-SPEC-000833 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-storage finite operands and prerequisites of 🔗 1. Exact same-storage native integer arithmetic and a nonzero divisor b, idiv_assign_r shall assign the exact integer t = trunc(a ⁄ b) and rem_assign_r shall assign r = a − tb. For representable results, both shall return V_EQ for every valid rounding request, with or without ROUND_STRICT_RELATION. The named integer quotient shall not change to a floor or ceiling when the direction changes.

    The identity a = tb + r shall hold mathematically. A nonzero remainder shall have the dividend's sign and satisfy |r| < |b|. Unsigned remainders shall be nonnegative. In particular, a signed minimum integer's remainder modulo -1 shall be exactly zero even when the corresponding positive quotient is outside storage range. The quotient's checked range outcome shall follow 🔗 4. Checked native arithmetic range outcomes; the remainder shall not require that quotient to be representable as an intermediate native integer.

    Each operation shall permit every alias described by 🔗 1. Exact same-storage native integer arithmetic, using entry operands and preserving distinct sources. Its handler, initialization, synchronization and hardware-direction conditions shall follow that contract. ROUND_NOT_NEEDED shall require the selected operation's own integer result to be representable; it shall not require a ⁄ b itself to be integral when requesting the truncated quotient or remainder.

    RATIONALE:

    A truncated quotient and its remainder are exact integer operations. A quotient overflow must not prohibit a representable remainder or cause native undefined division during its computation.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result idiv_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result rem_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check independent unbounded quotient/remainder and reconstruction oracles for all operand signs, exact and inexact division, zero dividends, every standard native storage type and endpoint values. Include signed minimum modulo minus one, all valid requests and every source/output alias. Check quotient overflow through its separate range contract.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerarithmeticspec1.cc.

  • 4. Checked native arithmetic range outcomes UID: PPL-SPEC-000834 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For native integer operations in 🔗 1. Exact same-storage native integer arithmetic, 🔗 2. Directed native integer division and delegated truncation and 🔗 3. Exact native truncated quotient and remainder, an overflow-checking destination shall detect an exact requested integer outside its finite interval rather than report a wrapped integer as successful exact arithmetic. For directed division the requested integer shall be its floor or ceiling; for delegated division it shall be its truncated quotient. Inputs shall satisfy the same-storage and finite entry-range conditions of those contracts. ROUND_NOT_NEEDED shall require exact representability and therefore exclude a range failure, with or without a strict flag.

    For an exact integer below the finite lower endpoint, ROUND_UP shall store that endpoint and return V_LT_INF. ROUND_DOWN or ROUND_IGNORE shall return V_GT_MINUS_INFINITY, storing negative infinity if the destination policy admits it; otherwise the result shall add V_UNREPRESENTABLE. For an exact integer above the upper endpoint, ROUND_DOWN shall store that endpoint and return V_GT_SUP. ROUND_UP or ROUND_IGNORE shall return V_LT_PLUS_INFINITY, storing positive infinity if admitted; otherwise the result shall add V_UNREPRESENTABLE. A strict-relation flag shall not change these range outcomes. These codes shall describe the mathematical operation result relative to the endpoint or extended stored value.

    When unrepresentability is reported, no numerical payload or rollback shall be promised, but the destination shall remain assignable and destructible. A range outcome shall not invoke a policy handler or automatically throw an overflow exception. Distinct source objects shall remain unchanged, and the aliasing, initialization, synchronization and hardware-direction conditions of 🔗 1. Exact same-storage native integer arithmetic shall continue to apply. A checked policy with overflow checking disabled shall not receive these detection guarantees.

    RATIONALE:

    An explicit Result interface must distinguish a finite inward endpoint, an admitted outward infinity and an unrepresentable outward bound without automatic exception policy dispatch.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result add_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result sub_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result mul_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result div_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result idiv_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded arithmetic to generate results immediately beyond both finite endpoints and larger range failures. Check literal result codes, inward endpoint storage, admitted outward infinity and unrepresentability for all native storage types, policy reservation combinations, directed and delegated requests, aliases and reusable outputs. Verify that a rejecting policy handler is never called and distinct inputs remain unchanged.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerarithmeticspec1.cc.

  • 1. Bounded native integer Bezout assignment UID: PPL-SPEC-000843 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For finite native integer source entry values a and b, gcdext_assign_r shall assign a nonnegative greatest common divisor g and integer coefficients s, t satisfying as + bt = g. For two zero sources, g shall be zero. No unique coefficient pair shall be required, including for zero, equal or opposite sources. The operation shall return V_EQ for each valid rounding request, including strict and exactness requests.

    All arguments shall have the same one of the eleven native integer storage types I. The three outputs shall either all be raw I or all have the same admitted Checked_Number<I, Policy> type; either source may be raw I or that checked type. Source values shall be finite for their own policies and in the output policy's finite interval. The output interval and raw destination policy shall follow 🔗 1. Exact same-storage native integer arithmetic.

    Both source absolute values, each evaluated Euclidean quotient, coefficient, product and difference, and the final outputs shall be finite and representable in the selected output interval. These conditions shall apply even when overflow checking is enabled: native intermediate expressions shall not promise a checked-overflow result. Unsigned storage shall admit only computations whose coefficients and evaluated intermediates remain nonnegative and representable. Existence of some mathematical Bezout pair alone shall not imply these bounded computation prerequisites. Configured coefficient convenience operations shall retain 🔗 5. Extended integral greatest common divisor; unbounded integer forms shall retain 🔗 2. Exact unbounded integer Bezout coefficients.

    The three outputs shall be pairwise distinct and distinct from both sources. The sources may be the same object and shall remain unchanged. No other aliasing shall be admitted. Calls shall require no rounding default or result handler and shall not invoke a handler. Live-object, synchronization, initialization and hardware-direction prerequisites shall follow 🔗 1. Exact same-storage native integer arithmetic.

    RATIONALE:

    The Bezout identity gives a portable numerical guarantee without selecting one backend's coefficients. Multiple outputs and native intermediate expressions require explicit separation and representability conditions.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted argument types:

    Result gcdext_assign_r(To& g, To& s, To& t,
                           const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check nonnegative gcd and Bezout reconstruction with independent unbounded integer arithmetic, without requiring the oracle's coefficient pair. Include zero, equal and opposite sources, both source orders, coprime and noncoprime inputs, signed endpoint magnitudes, small exhaustive signed operands and admitted unsigned cases. Check exact intermediate representability before bounded calls, all eight requests, distinct and shared sources, raw/checked forms, source preservation, no handler calls and hardware-direction preservation without initialization.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_int_inlines.hh; src/checked_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerbezoutspec1.cc.

  • PPL-SPEC-000837
    1. Native integer arithmetic with exact powers of two UID: PPL-SPEC-000837 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven standard native integer storage types and same-storage raw/checked forms in 🔗 1. Exact same-storage native integer arithmetic, let m = 2e for an unsigned int exponent e. add_2exp_assign_r, sub_2exp_assign_r and mul_2exp_assign_r shall assign the exact mathematical integers x + m, x − m and xm when those results lie in the destination policy's finite interval. Each shall return V_EQ for every valid rounding request, including a strict flag.

    With overflow checking enabled, all unsigned exponent values shall be admitted. A checked result outside the finite interval shall have the endpoint, extended-value or unrepresentability outcome of 🔗 4. Checked native arithmetic range outcomes. In particular, zero multiplied by any such power shall remain exact zero, without requiring the power to fit native storage. ROUND_NOT_NEEDED shall require a representable result.

    For unchecked add/subtract, both the power and the exact result shall be representable in native I and the result shall be finite for the selected policy. For unchecked multiplication, the exponent shall be less than the native storage width in bits and the exact result shall be finite and representable. These preconditions shall apply even to a zero source when an unchecked implementation forms a native shift.

    The source and destination may be the same object. Calculations shall use entry source values and preserve distinct sources. No rounding default or handler shall be required or invoked. Object lifetime, synchronization, initialization and hardware-direction conditions shall follow 🔗 1. Exact same-storage native integer arithmetic. The mathematical definition shall not impose an intermediate native limit on a checked operation's power of two.

    RATIONALE:

    An exponent is a mathematical power parameter. Checked operations can decide large-power range outcomes without performing an invalid native shift; unchecked calls require explicit intermediate and shift preconditions.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result add_2exp_assign_r(To& to, const From& source, unsigned int e,
                             Rounding_Dir dir);
    Result sub_2exp_assign_r(To& to, const From& source, unsigned int e,
                             Rounding_Dir dir);
    Result mul_2exp_assign_r(To& to, const From& source, unsigned int e,
                             Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded or symbolic integer oracles for every native width, zero, signed minima, finite endpoints, cancellation, and exponents zero, below/at/above the sign and storage boundaries and UINT_MAX. Check valid exact requests, all range outcomes, raw/checked forms, source aliases and preserved hardware direction. Keep unchecked calls within both shift and intermediate representability preconditions.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/nativeintegerdyadicspec1.cc.

  • PPL-SPEC-000838
    2. Directed native integer division by powers of two UID: PPL-SPEC-000838 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-storage finite entry values and prerequisites in 🔗 1. Exact same-storage native integer arithmetic, div_2exp_assign_r shall divide the exact integer source by 2e, for every unsigned int exponent e. ROUND_DOWN shall store its floor, ROUND_UP its ceiling and ROUND_IGNORE its truncation toward zero. Every stored result shall be finite and representable. No exponent shall cause an invalid native shift, including one equal to or greater than the storage width.

    A successful result shall report a relation containing the exact rational quotient's ordering relative to the stored integer. With ROUND_STRICT_RELATION it shall return precisely V_EQ, V_GT or V_LT for equality, an exact quotient greater than the stored result, or one smaller than it. ROUND_NOT_NEEDED shall require exact divisibility by 2e; it shall store the exact quotient and return a relation admitting equality. Its strict form shall return V_EQ.

    An exponent of zero shall preserve the integer value. For exponents greater than the storage width, a nonzero positive source shall have floor zero and ceiling one; a negative source shall have floor minus one and ceiling zero. Delegated truncation shall give zero in both cases. Zero shall remain zero for every exponent. Source aliases, preservation, handler independence, initialization, synchronization and hardware-direction conditions shall follow 🔗 1. Exact same-storage native integer arithmetic.

    RATIONALE:

    Integer division by a power of two must retain its directed mathematical meaning beyond the native shift width, including negative fractions and exactness classification.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result div_2exp_assign_r(To& to, const From& source, unsigned int e,
                             Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Derive exact quotient/remainder, directed integer and relation oracles using unbounded arithmetic or symbolic signs for very large exponents. Exercise all eleven storage types, every valid request, signed zero-crossing cases, finite endpoints, exact divisibility and exponents through UINT_MAX. Check same-object assignment, raw/checked forms, unchanged sources and hardware direction without library initialization.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/nativeintegerdyadicspec1.cc.

  • PPL-SPEC-000839
    3. Centered and nonnegative native integer dyadic residues UID: PPL-SPEC-000839 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-storage finite entry operands and prerequisites in 🔗 1. Exact same-storage native integer arithmetic, let m = 2e, where e is any unsigned int exponent. umod_2exp_assign_r shall assign the unique integer u with 0 ≤ u < m and x − u divisible by m. smod_2exp_assign_r shall assign s = u when 2u < m, and s = u − m otherwise. The centered interval shall therefore be [ − m ⁄ 2, m ⁄ 2); an exact half-modulus tie shall select its negative representative. Exponent zero shall give zero for both operations.

    A representable finite residue shall return V_EQ for every valid rounding request, including strict requests. The rounding direction shall not choose a different residue convention. When checking is enabled, a residue outside the policy's finite interval shall instead have the range outcome of 🔗 4. Checked native arithmetic range outcomes, using that residue as the exact requested integer. Reserved infinity/NaN representations shall not be reported as successful finite residues. This shall include negative centered residues in unsigned storage and nonnegative signed-storage residues crossing a policy-reserved upper endpoint.

    Unchecked calls shall require the selected residue to be finite and representable. ROUND_NOT_NEEDED shall require representability, with or without a strict flag. No exponent shall cause an invalid native shift. The source and destination may alias, and a distinct source shall remain unchanged. Handler independence, output reusability after an unrepresentable range outcome, initialization, lifetime, synchronization and preserved hardware direction shall follow 🔗 1. Exact same-storage native integer arithmetic and 🔗 4. Checked native arithmetic range outcomes.

    RATIONALE:

    A residue convention includes its sign and half-modulus tie rule. Its exact mathematical value must also respect the selected policy finite interval, which may be smaller than the underlying native storage range.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result smod_2exp_assign_r(To& to, const From& source, unsigned int e,
                              Rounding_Dir dir);
    Result umod_2exp_assign_r(To& to, const From& source, unsigned int e,
                              Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent nonnegative modulo and centered tie oracles for all native types, zero, both signs, finite endpoints, half-modulus boundaries, exponent zero and storage-width boundaries through UINT_MAX. Check exact payloads or literal policy-aware range outcomes, source aliases, raw/checked forms and all valid requests. Include unsigned negative centered results and signed nonnegative residues at policy-reserved positive endpoints.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/nativeintegerdyadicspec1.cc.

  • PPL-SPEC-000840
    1. Directed native integer square-root assignment UID: PPL-SPEC-000840 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven standard native integer storage types and same-storage raw/checked forms in 🔗 1. Exact same-storage native integer arithmetic, a finite nonnegative source x shall be admitted by sqrt_assign_r. ROUND_DOWN shall store ⌊√(x)⌋; ROUND_UP shall store ⌈√(x)⌉. ROUND_IGNORE shall use the floor convention. The result shall be finite and representable, including when forming its mathematical square or its successor's square would exceed native storage.

    The returned relation shall contain the exact nonnegative real square root's ordering relative to the stored integer. With ROUND_STRICT_RELATION it shall identify exactly equality, strict greater-than or strict less-than through V_EQ, V_GT or V_LT. ROUND_NOT_NEEDED shall require a perfect-square source, store its exact integer root and return a relation admitting equality; its strict form shall return V_EQ. Zero and one shall have their exact roots. No negative-input rejection guarantee shall be inferred from the nonnegative domain.

    The source and destination may be the same object; distinct sources shall remain unchanged. Calls shall require no rounding default, policy handler, floating-point conversion, FPU setup, irrational-precision setting or library initialization. They shall not invoke a result handler and shall preserve hardware direction. Live-object and synchronization prerequisites shall follow 🔗 1. Exact same-storage native integer arithmetic.

    RATIONALE:

    An integer root can be computed and checked exactly without an inexact floating conversion or a native-width square used as an oracle.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result sqrt_assign_r(To& to, const From& source, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded integer root/remainder oracles and both root inequalities, every nonnegative eight-bit input, all native storage types, large perfect squares and their neighbors, finite maxima, raw/checked forms and source aliases. Check each admitted rounding/exactness request, result relation, unchanged sources and hardware direction without initialization.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/nativeintegerfunctionspec1.cc.

  • 2. Native integer greatest common divisor and least common multiple UID: PPL-SPEC-000841 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-storage finite entry operands and prerequisites in 🔗 1. Exact same-storage native integer arithmetic, gcd_assign_r shall assign the nonnegative integer g = gcd(a, b). Two zero sources shall give zero; one zero source shall give the other source's absolute value. lcm_assign_r shall give zero when either source is zero, without requiring a representable absolute value of the other source. Otherwise it shall assign the positive integer |a ⁄ g| |b|.

    For a finite representable result, each operation shall return V_EQ for every valid rounding request, including a strict flag. With overflow checking enabled, a nonnegative exact result outside the selected policy's finite interval shall have the positive-range outcome of 🔗 4. Checked native arithmetic range outcomes. Checked acquisition of a nonrepresentable source absolute value during a nonzero least-common-multiple calculation shall have that same positive-range outcome; no wrapped magnitude shall be a successful finite answer. If checking is disabled, the result and each needed source absolute value or native arithmetic intermediate shall be finite and representable. ROUND_NOT_NEEDED shall require representability of the selected operation and its necessary intermediates.

    The destination may alias either source, the sources may share an object, and all three arguments may be the same object. Every mathematical operand shall mean its entry value. Distinct sources shall remain unchanged. Calls shall require no rounding defaults or result handlers and shall invoke no handler, including on a range outcome. Object lifetime, synchronization, initialization, hardware-direction preservation and output reusability after an unrepresentable result shall follow 🔗 1. Exact same-storage native integer arithmetic and 🔗 4. Checked native arithmetic range outcomes.

    RATIONALE:

    Number-theoretic results have nonnegative mathematical meanings independent of source signs. Zero multiples and a representable remainder sequence need not acquire an unrepresentable signed minimum magnitude.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result gcd_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    Result lcm_assign_r(To& to, const X& x, const Y& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare all source signs, zeros, common factors, coprime inputs and finite endpoints with independent unbounded gcd/lcm oracles. Check every standard native type, reservation policy, valid request, source/output alias and raw/checked argument position. Assess nonrepresentable nonnegative results and checked absolute-value acquisition with literal range codes, no handler dispatch, preserved distinct sources and reusable outputs.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/nativeintegerfunctionspec1.cc.

  • PPL-SPEC-000835
    1. Native integer floor, ceiling and truncation identity UID: PPL-SPEC-000835 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven standard native integer storage types and same-storage raw/checked argument forms in 🔗 1. Exact same-storage native integer arithmetic, floor_assign_r, ceil_assign_r and trunc_assign_r shall assign the source integer unchanged and return V_EQ. Every valid rounding request, with or without ROUND_STRICT_RELATION, shall have this identity behavior.

    The entry source shall be finite under its policy and within the selected destination policy's finite interval. The source and output may be the same object; distinct sources shall remain unchanged. Named calls shall require no rounding default or policy result handler and invoke no handler. The lifetime, synchronization, initialization and hardware-direction conditions of 🔗 1. Exact same-storage native integer arithmetic shall apply.

    RATIONALE:

    Applying an integral rounding operation to an integer must preserve every finite bit value, including its range endpoints and source aliases.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result floor_assign_r(To& to, const From& source, Rounding_Dir dir);
    Result ceil_assign_r(To& to, const From& source, Rounding_Dir dir);
    Result trunc_assign_r(To& to, const From& source, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For every standard native integer type and admitted policy reservation combination, check finite endpoints and interior signed/unsigned values under all eight requests. Verify raw/checked argument combinations, same object assignment, unchanged distinct sources, exact result codes, no handler calls and preserved hardware direction without initialization.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerunaryspec1.cc.

  • 2. Native integer negation and absolute value UID: PPL-SPEC-000836 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the same-storage native integer argument forms and entry-value preconditions in 🔗 1. Exact same-storage native integer arithmetic, neg_assign_r shall assign  − x and abs_assign_r shall assign |x| whenever that mathematical integer is within the selected destination's finite interval. Each successful operation shall return V_EQ for every valid rounding request, with or without ROUND_STRICT_RELATION. Zero shall remain zero; unsigned absolute value shall preserve its source value.

    When the selected destination enables overflow checking, an exact result outside its finite interval shall have the inward endpoint, admitted outward infinity or unrepresentability outcome of 🔗 4. Checked native arithmetic range outcomes. In particular, negating a nonzero unsigned integer shall not report a wrapped unsigned value as successful exact negation. A signed minimum's positive negation or absolute value shall be range-checked when it is outside the destination interval. If checking is disabled, the result shall be representable as a precondition. ROUND_NOT_NEEDED shall require representability, including when a strict flag is present.

    The source and output may be the same object; every calculation shall use the entry source value. Distinct sources shall remain unchanged. Calls shall require no rounding default or policy result handler and shall not invoke a handler, including when a range outcome is returned. Output reusability after unrepresentability, object lifetime, synchronization, initialization and hardware-direction conditions shall follow 🔗 1. Exact same-storage native integer arithmetic and 🔗 4. Checked native arithmetic range outcomes.

    RATIONALE:

    The positive magnitude of a signed minimum and the negative of an unsigned value require explicit range treatment even though the source itself is finite and valid.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for admitted argument types:

    Result neg_assign_r(To& to, const From& source, Rounding_Dir dir);
    Result abs_assign_r(To& to, const From& source, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded negation/absolute-value oracles for all eleven native types, every policy reservation combination, signed minima, finite endpoints, zero and both signs. Check all valid requests, exact payloads, literal range codes, inward endpoints, enabled outward infinity, reusable unrepresentable outputs, raw/checked forms and both permitted aliases. Verify handler independence and preserved hardware direction.

    SOURCE:

    src/checked_int_inlines.hh; src/checked_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_ext_inlines.hh; tests/nativeintegerunaryspec1.cc.

  • 1. Typed special construction in native scalar storage UID: PPL-SPEC-000849 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a writable native scalar type T, construct(to, marker, dir) shall begin a T object lifetime in the destination storage and assign the requested special marker. T shall be one of the eleven standard native integer types or a configured supported native floating-point type. The storage shall be suitably aligned, writable and large enough for one T. It may contain no live object, or a live trivially destructible T whose lifetime may be replaced. The caller shall own the storage and prevent overlapping access during lifetime replacement.

    The special marker types shall be those of 🔗 1. Typed special-marker assignment to native integer storage. The new scalar's numerical value, exact Result code, representability flags and admitted rounding requests shall follow the corresponding raw integer destination in 🔗 1. Typed special-marker assignment to native integer storage or raw floating destination in 🔗 4. Typed special-value assignment to native floating-point storage. Supported special values shall be represented without a false unrepresentability flag; a NaN shall have an empty ordered relation. Unsupported results shall promise no payload. A live scalar object shall exist after normal return, including after an unsupported numerical result, and it shall be reusable as a destination without inspecting an unspecified payload. The marker shall remain unchanged.

    These calls shall require no policy rounding default or result handler and shall not invoke a handler. They shall require no library initialization, coefficient-constant stage or FPU setup, and shall preserve hardware direction. Native floating-point exception/status conditions shall follow 🔗 4. Typed special-value assignment to native floating-point storage; unavailable formats shall not be instantiated. Normal C++ lifetime rules shall govern subsequent access, reuse and ending the new scalar's lifetime.

    RATIONALE:

    Construction begins an object lifetime rather than merely assigning a live value. Native scalars support both fresh aligned storage and transparent replacement without a class-resource cleanup obligation.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in Parma_Polyhedra_Library for the admitted T and marker Special:

    Result construct(T& to, const Special& marker, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For each native integer and available floating type, construct each marker in fresh aligned storage and replace a live scalar. Check admitted requests, exact result codes, supported special payloads and unsupported result reuse, ending each new lifetime correctly. Check preserved markers and hardware direction without initialization, with no unavailable-format instantiations.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_int_inlines.hh; src/checked_float_inlines.hh; tests/nativespecialconstructionspec1.cc.

  • PPL-SPEC-000917
    1. Floating-related traits and conditional inexact state access UID: PPL-SPEC-000917 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    FPU_Related<T>::value shall be a compile-time Boolean constant that is true for exactly the unqualified native types float, double and long double, and false for other primary-template types. A supported Checked_Number<T, Policy> specialization shall forward the underlying FPU_Related<T>::value independently of the policy. Native type classification shall not depend on whether PPL rounded floating operations were enabled in the build. In particular, cv-qualified raw floating types shall retain the primary-template result.

    When FPU_Related<T>::value is false, maybe_reset_fpu_inexact<T>() shall do nothing and maybe_check_fpu_inexact<T>() shall return zero. Neither call shall access the native FPU backend or alter rounding direction, exception flags or other numerical state, even if an unrelated floating operation has set an inexact flag.

    When that value is true, the reset helper shall call fpu_reset_inexact() and the query helper shall return exactly the result of fpu_check_inexact(). A supported flag query shall report zero when clear and one when set, without clearing it; a backend without inexact-flag observation shall retain its negative unavailable result. Exception flags and rounding-control effects shall be those of the corresponding native backend functions. These related-type calls shall satisfy the backend setup and state-ownership conditions of 🔗 4. Rounding-state exchange during an initialized thread lifetime, including the default upward entry direction required by an IA32 reset backend. If the configured backend cannot control the FPU, a related-type call shall propagate its std::logic_error rather than treat the type as unrelated.

    No scalar instance, checked rounding default or policy handler shall be required or consulted. Type constants and unrelated-type calls shall require no library initialization, coefficient-constant stage or FPU setup. Related-type calls shall add no setup obligation beyond the selected native backend.

    RATIONALE:

    Type-directed generic arithmetic can avoid touching floating state for unrelated storage while preserving the native backend protocol for floating storage, including unavailable-backend behavior.

    INTERFACE:

    Public header: <ppl.hh>; templates in Parma_Polyhedra_Library:

    template <typename T>
    struct FPU_Related;
    
    template <typename T, typename Policy>
    struct FPU_Related<Checked_Number<T, Policy>>;
    
    template <typename T>
    void maybe_reset_fpu_inexact();
    
    template <typename T>
    int maybe_check_fpu_inexact();
    
    VERIFICATION_CRITERIA:

    Check trait values for every scalar family, checked policies and cv-qualified raw types. Independently seed/query standard inexact flags, require pure unrelated-type behavior and exact reset/query forwarding with admitted backend setup, and check repeated queries do not clear the flag. Cover the actual disabled-FPU configuration and unavailable-observation branch where provided. Require exact function return types, no policy/default dependency and unchanged type constants across configurations.

    SOURCE:

    src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/numericinexactselectionspec1.cc.

  • 1. Bounded checked integer limits and reserved endpoints UID: PPL-SPEC-000577 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    C_Integer_Type<I> shall have the truth value of C_Integer<I>::value. The default family shall contain the eleven native integer types below, excluding bool, wide character types and cv-qualified or reference types. GMP and native floating types shall not belong to this integer family.

    For each of the eleven standard native integer types I and an admitted policy Policy, std::numeric_limits<Checked_Number<I, Policy>> shall describe the underlying integer format and its policy-reserved values. is_specialized, is_signed, is_integer, is_exact, is_bounded, radix, digits, digits10, max_digits10 and the four exponent fields shall equal their std::numeric_limits<I> counterparts. has_signaling_NaN shall equal the native field and shall be false for these integer types. These format fields shall describe storage; they shall not enlarge the finite interval after reserving special representations. has_infinity and has_quiet_NaN shall equal the policy's has_infinity and has_nan traits.

    Let L and U be the native minimum and maximum. Let h be one when infinity is enabled and zero otherwise, and n be one when NaN is enabled and zero otherwise. For signed storage, the finite interval shall be [L + h + n, U − h]. For unsigned storage it shall be [0, U − 2h − n]. min() and lowest() shall return the lower finite endpoint; max() shall return the upper finite endpoint. The endpoint arithmetic here shall have its mathematical integer meaning. epsilon(), round_error() and denorm_min() shall return checked zero objects as placeholders for inapplicable floating-format quantities. signaling_NaN() shall have no admitted signaling-NaN result when has_signaling_NaN is false.

    Each of these six finite factories shall return the checked scalar type, without requiring an implicit scalar conversion, a rounding default or a result handler. When infinity is enabled, infinity() shall return a checked positive infinity. When NaN is enabled, quiet_NaN() shall return a checked NaN. Those special factories shall likewise return the checked type and invoke no policy handler. Calls to a disabled special factory shall be outside this guarantee. Policy traits shall be coherent with the selected integer backend. These limits queries and factories shall require no library initialization or FPU setup and preserve hardware direction. Returned objects shall own their storage independently.

    RATIONALE:

    Generic numerical code needs the finite endpoints that remain after policy reservations. A factory for a checked type shall produce that type, so its use shall not depend on unrelated conversion defaults or handlers.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiation:

    template <typename I>
    concept C_Integer_Type = bool(C_Integer<I>::value);
    
    using N = Parma_Polyhedra_Library::Checked_Number<I, Policy>;
    using Limits = std::numeric_limits<N>;
    static N min();
    static N max();
    static N lowest();
    static N epsilon();
    static N round_error();
    static N denorm_min();
    static N infinity();
    static N quiet_NaN();
    

    The named format and capability fields shall be constant members of Limits. The special factories shall have the enabling conditions above.

    VERIFICATION_CRITERIA:

    Check format traits and factory result types for every standard native integer type. Exercise all four infinity/NaN trait combinations, deriving finite endpoints with independent unbounded integer arithmetic, and check min(), max() and lowest() against them; check the three zero placeholders and their result types. Confirm signaling NaN is not advertised. Classify every enabled special factory through PPL predicates. Use policies with no rounding defaults and a rejecting handler to establish handler independence. Check owned copies, preserved hardware direction, signedness alternatives for char, and every coefficient profile without library initialization.

    SOURCE:

    src/C_Integer.hh; tests/commonhelpersspec1.cc; tests/numericpublic1.cc; src/checked_numeric_limits.hh; src/checked_int_inlines.hh; tests/numericlimitsspec1.cc.

  • PPL-SPEC-000578
    2. Checked native floating format limits and factories UID: PPL-SPEC-000578 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a configured supported native floating type F and an admitted policy, std::numeric_limits<Checked_Number<F, Policy>> shall expose the underlying floating format's is_specialized, is_signed, is_integer, is_exact, is_bounded, radix, digits, digits10, max_digits10, four exponent fields, has_denorm and has_denorm_loss. Each shall equal its native F counterpart. For policies admitting the format's infinity and NaN, has_infinity, has_quiet_NaN and has_signaling_NaN shall equal their native fields.

    min(), max(), lowest(), epsilon(), round_error() and denorm_min() shall return checked objects containing exactly the corresponding native factory values, with their signs preserved. In particular, min() shall denote the smallest positive normal value, lowest() the most negative finite value and max() the largest finite value. If the format and policy admit infinity or quiet NaN, infinity() or quiet_NaN() respectively shall return a checked object of that class. If has_signaling_NaN is true and the policy admits NaN, signaling_NaN() shall return a checked signaling NaN of the native format. A false signaling capability shall admit no such result. Signaling NaN shall retain the native format's invalid-operation signaling behavior on arithmetic use; this shall not invoke a PPL policy handler merely by obtaining its representation. No NaN payload or NaN sign shall be prescribed.

    Each named factory shall return the checked type, independently of implicit conversion permission, rounding defaults and policy handlers. No handler shall be invoked. The underlying floating type shall have its configured format enabled; the policy shall admit each requested special value. Calls shall require no library initialization or FPU rounding setup, preserve hardware direction and produce independently owned storage.

    RATIONALE:

    Checked floating storage retains its native representation and format constants. Returning checked objects makes those constants usable even with policies that intentionally provide no value-conversion defaults.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiation for configured F:

    using N = Parma_Polyhedra_Library::Checked_Number<F, Policy>;
    using Limits = std::numeric_limits<N>;
    static N min();
    static N max();
    static N lowest();
    static N epsilon();
    static N round_error();
    static N denorm_min();
    static N infinity();
    static N quiet_NaN();
    static N signaling_NaN();
    

    The named format fields shall be constant members of Limits.

    VERIFICATION_CRITERIA:

    For each configured native floating format, check every named trait and the result type of each factory. Compare finite factory values and signs with native format constants, including subnormal minima, and classify enabled infinity and quiet NaN without prescribing a NaN payload. Where signaling NaN is advertised, verify its factory result type and native signaling behavior under a saved nontrapping floating environment; restore that environment afterward. Exercise transparent, overflow-checking and extended policies, including policies without rounding defaults, and verify handler independence, object copying and preserved hardware direction under all four hardware modes.

    SOURCE:

    src/checked_numeric_limits.hh; tests/numericlimitsspec1.cc.

  • PPL-SPEC-000579
    3. Checked unbounded scalar limits and special factories UID: PPL-SPEC-000579 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For T equal to mpz_class or mpq_class, std::numeric_limits<Checked_Number<T, Policy>> shall report is_specialized, is_signed and is_exact as true, is_bounded as false and radix as two. is_integer shall be true for unbounded integers and false for rationals. digits, digits10, max_digits10 and all four exponent fields shall be zero; those zeros shall indicate that no finite format limit is supplied. has_infinity and has_quiet_NaN shall equal the policy's has_infinity and has_nan traits. has_signaling_NaN shall be false; signaling_NaN() shall have no admitted signaling-NaN result.

    min(), max(), lowest(), epsilon(), round_error() and denorm_min() shall return checked zero objects as placeholders for inapplicable bounded-format quantities. These zeros shall not denote finite range bounds or nonzero spacing between rational values. Each named factory shall return the checked type, without requiring an implicit conversion, rounding default or policy handler. No handler shall be invoked.

    When the policy enables infinity, infinity() shall return checked positive infinity; when it enables NaN, quiet_NaN() shall return checked NaN. These factories shall return checked objects and invoke no handler. Disabled special factories shall be outside this guarantee. Extended GMP storage shall be interpreted through PPL's special-value queries rather than ordinary GMP arithmetic on nonfinite representations.

    The policy shall provide the backend's relevant representation traits. Available resources shall suffice for object construction and ownership. These metadata queries and factories shall require no library initialization, coefficient constants or FPU rounding setup, and preserve hardware direction. Returned values and their copies shall own independent storage.

    RATIONALE:

    Unbounded exact scalars have no finite extrema or fixed precision. Explicit metadata and placeholder meanings prevent generic callers from mistaking zero for a range boundary, while retaining checked extended-value factories.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiation for either GMP scalar:

    using N = Parma_Polyhedra_Library::Checked_Number<T, Policy>;
    using Limits = std::numeric_limits<N>;
    static N min();
    static N max();
    static N lowest();
    static N epsilon();
    static N round_error();
    static N denorm_min();
    static N infinity();
    static N quiet_NaN();
    

    The named format and capability fields shall be constant members of Limits. The special factories shall have the enabling conditions above.

    VERIFICATION_CRITERIA:

    Check unbounded integer and rational metadata for all four infinity/NaN policy combinations. Confirm signaling NaN is not advertised. Check the result types and zero values of the six finite placeholders. Classify enabled extended factories through PPL, without ordinary GMP arithmetic on their nonfinite storage. Verify independent ownership by copying and modifying finite results, handler independence with a rejecting handler and no rounding defaults, preserved hardware direction and meaningful execution when native floating kernels are disabled.

    SOURCE:

    src/checked_numeric_limits.hh; src/mp_std_bits_defs.hh; tests/numericlimitsspec1.cc.

  • 1. Operation-specific numerical policy capabilities UID: PPL-SPEC-000551 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Checked_Number<T, Policy> shall obtain numerical checks, special-value capabilities, rounding defaults and result handling from the members of Policy required by the selected operation. Availability of one operation shall not require policy members used only by another operation. Checking and capability flags required by a selected operation shall be constant expressions.

    Default construction, same-type copying and raw storage access shall not require a rounding default or handle_result. A named result-returning operation with an explicit Rounding_Dir shall return its Result without invoking a policy handler; its scalar backend's relevant checking and special-value traits shall still be required. Named rational input shall admit the two-trait policy specified by 🔗 2. Canonical rational input and stream failure outcomes.

    A value-converting constructor with an explicit direction shall invoke the destination policy's handle_result for the conversion result without requiring a rounding default. The corresponding constructor without a direction shall use ROUND_DEFAULT_CONSTRUCTOR and that handler. Overloaded arithmetic operators shall use ROUND_DEFAULT_OPERATOR; named assignment functions that omit a direction, such as div_2exp_assign, shall use ROUND_DEFAULT_FUNCTION. Each shall pass the numerical result to handle_result after its numerical operation. Handler exceptions shall propagate. Same-type copy assignment shall copy storage without invoking a conversion handler.

    Checked stream operators shall have the capability and dispatch rules of 🔗 6. Checked numeric stream policy integration: input uses ROUND_DEFAULT_INPUT and a handler; output uses ROUND_IGNORE and a handler. Neither shall require ROUND_DEFAULT_OUTPUT. Availability of the underlying implicit conversion to T shall require a policy that provides true convertible. Operation-specific numerical, aliasing, resource and synchronization preconditions shall continue to apply. Policy constants and direct policy handlers shall require no library initialization or FPU rounding setup.

    RATIONALE:

    Result-returning calls permit callers to inspect outcomes directly. Rounding defaults and automatic result handling are additional capabilities needed by specific convenience interfaces, rather than prerequisites for all checked storage.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in PPL:

    template <typename T, typename Policy> class Checked_Number;
    Checked_Number();
    Checked_Number(const Checked_Number& source);
    Checked_Number(int source, Rounding_Dir dir);
    Checked_Number(int source);
    Checked_Number(const mpq_class& source, Rounding_Dir dir);
    Checked_Number(const mpq_class& source);
    Checked_Number& operator=(const Checked_Number& source);
    T& raw_value();
    const T& raw_value() const;
    operator T() const;
    

    The value-converting constructors above shall represent the admitted integer and rational source forms. Named numerical operations, arithmetic operators and stream operators shall retain their separate interface contracts; a policy shall provide the members those operations require.

    VERIFICATION_CRITERIA:

    Instantiate checked storage and named result-returning calls with policies having no rounding defaults or handler. Exercise a handler-only policy with an explicit-direction constructor. Use distinct constructor, operator and function defaults with a recording handler to check directed fractional results and exactly one handler call. Confirm raw access, same-type copying and named result-returning calls do not invoke the handler, and that handler exceptions propagate. Inspect template dependencies and conversion-member requirements without calling an unsupported interface.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/numericpoliciesspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000552
    2. Transparent numerical policy UID: PPL-SPEC-000552 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For supported scalar T, Checked_Number_Transparent_Policy<T> shall provide the following constant boolean traits:

    • check_overflow, check_inf_add_inf, check_inf_sub_inf, check_inf_mul_zero, check_div_zero, check_inf_div_inf, check_inf_mod and check_sqrt_neg shall be false.
    • has_nan shall equal std::numeric_limits<T>::has_quiet_NaN; has_infinity shall equal std::numeric_limits<T>::has_infinity.
    • convertible shall be true; check_fpu_inexact and check_fpu_nan_result shall be false.

    Its ROUND_DEFAULT_CONSTRUCTOR, ROUND_DEFAULT_OPERATOR, ROUND_DEFAULT_FUNCTION, ROUND_DEFAULT_INPUT and ROUND_DEFAULT_OUTPUT shall each equal ROUND_NATIVE. handle_result(r) shall return without throwing or changing observable state for every admitted Result code, including diagnostics and unrepresentability flags. It shall not convert a diagnostic into a successful numerical outcome. Numerical operations shall retain their own valid-input, representability and rounding preconditions; disabled checks shall not promise defined native arithmetic outside those preconditions.

    RATIONALE:

    A transparent policy supplies ordinary native defaults while leaving numerical failures to the caller and the underlying operation's contract.

    INTERFACE:

    Public header: <ppl.hh>; policy in PPL:

    template <typename T> struct Checked_Number_Transparent_Policy;
    static void handle_result(Result result);
    

    The named traits and rounding defaults shall be constant policy members.

    VERIFICATION_CRITERIA:

    Check every named trait and rounding default for all native integer types, supported native floating formats, mpz_class and mpq_class. Pass all named result codes, with and without the unrepresentability flag, to the handler and confirm normal return and preserved rounding state. Exercise valid finite checked construction, arithmetic, named functions, conversion and streams using this policy without library initialization.

    SOURCE:

    src/checked_defs.hh; src/Checked_Number_inlines.hh; tests/numericpoliciesspec1.cc.

  • PPL-SPEC-000553
    3. Result-returning overflow-checking policy UID: PPL-SPEC-000553 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For supported scalar T, Check_Overflow_Policy<T> shall provide true check_overflow, convertible, check_fpu_inexact and check_fpu_nan_result. Its check_inf_add_inf, check_inf_sub_inf, check_inf_mul_zero, check_div_zero, check_inf_div_inf, check_inf_mod and check_sqrt_neg shall be false. has_nan shall equal std::numeric_limits<T>::has_quiet_NaN and has_infinity shall equal std::numeric_limits<T>::has_infinity.

    The policy shall provide no ROUND_DEFAULT_CONSTRUCTOR, ROUND_DEFAULT_OPERATOR, ROUND_DEFAULT_FUNCTION, ROUND_DEFAULT_INPUT, ROUND_DEFAULT_OUTPUT or handle_result. Checked storage using this policy shall support default construction, raw access and applicable explicit-direction result-returning calls under 🔗 1. Operation-specific numerical policy capabilities. Those calls shall expose overflow and other outcomes through Result according to their individual contracts. Automatic handler dispatch shall require a policy that additionally provides a handler; convenience interfaces using defaults shall additionally require those defaults. Enabling overflow checks shall not enable the seven separate invalid-operation checks listed above.

    RATIONALE:

    A caller that inspects numerical result codes needs checking capabilities without an imposed exception policy or implicit rounding choice.

    INTERFACE:

    Public header: <ppl.hh>; policy in PPL:

    template <typename T> struct Check_Overflow_Policy;
    

    The named boolean traits shall be constant policy members.

    VERIFICATION_CRITERIA:

    Check the trait values and absence of all defaults and the handler for each supported scalar family. Compile and run default-constructed checked storage with explicit-direction named operations, including representable values and bounded range overflow. Compare result classes and overflow flags with the corresponding conversion contracts without invoking an unavailable generic constructor, arithmetic operator or stream interface.

    SOURCE:

    src/Checked_Number_defs.hh; tests/numericpoliciesspec1.cc.

  • PPL-SPEC-000554
    4. Extended numerical policy and NaN-class handler UID: PPL-SPEC-000554 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Extended_Number_Policy shall provide true check_overflow, has_nan, has_infinity, check_fpu_inexact and check_fpu_nan_result. Its check_inf_add_inf, check_inf_sub_inf, check_inf_mul_zero, check_div_zero, check_inf_div_inf, check_inf_mod and check_sqrt_neg shall be false. It shall provide no convertible member and none of the five rounding defaults listed in 🔗 3. Result-returning overflow-checking policy. In particular, supplying this policy shall not enable an implicit conversion to the underlying scalar type.

    For admitted Result codes, handle_result(r) shall invoke throw_result_exception(r) exactly when result_class(r) == VC_NAN, with the exception categories specified by 🔗 8. Exception classification of numerical result codes. For every other class it shall return without throwing, including infinity, bounded-overflow and unrepresentability flags. Those other outcomes shall retain their original numerical meanings; normal return from this handler shall not imply successful exact arithmetic or representability.

    The special-value capability traits shall enable supported extended representations in the selected scalar backend; they shall not promise that every native storage type can physically encode all such representations. The disabled invalid-operation checks shall retain the underlying operation's preconditions.

    RATIONALE:

    Extended storage capability and automatic exception handling are distinct. The handler rejects NaN-class results while allowing callers to use extended infinities under their numerical contracts.

    INTERFACE:

    Public header: <ppl.hh>; policy in PPL:

    struct Extended_Number_Policy;
    static void handle_result(Result result);
    

    The named boolean traits shall be constant policy members.

    VERIFICATION_CRITERIA:

    Check every trait, absence of conversion permission and absence of rounding defaults. Use a literal expected class/exception table for named result codes, both with and without unrepresentability. Confirm that only NaN-class codes reach the exception mapper and that other classes return unchanged, including bounded-overflow results. Exercise explicit-direction checked construction with this handler and finite valid operands.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/numericpoliciesspec1.cc.

  • PPL-SPEC-000555
    5. Bounded integer coefficient policy configuration UID: PPL-SPEC-000555 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, COEFF_CHECKED_I8, COEFF_CHECKED_I16, COEFF_CHECKED_I32, COEFF_CHECKED_I64, COEFF_NATIVE_I8, COEFF_NATIVE_I16, COEFF_NATIVE_I32, COEFF_NATIVE_I64 VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    In bounded integer coefficient configurations, Bounded_Integer_Coefficient_Policy shall provide true check_overflow, convertible and check_fpu_nan_result. Its has_nan, has_infinity and check_fpu_inexact shall be false, as shall check_inf_add_inf, check_inf_sub_inf, check_inf_mul_zero, check_div_zero, check_inf_div_inf, check_inf_mod and check_sqrt_neg. Each of the five rounding defaults listed in 🔗 2. Transparent numerical policy shall equal ROUND_NATIVE.

    In checked bounded coefficient configurations, handle_result(r) shall invoke throw_result_exception(r) exactly when result_overflow(r) is true or result_class(r) == VC_NAN, with the categories of 🔗 8. Exception classification of numerical result codes. Otherwise it shall return without throwing. The overflow query shall have the code-sensitive meaning specified by 🔗 3. Overflow-sign and storage-representability result queries, including its treatment of annotated normal-class codes and class-based infinity signs. Checked coefficient operations shall retain the failure guarantees of 🔗 5. Checked coefficient overflow and result-policy dispatch. In unchecked native coefficient configurations, the policy's declaration shall not confer checked arithmetic behavior on the configured native Coefficient type or promise a linkable handler implementation.

    RATIONALE:

    The configured coefficient profile determines the arithmetic and handler that are available. A policy declaration shared with native profiles shall not imply overflow protection for those native coefficients.

    INTERFACE:

    Public header: <ppl.hh>; policy in PPL for bounded configurations:

    struct Bounded_Integer_Coefficient_Policy;
    static void handle_result(Result result);
    

    The named boolean traits and rounding defaults shall be constant policy members. Direct handler calls shall be admitted only in checked bounded coefficient configurations.

    VERIFICATION_CRITERIA:

    Check all traits and five defaults in every checked and unchecked bounded profile. In checked profiles, pass ordinary relations, infinities, bounded overflow and NaN-class diagnostics to the handler, with and without the unrepresentability flag. Confirm the selected exception categories and ordinary return paths. Compile GMP configurations without referring to this bounded-only declaration, and do not call its handler in native profiles.

    SOURCE:

    src/Coefficient_types.hh; src/Coefficient_inlines.hh; tests/numericpoliciesspec1.cc.

  • 1. Numerical result classes and relation meanings UID: PPL-SPEC-000121 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Result shall encode a computed-value class, a relation between an exact result and its computed value where comparable, and applicable outcome flags or diagnostic detail. VC_NORMAL, VC_MINUS_INFINITY, VC_PLUS_INFINITY and VC_NAN shall denote the normal-number, negative-infinity, positive-infinity and not-a-number classes.

    For an arithmetic or conversion result, VR_EQ shall mean that exact and computed values are equal; VR_LT shall mean that the exact value is less than the computed value, and VR_GT shall mean that it is greater. VR_LE, VR_GE and VR_NE shall admit the union of their named relations. VR_LGE shall admit all three ordering relations and VR_EMPTY shall admit none. A relation containing equality and a strict relation shall not promise exactness. The class shall be interpreted together with the relation and any diagnostic; a normal class alone shall not promise an exact successful operation.

    The corresponding V_EQ, V_LT, V_GT, V_LE, V_GE, V_NE, V_LGE and V_EMPTY shall have those normal-class relation encodings. V_EQ_MINUS_INFINITY and V_EQ_PLUS_INFINITY shall encode exact infinities. V_GT_MINUS_INFINITY and V_LT_PLUS_INFINITY shall encode their named strict relations with an infinite computed value. V_LT_INF and V_GT_SUP shall encode negative and positive bounded range overflow with a normal computed-value class and the indicated relation. V_NAN and each named invalid-operation diagnostic shall have NaN class. V_UNKNOWN_NEG_OVERFLOW and V_UNKNOWN_POS_OVERFLOW shall denote an unknown result following the named sign of intermediate overflow; they shall not describe an exact or ordinary inexact success.

    The V_UNREPRESENTABLE flag shall indicate that the computed value cannot be represented in the selected destination storage. Absence of that flag shall not by itself promise finite value, exactness or success. These enum values shall be available without library initialization and shall not depend on a coefficient profile.

    RATIONALE:

    A result code carries several independent aspects of numerical meaning. Relation direction is from the exact result to the computed value, which determines whether a strict result was rounded upward or downward.

    INTERFACE:

    Public header: <ppl.hh>; types and representative named constants:

    enum Result_Class {
      VC_NORMAL = 0U << 4, VC_MINUS_INFINITY = 1U << 4,
      VC_PLUS_INFINITY = 2U << 4, VC_NAN = 3U << 4, VC_MASK = VC_NAN
    };
    enum Result_Relation {
      VR_EMPTY = 0U, VR_EQ = 1U, VR_LT = 2U, VR_GT = 4U,
      VR_NE = VR_LT | VR_GT, VR_LE = VR_EQ | VR_LT,
      VR_GE = VR_EQ | VR_GT, VR_LGE = VR_LT | VR_EQ | VR_GT,
      VR_MASK = VR_LGE
    };
    enum Result {
      V_EMPTY = VR_EMPTY, V_EQ = VR_EQ, V_LT = VR_LT, V_GT = VR_GT,
      V_NE = VR_NE, V_LE = VR_LE, V_GE = VR_GE, V_LGE = VR_LGE,
      V_OVERFLOW = 1U << 6, V_LT_INF = V_LT | V_OVERFLOW,
      V_GT_SUP = V_GT | V_OVERFLOW,
      V_LT_PLUS_INFINITY = V_LT | VC_PLUS_INFINITY,
      V_GT_MINUS_INFINITY = V_GT | VC_MINUS_INFINITY,
      V_EQ_MINUS_INFINITY = V_EQ | VC_MINUS_INFINITY,
      V_EQ_PLUS_INFINITY = V_EQ | VC_PLUS_INFINITY,
      V_NAN = VC_NAN,
      // Named NaN-class diagnostics are listed below.
      V_UNREPRESENTABLE = 1U << 7
    };
    

    The NaN-class diagnostic names shall be V_CVT_STR_UNK, V_DIV_ZERO, V_INF_ADD_INF, V_INF_DIV_INF, V_INF_MOD, V_INF_MUL_ZERO, V_INF_SUB_INF, V_MOD_ZERO, V_SQRT_NEG, V_UNKNOWN_NEG_OVERFLOW and V_UNKNOWN_POS_OVERFLOW. Their diagnostic payload shall distinguish the named outcomes.

    VERIFICATION_CRITERIA:

    Check all named classes, relation unions, normal and special result constants, disjoint masks and diagnostic uniqueness. Use a literal expected classification table, including exact infinity and intermediate-overflow diagnostics. Do not equate missing unrepresentability flags with successful finite calculation.

    SOURCE:

    src/Result_defs.hh; tests/numericprotocols1.cc.

  • PPL-SPEC-000122
    2. Numerical result composition and field extraction UID: PPL-SPEC-000122 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For Result values, operator& shall return the bitwise intersection, operator| the bitwise union, and operator- the left operand with all bits present in the right operand cleared. Subtraction shall be flag removal, not arithmetic subtraction of the underlying enum values. Operands shall remain unchanged.

    result_class(r) shall retain exactly the VC_MASK bits and return Result_Class. result_relation(r) shall retain exactly the VR_MASK bits and return Result_Relation. result_relation_class(r) shall retain exactly the union of those masks and return Result. In particular, these field extractors shall discard unrepresentability, bounded-overflow and diagnostic-payload bits. They shall preserve a contained class or relation when other fields are added or removed. Extracting fields or composing bits shall not turn an otherwise unsupported code combination into a supported arithmetic result. These pure operations shall require no initialized library state.

    For constant-evaluable inputs, these operations shall support constant evaluation under the same stated preconditions.

    RATIONALE:

    Bit composition and field extraction must preserve their separate meanings. Flag removal is especially important before dispatching a diagnostic carrying an unrepresentable-storage annotation.

    INTERFACE:

    Public header: <ppl.hh>; declarations in PPL:

    constexpr Result operator&(Result x, Result y);
    constexpr Result operator|(Result x, Result y);
    constexpr Result operator-(Result x, Result y);
    constexpr Result_Class result_class(Result r);
    constexpr Result_Relation result_relation(Result r);
    constexpr Result result_relation_class(Result r);
    
    VERIFICATION_CRITERIA:

    Exhaustively combine the named results and flags, compare operations with unsigned bit-set oracles and preserve input values. Enumerate every class/relation combination with and without storage/overflow flags; verify exact return types and that diagnostic payloads are removed from extracted fields. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.

    SOURCE:

    src/Result_defs.hh and src/Result_inlines.hh; tests/numericprotocols1.cc; tests/numericpublic1.cc.

  • 3. Overflow-sign and storage-representability result queries UID: PPL-SPEC-000123 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    result_overflow(r) shall return -1 when the computed-value class is VC_MINUS_INFINITY and 1 when it is VC_PLUS_INFINITY. For normal-class results it shall return -1 for V_LT_INF and 1 for V_GT_SUP. It shall return zero for other normal-class codes and for NaN-class codes, including the unknown-intermediate-overflow diagnostics. Its zero result shall not promise that a NaN diagnostic is a successful operation; 🔗 8. Exception classification of numerical result codes shall classify exceptions separately. Class-based infinity classification shall retain its sign when V_UNREPRESENTABLE is present.

    result_representable(r) shall return true exactly when the V_UNREPRESENTABLE flag is absent. This shall test the storage annotation, without promising a normal class, exactness or the absence of an arithmetic failure. Both queries shall preserve the supplied code and require no initialized library state.

    For constant-evaluable inputs, these operations shall support constant evaluation under the same stated preconditions.

    RATIONALE:

    Overflow-sign and storage-representability queries answer specific questions about a result code. Their names do not replace class and diagnostic interpretation.

    INTERFACE:

    Public header: <ppl.hh>; inline interfaces in PPL:

    constexpr int result_overflow(Result r);
    constexpr bool result_representable(Result r);
    
    VERIFICATION_CRITERIA:

    Check literal expected signs for every named result, including both finite overflow markers, exact and inexact infinities and NaN-class intermediate overflow. Add and remove unrepresentability for each class and verify the boolean annotation independently. Exercise every switch case and normal-class default. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.

    SOURCE:

    src/Result_inlines.hh; tests/numericprotocols1.cc.

  • 4. Rounding-direction intent, composition and inspection UID: PPL-SPEC-000124 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    ROUND_DOWN and ROUND_UP shall request bounds toward negative and positive infinity, respectively. ROUND_IGNORE shall delegate rounding and permit lazily evaluated relation information; ROUND_NATIVE shall be its alias. ROUND_NOT_NEEDED shall require the caller to ensure that the requested operation's result is exact and representable in its destination. ROUND_STRICT_RELATION shall request determination of the exact ordering relation rather than a weaker relation containing it. ROUND_DIRECT and ROUND_INVERSE shall alias ROUND_UP and ROUND_DOWN, respectively.

    A supported direction shall contain one of the four base directions with an optional strict-relation flag. Bitwise operator& and operator| shall intersect and unite direction bits. round_dir shall retain exactly the ROUND_DIR_MASK bits. Each named direction predicate shall return true exactly when that base direction is selected, independently of the strict flag. round_not_requested shall return true exactly for ROUND_IGNORE or ROUND_NOT_NEEDED. round_strict_relation shall return true exactly when the strict-relation bit is present. These operations shall preserve the arguments, require no initialized library state and leave the hardware rounding state unchanged.

    For constant-evaluable inputs, these operations shall support constant evaluation under the same stated preconditions.

    RATIONALE:

    Rounding requests are numerical preconditions and intent, rather than instructions to change hardware state at every inspection. The strict flag is independent of the requested bound direction.

    INTERFACE:

    Public header: <ppl.hh>; PPL declarations:

    enum Rounding_Dir {
      ROUND_DOWN = 0U, ROUND_UP = 1U,
      ROUND_IGNORE = 6U, ROUND_NATIVE = ROUND_IGNORE,
      ROUND_NOT_NEEDED = 7U, ROUND_DIRECT = ROUND_UP,
      ROUND_INVERSE = ROUND_DOWN, ROUND_DIR_MASK = 7U,
      ROUND_STRICT_RELATION = 8U,
      ROUND_CHECK = ROUND_DIRECT | ROUND_STRICT_RELATION
    };
    constexpr Rounding_Dir operator&(Rounding_Dir x, Rounding_Dir y);
    constexpr Rounding_Dir operator|(Rounding_Dir x, Rounding_Dir y);
    constexpr Rounding_Dir round_dir(Rounding_Dir dir);
    constexpr bool round_down(Rounding_Dir dir);
    constexpr bool round_up(Rounding_Dir dir);
    constexpr bool round_ignore(Rounding_Dir dir);
    constexpr bool round_not_needed(Rounding_Dir dir);
    constexpr bool round_not_requested(Rounding_Dir dir);
    constexpr bool round_direct(Rounding_Dir dir);
    constexpr bool round_inverse(Rounding_Dir dir);
    constexpr bool round_strict_relation(Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Exhaust all four supported base directions with and without the strict flag. Check every predicate against a literal truth table, bitwise composition and exact return types; test both short-circuit conditions of round_not_requested. Preserve the hardware state across pure enum operations. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.

    SOURCE:

    src/Rounding_Dir_defs.hh and src/Rounding_Dir_inlines.hh; tests/numericprotocols1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000125
    5. Inversion of a supported rounding bound direction UID: PPL-SPEC-000125 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For ROUND_UP or ROUND_DOWN, optionally combined with ROUND_STRICT_RELATION, inverse(dir) shall exchange upward and downward rounding and preserve the strict flag. ROUND_IGNORE, with or without that flag, shall be its own inverse. Applying inverse twice shall restore the supplied supported direction.

    The base ROUND_NOT_NEEDED shall not be an admitted input to this operation. The function shall preserve its argument and shall not inspect or change hardware rounding state. It shall require no initialized library state.

    For constant-evaluable inputs, these operations shall support constant evaluation under the same stated preconditions.

    RATIONALE:

    Inverting a bound exchanges its safe direction while preserving requested precision of the reported relation. A no-rounding-needed precondition is not a bound direction to invert.

    INTERFACE:

    Public header: <ppl.hh>; declaration in PPL:

    constexpr Rounding_Dir inverse(Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check the six admitted values against literal inverse answers, strict-flag preservation, the involution identity and unchanged hardware rounding. Keep invalid direction values and ROUND_NOT_NEEDED outside successful-use tests. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.

    SOURCE:

    src/Rounding_Dir_defs.hh and src/Rounding_Dir_inlines.hh; tests/numericprotocols1.cc.

  • PPL-SPEC-000126
    6. Mapping a bound direction to the platform FPU encoding UID: PPL-SPEC-000126 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    When PPL_CAN_CONTROL_FPU is nonzero, round_fpu_dir(dir) shall map ROUND_UP and ROUND_DOWN to the configured platform encodings for upward and downward FPU rounding, respectively. An optional ROUND_STRICT_RELATION flag shall not change that encoding. Only those two base directions shall be admitted. The mapping shall not set, inspect or otherwise change FPU state and shall require no initialized library state.

    No callable definition shall be promised when PPL_CAN_CONTROL_FPU is zero. In that configuration, callers shall not invoke this mapping.

    For constant-evaluable inputs, these operations shall support constant evaluation under the same stated preconditions.

    RATIONALE:

    The abstract rounding request and the platform control-word encoding have separate representations. A pure conversion between them must not acquire ownership of the FPU state.

    INTERFACE:

    Public header: <ppl.hh>; configured PPL interface:

    constexpr fpu_rounding_direction_type round_fpu_dir(Rounding_Dir dir);
    

    The implementation shall be available under the configuration condition stated above.

    VERIFICATION_CRITERIA:

    When FPU control is configured, compare both bound directions with independently captured platform constants, with and without the strict flag, and verify that the current hardware state is preserved. Compile a no-control configuration without invoking the unavailable definition. Check the constant-expression operations with translation-time assertions in addition to the runtime contract tests.

    SOURCE:

    src/Rounding_Dir_defs.hh and src/Rounding_Dir_inlines.hh; tests/numericprotocols1.cc.

  • 8. Exception classification of numerical result codes UID: PPL-SPEC-000128 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    throw_result_exception(r) shall always throw a standard exception and shall not return normally. It shall first ignore V_UNREPRESENTABLE for exception classification. V_EMPTY and the invalid-operation diagnostics V_NAN, V_CVT_STR_UNK, V_DIV_ZERO, V_INF_ADD_INF, V_INF_DIV_INF, V_INF_MOD, V_INF_MUL_ZERO, V_INF_SUB_INF, V_MOD_ZERO and V_SQRT_NEG shall produce std::domain_error.

    V_EQ_MINUS_INFINITY, V_GT_MINUS_INFINITY, V_LT_INF, V_EQ_PLUS_INFINITY, V_LT_PLUS_INFINITY, V_GT_SUP, V_UNKNOWN_NEG_OVERFLOW and V_UNKNOWN_POS_OVERFLOW shall produce std::overflow_error. The ordinary nonempty relation results V_EQ, V_LT, V_LE, V_GT, V_GE, V_NE and V_LGE shall produce std::logic_error. An otherwise unrecognized result encoding shall also produce std::logic_error. Exception-message text shall not be prescribed.

    This function shall classify the supplied code; it shall not reexecute an arithmetic operation or require initialized library state. Calling it on an ordinary relation code shall still throw, even when that code describes a successful numerical result.

    RATIONALE:

    Exception dispatch is deliberately total over supplied result codes. Its classification of NaN-class intermediate overflow differs from a simple overflow-sign query and must be explicit.

    INTERFACE:

    Public header: <ppl.hh>; PPL declaration:

    [[noreturn]] void throw_result_exception(Result r);
    
    VERIFICATION_CRITERIA:

    Check each named result against a literal exception-category table, both with and without the unrepresentable flag. Require a thrown exception of the intended standard category, distinguish overflow_error from its runtime_error base, and cover the unrecognized-code default. Do not constrain diagnostic wording.

    SOURCE:

    src/Checked_Number_defs.hh and src/Checked_Number.cc; tests/numericprotocols1.cc.

  • 1. Exact finite numeric token syntax UID: PPL-SPEC-000525 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For supported numeric destinations and a checked policy providing any required scalar traits, input shall interpret finite tokens according to their exact rational values. A number part shall consist of an optional sign immediately followed by a nonempty mantissa, optionally followed by an exponent. A mantissa shall contain digits, optionally a single point with digits on at least one side. Unprefixed digits shall be decimal; leading zeros shall not select octal. 0x shall select radix 16, and a decimal radix followed by ^^ shall select any radix from 2 through 36. Letters shall denote digits 10 through 35 without case distinction; every mantissa digit shall be smaller than the selected radix.

    For radix B, a mantissa with integer digit value M and k fractional digits shall denote MB − k before its sign and exponent. The exponent markers e and *^ shall multiply this value by BE; the hexadecimal-only marker p shall instead multiply by 2E. Exponent signs shall be optional and their digits shall always be decimal. A letter that is a valid mantissa digit shall take precedence over interpretation as an exponent marker; thus e shall be a digit at radix 15 or greater. The explicit marker *^ shall remain available in every radix. An explicit exponent magnitude shall not exceed LONG_MAX; excess magnitude shall be rejected without native overflow.

    A slash immediately after a complete numerator part shall introduce a second signed part as denominator; the finite value shall be their exact ratio when that denominator is nonzero. Leading whitespace shall be accepted before either part, including after the slash, but not between a sign and its mantissa. A terminator outside the recognized part shall remain available to the stream after successful finite parsing. Type suffixes shall not be part of the numeric token. Resources and lexical arithmetic counters shall suffice for the requested token and exact value; no configured Coefficient width shall limit its mantissa. When exact expansion is needed after cancelling radix factors, the expansion budget shall be 2^26 bits plus twice the combined budget of the literal numerator and denominator mantissa digits. Each digit contributes the ceiling of the binary logarithm of its radix, including explicitly written zero digits. A conservative upper bound on the bits contributed by the remaining powers shall be checked separately on the numerator and denominator before materializing those powers. The budget applies to native destinations when magnitude classification needs exact expansion.

    Radix powers contributed by the numerator and denominator and their common factors with the opposite mantissa shall be canceled before expanding the remaining powers. Native conversions may use proved magnitude bounds when the outcome is the same as conversion of the exact value.

    RATIONALE:

    Parsing to an exact rational gives radix, fraction and exponent syntax one mathematical meaning before integer or floating destination rounding.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    Result input(To& to, std::istream& stream, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare literal exact fractions for decimal, hexadecimal and every supported explicit radix. Include signed numerator/denominator parts, point/exponent boundaries, e/p digit precedence, leading zeros, mixed radices, exponent cancellation and overflow rejection, and check retained terminators.

    SOURCE:

    src/Checked_Number_defs.hh; src/checked.cc; tests/numberinput1.cc; tests/numerictextspec1.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.

  • 3. Numeric text input into integral destinations UID: PPL-SPEC-000527 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a successfully parsed finite token of exact value q in 🔗 1. Exact finite numeric token syntax, input into each native integer or Checked_Number<I, Check_Overflow_Policy<I>> type admitted in 🔗 3. Directed rational-to-integral conversion within range shall apply the canonical rational conversion rules in 🔗 3. Directed rational-to-integral conversion within range, 🔗 4. Truncated rational-to-integral conversion and lazy relation requests and 🔗 6. Rational conversion at and beyond integral endpoints, with the same destination value, range outcome, result relation and exactness precondition. Input into mpz_class shall use 🔗 2. Directed canonical rational conversion to an unbounded integer and 🔗 3. Delegated and exactness rational conversion to an unbounded integer. In particular, directed requests shall use floor/ceiling and delegated integer conversion shall truncate toward zero; ROUND_NOT_NEEDED shall require an integral finite token value representable in the selected destination.

    Token precision shall not first be restricted to the configured coefficient range or to a native floating type. Named input shall return the numeric conversion result without automatically dispatching a policy error handler. The token shall remain consumed if subsequent numeric conversion reports an unrepresentable result. Stream behavior, source synchronization and resources shall follow 🔗 2. Canonical rational input and stream failure outcomes. Shared rational temporary pools shall be serialized in a build without thread-safe support; thread-safe builds shall use calling-thread pools. Destination and initialization prerequisites shall follow the corresponding conversion contracts, without requiring an FPU merely to parse or round a rational into integral storage.

    RATIONALE:

    Exact token semantics avoid intermediate floating or configured-coefficient rounding. A proven range outcome can be determined before large powers are expanded.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    Result input(To& to, std::istream& stream, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use exact token fractions around integer zero, signed/unsigned endpoints and large MPZ values. Check floor, ceiling, delegated truncation, weak/strict results, admitted exactness requests, out-of-range reports, consumed tokens and destination reuse for all native integer and checked forms in every coefficient configuration.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_int_inlines.hh; src/checked_mpz_inlines.hh; src/checked.cc; tests/numberinput1.cc; tests/numerictextspec1.cc.

  • 4. Numeric text input into supported native floating destinations UID: PPL-SPEC-000528 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a successfully parsed finite token of exact rational value q, input into raw or Checked_Number<F, Check_Overflow_Policy<F>> storage shall apply the value, direction, exactness and range rules in 🔗 1. Supported exact integer and rational conversion to native floating storage, 🔗 2. Directed conversion to adjacent finite normal floating-point bounds, 🔗 3. Directed conversion in the subnormal and underflow range, 🔗 4. Delegated and exactness requests for floating-point conversion and 🔗 5. Floating conversion overflow thresholds and computed-value classes for the corresponding configured supported native format. The returned relation shall compare q with the stored native value. Strict requests shall retain the precision of that rational conversion; native token parsing shall not round through a narrower intermediate format or the configured coefficient type.

    A lexical negative-zero token shall parse as rational zero and therefore store positive native zero. Nonzero negative underflow shall retain the negative sign required by the rational conversion. Named input shall return its numeric outcome directly, without policy handler dispatch. Stream consumption/failure and temporary-pool prerequisites shall follow 🔗 3. Numeric text input into integral destinations. No library initialization owner, coefficient-constant stage or irrational-precision setting shall be needed, and hardware direction shall not change. Native format availability and any arithmetic conditions shall follow the cited rational conversion contracts.

    RATIONALE:

    Using the exact token rational as the floating conversion source prevents double rounding and distinguishes mathematical zero from a nonzero value underflowing to signed zero.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library for the admitted numeric types:

    Result input(To& to, std::istream& stream, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact dyadics, decimal fractions, half-ULP neighbors, subnormal endpoints and native finite-range limits with independent rational oracles. Cross all supported formats/raw-checked destinations, directions and strict statuses, verify lexical versus underflow zero signs, exactness cases and hardware preservation.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_float_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-001630
    1. Native unsigned bit positions UID: PPL-SPEC-001630 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a nonzero value of unsigned int, unsigned long or unsigned long long with w value bits, clz shall return w − 1 − ⌊log2x⌋; ctz shall return the greatest k such that 2k divides x. Zero shall be outside their admitted input domain. msb_position(x) shall return the zero-based position ⌊log2x⌋ of a nonzero unsigned long long. The Implementation::first_one and Implementation::last_one overloads for the same three unsigned types shall return the least and greatest set-bit indices, respectively. All functions shall preserve their input and require no library initialization.

    RATIONALE:

    Bit positions drive exact normalization and representation operations; zero has no admitted highest or lowest set bit.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    unsigned clz(unsigned int);
    unsigned clz(unsigned long);
    unsigned clz(unsigned long long);
    unsigned ctz(unsigned int);
    unsigned ctz(unsigned long);
    unsigned ctz(unsigned long long);
    unsigned msb_position(unsigned long long);
    namespace Implementation {
      unsigned first_one(unsigned int); unsigned last_one(unsigned int);
      unsigned first_one(unsigned long); unsigned last_one(unsigned long);
      unsigned first_one(unsigned long long); unsigned last_one(unsigned long long);
    }
    
    VERIFICATION_CRITERIA:

    Check every single-bit position, adjacent values, alternating masks, all-one values and reproducible pseudorandom nonzero values against independent bit-by-bit oracles. Exercise the compiler-intrinsic path and the standard-library fallback against independent bit-by-bit oracles.

    SOURCE:

    src/compiler.hh; src/Float_inlines.hh; tests/commonhelpersspec1.cc; tests/portablebitsspec1.cc; src/Bit_Row_inlines.hh; tests/scalaradaptersspec1.cc.

  • PPL-SPEC-001631
    2. Dimension arithmetic, capacity and common access helpers UID: PPL-SPEC-001631 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    hash_code_from_dimension(d) shall return d − 231⌊d ⁄ 231⌋ as int32_t. least_significant_one_mask(d) shall return zero for zero, and otherwise the single-bit mask of the least significant one in d.

    For 0 ≤ n ≤ m, compute_capacity(n,m) shall return 2(n + 1) when n < ⌊m ⁄ 2⌋, and m otherwise. Its result shall be representable and lie in [n, m].

    For a live random-access container, nth_iter(c,n) shall return c.begin()+n with the corresponding mutable or const iterator type. The offset shall be representable in the container's difference_type and shall designate an element or the past-the-end position. No element shall change. is_space(c) shall apply the active C locale's whitespace classification to static_cast<unsigned char>(c); every char value shall be admitted, including negative values on signed-char targets. These helpers shall require no library initialization.

    RATIONALE:

    Storage calculations must retain representable capacities and iterator offsets, while character classification must admit every character representation.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    int32_t hash_code_from_dimension(dimension_type);
    dimension_type least_significant_one_mask(dimension_type);
    dimension_type compute_capacity(dimension_type, dimension_type);
    template <typename C> typename C::iterator nth_iter(C&, dimension_type);
    template <typename C> typename C::const_iterator nth_iter(const C&, dimension_type);
    bool is_space(char);
    
    VERIFICATION_CRITERIA:

    Enumerate small requested/maximum pairs and boundary maxima; compare hashes and masks with literal modular/bit oracles. Check mutable and const iteration including the end position, and every unsigned-character byte in the C locale.

    SOURCE:

    src/globals_defs.hh; src/globals_inlines.hh; tests/commonhelpersspec1.cc.

  • PPL-SPEC-001632
    3. Raw scalar memory accounting UID: PPL-SPEC-001632 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a live native scalar T, external_memory_in_bytes shall return zero and total_memory_in_bytes shall return sizeof(T). For a live mpz_class, external memory shall equal its allocated limb count multiplied by PPL_SIZEOF_MP_LIMB_T. For a live mpq_class, it shall equal the sum of its numerator's and denominator's external memory. Total GMP scalar memory shall add the corresponding scalar object's sizeof. These functions shall preserve values and allocations. The reported sum and products shall be representable in memory_size_type. They shall account for the scalar's owned storage, without measuring allocator bookkeeping or shared library state. The checked-wrapper forwarding rule shall remain 🔗 5. Checked scalar memory-size inspection.

    RATIONALE:

    Container accounting composes scalar-owned limb allocations and must distinguish them from the inline scalar object.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    template <Native_Number T>
    memory_size_type
    external_memory_in_bytes(const T&);
    template <Native_Number T>
    memory_size_type
    total_memory_in_bytes(const T&);
    memory_size_type external_memory_in_bytes(const mpz_class&);
    memory_size_type total_memory_in_bytes(const mpz_class&);
    memory_size_type external_memory_in_bytes(const mpq_class&);
    memory_size_type total_memory_in_bytes(const mpq_class&);
    
    VERIFICATION_CRITERIA:

    Use native scalar families, preallocated GMP zeros, large integers and rational numerator/denominator allocations; compare the reported sizes with GMP allocation fields and object sizes, preserving source values.

    SOURCE:

    src/globals_inlines.hh; tests/commonhelpersspec1.cc.

  • PPL-SPEC-001633
    4. Assignment, swap and invariant dispatch UID: PPL-SPEC-001633 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For live admitted T objects, assign_or_swap(to,from) shall select exactly one strategy at compile time. If Has_Assign_Or_Swap<T>::value is true, it shall call to.assign_or_swap(from) once. Otherwise, if Slow_Copy<T>::value is false, it shall perform to=from once. Otherwise it shall perform one unqualified swap(to,from) with std::swap available. The selected operation shall determine the values, source modification, alias admissibility and exception guarantees; its exceptions shall propagate. GMP integer and rational swap adapters shall exchange the owned values, preserving independent valid storage. A slow-copy type used with the generic PPL swap shall require an applicable specialization; the unspecialized generic form shall fail to instantiate.

    For T with a detected bool OK() const member, f_OK(t) shall return t.OK(). Its native scalar and GMP scalar overloads shall return true. Calling f_OK shall retain the selected object's invariant-query prerequisites and exception behavior.

    RATIONALE:

    Generic storage algorithms must use the declared transfer and invariant capabilities of their element type without imposing extra copies.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    namespace Parma_Polyhedra_Library {
      template <typename T> void assign_or_swap(T&, T&);
      // Constraints select the three strategies described above.
      template <typename T> bool f_OK(const T&);
    }
    // Global overloads found by argument-dependent lookup:
    void swap(mpz_class&, mpz_class&);
    void swap(mpq_class&, mpq_class&);
    
    VERIFICATION_CRITERIA:

    Use instrumented types to distinguish all three strategies, returned effects, self operands where admitted and thrown exceptions. Check GMP value/allocation exchange and true/false invariant callbacks; inspect the compile-time rejection for unspecialized slow-copy swap.

    SOURCE:

    src/assign_or_swap.hh; src/globals_defs.hh; src/mp_std_bits_inlines.hh; tests/commonhelpersspec1.cc.

  • PPL-SPEC-001634
    5. Representation-selector ASCII records UID: PPL-SPEC-001634 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted Representation equal to DENSE or SPARSE, ascii_dump shall insert exactly DENSE or SPARSE, respectively. ascii_load shall extract one whitespace-delimited string and accept exactly either of those case-sensitive tokens, assigning the corresponding selector and returning true. A normally failed extraction or any other token shall return false and preserve the destination selector. A complete accepted record shall leave following tokens available. Stream exceptions shall propagate according to the stream's exception mask; output shall preserve the selector. Neither function shall require library initialization.

    RATIONALE:

    Storage representation names need a small stable grammar independent of numerical scalar serialization.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    void ascii_dump(std::ostream&, Representation);
    bool ascii_load(std::istream&, Representation&);
    
    VERIFICATION_CRITERIA:

    Check both literal records, overwrite both destinations, suffix retention, whitespace, wrong case, unknown/empty input and ordinary or throwing stream failures.

    SOURCE:

    src/globals_inlines.hh; tests/commonhelpersspec1.cc.

  • PPL-SPEC-001635
    6. Exact comparison of short sums through directed filters UID: PPL-SPEC-001635 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal Implementation short-sum helpers shall operate on two or three addends per list. Each pointer shall designate a live admitted scalar. Original left addends shall be finite; right addends may additionally be positive infinity. NaN and negative infinity shall be outside the admitted domain. The scalar policy and arithmetic shall supply sound upward/downward bounds, valid overflow outcomes, and exact rational conversion of each finite original addend. Required rounding setup, resources and synchronization shall follow those scalar operations.

    checked_sum_assign<Count> shall evaluate the first two addends and then, for three terms, add the third, using the requested direction. It shall return true exactly when every addition reports V_EQ; false shall not by itself assert that the final mathematical sum is inexact. Its output shall be independent of all input addend storage.

    checked_sum_has_infinite_right shall return true exactly when an original right addend is positive infinity. checked_sum_less shall return exactly ∑iLi < ∑jRj, including finite sums outside the bounded scalar range. A positive-infinite original right operand shall make this predicate true before sum arithmetic is attempted. A finite rounded overflow shall not be mistaken for an original infinite operand.

    The cached-left overload shall receive the same upward left sum and exactness flag produced by checked_sum_assign for those original left addends. checked_finite_sum_less shall additionally require all right addends finite. Directed bounds may decide the comparison only when they establish its truth or falsity. An unresolved comparison shall use exact rational arithmetic on the original finite addends. No input addend shall change.

    RATIONALE:

    Strict comparison of original bounds must survive cancellation, coincident rounded images and finite overflow. Sound directed filters avoid exact arithmetic only when the ordering is proved.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    namespace Implementation {
      template <unsigned Count, typename N>
      bool checked_sum_assign(N&, const N* const*, Rounding_Dir);
      template <unsigned L, unsigned R, typename N>
      bool checked_sum_has_infinite_right(const N* const*, const N* const*);
      template <unsigned L, unsigned R, typename N>
      bool checked_finite_sum_less(const N* const*, const N* const*, const N&, bool);
      template <unsigned L, unsigned R, typename N>
      bool checked_sum_less(const N* const*, const N* const*);
      template <unsigned L, unsigned R, typename N>
      bool checked_sum_less(const N* const*, const N* const*, const N&, bool);
    }
    
    VERIFICATION_CRITERIA:

    Compare all four two/three-term arities and cached/uncached forms with independent exact rational sums. Include equality, different rounded images, cancellation, subnormal operands, finite prefix overflow, and positive infinity in every right-hand position. Exercise exact GMP and supported floating scalars.

    SOURCE:

    src/Checked_Number_templates.hh; tests/checkedsumsspec1.cc; tests/BD_Shape; tests/Octagonal_Shape.

  • 7. Raw scalar placement construction and exact assignment UID: PPL-SPEC-001636 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The internal Checked::construct dispatch shall receive suitably aligned storage for one complete destination scalar object, with no live object requiring destruction there. For finite same-type, same-policy input, it shall copy-construct an independent scalar and return V_EQ. The generic different-type path shall first default-construct the destination, then apply the corresponding checked assignment with the requested rounding direction, returning that assignment's Result without invoking a policy handler. Admitted native/GMP exact constructor specializations shall directly construct the exact value and return V_EQ. The floating-to-GMP-integer constructor shall retain 🔗 6. Finite native floating-point placement construction of an unbounded integer; supported floating-to-rational construction shall preserve the exact finite floating value. Special-value routing shall follow 🔗 1. Typed special construction in native scalar storage and the destination policy's capabilities.

    The internal assign_exact adapter shall assign the admitted exactly representable source to a live destination and return V_EQ without a handler. It shall not perform rounding. Source values shall be preserved and owned GMP values shall be independent.

    Underlying constructor, assignment and resource exceptions shall propagate. A destination whose construction itself throws shall not be used or destroyed as a completed object; if assignment throws after default construction, that underlying scalar shall remain live with the assignment's failure guarantees. These raw construction paths shall not be required by the ordinary converting Checked_Number constructors of 🔗 2. Finite checked scalar converting construction and assignment.

    RATIONALE:

    Placement construction begins a scalar lifetime and must remain distinct from assignment to a live wrapper member.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    namespace Checked {
      template <typename To_Policy, typename From_Policy, typename To, typename From>
      Result construct(To&, const From&, Rounding_Dir);
      template <typename To_Policy, typename From_Policy, typename To, typename From>
      Result construct_ext(To&, const From&, Rounding_Dir);
      template <typename To_Policy, typename From_Policy, typename To, typename From>
      Result assign_exact(To&, const From&, Rounding_Dir);
    }
    
    VERIFICATION_CRITERIA:

    Construct into aligned raw storage, verify values, results, independence and explicit destruction for exact native/GMP and rounded native conversions. Include same-type and cross-type dispatch, special routing and a policy handler that must not run. Inspect constructor-versus-assignment exception lifetime boundaries.

    SOURCE:

    src/checked_inlines.hh; src/checked_ext_inlines.hh; src/checked_mpq_inlines.hh; src/checked_mpz_inlines.hh; tests/rawnumericspec1.cc. tests/smallconstantassign1.cc.

  • PPL-SPEC-001637
    8. Native floating storage, neighbors and precision barriers UID: PPL-SPEC-001637 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a configured supported native floating type T, Float<T>(v) shall retain the native value and expose its corresponding binary descriptor; value() shall return that stored native value. Representation access shall use standard-defined object-representation copies, without reading an inactive union member. Native padding shall not be interpreted as an integer field; x87 conversions shall preserve the 64-bit significand and 16-bit sign/exponent, ignoring native padding and the descriptor's high padding bits. The binary descriptor shall remain the active union member, including after default construction. Default construction shall leave the raw storage unspecified until the caller establishes a valid value or complete binary encoding. Reads shall require such initialization and an admitted encoding of the configured native format.

    Checked::pred_float(v) shall replace an admitted finite value or positive infinity with its immediate predecessor in that native format. succ_float(v) shall replace a finite value or negative infinity with its immediate successor. NaN and the opposite unbounded endpoint shall be outside the corresponding admitted input domain. Predecessor of either zero shall be the smallest negative subnormal; successor of either zero shall be the smallest positive subnormal. Approaching zero from the positive or negative side shall retain the corresponding zero sign. No rounding mode change shall be required.

    For supported native floating Raw, materialize_native_value shall return a value materialized at that native format under the active rounding direction when the configured evaluation format has excess precision or range; otherwise it shall return the input value. limit_precision for float and double shall apply PPL_CC_FLUSH: on GNU-compatible compilers this shall force a memory observation of the argument; on the portable fallback it shall merely mark the argument used. The long double overload shall do nothing. None of these helpers shall change the rounding direction. round_to_integer shall return the integral native floating value selected by the active hardware rounding direction. Its input shall be finite, and hardware setup and floating exceptions shall follow that native operation.

    RATIONALE:

    Directed arithmetic needs native-format adjacent values and explicit handling of excess evaluation precision without changing the caller's rounding direction.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    template <typename T> class Float;
    // Supported native specializations:
    Float<T>::Float();
    Float<T>::Float(T);
    T Float<T>::value();
    namespace Checked {
      template <typename T> void pred_float(T&);
      template <typename T> void succ_float(T&);
      template <typename Raw> Raw materialize_native_value(const Raw&);
      void limit_precision(const float&);
      void limit_precision(const double&);
      void limit_precision(const long double&);
      float round_to_integer(float);
      double round_to_integer(double);
      long double round_to_integer(long double);
    }
    template <typename T> void PPL_CC_FLUSH(const T&);
    
    VERIFICATION_CRITERIA:

    Check supported native types against nextafter at signed zeros, subnormal/normal transitions, finite extrema and admitted infinities. Check wrapper values and binary views, active-direction integral rounding, materialized values and preserved hardware direction; inspect the GNU barrier and portable no-op selection.

    SOURCE:

    src/Float_inlines.hh; src/checked_float_inlines.hh; src/compiler.hh; tests/floatinghelpersspec1.cc.

  • PPL-SPEC-001638
    9. Configured FPU backend control and status UID: PPL-SPEC-001638 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    On an available configured backend, fpu_initialize_control_functions shall establish that its control operations are usable. The C99 backend shall probe downward and upward selection and restore its original direction on successful return; a failed selection shall throw std::logic_error. Initialization shall not promise restoration after a failed probe.

    fpu_get_rounding_direction shall report the selected hardware direction; fpu_set_rounding_direction shall select an admitted platform encoding. fpu_save_rounding_direction shall select its argument and return a token accepted by fpu_restore_rounding_direction. On C99 and SPARC backends, restoration shall recover the preceding direction. The optimized IA32 pair shall require the default upward entry state and shall restore that default; its token shall not encode an arbitrary preceding environment. No backend shall promise to restore the entire floating environment through this pair.

    fpu_check_inexact shall return zero for a definitely clear flag, one for a definitely set flag, or minus one when flag observation is unavailable, without clearing an observed flag. fpu_reset_inexact shall clear the observable inexact state. The IA32 reset shall require default upward rounding and may clear other arithmetic exception flags. C99/SPARC reset shall preserve other flags and the selected direction.

    Where the IA32 raw-register helpers are available, control/status reads shall return the corresponding x87 control or status word, control writes shall load the admitted x87 word, fpu_clear_status(bits) shall clear selected status bits, and fpu_clear_exceptions shall clear the x87 exception state. SSE control reads/writes shall access MXCSR when that unit is available. Inputs shall be valid hardware control words and callers shall own access to the current thread's environment; trap enables and encodings shall be valid for every operation attempted. These raw operations shall not affect another thread's state. The no-control backend's control/status functions shall throw std::logic_error rather than report successful control.

    RATIONALE:

    Native checked arithmetic relies on backend control and status semantics, including the deliberately restricted IA32 save/restore protocol.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless a nested namespace is shown. Template excerpts omit constraints where stated in the text.

    void fpu_initialize_control_functions();
    fpu_rounding_direction_type fpu_get_rounding_direction();
    void fpu_set_rounding_direction(fpu_rounding_direction_type);
    fpu_rounding_control_word_type
    fpu_save_rounding_direction(fpu_rounding_direction_type);
    void fpu_restore_rounding_direction(fpu_rounding_control_word_type);
    void fpu_reset_inexact();
    int fpu_check_inexact();
    // IA32 raw helpers, when available:
    int fpu_get_control();
    void fpu_set_control(int);
    int fpu_get_status();
    void fpu_clear_status(unsigned short);
    void fpu_clear_exceptions();
    unsigned sse_get_control();
    void sse_set_control(unsigned);
    
    VERIFICATION_CRITERIA:

    Exercise available directions, upward save/restore, nested C99/SPARC changes, inexact observation/reset and retained status bits. Check IA32 raw control/status access with valid masked words and restore the complete original environment. Exercise every no-control stub and inspect backend selection.

    SOURCE:

    src/fpu_defs.hh; src/fpu-c99_inlines.hh; src/fpu-ia32_inlines.hh; src/fpu-sparc_inlines.hh; src/fpu-none_inlines.hh; tests/fpu1.cc; tests/fpunonespec1.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.

  • PPL-SPEC-001725
    14. Configured native gradual-underflow environment probe UID: PPL-SPEC-001725 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For each native floating type admitted by the configured PPL support flags, the probe shall check gradual underflow when numeric_limits reports a binary format with subnormals. Exact halving and restoration of the least positive normal shall preserve positive and negative subnormal values. Dividing the least positive/negative subnormal by the positive least subnormal shall yield positive/negative one, thereby checking that subnormal inputs are not flushed. Volatile loads and stores shall force the intended native runtime operations. Other formats and unselected types shall be skipped without claiming that the probe ran for them. Failure shall identify the type and failed condition. The C entry point shall return the C++ probe's success as 0, or failure as 1. This is a check of the calling process's numerical environment, not a promise to configure FPU rounding, exception masks or universal subnormal support.

    RATIONALE:

    The C entry point and native helper must exercise the same gradual-underflow probe.

    INTERFACE:

    check_gradual_underflow<T>, check_supported_gradual_underflow and the mixed C/C++ probe entry points.

    VERIFICATION_CRITERIA:

    Run the standalone C++ and mixed C/C++ probes with strict floating semantics; inspect configured omissions and independently check the exact native values.

    SOURCE:

    tests/fpu_gradual_underflow.hh; tests/fpu_c_main.c; tests/fpu_c_helper.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.

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

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

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

  • PPL-SPEC-000004
    4. Exact partial-map lookup and unchanged absent output UID: PPL-SPEC-000004 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid map under 🔗 1. Public partial coordinate-map type and valid use, lookup of i shall return true exactly when i ∈ dom(M). On true, it shall assign M(i) to j. On false, it shall leave j unchanged. The represented map shall remain unchanged. Every dimension_type value shall be admissible as a lookup index; in particular, lookup of not_a_dimension() shall return false without changing j. The same caller variable may supply the index value and receive the image; the index used for lookup shall be its value on entry to the call.

    RATIONALE:

    Absence must be distinguishable from a mapping to zero, and an unsuccessful lookup must not corrupt a caller's previously held value.

    COMMENT:

    Lookup is a complete membership-and-image query. It performs no numerical coefficient conversion and is independent of configured coefficient arithmetic and rounding modes.

    INTERFACE:

    Public const member declaration:

    bool maps(dimension_type i, dimension_type& j) const;
    

    The output reference shall designate a live writable dimension_type object.

    VERIFICATION_CRITERIA:

    Check mapped indices, holes below the largest stored source, indices beyond the stored extent, empty maps and the reserved sentinel. Initialize outputs to distinct known values and verify preservation on every false result. Check mapping to zero and calls using one variable for both arguments. Compare the map before and after queries using an independent pair collection.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: maps. tests/partialfunction2.cc: partial_function_empty_queries_preserve_output and partial_function_sparse_growth_preserves_holes_and_maximum. tests/partialfunction2.cc: partial_function_aliased_lookup_and_zero_image.

  • 5. Exact empty-codomain query UID: PPL-SPEC-000005 STATUS: APPROVED COMPONENT: CORE_DATA_STRUCTURES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a valid map under 🔗 1. Public partial coordinate-map type and valid use, has_empty_codomain shall return true exactly when the represented partial map has no pairs, and shall leave the map unchanged. A nonempty map whose largest image is zero shall return false. Stored capacity or unused source positions shall not determine the mathematical answer.

    RATIONALE:

    The image is empty exactly when a partial function is nowhere defined; zero is an ordinary mapped value rather than an emptiness sentinel.

    INTERFACE:

    Public const member declaration:

    bool has_empty_codomain() const;
    
    VERIFICATION_CRITERIA:

    Check new and copied empty maps, maps containing a single image zero, and sparse nonempty maps. Compare with the independent pair collection before and after successful insertions and copy assignments. Check reporting after failed insertions and copy assignments.

    SOURCE:

    src/Partial_Function_defs.hh and src/Partial_Function_inlines.hh: has_empty_codomain. tests/partialfunction2.cc: partial_function_empty_queries_preserve_output and partial_function_sparse_growth_preserves_holes_and_maximum.

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

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

  • 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-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-001675
    4. Support backend selection for polyhedral approximations UID: PPL-SPEC-001675 STATUS: APPROVED COMPONENT: POLYHEDRA APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a valid polyhedron and the number of captured nontrivial candidate inequalities, use_generator_support_for_join shall return true when the ambient dimension reaches the MIP dimension ceiling, when generators are current with no pending constraints and at most 64 stored generator rows, or when the dimension is at most four and there are at most eight candidates. Otherwise it shall return false. The query shall preserve the object and shall not materialize either representation. The dimension-ceiling route shall avoid an unavailable additional LP slack coordinate.

    RATIONALE:

    Small descriptions and small current generator systems avoid LP setup. Larger H-descriptions avoid vertex enumeration; larger current generator systems avoid repeated long scans. The decision changes cost rather than the bound semantics.

    INTERFACE:

    Private Polyhedron member in src/Polyhedron_defs.hh.

    bool use_generator_support_for_join(size_t candidates) const;
    
    VERIFICATION_CRITERIA:

    Check both sides of the candidate-count, dimension and generator-count thresholds, with pending constraints and current versus stale generators. Review the capacity-boundary route separately where materializing the necessary dimension is not feasible. Compare operation results across backend choices.

    SOURCE:

    src/Polyhedron_defs.hh; src/Polyhedron_joins.cc; tests/Polyhedron/polyhedralenvelope1.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-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-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-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. Exact rational assignment from rational and integral sources UID: PPL-SPEC-000091 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    assign_r(to, from, dir) shall replace to by the exact value of a canonical rational source, mpz_class source or supported native integral source, and shall return V_EQ. Integral assignment shall produce canonical denominator one, including for zero, both signs and signed and unsigned native endpoints. Rational self-assignment shall preserve its value.

    The native source types shall be char, signed char, unsigned char, short, unsigned short, int, unsigned int, long, unsigned long, long long and unsigned long long. Their full representable ranges shall be admitted. The directions ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change this exact value or result classification.

    Rational sources shall be finite canonical mpq_class objects: the denominator shall be positive, and numerator and denominator shall be coprime; zero shall be represented as 0/1. The destination shall be a live rational object. Distinct sources shall remain unchanged. Callers shall synchronize access overlapping modification of an argument object. No library initialization object, thread initialization or coefficient-constant stage shall be required. Available resources shall limit computation; no fixed coefficient-width bound shall be imposed on rational arithmetic itself.

    RATIONALE:

    Rational assignment must preserve every finite integral value independently of the configured bounded coefficient type. An exact classification applies to both copied fractions and integral embeddings.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result assign_r(mpq_class& to, const mpq_class& from, Rounding_Dir dir);
    Result assign_r(mpq_class& to, const mpz_class& from, Rounding_Dir dir);
    

    The same template shall admit each listed native integral source type in place of mpz_class.

    VERIFICATION_CRITERIA:

    Check exact status, canonical numerator/denominator and source preservation for all native source types, endpoint values, a multi-limb integer, rational self-copy and distinct copies. Repeat supported directions with and without strict relation, and reassign after earlier destination contents.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000092
    2. Exact rational assignment of finite native floating-point values UID: PPL-SPEC-000092 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite source of type float, double or long double whose corresponding PPL_SUPPORTED_FLOAT, PPL_SUPPORTED_DOUBLE or PPL_SUPPORTED_LONG_DOUBLE macro is nonzero, assign_r(to, from, dir) shall assign its exact mathematical value as a canonical rational and return V_EQ. This shall include signed zero, subnormal values where supported, and the finite endpoints of the source format. Either sign of floating-point zero shall produce rational 0/1. The result shall preserve the represented binary floating-point value, without substituting a nearby decimal interpretation.

    ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change the assigned value or status. The current floating-point rounding direction shall not change the exact rational value. Nonfinite inputs and numeric policies for encoded special rationals shall be outside this finite-value contract.

    The destination shall be a live rational object. Synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The floating-point source shall remain unchanged.

    RATIONALE:

    A finite binary floating-point value is an exact rational even when its short decimal spelling is not. Source-format range does not imply a bounded coefficient range restriction on the rational destination.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result assign_r(mpq_class& to, const float& from, Rounding_Dir dir);
    Result assign_r(mpq_class& to, const double& from, Rounding_Dir dir);
    Result assign_r(mpq_class& to, const long double& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check literal dyadic answers, both zeros, nonintegral values, subnormals, finite maxima and mantissa-boundary values for every source type. Establish expected rationals from integer significands and powers of two, independently of decimal printing. Repeat directions and supported hardware rounding states, preserving the source.

    SOURCE:

    src/checked_mpq_inlines.hh; src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc.

  • 3. Exact finite rational addition, subtraction, multiplication and division UID: PPL-SPEC-000093 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For source entry values a and b, add_assign_r, sub_assign_r and mul_assign_r shall assign a + b, a − b and ab, respectively. div_assign_r shall require b ≠ 0 and assign a ⁄ b. Each successful operation shall produce a canonical rational and return V_EQ. This shall include cancellation, zero numerators and arbitrarily large finite integral numerator or denominator values within available resources.

    The two sources may be the same object. The directions ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change the exact value or status. A transparent rational policy shall not promise rejection of a zero divisor.

    Canonical operands, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall be a live rational object and may be any source; the operation shall use every operand's entry value. Distinct sources shall remain unchanged.

    RATIONALE:

    The rational arithmetic interface returns an explicit exactness classification while retaining mathematical values and canonical representation across aliases.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result add_assign_r(mpq_class& to, const mpq_class& x,
                        const mpq_class& y, Rounding_Dir dir);
    Result sub_assign_r(mpq_class& to, const mpq_class& x,
                        const mpq_class& y, Rounding_Dir dir);
    Result mul_assign_r(mpq_class& to, const mpq_class& x,
                        const mpq_class& y, Rounding_Dir dir);
    Result div_assign_r(mpq_class& to, const mpq_class& x,
                        const mpq_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check literal reduced fractions and independent cross-product identities for both signs, zero and cancellation. Exercise distinct output, each input alias and all-same inputs, respecting nonzero division. Verify exact status and canonical output under every supported direction, with multi-limb inputs in all coefficient configurations.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc; tests/numericpublic1.cc.

  • 4. Rational sign assignments and integral-valued rounding operations UID: PPL-SPEC-000094 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For source entry value a, neg_assign_r and abs_assign_r shall assign  − a and |a|. floor_assign_r, ceil_assign_r and trunc_assign_r shall assign, respectively, ⌊a⌋, ⌈a⌉ and trunc(a), where truncation is toward zero. The three integral-valued results shall have denominator one.

    Each successful call shall return V_EQ for its specified operation's result, including rounding a nonintegral source to an integer. The status shall not assert that this rounded integer equals the original source. ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall leave the specified operation result and status unchanged.

    Canonical operands, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall be a live rational object and may be any source; the operation shall use every operand's entry value. Distinct sources shall remain unchanged.

    RATIONALE:

    An integer rounding operation can itself be computed exactly. Separating the operation from its source prevents misinterpreting its result classification as preservation of a nonintegral input.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result neg_assign_r(mpq_class& to, const mpq_class& from,
                        Rounding_Dir dir);
    Result abs_assign_r(mpq_class& to, const mpq_class& from,
                        Rounding_Dir dir);
    Result floor_assign_r(mpq_class& to, const mpq_class& from,
                          Rounding_Dir dir);
    Result ceil_assign_r(mpq_class& to, const mpq_class& from,
                         Rounding_Dir dir);
    Result trunc_assign_r(mpq_class& to, const mpq_class& from,
                          Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check zero, both signs, integral values, proper fractions and values on either side of integral boundaries. Use literal floor, ceiling and truncation answers; check sign results, exact status, denominator one, source preservation and in-place operation for every admitted direction.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc.

  • 5. Truncated rational quotient and signed rational remainder UID: PPL-SPEC-000095 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For rational source entry values a and nonzero b, idiv_assign_r(to, x, y, dir) shall assign q = trunc(a ⁄ b) as a canonical rational with denominator one. rem_assign_r(to, x, y, dir) shall assign r = a − btrunc(a ⁄ b). The remainder shall satisfy |r| < |b|; a nonzero remainder shall have the sign of a. Each successful call shall return V_EQ for its specified operation.

    The two sources may be the same object. The directions ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change these truncation and remainder conventions or the returned exact status. A zero-divisor rejection guarantee shall not be inferred from this contract.

    Canonical operands, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall be a live rational object and may be any source; the operation shall use every operand's entry value. Distinct sources shall remain unchanged.

    With a non-thread-safe build, calls to rem_assign_r shall not overlap PPL arithmetic in another thread. A thread-safe build shall provide independent temporary storage for each thread.

    RATIONALE:

    The rational remainder convention derives from truncating the ratio, rather than from independently rounding the dividend or divisor to integers.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result idiv_assign_r(mpq_class& to, const mpq_class& x,
                         const mpq_class& y, Rounding_Dir dir);
    Result rem_assign_r(mpq_class& to, const mpq_class& x,
                        const mpq_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check literal quotient/remainder pairs for every sign combination, proper and improper rational ratios, exact division and zero dividends. Verify reconstruction and remainder bounds with independent integer numerator/denominator calculations. Exercise both input aliases and all-same nonzero calls, exact status and canonical representation.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc.

  • 6. Exact rational operations with powers of two UID: PPL-SPEC-000096 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For source entry value a and unsigned int exponent e, let m = 2e. add_2exp_assign_r and sub_2exp_assign_r shall assign a + m and a − m. mul_2exp_assign_r and div_2exp_assign_r shall assign am and a ⁄ m.

    umod_2exp_assign_r shall assign ru = a − m⌊a ⁄ m⌋, satisfying 0 ≤ ru < m. smod_2exp_assign_r shall assign rs = a − m⌊a ⁄ m + 1 ⁄ 2⌋, satisfying  − m ⁄ 2 ≤ rs < m ⁄ 2; the half-period tie shall select the negative endpoint. These remainder operations shall preserve fractional parts as required by their mathematical definitions.

    Every successful call shall produce a canonical rational and return V_EQ. Exponent zero shall mean m = 1. The exponent range shall be subject to available resources; it shall not be capped by the configured coefficient width. ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change these exact results.

    Canonical operands, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall be a live rational object and may be any source; the operation shall use every operand's entry value. Distinct sources shall remain unchanged.

    With a non-thread-safe build, calls to add_2exp_assign_r or sub_2exp_assign_r shall not overlap PPL arithmetic in another thread. A thread-safe build shall provide independent temporary storage for each thread.

    RATIONALE:

    Rational dyadic residues have distinct unsigned and centered conventions. Explicit half-open bounds distinguish them from truncated remainder and determine the tie at half a period.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result add_2exp_assign_r(mpq_class& to, const mpq_class& from,
                             unsigned int exp, Rounding_Dir dir);
    Result sub_2exp_assign_r(mpq_class& to, const mpq_class& from,
                             unsigned int exp, Rounding_Dir dir);
    Result mul_2exp_assign_r(mpq_class& to, const mpq_class& from,
                             unsigned int exp, Rounding_Dir dir);
    Result div_2exp_assign_r(mpq_class& to, const mpq_class& from,
                             unsigned int exp, Rounding_Dir dir);
    Result umod_2exp_assign_r(mpq_class& to, const mpq_class& from,
                              unsigned int exp, Rounding_Dir dir);
    Result smod_2exp_assign_r(mpq_class& to, const mpq_class& from,
                              unsigned int exp, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exponent zero, positive exponents beyond each bounded coefficient width, both signs, zero, proper fractions, exact multiples and each half-period boundary. Verify literal values, residue bounds and reconstruction, exact status, canonical representation and in-place use.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc.

  • PPL-SPEC-000097
    7. Exact rational product accumulation and subtraction UID: PPL-SPEC-000097 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For destination and source entry values d, a and b, add_mul_assign_r shall assign d + ab and sub_mul_assign_r shall assign d − ab. Each successful call shall produce a canonical rational and return V_EQ. The destination may be either or both sources; the two sources may be the same object.

    ROUND_DOWN, ROUND_UP, ROUND_IGNORE and ROUND_NOT_NEEDED, with an optional ROUND_STRICT_RELATION flag, shall not change the exact value or status. There shall be no bounded coefficient intermediate-range restriction on these rational operations.

    Canonical operands, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall be a live rational object and may be any source; the operation shall use every operand's entry value. Distinct sources shall remain unchanged.

    RATIONALE:

    Product accumulation must evaluate all three entry values consistently, including when a GMP expression references its own destination.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    Result add_mul_assign_r(mpq_class& to, const mpq_class& x,
                            const mpq_class& y, Rounding_Dir dir);
    Result sub_mul_assign_r(mpq_class& to, const mpq_class& x,
                            const mpq_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check literal reduced answers for both operations, every source/destination alias partition, zero factors, mixed signs, cancellation and large numerator/denominator products. Verify exact status, canonical output and unchanged distinct sources across admitted directions.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.cc.

  • PPL-SPEC-000099
    9. Finite rational sign, comparison and numeric classification UID: PPL-SPEC-000099 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For finite canonical rational values, sgn(x) shall return -1, 0 or 1 according to the sign of the numerator. cmp(x, y) shall return an int whose sign agrees with the mathematical ordering of the rationals; a nonzero magnitude shall not be prescribed.

    is_integer(x) shall return true exactly when the canonical denominator is one. is_not_a_number(x), is_minus_infinity(x) and is_plus_infinity(x) shall each return false. These predicates shall return bool and shall preserve the operands. They shall not give a finite rational value an infinity merely because an associated bounded coefficient profile cannot hold its numerator or denominator. The admitted GMP special representations and their extended-integrality classification shall follow 🔗 2. GMP integer and rational special-value classification.

    Canonical inputs, synchronization and resource prerequisites shall follow 🔗 1. Exact rational assignment from rational and integral sources.

    RATIONALE:

    Finite rational classification concerns mathematical value rather than the selected global coefficient range. Ordering can be exact without conversion to floating point.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiations for mpq_class:

    int sgn(const mpq_class& x);
    int cmp(const mpq_class& x, const mpq_class& y);
    bool is_integer(const mpq_class& x);
    bool is_not_a_number(const mpq_class& x);
    bool is_minus_infinity(const mpq_class& x);
    bool is_plus_infinity(const mpq_class& x);
    
    VERIFICATION_CRITERIA:

    Check all sign and ordering outcomes, integral and nonintegral rationals, zero, equal distinct objects and fractions differing beyond floating-point precision. Require all finite special-value predicates to be false and preserve both operands, including large components in bounded coefficient builds.

    SOURCE:

    src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/rationalnumerics1.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.

  • 1. Constraint-relation assertion values and named factories UID: PPL-SPEC-000541 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Poly_Con_Relation shall represent a finite set A of named assertions. nothing() shall return the empty assertion set. The factories is_disjoint(), strictly_intersects(), is_included(), saturates() shall return the corresponding singleton sets. The four atoms shall assert, respectively, disjointness from the constraint satisfying set, intersection without inclusion in that set, inclusion in that set, and vanishing of the constraint's affine expression at every represented point. A domain query shall supply the interpretation applicable to its accepted descriptor and domain.

    Every subset of the named atoms shall be a valid value, including combinations that cannot describe a particular nonempty geometric object. An empty assertion set shall state no fact; absence of an atom shall not assert its negation. Operations on these values shall require live initialized objects and synchronized access against mutation. They shall require no library or thread initialization owner, coefficient-constant stage or FPU setup. Numerical coefficient limits shall not restrict the assertion algebra.

    RATIONALE:

    Named assertions communicate facts without confusing an absent assertion with a negative answer or closing the stored facts under geometric reasoning.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

    class Poly_Con_Relation;
    static Poly_Con_Relation nothing();
    static Poly_Con_Relation is_disjoint();
    static Poly_Con_Relation strictly_intersects();
    static Poly_Con_Relation is_included();
    static Poly_Con_Relation saturates();
    
    VERIFICATION_CRITERIA:

    Construct every subset from named factories, compare singleton memberships and empty values, and exercise the complete algebra without initialization owners in every selected configuration.

    SOURCE:

    src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000542
    2. Constraint-relation value copying and lifetime UID: PPL-SPEC-000542 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction and assignment of Poly_Con_Relation shall preserve exactly the source assertion set. Assignment shall return the destination reference and admit self-assignment. Later assignment of either object shall leave the other unchanged, and either object shall remain usable after destruction of its source or copy. Destruction shall require no external lifetime owner. An rvalue may be copied; it shall not require an empty moved-from source. The validity and initialization prerequisites in 🔗 1. Constraint-relation assertion values and named factories shall apply.

    RATIONALE:

    Relation results are independent small values that callers retain after queries and temporary operands disappear.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

    Poly_Con_Relation(const Poly_Con_Relation& y);
    Poly_Con_Relation& operator=(const Poly_Con_Relation& y);
    ~Poly_Con_Relation();
    
    VERIFICATION_CRITERIA:

    Check every representable assertion set through copy construction, assignment, self-assignment, rvalue copying, independent subsequent assignments and destruction of a temporary source.

    SOURCE:

    src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000543
    3. Constraint-relation conjunction, subtraction and implication UID: PPL-SPEC-000543 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For assertion sets A and B represented by x and y, x && y shall represent A∪B, and x - y shall represent A⧵B. x.implies(y) shall return true exactly when B ⊆ A. Equality shall return true exactly when A = B; inequality shall be its logical negation. These operations shall preserve both operands and admit the same object in both positions.

    Implication shall inspect asserted membership only: it shall neither infer additional geometric facts from an atom nor use inconsistent combinations to infer unstored atoms. Subtracting an absent assertion shall have no effect; subtracting a value from itself shall yield nothing(). The prerequisites in 🔗 1. Constraint-relation assertion values and named factories shall apply.

    RATIONALE:

    The algebra combines and selects known assertions; it does not solve a new geometric relation problem.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

    Poly_Con_Relation operator&&(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
    Poly_Con_Relation operator-(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
    bool implies(const Poly_Con_Relation& y) const;
    bool operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
    bool operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
    
    VERIFICATION_CRITERIA:

    Compare every pair of assertion subsets with an independent finite-set union, difference, reverse-inclusion and equality model. Check aliases, unchanged operands, empty identities and self subtraction.

    SOURCE:

    src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000544
    4. Constraint-relation flag encoding and validity UID: PPL-SPEC-000544 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    get_flags() shall return the unsigned bitwise union of the masks of exactly the stored atoms. nothing() shall have mask zero. is_disjoint(), strictly_intersects(), is_included() and saturates() shall have masks 1, 2, 4 and 8, respectively. OK() shall return true for every value obtained from named factories, copying, assignment and the assertion algebra. Both queries shall preserve the value. Their prerequisites shall follow 🔗 1. Constraint-relation assertion values and named factories.

    RATIONALE:

    Language bindings need a stable encoding of the named assertions. Geometric realizability is separate from the validity of a result value.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

    unsigned int get_flags() const;
    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check literal singleton masks, zero and every combined mask against independent membership, and check validity after all factory, ownership and algebra histories.

    SOURCE:

    src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

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

  • 6. Generator-relation assertion values and named factories UID: PPL-SPEC-000546 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Poly_Gen_Relation shall represent a finite set A of named assertions. nothing() shall return the empty assertion set. The factories subsumes() shall return the corresponding singleton sets. The atom shall assert that adding the generator would not change the represented set, under the applicable domain and generator-kind interpretation.

    The empty assertion set and the singleton subsumption assertion shall both be valid values. The empty set shall state no fact; absence of the subsumption assertion shall not assert its negation. Operations on these values shall require live initialized objects and synchronized access against mutation. They shall require no library or thread initialization owner, coefficient-constant stage or FPU setup. Numerical coefficient limits shall not restrict the assertion algebra.

    RATIONALE:

    Named assertions communicate facts without confusing an absent assertion with a negative answer or closing the stored facts under geometric reasoning.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

    class Poly_Gen_Relation;
    static Poly_Gen_Relation nothing();
    static Poly_Gen_Relation subsumes();
    
    VERIFICATION_CRITERIA:

    Construct every subset from named factories, compare singleton memberships and empty values, and exercise the complete algebra without initialization owners in every selected configuration.

    SOURCE:

    src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000547
    7. Generator-relation value copying and lifetime UID: PPL-SPEC-000547 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Copy construction and assignment of Poly_Gen_Relation shall preserve exactly the source assertion set. Assignment shall return the destination reference and admit self-assignment. Later assignment of either object shall leave the other unchanged, and either object shall remain usable after destruction of its source or copy. Destruction shall require no external lifetime owner. An rvalue may be copied; it shall not require an empty moved-from source. The validity and initialization prerequisites in 🔗 6. Generator-relation assertion values and named factories shall apply.

    RATIONALE:

    Relation results are independent small values that callers retain after queries and temporary operands disappear.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

    Poly_Gen_Relation(const Poly_Gen_Relation& y);
    Poly_Gen_Relation& operator=(const Poly_Gen_Relation& y);
    ~Poly_Gen_Relation();
    
    VERIFICATION_CRITERIA:

    Check every representable assertion set through copy construction, assignment, self-assignment, rvalue copying, independent subsequent assignments and destruction of a temporary source.

    SOURCE:

    src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000548
    8. Generator-relation conjunction, subtraction and implication UID: PPL-SPEC-000548 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For assertion sets A and B represented by x and y, x && y shall represent A∪B, and x - y shall represent A⧵B. x.implies(y) shall return true exactly when B ⊆ A. Equality shall return true exactly when A = B; inequality shall be its logical negation. These operations shall preserve both operands and admit the same object in both positions.

    Implication shall inspect asserted membership only: it shall neither infer additional geometric facts from an atom nor use inconsistent combinations to infer unstored atoms. Subtracting an absent assertion shall have no effect; subtracting a value from itself shall yield nothing(). The prerequisites in 🔗 6. Generator-relation assertion values and named factories shall apply.

    RATIONALE:

    The algebra combines and selects known assertions; it does not solve a new geometric relation problem.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

    Poly_Gen_Relation operator&&(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
    Poly_Gen_Relation operator-(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
    bool implies(const Poly_Gen_Relation& y) const;
    bool operator==(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
    bool operator!=(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
    
    VERIFICATION_CRITERIA:

    Compare every pair of assertion subsets with an independent finite-set union, difference, reverse-inclusion and equality model. Check aliases, unchanged operands, empty identities and self subtraction.

    SOURCE:

    src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

  • PPL-SPEC-000549
    9. Generator-relation flag encoding and validity UID: PPL-SPEC-000549 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    get_flags() shall return the unsigned bitwise union of the masks of exactly the stored atoms. nothing() shall have mask zero. subsumes() shall have mask 1. OK() shall return true for every value obtained from named factories, copying, assignment and the assertion algebra. Both queries shall preserve the value. Their prerequisites shall follow 🔗 6. Generator-relation assertion values and named factories.

    RATIONALE:

    Language bindings need a stable encoding of the named assertions. Geometric realizability is separate from the validity of a result value.

    INTERFACE:

    Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

    unsigned int get_flags() const;
    bool OK() const;
    
    VERIFICATION_CRITERIA:

    Check literal singleton masks, zero and every combined mask against independent membership, and check validity after all factory, ownership and algebra histories.

    SOURCE:

    src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_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. Exact scalar ASCII persistence UID: PPL-SPEC-000571 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven standard native integer types, mpz_class, mpq_class and their Checked_Number wrappers, ascii_dump shall write a finite scalar's exact mathematical value in the compatible decimal representation. Integral values, including raw char, signed char and unsigned char, shall be represented numerically. A canonical rational shall use its exact integer or numerator/denominator representation.

    Under compatible scalar type, policy, locale and stream-format conditions, ascii_load of a complete representation emitted for an admitted finite value shall return true and restore that value. All representable native integer values shall belong to the round-trip scope. Distinct successive records separated by whitespace shall be reloadable in order without consuming another record's value. The stream shall remain positioned after the loaded numeric token. Canonical finite GMP rational producer records shall restore canonical finite rational storage.

    The producer and consumer shall use classic-locale ordinary decimal numeric formatting, with no field padding. Checked exact input shall require the policy capabilities of 🔗 6. Checked numeric stream policy integration, including a default input direction compatible with the exact stored value and a result handler that permits its returned result. Checked output shall require a result handler. Underlying scalar storage shall be live and finite; rational producer values and compatible rational records shall be canonical with positive denominator. The corresponding mathematical input and output semantics and relevant serialization prerequisites shall follow 🔗 1. Exact finite numeric token syntax through 🔗 6. Checked numeric stream policy integration for checked stream operations. These numeric-text parser rules shall not replace the ordinary GMP extraction rules for raw GMP destinations. Successful raw GMP rational extraction shall not by itself promise canonicalization or a nonzero denominator: for example, 2/4 and 1/0 may be accepted as those numerator/denominator representations. Subsequent numerical use shall first meet its canonicalization and nonzero- denominator prerequisites.

    RATIONALE:

    An exact numerical representation shall preserve every admitted integer or canonical rational value when scalar records are embedded in larger saved objects.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in PPL:

    void ascii_dump(std::ostream& stream, const Number& value);
    bool ascii_load(std::istream& stream, Number& value);
    

    Number shall be an admitted exact scalar type stated above.

    VERIFICATION_CRITERIA:

    Round-trip literal positive, negative, zero and endpoint values for every admitted integer type and checked form. Include raw and checked character values that coincide with whitespace, and sequential-record framing. Check large GMP integers and nonintegral canonical rationals with independently known values. Verify the required policy capabilities, destination reuse, retained following records and no coefficient-width restriction.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_templates.hh; tests/scalarasciispec1.cc; tests/numberinput1.cc.

  • 2. Finite floating scalar ASCII byte records UID: PPL-SPEC-000572 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a configured supported native floating type or its checked wrapper, ascii_dump shall emit exactly two hexadecimal digits for each byte of the source object's representation, in increasing memory-address order. Leading zero nibbles shall be included. The byte token shall be followed by one space and a nonempty parenthesized display token. The byte token shall be authoritative for reload; the display shall be supplementary.

    The source shall be live and finite, including either signed zero, subnormal values and finite range endpoints. Producer and consumer shall use the same scalar or checked type, object size and ABI. In particular, the record shall not promise interchange between different floating formats or checked object types. The producer stream shall use the classic locale, right adjustment, no base prefix and ordinary numeric display formatting. Checked display output shall require a policy result handler under 🔗 6. Checked numeric stream policy integration. On normal return, original formatting flags shall be restored; byte emission shall select a zero fill character. The source value and hardware rounding direction shall remain unchanged. No library initialization or FPU rounding setup shall be required; available resources and nontrapping floating exceptions shall be prerequisites.

    RATIONALE:

    Object bytes preserve finite floating values, signed zero and subnormals independently of the precision used for a supplementary human-readable number.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiation in PPL:

    void ascii_dump(std::ostream& stream, const Number& value);
    

    Number shall be a configured supported native floating type or its checked wrapper with the stated output capability.

    VERIFICATION_CRITERIA:

    Compare the emitted byte token against independently inspected unsigned object bytes for each supported native and checked floating format. Include signed zero, opposite signs, subnormal and normal boundaries and maximum finite magnitudes. Vary display precision without changing the byte token; check exact token width, original formatting flags, zero fill selection, source preservation and unchanged hardware direction.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_templates.hh; tests/scalarasciispec1.cc; tests/numberinput1.cc.

  • 3. Finite floating scalar ASCII reload and framing UID: PPL-SPEC-000573 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the compatible finite object records of 🔗 2. Finite floating scalar ASCII byte records, ascii_load shall read a hexadecimal byte token of exactly twice the destination object's size. Each hexadecimal letter shall be accepted in upper or lower case. It shall restore the bytes to the corresponding memory positions and require a following nonempty whitespace-delimited token whose first character is ( and last character is ). There shall be at least one character between the parentheses. On successful reload it shall return true and preserve the represented finite value and zero sign. The contents between parentheses shall be discarded; they shall not override or be required to numerically agree with the byte token. A following record shall remain available for a subsequent load.

    An absent or wrong-length byte token, a nonhexadecimal byte digit, a missing display token or a display token without that nonempty parenthesized framing shall return false when the stream's exception mask permits normal return. A false return shall not require failbit if a lexical token was successfully extracted before the record-shape check failed. The destination may already have been changed; rollback shall not be promised.

    The destination shall be live, and finite records shall encode a valid finite object of that same type and ABI. Resetting storage after a rejected record shall precede any numerical use that requires a valid finite representation. Checked floating reload shall require a policy providing the input-stream capabilities of 🔗 6. Checked numeric stream policy integration, including ROUND_DEFAULT_INPUT and handle_result. Successful byte reload shall restore the representation directly without applying that numerical rounding default or invoking the handler. No library initialization or FPU rounding setup shall be required, and the hardware direction shall remain unchanged.

    RATIONALE:

    The saved bytes determine the restored number. Structural validation and explicit failure-state limits permit composite readers to detect truncated or malformed records without assuming transactional reload.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiation in PPL:

    bool ascii_load(std::istream& stream, Number& value);
    

    Number shall be a configured supported native floating type or its checked wrapper with the stated input-stream capabilities.

    VERIFICATION_CRITERIA:

    Reload independently generated compatible byte records in both hex letter cases and compare object bytes, finite values and zero signs. Replace the display contents with other nonempty text to verify byte authority. Test all byte-length and digit rejection stages, missing or malformed display tokens, sequential records and destination reset/reuse. Use a recording policy to confirm that successful checked floating byte reload invokes no handler.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_templates.hh; tests/scalarasciispec1.cc; tests/numberinput1.cc.

  • PPL-SPEC-000574
    4. Scalar ASCII stream delivery and failure handling UID: PPL-SPEC-000574 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Scalar ASCII persistence shall use ordinary stream delivery state and the stream's selected exception mask. ascii_dump shall return no delivery status; normal return shall not imply that the output stream accepted every character. ascii_load shall return false when a required formatted extraction fails and no enabled exception interrupts the operation. Exact checked scalar loads shall retain the policy exception behavior of 🔗 6. Checked numeric stream policy integration. Exceptions enabled by the stream mask and policy handler exceptions shall propagate. Stream-buffer exception handling shall follow the underlying formatted stream operation.

    Producer source values shall remain unchanged. On failed input, destination storage and stream position may already have changed; callers shall reset an affected destination and clear or replace the stream before retrying. Native and GMP scalar storage shall remain destructible and assignable; no earlier numerical value shall be promised. After a successful compatible retry the destination shall have the newly loaded finite value.

    Callers shall synchronize stream and object access overlapping modification. The selected scalar's allocation and representation prerequisites shall apply. No coefficient-constant stage or library initialization shall be introduced by scalar persistence. Checked exact numeric parsing shall retain its shared-temporary serialization requirements from 🔗 3. Numeric text input into integral destinations. Floating byte records shall retain the finite/type/ABI prerequisites of 🔗 2. Finite floating scalar ASCII byte records and 🔗 3. Finite floating scalar ASCII reload and framing.

    RATIONALE:

    Composite persistence needs observable delivery failures and usable retry rules without a universal rollback guarantee.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in PPL:

    void ascii_dump(std::ostream& stream, const Number& value);
    bool ascii_load(std::istream& stream, Number& value);
    

    Number shall be an admitted exact or finite floating scalar type from 🔗 1. Exact scalar ASCII persistence through 🔗 3. Finite floating scalar ASCII reload and framing.

    VERIFICATION_CRITERIA:

    Use bidirectional streams, preexisting failure states, truncation, returning and throwing stream buffers and enabled fail/bad exception masks. Confirm false returns or the precise stream/policy exceptions as appropriate, source preservation, explicit destination reset and successful retry. Distinguish a shape-check false return from an extraction failure and an output stream's normal return with bad state.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_templates.hh; tests/scalarasciispec1.cc; tests/numberinput1.cc.

  • PPL-SPEC-000846
    1. Policy-dependent native integer classification UID: PPL-SPEC-000846 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source shall have one of the eleven native integer storage types, either raw or wrapped as in 🔗 1. Exact same-storage native integer arithmetic. Every native integer payload shall denote its ordinary finite value or an admitted special representation according to the source policy. Reserved representations shall follow 🔗 1. Typed special-marker assignment to native integer storage. A raw native integer source shall have no reserved infinity or NaN patterns.

    is_not_a_number(x) shall be true exactly for an admitted NaN; is_minus_infinity(x) and is_plus_infinity(x) shall be true exactly for their admitted signed infinities. infinity_sign(x) shall return  − 1 for negative infinity, 1 for positive infinity and zero for finite values and NaN. A representation reserved only by another policy shall not be interpreted as special under the source's own policy.

    is_integer(x) shall return true for every finite native integer and each admitted signed infinity, and false for an admitted NaN. It shall recognize membership in the extended integral domain ℤ∪{ − ∞,  + ∞}. Ordinary membership in ℤ shall additionally require excluding both infinities.

    For a checked source, classify(nan, inf, sign) shall apply these rules in order:

    • For a NaN, if nan or sign is true, return V_NAN.
    • If inf is true, return V_EQ_MINUS_INFINITY or V_EQ_PLUS_INFINITY for an infinity of the corresponding sign.
    • If sign is true, return V_LT for a negative value, V_GT for a positive value and V_EQ for zero. This shall include an infinity whose infinity classification was not requested.
    • Otherwise return V_LGE, including for NaN when neither NaN nor sign classification was requested.

    Omitted arguments shall request all three classifications. Normal relation codes in this query shall classify the source's sign relative to zero; they shall not describe an arithmetic rounding error. No overflow or unrepresentability flag shall be added. The classes and relations shall have the meanings of 🔗 1. Numerical result classes and relation meanings.

    Sources shall be live and remain unchanged, and access overlapping mutation shall be synchronized. Calls shall require no library initialization, coefficient-constant stage, FPU setup, rounding default or policy handler. They shall invoke no handler and preserve hardware direction.

    RATIONALE:

    A native bit pattern can denote a finite endpoint under one policy and a special value under another. Classification must honor the selected policy and the requested information. Extended integrality includes admitted infinities while distinguishing NaN from integer values.

    INTERFACE:

    Public header: <ppl.hh>; effective query instantiations in Parma_Polyhedra_Library for admitted N:

    bool is_not_a_number(const N& x);
    bool is_minus_infinity(const N& x);
    bool is_plus_infinity(const N& x);
    int infinity_sign(const N& x);
    bool is_integer(const N& x);
    

    For an admitted Checked_Number source, the member interface shall be:

    Result classify(bool nan = true, bool inf = true,
                    bool sign = true) const;
    
    VERIFICATION_CRITERIA:

    Check all eleven storage types and reserved-value policy combinations, including every eight-bit payload and larger finite/reserved boundaries. Use independent literal policy/representation oracles, all eight Boolean classification requests, default arguments and raw/checked predicates. Check negative infinity in unsigned storage, NaN request precedence, extended integrality of finite values and admitted infinities, NaN rejection, source preservation and hardware independence without initialization.

    SOURCE:

    src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/scalarclassificationspec1.cc.

  • 2. GMP integer and rational special-value classification UID: PPL-SPEC-000847 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source shall be raw mpz_class or mpq_class, or an admitted Checked_Number<T, Policy> with either underlying type. It shall contain a finite valid value, or a PPL special representation admitted by its own policy as in 🔗 2. Typed special-marker assignment to GMP integer and rational storage. Finite rational sources shall be canonical with a positive nonzero denominator as in 🔗 1. Exact rational assignment from rational and integral sources. Raw GMP sources shall have their native transparent source policy and shall admit only its supported representations.

    is_not_a_number(x) shall be true exactly for an admitted NaN; is_minus_infinity(x) and is_plus_infinity(x) shall be true exactly for their admitted signed infinities. infinity_sign(x) shall return  − 1 for negative infinity, 1 for positive infinity and zero for finite values and NaN. A representation reserved only by another policy shall not be interpreted as special under the source's own policy.

    is_integer(x) shall return true for every finite mpz_class value, for a finite canonical mpq_class exactly when its denominator is one, and for each admitted signed infinity. It shall return false for an admitted NaN. It shall recognize the extended integral domain ℤ∪{ − ∞,  + ∞}; ordinary membership in ℤ shall additionally require excluding both infinities.

    For a checked source, classify(nan, inf, sign) shall apply these rules in order:

    • For a NaN, if nan or sign is true, return V_NAN.
    • If inf is true, return V_EQ_MINUS_INFINITY or V_EQ_PLUS_INFINITY for an infinity of the corresponding sign.
    • If sign is true, return V_LT for a negative value, V_GT for a positive value and V_EQ for zero. This shall include an infinity whose infinity classification was not requested.
    • Otherwise return V_LGE, including for NaN when neither NaN nor sign classification was requested.

    Omitted arguments shall request all three classifications. Normal relation codes in this query shall classify the source's sign relative to zero; they shall not describe an arithmetic rounding error. No overflow or unrepresentability flag shall be added. The classes and relations shall have the meanings of 🔗 1. Numerical result classes and relation meanings.

    Sources shall be live and remain unchanged, and access overlapping mutation shall be synchronized. Calls shall require no library initialization, coefficient-constant stage, FPU setup, rounding default or policy handler. They shall invoke no handler and preserve hardware direction.

    A supported PPL special representation shall be inspected through the PPL queries rather than ordinary GMP numerical operations. Available resources shall suffice for the source objects. Unbounded finite magnitudes shall not be classified as infinities. Native floating-point classification shall retain 🔗 1. Native floating-point NaN and infinity predicates and 🔗 2. Selective classification of native floating-point checked values.

    RATIONALE:

    GMP finite values and PPL special representations have separate numerical domains. Selective classification gives clients the requested sign or class without treating an unbounded magnitude as an overflow sentinel. The shared extended-integrality convention separates the accepted infinities from NaN without confusing ordinary integer membership with extended membership.

    INTERFACE:

    Public header: <ppl.hh>; effective query instantiations in Parma_Polyhedra_Library for admitted N:

    bool is_not_a_number(const N& x);
    bool is_minus_infinity(const N& x);
    bool is_plus_infinity(const N& x);
    int infinity_sign(const N& x);
    bool is_integer(const N& x);
    

    For an admitted Checked_Number source, the member interface shall be:

    Result classify(bool nan = true, bool inf = true,
                    bool sign = true) const;
    
    VERIFICATION_CRITERIA:

    For both GMP types, check zero, both finite signs, large magnitudes and admitted NaN/infinities under every policy combination. Include canonical proper fractions and very small nonzero rationals. Check all Boolean classification requests, default arguments, raw/checked predicates, extended integrality and ordinary finiteness distinctions, source representation preservation, no handler calls and hardware independence without initialization.

    SOURCE:

    src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/scalarclassificationspec1.cc.

  • 1. Exact scalar sign and ordering UID: PPL-SPEC-000575 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the eleven standard native integer types, mpz_class, canonical finite mpq_class and their admitted checked wrappers, the named comparison functions shall compare the exact mathematical entry values, including operands of different scalar types. Signedness and storage width shall not replace mathematical ordering: a negative signed integer shall be less than every nonnegative unsigned integer, and unbounded integers and rational fractions shall retain their exact values.

    cmp(x, y) shall return an int with negative, zero or positive sign exactly when x < y, x = y or x > y. Its nonzero magnitude shall not be prescribed. equal, not_equal, less_than, less_or_equal, greater_than and greater_or_equal shall return true exactly for their named mathematical relations. The corresponding six PPL comparison operators shall have the same meanings when at least one operand is a checked scalar. This operator guarantee shall not alter the built-in operators between two raw native integer types.

    sgn(x) shall return exactly -1, 0 or 1 according to the mathematical value's sign. The configured coefficient and raw rational query contracts shall retain 🔗 1. Integral coefficient representation access and sign comparison and 🔗 9. Finite rational sign, comparison and numeric classification. Operands may be the same object. All these queries shall preserve source values, perform no policy result-handler dispatch and require no rounding default. They shall admit every finite representable value allowed by each operand's policy, including ordinary native integer minima and maxima. Checked policies shall provide the backend's relevant classification and representation traits.

    Objects shall be live; rational values shall be canonical with positive denominator. Resources shall suffice for exact comparison and temporaries. Callers shall synchronize queries with overlapping object modification and serialize shared numerical temporaries in non-thread-safe builds. These exact scalar queries shall require no library initialization, coefficient constants or FPU rounding setup, and shall preserve hardware direction.

    RATIONALE:

    Mathematical ordering shall remain exact across signed, unsigned, bounded, unbounded and rational representations, without an intermediate narrowing conversion or policy exception decision.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in PPL for admitted scalar types X and Y:

    int sgn(const X& x);
    int cmp(const X& x, const Y& y);
    bool equal(const X& x, const Y& y);
    bool not_equal(const X& x, const Y& y);
    bool less_than(const X& x, const Y& y);
    bool less_or_equal(const X& x, const Y& y);
    bool greater_than(const X& x, const Y& y);
    bool greater_or_equal(const X& x, const Y& y);
    

    The operators ==, !=, <, <=, > and >= shall be admitted when at least one argument is checked.

    VERIFICATION_CRITERIA:

    Cross every admitted native integer/GMP scalar type pair with independent integer/rational ordering oracles. Include both signedness directions, minima/maxima, values just outside native ranges, huge unbounded values and fractions on both sides of integers. Exercise raw/checked operand combinations, all named predicates and checked comparison operators, same-object relations, sign queries, source preservation and absence of handler calls under all hardware modes and coefficient profiles.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_ext_inlines.hh; src/checked_mpz_inlines.hh; tests/scalarorderingspec1.cc; tests/numericpublic1.cc.

  • 2. Mixed finite floating and exact scalar ordering UID: PPL-SPEC-000576 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For one configured supported native floating operand and one exact scalar from 🔗 1. Exact scalar sign and ordering, including their admitted checked wrappers, cmp and the six named comparison predicates shall compare their exact mathematical entry values. The floating value shall mean its exactly stored binary value; a nearby decimal or integral value shall not be substituted. The PPL comparison operators shall have those same relation meanings when at least one operand is checked.

    A large integer shall not be rounded to the floating operand's precision before deciding equality or order. Likewise, a finite rational shall retain its numerator/denominator value. Opposite signed floating zeros shall both compare as mathematical zero. Argument order shall not change equality or the mathematical relation: reversing arguments shall reverse strict order. These comparisons shall not invoke policy result handlers or use rounding defaults. Both argument objects shall remain unchanged. Floating/floating ordering shall retain 🔗 4. Ordered comparison of finite native floating-point values.

    All operands shall be finite and valid for their selected policies, with canonical positive-denominator rational storage. Exact resources, synchronization and shared-temporary serialization shall follow 🔗 1. Exact scalar sign and ordering. General mixed comparisons shall require upward hardware rounding for their directed conversion filters, and preserve that direction. Native floating conversions and strict result queries shall have the backend/setup prerequisites of 🔗 1. Directed native integral conversion to native floating-point storage and 🔗 4. Directed narrowing between finite native floating-point formats; no coefficient-constant stage shall be required. Available resources shall permit any exact conversion or temporary needed by the comparison.

    RATIONALE:

    A comparison shall preserve distinctions that a floating conversion could round away, while retaining the actual represented floating value rather than an intended decimal approximation.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations in PPL for admitted mixed floating/exact scalar arguments:

    int cmp(const X& x, const Y& y);
    bool equal(const X& x, const Y& y);
    bool not_equal(const X& x, const Y& y);
    bool less_than(const X& x, const Y& y);
    bool less_or_equal(const X& x, const Y& y);
    bool greater_than(const X& x, const Y& y);
    bool greater_or_equal(const X& x, const Y& y);
    

    Either argument order shall be admitted. PPL ==, !=, <, <=, > and >= shall be admitted when at least one argument is checked.

    VERIFICATION_CRITERIA:

    Use independent significand/exponent extraction to convert finite floating corpus values to exact rational oracles. Cross all supported floating formats with each exact scalar type in both operand orders and raw/checked forms. Include signed zero, subnormals, range endpoints, integral precision boundaries, adjacent floating values, and exact fractions on either side of binary values. Check all relation interfaces, source preservation and no handler calls under caller-owned upward hardware rounding, restoring the caller's previous mode afterward.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; src/checked_inlines.hh; src/checked_ext_inlines.hh; src/checked_mpz_inlines.hh; tests/scalarorderingspec1.cc; tests/numericpublic1.cc.

  • 1. Typed special-marker assignment to native integer storage UID: PPL-SPEC-000844 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Minus_Infinity, Plus_Infinity and Not_A_Number shall be typed markers for VC_MINUS_INFINITY, VC_PLUS_INFINITY and VC_NAN. Their static vclass members shall give those classes, and Is_Special shall identify those three unqualified marker types. MINUS_INFINITY, PLUS_INFINITY and NOT_A_NUMBER shall provide corresponding marker objects. Special_Marker<T> shall have the truth value of Is_Special<T>::value; it shall not strip qualifiers or require numeric operations from the marker. Existing trait specializations shall determine its admission.

    For the raw or checked native integer destinations in 🔗 1. Exact same-storage native integer arithmetic, assign_r shall replace the destination according to the marker and the destination policy. If infinities are admitted, negative and positive infinity shall be stored in their reserved representations and return V_EQ_MINUS_INFINITY and V_EQ_PLUS_INFINITY without V_UNREPRESENTABLE. If NaN is admitted, its reserved representation shall be stored and V_NAN returned without V_UNREPRESENTABLE. A NaN shall require no ordered relation.

    If infinities are not admitted, negative infinity with ROUND_UP shall store the lower finite endpoint and return V_LT_INF; positive infinity with ROUND_DOWN shall store the upper finite endpoint and return V_GT_SUP. For the other admitted directions, the result shall be V_EQ_MINUS_INFINITY | V_UNREPRESENTABLE or V_EQ_PLUS_INFINITY | V_UNREPRESENTABLE, respectively, with no payload promise. Unsupported NaN shall return V_NAN | V_UNREPRESENTABLE with no payload promise. The finite interval shall follow 🔗 1. Bounded checked integer limits and reserved endpoints. In signed storage, positive infinity shall use the native maximum, negative infinity the native minimum, and NaN the native minimum plus one when infinities are admitted, or the native minimum otherwise. In unsigned storage, positive infinity shall use the native maximum, negative infinity the native maximum minus one, and NaN the native maximum minus twice the policy's infinity-admission Boolean.

    Infinity markers shall admit ROUND_DOWN, ROUND_UP and ROUND_IGNORE, with or without ROUND_STRICT_RELATION. They shall also admit ROUND_NOT_NEEDED and its strict form when infinities are representable. NaN markers shall admit the first three base directions and their strict forms. A strict flag shall not alter these class, relation or flag outcomes. The supplied marker shall remain unchanged.

    The entry payload shall impose no numerical precondition on replacement. After an unrepresentable result, the destination shall remain live and reusable without inspecting an unspecified payload. Calls shall require no rounding default or result handler and shall not invoke a handler. Live-object, synchronization, initialization and hardware-direction prerequisites shall follow 🔗 1. Exact same-storage native integer arithmetic.

    RATIONALE:

    Typed markers distinguish mathematical special values from finite integer endpoints, including when a policy cannot represent the requested value.

    INTERFACE:

    Public header: <ppl.hh>; the three marker types Special and admitted raw/checked integer type To shall give these effective instantiations in Parma_Polyhedra_Library:

    template <typename T>
    concept Special_Marker = bool(Is_Special<T>::value);
    
    Result assign_r(To& to, const Special& marker, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check marker traits/classes and all eleven native storage types with and without reserved infinities and NaN. Independently check reserved payloads, finite endpoints, exact result codes and representability flags for each admitted request. Replace finite and admitted special entry values, preserve markers and hardware direction, require no handler or initialization, and reset/reuse destinations after unsupported results.

    SOURCE:

    src/Checked_Number_defs.hh; tests/commonhelpersspec1.cc; src/checked_defs.hh; src/checked_int_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/scalarspecialmarkersspec1.cc.

  • 2. Typed special-marker assignment to GMP integer and rational storage UID: PPL-SPEC-000845 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For raw mpz_class or mpq_class destinations, and admitted Checked_Number<T, Policy> destinations with either underlying type, assign_r from the typed markers in 🔗 1. Typed special-marker assignment to native integer storage shall replace the destination according to its policy. If infinities are admitted, negative and positive infinity shall be stored as their PPL special representations and return V_EQ_MINUS_INFINITY and V_EQ_PLUS_INFINITY without V_UNREPRESENTABLE. If NaN is admitted, its PPL representation shall be stored and V_NAN returned without V_UNREPRESENTABLE. These result flags shall truthfully characterize the supported stored representations as specified by 🔗 1. Numerical result classes and relation meanings.

    If infinities are not admitted, either infinity marker shall return its exact infinity class/relation with V_UNREPRESENTABLE and no payload promise. An unbounded finite range shall not provide a finite inward endpoint for infinity. Unsupported NaN shall return a NaN-class diagnostic with no payload promise; absence of V_UNREPRESENTABLE alone shall not claim successful NaN representation. No ordinary finite numerical answer shall be inferred from an unsupported result.

    Infinity markers shall admit ROUND_DOWN, ROUND_UP and ROUND_IGNORE, with or without a strict flag, and additionally ROUND_NOT_NEEDED and its strict form when infinities are representable. NaN markers shall admit the first three base directions and their strict forms, with an empty ordered relation. The marker shall remain unchanged; the entry payload shall impose no numerical precondition on replacement.

    A PPL special representation shall not be passed to ordinary GMP numerical operations. Subsequent finite arithmetic shall satisfy its applicable finite/canonical prerequisites; in particular, a PPL rational special representation shall not be treated as a finite canonical rational. After an unsupported result, the destination shall remain live and reusable without inspecting an unspecified payload. Available resources shall suffice for the objects and their replacement. Object access overlapping mutation shall be synchronized. Calls shall require no library initialization, coefficient-constant stage, FPU setup, rounding default or policy handler, shall invoke no handler and shall preserve hardware direction. Raw destinations shall use their native checked destination policy; native floating-point forms shall retain 🔗 4. Typed special-value assignment to native floating-point storage.

    RATIONALE:

    An unbounded finite range and a supported special representation are separate properties. A representability flag must not contradict the value that a policy can actually store.

    INTERFACE:

    Public header: <ppl.hh>; effective instantiations for the admitted To and marker type Special in Parma_Polyhedra_Library:

    Result assign_r(To& to, const Special& marker, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Exercise both GMP underlying types and policies admitting neither, either or both special classes. Check every admitted direction/strict flag, exact infinity classes, supported NaN classification and truthful representability flags. Check replacement of finite and admitted special values, preserved markers, no handler dispatch, reset/reuse after unsupported results and hardware independence without initialization.

    SOURCE:

    src/checked_mpz_inlines.hh; src/checked_mpq_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/scalarspecialmarkersspec1.cc.

  • PPL-SPEC-001639
    1. Native integral checked-number value move UID: PPL-SPEC-001639 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For an admitted native integral storage type T, move construction of Checked_Number<T, Policy> shall copy the source's stored integer value and preserve the source. It shall be a trivial, nonthrowing constructor and shall invoke neither a conversion operation nor Policy::handle_result. The wrapper shall have a trivial destructor and one native integral data member; it shall be an implicit-lifetime class under C++20. Its size and alignment shall equal those of T. These properties shall not imply that the wrapper is trivially copyable. The copy constructor and copy assignment shall retain their separately specified behavior.

    This constructor shall be available only when Is_Native<T>::value is nonzero and std::is_integral_v<T> is true. GMP and floating-point storage shall retain the existing copy-from-rvalue behavior. The source shall be a live initialized object with an admitted stored representation; no library initialization, rounding setup, allocation or policy callback shall be required.

    RATIONALE:

    A trivial eligible constructor and trivial destructor admit implicit lifetime creation for the native-integer wrapper while preserving policy-aware copies for other storage types.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    // Member of Checked_Number<T, Policy>:
    Checked_Number(Checked_Number&&)
      requires (Is_Native<T>::value != 0 && std::is_integral_v<T>) = default;
    
    VERIFICATION_CRITERIA:

    Check trivial/nothrow move, trivial destruction, nontrivial copy, layout and size/alignment traits for every admitted native integral type; exercise zero, one and both range extrema with source preservation and a counting policy. Check independent GMP copies from rvalues and exclusion of floating storage. Inspect the C++20 lifetime argument separately from execution tests.

    SOURCE:

    src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/checkedmovespec1.cc; tests/scalaradapterspreinit1.cc.

  • PPL-SPEC-001640
    2. Consuming coefficient relocation UID: PPL-SPEC-001640 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For the configured coefficient type, relocate_coefficient(to,from) shall transfer the entry source value to a distinct destination slot. relocate_coefficients(to,from,count) shall transfer the ordered sequence of count source values between disjoint ranges. relocate_coefficients_right(from,count,shift) shall transfer that sequence to the range beginning shift slots later in the same allocation; overlapping, touching and disjoint ranges, zero count and zero shift shall be admitted. Overlap shall preserve the entry sequence, as if its values were first retained before writing the destination.

    Source slots shall contain live initialized coefficients. Destination-only slots shall be suitably aligned uninitialized or previously consumed storage. All pointers shall designate valid storage even when count is zero; the source and destination extents and byte-size products shall be representable and fit their allocations. After relocation the destination range shall hold live coefficients with the entry source values and ownership. Source-only slots shall be consumed: their old values shall neither be accessed nor destroyed; they may be reconstructed or their storage released without coefficient destruction. Overlap slots belonging to the destination shall remain live. No coefficient-owned resource shall be duplicated or lost.

    The helpers shall be nonthrowing, allocate no storage and invoke no numerical conversion, policy handler or rounding control. They shall require no library initialization. Native integral coefficient relocation shall preserve each integer representation using the implicit-lifetime wrapper property of 🔗 1. Native integral checked-number value move.

    RATIONALE:

    Dense and sparse storage need consuming ownership transfer into raw slots, including overlapping right shifts, without numerical conversion or extra allocations.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    void relocate_coefficient(Coefficient*, Coefficient*) noexcept;
    void relocate_coefficients(Coefficient*, Coefficient*, std::size_t) noexcept;
    void relocate_coefficients_right(Coefficient*, std::size_t,
                                     std::size_t) noexcept;
    
    VERIFICATION_CRITERIA:

    Exercise single transfers, empty/disjoint ranges, every overlap pattern, touching ranges, zero shift, consumed-slot reconstruction and resource-owning values. Destroy only live outputs and use sanitizers for resource misuse. Inspect lifetime creation and integer-subobject representation preservation; test matching checked/native bounded configurations as well as GMP configurations.

    SOURCE:

    src/Coefficient_relocation.hh; src/Coefficient_defs.hh; tests/coefficientrelocationspec1.cc.

  • PPL-SPEC-001641
    3. Weakly relational extended-number policies UID: PPL-SPEC-001641 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Both WRD_Extended_Number_Policy and Debug_WRD_Extended_Number_Policy shall enable overflow checks, NaN and infinity representations, and requested FPU inexact checks. The production policy shall disable checks for opposite-infinity addition, same-infinity subtraction, infinity-times-zero, division by zero, infinity division, infinite remainder, negative square root and extra FPU NaN-result detection. The debugging policy shall enable all those checks.

    Neither policy shall define convertible or any of the five ROUND_DEFAULT_* members. Operations needing them shall require an explicitly suitable policy instead of silently selecting a default. handle_result(r) shall forward exactly results whose class is VC_NAN to throw_result_exception(r) and propagate the resulting exception. Every normal or infinity result shall be accepted without an exception, including normal-class results carrying overflow or unrepresentable flags. The policies shall require no library initialization or rounding-mode change. Arithmetic using these policies shall retain its own numerical prerequisites; disabled checks shall not authorize undefined mathematical operations.

    RATIONALE:

    Weakly relational algorithms explicitly control rounding and use infinity bounds; policy capabilities and debugging diagnostics must not be mistaken for implicit defaults.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    struct WRD_Extended_Number_Policy;
    struct Debug_WRD_Extended_Number_Policy;
    // Member of each policy:
    static void handle_result(Result);
    
    VERIFICATION_CRITERIA:

    Check every policy constant, absence of conversion/default-rounding members and every defined result category, including overflow/unrepresentable flags. Compare forwarded NaN exception types with throw_result_exception and require acceptance of normal/infinity categories.

    SOURCE:

    src/WRD_coefficient_types_defs.hh; src/WRD_coefficient_types_inlines.hh; tests/scalaradaptersspec1.cc.

  • PPL-SPEC-001642
    4. Interval and scalar view adapters UID: PPL-SPEC-001642 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    For a live initialized interval, f_is_empty, f_is_singleton and infinity_sign shall return the corresponding member query. In Interval_NS, f_lower, f_upper and f_info shall return const references to the interval's owned boundaries and metadata, preserving reference identity and the access conditions of 🔗 2. Interval endpoint and metadata references.

    For an admitted singleton scalar x, the two boundary adapters shall return const references to x itself. Its metadata adapter shall return a shared immutable null-information object admitting empty values and infinity, with inexact checking disabled. The overload with bool open shall return independent null-information metadata whose two boundaries have that openness. The scalar empty predicate shall return exactly is_not_a_number(x); its singleton predicate shall negate that result.

    is_singleton_integer(x) shall return true exactly when the interval or scalar is a singleton and its lower value is integral. It shall not read a lower payload after a false singleton result. check_empty_arg(x) shall return the empty predicate when the metadata admits emptiness; otherwise the caller shall supply a nonempty argument and the helper shall return false. These adapters shall preserve their arguments and add no allocation, initialization or rounding prerequisites to the selected scalar/member query.

    RATIONALE:

    Generic interval algorithms need borrowed views of actual intervals and singleton scalars without copying endpoints or reading inactive empty payloads.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    template <typename B, typename I> bool f_is_empty(const Interval<B,I>&);
    template <typename B, typename I> bool f_is_singleton(const Interval<B,I>&);
    template <typename B, typename I> int infinity_sign(const Interval<B,I>&);
    namespace Interval_NS {
      // Overloads for intervals and admitted singleton scalars:
      template <typename T> const auto& f_lower(const T&);
      template <typename T> const auto& f_upper(const T&);
      template <typename T> const auto& f_info(const T&);
      template <typename T> Scalar_As_Interval_Info_Open f_info(const T&, bool);
    }
    template <typename T> bool is_singleton_integer(const T&);
    template <typename T> bool check_empty_arg(const T&);
    
    VERIFICATION_CRITERIA:

    Check reference identity, shared/independent metadata, both openness states, empty/singleton/nonsingleton intervals, integral/fractional scalars, NaN and admitted infinities. Exercise the nonempty-only metadata branch and short-circuiting over empty intervals.

    SOURCE:

    src/Interval_inlines.hh; src/Interval_defs.hh; tests/scalaradaptersspec1.cc.

  • PPL-SPEC-001643
    5. Borrowed or converted distance operands UID: PPL-SPEC-001643 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    maybe_assign(top,tmp,from,dir) shall select its behavior from the exact source and destination C++ types. If they are identical, it shall set top to the address of from, leave tmp unchanged and return V_EQ; it shall perform no numerical conversion or allocation. Otherwise it shall set top to the address of tmp, perform assign_r(tmp,from,dir) and return that operation's result. Its dispatch structs shall have the same behavior.

    The operands shall remain live; temporary storage shall be initialized as required by the selected assignment. For differing types, the assignment's admitted values, rounding direction, aliasing, initialization, resource and exception conditions shall apply. If assignment throws, top shall already designate tmp and the assignment's destination guarantee shall apply. Borrowing shall not extend the source lifetime. A returned pointer shall not be used after its referent is destroyed or invalidated.

    RATIONALE:

    Distance kernels can avoid a conversion and scratch write when the input already has the required exact type, while exposing conversion outcomes otherwise.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    template <typename To, typename From>
    Result maybe_assign(const To*&, To&, const From&, Rounding_Dir);
    template <typename To, typename From> struct maybe_assign_struct;
    // Static member of each general/same-type dispatch struct:
    static Result function(const To*&, To&, const From&, Rounding_Dir);
    
    VERIFICATION_CRITERIA:

    Check address identity, untouched same-type scratch, value/result equivalence to explicit assignment for exact and directed inexact conversions, and selected assignment exceptions with top already changed. Exercise both the public helper and dispatch specializations.

    SOURCE:

    src/distances_inlines.hh; tests/scalaradaptersspec1.cc.

  • PPL-SPEC-001644
    6. Common dimension validation and domain limit UID: PPL-SPEC-001644 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    check_space_dimension_overflow(dim,max,domain,method,reason) shall return dim unchanged when dim ≤ max. Otherwise it shall throw std::length_error with a message formed from domain, method, ":", a newline, reason and "." in that order. The string arguments shall point to live null-terminated character sequences. The accepted path shall allocate no storage; message construction failures shall propagate. It shall require no library initialization.

    The free max_space_dimension() shall return the minimum of the limits for Variable, both polyhedron topologies, Grid, Rational_Box, Box<Integer_Interval> and the BD/octagonal shapes instantiated with each of int8_t, int16_t, int32_t, int64_t, float, double, long double, mpz_class and mpq_class. Repeated calls shall return the same limit. A custom box interval type shall retain its own limit; the common value shall not promise successful allocation or a limit for every user-defined domain. First-use cache access shall follow the configured thread-local/global storage model and be synchronized accordingly.

    RATIONALE:

    Dimension rejection must precede impossible storage requests, and the common domain limit must account for every listed built-in representation.

    INTERFACE:

    Names belong to Parma_Polyhedra_Library unless qualified otherwise. Template excerpts omit SFINAE return-type restrictions described in the text.

    dimension_type check_space_dimension_overflow(dimension_type, dimension_type,
                                                   const char*, const char*,
                                                   const char*);
    dimension_type max_space_dimension();
    
    VERIFICATION_CRITERIA:

    Check zero, equality, immediately excessive and greatest representable dimensions with exact diagnostic text, then independently take the minimum of all listed static domain limits and repeat the free query. Check callability before PPL initialization separately from shared-cache synchronization.

    SOURCE:

    src/globals.cc; src/globals_defs.hh; src/max_space_dimension.hh; tests/scalaradaptersspec1.cc; tests/scalaradapterspreinit1.cc.

  • PPL-SPEC-000913
    1. Finite same-type minimum and maximum assignment UID: PPL-SPEC-000913 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For two live same-type finite ordered numerical values x and y, min_assign(x, y) shall assign the lesser mathematical value and max_assign(x, y) the greater. The admitted types shall be the standard native integer types, native floating types, mpz_class, canonical mpq_class and supported Checked_Number<T, Policy> forms. A strictly selected source shall be copied with independent owned storage. If the two entry values are equal, the destination's entry representation shall remain unchanged, including a native floating zero's sign.

    Both functions shall return void. The source may be the destination; every comparison shall use entry values, and a distinct source shall remain unchanged. Checked calls shall require no rounding defaults, implicit conversion capability or result handler, and shall make no result-policy callback. Same-type checked assignment shall retain 🔗 1. Finite checked scalar storage and copying. Mathematical ordering shall retain 🔗 1. Exact scalar sign and ordering and 🔗 2. Mixed finite floating and exact scalar ordering.

    Native floating values shall exclude infinities and NaNs. Raw native comparison/assignment shall remain available independently of configured PPL rounded floating kernels; checked floating forms shall require the corresponding configured scalar support. Rational operands shall be finite and canonical. Live objects, synchronized overlapping mutation and sufficient copy-allocation resources shall be required. No library initialization, coefficient-constant stage, FPU direction or policy default shall be required. Hardware direction shall remain unchanged.

    RATIONALE:

    Mathematical selection does not require numerical rounding or result-policy dispatch. Retaining the receiver on a tie preserves representation details such as signed zero.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library:

    template <typename N>
    void min_assign(N& x, const N& y);
    
    template <typename N>
    void max_assign(N& x, const N& y);
    
    VERIFICATION_CRITERIA:

    Check less/equal/greater operands, self-aliases, either source order, native endpoints and large GMP values with independent literal comparisons. Require void return, preserved distinct source, independent selected copies and unchanged tie representation including both zero signs. Use checked policies without handlers/defaults, all standard hardware modes and a raw floating no- rounded-kernel configuration.

    SOURCE:

    src/math_utilities_defs.hh; src/math_utilities_inlines.hh; tests/scalarutilitiesspec1.cc.

  • PPL-SPEC-000914
    2. Finite parity and additive-inverse predicates UID: PPL-SPEC-000914 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For finite admitted scalar values, is_even(x) shall return true exactly when the mathematical value of x belongs to 2ℤ. A nonintegral rational or native floating value shall therefore return false. is_additive_inverse(x, y) shall return true exactly when x + y = 0 as a mathematical equality, without evaluating an overflowing native sum or requiring a representable stored negation. Both signs of native floating zero shall denote mathematical zero for these predicates.

    The admitted same-type forms shall be raw standard native integers, mpz_class, finite canonical mpq_class, configured supported native floating formats and their supported Checked_Number<T, Policy> forms. Policy-reserved special payloads shall not be finite operands. Every finite endpoint shall be admitted, including a bounded minimum whose mathematical negative is outside the storage range. Checked predicates shall require no rounding default, result handler or implicit conversion capability and shall invoke no policy handler. Each result shall have type bool.

    Sources may be the same object and shall remain unchanged. Rational scratch storage and synchronization shall follow 🔗 6. Exact rational operations with powers of two; other live-object, finite/canonical and resource prerequisites shall follow the corresponding scalar family. Floating parity shall satisfy the native nonnegative dyadic residue backend/hardware prerequisites in 🔗 4. Rounded nonnegative native residue modulo a power of two. Additive-inverse comparison shall use exact negation and ordering meanings. No coefficient-constant initialization shall be required. Neither predicate shall change hardware direction.

    RATIONALE:

    Parity and inverse relations are predicates on represented mathematical values; unrepresentable auxiliary arithmetic must not turn a valid finite query into overflow or a false equality.

    INTERFACE:

    Public header: <ppl.hh>; function templates in Parma_Polyhedra_Library for admitted T:

    template <Native_Or_Checked_Number T>
    bool
    is_even(const T& x);
    
    template <Native_Or_Checked_Number T>
    bool
    is_additive_inverse(const T& x, const T& y);
    
    VERIFICATION_CRITERIA:

    Use independent unbounded-integer/rational parity and zero-sum oracles, signed and unsigned endpoints, all eight-bit values, equal/distinct objects, fractional native/rational inputs, large GMP values and signed zero. Check exact Boolean results, source representation preservation and no handler/default dependency. Cover overflow-checking and unchecked policies under admitted hardware/resource conditions.

    SOURCE:

    src/math_utilities_defs.hh; src/math_utilities_inlines.hh; tests/scalarutilitiesspec1.cc.

  • PPL-SPEC-000915
    3. Native low-bit mask construction UID: PPL-SPEC-000915 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For an admitted native integral type T with specialized binary std::numeric_limits<T>, let d be its number of value bits, std::numeric_limits<T>::digits. For an unsigned int exponent 0 ≤ n < d, low_bits_mask<T>(n) shall return a T whose mathematical value is 2n − 1. In particular, zero shall produce zero, and exactly the lowest n value bits shall be set.

    The admitted types shall include all eleven standard native integer types. Where INT128_AVAILABLE holds, the same template instantiations shall admit the compiler's signed and unsigned native 128-bit types. That capability shall not imply a general PPL public 128-bit scalar arithmetic instantiation. No signed representation bit outside the nonnegative representable range shall be set. The result type shall be exactly T.

    The call shall require no source object, policy, initialization stage, allocation, FPU setup or mutable numerical state. Hardware direction shall remain unchanged. Requests outside n < d shall not be admitted.

    RATIONALE:

    An explicit value-bit bound keeps mask construction within both the native shift domain and the nonnegative range of signed types.

    INTERFACE:

    Public header: <ppl.hh>; function template in Parma_Polyhedra_Library:

    template <typename T>
    T low_bits_mask(unsigned n);
    
    VERIFICATION_CRITERIA:

    For every admitted exponent in each standard signed/unsigned type, compare set bits and value against an independent unbounded integer built by repeated doubling and subtraction. Check zero, the largest admitted exponent, actual char signedness, exact return types and optional signed/unsigned128 capability without assuming its presence. Require unchanged hardware direction.

    SOURCE:

    src/math_utilities_defs.hh; src/math_utilities_inlines.hh; tests/scalarutilitiesspec1.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-000501
    1. Directed and delegated square root of a finite native value UID: PPL-SPEC-000501 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination shall be configured native F or Checked_Number<F, Check_Overflow_Policy<F>> types with the same floating-point format, as in 🔗 4. Rounding, result classes and state for finite native binary arithmetic. The source shall be finite and nonnegative, including either signed zero, with represented value a. sqrt_assign_r shall compute the nonnegative real √(a).

    ROUND_DOWN shall assign its greatest representable lower bound and ROUND_UP its least representable upper bound. ROUND_IGNORE shall use the current hardware direction, including nearest-even midpoint selection. Exactly representable roots shall preserve their values. A zero root shall retain the source zero's sign. Every computed result for this source domain shall be finite and have class VC_NORMAL, without V_UNREPRESENTABLE.

    Weak, strict, delegated and no-rounding-needed result relations shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic, with exactness relative to √(a). A no-rounding-needed request shall require that root to be exactly representable. Directed, strict and no-rounding-needed requests shall require upward hardware rounding; unflagged delegated requests shall admit every current hardware direction. Calls shall preserve the current direction. Source/destination aliases, source preservation, object validity, synchronization, native backend setup, initialization independence and floating-point exception conditions shall follow 🔗 4. Rounding, result classes and state for finite native binary arithmetic.

    RATIONALE:

    A square-root bound can be checked exactly by squaring its nonnegative endpoints. Finite nonnegative native inputs need no artificial coefficient- range restriction.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation for admitted same-format To and From types:

    Result sqrt_assign_r(To& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare squared result and adjacent-native-value bounds with exact rational source values for zero, perfect squares, nonsquares, precision boundaries, subnormals, normal minima and finite maxima. Check all admitted raw/checked forms, directed/delegated/strict statuses, nearest selection, valid exactness requests, signed zeros, self/raw aliases and hardware-state preservation.

    SOURCE:

    src/checked_float_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/squarerootspec1.cc.

  • 2. Finite rational square root at the selected irrational precision UID: PPL-SPEC-000502 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPQ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination shall be mpq_class. The source shall be finite, canonical and nonnegative, with value a; canonical form shall follow 🔗 1. Exact rational assignment from rational and integral sources. Let p be the current precision in 🔗 3. Selection and ownership of irrational rational precision and S = 2p. Zero shall produce canonical zero and V_EQ for every supported direction/strict flag.

    For a > 1, the downward result shall be ⌊S√(a)⌋ ⁄ S and the upward result ⌈S√(a)⌉ ⁄ S. For 0 < a ≤ 1, the downward result shall be S ⁄ ⌈S ⁄ √(a)⌉ and the upward result S ⁄ ⌊S ⁄ √(a)⌋. Results shall be canonical, nonnegative rationals with the lesser of numerator and denominator no greater than S. Without the strict flag the downward relation shall be V_GE and the upward relation V_LE. With the flag, exactness shall give V_EQ, a strict lower bound V_GT and a strict upper bound V_LT.

    ROUND_IGNORE shall produce one of these two precision-grid bounds and return a relation containing the actual comparison of √(a) with the result. With a strict flag it shall determine V_EQ, V_GT or V_LT. ROUND_NOT_NEEDED shall require an exact root on the selected grid: S√(a) shall be an integer for a > 1, or S ⁄ √(a) an integer for 0 < a ≤ 1. It shall return that exact root, with V_EQ in an assertion-enabled build and permitted lazy V_LGE in a build defining NDEBUG; a strict exactness request shall return V_EQ.

    Source and destination may be the same object. Source numerator/denominator references borrowed by the caller shall not be used across a modifying call. A source with distinct storage shall remain unchanged. The destination shall be live and assignable. Resource availability shall limit unbounded intermediates. No FPU direction, library/thread initialization object or coefficient-constant stage shall be required. Hardware direction shall remain unchanged. The precision shall remain stable throughout the call. Non-thread-safe configurations shall serialize shared precision and lazy temporary-pool use; thread-safe configurations shall use the calling thread's precision and pools. Object access shall be synchronized against concurrent mutation. The _r interface shall return its result without policy-handler dispatch.

    RATIONALE:

    A selected rational precision defines a finite grid for square-root approximation while preserving sound directed bounds both above and below one. The result relation must describe the final root approximation rather than an intermediate integer division.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiation:

    Result sqrt_assign_r(mpq_class& to, const mpq_class& from,
                         Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent integer/rational squared comparisons and grid-index searches for zero, one, perfect/nonperfect rational squares and values above/below one, at precision0 and increasing finite precisions. Check canonical bounds, numerator/denominator limits, weak/strict/delegated relations, valid selected- grid exactness requests, source/self-alias preservation, precision stability and FPU independence in every coefficient profile.

    SOURCE:

    src/checked_mpq_inlines.hh; src/checked_mpz_inlines.hh; src/checked.cc; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/squarerootspec1.cc.

  • 3. Selection and ownership of irrational rational precision UID: PPL-SPEC-000503 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    irrational_precision() shall return the current unsigned precision parameter. set_irrational_precision(p) shall accept every value from zero through INT_MAX and make subsequent reads return p. For a value greater than INT_MAX, it shall throw std::invalid_argument and leave the previous precision unchanged.

    The selected value shall be the square-root precision in 🔗 2. Finite rational square root at the selected irrational precision. In a thread-safe configuration, each thread shall own its parameter independently; in a non-thread-safe configuration, callers shall serialize reads, writes and calculations using the shared parameter. Clients shall keep the parameter stable throughout each dependent numerical call. Initialized thread lifetimes shall establish the default described in 🔗 3. Thread initialization, default state and finalization. These accessors themselves shall require no library or thread initialization owner, coefficient-constant stage or FPU setup, and shall preserve hardware rounding direction.

    RATIONALE:

    Precision is an explicit numerical parameter, with a defined range and ownership rule. Changing it must neither silently truncate the requested value nor disturb unrelated native rounding state.

    INTERFACE:

    Public header: <ppl.hh>; PPL interfaces:

    unsigned irrational_precision();
    void set_irrational_precision(unsigned p);
    
    VERIFICATION_CRITERIA:

    Check zero, ordinary values and INT_MAX, then reject larger unsigned values with exactly std::invalid_argument and unchanged stored precision. Restore the caller parameter after testing. In thread-safe configurations, verify isolated values in independent workers without explicit initialization owners; serialize all non-thread-safe tests. Preserve hardware direction and exercise no-FPU configurations.

    SOURCE:

    src/checked_mpq_inlines.hh; src/checked.cc; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/squarerootspec1.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-001577
    1. Text-wrapping separators, widths and indentation UID: PPL-SPEC-001577 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    wrap_string shall format the source byte prefix preceding its first NUL, leaving the source unchanged. That prefix length shall be less than std::numeric_limits<unsigned>::max() so its byte indices and the separator sentinel remain distinct. Preferred widths shall count source bytes, excluding inserted indentation, and shall guide separator selection rather than impose a maximum word length. The first output line shall use the first preferred width; subsequent lines shall use the continuation width.

    For each remaining prefix, a NUL or newline at or before the preferred boundary shall terminate the line. Otherwise, the last comma strictly before the boundary shall take priority and remain on the preceding line; absent such a comma, the last start of a whitespace run at or before the boundary shall be the split. Without either separator, the word shall extend to NUL, whitespace, or a comma, retaining that comma. Whitespace classification shall use the unsigned byte in the current C character locale; newline shall retain its explicit line-separator role.

    The selected prefix shall be copied unchanged. At a split, one whitespace separator and any immediately following ordinary spaces shall be discarded. A nonempty continuation prefix shall receive exactly indent_depth ordinary spaces. Output lines shall be joined by newlines only while more source bytes remain; a final consumed newline shall add no trailing newline. Zero widths, empty lines and unbroken words shall be admitted. Exceptions from constructing the result shall propagate without modifying the input.

    RATIONALE:

    Byte-oriented diagnostic wrapping needs stable separator rules, including the distinction between preferred widths and forced word breaks.

    INTERFACE:

    Defining header: wrap_string.hh. Namespace: Parma_Polyhedra_Library::IO_Operators.

    std::string wrap_string(const std::string&, unsigned indent_depth,
                           unsigned preferred_first_line_length,
                           unsigned preferred_line_length);
    
    VERIFICATION_CRITERIA:

    Check literal expected strings for each separator priority and boundary, independent first/continuation widths, zero/maximum widths, embedded NUL, explicit newlines, space runs, preserved prefix whitespace, unbroken words and high bytes under a saved/restored C locale. Exercise the helper independently of any numerical domain.

    SOURCE:

    src/wrap_string.hh; src/wrap_string.cc; tests/wrapstringspec1.cc.

  • 1. Exact named arithmetic on unbounded integer storage UID: PPL-SPEC-000511 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source and destination objects shall be live mpz_class values, independently of the configured Coefficient alias. add_assign_r, sub_assign_r and mul_assign_r shall assign the exact sum, difference and product of the source integers. neg_assign_r and abs_assign_r shall assign exact negation and absolute value. floor_assign_r, ceil_assign_r and trunc_assign_r shall preserve an integer source's value. Every operation shall return V_EQ for each valid rounding direction, with or without ROUND_STRICT_RELATION.

    The output may alias any source, and read-only sources may alias each other. Distinct sources shall remain unchanged. Calls shall require available resources for unbounded arithmetic and access synchronized against mutation. The stored integers and intermediates shall have no configured fixed-width coefficient limit. No library/thread initialization owner, coefficient-constant stage, floating-point backend setup, hardware direction, inexact flag or irrational-precision setting shall be required. Arithmetic/resource failure shall not be a successful result; no universal output rollback shall be promised after a reported failure.

    RATIONALE:

    Named numerical operations must retain unbounded integer semantics even when the globally configured coefficient type has a bounded range.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result add_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    Result sub_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    Result mul_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    Result neg_assign_r(mpz_class& to, const mpz_class& from, Rounding_Dir dir);
    Result abs_assign_r(mpz_class& to, const mpz_class& from, Rounding_Dir dir);
    Result floor_assign_r(mpz_class& to, const mpz_class& from, Rounding_Dir dir);
    Result ceil_assign_r(mpz_class& to, const mpz_class& from, Rounding_Dir dir);
    Result trunc_assign_r(mpz_class& to, const mpz_class& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check literal small and very large signed integer arithmetic oracles, zero and cancellation, all eight requests, every permitted alias and unchanged distinct sources in all coefficient configurations.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • PPL-SPEC-000512
    2. Exact unbounded integer product accumulation UID: PPL-SPEC-000512 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live mpz_class objects and resources as in 🔗 1. Exact named arithmetic on unbounded integer storage, add_mul_assign_r shall replace the entry value z by z + ab and sub_mul_assign_r shall replace it by z − ab, where a and b are the entry source values. Both operations shall return V_EQ for every valid rounding request. Sources may alias each other or the accumulator, including all three arguments sharing one object. Every occurrence in the formula shall use its entry value. Distinct source objects shall remain unchanged. Resource, synchronization, range and initialization conditions shall follow 🔗 1. Exact named arithmetic on unbounded integer storage.

    RATIONALE:

    An accumulator alias changes which entry values must be retained; the fused assignment remains exact regardless of coefficient configuration.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result add_mul_assign_r(mpz_class& to, const mpz_class& x,
                            const mpz_class& y, Rounding_Dir dir);
    Result sub_mul_assign_r(mpz_class& to, const mpz_class& x,
                            const mpz_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use independent literal results for all sign combinations, zero factors, very large products, separate operands and each accumulator/source alias, including all-three aliasing. Check all eight result requests and unchanged distinct sources.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • 3. Directed unbounded integer division and explicit delegated convention UID: PPL-SPEC-000513 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the mpz_class objects and prerequisites in 🔗 1. Exact named arithmetic on unbounded integer storage, the divisor b shall be nonzero. Let q = a ⁄ b denote the exact rational quotient. div_assign_r with ROUND_DOWN shall assign ⌊q⌋ and return V_GE; with ROUND_UP it shall assign ⌈q⌉ and return V_LE. With ROUND_STRICT_RELATION, a directed request shall instead return V_EQ when q is integral, otherwise V_GT for downward rounding or V_LT for upward rounding.

    ROUND_IGNORE shall use the ceiling convention and return a relation containing q ≤ to. A strict delegated request shall identify equality or strict inequality. ROUND_NOT_NEEDED shall require b to divide a exactly, assign the exact integer quotient and return a relation admitting equality; with ROUND_STRICT_RELATION it shall return V_EQ. The exactness decision shall use entry operands even when the output aliases either source. Other alias, preservation, resource, initialization and hardware independence conditions shall follow 🔗 1. Exact named arithmetic on unbounded integer storage.

    RATIONALE:

    Integer storage requires an explicit floor, ceiling or delegated convention for a nonintegral quotient. Entry-operand exactness prevents an aliased write from changing the reported relation.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result div_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use an independent integer long-division oracle for all source signs, exact and inexact division, zero dividends and large magnitudes. Check all valid admitted requests, relation strictness, source/destination aliases, shared operands, reconstruction inequalities and source preservation.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • 4. Exact truncated unbounded integer quotient and remainder UID: PPL-SPEC-000514 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the mpz_class objects and prerequisites in 🔗 1. Exact named arithmetic on unbounded integer storage, with nonzero divisor b, idiv_assign_r shall assign n = trunc(a ⁄ b) toward zero and rem_assign_r shall assign r = a − nb exactly. They shall satisfy |r| < |b|; a nonzero r shall have the dividend's sign. All valid rounding requests, including strict and exactness requests, shall return V_EQ and shall not change these conventions. No divisibility precondition shall be imposed by ROUND_NOT_NEEDED because the specified truncated quotient and remainder are themselves exact integers.

    Each output may alias either source, the sources may alias each other, and all entry values shall retain their formula meaning. Distinct source objects shall remain unchanged. Resource, range, synchronization and initialization independence shall follow 🔗 1. Exact named arithmetic on unbounded integer storage.

    RATIONALE:

    Truncated quotient and remainder differ from directed rational division and together provide an exact dividend reconstruction for negative as well as positive operands.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result idiv_assign_r(mpz_class& to, const mpz_class& x,
                         const mpz_class& y, Rounding_Dir dir);
    Result rem_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Independently derive quotient and remainder by integer long division. Check all sign combinations, zero, unit divisors, exact and inexact division and very large operands, reconstruction, strict magnitude and sign rules, all eight requests and aliases.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • 5. Unbounded integer arithmetic with powers of two UID: PPL-SPEC-000515 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For mpz_class objects and prerequisites in 🔗 1. Exact named arithmetic on unbounded integer storage, let e be an unsigned exponent and m = 2e. Resources shall suffice for the requested power and output; there shall be no native shift-width precondition on e. add_2exp_assign_r, sub_2exp_assign_r and mul_2exp_assign_r shall assign exactly a + m, a − m and am, respectively, and return V_EQ for every valid rounding request.

    div_2exp_assign_r shall round a ⁄ m downward or upward with the same directed value and relation rules as 🔗 3. Directed unbounded integer division and explicit delegated convention. ROUND_IGNORE shall truncate toward zero and return a relation admitting the actual comparison; a strict delegated request shall distinguish equality and strict inequality. ROUND_NOT_NEEDED shall require m to divide a, assign the exact quotient and return a relation admitting equality; a strict exactness request shall return V_EQ. This delegated truncation convention shall apply to power-of-two division independently of the ceiling convention for general div_assign_r.

    Source/destination aliases, source preservation and other prerequisites shall follow 🔗 1. Exact named arithmetic on unbounded integer storage. Shared scratch-integer pools used to form an additive power shall be serialized in a build without thread-safe support; thread-safe configurations shall use calling-thread pools. No FPU setup, initialized library owner or coefficient-constant stage shall be needed.

    RATIONALE:

    Unbounded integer shifts must not inherit a native coefficient width limit, while division still needs an explicit rounding convention and exactness precondition.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result add_2exp_assign_r(mpz_class& to, const mpz_class& from,
                             unsigned exp, Rounding_Dir dir);
    Result sub_2exp_assign_r(mpz_class& to, const mpz_class& from,
                             unsigned exp, Rounding_Dir dir);
    Result mul_2exp_assign_r(mpz_class& to, const mpz_class& from,
                             unsigned exp, Rounding_Dir dir);
    Result div_2exp_assign_r(mpz_class& to, const mpz_class& from,
                             unsigned exp, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Exercise exponent zero, native-width boundaries and exponents above every bounded coefficient width with literal or independently derived integer powers. Check all signs, exact/inexact division, strict and delegated outcomes, aliases, source preservation and exactness requests when divisible.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • PPL-SPEC-000516
    6. Exact centered and nonnegative unbounded integer residues UID: PPL-SPEC-000516 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For mpz_class objects, exponent e and modulus m = 2e as in 🔗 5. Unbounded integer arithmetic with powers of two, umod_2exp_assign_r shall assign the unique integer residue u ∈ [0, m) congruent to the source a modulo m. For e > 0, smod_2exp_assign_r shall assign the unique congruent integer s ∈ [ − m ⁄ 2, m ⁄ 2). For e = 0, both operations shall assign zero. At a positive half-modulus tie, the centered operation shall select the negative half-modulus.

    Both operations shall be exact and return V_EQ for every valid rounding request, including strict and exactness requests, without a divisibility precondition. Output/source aliases shall be permitted and distinct sources shall remain unchanged. Range, resources, synchronization, initialization and hardware independence shall follow 🔗 1. Exact named arithmetic on unbounded integer storage. The exponent shall not be limited by a native shift width or the configured coefficient range.

    RATIONALE:

    Exact modular reduction needs explicit interval and half-modulus tie conventions, including the degenerate modulus one.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result smod_2exp_assign_r(mpz_class& to, const mpz_class& from,
                              unsigned exp, Rounding_Dir dir);
    Result umod_2exp_assign_r(mpz_class& to, const mpz_class& from,
                              unsigned exp, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check positive and negative inputs, zero, exact multiples, both half-modulus boundaries and their neighbors, exponent zero and very large powers. Derive independent quotient/remainder witnesses, prove congruence and interval bounds, and test all eight requests and aliases.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerarithmeticspec1.cc.

  • 1. Exact native integral and unbounded integer assignment to mpz storage UID: PPL-SPEC-000261 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    assign_r shall admit every native integral source type and Checked_Number<T, Check_Overflow_Policy<T>> source type in 🔗 1. Exact conversion between native and checked integral scalars, as well as a finite mpz_class source. The destination shall be mpz_class independently of the configured Coefficient alias. For each admitted source integer it shall assign the exact value and return V_EQ under all four base directions in 🔗 4. Rounding-direction intent, composition and inspection, with or without the strict-relation flag. This shall include all native signed and unsigned endpoints. An mpz_class source may be the destination itself, preserving its entry integer value.

    The destination shall be live and assignable. A distinct source shall remain unchanged, and later destination mutation shall not affect a distinct source. Callers shall prevent concurrent access to an object while another operation modifies it. No library initialization object, thread initialization or coefficient-constant stage shall be required. This operation shall impose no fixed-width integer range bound; available resources shall limit storage. It shall return the conversion Result without policy-handler dispatch.

    RATIONALE:

    An unbounded integer destination remains available even when the global coefficient alias is bounded. Embedding native endpoints must not pass through a narrower coefficient value.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source types:

    Result assign_r(mpz_class& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check all eleven native types and their checked wrappers at zero, both signs and full signed/unsigned endpoints. Check multi-limb mpz assignment, self-aliasing, independent copying and every direction/strict flag with exact status. Run in every global coefficient profile without initialization stages.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc; tests/numericpublic1.cc.

  • 2. Directed canonical rational conversion to an unbounded integer UID: PPL-SPEC-000262 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite canonical mpq_class source with value a, assign_r into mpz_class with base direction ROUND_DOWN shall assign ⌊a⌋; base ROUND_UP shall assign ⌈a⌉. Rational canonical form shall follow 🔗 1. Exact rational assignment from rational and integral sources. The destination shall not designate the source rational's numerator or denominator object or overlap their storage. There shall be no fixed-width integer range bound.

    Without ROUND_STRICT_RELATION, the downward request shall return V_GE and the upward request V_LE. These shall permit equality and shall not promise that an integral source has been classified as exact. With that flag, an integral source shall return V_EQ; a nonintegral source shall return V_GT downward and V_LT upward, with the relation orientation in 🔗 1. Numerical result classes and relation meanings.

    No particular current hardware rounding direction shall be required and the current direction shall remain unchanged. Object validity, synchronization, source preservation, initialization independence and resource conditions shall follow 🔗 1. Exact native integral and unbounded integer assignment to mpz storage. This conversion shall require no shared temporary pool.

    RATIONALE:

    A rational quotient can be rounded exactly using integer numerator and denominator operations. A weak result relation is a deliberate classification unless strict relation determination was requested.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source types:

    Result assign_r(mpz_class& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use literal signed quotients and independent unbounded quotient/remainder calculations for exact integers, proper fractions, halves and large numerator/denominator values. Require the documented weak classifications without strict flags and definite classifications with them. Repeat under all hardware modes, preserving canonical source components.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc; tests/numericpublic1.cc.

  • PPL-SPEC-000263
    3. Delegated and exactness rational conversion to an unbounded integer UID: PPL-SPEC-000263 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a finite canonical mpq_class source with value a, ROUND_IGNORE shall assign trunc(a) toward zero to the mpz_class destination. Without a strict flag it shall return V_LGE. ROUND_NOT_NEEDED shall require an integral canonical source, whose denominator is one, and shall assign that exact integer. Without a strict flag it shall return V_EQ in an assertion-enabled build and may return lazy V_LGE in a build defining NDEBUG, following 🔗 7. Internal no-rounding-needed request and result checking.

    With ROUND_STRICT_RELATION, the delegated conversion shall report the definite relation: V_GT for a positive nonintegral source, V_LT for a negative nonintegral source, and V_EQ for an integral source. A strict no-rounding-needed request shall retain the integral-source precondition and return V_EQ.

    Object, synchronization, source-preservation, resource and initialization conditions shall follow 🔗 1. Exact native integral and unbounded integer assignment to mpz storage. The rational-component nonaliasing condition in 🔗 2. Directed canonical rational conversion to an unbounded integer shall apply. No particular hardware rounding direction or shared temporary pool shall be required. The hardware direction shall remain unchanged and no fixed-width range limit shall apply.

    RATIONALE:

    A delegated result may be lazy while still holding the correct truncated integer. An exactness request has an integral-source precondition, and a strict request resolves the otherwise weak relation.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source types:

    Result assign_r(mpz_class& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check signed truncation using exact numerator/denominator answers, integral no-rounding-needed inputs in both build modes, and definite relations for strict delegated and exactness requests. Exercise large values, zero and proper fractions under all hardware modes without initialization stages.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc.

  • 4. Directed finite native floating-point conversion to mpz storage UID: PPL-SPEC-000264 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The source shall be a finite float, double or long double whose corresponding PPL_SUPPORTED_FLOAT, PPL_SUPPORTED_DOUBLE or PPL_SUPPORTED_LONG_DOUBLE is nonzero. Its meaning shall be the exact represented binary value a. ROUND_DOWN shall assign ⌊a⌋ to mpz_class and ROUND_UP shall assign ⌈a⌉, with no fixed-width integer range restriction.

    For float and double, a nonintegral source shall require the hardware rounding direction to be upward. An integral source shall return V_EQ; a nonintegral downward result shall return V_GT and an upward result V_LT, with or without the strict-relation flag. Exact integral inputs shall not require a particular current hardware direction.

    For long double, no particular hardware direction shall be required. Without the strict flag the downward request shall return V_GE and the upward request V_LE. With the flag it shall return V_EQ for an integral source, V_GT for an inexact downward result and V_LT for an inexact upward result. This classification shall follow the exact rational route in 🔗 2. Directed canonical rational conversion to an unbounded integer, including when the native long double format has the same precision as double.

    Object validity, source preservation, resource limits and initialization independence shall follow 🔗 1. Exact native integral and unbounded integer assignment to mpz storage. Current hardware rounding direction shall be preserved. The long double route shall use a lazily owned rational temporary; in a non-thread-safe configuration, concurrent calls sharing that temporary machinery shall be serialized, even on distinct argument objects. In a thread-safe configuration its pool shall belong to the calling thread. Unavailable native source types shall not be instantiated.

    RATIONALE:

    All finite floating-point values have exact dyadic rational meanings and therefore admit unbounded integer bounds. Different native source routes may expose different relation precision without changing the integer result.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source types:

    Result assign_r(mpz_class& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    For each configured source format, derive exact significand/power-of-two oracles for positive and negative fractions, subnormals, precision boundaries and finite maxima. Check strict and nonstrict result classifications separately for float/double versus long double. Use upward hardware direction for nonintegral float/double and every hardware direction for the rational long-double route; preserve source values and direction state.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc.

  • PPL-SPEC-000265
    5. Delegated finite floating-point conversion and exactness into mpz storage UID: PPL-SPEC-000265 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For the configured finite source types in 🔗 4. Directed finite native floating-point conversion to mpz storage, ROUND_IGNORE shall assign trunc(a) toward zero to mpz_class. Without a strict flag it shall return V_LGE. ROUND_NOT_NEEDED shall require the represented source value to be an integer and shall assign that exact value. Without a strict flag it shall return V_EQ in an assertion-enabled build and may return lazy V_LGE in a build defining NDEBUG, following 🔗 7. Internal no-rounding-needed request and result checking.

    With ROUND_STRICT_RELATION, delegated conversion shall determine V_GT for a positive nonintegral source, V_LT for a negative nonintegral source, and V_EQ for an integral source. A strict no-rounding-needed request shall retain its integral-source precondition and return V_EQ.

    These requests shall require no particular current hardware rounding direction and shall preserve that direction. Object validity, source preservation, initialization independence, resource limits, availability and long-double temporary-pool ownership shall follow 🔗 4. Directed finite native floating-point conversion to mpz storage. No finite source shall overflow a fixed integer range or be classified as an infinite result merely because the selected global coefficient profile is bounded.

    RATIONALE:

    An unbounded integer conversion avoids an artificial coefficient-width range failure. Delegated truncation and a strict relation request remain distinct guarantees for every native floating-point source route.

    INTERFACE:

    Public header: <ppl.hh>; effective PPL template instantiation for the admitted source types:

    Result assign_r(mpz_class& to, const From& from, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check exact and nonintegral signed dyadic values, zero, subnormals, native finite maxima and values beyond every bounded coefficient width. Verify lazy unflagged truncation, both build modes for exactness requests, definite strict relations, source preservation and unchanged hardware direction under all supported modes.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc.

  • 6. Finite native floating-point placement construction of an unbounded integer UID: PPL-SPEC-001196 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ, NATIVE_FP_AVAILABLE VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    The source type F shall be float or double with its corresponding PPL_SUPPORTED_FLOAT or PPL_SUPPORTED_DOUBLE nonzero. The source shall be a live finite value with exact represented binary value a. The selected source and destination policies shall admit these finite values and provide the capabilities used by the native-to-mpz_class conversion. No policy rounding default or result handler shall be required.

    The destination reference shall designate writable storage of at least sizeof(mpz_class) bytes, correctly aligned for mpz_class, with no live mpz_class occupying it. The storage shall be available for placement construction without ending an object lifetime that the caller must preserve. The source shall not overlap that storage. Before placement construction begins the destination glvalue shall be used only in ways permitted for storage outside an object's lifetime; it shall not be read as a live mpz_class. On normal return exactly one live mpz_class shall occupy the storage. Its caller shall arrange exactly one destruction of that object before releasing or reusing the storage.

    ROUND_DOWN shall construct ⌊a⌋ and ROUND_UP shall construct ⌈a⌉. These requests shall return V_EQ for an integral source, otherwise V_GT downward or V_LT upward, with or without ROUND_STRICT_RELATION. ROUND_IGNORE shall construct trunc(a) and return V_LGE without the strict flag. With that flag it shall return V_EQ for an integral source, V_GT for a positive nonintegral source, and V_LT for a negative nonintegral source.

    A raw kernel ROUND_NOT_NEEDED request shall require an integral source, construct its exact integer value and return V_LGE without the strict flag or V_EQ with it. A caller-translated ROUND_CHECK exactness request shall retain that integral-source precondition and return V_EQ. The public numerical construct adapter shall perform the direction and exactness-check translation in 🔗 7. Internal no-rounding-needed request and result checking before invoking this kernel. The kernel shall return Result without policy-handler dispatch.

    A directed request on a nonintegral source shall require upward hardware rounding. Integral sources and delegated truncation shall require no particular current direction. Every call shall preserve the current hardware rounding direction. Floating-point exceptions shall be nontrapping; accrued exception flags shall be unspecified. Available GMP resources shall be required, without a fixed-width integer limit. No library/thread initialization owner, coefficient-constant stage or shared temporary pool shall be required. Callers shall synchronize storage use against concurrent access. Resource failure shall not be a successful result; no universal object-lifetime or storage-rollback guarantee shall be imposed after an abnormal exit.

    RATIONALE:

    Placement construction begins an integer object's lifetime, whereas assignment requires an already live object. The numerical result and its relation must remain consistent with the requested rounding and exactness conventions without introducing a policy-handler decision.

    INTERFACE:

    Internal header: src/checked_mpz_inlines.hh; namespace Parma_Polyhedra_Library::Checked; admitted F and policy types above:

    template <typename To_Policy, typename From_Policy, typename F>
    Result construct_mpz_float(mpz_class& to, const F& from,
                               Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use correctly aligned raw storage and the admitted public numerical construct route or the internal kernel. After a successful construction, obtain the live object using the applicable C++ lifetime rules, compare it with an independent exact rational oracle, and destroy it exactly once. Check both source formats, both signs, zeros, nonintegral dyadic values, subnormals, finite maxima and exact integral values. Exercise all admitted directions and strict flags, including raw kernel exactness and the public adapter's debug/release translation. Check unchanged source values and hardware direction, definite strict relations, lazy unflagged relations, zero handler calls, and independence from the configured coefficient width. Do not inspect an unconstructed object or infer a general failure rollback.

    SOURCE:

    src/checked_mpz_inlines.hh; src/checked_ext_inlines.hh; src/Checked_Number_defs.hh; src/Checked_Number_inlines.hh; tests/unboundedintegerconversionspec1.cc.

  • 1. Exact unbounded integer greatest common divisor and least common multiple UID: PPL-SPEC-000517 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live mpz_class sources with entry values a and b, gcd_assign_r shall assign their nonnegative greatest common divisor g. Two zero sources shall yield zero; when exactly one source is zero, g shall be the other source's absolute value. lcm_assign_r shall assign zero when either source is zero, otherwise shall assign the positive integer |a ⁄ g| |b|.

    Both operations shall return V_EQ for every valid rounding request, including strict and exactness requests. The output may alias either source and both sources may be the same object; the formula shall use their entry values. Distinct sources shall remain unchanged. Unbounded resource, object-synchronization and initialization/hardware independence conditions shall follow 🔗 1. Exact named arithmetic on unbounded integer storage. No configured bounded-coefficient range shall limit either operation.

    RATIONALE:

    Nonnegative normalization and explicit zero conventions give common divisors and multiples a portable exact meaning, independently of the selected coefficient profile.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result gcd_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    Result lcm_assign_r(mpz_class& to, const mpz_class& x,
                        const mpz_class& y, Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Compare with an independent Euclidean oracle using shift/subtract long division. Check all source signs and zero combinations, coprime and reducible pairs, large integer literals, all destination/source aliases, all eight requests and preserved distinct sources.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerfunctionspec1.cc.

  • 2. Exact unbounded integer Bezout coefficients UID: PPL-SPEC-000518 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live mpz_class sources with entry values a and b, gcdext_assign_r shall assign the nonnegative greatest common divisor to g and integers to s and t satisfying as + bt = g. For two zero sources, g shall be zero; no particular pair of Bezout coefficients shall be required. No unique pair shall be prescribed in other cases either.

    The three output objects shall be pairwise distinct and distinct from both source objects. The source objects may be the same object. The operation shall return V_EQ for every valid rounding request, including strict and exactness requests, and preserve both sources. Available resources shall suffice for the unbounded outputs and intermediates. Synchronization, initialization independence and absence of configured coefficient/FPU limits shall follow 🔗 1. Exact named arithmetic on unbounded integer storage.

    RATIONALE:

    The Bezout identity specifies the result independently of backend choices among multiple valid coefficients. Explicit output separation prevents accidental assumptions about multiple-output aliasing.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result gcdext_assign_r(mpz_class& g, mpz_class& s, mpz_class& t,
                           const mpz_class& x, const mpz_class& y,
                           Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Check the independent expected gcd, nonnegativity and Bezout reconstruction for every source sign and zero combination, equal shared sources, coprime/noncoprime inputs and large integers. Test all eight requests, changed outputs, source preservation and hardware-mode independence.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerfunctionspec1.cc.

  • PPL-SPEC-000519
    3. Directed unbounded integer square roots UID: PPL-SPEC-000519 STATUS: APPROVED COMPONENT: NUMERICS APPLICABILITY: IF_CPP, SCALAR_MPZ VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For a live nonnegative mpz_class source with value a, let r = √(a) denote the exact nonnegative real root. sqrt_assign_r with ROUND_DOWN shall assign ⌊r⌋ and with ROUND_UP shall assign ⌈r⌉. A perfect-square source shall return V_EQ for either direction. Otherwise, downward rounding shall return V_GT and upward rounding shall return V_LT. Adding ROUND_STRICT_RELATION shall retain these definite classifications.

    ROUND_IGNORE shall select the floor and return a relation admitting r ≥ to. A strict delegated request shall distinguish V_EQ from V_GT. ROUND_NOT_NEEDED shall require a to be a perfect square, assign the exact root and return a relation admitting equality; a strict exactness request shall return V_EQ. The result shall never depend on irrational_precision.

    The destination may alias the source, using its entry value. A distinct source shall remain unchanged. Resource, range, synchronization and initialization/hardware independence conditions shall follow 🔗 1. Exact named arithmetic on unbounded integer storage. Shared scratch-integer pools used for directed root remainders shall be serialized in a build without thread-safe support; thread-safe configurations shall use calling-thread pools.

    RATIONALE:

    An unbounded integer root is an adjacent integer bound on the real square root and is independent of the rational square-root precision grid.

    INTERFACE:

    Public header: <ppl.hh>; effective template instantiations in Parma_Polyhedra_Library:

    Result sqrt_assign_r(mpz_class& to, const mpz_class& from,
                         Rounding_Dir dir);
    
    VERIFICATION_CRITERIA:

    Use an independent integer bisection oracle and squared inequalities. Check zero, one, perfect squares and their neighbors, very large inputs, both directed relations, delegated and admitted exactness requests, aliases, unchanged sources and all available hardware modes.

    SOURCE:

    src/checked_mpz_inlines.hh; src/Checked_Number_defs.hh and src/Checked_Number_inlines.hh; tests/unboundedintegerfunctionspec1.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-000024
    4. Coordinate-set dimension and maximum dimension UID: PPL-SPEC-000024 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection, Review LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    Variables_Set::max_space_dimension() shall return the same value as Variable::max_space_dimension(). For a coordinate-valid set S, space_dimension() shall return zero when S = ⌀ and 1 + maxS otherwise. Both queries shall leave the set unchanged.

    The returned dimension shall describe the smallest space enclosing the selected coordinates. It shall not count the selected coordinates or prescribe the ambient dimension of a consuming object. space_dimension() shall require a coordinate-valid set under 🔗 1. Public coordinate-index set and value lifecycle; raw storage of an invalid index shall not establish a supported dimension query.

    RATIONALE:

    A sparse selection may contain few coordinates while requiring a much larger enclosing space. An empty selection has enclosing dimension zero.

    INTERFACE:

    Public declarations:

    static dimension_type max_space_dimension();
    dimension_type space_dimension() const;
    
    VERIFICATION_CRITERIA:

    Check empty sets, index zero, sparse sets, insertion and removal of the greatest stored index, clear, and a singleton at the greatest valid index. Independently compare against zero or one plus the largest index and verify unchanged contents. Check equality of the Variable and Variables_Set maximum dimension queries.

    SOURCE:

    src/Variables_Set_inlines.hh: dimension queries. tests/variablesset1.cc: sparse and boundary dimension cases.

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

  • PPL-SPEC-000029
    9. Coordinate-set memory estimates UID: PPL-SPEC-000029 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, external_memory_in_bytes() shall return the implementation's per-node estimate multiplied by the number of stored indices. Its per-node estimate shall account for one dimension index, three pointers and one stored tree-color enumeration. It shall be independent of the numerical values of the indices, and shall be zero for an empty set. Where the reported arithmetic is representable in memory_size_type, total_memory_in_bytes() shall equal sizeof(Variables_Set) plus that external estimate. Both queries shall leave the set unchanged and shall also permit raw indices outside the coordinate-valid range.

    These results shall be storage estimates under the stated node-layout model. They shall not certify allocator bookkeeping, alignment padding, actual standard-library node layout or process resident memory.

    RATIONALE:

    Stable estimates support relative resource observations while exposing the layout assumptions instead of presenting them as exact allocator measurements.

    INTERFACE:

    Public declarations:

    memory_size_type external_memory_in_bytes() const;
    memory_size_type total_memory_in_bytes() const;
    
    VERIFICATION_CRITERIA:

    Check empty, singleton and larger sets for zero external estimate, positive linear growth and the total/external identity. Compare equal-sized sets with different indices and verify changes through duplicate insertion, erasure, clear, copy and swap. Inspect the per-node arithmetic against its documented model; do not equate the estimate with allocator or resident-memory counters.

    SOURCE:

    src/Variables_Set_inlines.hh: per-node memory estimate and total query. tests/variablesset1.cc: memory estimates across value histories.

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

  • 1. Coordinate type and reserved dimension index UID: PPL-SPEC-000011 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The public dimension_type shall be an unsigned integral type identical to std::size_t. Let S be its largest representable value. The function not_a_dimension() shall return S, reserved to indicate that no valid dimension is designated. Zero shall be an ordinary index and the dimension of a zero-dimensional space. The type shall not depend on the coefficient profile. The representable index range shall not by itself promise that a particular numerical object supports that many coordinates or that corresponding storage can be allocated.

    RATIONALE:

    A common unsigned coordinate vocabulary distinguishes ordinary coordinates, space-dimension counts and an absent-dimension indication without making a storage-capacity promise.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    typedef std::size_t dimension_type;
    dimension_type not_a_dimension();
    
    VERIFICATION_CRITERIA:

    Check type identity with std::size_t, unsigned integral properties and sentinel equality to std::numeric_limits<dimension_type>::max() in C++20. Check zero and boundary arithmetic without overflowing the type. Inspect the configuration-independent declaration and sentinel implementation. Compile a client against installed <ppl.hh> and its matching configured library.

    SOURCE:

    src/globals_types.hh: dimension_type. src/globals_defs.hh and src/globals_inlines.hh: not_a_dimension. tests/variable1.cc: coordinate_type_and_reserved_value.

  • 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-000014
    4. Variable ordering by coordinate identity UID: PPL-SPEC-000014 STATUS: APPROVED COMPONENT: GEOMETRIC_DESCRIPTORS APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    For live valid variables v and w, less(v, w) and Variable::Compare{}(v, w) shall both return true exactly when v.id() < w.id(). They shall leave the operands unchanged. Equal identifiers shall compare false in both directions, independently of object identity or formatted names. The predicates shall define a strict total ordering of coordinate identifiers and shall allocate no storage.

    RATIONALE:

    Ordered coordinate containers require one consistent ordering that preserves coordinate identity even when output names are customized.

    INTERFACE:

    Public header: <ppl.hh>. Declarations in Parma_Polyhedra_Library; member declarations belong to Variable unless qualified otherwise.

    bool less(Variable v, Variable w);
    struct Variable::Compare {
      bool operator()(Variable v, Variable w) const;
    };
    
    VERIFICATION_CRITERIA:

    Compare all pairs in an independently ordered sample containing duplicates, zero and the greatest admitted identifier. Check both predicates against index comparison, irreflexivity, reversed unequal pairs and transitivity. Verify unchanged identifiers and inspect allocation-free implementations.

    SOURCE:

    src/Variable_defs.hh and src/Variable_inlines.hh: less and Compare. tests/variable1.cc: variable_ordering_matches_identifier_order.

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

  • PPL-SPEC-001578
    1. Configured version components and borrowed metadata strings UID: PPL-SPEC-001578 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    The version-component functions shall return the configured values denoted by PPL_VERSION_MAJOR, PPL_VERSION_MINOR, PPL_VERSION_REVISION and PPL_VERSION_BETA in the matching public header. version() shall return a nonnull NUL-terminated string equal to PPL_VERSION. Its form shall be M.m, followed by .r when the revision is nonzero and preb when the beta component is nonzero, with decimal component values.

    banner() shall return nonnull NUL-terminated information identifying the Parma Polyhedra Library, its version, licensing and warranty conditions, build compiler and sources of further information. Both strings shall be borrowed immutable library storage, valid for the library's lifetime, requiring no allocation or deallocation by the caller. Repeated queries shall not mutate library state or the returned strings. Clients shall use matching public headers and library binaries.

    RATIONALE:

    Clients need a stable way to identify the linked library without confusing its compiler metadata with the client build.

    INTERFACE:

    Configured public header: version.hh, generated from version.hh.in and included in ppl.hh. Namespace: Parma_Polyhedra_Library.

    unsigned version_major();
    unsigned version_minor();
    unsigned version_revision();
    unsigned version_beta();
    const char* version();
    const char* banner();
    
    VERIFICATION_CRITERIA:

    Compare all four components and version spelling with matching configured macros. Check repeated pointer/content stability, library/version/licensing/compiler information in the banner and preservation across ordinary library use.

    SOURCE:

    src/version.hh.in; src/version.cc; tests/version1.cc.

  • PPL-SPEC-001571
    1. Selected widening-method delegation UID: PPL-SPEC-001571 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Widening_Function<PSET> shall retain the supplied nonnull widening member pointer. Its application to x, y and tp shall invoke that selected method once, on x, passing the same y reference and the same token pointer. The omitted token argument shall be null. The selected method's domain, dimension, ordering and token-lifetime preconditions shall apply unchanged. Its mutations and exceptions shall propagate without additional copying of the pointsets or tokens. Copying the wrapper shall retain the selected method. widen_fun_ref(wm) shall return a wrapper with that binding.

    RATIONALE:

    Powerset algorithms must invoke the selected domain widening without changing its direction, tokens or error behavior.

    INTERFACE:

    Defining header: Widening_Function_defs.hh. Namespace: Parma_Polyhedra_Library.

    template <typename PSET> class Widening_Function {
    public:
      using Widening_Method = void (PSET::*)(const PSET&, unsigned*);
      explicit Widening_Function(Widening_Method);
      void operator()(PSET&, const PSET&, unsigned* = nullptr) const;
    };
    template <typename PSET>
    Widening_Function<PSET> widen_fun_ref(void (PSET::*)(const PSET&, unsigned*));
    
    VERIFICATION_CRITERIA:

    Use a recording pointset to verify exact target/source/pointer identities, alternate selected methods, wrapper copies, null and nonnull tokens, one invocation and exception identity; compare a real polyhedron widening with its independently stated set result.

    SOURCE:

    src/Widening_Function_defs.hh; src/Widening_Function_inlines.hh; tests/wideningfunctionspec1.cc; tests/Polyhedron/limitedwideningfunctors1.cc.

  • PPL-SPEC-001572
    2. Limited widening with borrowed limiting constraints UID: PPL-SPEC-001572 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Internal RELATIONS (Parent): STATEMENT:

    Limited_Widening_Function<PSET,CSYS> shall retain a nonnull selected member pointer and borrow the supplied limiting system. The system shall outlive every application of the wrapper or a copy. Application shall invoke the selected method once on x, passing the same y reference, the same live limiting system and the same token pointer, null when omitted. Changes to the limiting system before an application shall be visible. The selected method's preconditions, mutations and exceptions shall apply unchanged; neither wrapper construction nor application shall copy pointsets or limiting constraints. widen_fun_ref(lwm,cs) shall return this binding; copying the wrapper shall preserve both bindings without taking ownership.

    RATIONALE:

    Limiting constraints are borrowed algorithm parameters, and copying a wrapper must not silently snapshot or own them.

    INTERFACE:

    Defining header: Widening_Function_defs.hh. Namespace: Parma_Polyhedra_Library.

    template <typename PSET, typename CSYS> class Limited_Widening_Function {
    public:
      using Limited_Widening_Method
        = void (PSET::*)(const PSET&, const CSYS&, unsigned*);
      Limited_Widening_Function(Limited_Widening_Method, const CSYS&);
      void operator()(PSET&, const PSET&, unsigned* = nullptr) const;
    };
    template <typename PSET, typename CSYS>
    Limited_Widening_Function<PSET, CSYS>
    widen_fun_ref(void (PSET::*)(const PSET&, const CSYS&, unsigned*), const CSYS&);
    
    VERIFICATION_CRITERIA:

    Use noncopyable recording arguments, mutate the borrowed limiter between applications and verify exact identities, selected methods, tokens, invocation counts, copies and exception propagation. Check a real limited widening against an exact polyhedral constraint oracle.

    SOURCE:

    src/Widening_Function_defs.hh; src/Widening_Function_inlines.hh; tests/wideningfunctionspec1.cc; tests/Polyhedron/limitedwideningfunctors1.cc.

PPL-LLR-000312
2. Independent values after copying domain objects UID: PPL-LLR-000312 STATUS: APPROVED COMPONENT: LIBRARY_WIDE APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Review RELATIONS (Parent): RELATIONS (Child): STATEMENT:

When a supported numerical domain object is copied by value into another object of the same domain and scalar instantiation, the copy shall initially represent the same numerical set and dimension. Subsequent mutation of either value shall not change the other value's represented set.

RATIONALE:

Clients need predictable value semantics regardless of internal sharing or deferred normalization.

COMMENT:

Verification covers supported same-domain copy and mutation contracts. Independent-mutation tests and analysis of sharing and normalization verify value independence. These guarantees apply to documented value copies, not borrowed references or input-recycling operations.

VERIFICATION_CRITERIA:

Construct and copy representative empty, universe and constrained domain values. Mutate each copy independently and check that only the selected value changes; include copies made before and after normalization.

SOURCE:

src/Polyhedron_defs.hh: copy construction; src/Grid_defs.hh: copy construction; src/BD_Shape_defs.hh; src/Octagonal_Shape_defs.hh; src/Box_defs.hh.

  • PPL-SPEC-001221
    11. Explicit empty box assignment UID: PPL-SPEC-001221 STATUS: APPROVED COMPONENT: INTERVALS_BOXES APPLICABILITY: IF_CPP VERIFICATION_METHODS: Test, Analysis, Inspection LANGUAGE: CPP VISIBILITY: Public RELATIONS (Parent): STATEMENT:

    set_empty() shall replace the receiver's entry set X ⊆ Rn by ⌀ ⊆ Rn. It shall preserve the ambient dimension and shall be idempotent, including in dimension zero. Subsequent empty-aware queries and coordinate access shall observe the empty value under 🔗 7. Empty-aware borrowed coordinate interval access and 🔗 9. Exact ordinary box classification.

    The operation shall retain the owned coordinate storage and the stored interval objects. Those factors shall become inactive; it shall not need to assign an empty value to each factor or query their numerical payloads. Borrowed references to retained factors shall retain their storage lifetime, but shall not independently denote the current box's factors while the box is empty. Independent copies shall remain unchanged.

    The receiver shall have safely owned coordinate storage and externally synchronized access. The operation shall require no numerical arithmetic, no additional PPL initialization, no allocation and no interval-profile callback, and shall not change hardware rounding state.

    RATIONALE:

    Emptiness annihilates a Cartesian product without requiring every retained factor to be rewritten. The ambient dimension and owned storage are independent of the represented set becoming empty.

    INTERFACE:

    Public header: <ppl.hh>; member of Parma_Polyhedra_Library::Box<ITV>:

    void set_empty();
    
    VERIFICATION_CRITERIA:

    Check zero and positive dimensions, empty/universe and finite factor histories, repeated calls and independent copies. Observe empty-aware factor access and retained factor addresses/capacities through the existing narrow fixture. A diagnostic interval profile whose callbacks reject use shall confirm that explicit empty assignment does not inspect or rewrite inactive factors. Check direct public-header use without initialization and unchanged hardware rounding state in an initialized runtime.

    SOURCE:

    src/Box_defs.hh; src/Box_inlines.hh; src/Box_templates.hh; tests/boxpublicstatespec1.cc; tests/boxstatepublic1.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.

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