img

Notice détaillée

Term transformers

A new approach to state

Article Ecrit par: Morris, Joseph M. ; Bunkenburg, Alexander ; Tyrrell, Malcolm ;

Résumé: We present a new approach to adding state and state-changing commands to a term language. As a formal semantics it can be seen as a generalization of predicate transformer semantics, but beyond that it brings additional opportunities for specifying and verifying programs. It is based on a construct called a phrase, which is a term of the form C t, where C stands for a command and t stands for a term of any type. If R is boolean, C  R is closely related to the weakest precondition wp(C, R). The new theory draws together functional and imperative programming in a simple way. In particular, imperative procedures and functions are seen to be governed by the same laws as classical functions. We get new techniques for reasoning about programs, including the ability to dispense with logical variables and their attendant complexities. The theory covers both programming and specification languages, and supports unbounded demonic and angelic nondeterminacy in both commands and terms.


Langue: Anglais