Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
C IPC: 35.080
CAN/CSA-ISO/IEC 13719-2:2000 is the Canadian adoption of the international standard ISO/IEC 13719-2:2000, which defines the C language binding for the Portable Common Tool Environment (PCTE). PCTE is an infrastructure specification designed to support the integration of tools within software engineering environments. Part 2 of the multipart standard specifies the exact syntax and semantics of the C language interfaces that allow tool developers to interact with the PCTE object management system, schema management, and activity control.
The standard applies to any software engineering environment that seeks interoperability across heterogeneous tool suites by adhering to a common runtime foundation. It defines function prototypes, data structures, error handling mechanisms, and naming conventions that ensure portability of C language tool implementations across different PCTE implementation platforms.
The PCTE C binding is organized into several functional service groups, each exposed through a set of header files and library functions. The main groups include:
| Service Group | Prefix | Primary Functions |
|---|---|---|
| Object Management System (OMS) | poms_ | Object creation, deletion, locking, attribute handling |
| Relationship Management | prel_ | Link creation, navigation, cardinality enforcement |
| Schema Management | psch_ | Type definitions, schema versioning, attribute constraints |
| Activity Management | pact_ | Transaction control, concurrency, notifications |
| Access Control | pac_ | Permission checking, ACL manipulation |
All public identifiers exposed by the binding use the prefix pattern shown in the table above, followed by an underscore and a descriptive name. This naming convention minimizes namespace pollution and ensures that applications can safely use other C libraries alongside PCTE code. The standard also defines a set of opaque handle types (e.g., poms_object_t, prel_link_t) that encapsulate internal implementation details.
Functions return a status code of type pstatus_t. The value POK indicates success; all other values correspond to defined error categories. The binding specifies a macro PCHECK(s) that simplifies error checking by branching to an error label when a status is not POK. This pattern is mandatory for production code to comply with the standard’s robustness requirements.
To build an application using the PCTE C binding, developers must include the master header <pcte.h>, which references all other PCTE header files. The binding imposes no strict dependency on a specific compiler, but it does require support for the C standard library functions defined by ISO C. Linking requires the PCTE runtime library (libpcte.so or pcte.lib) that implements the advertised services. The standard mandates that all functions be thread‑safe, so the runtime must protect shared internal data structures through appropriate synchronization primitives.
Memory for returned data (e.g., attribute values, object paths) must be allocated by the binding and freed by the caller using the pfree() function. The standard explicitly prohibits using free() from the C library for memory obtained through PCTE calls, because internal implementations may use different heap strategies. This rule ensures portability across platforms.
pfree() to avoid resource leaks. Static analysis tools that understand the PCTE lifecycle can verify this automatically.The following snippet illustrates the creation of a tool‑specific object using the OMS binding:
#include <pcte.h> poms_object_t obj; pstatus_t st = poms_create_object( &poms_type_tool, /* predefined type */ &obj, NULL, /* default schema */ POMS_OBJECT_EXCLUSIVE); if (st != POK) { /* handle error */ return st; } /* ... use obj ... */ poms_delete_object(obj);
Error handling is omitted for brevity, but a production implementation would use the PCHECK macro or an equivalent pattern.
For a platform to claim conformance with CAN/CSA-ISO/IEC 13719-2:2000, the implementation must:
Certain capabilities, such as notification services and remote object access, are labeled as conditional. Implementations may omit these only if documented in a conformance statement. Any omitted feature must not cause mandatory functions to behave erroneously; instead, conditional functions should return the appropriate “not supported” status code.
Suppliers seeking formal certification should contact the Standards Council of Canada (SCC) for a list of accredited testing laboratories. The standard recommends the use of the PCTE Conformance Test Suite (PCTS) for self‑assessment. A statement of conformance must include the exact version of the implementation, the platform, and a list of any conditional features that are not provided.
—
Footer notice: This article reflects the standard as of 2026. Always verify with the latest CSA publications.