114 research outputs found
Relating Session Types and Behavioural Contracts: The Asynchronous Case
We discuss the relationship between session types and behavioural contracts under the assumption that processes communicate asynchronously. We show the existence of a fully abstract interpretation of session types into a fragment of contracts, that maps session subtyping into binary compliance-preserving contract refinement. In this way, the recent undecidability result for asynchronous session subtyping can be used to obtain an original undecidability result for asynchronous contract refinement
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
Relating Session Types and Behavioural Contracts: the Asynchronous Case
International audienceWe discuss the relationship between session types and be-havioural contracts under the assumption that processes communicate asynchronously. We show the existence of a fully abstract interpretation of session types into a fragment of contracts, that maps session subtyping into binary compliance-preserving contract refinement. In this way, the recent undecidability result for asynchronous session subtyping can be used to obtain an original undecidability result for asynchronous contract refinement
Asynchronous session subtyping as communicating automata refinement
International audienceWe study the relationship between session types and behavioural contracts, representing Communicating Finite State Machines (CFSMs), under the assumption that processes communicate asynchronously. Session types represent a syntax-based approach for the description of communication protocols, while behavioural contracts, formally expressing CFSMs, follow an operational approach. We show the existence of a fully abstract interpretation of session types into a fragment of contracts that maps session subtyping into binary compliance-preserving CFSMs/behavioural contract refinement. In this way, on the one hand, we enrich the theory of session types with an operational characterization and, on the other hand, we use recent undecidability results for asynchronous session subtyping to obtain an original undecidability result for asynchronous CFSMs/behavioural contract refinement
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
Fair Refinement for Asynchronous Session Types
International audienceSession types are widely used as abstractions of asynchronous message passing systems. Refinement for such abstractions is crucial as it allows improvements of a given component without compromising its compatibility with the rest of the system. In the context of session types, the most general notion of refinement is the asynchronous session subtyping, which allows to anticipate message emissions but only under certain conditions. In particular, asynchronous session subtyping rules out candidates subtypes that occur naturally in communication protocols where, e.g., two parties simultaneously send each other a finite but unspecified amount of messages before removing them from their respective buffers. To address this shortcoming, we study fair compliance over asynchronous session types and fair refinement as the relation that preserves it. This allows us to propose a novel variant of session subtyping that leverages the notion of controllability from service contract theory and that is a sound characterisation of fair refinement. In addition, we show that both fair refinement and our novel subtyping are undecidable. We also present a sound algorithm, and its implementation, which deals with examples that feature potentially unbounded buffering
A Session Subtyping Tool
International audienceSession types are becoming popular and have been integrated in several mainstream programming languages. Nevertheless, while many programming languages consider asynchronous fifo channel communication, the notion of subtyping used in session type implementations is the one defined by Gay and Hole for synchronous communication. This might be because there are several notions of asynchronous session subtyping, these notions are usually undecidable, and only recently sound (but not complete) algorithmic characterizations for these subtypings have been proposed. But the fact that the definition of asynchronous session subtyping and the theory behind related algorithms are not easily accessible to non-experts may also prevent further integration. The aim of this paper, and of the tool presented therein, is to make the growing body of knowledge about asynchronous session subtyping more accessible, thus promoting its integration in practical applications of session types
Session Types with Arithmetic Refinements
Session types statically prescribe bidirectional communication protocols for message-passing processes. However, simple session types cannot specify properties beyond the type of exchanged messages. In this paper we extend the type system by using index refinements from linear arithmetic capturing intrinsic attributes of data structures and algorithms. We show that, despite the decidability of Presburger arithmetic, type equality and therefore also subtyping and type checking are now undecidable, which stands in contrast to analogous dependent refinement type systems from functional languages. We also present a practical, but incomplete algorithm for type equality, which we have used in our implementation of Rast, a concurrent session-typed language with arithmetic index refinements as well as ergometric and temporal types. Moreover, if necessary, the programmer can propose additional type bisimulations that are smoothly integrated into the type equality algorithm
Deconfined Global Types for Asynchronous Sessions
Multiparty sessions with asynchronous communications and global types play an important role for the modelling of interaction protocols in distributed systems. In designing such calculi the aim is to enforce, by typing, good properties for all participants, maximising, at the same time, the accepted behaviours. Our type system improves the state-of-the-art by typing all asynchronous sessions and preserving the key properties of Subject Reduction, Session Fidelity and Progress when some well-formedness conditions are satisfied.
The type system comes together with a sound and complete type inference algorithm.
The well-formedness conditions are undecidable, but an algorithm checking an expressive restriction of them recovers the effectiveness of typing
Denotational and operational preciseness of subtyping: A roadmap
The notion of subtyping has gained an important role both in theoretical and applicative domains: in lambda and concurrent calculi as well as in object-oriented programming languages. The soundness and the completeness, together referred to as the preciseness of subtyping, can be considered from two different points of view: denotational and operational. The former preciseness is based on the denotation of a type, which is a mathematical object describing the meaning of the type in accordance with the denotations of other expressions from the language. The latter preciseness has been recently developed with respect to type safety, i.e. the safe replacement of a term of a smaller type when a term of a bigger type is expected. The present paper shows that standard proofs of operational preciseness imply denotational preciseness and gives an overview on this subject
- …