skip to main content
article

Type-safe higher-order channels in ML-like languages

Published:01 October 2007Publication History
Skip Abstract Section

Abstract

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.

References

  1. Eric Allan, David Chase, Joe Hallet, Victor Luchangco, Jan-Willem Maessen, Sukyoung Ryu, Guy L. Steele Jr., and Sam Tobin-Hochstadt. The Fortress language specification version 1.0beta. Technical report, Sun Microsystems Inc., March 2007.Google ScholarGoogle Scholar
  2. An asynchronous model of locality, failure, and process mobility. In Proceedings of the 2nd International Conference on Coordination Languages and Models, LNCS 1282, pages 374--391. Springer-Verlag, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Joe Armstrong. The development of erlang. In Proceedings of the Second ACM SIGPLAN International Conference on Functional Programming, pages 196--203. ACM Press, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Krste Asanovic, Ras Bodik, Bryan Christopher Catanzaro, Joseph Gebis, Parry Husbands, Kurt Keutzer, David Patterson, William Plishker, John Shalf, Samuel Williams, and Katherine Yelick. The landscape of parallel computing research: A view from berkeley. Technical Report UCB/EECS-2006-183, EECS Department, University of California, Berkeley, December 2006.Google ScholarGoogle Scholar
  5. Guy Blelloch. Programming parallel algorithms. Communications of the ACM, 39(3):85--97, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Manuel Chakravarty, Roman Leshchinskiy, Simon Peyton Jones, Gabriele Keller, and Simon Marlow. Data Parallel Haskell: a status report. In Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, pages 11--18, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Philippe Charles, Christian Grothoff, Vijay Saraswat, Christopher Donawa, Allan Kielstra, Kemal Ebcioglu, Christoph von Praun, and Vivek Sarkar. 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, pages 519--538, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Cray Inc. The Chapel language specification version 0.4. Technical report, February 2005.Google ScholarGoogle Scholar
  9. Tarek El-Ghazawi, William Carlson, and Jesse Draper. Upc language specifications, v1.1.1, October 2003.Google ScholarGoogle Scholar
  10. Matthew Fluet, Mike Rainey, John Reppy, Adam Shaw, and Yingqi Xiao. Manticore: A heterogeneous parallel language. In Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, pages 25--32, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Cédric Fournet, Georges Gonthier, Jean-Jacques L&3233;vy, Luc Maranget, and Didier R&3233;my. A calculus of mobile agents. In CONCUR: 7th International Conference on Concurrency Theory, LNCS 1119, pages 406--421. Springer, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Cédric Fournet, Fabrice Le Fessant, Luc Maranget, and Alan Schmitt. JoCaml: a language for concurrent distributed and mobile programming. In Johan Jeuring and Simon Peyton Jones, editors, Advanced Functional Programming, 4th International School, 2002, volume 2638 of Lecture Notes in Computer Science, pages 129--158. Springer-Verlag, 2003.Google ScholarGoogle Scholar
  13. Robert Halstead, Jr. MULTILISP: a language for concurrent symbolic computation. ACM Transactions on Programming Languages and Systems, 7(4):501--538, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Paul Hilfinger, Dan Bonachea, Kaushik Datta, David Gay, Susan Graham, Benjamin Liblit, Geoffrey Pike, Jimmy Su, and Katherine Yelick. Titanium language reference manual, version 2.19. Technical Report UCB/EECS-2005-15, EECS Department, University of California, Berkeley, November 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Lorin Hochstein, Jeff Carver, Forrest Shull, Sima Asgari, Victor Basili, Jeffrey Hollingsworth, and Marvin Zelkowitz. Parallel programmer productivity: A case study of novice parallel programmers. In Proceedings of the 2005 ACM/IEEE Conference on Supercomputing, page 35. IEEE Computer Society, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Limin Jia and David Walker. Modal proofs as distributed programs (extended abstract). In Proceedings of the European Symposium on Programming, LNCS 2986, pages 219--233. Springer, 2004.Google ScholarGoogle Scholar
  17. Frederick Knabe. Language Support for Mobile Agents. PhD thesis, Department of Computer Science, Carnegie Mellon University, 1995.Google ScholarGoogle Scholar
  18. Tom Murphy, VII, Karl Crary, Robert Harper, and Frank Pfenning. A symmetric modal lambda calculus for distributed computing. In Proceedings of the 19th IEEE Symposium on Logic in Computer Science. IEEE Press, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Nikhil and Arvind. Implicit parallel programming in pH. Morgan Kaufmann, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Martin Odersky. Polarized name passing. In Proceedings of the 15th Conference on Foundations of Software Technology and Theoretical Computer Science, LNCS 1026, pages 324--337. Springer-Verlag, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Sungwoo Park. A modal language for the safety of mobile values. In Naoki Kobayashi, editor, Proceedings of the 4th Asian Symposium on Programming Languages and Systems, LNCS 4279, pages 217--233. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Benjamin Pierce and Davide Sangiorgi. Typing and subtyping for mobile processes. In Proceedings of the 8th Annual IEEE Symposium on Logic in Computer Science, pages 376--385, 1993.Google ScholarGoogle ScholarCross RefCross Ref
  23. Alan Schmitt. Safe dynamic binding in the join calculus. In TCS '02: Proceedings of the IFIP 17th World Computer Congress - TC1 Stream / 2nd IFIP International Conference on Theoretical Computer Science, pages 563--575. Kluwer, B. V., 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Alan Schmitt and Jean-Bernard Stefani. The M-calculus: a higher-order distributed process calculus. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 50--61. ACM Press, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Nir Shavit and Dan Touitou. Software transactional memory. In Proceedings of the fourteenth ACM symposium on Principles of Distributed Computing, pages 204--213. ACM Press, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. James Stamos and David Gifford. Remote evaluation. ACM Transactions on Programming Languages and Systems, 12 (4):537--564, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Herb Sutter. The free lunch is over: a fundamental turn toward concurrency in software. Dr. Dobb's Journal, 30 (3), March 2005.Google ScholarGoogle Scholar
  28. Nobuko Yoshida and Matthew Hennessy. Subtyping and locality in distributed higher order processes (extended abstract). In CONCUR: 10th International Conference on Concurrency Theory, LNCS 1664, pages 557--572. Springer-Verlag, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Xiaogang Zhang and John Potter. Responsive bisimulation. In Proceedings of the 2nd IFIP International Conference on Theoretical Computer Science, pages 601--612. Kluwer, B. V., 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Type-safe higher-order channels in ML-like languages

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 42, Issue 9
          Proceedings of the ICFP '07 conference
          September 2007
          331 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1291220
          Issue’s Table of Contents
          • cover image ACM Conferences
            ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
            October 2007
            346 pages
            ISBN:9781595938152
            DOI:10.1145/1291151

          Copyright © 2007 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 October 2007

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!