Embedding Session Types in Haskell

被引:0
作者
Lindley, Sam [1 ]
Morris, J. Garrett [1 ]
机构
[1] Univ Edinburgh, Edinburgh, Midlothian, Scotland
基金
英国工程与自然科学研究理事会;
关键词
linear types; session types; embedded languages; LANGUAGE;
D O I
10.1145/2976002.2976018
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present a novel embedding of session-typed concurrency in Haskell. We extend an existing HOAS embedding of linear lambda-calculus with a set of core session-typed primitives, using indexed type families to express the constraints of the session typing discipline. We give two interpretations of our embedding, one in terms of GHC's built-in concurrency and another in terms of purely functional continuations. Our safety guarantees, including deadlock freedom, are assured statically and introduce no additional runtime overhead.
引用
收藏
页码:133 / 145
页数:13
相关论文
共 23 条
[1]  
Atkey R, 2009, HASKELL'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN HASKELL SYMPOSIUM, P37
[2]  
Caires L, 2010, LECT NOTES COMPUT SC, V6269, P222, DOI 10.1007/978-3-642-15375-4_16
[3]   Finally tagless, partially evaluated: Tagless staged interpreters for simpler typed languages [J].
Carette, Jacques ;
Kiselyov, Oleg ;
Shan, Chung-Chieh .
JOURNAL OF FUNCTIONAL PROGRAMMING, 2009, 19 :509-543
[4]  
Dardha O., 2012, PPDP, P139, DOI DOI 10.1145/2370776.2370794
[5]   Linear type theory for asynchronous session types [J].
Gay, Simon J. ;
Vasconcelos, Vasco T. .
JOURNAL OF FUNCTIONAL PROGRAMMING, 2010, 20 :19-50
[6]  
Honda K, 1998, LECT NOTES COMPUT SC, V1381, P122, DOI 10.1007/BFb0053567
[7]  
Honda Kohei., 1993, CONCUR'93, 4th International Conference on Concurrency Theory, Hildesheim, Germany, August 23-26, 1993, V715, P509, DOI DOI 10.1007/3-540-57208-2_
[8]  
Imai K., 2010, EPTCS, V69, P74
[9]  
Jespersen T.B.L., 2015, Proceedings of the 11th ACM SIGPLAN Workshop on Generic Programming. WGP 2015. Vancouver, BC, P13, DOI DOI 10.1145/2808098.2808100
[10]   Linearity and the pi-calculus [J].
Kobayashi, N ;
Pierce, BC ;
Turner, DN .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1999, 21 (05) :914-947