If-then-else as a concurrency inhibitor in eager beaver evaluation of recursive programs

  • Authors:
  • R. L. Page;M. G. Conant;D. H. Grit

  • Affiliations:
  • Colorado State University;Colorado State University;Colorado State University

  • Venue:
  • FPCA '81 Proceedings of the 1981 conference on Functional programming languages and computer architecture
  • Year:
  • 1981

Quantified Score

Hi-index 0.00

Visualization

Abstract

Programs described via recursive equations provide many opportunities for concurrent computation. For example, a machine may choose to concurrently initiate the evaluation of all subexpressions within a given expression. This “eager beaver” evaluation strategy has been a highly touted avenue for introducing massive parallelism into computations. However, machines following a strict eager beaver policy will not be acceptable in applications such as process control where certain portions of computations must follow an explicit sequence. In addition, eager beaver evaluation can in some circumstances waste resources on evaluation of expressions that turn out to be irrelevant to the overall goal of a computation. Therefore, programmers need operators for specifying the order of evaluation of subexpressions within a recursive program. We contend that a sequential form of the if-then-else function and a generalization to encompass nondeterminacy may be used as an elegant mechanism for sequencing computations within an eager beaver environment. We illustrate the use of if-then-else for specifying computational sequences by describing three computations: a process control algorithm (the dining philosophers), a nondeterministic function (AMB), and three alternative algorithms for minimax tree search. Finally we discuss the performance of a simulated, eager beaver multiprocessor as it carries out these algorithms.