Functional specifications for mathematical computations [electronic resource].
- Washington, D.C. : United States. Dept. of Energy, 1991.
Oak Ridge, Tenn. : Distributed by the Office of Scientific and Technical Information, U.S. Dept. of Energy.
- Physical Description:
- Pages: (18 pages) : digital, PDF file
- Additional Creators:
- Argonne National Laboratory
United States. Department of Energy
United States. Department of Energy. Office of Scientific and Technical Information
- Are functional programs useful for specifying numerical computations We believe they certainly are, despite the long-established tradition of using procedural languages for such computations. We have prepared a pure functional specification for an algorithm that solves one-dimensional hyperbolic partial differential equations (PDEs). Using automated program transformations, we have derived a Fortran program from this specification that executes faster on a CRAY X-MP than does the hand-written Fortran implementation of the same algorithm. We discuss the development of the initial specification for the one-dimensional problem and its evolution into a second specification for solving multidimensional hyperbolic PDEs. In this second specification, the dimensionality of the problem is completely parameterized and is given by specifying the set of neighbors of a cell in the grid. Thus, programs can be derived from this specification to solve hyperbolic PDEs of any given dimensionality. Our goal is to elucidate how we approach specifying numerical computations in the functional style and to show how we take advantage of the modularity and abstractness of functional programming to obtain a very high-level representation of the algorithm. We also briefly discuss transformational derivation of efficient programs from such specifications. 13 refs., 1 tab.
- Published through SciTech Connect.
Working conference on constructing programs from specifications, Pacific Grove, CA (USA), 13-16 May 1991.
Boyle, J.M.; Harmer, T.J. . Dept. of Computer Science.
- Funding Information:
View MARC record | catkey: 14357872