The Implementation of Ada 2005 Synchronized Interfaces in the GNAT Compiler
One of the most important ob ject-oriented features of the new revision of the Ada Programming Language is the introduction of Abstract Interfaces to provide a form of multiple inheritance. Ada 2005 Abstract Interface Types are akin to Java interfaces, and as such support inheritance of specification rather than inheritance of implementation. Ada 2005 interfaces apply as well to tasks and protected types, and provide a classification mechanism for concurrent program- ming that goes considerably beyond the capabilities of Java. This paper summarizes the implementation in the GNAT compiler of the various kinds of interfaces that relate to concurrent programming in Ada 2005. The implementation is efficient, and involves mostly modifications to the com- piler front-end, with virtually minimal impact on run-time structures, beyond those that are in place to support regular interfaces. However, the implementation of interface operations as triggers in selective waits and asynchronous transfers of control proved to be surprisingly delicate and requires additional predefined primitive operations.