Overview
ISO/IEC 9638-3:1994 specifies the Ada language binding for the Computer Graphics Interface (CGI). CGI (defined in ISO/IEC 9636) is a language‑independent standard interface between device‑independent and device‑dependent parts of a graphics system. Part 3 of ISO/IEC 9638 embeds CGI into Ada by defining Ada packages, type mappings, function/procedure mappings and runtime conventions so Ada applications can call CGI services consistently and portably.
Key topics and requirements
- Language binding mapping: Each CGI function from ISO/IEC 9636 is mapped to Ada procedures (one‑to‑one mapping for most functions; multiple Ada procedures used for generic CGI functions). The document lists corresponding Ada names (e.g., Request/Sample/Echo and Dequeue mappings for each input class).
- Type and representation rules: Defines Ada types, subtypes, arrays, access types and representations for CGI basic types, strings, data records and enumerations. Includes configuration values for integer ranges and fixed‑integer mappings to support variable precisions across hosts.
- Configuration and portability: CGI configuration package (CGI_CONFIG) contains limits and parameters for precision and host-dependent definitions; implementations may adjust these to match machine word sizes while preserving CGI semantics.
- Error handling: Specifies use of the CGI error queue and allows implementations to provide Ada error‑handler facilities. Guidance on detecting and reporting Ada predefined exceptions (e.g., CONSTRAINT_ERROR, STORAGE_ERROR) without interrupting client programs is provided.
- Multi‑tasking and implementation dependencies: Discusses implications of Ada multi‑tasking, host/implementation dependencies and recommendations for portable client programs.
- Packaging and examples: Annexes include Ada package specifications (CGI_CONFIG, CGI_TYPES, utilities, error handling, packing utilities) and sample programs demonstrating typical usage.
Applications and who should use it
- Ada application developers building device‑independent graphics clients or generators that interact with graphical devices.
- System integrators and compiler/runtime implementers who need to provide a conforming Ada CGI library.
- Software architects designing portable graphics systems that separate device‑independent logic from device drivers.
Practical uses include interactive graphical dialogues, input/echo handling, segment management and raster operations in Ada‑based CAD, visualization and embedded HMI systems.
Related standards
- ISO/IEC 9636 (CGI functional specification - Parts 1–6)
- ISO/IEC 9638-1: FORTRAN and 9638-2: PASCAL (other CGI language bindings)
- ISO/IEC 9637 (CGI data stream bindings: character and binary encoding)
Keywords: ISO/IEC 9638-3:1994, CGI Ada binding, Computer Graphics Interface, language bindings, Ada graphics interface, device‑independent graphics, CGI configuration, CGI error handling.