Functional programs as executable specifications
- 1 October 1984
- journal article
- Published by The Royal Society in Philosophical Transactions of the Royal Society of London. Series A, Mathematical and Physical Sciences
- Vol. 312 (1522) , 363-388
- https://doi.org/10.1098/rsta.1984.0065
Abstract
To write specifications we need to be able to define the data domains in which we are interested, such as numbers, lists, trees and graphs. We also need to be able to define functions over these domains. It is desirable that the notation should be higher order, so that function spaces can themselves be treated as data domains. Finally, given the potential for confusion in specifications involving a large number of data types, it is a practical necessity that there should be a simple syntactic discipline that ensures that only well typed applications of functions can occur. A functional programming language with these properties is presented and its use as a specification tool is demonstrated on a series of examples. Although such a notation lacks the power of some imaginable specification languages (for example, in not allowing existential quantifiers), it has the advantage that specifications written in it are always executable. The strengths and weaknesses of this approach are discussed, and also the prospects for the use of purely functional languages in production programming.Keywords
This publication has 11 references indexed in Scilit:
- A theory of type polymorphism in programmingPublished by Elsevier ,2003
- Functional geometryPublished by Association for Computing Machinery (ACM) ,1982
- Edinburgh LCFLecture Notes in Computer Science, 1979
- Data Types as LatticesSIAM Journal on Computing, 1976
- A lazy evaluatorPublished by Association for Computing Machinery (ACM) ,1976
- Depth-First Search and Linear Graph AlgorithmsSIAM Journal on Computing, 1972
- Proving Properties of Programs by Structural InductionThe Computer Journal, 1969
- LISP 1.5 PROGRAMMER'S MANUALPublished by Defense Technical Information Center (DTIC) ,1962
- QuicksortThe Computer Journal, 1962
- A. M. Turing. On computable numbers, with an application to the Entscheidungs problcm. Proceedings of the London Mathematical Society, 2 s. vol. 42 (1936–1937), pp. 230–265.The Journal of Symbolic Logic, 1937