Parma Polyhedra Library requirements
C++ octagonal descriptor addition and refinement
1. Addition of supported octagonal constraints PPL-SPEC-001167

add_constraint(c) shall conjoin the receiver with the target-profile normalization of the admitted constraint c. The nonconstant supported forms shall be unary bounds and signed two-coordinate bounds with equal nonzero coefficient magnitudes, including equalities. Constant tautologies shall have no effect; constant falsehoods shall make the receiver empty. Constant strict conditions shall retain their truth value. A nonconstant strict constraint or an unsupported nonconstant linear form shall throw std::invalid_argument without changing the receiver's represented set.

For a unary normalized inequality sxi ≤ b, its stored primitive bound shall be the least admitted target bound at least 2b in the doubled-unary encoding. For a binary normalized inequality sixi + sjxj ≤ b, the bound shall be the least admitted target bound at least b. Signs shall belong to { − 1, 1}. Each side of an equality shall have its own outward bound. The result shall be exactly the intersection of the entry set with these normalized target inequalities; when the normalized bounds are exact, this shall be the concrete conjunction. Every entry point satisfying c shall be retained.

add_constraints(cs) and add_recycled_constraints(cs) shall conjoin all admitted system rows with the same normalization and validation rules. A descriptor or system dimension at most the receiver dimension shall be accepted, with zero coefficients in omitted trailing coordinates. A larger dimension shall throw std::invalid_argument before changing the receiver's represented set. An empty receiver shall still undergo these validation rules.

An ordinary copying call shall preserve its source descriptor or system. The result shall not borrow source storage. After a recycled-system call, including exceptional return, the only required property of cs shall be safe destruction. A rejected system need not undo earlier accepted rows; no particular row visitation order shall be promised.

The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved. Recycled sources shall retain their explicit destruction-only guarantee.

PPL-SPEC-001168
2. Addition of supported octagonal congruences PPL-SPEC-001168

add_congruence(cg) shall accept congruence equalities whose expression is an admitted unary or equal-magnitude signed two-coordinate equality, together with constant tautologies and falsehoods. An accepted equality shall conjoin the two outward-normalized inequalities defined in 🔗 1. Addition of supported octagonal constraints. A tautology shall have no effect; a falsehood shall make the receiver empty.

A nontrivial proper congruence or an unsupported nonconstant equality shall throw std::invalid_argument without changing the receiver's represented set. An adding call shall not silently discard a nontrivial periodic restriction. add_congruences(cgs) and add_recycled_congruences(cgs) shall apply these rules to the system.

A descriptor or system dimension above the receiver dimension shall throw std::invalid_argument before changing its represented set, including on an empty receiver. Smaller dimensions shall have zero trailing coefficients. Ordinary copying forms shall preserve their source values and shall not borrow their storage. A recycled system shall be required only to remain safely destructible after normal or exceptional return. If a later system row is rejected, preceding accepted rows need not be rolled back; no row visitation order shall be promised.

The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved. Recycled sources shall retain their explicit destruction-only guarantee.

PPL-SPEC-001169
3. Conservative refinement by linear constraints PPL-SPEC-001169

refine_with_constraint(c) shall refine the receiver by an admitted linear constraint without rejecting a row merely because its nonconstant form is not octagonal. A supported closed unary or equal-magnitude signed binary row shall have the outward-normalized conjunction in 🔗 1. Addition of supported octagonal constraints. A supported nonconstant strict inequality shall first be relaxed to its non-strict counterpart and then normalized. An unsupported nonconstant linear form shall have no effect.

Constant true rows shall have no effect and constant false rows shall make the receiver empty, including the strict false condition 0 > 0. An empty receiver shall remain empty. refine_with_constraints(cs) shall apply these rules to the entire conjunction. For entry set X, exact condition set C and result R, X∩C ⊆ R ⊆ X shall hold. For a system, the represented result shall be the intersection with all the retained, relaxed and outward-normalized rows; ignored rows shall impose no restriction.

Source dimensions at most the receiver dimension shall be admitted with zero trailing coefficients. A larger descriptor or system dimension shall throw std::invalid_argument before changing the receiver's represented set, including when the receiver is empty. Copying calls shall preserve source descriptors and own any resulting bounds independently. Exceptions during a system call need not roll back previously applied refinements.

The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.

PPL-SPEC-001170
4. Conservative refinement by congruences PPL-SPEC-001170

refine_with_congruence(cg) shall conjoin an octagonal congruence equality using the outward-normalized opposite inequalities in 🔗 1. Addition of supported octagonal constraints. An unsupported nonconstant equality shall have no effect. A proper constant false congruence shall make the receiver empty; other proper congruences shall have no effect. A tautology shall have no effect. The real carrier in 🔗 1. Octagonal values, numerical profiles and valid use shall remain unchanged; ignored periodic information shall not turn this call into an integer-valued state restriction.

refine_with_congruences(cgs) shall apply those rules to the conjunction. For entry set X, supplied congruence set C and result R, X∩C ⊆ R ⊆ X shall hold. The result shall equal the intersection with all accepted normalized equality rows, unless a false row makes it empty. Empty receivers shall remain empty.

Larger descriptor or system dimensions shall throw std::invalid_argument before changing the receiver's represented set, including on empty receivers. Smaller dimensions shall use zero trailing coefficients. Copying calls shall preserve their source values; result bounds shall not borrow source storage. A system call that throws need not roll back preceding accepted refinements.

The valid-use, numerical-profile, initialization, supported native floating runtime and synchronization prerequisites in 🔗 1. Octagonal values, numerical profiles and valid use shall apply. All operands and input descriptors shall remain live and valid during the call. The implementation shall respect the preconditions of its selected numerical policies in intermediate operations on admitted inputs. The ambient dimension and coordinate identities shall be preserved.

Declared numerical, allocation and cooperative-abandonment exceptions may propagate. Temporary resources acquired by the operation shall be released on exceptional return. After these exceptions the receiver shall remain safely destructible; its entry represented set need not be preserved.