Session type

From testwiki
Revision as of 17:59, 29 July 2024 by imported>Citation bot (Add: website, doi-access, url, authors 1-1. Removed parameters. Some additions/deletions were parameter name changes. | Use this bot. Report bugs. | Suggested by Headbomb | Linked from Wikipedia:WikiProject_Academic_Journals/Journals_cited_by_Wikipedia/Sandbox2 | #UCB_webform_linked 43/188)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Type systems

In type theory, session types are used to ensure correctness in concurrent programs. They guarantee that messages sent and received between concurrent programs are in the expected order and of the expected type.[1][2] Session type systems have been adapted for both channel and actor systems.[3]

Session types are used to ensure desirable properties in concurrent and distributed systems, i.e. absence of communication errors or deadlocks, and protocol conformance.[4]

Binary versus multiparty session types

Interaction between two processes can be checked using binary session types, while interactions between more than two processes can be checked using multiparty session types.[5] In multiparty session types interactions between all participants are described using a global type, which is then projected into local types that describe communication from the local view of each participant. Importantly, the global type encodes the sequencing information of the communication, which would be lost if we were to use binary session types to encode the same communication.[6]

Formal definition of binary session types

Binary session types can be described using send operations (!), receive operations (?), branches (&), selections (), recursion (rec) and termination (end).[2]

For example, S=!bool.?int.end represents a session type S which first sends a boolean (!bool), then receives an integer (?int) before finally terminating (end).

Implementations

Session types have been adapted for several existing programming languages, including:

References

Template:Reflist


Template:Comp-sci-stub