Internal interval boundary updates and cut selection
adjust_boundary shall integrate a side-consistent numerical Result with the selected endpoint representation of 🔗 1. Boundary infinity and scalar-domain extremum interpretation. It shall leave the scalar payload unchanged, retain unrelated/opposite-side metadata and cached interval claims, and add required boundary properties. An existing true OPEN or SPECIAL property shall not be cleared.
For LOWER, admitted finite relation classes shall be V_EQ, V_GE and V_GT; for UPPER they shall be V_EQ, V_LE and V_LT. A strict finite relation shall require an open outward endpoint; a weak or exact relation shall preserve the explicit open request. The resulting OPEN property shall include both that required openness and its entry value. Finite classification shall not itself introduce SPECIAL.
An exact or weak natural-infinity classification shall preserve the explicit open request. The admitted weak classes shall be V_GE | VC_MINUS_INFINITY on LOWER and V_LE | VC_PLUS_INFINITY on UPPER. V_GT_MINUS_INFINITY on LOWER and V_LT_PLUS_INFINITY on UPPER shall additionally require openness. When the receiving policy stores special endpoints, these natural infinities shall be encoded by SPECIAL and the returned value shall be V_EQ. Otherwise the natural-infinity relation/classification shall be retained. An exact reverse-infinity classification shall require a numerical infinity encoding, no stored special endpoints and an infinity-admitting carrier; it shall retain that classification and the explicit openness request.
For the remaining admitted cases the return shall be the input's relation and value-class projection under 🔗 3. Overflow-sign and storage-representability result queries. Other diagnostic bits shall not be reported as retained operation guarantees. Input state shall correspond to the classified scalar result or to a natural infinity that the selected metadata encoding can represent; no NaN, contradictory side direction or unsupported finite failure shall be admitted as an ordinary endpoint result. An inactive final metadata payload shall not require a numerical read. Live storage and synchronization shall retain 🔗 1. Boundary infinity and scalar-domain extremum interpretation. No additional initialization or FPU operation shall be required.
Converting numerical relation information into endpoint exclusion and infinity metadata keeps outward scalar bounds meaningful without overwriting independent interval claims.
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename T, typename Info> Result adjust_boundary(Boundary_Type side, T& value, Info& info, bool open, Result result);
Check all admitted lower/upper finite and infinity relation classes using compatible payload states, both explicit openness requests and both entry OPEN values. Independently predict selected property changes, unchanged payloads/opposite/cache properties and normalized return values. Include genuine scalar conversion histories, weak natural-infinity results from native overflow, closed-policy affine-form consumers and metadata re-encoding of infinity.
src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
assign shall convert a source boundary into a destination of the same side, using the representation and cut meanings of 🔗 1. Boundary infinity and scalar-domain extremum interpretation and 🔗 5. Ordering of interval boundary cuts. The requested source cut shall have its source openness, strengthened to open when should_shrink is true. Numerical conversion shall use the destination side's outward direction, with strict-relation checking when needed to preserve endpoint membership or requested by the receiving information policy. The result shall integrate numerical relation and infinity information through 🔗 1. Normalization of numerical results into boundary properties.
For replacement of a boundary, selected destination OPEN and SPECIAL properties shall be clear independently of source entry properties, or already compatible with the required converted cut. With those conditions, the output shall be an outward enclosure of the requested source half-line. When the scalar value and endpoint inclusion are representable exactly, the source cut shall be preserved exactly. Natural metadata infinity shall retain its source infinity-membership distinction when the receiving profile supports it. Included reverse infinities shall require their supported numerical encoding and carrier.
Without a clearing operation, property updates shall compose with entry state: existing true selected OPEN and SPECIAL properties shall be retained, as specified by 🔗 3. Unbounded and signed-infinity boundary assignment and 🔗 1. Normalization of numerical results into boundary properties. Such retention shall not by itself establish an outward-conversion claim when an incompatible entry OPEN property would exclude a source value. Other metadata and the opposite side shall remain unchanged. The return shall be the selected metadata assignment or numerical normalization result, without an aggregate interval-shape guarantee.
Read-only sources shall retain their entry meanings except where output storage overlaps them. Same-type scalar self-assignment and supported scalar/metadata overlaps shall use source values and properties on entry. The caller shall not destroy source properties while preparing the selected destination. Source payloads shall be valid and initialized when active; metadata infinity shall not imply a readable inactive payload. Numerical conversion, resource, policy and caller-owned FPU prerequisites shall retain the selected scalar contracts. Failures shall retain their permitted partial states without additional rollback. No extra library initialization shall be required.
Outward endpoint conversion must preserve strictness when possible and distinguish replacement of a cleared boundary from composition with retained representation properties.
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info, bool should_shrink = false);
Compare exact and inexact finite conversions with independent half-line predicates on destination-representable candidates. Check forced openness, exact membership preservation, natural/reverse infinity profiles, same-side admission, raw/checked scalars, compatible property retention, source preservation, self/borrowed aliases and caller hardware state.
src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
complement shall form an outward representation of the opposite-side cut at the same numerical value with endpoint inclusion reversed. For example, the complement of a finite lower closed cut at v shall be an upper open cut at v; a lower open cut shall become upper closed. neg_assign shall instead represent additive inversion of the source half-line: it shall reverse the side and numerical sign while preserving endpoint inclusion. Signed scalar zero shall retain the selected scalar negation contract.
Destination and source sides shall differ. The requested resulting cut, including any infinity sign and membership, shall be representable by the selected receiving profile; an operation requiring an unsupported empty cut or unsupported reverse-infinity encoding shall be handled by its owning interval rather than inferred from a numerical payload. Finite conversion or negation shall use the receiving side's outward direction, request sufficient relation information for endpoint membership, and normalize the result through 🔗 1. Normalization of numerical results into boundary properties. Exact representable values and membership distinctions shall yield the exact transformed cut.
Selected destination properties shall be clear independently of source entry state, or compatible with the required result. Other entry properties shall retain the additive-update behavior of 🔗 2. Same-side outward boundary conversion and retained properties; opposite-side and cached interval properties shall be preserved. Read-only sources shall be preserved except where destination storage overlaps them. Supported scalar self/borrowed aliases and shared information objects shall use source values and source-side properties on entry.
Scalar validity, numerical availability, resource, policy, thread and caller-owned FPU prerequisites shall retain the corresponding assignment or negation contracts. Metadata infinity shall not require evaluation of an inactive source payload. Failures shall retain the underlying operations' permitted partial states, without additional rollback or initialization.
Logical complement changes inclusion at a fixed cutoff, while additive inversion changes the numerical sign; the two side-reversing transformations require distinct mathematical guarantees.
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result complement(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T, typename Info> Result neg_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info);
Independently transform extended-value/cut-rank models and half-line membership, covering all finite signs, zero, strictness and supported infinity results. Check exact same-profile results and inexact outward conversion, source-side/opposite flags, compatible retained target properties, same-scalar and shared-metadata aliases, returned normalization and FPU preservation.
src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.
Updating min_assign and max_assign shall compare the source cut with the receiving entry cut using 🔗 5. Ordering of interval boundary cuts. If the source is not strictly smaller for minimum or strictly larger for maximum, the receiver shall remain completely unchanged and the return shall be V_EQ. Otherwise the operation shall clear the selected destination boundary properties and convert the winning source through 🔗 2. Same-side outward boundary conversion and retained properties.
The two-source overloads shall select the smaller cut for minimum or the larger for maximum; equality shall select the second source. They shall perform the corresponding same-side boundary assignment, retaining the selected destination properties according to 🔗 2. Same-side outward boundary conversion and retained properties. Callers requiring replacement shall clear those selected properties without changing any source entry properties, or retain only compatible properties. Whenever assignment is required, the selected source side shall match the destination side. Other source sides shall remain valid comparison inputs.
With exact representable scalar values and inclusion distinctions, a replacement shall have the selected source cut exactly. Otherwise it shall retain the outward-conversion meaning and conditions of 🔗 2. Same-side outward boundary conversion and retained properties. Unrelated/opposite-side metadata and cached interval claims shall be preserved. Sources shall be unchanged except for storage that intentionally overlaps the receiver. Same-object sources, scalar output/source overlaps and valid shared information objects shall use source cuts, including openness, on entry; clearing destination properties shall not silently change the selected source's meaning before conversion.
Objects and borrowed references shall remain live and synchronized. Scalar comparison, conversion, resources, policies and hardware state shall meet their respective contracts. No universal rollback, interval-shape result or additional library initialization shall be inferred. The return shall be V_EQ for the unchanged updating case and otherwise the selected boundary assignment's result.
Boundary extrema select ordered cuts, not just numerical minima and maxima; strictness and source-entry aliases are therefore part of the selected value.
Internal header: Boundary_defs.hh; free functions in Parma_Polyhedra_Library::Boundary_NS. Template forms denote admitted scalar and information profiles.
template <typename To, typename To_Info, typename T, typename Info> Result min_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T, typename Info> Result max_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type from_side, const T& from, const Info& info); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result min_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2); template <typename To, typename To_Info, typename T1, typename Info1, typename T2, typename Info2> Result max_assign(Boundary_Type to_side, To& to, To_Info& to_info, Boundary_Type side1, const T1& first, const Info1& info1, Boundary_Type side2, const T2& second, const Info2& info2);
Enumerate independent cut minima/maxima, strict and equal choices, both sides, finite/infinite profiles, exact and inexact output conversion and second-source tie selection. Distinguish untouched updating cases from property-clearing replacements and binary property retention. Verify same-object/scalar/shared-info aliases, selected-source preservation, unrelated metadata and status forwarding.
src/Boundary_defs.hh; tests/intervalboundaryupdatesspec1.cc; tests/intervalboundaryupdateoracle.hh; tests/intervalboundaryoracle.hh.