๐ฎ
๐ฎ
The Ethereal
A bargain for mergesorts -- How to prove your mergesort correct and stable, almost for free
March 13, 2024 ยท The Ethereal ยท ๐ Proc. ACM Program. Lang.
"No code URL or promise found in abstract"
Evidence collected by the PWNC Scanner
Authors
Cyril Cohen, Kazuhiko Sakaguchi
arXiv ID
2403.08173
Category
cs.LO: Logic in CS
Cross-listed
cs.DS,
cs.PL
Citations
0
Venue
Proc. ACM Program. Lang.
Last Checked
5 months ago
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).
Community Contributions
Found the code? Know the venue? Think something is wrong? Let us know!
๐ Similar Papers
In the same crypt โ Logic in CS
๐ฎ
๐ฎ
The Ethereal
Safe Reinforcement Learning via Shielding
๐ฎ
๐ฎ
The Ethereal
Formal Verification of Piece-Wise Linear Feed-Forward Neural Networks
๐ฎ
๐ฎ
The Ethereal
Heterogeneous substitution systems revisited
๐ฎ
๐ฎ
The Ethereal
Omega-Regular Objectives in Model-Free Reinforcement Learning
๐ฎ
๐ฎ
The Ethereal