Parma Polyhedra Library requirements
C++ rational-grid generator insertion
1. Copying bulk insertion of rational-grid generators PPL-SPEC-001271

add_grid_generators(input) shall add the input points, parameters and lines to a generator description of the receiver, with the meaning in 🔗 1. Rational-grid values, coefficient profile and valid use. For nonempty G = p + H, input points ri, parameters qj and lines lk shall produce p + H + ∑iZ(ri − p) + ∑jZqj + ∑kRlk. In particular, adding points shall form a grid hull, not a finite union.

A system with no stored rows shall be a no-op. If the receiver is empty and the nonempty input has no point, the operation shall throw std::invalid_argument. Otherwise an empty receiver shall acquire exactly the grid generated by the input. A zero-dimensional point shall turn zero-dimensional empty into universe; zero-dimensional universe shall be preserved. Zero parameters omitted by the generator-system contract shall not constitute stored rows.

The input's value, dimension and storage shall be preserved, including when an exception propagates. A current generator-system view borrowed from the receiver may be supplied: its pre-call generators shall be used as the input, and normal receiver-view invalidation shall apply during mutation.

The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.

The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

PPL-SPEC-001272
2. Recycling bulk insertion of rational-grid generators PPL-SPEC-001272

add_grid_generators(std::move(input)) and add_recycled_grid_generators(input) shall produce the same mathematical receiver value, ambient dimension and ordinary input-rejection outcomes as 🔗 1. Copying bulk insertion of rational-grid generators. These operations may transfer ownership from the supplied system. The input shall be a separate writable object; it shall not alias receiver-owned storage. After successful or exceptional return the input shall retain ownership sufficient for destruction. Its rows, dimension, storage and suitability for subsequent queries shall not be assumed.

A receiver discovered empty while converting its congruences shall use the same insertion rules as an already marked empty receiver. Nonempty input without a supporting point shall therefore be rejected; input with a point shall establish the generated grid. Conversion shall not leave subsequent normalization dependent on a nonexistent old supporting point.

The receiver's ambient dimension shall be preserved. Missing coordinates in lower-dimensional input generators shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including empty inputs and empty receivers. The result shall be independent of input order, redundant rows, storage choice and current-description caches. Previously undetected inconsistency shall have the same meaning as empty.

The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Input and receiver objects shall remain live for their specified uses. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. Borrowed receiver views shall follow 🔗 10. Borrowed congruence and generator views of grid values.

PPL-SPEC-001273
3. Copying insertion of a single rational-grid generator PPL-SPEC-001273

add_grid_generator(g) shall add the pre-call generator value to a generator description of the receiver, preserving its ambient dimension. For nonempty G = p + H, adding a point r shall produce p + H + Z(r − p); adding a parameter q shall produce p + H + Zq; adding a line l shall produce p + H + Rl. Insertion of an already supplied generator shall be mathematically idempotent. A zero parameter shall preserve a nonempty grid.

An empty receiver shall accept a point and become that singleton. A parameter or line supplied to empty shall throw std::invalid_argument, including a zero parameter. Previously undetected inconsistency shall have the same meaning as already marked empty. In zero dimensions a point shall establish universe; a parameter shall preserve universe and be rejected by empty.

Missing coordinates shall be zero extended. Greater declared input dimension shall throw std::invalid_argument before receiver mutation, including an empty receiver or a zero parameter. Input type and value shall be captured safely when the argument is borrowed from the receiver's generator view. Receiver mutation may invalidate that view according to 🔗 10. Borrowed congruence and generator views of grid values; the external input case shall preserve its source. The result shall not depend on storage, redundant rows or cache history.

The initialization, arithmetic-profile, lifetime and synchronization conditions in 🔗 1. Rational-grid values, coefficient profile and valid use shall apply, including every intermediate calculation. Resource and numerical exceptions may propagate. Surviving receiver ownership shall permit destruction; rollback or further queries after an exception shall not be assumed. External input descriptors shall retain their value.