Program Extraction for Mutable Arrays
Program Extraction for Mutable Arrays
复制标题
可变数组的程序提取
DOI:
10.1007/978-3-319-90686-7_4
复制
发表时间:
2018
期刊:
影响因子:
--
通讯作者:
Kazuhiko Sakaguchi
中科院分区:
文献类型:
--
作者:
Cyril Cohen;Kazuhiko Sakaguchi;Enrico Tassi;Kazuhiko Sakaguchi
We present a lightweight method to represent, verify, and extract efficient programs involving mutable arrays in the Coq proof assistant. Our method mainly consists of a library for handling mutable arrays and an improved extraction plugin. Our library provides a monadic domain specific language for modeling computations involving mutable arrays, a simple reasoning method based on the Ssreflect extension and the Mathematical Components library, and an extraction method to efficient OCaml programs using in-place updates. Our extraction plugin improves the performance of our extracted programs, or more appropriately, through the application of simple program transformations for purely functional programs, it reduces both construction and destruction costs of inductive and coinductive objects and function call costs. As concrete applications for our method, we provide efficient implementations, correctness proofs, and benchmarks of the union–find data structure and the quicksort algorithm.