Adjustable references

  • Authors:
  • Viktor Vafeiadis

  • Affiliations:
  • Max Planck Institute for Software Systems (MPI-SWS), Germany

  • Venue:
  • ITP'13 Proceedings of the 4th international conference on Interactive Theorem Proving
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Even when programming purely mathematical functions, mutable state is often necessary to achieve good performance, as it underlies important optimisations such as path compression in union-find algorithms and memoization. Nevertheless, verified programs rarely use mutable state because of its substantial verification cost: one must either commit to a deep embedding or follow a monadic style of programming. To avoid this cost, we propose using adjustable state instead. More concretely, we extend Coq with a type of adjustable references, which are like ML references, except that the stored values are only partially observable and updatable only to values that are observationally indistinguishable from the old ones.