Extracting Imperative Programs from Proofs: In-place Quicksort

Ulrich Berger, Monika Seisenberger, Gregory J. M. Woods, Marc Herbstritt
2014 Types for Proofs and Programs  
The process of program extraction is primarily associated with functional programs with less focus on imperative program extraction. In this paper we consider a standard problem for imperative programming: In-place Quicksort. We formalize a proof that every array of natural numbers can be sorted and apply a realizability interpretation to extract a program from the proof. Using monads we are able to exhibit the inherent imperative nature of the extracted program. We see this as a first step
more » ... rds an automated extraction of imperative programs. The case study is carried out in the interactive proof assistant Minlog.
doi:10.4230/lipics.types.2013.84 dblp:conf/types/BergerSW13 fatcat:ofhtwmjlsjb5nau5y3lqrkxspa