Hostname: page-component-76d6cb85b7-92wsb Total loading time: 0 Render date: 2026-07-13T13:52:13.899Z Has data issue: false hasContentIssue false

On asynchronous eventful session semantics

Published online by Cambridge University Press:  10 November 2014

DIMITRIOS KOUZAPAS
Affiliation:
Department of Computing, Imperial College London, South Kensington Campus, London SW7 2AZ, United Kingdom School of Computing Science, University of Glasgow, Sir Alwyn Williams Building, Lilybank Gardens, Glasgow G12 8QQ, Scotland Emails: dimitris.kouzapas@googlemail.com, n.yoshida@imperial.ac.uk, raymond.hu05@imperial.ac.uk
NOBUKO YOSHIDA
Affiliation:
Department of Computing, Imperial College London, South Kensington Campus, London SW7 2AZ, United Kingdom
RAYMOND HU
Affiliation:
Department of Computing, Imperial College London, South Kensington Campus, London SW7 2AZ, United Kingdom
KOHEI HONDA
Affiliation:
School of Electronic Engineering and Computer Science, Queen Mary University of London, Mile End Road, London E1 4NS, United Kingdom

Abstract

Event-driven programming is one of the major paradigms in concurrent and communication-based programming, where events are typically detected as the arrival of messages on asynchronous channels. Unfortunately, the flexibility and performance of traditional event-driven programming come at the cost of more complex programs: low-level APIs and the obfuscation of event-driven control flow make programs difficult to read, write and verify.

This paper introduces a π-calculus with session types that models event-driven session programming (called ESP) and studies its behavioural theory. The main characteristics of the ESP model are asynchronous, order-preserving message passing, non-blocking detection of event/message arrivals and dynamic inspection of session types. Session types offer formal safety guarantees, such as communication and event handling safety, and programmatic benefits that overcome problems with existing event-driven programming languages and techniques. The new typed bisimulation theory developed for the ESP model is distinct from standard synchronous or asynchronous bisimulation, capturing the semantic nature of eventful session-based processes. The bisimilarity coincides with reduction-closed barbed congruence.

We demonstrate the features and benefits of ESP and the behavioural theory through two key use cases. First, we examine an encoding and the semantic behaviour of the event selector, a central component of general event-driven systems, providing core results for verifying type-safe event-driven applications. Second, we examine the Lauer–Needham duality, building on the selector encoding and bisimulation theory to prove that a systematic transformation from multithreaded to event-driven session processes is type- and semantics-preserving.

Information

Type
Paper
Copyright
Copyright © Cambridge University Press 2014 

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Article purchase

Temporarily unavailable