Affiliation:
1. Dublin City University and Lero - the Irish Engineering Research Centre, Dublin, Ireland
2. University of Glasgow, Glasgow, UK
Abstract
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.
Funder
Science Foundation Ireland
Publisher
Association for Computing Machinery (ACM)
Cited by
4 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. bGSL: An imperative language for specification and refinement of backtracking programs;Journal of Logical and Algebraic Methods in Programming;2023-01
2. Whither Specifications as Programs;Unifying Theories of Programming;2019
3. Towards patterns for heaps and imperative lambdas;Journal of Logical and Algebraic Methods in Programming;2016-08
4. Dually nondeterministic functions;ACM Transactions on Programming Languages and Systems;2008-10