Proof-Based Synthesis of Sorting Algorithms Using Multisets in Theorema
Isabela Dr\u{a}mnesc (Department of Computer Science West University, Timisoara, Romania), Tudor Jebelean (Research Institute for Symbolic, Computation, Johannes Kepler University, Linz, Austria)

TL;DR
This paper presents a formal method for synthesizing sorting algorithms using multisets and proof techniques within the Theorema system, enabling automatic generation and verification of recursive algorithms.
Contribution
It introduces a novel proof-based synthesis approach leveraging multisets and domain-specific inference rules in Theorema for recursive sorting algorithms.
Findings
Successfully synthesized sorting algorithms with multisets
Automated generation of auxiliary function specifications
Powerful strategies for recursive algorithm synthesis
Abstract
Using multisets, we develop novel techniques for mechanizing the proofs of the synthesis conjectures for list-sorting algorithms, and we demonstrate them in the Theorema system. We use the classical principle of extracting the algorithm as a set of rewrite rules based on the witnesses found in the proof of the synthesis conjecture produced from the specification of the desired function (input and output conditions). The proofs are in natural style, using standard rules, but most importantly domain specific inference rules and strategies. In particular the use of multisets allows us to develop powerful strategies for the synthesis of arbitrarily structured recursive algorithms by general Noetherian induction, as well as for the automatic generation of the specifications of all necessary auxiliary functions (insert, merge, split), whose synthesis is performed using the same method.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
