Abstract

Binary session types guarantee communication safety and session fidelity, but alone they cannot rule out deadlocks arising from the interleaving of different sessions. In Classical Processes (CP) [53]—a process calculus based on classical linear logic—deadlock freedom is guaranteed by combining channel creation and parallel composition under the same logical cut rule. Similarly, in Good Variation (GV) [39, 54]—a linear concurrent \(\lambda \)-calculus—deadlock freedom is guaranteed by combining channel creation and thread spawning under the same operation, called fork. In both CP and GV, deadlock freedom is achieved at the expense of expressivity, as the only processes allowed are tree-structured. Dardha and Gay [19] define Priority CP (PCP), which allows cyclic-structured processes and restores deadlock freedom by using priorities, in line with Kobayashi and Padovani [34, 44]. Following PCP, we present Priority GV (PGV), a variant of GV which decouples channel creation from thread spawning. Consequently, we type cyclic-structured processes and restore deadlock freedom by using priorities. We show that our type system is sound by proving subject reduction and progress. We define an encoding from PCP to PGV and prove that the encoding preserves typing and is sound and complete with respect to the operational semantics.

Highlights

  • Session types [29,47,30] are types for protocols

  • We follow the line of work from Classical Processes (CP) to Priority CP, and present Priority Good Variation (GV) (PGV), a variant of GV which decouples channel creation from thread spawning, allowing cyclic-structured processes, but which guarantees deadlock freedom via priorities

  • We present Priority GV (PGV), a session-typed functional language based on GV [54,39] which uses prioritiesa la Kobayashi and Padovani [34,45] to enforce deadlock freedom

Read more

Summary

Introduction

Session types [29,47,30] are types for protocols. Regular types ensure functions are used according to their specification. In the ⇡-calculus literature, there have been several attempts at developing Curry-Howard correspondences between session-typed ⇡-calculus and linear logic [27]: Caires and Pfenning’s ⇡DILL [9] corresponds to dual intuitionistic linear logic [4], and Wadler’s Classical Processes [53, CP] corresponds to classical linear logic [27, CLL] Both calculi guarantee deadlock freedom, which they achieve by restricting structure of processes and shared channels to trees, by combing name restriction and parallel composition into a single construct, corresponding to the logical cut. We follow the line of work from CP to Priority CP, and present Priority GV (PGV), a variant of GV which decouples channel creation from thread spawning, allowing cyclic-structured processes, but which guarantees deadlock freedom via priorities This closes the circle of the connection between CP and GV [53], and their priority-based versions, PCP [20] and PGV. To obtain a tight correspondence, we update PCP, moving away from commuting conversions and reduction as cut elimination towards reduction based on structural congruence, as it is standard in process calculi

Priority GV
Revisiting Priority CP
Correspondence between PGV and PCP
Related Work and Discussion
Conclusion
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call