mpstthree 0.0.1-b

A library implementing Multiparty Session Types for 3 participants
Documentation

Multiparty session types for Rust

Build Status

This library implements multiparty session types in Rust for three participants. It relies on sesh. An other library is coming soon to extend to any number of participants.

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Rust. You should get cargo installed. The project has been coded using version cargo 1.41.0, and may not work with other versions.

Building

For building the library, run this code.

$ cargo build

Running

For running the library, run this code.

$ cargo run

Run test

For running the tests, run this code.

$ cargo test

Tests are divided in 4 files:

  • simple checks that a basic global protocol works and is well implemented. In this test, a role A sends a payoad to a role B, then receives an other from a role C. Upon receiving the payload from A, B sends a payload to C. This protocol can be written as A!B.A?C.B!C.
  • choose checks that a protocol where a role B spreads a choice to the two other roles. For simplifying the test, role C is doing nothing. The protocol can be written as B→A:{B!A, B!A}.
  • usecase is implementing the protocol given in 1, where Client → C, Authenticator → A and Server → B.
  • usecase-recursive is implementing the protocol given in 2, where Client → C, Authenticator → A and Server → B.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgment

This project is part of my current PhD under the supervision of Nobuko Yoshida, that I would like to thank. I was also helped by my colleagues from Imperial College London.