The Dreams object oriented system has been described and demonstrated as a message passing object oriented extension to the Forth language. It is rather unusual as object oriented systems go since it uses a dynamic binding technique. The advantages of dynamic binding are that it permits determination of object binding at run time instead of compile time, and that it eliminates the need for run time method searching and the associated run time overhead. These advantages make Dreams a viable candidate for real-time object oriented applications.
Several types of binding and scoping have been described and differentiated. Dynamic binding has been described and contrasted to early binding and to method searching late binding. The importance of dynamic binding in implementing the Dreams system has been brought out.
Techniques for implementing Dreams in various Forth systems employing different threading strategies have been elaborated upon, with emphasis placed on what restrictions might apply, and the efficiency of the implementation.
Multitasking introduces the need for a context switching mechanism, and the context in a Dreams based application includes all of the altered bindings currently active in each of the tasks. The complications of context switching in a dynamically bound multitasking environment have been exposed and the efficiency of such a context switch studied for different implementations.
An example of a working implementation of Dreams has been discussed, and source code for the implementation has been provided.
A description of a hardware implementation of the dynamic binding mechanism used by Dreams has been presented. This hardware appears viable for embedded systems applications that need maximum performance in multitasking situations. The added hardware for typical embedded systems could probably be placed right on the chip with the Forth engine and stack controller. If larger binding environments need to be supported, more expensive off-chip implementations could be developed.