On programming scientific applications in SAC — A functional language extended by a subsystem for high-level array operations (original) (raw)
1997, Implementation of Functional Languages
This paper discusses some of the pros and cons of extending a simple functional language called Sac (for Single Assignment C) by array operations similar to those that are available in Apl. The array operations in Sac are based on the-calculus, an algebra of arrays which provides a formalism for specifying and simplifying array operations in terms of index set manipulations. The programming techniques made possible by Sac are demonstrated by means of a functional program for the approximation of numerical solutions of partial di erential equations by multigrid relaxation. This application is not only of practical relevance but also fully exposes the avors of using high-level array operations. In contrast to speci cations in other languages, e.g. in Fortran or Sisal, the Sac program is well structured, reasonably concise, and-what is most important-invariant against dimensionalities and shapes. However, sophisticated compilation techniques are necessary to avoid, whenever possible, the creation of temporary arrays and to eliminate redundant operations. The paper also includes performance gures for a Sac implementation of the NAS-mgrid-benchmark which are competetive with those of a Sisal implementation.
Loading Preview
Sorry, preview is currently unavailable. You can download the paper by clicking the button above.