Skip to main content

Characteristic formulae for liveness properties of non-terminating CakeML programs


Johannes ├ůman Pohjola, Henrik Rostedt and Magnus Myreen


Chalmers University of Technology

UNSW Sydney


There are useful programs that do not terminate, and yet standard Hoare logics are not able to prove liveness properties about non-terminating programs. This paper shows how a Hoare-like programming logic framework (Characteristic Formulae) can be extended to enable reasoning about the I/O behaviour of programs that do not terminate. The approach is inspired by transfinite induction rather than co-induction, and does not require non-terminating loops to be productive. This work has been developed in the HOL4 theorem prover and has been integrated into the ecosystem of proof tools surrounding the CakeML programming language.

BibTeX Entry

    isbn             = {9783959771221},
    publisher        = {LIPIcs},
    doi              = {},
    month            = sep,
    booktitle        = {Proceedings of the 10th International Conference on Interactive Theorem Proving},
    paperurl         = {},
    year             = {2019},
    address          = {Portland, Oregon},
    keywords         = {Program verification; non-termination; liveness; {Hoare} logic},
    volume           = {141},
    title            = {Characteristic Formulae for Liveness Properties of Non-terminating {CakeML} Programs},
    author           = {{\AA}man Pohjola, Johannes and Rostedt, Henrik and Myreen, Magnus},
    date             = {2019-9-5},
    pages            = {32:1-19}