Next: Features(OATH) Up: OATH Top: Top

3.1.1. OATH Introduction

OATH instantiates an approach to C++ class hierarchy design that exploits subtyping polymorphism, provides greater implementation independence, and supports implicit memory management of its objects. It is implemented via parallel hierarchies of internal types and accessors (a concept similar to that of the "smart pointers", but improved compared to them). The internal types contain the object representation (the data members) and the virtual functions. The accessor types contain all of the externally accessible functions of the abstract types.

Two main design goals of OATH were:

To provide a meaningful abstract type hierarchy that is consistent with the concepts being modelled by utilizing a strict subtyping approach to hierarchy design. Starting from the the idea that a type hierarchy should be designed to reflect the behaviour of the objects being modelled and not to reflect the most convenient computer representation of objects, the designer of OATH gave priority to the subtyping (inheriting functionality) aspect over the code reuse (inheriting implementation) aspect. Given a consistent abstract type hierarchy, implementation classes can be added at the leaves of the hierarchy (see figure later on) to implement the behaviour of the abstract types. Code reuse can be exploited at this phase, but should not enter into the design of the abstract type hierarchy.

To provide robust garbage collection (GC) of OATH objects, fully implemented within a portable C++ class library. The garbage collection mechanism is a hybrid reference counting and marking algorithm capable of collecting all garbage (including circular references). The programmer can select one of four garbage collection modes at compile time: no GC, incremental GC, stop-and-collect, or combined.