Objects and Concurrency in Triveni: A Telecommunication Case Study in Java

01 January 1998

New Image

A key shortcoming in current thread programming models is the lack of support for a notion of abstract behavior, which in a concurrent system is essentially the interaction of the system with its environment. Concretely, let use suppose one is given R, a computer model of a room, that emits temperature readings, Temp(t) events, from time to time (perhaps among others), and accepts HeatOn and HeatOff events. Note that the implementation of R could involve zero, one, or more threads. Consider the task of implementing a thermostat to control the temperature-i.e., to accept Temp(t) events and emit HeatOn and HeatOff events when appropriate. For modularity reasons, we would like to design and implement the thermostat knowing only the interface of R described above. Furthermore, we would like to compose our thermostat with R to yield an activity Controlled sub R that internalizes the Temp(t), HeatOn, and HeatOff events. However, the operations in existing thread programming packages do not directly support this kind of software design. In contrast, formalisms from concurrency theory, such as process algebras (e.g., CCS[Mil89], CSP[Hoa85], ACP[BK85] or the pi-calculus [Mil89]) or synchronous programming languages (e.g., Esterel, Lustre, Signal, Statecharts, Modecharts, etc.; see [BB91, Hal93] for surveys) are designed from the start around behaviors, termed processes. These paradigms then describe a algebra of processes in which, for instance, the parallel composition of two processes yields a process.