Return to search

Communicating Haskell processes

Concurrent programming supports multiple threads of concurrent execution. It is a suitable paradigm for interaction with the outside world, where many inputs (e.g. network packets, key-presses, mouse-clicks) may arrive at any time and need to be dealt with at the same time. Concurrent execution also potentially allows for parallel speed-up; multicore machines are now the standard for new PCs, but the quest to take full advantage of the available parallelism continues. One approach to concurrent programming is process-oriented programming, which uses message-passing and is based on Hoare and Roscoe's Communicating Sequential Processes (CSP). CSP is a process calculus centred on concurrent processes that communicate with each other via synchronous channels. This is used as a formal underpinning for process-oriented programming, either directly (proving behaviours of programs with a CSP model checker) or indirectly (providing sound design principles and patterns). Process-oriented programming has previously been provided in programming languages such as occam-π and libraries for other mainstream languages such as Java and C++. However, as yet process-oriented programming has failed to gain much traction via these implementations; occam-π is rooted in the much older language occam and thus lacks powerful data structures (among other features) which are standard in most modern languages - while languages such as Java and C++, where data is mutable and easily shared, can be an awkward fit to process-oriented programming. Haskell is a functional programming language that is notable for its purity, type-classes, monads and lazy evaluation: modern features that provide interesting and powerful ways to program, including good support for imperative programming. Like other functional languages, it eliminates mutable data - which immediately removes a whole class of problems in concurrent programming. This thesis contends that CSP and process-oriented programming fit well with Haskell. The thesis details the creation of a CSP library for Haskell (Communicating Haskell Processes: CHP) - which features powerful support for process composition - and its further augmentation with capabilities such as support for a new concurrency primitive (conjunction), tracing and the ability to generate formal models of CHP programs. This allows programmers to build concurrent message-passing systems with a strong formal underpinning in a modern programming language, with more features and less complications than process-oriented libraries for other languages.

Identiferoai:union.ndltd.org:bl.uk/oai:ethos.bl.uk:544096
Date January 2011
CreatorsBrown, Neil Christopher Charles
PublisherUniversity of Kent
Source SetsEthos UK
Detected LanguageEnglish
TypeElectronic Thesis or Dissertation
Sourcehttps://kar.kent.ac.uk/33880/

Page generated in 0.0017 seconds