The Semantics of Triveni: A Process-Algebraic API for Threads + Events Christopher Colby Lalita Jategaonkar Jagadeesan Radha Jagadeesan Konstantin L¨ aufer Carlos Puchol May 17, 1998 1 Introduction This paper describes compositional semantics (operational, denotational and logical) for a process algebra enhanced with input/output actions and preemption combinators, in the presence of fairness. The context of this paper is Triveni, a process-algebra-based design methodology that combines threads and events in the context of object-oriented programming [CJJ 98a, CJJ 98b]. Triveni has been realized as an API, JavaTriveni [CJJ 98a], in the Java programming language. A case study in JavaTriveni is described in [CJJ 98b], involving the re-implementation of a piece of telecommunication software – the Carrier Group Alarms (CGA) software of Lucent Technologies’ 5ESS switch. The semantics described in this paper is closely tied to the JavaTriveni programming lan- guage and environment. In particular, the design and implementation of JavaTriveni motivate the combination of features described in our semantics and the criteria placed on our semantic study. The operational model described in this paper is the precise formalization of the JavaTriveni implementation. The denotational semantics serves as the basis for a non-definability result. This result justifies the introduction of certain powerful preemption combinators as primitives in JavaTriveni. The logical semantics forms the basis of our specification-based testing environment for JavaTriveni. The underlying process algebra and communication model. Triveni is based on a process algebra that adds preemption combinators [Ber93] to the standard combinators from process algebra such as parallel composition, waiting for events, hiding events, and so forth. The Java event model is based on the Observer pattern 1 [GHJV95]; hence, compatibility requirements with event models based on this pattern dictate certain aspects of the process algebra. Criterion 1.1 The communication model is multicast; the processes are input-enabled [LT89, Dil88, Jos92] and output actions cannot block [Vaa91]. Loyola University Chicago: colby,radha,laufer @math.luc.edu Lucent Technologies, Bell Labs: lalita,cpg @research.bell-labs.com 1 In the Observer pattern events are generated by event sources (subjects), and one or more listeners (observers) can register with a source to be notified about events of a particular kind. 1