Advertisement

On programming scientific applications in SAC — A functional language extended by a subsystem for high-level array operations

  • Sven-Bodo Scholz
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1268)

Abstract

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 differential equations by multigrid relaxation. This application is not only of practical relevance but also fully exposes the flavors of using high-level array operations. In contrast to specifications 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 figures for a SAC implementation of the NAS-mgrid-benchmark which are competetive with those of a SISAL implementation.

Keywords

Coarse Grid Fine Grid Index Vector Functional Language Executable Code 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [AD79]
    W.B. Ackerman and J.B. Dennis: VAL-A Value-Oriented Algorithmic Language: Preliminary Reference Manual. TR 218, MIT, Cambridge, MA, 1979.Google Scholar
  2. [AGP78]
    Arvind, K.P. Gostelow, and W. Plouffe: The ID-Report: An asynchronous Programming Language and Computing Machine. Technical Report 114, University of California at Irvine, 1978.Google Scholar
  3. [AP95]
    P. Achten and R. Plasmeijer: The ins and outs of Clean I/O. Journal of Functional Programming, Vol. 5(1), 1995, pp. 81–110.Google Scholar
  4. [BBB+94]
    D. Bailey, E. Barszcz, J. Barton, et al.: The NAS Parallel Benchmarks. RNR 94-007, NASA Ames Research Center, 1994.Google Scholar
  5. [BCOF91]
    A.P.W. Böhm, D.C. Cann, R.R. Oldehoeft, and J.T. Feo: SISAL Reference Manual Language Version 2.0. CS 91-118, Colorado State University, Fort Collins, Colorado, 1991.Google Scholar
  6. [Bra84]
    A. Brandt: Multigrid Methods: 1984 Guide. Dept of applied mathematics, The Weizmann Institute of Science, Rehovot/Israel, 1984.Google Scholar
  7. [Can89]
    D.C. Cann: Compilation Techniques for High Performance Applicative Computation. Technical Report CS-89-108, Lawrence Livermore National Laboratory, LLNL, Livermore California, 1989.Google Scholar
  8. [Can92]
    D.C. Cann: Retire Fortran? A Debate Rekindled. Communications of the ACM, Vol. 35(8), 1992, pp. 81–89.Google Scholar
  9. [CE95]
    D.C. Cann and P. Evripidou: Advanced Array Optimizations for High Performance Functional Languages. IEEE Transactions on Parallel and Distributed Systems, Vol. 6(3), 1995, pp. 229–239.Google Scholar
  10. [FO95]
    S.M. Fitzgerald and R.R. Oldehoeft: Update-in-place Analysis for True Multidimensional Arrays. In A.P.W. Böhm and J.T. Feo (Eds.): High Performance Functional Computing, 1995, pp. 105–118.Google Scholar
  11. [GS95]
    C. Grelck and S.B. Scholz: Classes and Objects as Basis for I/O in SAC. In T. Johnsson (Ed.): Proceedings of the Workshop on the Implementation of Functional Languages'95. Chalmers University, 1995, pp. 30–44.Google Scholar
  12. [HAB+95]
    K. Hammond, L. Augustsson, B. Boutel, et al.: Report on the Programming Language Haskell: A Non-strict, Purely Functional Language. University of Glasgow, 1995. Version 1.3.Google Scholar
  13. [Hac85]
    W. Hackbusch: Multi-grid Methods and Applications. Springer, 1985.Google Scholar
  14. [HT82]
    W. Hackbusch and U. Trottenberg: Multigrid Methods. LNM, Vol. 960. Springer, 1982.Google Scholar
  15. [Ive62]
    K.E. Iverson: A Programming Language. Wiley, New York, 1962.Google Scholar
  16. [Klu94]
    W. Kluge: A User's Guide for the Reduction System π- Red. Internal Report 9419, University of Kiel, 1994.Google Scholar
  17. [MJ91]
    L.M. Restifo Mullin and M. Jenkins: A Comparison of Array Theory and a Mathematics of Arrays. In Arrays, Functional Languages and Parallel Systems. Kluwer Academic Publishers, 1991, pp. 237–269.Google Scholar
  18. [Mul88]
    L.M. Restifo Mullin: A Mathematics of Arrays. PhD thesis, Syracuse University, 1988.Google Scholar
  19. [Mul91]
    L.M. Restifo Mullin: The//-Function: A Basis for FFP with Arrays. In L.M. Restifo Mullin (Ed.): Arrays, Functional Languages and Parallel Systems. Kluwer Academic Publishers, 1991, pp. 185–201.Google Scholar
  20. [Nik88]
    R.S. Nikhil: ID Version 88.1, Reference Manual. CSG Memo 284, MIT, Laboratory for Computer Science, Cambridge, MA, 1988.Google Scholar
  21. [Old92]
    R.R. Oldehoeft: Implementing Arrays in SISAL 2.0. In Proceedings of the Second SISAL Users' Conference, 1992, pp. 209–222.Google Scholar
  22. [QRM+87]
    D. Mac Queen, R.Harper, R. Milner, et al.: Functional Programming in ML. Lfcs education, University of Edinburgh, 1987.Google Scholar
  23. [SBK92]
    C. Schmittgen, H. Blödorn, and W.E. Kluge: π-RED✶ — a Graph Reducer for Full-Fledged λ-Calculus. New Generation Computing, Vol. 10(2), 1992, pp. 173–195.Google Scholar
  24. [Sch86]
    C. Schmittgen: A Datatype Architecture for Reduction Machines. In 19th Hawaii International Conference on System Sciences, Vol. 1,1986, pp. 78–87.Google Scholar
  25. [Sch94]
    S.-B. Scholz: Single Assignment C — Functional Programming Using Imperative Style. In John Glauert (Ed.): Proceedings of the 6th International Workshop on the Implementation of Functional Languages. University of East Anglia, 1994.Google Scholar
  26. [Sch96]
    S.-B. Scholz: Single Assignment C — Entwurf und Implementierung einer funktionalen C-Variante mit spezieller Unterstützung shape-invarianter Array-Operationen. PhD thesis, Institut für Informatik und praktische Mathematik, Universität Kiel, 1996.Google Scholar
  27. [SW85]
    S. Skedzielewski and M.L. Welcome: Data Flow Graph Optimization in IF1. In FPCA '85, Nancy, LNCS, Vol. 201. Springer, 1985, pp. 17–34.Google Scholar
  28. [TP86]
    H-C. Tu and A.J. Perlis: FAC: A Functional APL Language. IEEE Software, Vol. 3(1), 1986, pp. 36–45.Google Scholar
  29. [Tu86]
    H-C. Tu: FAC: Functional Array Calculator and its Application to APL and Functional Programming. PhD thesis, Yale University, 1986.Google Scholar
  30. [Tur86]
    D.A. Turner: An Overview of Miranda. SIGPLAN Notices, Vol. 21(12), 1986, pp. 158–166.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Sven-Bodo Scholz
    • 1
  1. 1.Dept of Computer ScienceUniversity of KielKielGermany

Personalised recommendations