Programming in Manticore, a Heterogenous Parallel Functional Language

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.

[1]  John H. Reppy,et al.  Specialization of CML message-passing primitives , 2007, POPL '07.

[2]  Joe Armstrong,et al.  Concurrent programming in ERLANG , 1993 .

[3]  Simon L. Peyton Jones,et al.  Asynchronous exceptions in Haskell , 2001, PLDI '01.

[4]  J. Shepherdson,et al.  Computer programming and formal systems , 1965 .

[5]  Olivier Danvy,et al.  Representing Control: a Study of the CPS Transformation , 1992, Mathematical Structures in Computer Science.

[6]  Arvind,et al.  Implicit parallel programming in pH , 2001 .

[7]  Andrew W. Appel,et al.  Iterated register coalescing , 1996, POPL '96.

[8]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[9]  David Clark Laboratory for Computer Science , 1995 .

[10]  Simon Peyton Jones,et al.  Playing by the rules: rewriting as a practical optimisation technique in GHC , 2001 .

[11]  Anne Rogers,et al.  Supporting dynamic data structures on distributed-memory machines , 1995, TOPL.

[12]  Mitchell Wand,et al.  Continuations and coroutines , 1984, LFP '84.

[13]  F. Warren Burton,et al.  Executing functional programs on a virtual tree of processors , 1981, FPCA '81.

[14]  John H. Reppy,et al.  First-Class Synchronous Operations in Standard ML , 1989 .

[15]  Mitchell Wand,et al.  Continuation-Based Multiprocessing , 1980, High. Order Symb. Comput..

[16]  R. Kent Dybvig,et al.  Representing control in the presence of one-shot continuations , 1996, PLDI '96.

[17]  Claes Wikström,et al.  Concurrent programming in ERLANG (2nd ed.) , 1996 .

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

[19]  Kevin Hammond Parallel SML: A functional language and its implementation in Dactl , 1991 .

[20]  Maged M. Michael,et al.  Simple, fast, and practical non-blocking and blocking concurrent queue algorithms , 1996, PODC '96.

[21]  Suresh Jagannathan,et al.  Stabilizers: a modular checkpointing abstraction for concurrent functional programs , 2006, ICFP '06.

[22]  John H. Reppy,et al.  Concurrent programming in ML , 1999 .

[23]  Kwangkeun Yi An Abstract Interpretation for Estimating Uncaught Exceptions in Standard ML Programs , 1998, Sci. Comput. Program..

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

[25]  John H. Reppy,et al.  Status report: the manticore project , 2007, ML '07.

[26]  Andrew W. Appel,et al.  Simple generational garbage collection and fast allocation , 1989, Softw. Pract. Exp..

[27]  Emden R. Gansner,et al.  The standard ML basis library , 2002 .

[28]  Erik D. Demaine Higher-Order Concurrency in PVM , 1997 .

[29]  Manuel M. T. Chakravarty,et al.  Nepal - Nested Data Parallelism in Haskell , 2001, Euro-Par.

[30]  Dror G. Feitelson,et al.  Job Scheduling in Multiprogrammed Parallel Systems , 1997 .

[31]  Jean-Luc Gaudiot,et al.  The Sisal model of functional programming and its implementation , 1997, Proceedings of IEEE International Symposium on Parallel Algorithms Architecture Synthesis.

[32]  Guy E. Blelloch,et al.  Programming parallel algorithms , 1996, CACM.

[33]  Simon L. Peyton Jones,et al.  Data parallel Haskell: a status report , 2007, DAMP '07.

[34]  John H. Reppy,et al.  Manticore: a heterogeneous parallel language , 2007, DAMP '07.

[35]  François Pessaux,et al.  Type-based analysis of uncaught exceptions , 2000, TOPL.

[36]  Robert Hieb,et al.  Engines From Continuations , 1989, Comput. Lang..

[37]  Robert H. Halstead,et al.  Implementation of multilisp: Lisp on a multiprocessor , 1984, LFP '84.

[38]  Kunle Olukotun,et al.  The Future of Microprocessors , 2005, ACM Queue.

[39]  Robert Bruce Findler,et al.  Kill-safe synchronization abstractions , 2004, PLDI '04.

[40]  Manuel M. T. Chakravarty,et al.  More types for nested data parallel programming , 2000, ICFP '00.

[41]  John H. Reppy Optimizing Nested Loops Using Local CPS Conversion , 2002, High. Order Symb. Comput..

[42]  Guy E. Blelloch,et al.  Implementation of a portable nested data-parallel language , 1993, PPOPP '93.

[43]  Marvin Theimer,et al.  Using threads in interactive systems: a case study , 1993, SOSP '93.

[44]  Daniel P. Friedman,et al.  Engines build process abstractions , 1984, LFP '84.

[45]  Simon Peyton Jones,et al.  Featherweight concurrency in a portable assembly language , 2001 .

[46]  Mikael Pettersson,et al.  A Term Pattern-Match Compiler Inspired by Finite Automata Theory , 1992, CC.

[47]  John H. Reppy,et al.  A scheduling framework for general-purpose parallel languages , 2008, ICFP.

[48]  Paul Hudak,et al.  Implicit and Explicit Parallel Programming in Haskell , 1993 .

[49]  Manuel M. T. Chakravarty,et al.  Higher Order Flattening , 2006, International Conference on Computational Science.

[50]  John H. Reppy,et al.  Compiler support for lightweight concurrency , 2002 .

[51]  Eric S. Roberts,et al.  WorkCrews: An abstraction for controlling parallelism , 2005, International Journal of Parallel Programming.

[52]  Guy E. Blelloch,et al.  A provable time and space efficient implementation of NESL , 1996, ICFP '96.

[53]  Xavier Leroy The objective caml system release 3 , 2001 .

[54]  Richard Carlsson,et al.  Message analysis for concurrent programs using message passing , 2006, TOPL.

[55]  Shikharesh Majumdar,et al.  Scheduling in multiprogrammed parallel systems , 1988, SIGMETRICS 1988.

[56]  Keshav Pingali,et al.  I-structures: Data structures for parallel computing , 1986, Graph Reduction.

[57]  Stephen Gilmore,et al.  Combining Measurement and Stochastic Modelling to Enhance Scheduling Decisions for a Parallel Mean Value Analysis Algorithm , 2006, International Conference on Computational Science.

[58]  Olin Shivers,et al.  Atomic heap transactions and fine-grain interrupts , 1999, ICFP '99.

[59]  George Russell,et al.  Events in Haskell, and how to implement them , 2001, ICFP '01.

[60]  Robert H. Halstead,et al.  Lazy task creation: a technique for increasing the granularity of parallel programs , 1990, LISP and Functional Programming.

[61]  Margo Seltzer,et al.  Operating system scheduling for chip multithreaded processors , 2006 .

[62]  Olin Shivers Continuations and threads: Expressing machine concurrency directly in advanced languages , 1997 .

[63]  Sape J. Mullender,et al.  Protium, an infrastructure for partitioned applications , 2001, Proceedings Eighth Workshop on Hot Topics in Operating Systems.

[64]  Damien Doligez,et al.  Portable, unobtrusive garbage collection for multiprocessor systems , 1994, POPL '94.

[65]  Simon Peyton Jones,et al.  Partial Vectorisation of Haskell Programs , 2008 .

[66]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[67]  Andrew W. Appel,et al.  Efficient and safe-for-space closure conversion , 2000, TOPL.

[68]  John H. Reppy,et al.  Asynchronous Signals is Standard ML , 1990 .

[69]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[70]  Damien Doligez,et al.  A concurrent, generational garbage collector for a multithreaded implementation of ML , 1993, POPL '93.

[71]  Robert D. Blumofe,et al.  Scheduling multithreaded computations by work stealing , 1994, Proceedings 35th Annual Symposium on Foundations of Computer Science.

[72]  Emden R. Gansner,et al.  A multi-threaded higher-order user interface toolkit , 1993 .

[73]  Rizos Sakellariou,et al.  Euro-Par 2001 Parallel Processing , 2001, Lecture Notes in Computer Science.

[74]  John McCarthy,et al.  A basis for a mathematical theory of computation, preliminary report , 1899, IRE-AIEE-ACM '61 (Western).

[75]  John H. Reppy,et al.  A Portable and Optimizing Back End for the SML/NJ Compiler , 1994, CC.

[76]  Anne Rogers,et al.  Supporting SPMD Execution for Dynamic Data Structures , 1992, LCPC.

[77]  John H. Reppy,et al.  Implicitly-threaded parallelism in Manticore , 2008, ICFP 2008.

[78]  Simon L. Peyton Jones,et al.  A semantics for imprecise exceptions , 1999, PLDI '99.

[79]  John H. Reppy,et al.  CML: A higher concurrent language , 1991, PLDI '91.

[80]  Claudio V. Russo,et al.  Parallel concurrent ML , 2009, ICFP.

[81]  Hans-Juergen Boehm,et al.  Ropes: An alternative to strings , 1995, Softw. Pract. Exp..