Efficient interpretation of synchronizable series expressions

  • Authors:
  • R. C. Waters

  • Affiliations:
  • MIT Artificial Intelligence Laboratory, 545 Technology Sq., Cambridge MA

  • Venue:
  • SIGPLAN '87 Papers of the Symposium on Interpreters and interpretive techniques
  • Year:
  • 1987

Quantified Score

Hi-index 0.00

Visualization

Abstract

The benefits of programming in a functional style are well known. For example, algorithms which are expressed as compositions of functions operating on series/vectors/streams of data elements are much easier to understand and modify than equivalent algorithms expressed as loops. Unfortunately, many programmers hesitate to use series expressions because they are typically implemented very inefficiently-the prime source of inefficiency being the creation of intermediate series objects.A restricted class of series expressions, obviously synchronizable series expressions, is defined which can be evaluated very efficiently because they do not require the creation of any intermediate series objects. A Common Lisp macro package has been implemented which supports obviously synchronizable series expressions. Using this macro package, programmers can obtain the advantages of expressing computations as series expressions without incurring any runtime overhead. Obviously synchronizable series expressions could be straightforwardly supported in any programming language.