A hoare logic for the coinductive trace-based big-step semantics of while

  • Authors:
  • Keiko Nakata;Tarmo Uustalu

  • Affiliations:
  • Institute of Cybernetics at Tallinn University of Technology, Tallinn, Estonia;Institute of Cybernetics at Tallinn University of Technology, Tallinn, Estonia

  • Venue:
  • ESOP'10 Proceedings of the 19th European conference on Programming Languages and Systems
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.