Crate mpstthree[−][src]
Expand description
Mpstthree (also called MultiCrusty) is a library to write and check communication protocols based on Multiparty Session Types.
Currently this library is geared toward use with Scribble and New Scribble for full checking of protocols.
Modules
baking
This module contains the macros for creating the different structures and associated functions for any number of participants to simplify send/recv.
The slightly modified binary session type library.
checking
This module contains the macros and the functions for checking wether a protocol is well written or not, according to a bottom-up method.
This module contains all the functions that are used
for consuming MeshedChannels
.
macros_multiple
This module contains all the macros that are used for the parametrisation on the number of participants.
macros_simple
This module contains all the macros that are used for the parametrisation on the name of the participants.
The main structure used for representing a participant, also named a party, within a protocol.
The main trait used for representing an ordering or the name of a participant.
transport
The module for interacting with different modes of transport such as HTTP or TCP
Macros
macros_multiple
Indefinitely loops to check all sessions if there
is a Cancel
signal and broadcast if it present.
Will also close correctly if a Stop
signal
is received.
baking
Create a new SessionMST structure, new roles and the baking environment.
baking
Create a new SessionMST structuren, new roles and the baking environment. Also create the macros needed for choosing branches. Each macro is linked to a role X and are called as followed: choose_mpst_x_to_all!( s, # the current session enum_1::variant_1, # the first branch for the first passive role enum_2::variant_2, # the first branch for the second passive role … enum_n::variant_n, # the first branch for the n-th passive role )
macros_multiple
Creates the structure MeshedChannels
create_meshedchannels
,
the close_mpst
and fork_mpst_multi
.
macros_multiple
Creates the structure MeshedChannels
create_meshedchannels
,
the close_mpst_cancel
and
fork_mpst_multi
functions to be used with more than 2 participants.
It checks the send sides of the channels along the recv sides.
checking
The macro that allows to create digraphs from each endpoint,
along with enum
if needed. You can also provide the name of
a file for running the KMC
tool and checking the
properties of the provided protocol. The KMC
repository
must be installed next to the current one.
Choose between many different sessions wrapped in an
enum
Choose, for A, among two different sessions
Choose, for B, among two different sessions
Choose, for C, among two different sessions
macros_multiple
Create a macro that simplifies the usage of choose_mpst_multi_to_all
.
macros_multiple
Choose among different sessions that are provided, may fail because of a canceled session. Need to exclude the first participant
macros_multiple
Choose among different sessions that are provided.
macros_multiple
Choose among different sessions that are provided.
macros_simple
Choose among two different sessions.
Must be used with MeshedChannels
.
transport
Choose between many different sessions wrapped in an
enum
macros_multiple
Create the close function to be used with more than 3 participants.
macros_multiple
Create the close function to be used with more than 3 participants. It is used for checking the send sides upon closing.
macros_multiple
Create the close function to be used with more than 3 participants.
macros_simple
Create a new broadcast Role
and its dual.
A broadcast Role
is used for sending a
choice. Its dual is used for receving this choice.
macros_simple
Create a new broadcast Role
and its dual.
A broadcast Role
is used for sending a
choice. Its dual is used for receving this choice.
When a name X is given, the Roles created are
macros_simple
Call both create_choose_right_from_1_to_2_and_3
and create_choose_left_from_1_to_2_and_3.
Must be used with MeshedChannels
.
macros_simple
Call both create_choose_right_from_2_to_1_and_3
and create_choose_left_from_2_to_1_and_3.
Must be used with MeshedChannels
.
macros_simple
Call both create_choose_right_from_3_to_1_and_2
and create_choose_left_from_3_to_1_and_2.
Must be used with MeshedChannels
.
macros_simple
Create the ChooseMpst function to send a Choose
left branch from the first role to the others. Must be
used with MeshedChannels
.
macros_simple
Create the ChooseMpst function to send a Choose
left branch from the second role to the others. Must be
used with MeshedChannels
.
macros_simple
Create the ChooseMpst function to send a Choose
left branch from the third role to the others. Must be
used with MeshedChannels
.
macros_multiple
Create the two ChooseMpst functions to send a Choose on each branch to be used with more than 3 participants. Only works when active role is the last one (TODO: adapt to any index role).
macros_multiple
Create the ChooseMpst function to send a Choose left branch to be used with more than 3 participants. Only works when active role is the last one (TODO: adapt to any index role).
macros_multiple
Create the ChooseMpst function to send a Choose right branch to be used with more than 3 participants. Only works when active role is the last one (TODO: adapt to any index role).
macros_simple
Create the ChooseMpst function to send a Choose
right branch from the first role to the others. Must be
used with MeshedChannels
.
macros_simple
Create the ChooseMpst function to send a Choose
right branch from the second role to the others. Must
be used with MeshedChannels
.
macros_simple
Create the ChooseMpst function to send a Choose
right branch from the third role to the others. Must be
used with MeshedChannels
.
macros_multiple
Create the ChooseMpst type to be used with more than 3 participants.
macros_multiple
Create choose fuunctions, to choose among different sessions that are provided.
macros_multiple
Create choose fuunctions, to choose among different sessions that are provided.
macros_multiple
Creates a MeshedChannels for more than 3 participants.
macros_simple
Create multiple new broadcast Role
and its dual.
A broadcast Role
is used for
sending a choice. Its dual is used for receving this choice.
macros_simple
Create multiple new broadcast Role
and its dual.
A broadcast Role
is used for
sending a choice. Its dual is used for receving this choice.
When a name X is given, the Roles created are
macros_simple
Create multiple new Role
and its dual.
macros_simple
Create multiple new Role
and its dual.
When a name X is given, the Roles created are
macros_simple
Create a new Role
and its dual.
macros_simple
Create a new Role
and its dual.
When a name X is given, the Roles created are
macros_simple
Create an offer function to recv on the first binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_simple
Create an offer function to recv on the second binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_multiple
Creates an OfferMpst function to receive an offer on a given binary session type of a MeshedChannels.
macros_multiple
Create the OfferMpst type to be used with more than 3 participants.
transport
Creates a recv function to receive from a simple role on a given binary session type of a MeshedChannels.
transport
Creates multiple recv functions to receive from a simple role on a given binary session type of a MeshedChannels.
macros_multiple
Creates a recv function to receive from a simple role on a given binary session type of a MeshedChannels.
macros_simple
Create a recv function to recv on the first binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_simple
Create a recv function to recv on the second binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_multiple
Creates multiple recv functions to receive from a simple role on a given binary session type of a MeshedChannels.
macros_multiple
Creates a send function to send from a given binary session type of a MeshedChannels with more than 3 participants. Checks if the first binary session has a “cancel” signal and panic if yes. The send function will try to send and panic if not possible (canceled session).
macros_multiple
Creates multiple send functions to send from a given binary session type of a MeshedChannels with more than 3 participants.
transport
Creates a send function to send from a given binary session type of a MeshedChannels with more than 3 participants.
macros_multiple
Creates a send function to send from a given binary session type of a MeshedChannels with more than 3 participants. The send function will try to send and panic if not possible (canceled session).
macros_multiple
Creates multiple send functions to send from a given binary session type of a MeshedChannels with more than 3 participants.
transport
Creates multiple send functions to send from a given binary session type of a MeshedChannels with more than 3 participants.
macros_multiple
Creates a send function to send from a given binary session type of a MeshedChannels with more than 3 participants.
macros_simple
Create a send function to send on the first binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_simple
Create a send function to send on the second binary
session from any kind of role. Must be used with
MeshedChannels
.
macros_multiple
Creates multiple send functions to send from a given binary session type of a MeshedChannels with more than 3 participants.
macros_multiple
Creates the fork function to be used with more than 3 participants.
Offer a choice between many different sessions wrapped
in an enum
macros_multiple
Offer a choice and send the session to the broadcaster
macros_multiple
Offer a choice between many different sessions wrapped in an enum
. Used with http functions
macros_multiple
Offer a choice between many different sessions wrapped in an enum
Offer a choice to A from B between many different
sessions wrapped in an enum
Offer a choice to A from C between many different
sessions wrapped in an enum
Offer a choice to B from A between many different
sessions wrapped in an enum
Offer a choice to B from C between many different
sessions wrapped in an enum
Offer a choice to C from A between many different
sessions wrapped in an enum
Offer a choice to C from B between many different
sessions wrapped in an enum
transport
Offer a choice between many different sessions wrapped
in an enum
macros_multiple
Shorter way to call the code within the recv function instead of having to create the function itself.
macros_multiple
Creates a function that will cancel a session and send a Cancel
signal to the broadcasting role.
macros_multiple
Shorter way to call the code within the send function instead of having to create the function itself.