A Largely Automated Verification of GHC’s Natural Mergesort
摘要
We report on a machine supported verification of a sorting algorithm from Haskell’s GHC library based on Natural Mergesort. Our work was motivated by previous endeavors with the Dafny system and with Isabelle/HOL, where a skillful elimination of mutual recursion is required to enable verification. We replicate the Isabelle/HOL solution with the VeriFun system and also give a direct proof for verifying correctness and stability of GHC-Mergesort. Based on our experiences when working on the proofs, we suggest a simpler implementation of Natural Mergesort. We conclude by comparing the degree of machine support of the considered systems when creating the proofs.