C++ owning floating-expression trees and evaluation
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
Parents:
|
Incoming links from:
1. Descriptor absolute-error interval
1. Descriptor absolute-error interval
2. Owned constant construction and evaluation
3. Owned variable lookup and symbolic fallback
4. Owned exact opposite
5. Owned rounding cast
6. Owned floating sum
7. Owned floating difference
8. Owned floating multiplication
9. Owned floating division
10. Owned expression exchange
11. Descriptor-based relative rounding error
12. Box-based affine intervalization
13 |
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. |
Owned trees need a numerical success promise and an explicit lifetime model independent of the non-owning target adapters. |
Mine04 | Section 5, Theorem 1 and failed linearization (PDF page index 7, zero-based). |
|
|
|
|
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. |
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. |
|
|
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); }; |
|
|
SW_SPEC
|
2 |
|
|
Parents:
|
|
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. |
A constant is interpreted once; evaluation copies its enclosure without treating it as another arithmetic operation. |
Mine04 | Section 5, constant linearization rule (PDF page index 6, zero-based). |
|
|
|
|
Compare ordered endpoints, decimal text against an exact rational, caller storage lifetime, dimension replacement and admitted unbounded constants. |
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. |
|
|
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; |
|
|
SW_SPEC
|
3 |
|
|
Parents:
|
|
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. |
Stable coordinate identities preserve symbolic dependencies without requiring every variable to have a stored affine substitute. |
Mine04 | Section 5, variable rule and Linear Form Propagation (PDF page indices 6–7, zero-based). |
|
|
|
|
Check missing and present bindings, trailing indices, copied-output independence, unbounded stored constants/coefficients, refusal and recovered replacement. |
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. |
|
|
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; |
|
|
SW_SPEC
|
4 |
|
|
Parents:
|
|
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. |
Changing a floating-point sign is exact within the modeled finite format. |
Mine04 | Section 5, interval linear forms and coefficient-wise arithmetic (PDF page index 6, zero-based). |
|
|
|
|
Compare coefficient-wise interval negation, symbolic dimensions, refused child/retry and child destruction. |
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. |
|
|
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; |
|
|
SW_SPEC
|
5 |
|
|
Parents:
|
|
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. |
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. |
Mine04 | Section 5, rounding-error and cast rules (PDF page index 6, zero-based). |
|
|
|
|
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. |
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. |
|
|
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; |
|
|
SW_SPEC
|
6 |
|
|
Parents:
|
|
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. |
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. |
Mine04 | Section 5, addition/subtraction rules (PDF page index 6, zero-based). |
|
|
|
|
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. |
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. |
|
|
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; |
|
|
SW_SPEC
|
7 |
|
|
Parents:
|
|
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. |
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. |
Mine04 | Section 5, addition/subtraction rules (PDF page index 6, zero-based). |
|
|
|
|
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. |
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. |
|
|
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; |
|
|
SW_SPEC
|
8 |
|
|
Parents:
|
|
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. |
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. |
Mine04 | Section 5, multiplication and intervalization rules (PDF page indices 6–7, zero-based). |
|
|
|
|
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. |
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. |
|
|
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; |
|
|
SW_SPEC
|
9 |
|
|
Parents:
|
|
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. |
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. |
Mine04 | Section 5, division and intervalization rules (PDF page indices 6–7, zero-based). |
|
|
|
|
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. |
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. |
|
|
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; |
|
|
SW_SPEC
|
10 |
|
|
|
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. |
Exchanging full node values must carry the owned subtrees and preserve operand order. |
|
|
|
|
|
Exercise member/free and self exchange for all eight classes with distinguishable leaf values and ordered operands; compare evaluations and destruction counters. |
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. |
|
|
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); |
||
|
SW_SPEC
|
11 |
|
|
Parents:
|
|
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. |
Every coefficient needs an enclosing error term; a small inward radius can invalidate the whole successful linearization. |
Mine04 | Section 5, relative rounding-error definition (PDF page index 6, zero-based). |
|
|
|
|
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. |
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. |
|
|
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); |
|
|
SW_SPEC
|
12 |
|
|
Parents:
|
|
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. |
An interval enclosure supplies the scalar bounds needed by multiplication and division without changing the underlying affine form. |
Mine04 | Section 5, intervalization rule (PDF page index 6, zero-based). |
|
|
|
|
Compare exact rational corner sums for positive/negative/zero coefficients, sparse and trailing dimensions, singleton and interval factors, preserving input snapshots. |
src/Floating_Point_Expression_defs.hh; src/Floating_Point_Expression_inlines.hh; src/Floating_Point_Expression_templates.hh; tests/ownedexpressionspec1.cc; tests/ownedexpressionpublic1.cc. |
|
|
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); |
|
|
SW_SPEC
|
13 |
|
|
|
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. |
Changing a variable invalidates the other expressions that may depend on its previous value while explicitly recording the caller-supplied new form. |
Mine04 | Section 5, Linear Form Propagation (PDF page index 7, zero-based). |
|
|
|
|
Check insertion/replacement, consecutive dependencies, uncertain/zero coefficients, retained keys and values, same-store borrowed donors and independent input snapshots. |
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. |
|
|
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; |