skip to main content
10.1007/978-981-99-8664-4_7guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Session Types with Multiple Senders Single Receiver

Published: 15 December 2023 Publication History

Abstract

Message passing is a fundamental element in software development, ranging from concurrent and mobile computing to distributed services, but it suffers from communication errors such as deadlocks. Session types are a typing discipline for enforcing safe structured interactions between multiple participants. However, each typed interaction is restricted to having one fixed sender and one fixed receiver. In this paper, we extend session types with existential branching types, to handle a common interaction pattern with multiple senders and a single receiver in a synchronized setting, i.e. a receiver is available to receive messages from multiple senders, and which sender actually participates in the interaction cannot be determined till execution. We build the type system with existential branching types, which retain the important properties induced by standard session types: type safety, progress (i.e. deadlock-freedom), and fidelity. We further provide a novel communication type system to guarantee progress of dynamically interleaved multiparty sessions, by abandoning the strong restrictions of existing type systems. Finally, we encode Rust multi-thread primitives in the extended session types to show its expressivity, which can be considered as an attempt to check the deadlock-freedom of Rust multi-thread programs.

References

[1]
Barwell, A.D., Scalas, A., Yoshida, N., Zhou, F.: Generalised multiparty session types with crash-stop failures. In: CONCUR 2022, volume 243 of LIPIcs, pp. 1–25. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022)
[2]
Bettini L, Coppo M, D’Antoni L, De Luca M, Dezani-Ciancaglini M, and Yoshida N van Breugel F and Chechik M Global progress in dynamically interleaved multiparty sessions CONCUR 2008 - Concurrency Theory 2008 Heidelberg Springer 418-433
[3]
Chen, R., Balzer, S., Toninho, B.: Ferrite: a judgmental embedding of session types in Rust. In: ECOOP 2022, volume 222 of LIPIcs, pp. 1–28. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022)
[4]
Dezani-Ciancaglini M, de’Liguoro U, and Yoshida N Barthe G and Fournet C On progress for structured communications Trustworthy Global Computing 2008 Heidelberg Springer 257-275
[5]
Deniélou, P.-M., Yoshida, N.: Dynamic multirole session types. In: POPL 2011, pp. 435–446. ACM (2011)
[6]
Fowler, S., Lindley, S., Morris, J.G., Decova, S.: Exceptional asynchronous session types: session types without tiers. In: POPL 2019, pp. 1–29. ACM (2019)
[7]
Gheri, L., Lanese, I., Sayers, N., Tuosto, E., Yoshida, N.: Design-by-contract for flexible multiparty session protocols. In: ECOOP 2022, volume 222 of LIPIcs, pp. 1–28. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022)
[8]
Ghilezan S, Jaksic S, Pantovic J, Scalas A, and Yoshida N Precise subtyping for synchronous multiparty sessions J. Log. Algebraic Methods Program. 2019 104 127-173
[9]
Honda K Best E Types for dyadic interaction CONCUR’93 1993 Heidelberg Springer 509-523
[10]
Honda K, Vasconcelos VT, and Kubo M Hankin C Language primitives and type discipline for structured communication-based programming Programming Languages and Systems 1998 Heidelberg Springer 122-138
[11]
Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: POPL 2008, pp. 273–284. ACM (2008)
[12]
Imai K, Lange J, and Neykova R Kmclib: automated inference and verification of session types from OCaml programs Tools and Algorithms for the Construction and Analysis of Systems 2022 Cham Springer 379-386
[13]
Jespersen, T.B.L., Munksgaard, P., Larsen, K.F.: Session types for rust. In: WGP@ICFP 2015, pp. 13–22. ACM (2015)
[14]
Ji, Z., Wang, S., Xu, X.: Session types with multiple senders single receiver (report version). https://arxiv.org/abs/2310.12187 (2023). arxiv CoRR (2023)
[15]
Kobayashi N Type-based information flow analysis for the pi-calculus Acta Informatica 2005 42 4–5 291-347
[16]
Kobayashi N Baier C and Hermanns H A new type system for deadlock-free processes CONCUR 2006 – Concurrency Theory 2006 Heidelberg Springer 233-247
[17]
Kokke, W.: Rusty variation: deadlock-free sessions with failure in rust. In: ICE 2019, volume 304 of EPTCS, pp. 48–60 (2019)
[18]
Lagaillardie N, Neykova R, and Yoshida N Bliudze S and Bocchi L Implementing multiparty session types in rust Coordination Models and Languages 2020 Cham Springer 127-136
[19]
Lange J and Yoshida N Dillig I and Tasiran S Verifying asynchronous interactions via communicating session automata Computer Aided Verification 2019 Cham Springer 97-117
[20]
Majumdar, R., Yoshida, N., Zufferey, D.: Multiparty motion coordination: From choreographies to robotics programs. Proc. ACM Program. Lang. 4(OOPSLA), 1–30 (2020)
[21]
Pierce BC Types and Programming Languages 2002 Cambridge MIT Press
[22]
Scalas A and Yoshida N Multiparty session types, beyond duality J. Log. Algebraic Methods Program. 2018 97 55-84
[23]
Scalas, A., Yoshida, N.: Less is more: multiparty session types revisited. In: POPL 2019, pp. 1–29 (2019)
[24]
Toninho B and Yoshida N Certifying data in multiparty session types J. Log. Algebraic Methods Program. 2017 90 61-83
[25]
Toninho B and Yoshida N Baier C and Dal Lago U Depending on session-typed processes Foundations of Software Science and Computation Structures 2018 Cham Springer 128-145
[26]
Tu, T., Liu, X., Song, L., Zhang, Y.: Understanding real-world concurrency bugs in go. In: ASPLOS 2019, pp. 865–878. ACM (2019)
[27]
Wu, H., Xi, H.: Dependent session types. https://arxiv.org/abs/1704.07004. arXiv CoRR. (2017)
[28]
Yoshida N, Deniélou P-M, Bejleri A, and Hu R Ong L Parameterised multiparty session types Foundations of Software Science and Computational Structures 2010 Heidelberg Springer 128-145
[29]
Yoshida N and Gheri L Hung DV and D’Souza M A very gentle introduction to multiparty session types Distributed Computing and Internet Technology 2020 Cham Springer 73-93

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
Dependable Software Engineering. Theories, Tools, and Applications: 9th International Symposium, SETTA 2023, Nanjing, China, November 27–29, 2023, Proceedings
Nov 2023
447 pages
ISBN:978-981-99-8663-7
DOI:10.1007/978-981-99-8664-4
  • Editors:
  • Holger Hermanns,
  • Jun Sun,
  • Lei Bu

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 15 December 2023

Author Tags

  1. Communications
  2. Session types
  3. Type system
  4. Deadlock-freedom

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media