Advertisement

Programming in Manticore, a Heterogenous Parallel Functional Language

  • Matthew Fluet
  • Lars Bergstrom
  • Nic Ford
  • Mike Rainey
  • John Reppy
  • Adam Shaw
  • Yingqi Xiao
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6299)

Abstract

The Manticore project is an effort to design and implement a new functional language for parallel programming. Unlike many earlier parallel languages, Manticore is a heterogeneous language that supports parallelism at multiple levels. Specifically, the Manticore language combines Concurrent ML-style explicit concurrency with fine-grain, implicitly threaded, parallel constructs. These lectures will introduce the Manticore language and explore a variety of programs written to take advantage of heterogeneous parallelism.

At the explicit-concurrency level, Manticore supports the creation of distinct threads of control and the coordination of threads through first-class synchronous-message passing. Message-passing synchronization, in contrast to shared-memory synchronization, fits naturally with the functional-programming paradigm.

At the implicit-parallelism level, Manticore supports a diverse collection of parallel constructs for different granularities of work. Many of these constructs are inspired by common functional-programming idioms.

In addition to describing the basic mechanisms, we will present a number of useful programming techniques that are enabled by these mechanisms.

Keywords

Parallel Execution Functional Programming Concurrent Programming Runtime System Parallel Array 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent programming in ERLANG, 2nd edn. Prentice Hall International (UK) Ltd., Hertfordshire (1996)zbMATHGoogle Scholar
  2. 2.
    Barton, R., Adkins, D., Prokop, H., Frigo, M., Joerg, C., Renard, M., Dailey, D., Leiserson, C.: Cilk Pousse(1998), http://people.csail.mit.edu/pousse/ (viewed on March 20, at 2:45 PM)
  3. 3.
    Blelloch, G.E.: Programming parallel algorithms. Communications of the ACM 39(3), 85–97 (1996)CrossRefGoogle Scholar
  4. 4.
    Blelloch, G.E., Chatterjee, S., Hardwick, J.C., Sipelstein, J., Zagha, M.: Implementation of a portable nested data-parallel language. Journal of Parallel and Distributed Computing 21(1), 4–14 (1994)CrossRefGoogle Scholar
  5. 5.
    Blelloch, G.E., Greiner, J.: A provable time and space efficient implementation of NESL. In: Proceedings of the 1996 ACM SIGPLAN International Conference on Functional Programming, pp. 213–225. ACM, New York (1996)Google Scholar
  6. 6.
    Blumofe, R.D., Leiserson, C.E.: Scheduling multithreaded computations by work stealing. Journal of the ACM 46(5), 720–748 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Carlisle, M., Hendren, L.J., Rogers, A., Reppy, J.: Supporting SPMD execution for dynamic data structures. ACM Transactions on Programming Languages and Systems 17(2), 233–263 (1995)CrossRefGoogle Scholar
  8. 8.
    Chakravarty, M.M.T., Keller, G.: More types for nested data parallel programming. In: Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, pp. 94–105. ACM, New York (2000)CrossRefGoogle Scholar
  9. 9.
    Chakravarty, M.M.T., Keller, G., Leshchinskiy, R., Pfannenstiel, W.: Nepal – Nested Data Parallelism in Haskell. In: Sakellariou, R., Keane, J.A., Gurd, J.R., Freeman, L. (eds.) Euro-Par 2001. LNCS, vol. 2150, pp. 524–534. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  10. 10.
    Chakravarty, M.M.T., Leshchinskiy, R., Peyton Jones, S., Keller, G.: Partial Vectorisation of Haskell Programs. In: Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, ACM, New York (2008)Google Scholar
  11. 11.
    Chakravarty, M.M.T., Leshchinskiy, R., Peyton Jones, S., Keller, G., Marlow, S.: Data Parallel Haskell: A status report. In: Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, pp. 10–18. ACM, New York (2007)Google Scholar
  12. 12.
    Dailey, D., Leiserson, C.E.: Using Cilk to write multiprocessor chess programs. The Journal of the International Computer Chess Association (2002)Google Scholar
  13. 13.
    Dean, J., Ghemawat, S.: MapReduce: Simplified data processing on large clusters. In: Proceedings of the Sixth Symposium on Operating Systems Design and Implementation, pp. 137–150 (December 2004)Google Scholar
  14. 14.
    Demaine, E.D.: Higher-order concurrency in Java. In: Proceedings of the Parallel Programming and Java Conference (WoTUG20)., pp. 34–47 (April 1997), http://theory.csail.mit.edu/~edemaine/papers/WoTUG20/
  15. 15.
    Flatt, M., Findler, R.B.: Kill-safe synchronization abstractions. In: Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2004), pp. 47–58 (June 2004)Google Scholar
  16. 16.
    Fluet, M., Ford, N., Rainey, M., Reppy, J., Shaw, A., Xiao, Y.: Status Report: The Manticore Project. In: Proceedings of the 2007 ACM SIGPLAN Workshop on ML, pp. 15–24. ACM, New York (2007)CrossRefGoogle Scholar
  17. 17.
    Fluet, M., Rainey, M., Reppy, J., Shaw, A., Xiao, Y.: Manticore: A heterogeneous parallel language. In: Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming, pp. 37–44. ACM, New York (2007)Google Scholar
  18. 18.
    Gansner, E.R., Reppy, J.H.: A Multi-threaded Higher-order User Interface Toolkit, Software Trends, vol. 1, pp. 61–80. John Wiley & Sons, Chichester (1993)Google Scholar
  19. 19.
    Gansner, E.R., Reppy, J.H. (eds.): The Standard ML Basis Library. Cambridge University Press, Cambridge (2004)Google Scholar
  20. 20.
    Gaudiot, J.L., DeBoni, T., Feo, J., Bohm, W., Najjar, W., Miller, P.: The Sisal model of functional programming and its implementation. In: Proceedings of the 2nd AIZU International Symposium on Parallel Algorithms / Architecture Synthesis (pAs 1997), pp. 112–123. IEEE Computer Society Press, Los Alamitos (1997)CrossRefGoogle Scholar
  21. 21.
    Hammond, K.: Parallel SML: a Functional Language and its Implementation in Dactl. The MIT Press, Cambridge (1991)Google Scholar
  22. 22.
    Hauser, C., Jacobi, C., Theimer, M., Welch, B., Weiser, M.: Using threads in interactive systems: A case study. In: Proceedings of the 14th ACM Symposium on Operating System Principles, pp. 94–105 (December 1993)Google Scholar
  23. 23.
    Hofstee, H.P.: Cell broadband engine architecture from 20,000 feet (August 2005), http://www-128.ibm.com/developerworks/power/library/pa-cbea.html
  24. 24.
    Jones, M.P., Hudak, P.: Implicit and explicit parallel programming in Haskell. Tech. Rep. Research Report YALEU/DCS/RR-982, Yale University (August 1993)Google Scholar
  25. 25.
    Leroy, X.: The Objective Caml System (release 3.00) (April 2000), http://caml.inria.fr
  26. 26.
    Leroy, X., Pessaux, F.: Type-based analysis of uncaught exceptions. ACM Transactions on Programming Languages and Systems 22(2), 340–377 (2000)CrossRefGoogle Scholar
  27. 27.
    Leshchinskiy, R., Chakravarty, M.M.T., Keller, G.: Higher order flattening. In: Alexandrov, V.N., van Albada, G.D., Sloot, P.M.A., Dongarra, J. (eds.) ICCS 2006. LNCS, vol. 3992, pp. 920–928. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  28. 28.
    McCarthy, J.: A Basis for a Mathematical Theory of Computation. In: Braffort, P., Hirschberg, D. (eds.) Computer Programming and Formal Systems, pp. 33–70. North-Holland, Amsterdam (1963), citeseer.ist.psu.edu/mccarthy63basis.html CrossRefGoogle Scholar
  29. 29.
    MLton: Concurrent ML, http://mlton.org/ConcurrentML
  30. 30.
    Mohr, E., Kranz, D.A., Halstead Jr., R.H.: Lazy task creation: a technique for increasing the granularity of parallel programs. In: Conference record of the 1990 ACM Conference on Lisp and Functional Programming, pp. 185–197. ACM, New York (1990)CrossRefGoogle Scholar
  31. 31.
    Nikhil, R.S.: ID Language Reference Manual. Laboratory for Computer Science. MIT, Cambridge (1991)Google Scholar
  32. 32.
    Nikhil, R.S.: Arvind: Implicit Parallel Programming in pH. Morgan Kaufmann Publishers, San Francisco (2001)Google Scholar
  33. 33.
    Olukotun, K., Hammond, L.: The future of microprocessors. ACM Queue 3(7) (September 2005), http://www.acmqueue.org
  34. 34.
    Peyton Jones, S., Reid, A., Henderson, F., Hoare, T., Marlow, S.: A semantics for imprecise exceptions. In: Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (PLDI 1999), pp. 25–36. ACM, New York (1999)CrossRefGoogle Scholar
  35. 35.
    Reeves, W.T.: Particle systems — a technique for modeling a class of fuzzy objects. ACM Transactions on Graphics 2(2), 91–108 (1983)CrossRefGoogle Scholar
  36. 36.
    Reppy, J., Russo, C., Xiao, Y.: Parallel Concurrent ML. In: Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, pp. 257–268. ACM, New York (2009)Google Scholar
  37. 37.
    Reppy, J., Xiao, Y.: Toward a parallel implementation of Concurrent ML. In: Proceedings of the ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming. ACM, New York (2008)Google Scholar
  38. 38.
    Reppy, J.H.: CML: A higher-order concurrent language. In: Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation (PLDI 1991), pp. 293–305. ACM, New York (1991)CrossRefGoogle Scholar
  39. 39.
    Reppy, J.H.: Concurrent Programming in ML. Cambridge University Press, Cambridge (1999)CrossRefzbMATHGoogle Scholar
  40. 40.
    Russell, G.: Events in Haskell, and how to implement them. In: Proceedings of the Sixth ACM SIGPLAN International Conference on Functional Programming, pp. 157–168 (September 2001)Google Scholar
  41. 41.
    Shavit, N., Touitou, D.: Software transactional memory. In: Proceedings of the Fourteenth Annual ACM Symposium on Principles of Distributed Computing, pp. 204–213. ACM, New York (1995)CrossRefGoogle Scholar
  42. 42.
    Shaw, A.: Data Parallelism in Manticore. Master’s thesis, University of Chicago (July 2007), http://manticore.cs.uchicago.edu
  43. 43.
    Yi, K.: An abstract interpretation for estimating uncaught exceptions in Standard ML programs. Sci. Comput. Program. 31(1), 147–173 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  44. 44.
    Young, C., Szymanski, Y.N,L., Reppy, T., Pike, J., Narlikar, R., Mullender, G., Grosse, S.E.: Protium, an infrastructure for partitioned applications. In: Proceedings of the Twelfth IEEE Workshop on Hot Topics in Operating Systems (HotOS-XII), pp. 41–46 (January 2001)Google Scholar
  45. 45.
    Ziarek, L., Schatz, P., Jagannathan, S.: Stabilizers: a modular checkpointing abstraction for concurrent functional programs. In: Proceedings of the 11th ACM SIGPLAN International Conference on Functional Programming, pp. 136–147. ACM, New York (2006)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Matthew Fluet
    • 1
  • Lars Bergstrom
    • 2
  • Nic Ford
    • 2
  • Mike Rainey
    • 2
  • John Reppy
    • 2
  • Adam Shaw
    • 2
  • Yingqi Xiao
    • 2
  1. 1.Rochester Institute of TechnologyRochesterUSA
  2. 2.University of ChicagoChicagoUSA

Personalised recommendations