Design-by-Contract for Flexible Multiparty Session Protocols – Extended Version

05/13/2022
by   Lorenzo Gheri, et al.
0

Choreographic models support a correctness-by-construction principle in distributed programming. Also, they enable the automatic generation of correct message-based communication patterns from a global specification of the desired system behaviour. In this paper we extend the theory of choreography automata, a choreographic model based on finite-state automata, with two key features. First, we allow participants to act only in some of the scenarios described by the choreography automaton. While this seems natural, many choreographic approaches in the literature, and choreography automata in particular, forbid this behaviour. Second, we equip communications with assertions constraining the values that can be communicated, enabling a design-by-contract approach. We provide a toolchain allowing to exploit the theory above to generate APIs for TypeScript web programming. Programs communicating via the generated APIs follow, by construction, the prescribed communication pattern and are free from communication errors such as deadlocks.

READ FULL TEXT

page 3

page 7

page 9

page 11

page 13

page 23

page 31

page 33

research
03/26/2022

A Runtime Environment for Contract Automata

Realising contract-based applications from formal specifications with fo...
research
11/12/2019

Smart Contract Interactions in Coq

We present a model/executable specification of smart contract execution ...
research
10/15/2022

A Theory of Formal Choreographic Languages

We introduce a meta-model based on formal languages, dubbed formal chore...
research
01/12/2021

Communication-Safe Web Programming in TypeScript with Routed Multiparty Session Types

Modern web programming involves coordinating interactions between browse...
research
02/07/2019

A coalgebraic take on regular and ω-regular behaviours

We present a general coalgebraic setting in which we define finite and i...
research
08/13/2020

A diagrammatic approach to information flow in encrypted communication (extended version)

We give diagrammatic tools to reason about information flow within encry...
research
11/28/2022

Flexible Correct-by-Construction Programming

Correctness-by-Construction (CbC) is an incremental program construction...

Please sign up or login with your details

Forgot password? Click here to reset