# The weakest precondition calculus: Recursion and duality

@article{Bonsangue2005TheWP, title={The weakest precondition calculus: Recursion and duality}, author={Marcello M. Bonsangue and Joost N. Kok}, journal={Formal Aspects of Computing}, year={2005}, volume={6}, pages={788-800} }

An extension of Dijkstra's guarded command language is studied, including unbounded demonic choice and a backtrack operator. We consider three orderings on this language: a refinement ordering defined by Back, a new deadlock ordering, and an approximation ordering of Nelson. The deadlock ordering is in between the two other orderings. All operators are monotonic in Nelson's ordering, but backtracking is not monotonic in Back's ordering and sequential composition is not monotonic for the…

## 14 Citations

Generic weakest precondition semantics from monads enriched with order

- Computer ScienceTheor. Comput. Sci.
- 2015

Dually nondeterministic functions

- Computer ScienceTOPL
- 2008

It is shown that nondeterministic functions can be described by a general theory that accounts for it in the form in which it occurs in many programming contexts, among them specifications, competing agents, data refinement, abstract interpretation, imperative programming, process algebras, and recursion theory.

Symbolic execution formally explained

- Computer ScienceFormal Aspects Comput.
- 2021

A formal explanation of symbolic execution in terms of a symbolic transition system is provided and its correctness and completeness are proved with respect to an operational semantics which models the execution on concrete values.

M ar 2 01 6 Reasoning about Recursive Probabilistic Programs ∗

- Computer Science
- 2021

This paper presents a wp–style calculus for obtaining expectations on the outcomes of (mutually) recursive probabilistic prog rams. We provide several proof rules to derive one– and two–sided bou nds…

Reasoning about Recursive Probabilistic Programs*

- Computer Science2016 31st Annual ACM/IEEE Symposium on Logic in Computer Science (LICS)
- 2016

A wp–style calculus for obtaining expectations on the outcomes of (mutually) recursive probabilistic programs and bounds on the expected runtime of recursive programs that can be used to determine the time until termination of such programs are given.

Mandatory and Potential Choice: Comparing Event-B and STAIRS

- Computer ScienceFrom Action Systems to Distributed Systems
- 2016

The relationship between the operators for choice in Event-B and STAIRS is investigated, which is designed to provide the UML community with an understanding of refinement and fulfillment.

Abstract delta modeling : software product lines and beyond

- Computer Science
- 2014

To prevent a large software system from collapsing under its own complexity, its code needs to be well-structured. Ideally we want all code related to a certain feature to be grouped together —called…

## References

SHOWING 1-10 OF 32 REFERENCES

A Cook's Tour of Countable Nondeterminism

- Computer ScienceICALP
- 1981

This work provides four semantics for a small programming language involving unbounded (but countable) nondeterminism and introduces a Hoare-like proof system for total correctness.

A generalization of Dijkstra's calculus

- Computer ScienceACM Trans. Program. Lang. Syst.
- 1989

This paper gives a self-contained account of the generalized calculus from first principles through the semantics of recursion through the fixpoint method from denotational semantics.

Countable nondeterminism and random assignment

- Computer ScienceJACM
- 1986

Four semantics for a small programming language involving unbounded (but countable) nondeterminism are provided and a Hoare-like proof system for total correctness is introduced and its soundness and completeness in an appropriate sense are shown.

Refinement Calculus, Part I: Sequential Nondeterministic Programs

- Computer ScienceREX Workshop
- 1989

A lattice theoretic framework for the calculus of program refinement is presented, which permits miraculous, angelic and demonic statements to be used in the description of program behavior.

Predicate-transformer semantics of general recursion

- Computer ScienceActa Informatica
- 2004

The semantics of a language with arbitrary atomic statements, unbounded nondeterminacy, and mutual recursion is developed, and the universal conjunctivity of the weakest liberal preconditions and the connection between the weakest precondition and the weakest liberalism are proved to remain valid.

Dijkstra's Predicate Transformer, Non-Determinism, Recursion and Termination

- Computer ScienceMFCS
- 1976

A method for expressing total correctness of non-deterministic recursive procedures by means of inductive assertion patterns is presented and shown to be adequate (complete), thus refining work of de BAKKER's and MEERTENS'.

A Theoretical Basis for Stepwise Refinement and the Programming Calculus

- Computer ScienceSci. Comput. Program.
- 1987

A simple fixpoint argument without the restriction to continuity

- PhilosophyActa Informatica
- 2004

It is shown that, even in the case of unbounded nondeterminacy, the fundamental theorem about the repetition can be proved by a simple and quite elementary argument.