Parma Polyhedra Library requirements
C++ convex-polyhedron affine

C++ convex-polyhedron affine

1. Exact rational polyhedral image
UID: PPL-SPEC-001346
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly {F(x) ∣ x ∈ P} for the entry receiver P, where F(x)v = e(x) ⁄ d and F(x)i = xi for i ≠ v. The denominator shall default to one and its entry value shall be used even when borrowed from receiver-owned constraints or generators. External expressions and scalars shall preserve their values. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers. Singular and constant transformations shall retain the same exactness guarantee; NNC boundary membership shall be preserved.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Rational substitution and generator transport define exact forward and backward affine transformations. Capturing an entry scalar prevents representation changes from changing the transformation.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void affine_image(Variable, const Linear_Expression&,
                 Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check independent rational point images and substituted constraints, singular/constant maps, both denominator signs, all cache histories, borrowed scalar origins and invalid-input preservation.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/affineimage1.cc; tests/Polyhedron/affineimage2.cc; tests/Polyhedron/affinepreimage1.cc; tests/Polyhedron/affinepreimagepending1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001347
2. Exact rational polyhedral preimage
UID: PPL-SPEC-001347
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly {x ∣ F(x) ∈ P} for the entry receiver P, where F(x)v = e(x) ⁄ d and F(x)i = xi for i ≠ v. The denominator shall default to one and its entry value shall be used even when borrowed from receiver-owned constraints or generators. External expressions and scalars shall preserve their values. Zero denominator, invalid target index or excess expression dimension shall throw std::invalid_argument before mutation, including empty receivers. Singular and constant transformations shall retain the same exactness guarantee; NNC boundary membership shall be preserved.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Rational substitution and generator transport define exact forward and backward affine transformations. Capturing an entry scalar prevents representation changes from changing the transformation.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void affine_preimage(Variable, const Linear_Expression&,
                 Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check independent rational point images and substituted constraints, singular/constant maps, both denominator signs, all cache histories, borrowed scalar origins and invalid-input preservation.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/affineimage1.cc; tests/Polyhedron/affineimage2.cc; tests/Polyhedron/affinepreimage1.cc; tests/Polyhedron/affinepreimagepending1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc; src/Constraint_System.cc.

3. Polyhedral variable-update relational image
UID: PPL-SPEC-001348
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly the set of new states x’ related to some entry state x. The relation shall be x’v ⋈ e(x) ⁄ d with other coordinates unchanged. EQUAL, LESS_OR_EQUAL and GREATER_OR_EQUAL shall be supported; NNC receivers shall also support LESS_THAN and GREATER_THAN. Disequality, strict relations on closed receivers, zero denominator, invalid target or excess expression dimension shall throw std::invalid_argument before mutation. Denominator default, entry-value borrowing and external-source preservation shall follow 🔗 1. Exact rational polyhedral image.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Relational updates add existentially chosen target values; reversing a relation must retain its denominator sign and strictness.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void generalized_affine_image(Variable, Relation_Symbol,
    const Linear_Expression&,
    Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check literal interval relations, all admitted symbols, negative denominators, missing target terms, borrowed scalars, open endpoints and rejected symbols/dimensions.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001349
4. Polyhedral variable-update relational preimage
UID: PPL-SPEC-001349
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly the set of old states x having a related state x’ in the entry receiver. The relation shall be x’v ⋈ e(x) ⁄ d with other coordinates unchanged. EQUAL, LESS_OR_EQUAL and GREATER_OR_EQUAL shall be supported; NNC receivers shall also support LESS_THAN and GREATER_THAN. Disequality, strict relations on closed receivers, zero denominator, invalid target or excess expression dimension shall throw std::invalid_argument before mutation. Denominator default, entry-value borrowing and external-source preservation shall follow 🔗 1. Exact rational polyhedral image.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

Relational updates add existentially chosen target values; reversing a relation must retain its denominator sign and strictness.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void generalized_affine_preimage(Variable, Relation_Symbol,
    const Linear_Expression&,
    Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check literal interval relations, all admitted symbols, negative denominators, missing target terms, borrowed scalars, open endpoints and rejected symbols/dimensions.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001350
5. Polyhedral expression-update relational image
UID: PPL-SPEC-001350
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be the exact image of the entry receiver under the relation lhs(x’) ⋈ rhs(x), with every coordinate whose coefficient in lhs is zero unchanged between states. Coordinates occurring in lhs shall be updated jointly, including shared variables with rhs. An identically constant lhs shall impose a filter on the old state. Admitted and rejected relation symbols shall follow 🔗 3. Polyhedral variable-update relational image. Excess dimension in either expression shall throw std::invalid_argument. External expressions shall preserve their values.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

A multi-coordinate left expression constrains a relation among new coordinates; it does not define independent assignments to them.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void generalized_affine_image(const Linear_Expression& lhs,
    Relation_Symbol, const Linear_Expression& rhs);
VERIFICATION_CRITERIA:

Check shared/disjoint supports, constant left/right expressions, singular relations, all admitted symbols, NNC strictness and independently eliminated product-state constraints.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001351
6. Polyhedral expression-update relational preimage
UID: PPL-SPEC-001351
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be the exact preimage of the entry receiver under the relation lhs(x’) ⋈ rhs(x), with every coordinate whose coefficient in lhs is zero unchanged between states. Coordinates occurring in lhs shall be updated jointly, including shared variables with rhs. An identically constant lhs shall impose a filter on the old state. Admitted and rejected relation symbols shall follow 🔗 3. Polyhedral variable-update relational image. Excess dimension in either expression shall throw std::invalid_argument. External expressions shall preserve their values.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

A multi-coordinate left expression constrains a relation among new coordinates; it does not define independent assignments to them.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void generalized_affine_preimage(const Linear_Expression& lhs,
    Relation_Symbol, const Linear_Expression& rhs);
VERIFICATION_CRITERIA:

Check shared/disjoint supports, constant left/right expressions, singular relations, all admitted symbols, NNC strictness and independently eliminated product-state constraints.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/generalizedaffineimage1.cc; tests/Polyhedron/generalizedaffineimage2.cc; tests/Polyhedron/generalizedaffinepreimage1.cc; tests/Polyhedron/generalizedaffinepreimage2.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001352
7. Exact bounded polyhedral affine image
UID: PPL-SPEC-001352
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly the image under ℓ(x) ⁄ d ≤ x’v ≤ u(x) ⁄ d, with all other coordinates unchanged. Both bounds shall use the same old-state values, including when either bound mentions the target. An impossible lower/upper pair shall admit no transition. Negative denominators shall divide the two expressions as written, without silently exchanging their lower/upper roles. The denominator shall default to one and retain its entry value when borrowed from receiver-owned descriptions. Zero denominator, invalid target or excess bound-expression dimension shall throw std::invalid_argument before mutation. External inputs shall preserve their values; NNC input boundary membership shall be retained.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

The bounded relation is conjunction of two old-to-new affine inequalities; temporary dimensions must not change the scalar or mix old and new bound values.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void bounded_affine_image(Variable, const Linear_Expression& lower,
    const Linear_Expression& upper,
    Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check independent product-state elimination, target-dependent bounds, empty transition sets, both denominator signs, borrowed scalars, fractional/strict boundaries and invalid arguments.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedaffineimage1.cc; tests/Polyhedron/boundedaffinepreimage1.cc; tests/Polyhedron/boundedaffineimageempty1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.

PPL-SPEC-001353
8. Exact bounded polyhedral affine preimage
UID: PPL-SPEC-001353
STATUS: APPROVED
COMPONENT: POLYHEDRA
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The result shall be exactly the preimage under ℓ(x) ⁄ d ≤ x’v ≤ u(x) ⁄ d, with all other coordinates unchanged. Both bounds shall use the same old-state values, including when either bound mentions the target. An impossible lower/upper pair shall admit no transition. Negative denominators shall divide the two expressions as written, without silently exchanging their lower/upper roles. The denominator shall default to one and retain its entry value when borrowed from receiver-owned descriptions. Zero denominator, invalid target or excess bound-expression dimension shall throw std::invalid_argument before mutation. External inputs shall preserve their values; NNC input boundary membership shall be retained.

The initialization, lifetime, synchronization, coefficient-profile and failure conditions in 🔗 1. Polyhedral values, coefficient profile and valid use shall apply, including intermediate calculations. Unless dimension-changing behavior is specified, ambient dimension and the receiver's closed or NNC topology shall be preserved. Logically const queries may normalize caches while preserving the represented set; borrowed views shall follow 🔗 2. Equivalent borrowed polyhedral descriptions.

RATIONALE:

The bounded relation is conjunction of two old-to-new affine inequalities; temporary dimensions must not change the scalar or mix old and new bound values.

INTERFACE:

Public header: <ppl.hh>; namespace Parma_Polyhedra_Library. Members belong to Polyhedron and are inherited by both concrete classes unless a concrete class or free function is shown.

void bounded_affine_preimage(Variable, const Linear_Expression& lower,
    const Linear_Expression& upper,
    Coefficient_traits::const_reference=Coefficient_one());
VERIFICATION_CRITERIA:

Check independent product-state elimination, target-dependent bounds, empty transition sets, both denominator signs, borrowed scalars, fractional/strict boundaries and invalid arguments.

SOURCE:

src/Polyhedron_defs.hh; src/Polyhedron_inlines.hh; src/Polyhedron_public.cc; src/Polyhedron_nonpublic.cc; src/Polyhedron_templates.hh; src/C_Polyhedron_defs.hh; src/C_Polyhedron_inlines.hh; src/C_Polyhedron.cc; src/NNC_Polyhedron_defs.hh; src/NNC_Polyhedron_inlines.hh; src/NNC_Polyhedron.cc; tests/Polyhedron/boundedaffineimage1.cc; tests/Polyhedron/boundedaffinepreimage1.cc; tests/Polyhedron/boundedaffineimageempty1.cc; tests/polyhedronaffinespec1.cc; tests/polyhedronaffineoracle.hh; tests/polyhedralaffineborrow1.cc.