ICFP/SPLASH 2025 (series) / ICFP 2025 (series) / ICFP Papers /
A Bargain for Mergesorts: How to Prove Your Mergesort Correct and Stable, Almost for Free
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).
Wed 15 OctDisplayed time zone: Perth change
Wed 15 Oct
Displayed time zone: Perth change
10:50 - 12:05 | ParametricityICFP Papers / JFP First Papers at Orchid Plenary Ballroom Chair(s): Philip Wadler IOG; University of Edinburgh | ||
10:50 25mTalk | A Bargain for Mergesorts: How to Prove Your Mergesort Correct and Stable, Almost for Free ICFP Papers Cyril Cohen Inria - CNRS - ENS Lyon - Université Claude Bernard Lyon 1 - LIP - UMR 5668, Kazuhiko Sakaguchi CNRS - ENS Lyon - Université Claude Bernard Lyon 1 - LIP - UMR 5668 DOI Pre-print Media Attached | ||
11:15 25mTalk | CRDT Emulation, Simulation, and Representation Independence ICFP Papers Nathan Liittschwager University of California, Santa Cruz, Jonathan Castello University of California, Santa Cruz, Stelios Tsampas University of Southern Denmark, Lindsey Kuper University of California, Santa Cruz DOI Pre-print | ||
11:40 25mPaper | How much is in a square? Calculating functional programs with squares JFP First Papers Jose Nuno Oliveira University of Minho; INESC TEC DOI | ||