47 research outputs found
Multiparty Session Actors
Actor coordination armoured with a suitable protocol description language has
been a pressing problem in the actors community. We study the applicability of
multiparty session type (MPST) protocols for verification of actor programs. We
incorporate sessions to actors by introducing minimum additions to the model
such as the notion of actor roles and protocol mailbox. The framework uses
Scribble, which is a protocol description language based on multiparty session
types. Our programming model supports actor-like syntax and runtime
verification mechanism guaranteeing type-safety and progress of the
communicating entities. An actor can implement multiple roles in a similar way
as an object can implement multiple interfaces. Multiple roles allow for
inter-concurrency in a single actor still preserving its progress property. We
demonstrate our framework by designing and implementing a session actor library
in Python and its runtime verification mechanism.Comment: In Proceedings PLACES 2014, arXiv:1406.331
Multiparty session actors
Actor coordination armoured with a suitable protocol description language has been
a pressing problem in the actors community. We study the applicability of multiparty session type
(MPST) protocols for verification of actor programs. We incorporate sessions to actors by introducing
minimum additions to the model such as the notion of actor roles and protocol mailboxes. The
framework uses Scribble, which is a protocol description language based on multiparty session types.
Our programming model supports actor-like syntax and runtime verification mechanism guaranteeing
communication safety of the participating entities. An actor can implement multiple roles in a
similar way as an object can implement multiple interfaces. Multiple roles allow for cooperative
inter-concurrency in a single actor. We demonstrate our framework by designing and implementing a
session actor library in Python and its runtime verification mechanism. Benchmark results demonstrate
that the runtime checks induce negligible overhead. We evaluate the applicability of our verification
framework to specify actor interactions by implementing twelve examples from an actor benchmark
suit
An Erlang Implementation of Multiparty Session Actors
By requiring co-ordination to take place using explicit message passing
instead of relying on shared memory, actor-based programming languages have
been shown to be effective tools for building reliable and fault-tolerant
distributed systems. Although naturally communication-centric, communication
patterns in actor-based applications remain informally specified, meaning that
errors in communication are detected late, if at all.
Multiparty session types are a formalism to describe, at a global level, the
interactions between multiple communicating entities. This article describes
the implementation of a prototype framework for monitoring Erlang/OTP
gen_server applications against multiparty session types, showing how previous
work on multiparty session actors can be adapted to a purely actor-based
language, and how monitor violations and termination of session participants
can be reported in line with the Erlang mantra of "let it fail". Finally, the
framework is used to implement two case studies: an adaptation of a
freely-available DNS server, and a chat server.Comment: In Proceedings ICE 2016, arXiv:1608.0313
Benefits of Session Types for software Development
Session types are a formalism used to specify and check the correctness of communication based systems. Within their scope, they can guarantee the absence of communication errors such as deadlock, sending an unexpected message or failing to handle an incoming message. Introduced over two decades ago, they have developed into a significant theme in programming languages. In this paper we examine the beliefs that drive research into this area and make it popular. We look at the claims and motivation behind session types throughout the literature. We identify the hypotheses upon which session types have been designed and implemented, and attempt to clarify and formulate them in a more suitable manner for testing
Behavioural types for non-uniform memory accesses
Concurrent programs executing on NUMA architectures consist of concurrent
entities (e.g. threads, actors) and data placed on different nodes. Execution
of these concurrent entities often reads or updates states from remote nodes.
The performance of such systems depends on the extent to which the concurrent
entities can be executing in parallel, and on the amount of the remote reads
and writes.
We consider an actor-based object oriented language, and propose a type
system which expresses the topology of the program (the placement of the actors
and data on the nodes), and an effect system which characterises remote reads
and writes (in terms of which node reads/writes from which other nodes). We use
a variant of ownership types for the topology, and a combination of behavioural
and ownership types for the effect system.Comment: In Proceedings PLACES 2015, arXiv:1602.0325
Hybrid Session Verification through Endpoint API Generation
© Springer-Verlag Berlin Heidelberg 2016.This paper proposes a new hybrid session verification methodology for applying session types directly to mainstream languages, based on generating protocol-specific endpoint APIs from multiparty session types. The API generation promotes static type checking of the behavioural aspect of the source protocol by mapping the state space of an endpoint in the protocol to a family of channel types in the target language. This is supplemented by very light run-time checks in the generated API that enforce a linear usage discipline on instances of the channel types. The resulting hybrid verification guarantees the absence of protocol violation errors during the execution of the session. We implement our methodology for Java as an extension to the Scribble framework, and use it to specify and implement compliant clients and servers for real-world protocols such as HTTP and SMTP
Explicit connection actions in multiparty session types
This work extends asynchronous multiparty session types (MPST) with explicit connection actions to support protocols with op- tional and dynamic participants. The actions by which endpoints are connected and disconnected are a key element of real-world protocols that is not treated in existing MPST works. In addition, the use cases motivating explicit connections often require a more relaxed form of mul- tiparty choice: these extensions do not satisfy the conservative restric- tions used to ensure safety in standard syntactic MPST. Instead, we de- velop a modelling-based approach to validate MPST safety and progress for these enriched protocols. We present a toolchain implementation, for distributed programming based on our extended MPST in Java, and a core formalism, demonstrating the soundness of our approach. We discuss key implementation issues related to the proposed extensions: a practi- cal treatment of choice subtyping for MPST progress, and multiparty correlation of dynamic binary connections
Linearly Typed Dyadic Group Sessions for Building Multiparty Sessions
Traditionally, each party in a (dyadic or multiparty) session implements
exactly one role specified in the type of the session. We refer to this kind of
session as an individual session (i-session). As a generalization of i-session,
a group session (g-session) is one in which each party may implement a group of
roles based on one channel. In particular, each of the two parties involved in
a dyadic g-session implements either a group of roles or its complement. In
this paper, we present a formalization of g-sessions in a multi-threaded
lambda-calculus (MTLC) equipped with a linear type system, establishing for the
MTLC both type preservation and global progress. As this formulated MTLC can be
readily embedded into ATS, a full-fledged language with a functional
programming core that supports both dependent types (of DML-style) and linear
types, we obtain a direct implementation of linearly typed g-sessions in ATS.
The primary contribution of the paper lies in both of the identification of
g-sessions as a fundamental building block for multiparty sessions and the
theoretical development in support of this identification.Comment: This paper can be seen as the pre-sequel to classical linear
multirole logic (CLML). arXiv admin note: substantial text overlap with
arXiv:1603.0372
Communicating Actor Automata -- Modelling Erlang Processes as Communicating Machines
Brand and Zafiropulo's notion of Communicating Finite-State Machines (CFSMs)
provides a succinct and powerful model of message-passing concurrency, based
around channels. However, a major variant of message-passing concurrency is not
readily captured by CFSMs: the actor model. In this work, we define a variant
of CFSMs, called Communicating Actor Automata, to capture the actor model of
concurrency as provided by Erlang: with mailboxes, from which messages are
received according to repeated application of pattern matching. Furthermore,
this variant of CFSMs supports dynamic process topologies, capturing common
programming idioms in the context of actor-based message-passing concurrency.
This gives a new basis for modelling, specifying, and verifying Erlang
programs. We also consider a class of CAAs that give rise to freedom from race
conditions.Comment: In Proceedings PLACES 2023, arXiv:2304.0543