Parma Polyhedra Library requirements
C++ geometric relation assertion values

C++ geometric relation assertion values

UID:
VERSION:
CLASSIFICATION:
PREFIX:
Type
Level
MID
UID
REFS
Title
Statement
Rationale
Comment
BIBLIOGRAPHY
STATUS
COMPONENT
APPLICABILITY
VERIFICATION_METHODS
VERIFICATION_CRITERIA
SOURCE
LANGUAGE
VISIBILITY
INTERFACE
SW_SPEC
1
PPL-SPEC-000541

Poly_Con_Relation shall represent a finite set A of named assertions. nothing() shall return the empty assertion set. The factories is_disjoint(), strictly_intersects(), is_included(), saturates() shall return the corresponding singleton sets. The four atoms shall assert, respectively, disjointness from the constraint satisfying set, intersection without inclusion in that set, inclusion in that set, and vanishing of the constraint's affine expression at every represented point. A domain query shall supply the interpretation applicable to its accepted descriptor and domain.

Every subset of the named atoms shall be a valid value, including combinations that cannot describe a particular nonempty geometric object. An empty assertion set shall state no fact; absence of an atom shall not assert its negation. Operations on these values shall require live initialized objects and synchronized access against mutation. They shall require no library or thread initialization owner, coefficient-constant stage or FPU setup. Numerical coefficient limits shall not restrict the assertion algebra.

Named assertions communicate facts without confusing an absent assertion with a negative answer or closing the stored facts under geometric reasoning.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Construct every subset from named factories, compare singleton memberships and empty values, and exercise the complete algebra without initialization owners in every selected configuration.

src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

class Poly_Con_Relation;
static Poly_Con_Relation nothing();
static Poly_Con_Relation is_disjoint();
static Poly_Con_Relation strictly_intersects();
static Poly_Con_Relation is_included();
static Poly_Con_Relation saturates();
SW_SPEC
2
PPL-SPEC-000542
PPL-SPEC-000542
Constraint-relation value copying and lifetime

Copy construction and assignment of Poly_Con_Relation shall preserve exactly the source assertion set. Assignment shall return the destination reference and admit self-assignment. Later assignment of either object shall leave the other unchanged, and either object shall remain usable after destruction of its source or copy. Destruction shall require no external lifetime owner. An rvalue may be copied; it shall not require an empty moved-from source. The validity and initialization prerequisites in ๐Ÿ”— 1. Constraint-relation assertion values and named factories shall apply.

Relation results are independent small values that callers retain after queries and temporary operands disappear.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check every representable assertion set through copy construction, assignment, self-assignment, rvalue copying, independent subsequent assignments and destruction of a temporary source.

src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

Poly_Con_Relation(const Poly_Con_Relation& y);
Poly_Con_Relation& operator=(const Poly_Con_Relation& y);
~Poly_Con_Relation();
SW_SPEC
3
PPL-SPEC-000543
PPL-SPEC-000543
Constraint-relation conjunction, subtraction and implication

For assertion sets A and B represented by x and y, x && y shall represent AโˆชB, and x - y shall represent AโงตB. x.implies(y) shall return true exactly when Bโ€‰โІโ€‰A. Equality shall return true exactly when Aโ€‰=โ€‰B; inequality shall be its logical negation. These operations shall preserve both operands and admit the same object in both positions.

Implication shall inspect asserted membership only: it shall neither infer additional geometric facts from an atom nor use inconsistent combinations to infer unstored atoms. Subtracting an absent assertion shall have no effect; subtracting a value from itself shall yield nothing(). The prerequisites in ๐Ÿ”— 1. Constraint-relation assertion values and named factories shall apply.

The algebra combines and selects known assertions; it does not solve a new geometric relation problem.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Compare every pair of assertion subsets with an independent finite-set union, difference, reverse-inclusion and equality model. Check aliases, unchanged operands, empty identities and self subtraction.

src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

Poly_Con_Relation operator&&(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
Poly_Con_Relation operator-(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
bool implies(const Poly_Con_Relation& y) const;
bool operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
bool operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
SW_SPEC
4
PPL-SPEC-000544
PPL-SPEC-000544
Constraint-relation flag encoding and validity

get_flags() shall return the unsigned bitwise union of the masks of exactly the stored atoms. nothing() shall have mask zero. is_disjoint(), strictly_intersects(), is_included() and saturates() shall have masks 1, 2, 4 and 8, respectively. OK() shall return true for every value obtained from named factories, copying, assignment and the assertion algebra. Both queries shall preserve the value. Their prerequisites shall follow ๐Ÿ”— 1. Constraint-relation assertion values and named factories.

Language bindings need a stable encoding of the named assertions. Geometric realizability is separate from the validity of a result value.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check literal singleton masks, zero and every combined mask against independent membership, and check validity after all factory, ownership and algebra histories.

src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

unsigned int get_flags() const;
bool OK() const;
SW_SPEC
5
PPL-SPEC-000545
PPL-SPEC-000545
Constraint-relation textual output and stream failures

Stream output and ascii_dump(s) shall emit exactly the stored assertion names in the order IS_DISJOINT, STRICTLY_INTERSECTS, IS_INCLUDED, SATURATES, separated by `` & `` when more than one is present. The empty set shall emit NOTHING. No trailing separator, newline or numeric flag mask shall be added. The insertion operator shall return the same stream reference. No-argument ascii_dump() and print() shall emit the same representation to std::cerr.

Output shall preserve the relation value and stream formatting flags and precision; any pending field width shall follow ordinary string-insertion semantics. Stream errors shall follow the stream's error-state and exception-mask rules; a reported stream failure need not roll back bytes already emitted. Calls shall require valid live streams and the prerequisites in ๐Ÿ”— 1. Constraint-relation assertion values and named factories, with caller synchronization for shared output streams. Text output shall not provide a corresponding relation-value input operation.

Stable names make compound answers readable while ordinary C++ stream failures remain visible to the caller.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check exact text for every assertion subset through stream insertion and ASCII output, capture both no-argument outputs, retain stream identity and formatting, and inject returning and throwing stream-buffer failures with unchanged source values.

src/Poly_Con_Relation_defs.hh; src/Poly_Con_Relation_inlines.hh; src/Poly_Con_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Con_Relation. Stream insertion belongs to IO_Operators.

void ascii_dump(std::ostream& s) const;
void ascii_dump() const;
void print() const;
std::ostream& operator<<(std::ostream& s, const Poly_Con_Relation& r);
SW_SPEC
6
PPL-SPEC-000546

Poly_Gen_Relation shall represent a finite set A of named assertions. nothing() shall return the empty assertion set. The factories subsumes() shall return the corresponding singleton sets. The atom shall assert that adding the generator would not change the represented set, under the applicable domain and generator-kind interpretation.

The empty assertion set and the singleton subsumption assertion shall both be valid values. The empty set shall state no fact; absence of the subsumption assertion shall not assert its negation. Operations on these values shall require live initialized objects and synchronized access against mutation. They shall require no library or thread initialization owner, coefficient-constant stage or FPU setup. Numerical coefficient limits shall not restrict the assertion algebra.

Named assertions communicate facts without confusing an absent assertion with a negative answer or closing the stored facts under geometric reasoning.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Construct every subset from named factories, compare singleton memberships and empty values, and exercise the complete algebra without initialization owners in every selected configuration.

src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

class Poly_Gen_Relation;
static Poly_Gen_Relation nothing();
static Poly_Gen_Relation subsumes();
SW_SPEC
7
PPL-SPEC-000547
PPL-SPEC-000547
Generator-relation value copying and lifetime

Copy construction and assignment of Poly_Gen_Relation shall preserve exactly the source assertion set. Assignment shall return the destination reference and admit self-assignment. Later assignment of either object shall leave the other unchanged, and either object shall remain usable after destruction of its source or copy. Destruction shall require no external lifetime owner. An rvalue may be copied; it shall not require an empty moved-from source. The validity and initialization prerequisites in ๐Ÿ”— 6. Generator-relation assertion values and named factories shall apply.

Relation results are independent small values that callers retain after queries and temporary operands disappear.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check every representable assertion set through copy construction, assignment, self-assignment, rvalue copying, independent subsequent assignments and destruction of a temporary source.

src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

Poly_Gen_Relation(const Poly_Gen_Relation& y);
Poly_Gen_Relation& operator=(const Poly_Gen_Relation& y);
~Poly_Gen_Relation();
SW_SPEC
8
PPL-SPEC-000548
PPL-SPEC-000548
Generator-relation conjunction, subtraction and implication

For assertion sets A and B represented by x and y, x && y shall represent AโˆชB, and x - y shall represent AโงตB. x.implies(y) shall return true exactly when Bโ€‰โІโ€‰A. Equality shall return true exactly when Aโ€‰=โ€‰B; inequality shall be its logical negation. These operations shall preserve both operands and admit the same object in both positions.

Implication shall inspect asserted membership only: it shall neither infer additional geometric facts from an atom nor use inconsistent combinations to infer unstored atoms. Subtracting an absent assertion shall have no effect; subtracting a value from itself shall yield nothing(). The prerequisites in ๐Ÿ”— 6. Generator-relation assertion values and named factories shall apply.

The algebra combines and selects known assertions; it does not solve a new geometric relation problem.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Compare every pair of assertion subsets with an independent finite-set union, difference, reverse-inclusion and equality model. Check aliases, unchanged operands, empty identities and self subtraction.

src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

Poly_Gen_Relation operator&&(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
Poly_Gen_Relation operator-(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
bool implies(const Poly_Gen_Relation& y) const;
bool operator==(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
bool operator!=(const Poly_Gen_Relation& x, const Poly_Gen_Relation& y);
SW_SPEC
9
PPL-SPEC-000549
PPL-SPEC-000549
Generator-relation flag encoding and validity

get_flags() shall return the unsigned bitwise union of the masks of exactly the stored atoms. nothing() shall have mask zero. subsumes() shall have mask 1. OK() shall return true for every value obtained from named factories, copying, assignment and the assertion algebra. Both queries shall preserve the value. Their prerequisites shall follow ๐Ÿ”— 6. Generator-relation assertion values and named factories.

Language bindings need a stable encoding of the named assertions. Geometric realizability is separate from the validity of a result value.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check literal singleton masks, zero and every combined mask against independent membership, and check validity after all factory, ownership and algebra histories.

src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

unsigned int get_flags() const;
bool OK() const;
SW_SPEC
10
PPL-SPEC-000550
PPL-SPEC-000550
Generator-relation textual output and stream failures

Stream output and ascii_dump(s) shall emit exactly the stored assertion as SUBSUMES for the singleton subsumption assertion. The empty set shall emit NOTHING. No trailing separator, newline or numeric flag mask shall be added. The insertion operator shall return the same stream reference. No-argument ascii_dump() and print() shall emit the same representation to std::cerr.

Output shall preserve the relation value and stream formatting flags and precision; any pending field width shall follow ordinary string-insertion semantics. Stream errors shall follow the stream's error-state and exception-mask rules; a reported stream failure need not roll back bytes already emitted. Calls shall require valid live streams and the prerequisites in ๐Ÿ”— 6. Generator-relation assertion values and named factories, with caller synchronization for shared output streams. Text output shall not provide a corresponding relation-value input operation.

Stable names make compound answers readable while ordinary C++ stream failures remain visible to the caller.

APPROVED
LIBRARY_WIDE
IF_CPP
Test, Analysis, Inspection

Check exact text for every assertion subset through stream insertion and ASCII output, capture both no-argument outputs, retain stream identity and formatting, and inject returning and throwing stream-buffer failures with unchanged source values.

src/Poly_Gen_Relation_defs.hh; src/Poly_Gen_Relation_inlines.hh; src/Poly_Gen_Relation.cc; tests/relationvaluesspec1.cc.

CPP
Public

Public header: <ppl.hh>. Names belong to Parma_Polyhedra_Library; member signatures apply to Poly_Gen_Relation. Stream insertion belongs to IO_Operators.

void ascii_dump(std::ostream& s) const;
void ascii_dump() const;
void print() const;
std::ostream& operator<<(std::ostream& s, const Poly_Gen_Relation& r);