Edinburgh Research Archive

Typed concurrent functional programming with channels, actors and sessions

dc.contributor.advisor
Lindley, Sam
en
dc.contributor.advisor
Wadler, Philip
en
dc.contributor.author
Fowler, Simon John
en
dc.contributor.sponsor
Engineering and Physical Sciences Research Council (EPSRC)
en
dc.date.accessioned
2019-07-25T14:33:37Z
dc.date.available
2019-07-25T14:33:37Z
dc.date.issued
2019-07-01
dc.description.abstract
The age of writing single-threaded applications is over. To develop scalable applications, developers must make use of concurrency and parallelism. Nonetheless, introducing concurrency and parallelism is difficult: naïvely implemented, concurrent code is prone to issues such as race conditions and deadlocks. Moving to the distributed setting introduces yet more issues, in particular the possibility of failure. To cope with many of the problems of concurrent programming, language designers have proposed a class of programming languages known as communication-centric programming languages, which provide lightweight processes which do not share memory, but instead communicate using explicit message passing. The focus of this thesis is on typed communication-centric functional programming languages, using type systems to provide static guarantees about the runtime behaviour of concurrent programs. We investigate two strands of work: the relationship between typed channel- and actor-based languages, and the integration of asynchrony, exception handling, and session types in a functional programming language. In the first strand, we investigate two particular subclasses of communication-centric languages: channel-based languages such as Go, and languages based on the actor model, such as Erlang. We distil the essence of the languages into two concurrent λ-calculi: λch for simply-typed channels, and lact for simply-typed actors, and provide type- and semantics-preserving translations between them. In doing so, we clear up confusion between the two models, give theoretical foundations for recent implementations of type-parameterised actors, and also provide a theoretical grounding for frameworks which emulate actors in channel-based languages. Furthermore, by extending the core calculi, we note that actor synchronisation drastically simplifies the translation from channels into actors, and show that Erlang’s selective receive mechanism can be implemented without specialised constructs. In the second strand, we integrate session types, asynchrony, and exception handling in a functional programming language. Session types are a behavioural type system for communication channel endpoints, allowing conformance to protocols to be checked statically. We provide the first integration of exception handling and asynchronous session types in a core functional language, Exceptional GV, and prove that it satisfies preservation, global progress, and that it is confluent and terminating. We demonstrate the practical applicability of the approach by extending the Links tierless web programming language with exception handling, in turn providing the first implementation of exception handling in the presence of session types in a functional language. As a result, we show the first application of session types to web programming, providing examples including a two-factor authentication workflow and a chat application.
en
dc.identifier.uri
http://hdl.handle.net/1842/35873
dc.language.iso
en
dc.publisher
The University of Edinburgh
en
dc.relation.hasversion
Simon Fowler, Sam Lindley, and Philip Wadler. Mixing metaphors: Actors as channels and channels as actors. In Peter Müller, editor, ECOOP, volume 74 of Leibniz International Proceedings in Informatics (LIPIcs), pages 11:1–11:28, Dagstuhl, Germany, 2017. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. doi: 10.4230/LIPIcs.ECOOP.2017.11
en
dc.relation.hasversion
Simon Fowler, Sam Lindley, J. Garrett Morris, and Sára Decova. Exceptional asynchronous session types: Session types without tiers. Proc. ACM Program. Lang., 3(POPL): 28:1–28:29, Jan 2019. doi: 10.1145/3290341
en
dc.relation.hasversion
Simon Fowler. An Erlang implementation of multiparty session actors. In ICE, volume 223 of EPTCS, pages 36–50, 2016.
en
dc.subject
session types
en
dc.subject
functional programming
en
dc.subject
concurrent programming
en
dc.subject
lambda calculus
en
dc.subject
programming languages
en
dc.title
Typed concurrent functional programming with channels, actors and sessions
en
dc.type
Thesis or Dissertation
en
dc.type.qualificationlevel
Doctoral
en
dc.type.qualificationname
PhD Doctor of Philosophy
en

Files

Original bundle

Now showing 1 - 1 of 1
Name:
Fowler2019.pdf
Size:
1.8 MB
Format:
Adobe Portable Document Format

This item appears in the following Collection(s)