59 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 typing in Java, deductively
Multiparty session typing (MPST) is a method to automatically prove safety and liveness of protocol implementations relative to specifications. We present BGJ: a new tool to apply the MPST method in combination with Java. The checks performed using our tool are purely static (all errors are reported early at compile-time) and resource-efficient (near-zero cost abstractions at run-time), thereby addressing two issues of existing tools. BGJ is built using VerCors, but our approach is general
Design-By-Contract for Flexible Multiparty Session Protocols
Choreographic models support a correctness-by-construction principle in distributed programming. Also, they enable the automatic generation of correct message-based communication patterns from a global specification of the desired system behaviour. In this paper we extend the theory of choreography automata, a choreographic model based on finite-state automata, with two key features. First, we allow participants to act only in some of the scenarios described by the choreography automaton. While this seems natural, many choreographic approaches in the literature, and choreography automata in particular, forbid this behaviour. Second, we equip communications with assertions constraining the values that can be communicated, enabling a design-by-contract approach. We provide a toolchain allowing to exploit the theory above to generate APIs for TypeScript web programming. Programs communicating via the generated APIs follow, by construction, the prescribed communication pattern and are free from communication errors such as deadlocks
The Winonan
https://openriver.winona.edu/thewinonan1930s/1071/thumbnail.jp
Gradual session types
Session types are a rich type discipline, based on linear types, that lifts
the sort of safety claims that come with type systems to communications.
However, web-based applications and microservices are often written in a mix of
languages, with type disciplines in a spectrum between static and dynamic
typing. Gradual session types address this mixed setting by providing a
framework which grants seamless transition between statically typed handling of
sessions and any required degree of dynamic typing.
We propose Gradual GV as a gradually typed extension of the functional
session type system GV. Following a standard framework of gradual typing,
Gradual GV consists of an external language, which relaxes the type system of
GV using dynamic types, and an internal language with casts, for which
operational semantics is given, and a cast-insertion translation from the
former to the latter. We demonstrate type and communication safety as well as
blame safety, thus extending previous results to functional languages with
session-based communication. The interplay of linearity and dynamic types
requires a novel approach to specifying the dynamics of the language.Comment: Preprint of an article to appear in Journal of Functional Programmin
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
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
- …