paperbot · PL 论文追踪

RSS

A Bargain for Mergesorts: How to Prove Your Mergesort Correct and Stable, Almost for Free

ICFP 9(ICFP)2025
Cyril Cohen, Kazuhiko Sakaguchi

尚未生成 AI 速览(可能缺少 API key 或等待下次运行补跑)。

原文摘要(Abstract)

We present a novel characterization of stable mergesort functions using relational parametricity, and show that it implies the functional correctness of mergesort. As a result, one can prove the correctness of several variations of mergesort ( e.g ., top-down, bottom-up, tail-recursive, non-tail-recursive, smooth, and non-smooth mergesorts) by proving the characteristic property for each variation. Thanks to our characterization and the parametricity translation, we deduced the correctness results, including stability, of various implementations of mergesort for lists, including highly optimized ones, in the Rocq Prover (formerly the Coq Proof Assistant).

链接与引用

DOI 原文 ·

BibTeX
@article{paperbot3029,
  title = {A Bargain for Mergesorts: How to Prove Your Mergesort Correct and Stable, Almost for Free},
  author = {Cyril Cohen and Kazuhiko Sakaguchi},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {ICFP},
  year = {2025},
  doi = {10.1145/3747505}
}