A Hoare Logic for the State Monad

  • Authors:
  • Wouter Swierstra

  • Affiliations:
  • Chalmers University of Technology,

  • Venue:
  • TPHOLs '09 Proceedings of the 22nd International Conference on Theorem Proving in Higher Order Logics
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

This pearl examines how to verify functional programs written using the state monad. It uses Coq's Program framework to provide strong specifications for the standard operations that the state monad supports, such as return and bind. By exploiting the monadic structure of such programs during the verification process, it becomes easier to prove that they satisfy their specification.