A language-based approach to functionally correct imperative programming

  • Authors:
  • Edwin Westbrook;Aaron Stump;Ian Wehrman

  • Affiliations:
  • Washington University in Saint Louis;Washington University in Saint Louis;Washington University in Saint Louis

  • Venue:
  • Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper a language-based approach to functionally correct imperative programming is proposed. The approach is based on a programming language called RSP1, which combines dependent types, general recursion, and imperative features in a type-safe way, while preserving decidability of type checking. The methodology used is that of internal verification, where programs manipulate programmer-supplied proofs explicitly as data. The fundamental technical idea of RSP1 is to identify problematic operations as impure, and keep them out of dependent types. The resulting language is powerful enough to verify statically non-trivial properties of imperative and functional programs. The paper presents the ideas through the examples of statically verified merge sort, statically verified imperative binary search trees, and statically verified directed acyclic graphs.