| Towards A Theory Of Specifications, Programs And Proofs (1995) | |||||||||||||||
Abstract | |||||||||||||||
| this paper we investigate a theory in which the notion of program as method of computation is singled out. As a first step towards a theory of specifications, we separate the notions of datatype and proposition and define a calculus for program verification, where programs can be written and then proved correct. On top of this calculus, the theory of specifications is built. A specification of a problem consists of a pair: a type for a program (datatype) and a predicate on the program. Such a specification is implemented by constructing a program of the given datatype and proving that the predicate holds for that program. We are interested in a calculus of program derivation, i.e. a calculus with rules that allow the simultaneous construction of the components of implementations, rather than the separate construction of programs and proofs. The theory of specifications is built in such a way that the "program extraction" process is immediate. We present the main ideas of the theory of specifications, and show how rules for constructing implementations to specifications can be formulated and used. We do this by showing a programming example: we solve the problem of dividing a natural number by two. As a motivation to the theory of specifications, we present three versions of the same solution, each one expressed using a different logic. The first solution is developed in Martin-Lof's set theory. For the second solution, we introduce the calculus for program verification, where sets and propositions are no longer identified, and the notion of set is split into two: the datatypes and the propositions. We write a program performing the desired task using the datatypes (as in an ordinary functional programming language), and then we use the logic of propositions as an extern... | |||||||||||||||
Details der Publikation | |||||||||||||||
| |||||||||||||||