Non-deterministic expressions and predicate transformers
Information Processing Letters
A Discipline of Programming
Refinement Calculus: A Systematic Introduction
Refinement Calculus: A Systematic Introduction
A Proof Tool for Reasoning About Functional Programs
TPHOLs '96 Proceedings of the 9th International Conference on Theorem Proving in Higher Order Logics
Function Definition in Higher-Order Logic
TPHOLs '96 Proceedings of the 9th International Conference on Theorem Proving in Higher Order Logics
Mechanising Procedures in HOL
Hi-index | 0.00 |
In this paper we present an approach for modelling functional procedures (as they occur in imperative programming languages) in a weakest precondition framework. Functional procedures are called inside expressions, but the body of a functional procedure is built using standard specification/programming syntax, including nondeterminism, sequential composition, conditionals and loops. We integrate our theory of functional procedures into the existing mechanisation of the refinement calculus in the HOL system. To make formal reasoning possible, we derive correctness rules for functional procedures and their calls. We also show how recursive functional procedures can be handled according to our approach. Finally, we provide a nontrivial example of reasoning about a recursive procedure for binary search.