CAN/CSA-ISO/IEC 13719-2:2000 – Portable Common Tool Environment (PCTE) – Part 2: C Language Binding

Technical Overview and Implementation Guidance for Canadian Adoption of ISO/IEC 13719-2

Scope of CAN/CSA-ISO/IEC 13719-2:2000

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.

Tip: CAN/CSA-ISO/IEC 13719-2:2000 is functionally identical to the ISO/IEC version, with only editorial changes to reflect Canadian adoption practices. Always refer to the official CSA publication for legal conformance requirements within Canada.

Technical Requirements and C Language Binding

Core API Structure

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

Name and Identifier Rules

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.

Error Handling Conventions

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.

Warning: Implementations must not extend or modify the function signatures defined in the binding. Any deviation breaks conformance and may lead to interoperability failures with other PCTE-based tools.

Implementation Highlights

Compilation and Linking

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 Management

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.

Best Practice: Always pair every PCTE call that returns dynamically allocated memory with a corresponding pfree() to avoid resource leaks. Static analysis tools that understand the PCTE lifecycle can verify this automatically.

Example: Creating an Object

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.

Compliance and Conformance Notes

Required Implementation Features

For a platform to claim conformance with CAN/CSA-ISO/IEC 13719-2:2000, the implementation must:

  • Support all mandatory function groups (OMS, Relationship, Schema, Activity, Access Control) as defined in Clause 5 of the standard.
  • Provide all header files and compile‑time constants specified in Annex A.
  • Pass the validation suite approved by the PCTE Validation Authority (or equivalent body) for C bindings.
  • Support both 32‑bit and 64‑bit pointer models, unless expressly excluded in the conformance statement.

Conditional and Optional Elements

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.

Important: Conformance to CAN/CSA-ISO/IEC 13719-2:2000 does not automatically imply conformance to Part 1 (Abstract Specification) or Part 3 (Ada Binding). Separate compliance declarations are required for each part.

Testing and Certification

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.

Frequently Asked Questions

Q: Is CAN/CSA-ISO/IEC 13719-2:2000 still current?
A: Yes, as of 2026 this standard remains published and available from CSA Group. However, the PCTE technology has largely been superseded by more modern middleware (e.g., CORBA, DDS, REST‑based integration). The standard is retained for legacy environments and specific aerospace/defence systems still using PCTE tool suites.
Q: Can I use the standard for commercial tool development?
A: Absolutely. Conforming to the C binding ensures that your tool can be integrated with other PCTE‑compliant tools without custom adaptation. This reduces integration costs and improves long‑term interoperability. The standard explicitly permits commercial implementation as long as the naming and behavior rules are followed.
Q: Where can I obtain the full text of the standard?
A: The official document is available from CSA Group (csagroup.org) and from ISO national member bodies. Part numbers are CAN/CSA-ISO/IEC 13719-2:00. The PDF includes the complete C header file contents and normative references to ISO C (ISO/IEC 9899).

Footer notice: This article reflects the standard as of 2026. Always verify with the latest CSA publications.

📥 Standard Documents Download

🔒
Please wait 10 seconds, the download links will appear after the ad loads

Leave a Reply

Your email address will not be published. Required fields are marked *