83 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
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
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
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
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
Reversing Single Sessions
Session-based communication has gained a widespread acceptance in practice as
a means for developing safe communicating systems via structured interactions.
In this paper, we investigate how these structured interactions are affected by
reversibility, which provides a computational model allowing executed
interactions to be undone. In particular, we provide a systematic study of the
integration of different notions of reversibility in both binary and multiparty
single sessions. The considered forms of reversibility are: one for completely
reversing a given session with one backward step, and another for also
restoring any intermediate state of the session with either one backward step
or multiple ones. We analyse the costs of reversing a session in all these
different settings. Our results show that extending binary single sessions to
multiparty ones does not affect the reversibility machinery and its costs
On the relative expressiveness of higher-order session processes
By integrating constructs from the λ-calculus and the π-calculus, in higher-order process calculi exchanged values may contain processes. This paper studies the relative expressiveness of HOπ, the higher-order π-calculus in which communications are governed by session types. Our main discovery is that HO, a subcalculus of HOπ which lacks name-passing and recursion, can serve as a new core calculus for session-typed higher-order concurrency. By exploring a new bisimulation for HO, we show that HO can encode HOπ fully abstractly (up to typed contextual equivalence) more precisely and efficiently than the first-order session π-calculus (π). Overall, under session types, HOπ, HO, and π are equally expressive; however, HOπ and HO are more tightly related than HOπ and π
Soft Session Types
We show how systems of session types can enforce interactions to be bounded
for all typable processes. The type system we propose is based on Lafont's soft
linear logic and is strongly inspired by recent works about session types as
intuitionistic linear logic formulas. Our main result is the existence, for
every typable process, of a polynomial bound on the length of any reduction
sequence starting from it and on the size of any of its reducts.Comment: In Proceedings EXPRESS 2011, arXiv:1108.407
- …
