C++ octagonal unary export
|
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:
|
|
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. |
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. |
|
|
|
|
|
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. |
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. |
|
|
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); |