Parma Polyhedra Library requirements
Library version and banner access

Library version and banner access

PPL-SPEC-001578
1. Configured version components and borrowed metadata strings
UID: PPL-SPEC-001578
STATUS: APPROVED
COMPONENT: LIBRARY_WIDE
APPLICABILITY: IF_CPP
VERIFICATION_METHODS: Test, Analysis, Inspection
LANGUAGE: CPP
VISIBILITY: Public
RELATIONS (Parent):
STATEMENT:

The version-component functions shall return the configured values denoted by PPL_VERSION_MAJOR, PPL_VERSION_MINOR, PPL_VERSION_REVISION and PPL_VERSION_BETA in the matching public header. version() shall return a nonnull NUL-terminated string equal to PPL_VERSION. Its form shall be M.m, followed by .r when the revision is nonzero and preb when the beta component is nonzero, with decimal component values.

banner() shall return nonnull NUL-terminated information identifying the Parma Polyhedra Library, its version, licensing and warranty conditions, build compiler and sources of further information. Both strings shall be borrowed immutable library storage, valid for the library's lifetime, requiring no allocation or deallocation by the caller. Repeated queries shall not mutate library state or the returned strings. Clients shall use matching public headers and library binaries.

RATIONALE:

Clients need a stable way to identify the linked library without confusing its compiler metadata with the client build.

INTERFACE:

Configured public header: version.hh, generated from version.hh.in and included in ppl.hh. Namespace: Parma_Polyhedra_Library.

unsigned version_major();
unsigned version_minor();
unsigned version_revision();
unsigned version_beta();
const char* version();
const char* banner();
VERIFICATION_CRITERIA:

Compare all four components and version spelling with matching configured macros. Check repeated pointer/content stability, library/version/licensing/compiler information in the banner and preservation across ordinary library use.

SOURCE:

src/version.hh.in; src/version.cc; tests/version1.cc.