22 research outputs found
Explicit connection actions in multiparty session types
This work extends asynchronous multiparty session types (MPST) with explicit connection actions to support protocols with op- tional and dynamic participants. The actions by which endpoints are connected and disconnected are a key element of real-world protocols that is not treated in existing MPST works. In addition, the use cases motivating explicit connections often require a more relaxed form of mul- tiparty choice: these extensions do not satisfy the conservative restric- tions used to ensure safety in standard syntactic MPST. Instead, we de- velop a modelling-based approach to validate MPST safety and progress for these enriched protocols. We present a toolchain implementation, for distributed programming based on our extended MPST in Java, and a core formalism, demonstrating the soundness of our approach. We discuss key implementation issues related to the proposed extensions: a practi- cal treatment of choice subtyping for MPST progress, and multiparty correlation of dynamic binary connections
Shared Memory Implementations of Protocol Programming Languages:Data-Race-Free
Protocol programming languages are domain-specific languages that offer higher-level abstractions for programming of synchronization and communication protocols among participants. However, most implementations of protocol programming languages on shared memory architectures use pointer passing to exchange data in communications, so programs can still run into data races. We report on our ongoing efforts toward the first shared memory implementation of a protocol programming language that guarantees freedom of data races, without excessive copying, by leveraging the programming language Rust and its type system.</p
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
Discourje: Runtime verification of communication protocols in clojure
This paper presents Discourje: a runtime verification framework for communication protocols in Clojure. Discourje guarantees safety of protocol implementations relative to specifications, based on an expressive new version of multiparty session types. The framework has a formal foundation and is itself implemented in Clojure to offer a seamless specification–implementation experience. Benchmarks show Discourje’s overhead can be less than 5% for real/existing concurrent programs
Session-ocaml: a session-based library with polarities and lenses
We propose session-ocaml, a novel library for session-typed concurrent/distributed programming in OCaml. Our technique solely relies on parametric polymorphism, which can encode core session type structures with strong static guarantees. Our key ideas are: ( ) polarised session types, which give an alternative formulation of duality enabling OCaml to automatically infer an appropriate session type in a session with a reasonable notational overhead; and ( ) a parameterised monad with a data structure called ‘slots’ manipulated with lenses, which can statically enforce session linearity and delegations. We show applications of session-ocaml including a travel agency usecase and an SMTP protocol
Behavioural Types for Heterogeneous Systems (Position Paper)
Behavioural types provide a promising way to achieve lightweight, language-integrated verification for communication-centric software. However, a large barrier to the adoption of behavioural types is that the current state of the art expects software to be written using the same tools and typing discipline throughout a system, and has little support for components over which a developer has no control.
This position paper describes the outcomes of a working group discussion at Dagstuhl Seminar 24051 (Next-Generation Protocols for Heterogeneous Systems). We propose a methodology for integrating multiple behaviourally-typed components, written in different languages. Our proposed approach involves an extensible protocol description language, a session IR that can describe data transformations and boundary monitoring and which can be compiled into program-specific session proxies, and finally a session middleware to aid session establishment.
We hope that this position paper will stimulate discussion on one of the most pressing challenges facing the widespread adoption of behavioural typing
On Formal Choreographic Modelling: A Case Study in EU Business Processes
International audienceFormal choreographic modelling advocates a correctness-byconstruction principle for the development of sound communication protocols. This principle usually hinges on syntactic or semantic restrictions to rule out models that could lead to communication glitches like message losses or deadlocks. This paper explores how these restrictions impact on the usability of formal modelling. More precisely, we benchmark the use of a formal choreographic modelling language designed to support the correctnessby-construction principle of message-passing systems. To this purpose, we consider the formal choreographic modelling of real business processes taken from the official documentation of European customs business process models. In fact, following a steadily increasing trend, the European Union started to use BPMN to support the legal provisions of the customs business process models
Value-dependent session design in a dependently typed language
Session Types offer a typing discipline that allows protocol specifications to be used during type-checking, ensuring that implementations adhere to a given specification. When looking to realise global session types in a dependently typed language care must be taken that values introduced in the description are used by roles that know about the value. We present Sessions, a Resource Dependent Embedded Domain Specific Language (EDSL) for describing global session descriptions in the dependently typed language Idris. As we construct session descriptions the values parameterising the EDSLs’ type keeps track of roles and messages they have encountered. We can use this knowledge to ensure that message values are only used by those who know the value. Sessions supports protocol descriptions that are computable, composable, higher-order, and value-dependent. We demonstrate Sessions expressiveness by describing the TCP Handshake, a multi-modal server providing echo and basic arithmetic operations, and a Higher-Order protocol that supports an authentication interaction step.Publisher PD
Partially Typed Multiparty Sessions
A multiparty session formalises a set of concurrent communicating
participants. We propose a type system for multiparty sessions where some
communications between participants can be ignored. This allows us to type some
sessions with global types representing interesting protocols, which have no
type in the standard type systems. Our type system enjoys Subject Reduction,
Session Fidelity and "partial" Lock-freedom. The last property ensures the
absence of locks for participants with non ignored communications. A sound and
complete type inference algorithm is also discussed.Comment: In Proceedings ICE 2023, arXiv:2308.0892