• Contents
  • Abstract Chapter 2

  • Abstract Chapter 3

  • Abstract Chapter 4
  • Abstract Chapter 5
  • Abstract Chapter 6
  • Summary
  • Samenvatting

  • Interleaved Interactive Functional Processes

    In this chapter we present a functional interleaved event I/O system. This system is a generalization of the event I/O system as incorporated into the lazy, purely functional programming language Clean. The interleaved event I/O system offers features that are more commonly found outside the functional scene. These features are dynamic process creation, and two well-known forms of inter-process communication: data sharing and message passing. In our system both forms of communication are polymorphic and type-safe. Both forms of communication can use higher-order functions and arbitrarily complex algebraic types. Communication by data sharing is a restricted form of communication by global data structures. Nevertheless, the new system is still completely functional because the generalization is done within the pure functional framework. The interleaved event I/O system can be regarded as an executable operational semantics of a mini operating system for dynamic, interactive, functional processes. The system has been implemented and will become part of the new release of Clean.