Hostname: page-component-7479d7b7d-rvbq7 Total loading time: 0 Render date: 2024-07-13T20:20:09.287Z Has data issue: false hasContentIssue false

Type-safe higher-order channels with channel locality1

Published online by Cambridge University Press:  01 January 2009

SUNGWOO PARK
Affiliation:
Department of Computer Science and Engineering, Pohang University of Science and Technology, Republic of Korea (e-mail: gla@postech.ac.kr, genilhs@postech.ac.kr)
HYEONSEUNG IM
Affiliation:
Department of Computer Science and Engineering, Pohang University of Science and Technology, Republic of Korea (e-mail: gla@postech.ac.kr, genilhs@postech.ac.kr)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

As a means of transmitting not only data but also code encapsulated within functions, higher-order channels provide an advanced form of task parallelism in parallel computations. In the presence of mutable references, however, they pose a safety problem because references may be transmitted to remote threads where they are no longer valid. This paper presents an ML-like parallel language with type-safe higher-order channels. By type safety, we mean that no value written to a channel contains references, or equivalently, that no reference escapes via a channel from the thread where it is created. The type system uses a typing judgment that is capable of deciding whether the value to which a term evaluates contains references or not. The use of such a typing judgment also makes it easy to achieve another desirable feature of channels, channel locality, that associates every channel with a unique thread for serving all values addressed to it. Our type system permits mutable references in sequential computations and also ensures that mutable references never interfere with parallel computations. Thus, it provides both flexibility in sequential programming and ease of implementing parallel computations.

Type
Articles
Copyright
Copyright © Cambridge University Press 2008

References

Allan, Eric, Chase, David, Hallet, Joe, Luchangco, Victor, Maessen, Jan-Willem, Ryu, Sukyoung, Steele, Guy L. Jr. & Tobin-Hochstadt, Sam (2007) The Fortress Language Specification Version 1.0Beta. Technical Report, Sun Microsystems Inc.Google Scholar
Amadio, Roberto (1997) An asynchronous model of locality, failure, and process mobility. In Proceedings of the Second International Conference on Coordination Languages and Models, LNCS 1282. Berlin, Germany: Springer-Verlag, pp. 374391.Google Scholar
Armstrong, Joe (1997) The development of Erlang. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming. Amsterdam, The Netherlands: ACM Press, pp. 196203.CrossRefGoogle Scholar
Asanovic, Krste, Bodik, Ras, Catanzaro, Bryan Christopher, Gebis, Joseph, Husbands, Parry, Keutzer, Kurt, Patterson, David, Plishker, William, Shalf, John, Williams, Samuel & Yelick, Katherine (December 2006). The Landscape of Parallel Computing Research: A View From Berkeley. Technical Report No. UCB/EECS-2006-183, EECS Department, University of California, Berkeley.Google Scholar
Baker, Henry Jr. & Hewitt, Carl (1977) The incremental garbage collection of processes. Sigplan Notice 12 (8), 5559.CrossRefGoogle Scholar
Blelloch, Guy (1996) Programming parallel algorithms. Commun. ACM 39 (3), 8597.CrossRefGoogle Scholar
Borghuis, Tijn & Feijs, Loe (2000) A constructive logic for services and information flow in computer networks. Comput. J. 43 (4), 275289.CrossRefGoogle Scholar
Braüner, Torben (2004) Natural deduction for hybrid logic. J. Logic Comput. 14 (3), 329353.CrossRefGoogle Scholar
Chakravarty, Manuel, Leshchinskiy, Roman, Peyton Jones, Simon, Keller, Gabriele & Marlow, Simon (2007) Data Parallel Haskell: A status report. In Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming. Nice, France: ACM, pp. 1118.Google Scholar
Charles, Philippe, Grothoff, Christian, Saraswat, Vijay, Donawa, Christopher, Kielstra, Allan, Ebcioglu, Kemal, vonPraun, Christoph Praun, Christoph & Sarkar, Vivek (2005) X10: An object-oriented approach to non-uniform cluster computing. In Proceedings of the 20th ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications. San Diego, CA: ACM, pp. 519538.CrossRefGoogle Scholar
Cray Inc. (2005) The Chapel Language Specification Version 0.4. Technical Report.Google Scholar
El-Ghazawi, Tarek, Carlson, William & Draper, Jesse (2003) UPC Language Specifications, v1.1.1Google Scholar
Fluet, Matthew, Rainey, Mike, Reppy, John, Shaw, Adam & Xiao, Yingqi (2007) Manticore: A heterogeneous parallel language. In Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming. Nice, France: ACM, pp. 2532.Google Scholar
Fournet, Cédric, Gonthier, Georges, Lévy, Jean-Jacques, Maranget, Luc & Rémy, Didier (1996) A calculus of mobile agents. In CONCUR: Seventh International Conference on Concurrency Theory, LNCS 1119. Pisa, Italy: Springer, pp. 406421.Google Scholar
Fournet, Cédric, Le Fessant, Fabrice, Maranget, Luc & Schmitt, Alan (2003) JoCaml: A language for concurrent distributed and mobile programming. In Advanced Functional Programming, Fourth International School, 2002, LNCS 2638, Johan, Jeuring, & Simon, Peyton Jones (eds). Oxford, UK: Springer-Verlag, pp. 129158.Google Scholar
Halstead, Robert Jr. (1985) MULTILISP: A language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7 (4), 501538.CrossRefGoogle Scholar
Hilfinger, Paul, Bonachea, Dan, Datta, Kaushik, Gay, David, Graham, Susan, Liblit, Benjamin, Pike, Geoffrey, Su, Jimmy & Yelick, Katherine (November 2005) Titanium Language Reference Manual, Version 2.19. Technical Report No. UCB/EECS-2005-15, EECS Department, University of California, Berkeley.Google Scholar
Hochstein, Lorin, Carver, Jeff, Shull, Forrest, Asgari, Sima, Basili, Victor, Hollingsworth, Jeffrey & Zelkowitz, Marvin (2005) Parallel programmer productivity: A case study of novice parallel programmers. In Proceedings of the 2005 ACM/IEEE Conference on Supercomputing. Seattle, WA: IEEE Computer Society, pp. 35–43.CrossRefGoogle Scholar
Jia, Limin & Walker, David (2004) Modal proofs as distributed programs (extended abstract). In Pages 219–233 of: Proceedings of the European Symposium on Programming, LNCS 2986. Barcelona, Spain: Springer.Google Scholar
Knabe, Frederick (1995) Language Support for Mobile Agents. Ph.D. Thesis, Department of Computer Science, Carnegie Mellon University.Google Scholar
Murphy, Tom VII, Crary, Karl & Harper, Robert (November 2007) Type-safe distributed programming with ML5. In Trustworthy Global Computing 2007. Sophia-Antipolis, France: Springer.Google Scholar
Murphy, Tom VII, Crary, Karl, Harper, Robert & Pfenning, Frank (2004) A symmetric modal lambda calculus for distributed computing. In Proceedings of the 19th IEEE Symposium on Logic in Computer Science. Turku, Finland: IEEE Press, pp. 286295.Google Scholar
Nikhil, Rishiyur & Arvind, (2001) Implicit Parallel Programming in pH. San Francisco, CA: Morgan Kaufmann.Google Scholar
Odersky, Martin (1995) Polarized name passing. In Proceedings of the 15th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 1026. Bangalore, India: Springer-Verlag, pp. 324337.Google Scholar
Park, Sungwoo (2006) A modal language for the safety of mobile values. In Proceedings of the Fourth Asian Symposium on Programming Languages and Systems, LNCS 4279, Naoki, Kobayashi (ed). Sydney, Australia: Springer, pp. 217233.Google Scholar
Park, Sungwoo (2007) Type-safe higher-order channels in ML-like languages. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming. Freiburg, Germany: ACM, pp. 191202.CrossRefGoogle Scholar
Pfenning, Frank & Davies, Rowan (2001) A judgmental reconstruction of modal logic. Math. Struct. Comput. Sci. 11 (4), 511540.CrossRefGoogle Scholar
Pierce, Benjamin & Sangiorgi, Davide (1993) Typing and subtyping for mobile processes. In Proceedings of the Eighth Annual IEEE Symposium on Logic in Computer Science. Montreal, Canada: IEEE Computer Society, pp. 376385.Google Scholar
Rossberg, Andreas, Botlan, Didier Le, Tack, Guido, Brunklaus, Thorsten & Smolka, Gert (2005) Alice ML through the looking glass. In Trends in Functional Programming, Loidl, Hans-Wolfgang (ed), München, Germany: vol. 5. Intellect Books, pp. 7996.Google Scholar
Schmitt, Alan (2002) Safe dynamic binding in the join calculus. In TCS '02: Proceedings of the IFIP 17th World Computer Congress—TC1 Stream/Second IFIP International Conference on Theoretical Computer Science. Montréal, Quebéc, Canada: Kluwer, B.V, pp 563575.Google Scholar
Schmitt, Alan & Stefani, Jean-Bernard (2003) The M-calculus: A higher-order distributed process calculus. In Proceedings of the 30th ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages. New Orleans, LA: ACM, pp. 5061.CrossRefGoogle Scholar
Shavit, Nir & Touitou, Dan (1995) Software transactional memory. In Proceedings of the 14th ACM Symposium on Principles of Distributed Computing. Ottawa, Ontario, Canada: ACM, pp. 204213.Google Scholar
Simpson, Alex K. (1994) The Proof Theory and Semantics of Intuitionistic Modal Logic. Ph.D. Thesis, Department of Philosophy, University of Edinburgh.Google Scholar
Stamos, James & Gifford, David (1990) Remote evaluation. ACM Trans. Program. Lang. Syst. 12 (4), 537564.CrossRefGoogle Scholar
Sutter, Herb (2005) The free lunch is over: A fundamental turn toward concurrency in software. Dr. Dobb's J. 30 (3).Google Scholar
Yoshida, Nobuko & Hennessy, Matthew (1999) Subtyping and locality in distributed higher order processes (extended abstract). In CONCUR: 10th International Conference on Concurrency Theory, LNCS 1664. Eindhoven, The Netherlands: Springer-Verlag, pp. 557572.Google Scholar
Zhang, Xiaogang & Potter, John (2002) Responsive bisimulation. In Pages 601–612 of: Proceedings of the Second IFIP International Conference on Theoretical Computer Science. Montréal Québec, Canada: Kluwer, B.V., pp. 601612.Google Scholar
Submit a response

Discussions

No Discussions have been published for this article.