Title:

The use of proofsasprograms to build an analogybased functional program editor

This thesis presents a novel application of the technique known as proofsasprograms. Proofsasprograms defines a correspondence between proofs in a constructive logic and fundamental programs. By using this correspondence, a functional program may be represented directly as the proof of a specification and so the program may be analysed, within this proof framework. C^{Y}NTHIA is a programming editor for the functional language ML which uses proofsasprograms to analyse users' programs as they are written. So that the user requires no knowledge of proof theory, the underlying proof representation is completely hidden. The proof framework allows programs written in C^{Y}NTHIA to be checked to be syntactically correct, welltyped, welldefined and terminating. Users of C^{Y}NTHIA make fewer programming errors and the feedback facilities of C^{Y}NTHIA mean that it is easier to track down the source of errors when they do occur. C^{Y}NTHIA also embodies the idea of programming by analogy  rather than starting from scratch, users always begin with an existing function definition. They then apply a sequence of highlevel editing commands which transform this starting definition into the one required. These commands preserve correctness and also increase programming efficiency by automating commonly occurring steps. The thesis describes the design and implementation of C^{Y}NTHIA and investigates its role as a novice programming environment. Use by experts is possible but only a subset of ML is currently supported. Two major trials of C^{Y}NTHIA have shown that C^{Y}NTHIA is wellsuited as a teaching tool.
