An Experiment in Distributed Program Design, Using Control Enrichment

SyncFactory (CreateSyncronizable) CreateEventDispatcher =̂ [ ed! : ↓EventDispatcher ] CreateSynchronizable0 =̂ [ src? : S; sbl! : ↓Synchronizable} ] AttachEventDispatcher =̂ [ sbl? : ↓Synchronizable}; ed? : EventDispatcher ] • if sbl? 6= null then sbl?.SetEventDispatcher(ed?) CreateSynchronizable =̂ ((CreateEventDispatcher ‖ CreateSynchronizable0) ‖! AttachEventDispatcher) \ (ed!) The parallel composition operator ‖! is a variation of the parallel operator ‖ . The difference is that ‖! does not hide the output of a matching input/output G.5 SyncFactoryImpl 305 communication pair. The operation CreateSynchronizable hides the output ed! but leaves the created sbl! exposed. It is up to the concrete factories to decide which types synchronizable objets should be created and how, and to decide which event dispatching strategy (active or passive, shared or multiple) should be applied. It also suggests the inheriting factories should only make the operation CreateSynchronizable visible to the clients.