Functional specifications for mathematical computations
Abstract
Are functional programs useful for specifying numerical computations We believe they certainly are, despite the longestablished tradition of using procedural languages for such computations. We have prepared a pure functional specification for an algorithm that solves onedimensional hyperbolic partial differential equations (PDEs). Using automated program transformations, we have derived a Fortran program from this specification that executes faster on a CRAY XMP than does the handwritten Fortran implementation of the same algorithm. We discuss the development of the initial specification for the onedimensional 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 highlevel representation of the algorithm. We also briefly discuss transformational derivation of efficient programs from such specifications. 13 refs., 1 tab.
 Authors:

 Argonne National Lab., IL (USA)
 Queen's Univ., Belfast, Northern Ireland (UK). Dept. of Computer Science
 Publication Date:
 Research Org.:
 Argonne National Lab., IL (USA)
 Sponsoring Org.:
 USDOE; USDOE, Washington, DC (USA)
 OSTI Identifier:
 6036827
 Report Number(s):
 CONF91051121
ON: DE91006002
 DOE Contract Number:
 W31109ENG38
 Resource Type:
 Conference
 Resource Relation:
 Conference: Working conference on constructing programs from specifications, Pacific Grove, CA (USA), 1316 May 1991
 Country of Publication:
 United States
 Language:
 English
 Subject:
 99 GENERAL AND MISCELLANEOUS//MATHEMATICS, COMPUTING, AND INFORMATION SCIENCE; FUNCTIONALS; PROGRAMMING; PARTIAL DIFFERENTIAL EQUATIONS; COMPUTER CALCULATIONS; ALGORITHMS; AUTOMATION; CRAY COMPUTERS; FORTRAN; PARALLEL PROCESSING; SPECIFICATIONS; COMPUTERS; DIFFERENTIAL EQUATIONS; EQUATIONS; FUNCTIONS; MATHEMATICAL LOGIC; PROGRAMMING LANGUAGES; 990200*  Mathematics & Computers
Citation Formats
Boyle, J M, and Harmer, T J. Functional specifications for mathematical computations. United States: N. p., 1991.
Web.
Boyle, J M, & Harmer, T J. Functional specifications for mathematical computations. United States.
Boyle, J M, and Harmer, T J. Tue .
"Functional specifications for mathematical computations". United States. https://www.osti.gov/servlets/purl/6036827.
@article{osti_6036827,
title = {Functional specifications for mathematical computations},
author = {Boyle, J M and Harmer, T J},
abstractNote = {Are functional programs useful for specifying numerical computations We believe they certainly are, despite the longestablished tradition of using procedural languages for such computations. We have prepared a pure functional specification for an algorithm that solves onedimensional hyperbolic partial differential equations (PDEs). Using automated program transformations, we have derived a Fortran program from this specification that executes faster on a CRAY XMP than does the handwritten Fortran implementation of the same algorithm. We discuss the development of the initial specification for the onedimensional 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 highlevel representation of the algorithm. We also briefly discuss transformational derivation of efficient programs from such specifications. 13 refs., 1 tab.},
doi = {},
journal = {},
number = ,
volume = ,
place = {United States},
year = {1991},
month = {1}
}