## A Monadic Calculus for Parallel Costing of a Functional Language of Arrays (1997)

Venue: | Euro-Par'97 Parallel Processing, volume 1300 of Lecture Notes in Computer Science |

Citations: | 27 - 9 self |

### BibTeX

@INPROCEEDINGS{Jay97amonadic,

author = {C. B. Jay and M. I. Cole and M. Sekanina and P. Steckler},

title = {A Monadic Calculus for Parallel Costing of a Functional Language of Arrays},

booktitle = {Euro-Par'97 Parallel Processing, volume 1300 of Lecture Notes in Computer Science},

year = {1997},

pages = {650--661},

publisher = {Springer}

}

### Years of Citing Articles

### OpenURL

### Abstract

. Vec is a higher-order functional language of nested arrays, which includes a general folding operation. Static computation of the shape of its programs is used to support a compositional cost calculus based on a cost monad. This, in turn, is based on a cost algebra, whose operations may be customized to handle different cost regimes, especially for parallel programming. We present examples based on sequential costing and on the PRAM model of parallel computation. The latter has been implemented in Haskell, and applied to some linear algebra examples. 1 Introduction Second-order combinators such as map, fold and zip provide programmers with a concise, abstract language for writing skeletons for implicitly parallel programs, as in [Ski94], but there is a hitch. These combinators are defined for list programs (see [BW88]), but efficient implementations (which is the point of parallelism, after all) are based on arrays. This disparity becomes acute when working with nested arrays, which...

### Citations

1384 | The essence of functional programming
- Wadler
- 1992
(Show Context)
Citation Context ...provide programmers with a concise, abstract language for writing skeletons for implicitly parallel programs, as in [Ski94], but there is a hitch. These combinators are defined for list programs (see =-=[BW88]-=-), but efficient implementations (which is the point of parallelism, after all) are based on arrays. This disparity becomes acute when working with nested arrays, which are rarely supported in paralle... |

1226 |
A bridging model for parallel computation
- Valiant
- 1990
(Show Context)
Citation Context ...ce. These results illustrate the feasibility of the technique. We will soon cost communications, too, using the shape to determine the length of each message, and a few hardware parameters (as in BSP =-=[Val90]-=- or LogP [Ca93]) to compute its transmission cost. Costs are computed compositionally, so that we are able to associate to each program fragment a cost function, from the number of processors to time.... |

477 | Comprehending Monads
- Wadler
(Show Context)
Citation Context ... of processors to clock ticks, with + and max as pointwise addition and maximum. Both these examples will be developed below. We are going to track costs of our programs using a monad in the style of =-=[Wad92]-=-, though our monad will carry some additional structure. From the programmer's perspective, a monad is a type constructor M coupled with three operations: mmap : (` ! ` 0 ) !M` !M` 0 unit : ` !M` join... |

465 | Computational lambda calculus and monads - Moggi - 1989 |

296 |
Parallelism in random access machines
- Fortune, Wyllie
- 1978
(Show Context)
Citation Context ... that of its components. The specific choice of algebra varies according to the computational model. We give examples of cost algebras for sequential computation, and for a PRAM "shared-memory&qu=-=ot; model [FW78]-=-. A Haskell implementation of our cost model is available on request to the authors. The remaining sections of the paper are: Controlling shape; The Vec language; The Size language (in which shape ana... |

209 | Programming parallel algorithms
- Blelloch
- 1996
(Show Context)
Citation Context ... support of each primitive [Ski94]. Shape information is considered but the costing of, for example, folding is tackled informally according to the shape behaviour of the accompanying operation. Nesl =-=[Ble96] has precisely devel-=-oped mechanisms for cost composition in a "work" and "depth" circuit-complexity model, but severely restricts nesting since only mapping is allowed at outer levels, with folded com... |

186 | Implementation of a portable nested data-parallel language - Blelloch, Chatterjee, et al. - 1994 |

93 |
Mechanical program analysis
- Wegbreit
- 1975
(Show Context)
Citation Context ...ss formal than what we propose. The "oblivious" PRAM programs and compilation techniques of [ZL94] are related to our work on shapely programs by their use of static analysis. In the sequent=-=ial case, [Weg75]-=- and [M'et88] are examples of syntax-directed cost analyses, closely related to our own work. Both [HC88] and [FSZ91] describe average-case analyses. However, our work is distinguished by its exploita... |

78 | Shape types
- Fradet, Métayer
- 1997
(Show Context)
Citation Context ...f source program structure, concise information about bulk data structures and factoring out of the cost algebra. Note that our work on shape is unrelated to the shape types of Fradet and Le M'etayer =-=[FM97]-=-, which are used to represent graphs for modelling pointers. 9 Conclusions and future work Vec supports a new account of arrays that combines the benefits of the list programming style with the effici... |

74 | A provable time and space efficient implementation of NESL
- Blelloch, Greiner
- 1996
(Show Context)
Citation Context ...aining constant-time access. We illustrate the efficacy of this approach by implementing static estimates of shapes and parallel work, as compared to, say, the dynamically obtained estimates for Nesl =-=[BG96]-=-. Efficient array access is based on direct access to the storage of array entries, typically in contiguous blocks of memory. List storage, however, is by allocating cons cells during evaluation, whic... |

55 | ACE: An Automatic Complexity Evaluator - Metayer - 1988 |

42 |
Nielson: Two-Level Functional Languages
- Nielson, R
- 1992
(Show Context)
Citation Context ...l determine the length, or more generally the shape, of any array expression. This process of shape analysis can be thought of as compile-time/run-time separation in a two-level operational semantics =-=[NN92]-=-. Success requires that the program be shapely, that is, the shape of the result is determined by those of its inputs, as is typical in, say, linear algebra. Shapeliness, and successful shape analysis... |

37 |
Automating Program Analysis
- Hickey, Cohen
- 1988
(Show Context)
Citation Context ...ated to our work on shapely programs by their use of static analysis. In the sequential case, [Weg75] and [M'et88] are examples of syntax-directed cost analyses, closely related to our own work. Both =-=[HC88]-=- and [FSZ91] describe average-case analyses. However, our work is distinguished by its exploitation of source program structure, concise information about bulk data structures and factoring out of the... |

22 | Shape checking of array programs
- Jay, Sekanina
- 1997
(Show Context)
Citation Context ...ples. 3 The Vec language The Vec language is a simply typed lambda calculus with products, a unit type, and a vector type constructor. The language as presented here is a variant of that presented in =-=[JS97]. The types are given by-=- D ::= nat j bool j : : : �� ::= D j sz j un j �� \Theta�� j vec �� ` ::= �� j `\Theta` j ` ! ` : D ranges over datum types whose shapes are trivial. �� ranges over data types.... |

20 | Optimising the Parallel Behaviour of Combinations of ProgramComponents
- To
- 1995
(Show Context)
Citation Context ...lelizing compiler. While the DAG's generated by the Nesl semantics suggest a task schedule, they do not indicate where the tasks are to execute. A wide survey of other related work is presented by To =-=[To95], most of -=-it less formal than what we propose. The "oblivious" PRAM programs and compilation techniques of [ZL94] are related to our work on shapely programs by their use of static analysis. In the se... |

15 | An approach to machine-independent parallel programming
- Zimmermann, Loewe
- 1994
(Show Context)
Citation Context ...where the tasks are to execute. A wide survey of other related work is presented by To [To95], most of it less formal than what we propose. The "oblivious" PRAM programs and compilation tech=-=niques of [ZL94]-=- are related to our work on shapely programs by their use of static analysis. In the sequential case, [Weg75] and [M'et88] are examples of syntax-directed cost analyses, closely related to our own wor... |

13 | Semantic Frameworks for Complexity - Gurr - 1991 |

12 |
Foundations of parallel programming. Number 6
- Skillicorn
- 1995
(Show Context)
Citation Context ...algebra examples. 1 Introduction Second-order combinators such as map, fold and zip provide programmers with a concise, abstract language for writing skeletons for implicitly parallel programs, as in =-=[Ski94]-=-, but there is a hitch. These combinators are defined for list programs (see [BW88]), but efficient implementations (which is the point of parallelism, after all) are based on arrays. This disparity b... |

9 | Average Case Analysis of Algorithms and
- Vitter, Flajolet
- 1990
(Show Context)
Citation Context ... work on shapely programs by their use of static analysis. In the sequential case, [Weg75] and [M'et88] are examples of syntax-directed cost analyses, closely related to our own work. Both [HC88] and =-=[FSZ91]-=- describe average-case analyses. However, our work is distinguished by its exploitation of source program structure, concise information about bulk data structures and factoring out of the cost algebr... |

9 |
Fork95 language and compiler for the SB-PRAM
- Kessler, Seidl
- 1995
(Show Context)
Citation Context ...here p is a number of processors; we think we can reduce this to O(log p) or less. Second, the accuracy of the existing cost model must be tested. We plan to compile Vec programs into FORK95 programs =-=[KS95]-=-. This language is designed to reflect the PRAM model, and an instrumented simulator is already available. Third, the computational model should be modified to recognize communication costs. Fourth, w... |

2 |
Towards a realistic model of parallel computation
- LogP
- 1993
(Show Context)
Citation Context ...s illustrate the feasibility of the technique. We will soon cost communications, too, using the shape to determine the length of each message, and a few hardware parameters (as in BSP [Val90] or LogP =-=[Ca93]-=-) to compute its transmission cost. Costs are computed compositionally, so that we are able to associate to each program fragment a cost function, from the number of processors to time. These are comb... |