A Hoare Logic for the Coinductive Trace-Based Big-Step Semantics of While

  • Keiko Nakata
  • Tarmo Uustalu
Conference paper

DOI: 10.1007/978-3-642-11957-6_26

Part of the Lecture Notes in Computer Science book series (LNCS, volume 6012)
Cite this paper as:
Nakata K., Uustalu T. (2010) A Hoare Logic for the Coinductive Trace-Based Big-Step Semantics of While. In: Gordon A.D. (eds) Programming Languages and Systems. ESOP 2010. Lecture Notes in Computer Science, vol 6012. Springer, Berlin, Heidelberg


In search for a foundational framework for reasoning about observable behavior of programs that may not terminate, we have previously devised a trace-based big-step semantics for While. In this semantics, both traces and evaluation (relating initial states of program runs to traces they produce) are defined coinductively. On terminating runs, it agrees with the standard inductive state-based semantics. Here we present a Hoare logic counterpart of our coinductive trace-based semantics and prove it sound and complete. Our logic subsumes both the partial correctness Hoare logic and the total correctness Hoare logic: they are embeddable. Since we work with a constructive underlying logic, the range of expressible program properties has a rich structure; in particular, we can distinguish between termination and nondivergence, e.g., unbounded total search fails to be terminating but is nonetheless nondivergent. Our metatheory is entirely constructive as well, and we have formalized it in Coq.

Download to read the full conference paper text

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Keiko Nakata
    • 1
  • Tarmo Uustalu
    • 1
  1. 1.Institute of Cybernetics at Tallinn University of TechnologyTallinnEstonia

Personalised recommendations