80 research outputs found
Multiparty Sessions based on Proof Nets
We interpret Linear Logic Proof Nets in a term language based on Solos
calculus. The system includes a synchronisation mechanism, obtained by a
conservative extension of the logic, that enables to define non-deterministic
behaviours and multiparty sessions.Comment: In Proceedings PLACES 2014, arXiv:1406.331
Session Types in Concurrent Calculi: Higher-Order Processes and Objects
This dissertation investigates different formalisms, in the form of programming language calculi,
that are aimed at providing a theoretical foundation for structured concurrent programming based
on session types. The structure of a session type is essentially a process-algebraic style description
of the behaviour of a single program identifier serving as a communication medium (and usually
referred to as a channel): the types incorporate typed inputs, outputs, and choices which can be
composed to form larger protocol descriptions. The effectiveness of session typing can be attributed
to the linear treatment of channels and session types, and to the use of tractable methods
such as syntactic duality to decide if the types of two connected channels are compatible. Linearity
is ensured when accumulating the uses of a channel into a composite type that describes also
the order of those actions. Duality provides a tractable and intuitive method for deciding when
two connected channels can interact and exchange values in a statically determined type-safe way.
We present our contributions to the theory of sessions, distilled into two families of programming
calculi, the first based on higher-order processes and the second based on objects. Our work unifies,
improves and extends, in manifold ways, the session primitives and typing systems for the
Lambda-calculus, the Pi-calculus, the Object-calculus, and their combinations in multi-paradigm
languages. Of particular interest are: the treatment of infinite interactions expressed with recursive
sessions; the capacity to encapsulate channels in higher-order structures which can be exchanged
and kept suspended, i.e., the use of code as data; the integration of protocol structure directly
into the description of objects, providing a powerful and uniformly extensible set of implementation
abstractions; finally, the introduction of asynchronous subtyping, which enables controlled
reordering of actions on either side of a session. Our work on higher-order processes and on object
calculi for session-based concurrent programming provides a theoretical foundation for programming
language design integrating functional, process, and object-oriented features
Affine Sessions
Session types describe the structure of communications implemented by
channels. In particular, they prescribe the sequence of communications, whether
they are input or output actions, and the type of value exchanged. Crucial to
any language with session types is the notion of linearity, which is essential
to ensure that channels exhibit the behaviour prescribed by their type without
interference in the presence of concurrency. In this work we relax the
condition of linearity to that of affinity, by which channels exhibit at most
the behaviour prescribed by their types. This more liberal setting allows us to
incorporate an elegant error handling mechanism which simplifies and improves
related works on exceptions. Moreover, our treatment does not affect the
progress properties of the language: sessions never get stuck
Undecidability of asynchronous session subtyping
Session types are used to describe communication protocols in distributed
systems and, as usual in type theories, session subtyping characterizes
substitutability of the communicating processes. We investigate the
(un)decidability of subtyping for session types in asynchronously communicating
systems. We first devise a core undecidable subtyping relation that is obtained
by imposing limitations on the structure of types. Then, as a consequence of
this initial undecidability result, we show that (differently from what stated
or conjectured in the literature) the three notions of asynchronous subtyping
defined so far for session types are all undecidable. Namely, we consider the
asynchronous session subtyping by Mostrous and Yoshida for binary sessions, the
relation by Chen et al. for binary sessions under the assumption that every
message emitted is eventually consumed, and the one by Mostrous et al. for
multiparty session types. Finally, by showing that two fragments of the core
subtyping relation are decidable, we evince that further restrictions on the
structure of types make our core subtyping relation decidable.Comment: 36 page
Session typing and asynchronous subtyping for the higher-order π-calculus
AbstractThis paper proposes a session typing system for the higher-order π-calculus (the HOπ-calculus) with asynchronous communication subtyping, which allows partial commutativity of actions in higher-order processes. The system enables two complementary kinds of optimisation, mobile code and asynchronous permutation of session actions, within processes that utilise structured, typed communications. Our first contribution is a session typing system for the HOπ-calculus using techniques from the linear λ-calculus. Integration of arbitrary higher-order code mobility and sessions leads to technical difficulties in type soundness, because linear usage of session channels and completion of sessions are required. Our second contribution is to introduce an asynchronous subtyping system which uniformly deals with type-manifested asynchrony and linear functions. The most technical challenge for subtyping is to prove the transitivity of the subtyping relation. We also demonstrate the expressiveness of our typing system with an e-commerce example, where optimised processes can interact respecting the expected sessions
Proof Nets as Processes
This work describes a process algebraic interpretation of Proof-nets, which are the canonical objects of Linear Logic proofs. It therefore offers a logically founded basis for deterministic, implicit parallelism.We present delta-calculus, a novel interpretation of Linear Logic, in the form of a typed process algebra that enjoys a Curry-Howard correspondence with Proof Nets. Reduction inherits the qualities of the logical objects: termination, deadlock-freedom, determinism, and very importantly, a high degree of parallelism. We obtain the necessary soundness results and provide a propositions-as-types theorem. The basic system is extended in two directions. First, we adapt it to interpret Affine Logic. Second, we propose extensions for general recursion, and introduce a novel form of recursive linear types. As an application we show a highly parallel type-preserving translation from a linear System F and extend it to the recursive variation. Our interpretation can be seen as a more canonical proof-theoretic alternative to several recent works on pi-calculus interpretations of linear sequent proofs (propositions-as-sessions) which exhibit reduced parallelism
On the boundary between decidability and undecidability of asynchronous session subtyping
Session types are behavioural types for guaranteeing that concurrent programs
are free from basic communication errors. Recent work has shown that
asynchronous session subtyping is undecidable. However, since session types
have become popular in mainstream programming languages in which asynchronous
communication is the norm rather than the exception, it is crucial to detect
significant decidable subtyping relations. Previous work considered extremely
restrictive fragments in which limitations were imposed to the size of
communication buffer (at most 1) or to the possibility to express multiple
choices (disallowing them completely in one of the compared types). In this
work, for the first time, we show decidability of a fragment that does not
impose any limitation on communication buffers and allows both the compared
types to include multiple choices for either input or output, thus yielding a
fragment which is more significant from an applicability viewpoint. In general,
we study the boundary between decidability and undecidability by considering
several fragments of subtyping. Notably, we show that subtyping remains
undecidable even if restricted to not using output covariance and input
contravariance
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
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
The Paths to Choreography Extraction
Choreographies are global descriptions of interactions among concurrent
components, most notably used in the settings of verification (e.g., Multiparty
Session Types) and synthesis of correct-by-construction software (Choreographic
Programming). They require a top-down approach: programmers first write
choreographies, and then use them to verify or synthesize their programs.
However, most existing software does not come with choreographies yet, which
prevents their application.
To attack this problem, we propose a novel methodology (called choreography
extraction) that, given a set of programs or protocol specifications,
automatically constructs a choreography that describes their behavior. The key
to our extraction is identifying a set of paths in a graph that represents the
symbolic execution of the programs of interest. Our method improves on previous
work in several directions: we can now deal with programs that are equipped
with a state and internal computation capabilities; time complexity is
dramatically better; we capture programs that are correct but not necessarily
synchronizable, i.e., they work because they exploit asynchronous
communication
- …