Logical specifications for functional programs
We present a formal method of functional program development based on step-by-step transformation.
In their most abstract form, specifications are essentially predicates that relate the result of the specified program to the free variables of that program. In their most concrete form, specifications are simply programs in a functional programming language. Development from abstract specifications to programs is calculational.
Using logic in the specification language has many advantages. Importantly it allows nondeterministic specifications to be given, and thus does not force overspecification.
KeywordsFree Variable Specification Language Functional Program Case Expression Weak Precondition
Unable to display preview. Download preview PDF.
- R.J.R. Back. A calculus of refinement for program derivations. Technical Report 54, Department of Computer Science, Åbo Akademi, Finland, 1987.Google Scholar
- F.L. Bauer, H. Ehler, A. Horsch, B. Möller, H. Partsch, O. Puakner, and P. Pepper. The Munich Project CIP: Volume II: The Program Transformation System CIP-S. Number 292 in Lecture Notes in Computer Science. Springer-Verlag, 1987.Google Scholar
- R.S. Bird. Introduction to the theory of lists. In M. Broy, editor, Logic of Programming and Calculi of Discrete Design, number 36 in NATO ASI Series F. Springer, 1987.Google Scholar
- R.S. Bird. A calculus of functions for program derivation. In David A. Turner, editor, Research Topics in Functional Programming, The UT Year of Programming Series. Addison-Wesley, 1990.Google Scholar
- Alonzo Church. A formulation of the simple theory of types. J. Symbolic Logic, 5:56–68, 1940.Google Scholar
- E.W. Dijkstra. Guarded commands, nondeterminacy, and formal derivation of programs. Communications of the ACM, 18(8):453–457, 1975.Google Scholar
- Eric C.R. Hehner. The Logic of Programming. Prentice-Hall International, 1984.Google Scholar
- Eric C.R. Hehner. A practical theory of programming. Science of Computer Programming, 14:133–158, 1990.Google Scholar
- Rob Hoogerwoord. The design of functional programs: a calculational approach. PhD Thesis, Technische Universiteit Eindhoven, 1989.Google Scholar
- Lambert Meertens. Algorithmics. In J.W. de Bakker, M. Hazewinkel, and J.K. Lenstra, editors, Mathematics and Computer Science, number 1 in CWI Monographs. North-Holland, 1986.Google Scholar
- Bernhard Möller. Applicative assertions. In J.L.A. van de Snepscheut, editor, Mathematics of Program Construction, number 375 in Lecture Notes in Computer Science. Springer-Verlag, 1989.Google Scholar
- Carroll Morgan. The specification statement. Trans. on Programming Languages and Systems, 10(3):403–419, 1988.Google Scholar
- F.L. Morris and C.B. Jones. An early program proof by Alan Turing. Annals of the History of Computing, 6(2):139–143, 1984.Google Scholar
- Joseph M. Morris. Programs from specifications. In E. W. Dijkstra, editor, Formal Development of Programs and Proofs, pages 81–115. Addison-Wesley, 1990.Google Scholar
- Greg Nelson. A generalization of Dijkstra's calculus. Technical Report 16, Digital Systems Research Center, Palo Alto, CA, U.S.A., April 1987. Also published in Trans. on Programming Languages and Systems, 11(4):517–561, 1989.Google Scholar
- D. Hugh Redelmeier. Towards Practical Functional Programming. PhD thesis, University of Toronto, 1984.Google Scholar
- David Sands. Complexity analysis for a lazy higher-order language. In Proceedings of the 1989 Glasgow Functional Programming Workshop, Workshops in Computing. Springer-Verlag, 1989.Google Scholar
- Harald Søndergaard and Peter Sestoft. Nondeterminism in functional languages. Technical Report 88/18, Department of Computer Science, University of Melbourne, Australia, 1988.Google Scholar
- Harald Søndergaard and Peter Sestoft. Referential transparency, definiteness and unfold-ability. Acta Informatica, 27(6):505–518, 1990.Google Scholar