To be or not to be ...lazy (In a Parallel Context)

Laziness restricts the exploitation of parallelism because expressions are evaluated only on demand. Thus, parallel extensions of lazy functional languages, like Haskell, usually override laziness to some extent. The purpose of the present work is to analyze how and to which extent strictness should be introduced in a lazy language to design a parallel extension of it. Towards this end, we have considered different evaluation strategies mixing laziness and eagerness for the language Eden -a parallel extension of Haskell-, we have given formal definitions for each, and we have implemented them in an interpreter to be able to run examples with alternative evaluation models, so that we can observe the intermediate and final states of the processes in the system, in terms of heaps of closures. Although the study is based on Eden, the concepts involved and the conclusions that we have obtained can be transferred to other parallel and functional languages.

[1]  Kevin Hammond,et al.  Research Directions in Parallel Functional Programming , 1999, Springer London.

[2]  Robin Milner,et al.  Definition of standard ML , 1990 .

[3]  Hans-Wolfgang Loidl,et al.  Parallel and Distributed Haskells , 2002, Journal of Functional Programming.

[4]  Philip W. Trinder,et al.  An operational semantics for parallel lazy evaluation , 2000, ICFP '00.

[5]  Yolanda Ortega-Mallén,et al.  An Operational Semantics for the Parallel Language Eden , 2002, Parallel Process. Lett..

[6]  Rita Loogen Programming Language Constructs , 1999, Research Directions in Parallel Functional Programming.

[7]  Mercedes Hidalgo Herrero Semánticas formales para un lenguaje funcional paralelo , 2004 .

[8]  Rita Loogen,et al.  Under Consideration for Publication in J. Functional Programming Parallel Functional Programming in Eden , 2022 .

[9]  Hans-Wolfgang Loidl,et al.  Algorithm + strategy = parallelism , 1998, Journal of Functional Programming.

[10]  Paul H. J. Kelly Functional programming for loosely-coupled multiprocessors , 1989, Research monographs in parallel and distributed computing.

[11]  Gilles Kahn,et al.  Coroutines and Networks of Parallel Processes , 1977, IFIP Congress.

[12]  Yolanda Ortega-Mallén,et al.  Comparing Alternative Evaluation Strategies for Stream-Based Parallel Functional Languages , 2006, IFL.

[13]  M.C.J.D. van Eekelen,et al.  Reasoning about explicit strictness in a lazy language using mixed lazy/strict semantics , 2002 .

[14]  John Launchbury,et al.  A natural semantics for lazy evaluation , 1993, POPL '93.

[15]  Marko van Eekelen,et al.  Proving lazy folklore with mixed lazy/strict semantics , 2007 .

[16]  Peyton Jones,et al.  Haskell 98 language and libraries : the revised report , 2003 .

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

[18]  Yolanda Ortega-Mallén,et al.  Analyzing the influence of mixed evaluation on the performance of Eden skeletons , 2006, Parallel Comput..