43 research outputs found
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
Session-Based Programming for Parallel Algorithms: Expressiveness and Performance
This paper investigates session programming and typing of benchmark examples
to compare productivity, safety and performance with other communications
programming languages. Parallel algorithms are used to examine the above
aspects due to their extensive use of message passing for interaction, and
their increasing prominence in algorithmic research with the rising
availability of hardware resources such as multicore machines and clusters. We
contribute new benchmark results for SJ, an extension of Java for type-safe,
binary session programming, against MPJ Express, a Java messaging system based
on the MPI standard. In conclusion, we observe that (1) despite rich libraries
and functionality, MPI remains a low-level API, and can suffer from commonly
perceived disadvantages of explicit message passing such as deadlocks and
unexpected message types, and (2) the benefits of high-level session
abstraction, which has significant impact on program structure to improve
readability and reliability, and session type-safety can greatly facilitate the
task of communications programming whilst retaining competitive performance
Parameterized Concurrent Multi-Party Session Types
Session types have been proposed as a means of statically verifying
implementations of communication protocols. Although prior work has been
successful in verifying some classes of protocols, it does not cope well with
parameterized, multi-actor scenarios with inherent asynchrony. For example, the
sliding window protocol is inexpressible in previously proposed session type
systems. This paper describes System-A, a new typing language which overcomes
many of the expressiveness limitations of prior work. System-A explicitly
supports asynchrony and parallelism, as well as multiple forms of
parameterization. We define System-A and show how it can be used for the static
verification of a large class of asynchronous communication protocols.Comment: In Proceedings FOCLASA 2012, arXiv:1208.432
On Asynchronous Session Semantics
This paper studies a behavioural theory of the π-calculus with session types under the fundamental principles of the practice of distributed computing — asynchronous communication which is order-preserving inside each connection (session), augmented with asynchronous inspection of events (message arrivals). A new theory of bisimulations is introduced, distinct from either standard
asynchronous or synchronous bisimilarity, accurately capturing the semantic nature of session-based asynchronously communicating processes augmented with
event primitives. The bisimilarity coincides with the reduction-closed barbed congruence. We examine its properties and compare them with existing semantics.
Using the behavioural theory, we verify that the program transformation of multithreaded into event-driven session based processes, using Lauer-Needham duality,
is type and semantic preserving
A Graphical Approach to Progress for Structured Communication in Web Services
We investigate a graphical representation of session invocation
interdependency in order to prove progress for the pi-calculus with sessions
under the usual session typing discipline. We show that those processes whose
associated dependency graph is acyclic can be brought to reduce. We call such
processes transparent processes. Additionally, we prove that for well-typed
processes where services contain no free names, such acyclicity is preserved by
the reduction semantics.
Our results encompass programs (processes containing neither free nor
restricted session channels) and higher-order sessions (delegation).
Furthermore, we give examples suggesting that transparent processes constitute
a large enough class of processes with progress to have applications in modern
session-based programming languages for web services.Comment: In Proceedings ICE 2010, arXiv:1010.530
A Modular Toolkit for Distributed Interactions
We discuss the design, architecture, and implementation of a toolkit which
supports some theories for distributed interactions. The main design principles
of our architecture are flexibility and modularity. Our main goal is to provide
an easily extensible workbench to encompass current algorithms and incorporate
future developments of the theories. With the help of some examples, we
illustrate the main features of our toolkit.Comment: In Proceedings PLACES 2010, arXiv:1110.385
Softly safely spoken: Role playing for Session Types
Session types have made much progress at permitting programs be statically verified concordant with a specified protocol. However, it is difficult to build abstractions of, or encapsulate Session types, thus limiting their flexibility. Global session types add further constraints to communication, by permitting the order of exchanges amongst many participants to be specified. The cost is that the number of participants is statically fixed. We introduce Roles in which, similarly to global session types, the number of roles and the conversations involving roles are statically known, but participants can dynamically join and leave roles and the number of participants within a role is not statically known. Statically defined roles which conform to a specified conversation can be dynamically instantiated, participants can be members of multiple roles simultaneously and can participate in multiple conversations concurrently
Session Types in a Linearly Typed Multi-Threaded Lambda-Calculus
We present a formalization of session types in a multi-threaded
lambda-calculus (MTLC) equipped with a linear type system, establishing for the
MTLC both type preservation and global progress. The latter (global progress)
implies that the evaluation of a well-typed program in the MTLC can never reach
a deadlock. 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 session types in ATS. In addition, we gain immediate support
for a form of dependent session types based on this embedding into ATS.
Compared to various existing formalizations of session types, we see the one
given in this paper is unique in its closeness to concrete implementation. In
particular, we report such an implementation ready for practical use that
generates Erlang code from well-typed ATS source (making use of session types),
thus taking great advantage of the infrastructural support for distributed
computing in Erlang.Comment: This is the original version of the paper on supporting programming
with dyadic session types in AT
Synchronous Multiparty Session Types
AbstractSynchronous communication is useful to model multiparty sessions where control for timing events and strong sequentially order of messages are essential to the problem specification. This paper continues the work on multiparty session types initiated by Honda et al. [Honda, K., N. Yoshida and M. Carbone, Multiparty asynchronous session types, in: G. C. Necula and P. Wadler, editors, POPL (2008), pp. 273–284] for synchronous communications. It provides a more relaxed syntax of the calculus, multicasting, higher-order communication via multipolarity labels and a clear definition of delegation in global types. The linearity property defines when a channel can be used in two different communications without creating a race condition and the type system checks if all the processes of a session implement the communication behavior specified in the global type. The type system of the calculus is proved to be sound with respect to the operational semantics and coherent with respect to the global types