Type Reconstruction for Linear -Calculus with I/O Subtyping

Abstract Powerful concurrency primitives in recent concurrent languages and thread libraries provide great flexibility about implementation of high-level features like concurrent objects. However, they are so low-level that they often make it difficult to check global correctness of programs or to perform nontrivial code optimization, such as elimination of redundant communication. In order to overcome those problems, advanced type systems for input-only/output-only channels and linear (use-once) channels have been recently studied, but the type reconstruction problem for those type systems remained open, and therefore, their applications to concurrent programming languages have been limited. In this paper, we develop type reconstruction algorithms for variants of Kobayashi, Pierce, and Turner's linear channel type system with Pierce and Sangiorgi's subtyping based on input-only/output-only channel types and prove correctness of the algorithms. To our knowledge, no complete type reconstruction algorithm has been previously known for those type systems. We have implemented one of the algorithms and incorporated it into the compiler of the concurrent language HACL. This paper also shows some experimental results on the algorithm and its application to compile-time optimizations.

[1]  Peter Lee,et al.  No assembly required: compiling standard ML to C , 1992, LOPL.

[2]  Akinori Yonezawa,et al.  Higher-Order Concurrent Linear Logic Programming , 1994, Theory and Practice of Parallel Programming.

[3]  Flemming Nielson,et al.  Static and Dynamic Processor Allocation for Higher-Order Concurrent Languages , 1995, TAPSOFT.

[4]  Nicolas Mercouroff,et al.  An Algorithm for Analyzing Communicating Processes , 1991, MFPS.

[5]  Atsushi Igarashi Type-Based Analysis Of Usage Of Values For Concurrent Programming Languages , 1997 .

[6]  Benjamin C. Pierce,et al.  Pict: a programming language based on the Pi-Calculus , 2000, Proof, Language, and Interaction.

[7]  Davide Sangiorgi,et al.  Behavioral equivalence in the polymorphic pi-calculus , 2000, JACM.

[8]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[9]  Robin Milner,et al.  The Polyadic π-Calculus: a Tutorial , 1993 .

[10]  Ryan Stansifer,et al.  Type inference with subtypes , 1988, POPL '88.

[11]  Davide Sangiorgi,et al.  Behavioral equivalence in the polymorphic pi-calculus , 1997, POPL '97.

[12]  Klaus-Peter Löhr,et al.  Object-Oriented Concurrent Programming , 1992, TOOLS.

[13]  Akinori Yonezawa,et al.  Static Analysis of Communication for Asynchronous Concurrent Programming Languages , 1995, SAS.

[14]  Christopher Colby Analyzing the communication topology of concurrent programs , 1995, PEPM '95.

[15]  Simon J. Gay,et al.  A sort inference algorithm for the polyadic π-calculus , 1993, POPL '93.

[16]  Atsushi Igarashi,et al.  Type-Based Analysis of Communication for Concurrent Programming Languages , 1997, SAS.

[17]  Vasco Thudichum Vasconcelos,et al.  Principal Typing Schemes in a Polyadic pi-Calculus , 1993, CONCUR.

[18]  Davide Sangiorgi,et al.  Typing and subtyping for mobile processes , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[19]  Flemming Nielson,et al.  Higher-order concurrent programs with finite communication topology (extended abstract) , 1994, POPL '94.

[20]  Kohei Honda,et al.  Principal Typing Schemes in a Polyadic pi-Calculus , 1993, CONCUR.

[21]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[22]  米沢 明憲 ABCL : an object-oriented concurrent system , 1990 .

[23]  Philip Wadler,et al.  Once upon a type , 1995, FPCA '95.

[24]  Naoki Kobayashi A partially deadlock-free typed process calculus , 1998, TOPL.

[25]  John H. Reppy,et al.  CML: A Higher-Order Concurrent Language , 1991, PLDI.

[26]  Benjamin C. Pierce,et al.  Linearity and the pi-calculus , 1996, POPL '96.