Parma Polyhedra Library requirements
C++ interval assignment and set operations
PPL-SPEC-000711
1. Interval assignment and directed enclosure PPL-SPEC-000711

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.

PPL-SPEC-000712
2. Interval hull assignment PPL-SPEC-000712

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.

PPL-SPEC-000713
3. Geometric interval union gap decision PPL-SPEC-000713

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.

PPL-SPEC-000714
4. Interval intersection assignment PPL-SPEC-000714

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.

PPL-SPEC-000715
5. Interval enclosure of set difference PPL-SPEC-000715

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.