Internal interval result flags and cutoff values
|
Type
|
Level
|
MID
|
UID
|
REFS
|
Title
|
Statement
|
Rationale
|
Comment
|
BIBLIOGRAPHY
|
STATUS
|
COMPONENT
|
APPLICABILITY
|
VERIFICATION_METHODS
|
VERIFICATION_CRITERIA
|
SOURCE
|
LANGUAGE
|
VISIBILITY
|
INTERFACE
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
SW_SPEC
|
1 |
|
|
Incoming links from:
2. Interval abstraction of wrapped integer images with refinement
1. Addition and subtraction of intervals admitting infinity points
2. Sign-stable extended interval products and quotients
3. Degenerate and singular extended interval products and quotients
1. Ordinary interval additive inversion
2. Ordinary interval addition and subtraction
3. Ordinary interval multiplication
4. Ordinary interval division and zero-divisor abstraction
1. Interval construction from ordinary real constraints
2. Constraint refinement through interval abstraction
3. Independent outward endpoint extension
1. Existential interval relation refinement
2. Universal interval relation refinement
1. Interval assignment and directed enclosure
2. Interval hull assignment
5. Interval enclosure of set difference
8. Interpreting logical interval emptiness flags
17 |
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. |
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. |
|
|
|
|
|
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. |
src/intervals_defs.hh; src/Interval_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc; tests/intervalresultsspec1.cc. |
|
|
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); |
||
|
SW_SPEC
|
2 |
|
|
|
Use_By_Ref<Use_Slow_Copy, T>::value shall equal Slow_Copy<T>::value; By_Value shall select false and By_Ref true. For owned storage, Val_Or_Ref<T, Criteria> shall contain a distinct T object, use T as both Arg_Type and Return_Type, and default construct that value with T(). Construction, assignment and set shall copy the supplied value using T's ordinary operations. get and the conversion operator shall return its current value by value. For borrowed storage, Arg_Type shall be T& and Return_Type const T&. Default construction shall leave the holder unbound; no read or value conversion shall be permitted before binding. Construction, assignment and set from a mutable lvalue shall bind its identity; the overload with a const T& and Boolean argument shall bind that same const object's identity. The Boolean argument's value shall not change storage or request a snapshot. get and conversion shall expose the live bound object as a const reference, reflecting subsequent valid donor changes. Implicit copying/assignment of a holder shall preserve its owned value or borrowed identity according to the selected criterion. Assignment from an argument shall return the holder. Borrowed donors shall outlive every use of their values; copying an unbound holder shall not bind it. All referenced objects shall remain live and access shall be synchronized against mutation. The selected T operations, representability and resource prerequisites shall hold; their exceptions shall propagate without a universal rollback promise. Storage alone shall require no library, coefficient-constant or FPU initialization beyond any prerequisites imposed by the selected T. |
A cutoff snapshot and a borrowed view have different lifetime and mutation semantics even when their initial mathematical values are equal. |
|
|
|
|
|
Check criteria and type aliases, default owned value and unbound rebinding, owned copy independence/lifetime, mutable and const identity, both Boolean acknowledgments and subsequent donor mutation. |
src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc. |
|
|
Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint. struct Use_Slow_Copy; struct By_Value; struct By_Ref; template <typename Criteria, typename T> struct Use_By_Ref; template <typename T, typename Criteria = Use_Slow_Copy, typename Enable = void> class Val_Or_Ref; // Owned specialization: Arg_Type = T, Return_Type = T. Val_Or_Ref(); explicit Val_Or_Ref(T value, bool ignored = false); Val_Or_Ref& operator=(T value); void set(T value, bool ignored = false); T get() const; operator T() const; // Borrowed specialization: Arg_Type = T&, Return_Type = const T&. Val_Or_Ref(); explicit Val_Or_Ref(T& value); Val_Or_Ref(const T& value, bool acknowledge_borrow); Val_Or_Ref& operator=(T& value); void set(T& value); void set(const T& value, bool acknowledge_borrow); const T& get() const; operator const T&() const; |
||
|
SW_SPEC
|
3 |
|
|
Incoming link from:
4. Interval constraints retain relation and cutoff ownership
1 |
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. |
Relation symbols and numerical relation/class codes need one explicit bridge without accidentally treating unrelated status flags as a cutoff relation. |
|
|
|
|
|
Check all six symbol mappings and the defined projection-valid finite/infinite codes, copied values and conversion results without initialization. |
src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc. |
|
|
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; }; |
||
|
SW_SPEC
|
4 |
|
|
Incoming links from:
1. Interval construction from ordinary real constraints
2. Constraint refinement through interval abstraction
3. Independent outward endpoint extension
5. Interval-constraint factories preserve explicit storage selection
7. Interval endpoint constraint views
7. Interval endpoint constraint views
6 |
I_Constraint<T, Criteria, extended> shall combine a relation code with the cutoff holder selected in 🔗 2. Cutoff value storage and explicit borrowing criteria. Default construction shall set rel() to V_LGE; its owned cutoff shall have T()'s value and its borrowed cutoff shall remain unbound until set. value() shall follow the holder's value/reference return type and lifetime rules; an unbound borrowed default shall admit relation inspection but not cutoff access. Construction from a relation and cutoff shall retain that relation and store or borrow the cutoff according to the criterion. set shall replace the relation and update/rebind the cutoff by those same rules. The Boolean acknowledgment shall not force a copy, regardless of its value. Admitted converting overloads shall apply ordinary T construction/assignment under the source type's valid conversion and representability conditions. extended shall not change the ownership or relation/value access behavior specified here. Implicit copies and assignments shall retain the relation and the selected owned value or borrowed identity. Owned copies shall survive donor scope and mutate independently; borrowed copies shall retain their donor's lifetime obligation. Self-assignment shall preserve the pair. Underlying value exceptions shall propagate; a failed set may already have replaced the relation and shall not promise atomic replacement of the pair. The type shall derive from I_Constraint_Common and I_Constraint_Base for the supported interval-constraint dispatch. Other prerequisites shall follow 🔗 2. Cutoff value storage and explicit borrowing criteria and 🔗 3. Interval-constraint relation adapter preserves supported relation codes. |
A relation/cutoff pair must retain its selected ownership through copying and rebinding, and failed value assignment must not imply an atomic pair update. |
|
|
|
|
|
Check defaults, owned/borrowed pairs, conversions, both acknowledgment values, implicit/self assignment, donor identity and scope; inject an observable value-assignment failure and assess the retained relation/value state. |
src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc. |
|
|
Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint. class I_Constraint_Base; template <typename Derived> class I_Constraint_Common; template <typename T, typename Criteria = Use_Slow_Copy, bool extended = false> class I_Constraint; explicit I_Constraint(); I_Constraint(I_Constraint_Rel relation, Arg_Type value); I_Constraint(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow); template <typename U> I_Constraint(I_Constraint_Rel relation, const U& value); void set(I_Constraint_Rel relation, Arg_Type value); void set(I_Constraint_Rel relation, const T& value, bool acknowledge_borrow); template <typename U> void set(I_Constraint_Rel relation, const U& value); Return_Type value() const; Result rel() const; |
||
|
SW_SPEC
|
5 |
|
|
|
The two-argument i_constraint(relation, value) overloads shall return I_Constraint<T, Use_Slow_Copy, false> using the default storage trait. For a borrowed cutoff, the unacknowledged overload shall require a mutable lvalue; borrowing a const cutoff shall require the explicit Boolean argument. For an owned cutoff, mutable or const input shall be copied. Overloads with an explicit criterion object shall return I_Constraint<T, Criteria, false> and use that criterion, overriding the slow-copy trait. By_Value shall therefore retain an independent snapshot even for an expensive type, and By_Ref shall retain live reference identity even for a cheap type. The Boolean overload shall acknowledge const borrowing without changing ownership when true or false. A criterion object shall select a type; its own lifetime shall not become the cutoff lifetime. The retained relation and cutoff, exception behavior and valid-use conditions shall follow 🔗 4. Interval constraints retain relation and cutoff ownership. |
Explicit storage criteria must propagate to the returned constraint type rather than silently reverting to the default ownership trait. |
|
|
|
|
|
Check type deduction and retained relations/values for cheap native and expensive rational cutoffs, explicit criteria overriding both defaults, mutable/const donors and acknowledged borrowing; retain interval-integration tests with their interval owner suite. |
src/intervals_defs.hh; tests/intervalcutoffspec1.cc; tests/Box/interval1.cc. |
|
|
Internal helper header: intervals_defs.hh. Names belong to Parma_Polyhedra_Library; member signatures apply to the selected holder/constraint. template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value); template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, T& value); template <typename T> I_Constraint<T> i_constraint(I_Constraint_Rel relation, const T& value, bool acknowledge); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, const T& value, const Criteria& criterion); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, T& value, const Criteria& criterion); template <typename T, typename Criteria> I_Constraint<T, Criteria> i_constraint(I_Constraint_Rel relation, const T& value, bool acknowledge, const Criteria& criterion); |