Affiliation:
1. Hewlett-Packard Company, Cupertino, CA
2. Yale University, New Haven, CT
Abstract
Parallel functional languages often use meta-linguistic annotations to provide control over parallel evaluation. In this paper we explore a flexible mechanism to control when an expression is evaluated:
first-class monadic schedules
. We discuss the advantages of using such first-class values over traditional annotation-based systems. In particular, it is often desirable to make decisions about the operational behavior of parallel programs depending on the dynamic state of the system. For example, we may want to measure the system load before deciding to evaluate expressions in parallel. For this purpose, we show how
monads
can be used to access dynamic system parameters in a referentially transparent manner (up to termination).As a mechanism to reason about schedules, we present a set of
algebraic properties
that any implementation of schedules must satisfy. We also describe an implementation that translates schedules into a dialect of Scheme extended with
futures
. We prove that this implementation satisfies the given set of algebraic properties, and give performance results for a parallel solution to the
n
-body problem using the Barnes--Hut method.Although our ideas were developed specifically for nonstrict functional languages such as Haskell, we briefly discuss how they can be used with strict functional languages and imperative languages as well.
Publisher
Association for Computing Machinery (ACM)
Cited by
2 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Functional High Performance Financial IT;Lecture Notes in Computer Science;2012
2. Implicitly threaded parallelism in Manticore;Journal of Functional Programming;2010-11