Proof Repair across Quotient Type Equivalences (2310.06959v5)
Abstract: Proofs in proof assistants like Coq can be brittle, breaking easily in response to changes. To address this, recent work introduced an algorithm and tool in Coq to automatically repair broken proofs in response to changes that correspond to type equivalences. However, many changes remained out of the scope of this algorithm and tool -- especially changes in underlying behavior. We extend this proof repair algorithm so that it can express certain changes in behavior that were previously out of scope. We focus in particular on equivalences between quotient types -- types equipped with a relation that describes what it means for any two elements of that type to be equal. Quotient type equivalences can be used to express interesting changes in representations of mathematical structures, as well as changes in the underlying implementations of data structures. We extend this algorithm and tool to support quotient type equivalences in Coq. Notably, since Coq lacks quotient types entirely, our extensions use Coq's setoid machinery to represent quotients externally. Specifically, (1) our extension to the algorithm supports new changes corresponding to setoids, and (2) our extension to the tool supports this new class of changes and further automates away some of the new proof obligations. We ground our setoid extensions by way of a discussion of a corresponding manual proof repair approach in Cubical Agda, which supports quotient types and allows for some internalization of the correctness criteria for proof repair. We demonstrate our extensions on proof repair case studies for previously unsupported changes.
- Setoid Type Theory—A Syntactic Translation. In Mathematics of Program Construction, Graham Hutton (Ed.). Springer International Publishing, Cham, 155–196.
- Internalizing Representation Independence with Univalence. Proc. ACM Program. Lang. 5, POPL, Article 12 (jan 2021), 30 pages. https://doi.org/10.1145/3434293
- Computational Higher-Dimensional Type Theory. SIGPLAN Not. 52, 1 (jan 2017), 680–693. https://doi.org/10.1145/3093333.3009861
- Theorem Proving in Lean. https://leanprover.github.io/theorem_proving_in_lean/index.html
- The HoTT Library: A Formalization of Homotopy Type Theory in Coq. In Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs (Paris, France) (CPP 2017). Association for Computing Machinery, New York, NY, USA, 164–172. https://doi.org/10.1145/3018610.3018615
- Maksym Bortin and Christoph Lüth. 2010. Structured Formal Development with Quotient Types in Isabelle/HOL. In Proceedings of the 10th ASIC and 9th MKM International Conference, and 17th Calculemus Conference on Intelligent Computer Mathematics (Paris, France) (AISC’10/MKM’10/Calculemus’10). Springer-Verlag, Berlin, Heidelberg, 34–48.
- Adam Chlipala. 2013. Certified Programming with Dependent Types - A Pragmatic Introduction to the Coq Proof Assistant. MIT Press. http://mitpress.mit.edu/books/certified-programming-dependent-types
- Cubical Type Theory: A Constructive Interpretation of the Univalence Axiom. In 21st International Conference on Types for Proofs and Programs (TYPES 2015) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 69), Tarmo Uustalu (Ed.). Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 5:1–5:34. https://doi.org/10.4230/LIPIcs.TYPES.2015.5
- Refinements for Free!. In Certified Programs and Proofs, Georges Gonthier and Michael Norrish (Eds.). Springer International Publishing, Cham, 147–162.
- On Higher Inductive Types in Cubical Type Theory. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science (Oxford, United Kingdom) (LICS ’18). Association for Computing Machinery, New York, NY, USA, 255–264. https://doi.org/10.1145/3209108.3209197
- Thierry Coquand and Gérard Huet. 1988. The calculus of constructions. Information and Computation 76, 2 (1988), 95–120. https://doi.org/10.1016/0890-5401(88)90005-3
- Thierry Coquand and Christine Paulin-Mohring. 1990. Inductively defined types. In COLOG-88. Springer, Berlin, Heidelberg, 50–66. https://doi.org/10.1007/3-540-52335-9_47
- Product Lines of Theorems. In Proceedings of the 2011 ACM International Conference on Object Oriented Programming Systems Languages and Applications (Portland, Oregon, USA) (OOPSLA ’11). ACM, New York, NY, USA, 595–608. https://doi.org/10.1145/2048066.2048113
- Mostly Automated Proof Repair for Verified Libraries. Proc. ACM Program. Lang. 7, PLDI, Article 107 (jun 2023), 25 pages. https://doi.org/10.1145/3591221
- Brian Huffman and Ondřej Kunčar. 2013. Lifting and Transfer: A Modular Design for Quotients in Isabelle/HOL. In Certified Programs and Proofs, Georges Gonthier and Michael Norrish (Eds.). Springer International Publishing, Cham, 131–146.
- Isabelle Development Team. 1994-2024. Isabelle. http://isabelle.in.tum.de
- Martin Monperrus. 2017. Automatic Software Repair: a Bibliography. ACM Computing Surveys (2017). https://hal.archives-ouvertes.fr/hal-01206501/file/survey-automatic-repair.pdf
- Talia Ringer. 2021. Proof Repair. Ph. D. Dissertation. University of Washington.
- QED at Large: A Survey of Engineering of Formally Verified Software. Foundations and Trends® in Programming Languages 5, 2-3 (2019), 102–281. https://doi.org/10.1561/2500000045
- Proof repair across type equivalences. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation. 112–127.
- REPLica: REPL Instrumentation for Coq Analysis. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (New Orleans, LA, USA) (CPP 2020). Association for Computing Machinery, New York, NY, USA, 99–113. https://doi.org/10.1145/3372885.3373823
- Adapting Proof Automation to Adapt Proofs. In Proceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs (Los Angeles, CA, USA) (CPP 2018). Association for Computing Machinery, New York, NY, USA, 115–129. https://doi.org/10.1145/3167094
- Valentin Robert. 2018. Front-end tooling for building and maintaining dependently-typed functional programs. Ph. D. Dissertation. UC San Diego.
- Matthieu Sozeau. 1999-2023. Coq Reference Manual, Generalized Rewriting. https://coq.inria.fr/refman/addendum/generalized-rewriting.html
- Equivalences for Free: Univalent Parametricity for Effective Transport. Proc. ACM Program. Lang. 2, ICFP, Article 92 (jul 2018), 29 pages. https://doi.org/10.1145/3236787
- The Marriage of Univalence and Parametricity. J. ACM 68, 1, Article 5 (jan 2021), 44 pages. https://doi.org/10.1145/3429979
- Amin Timany and Bart Jacobs. 2015. First Steps Towards Cumulative Inductive Types in CIC. In Theoretical Aspects of Computing - ICTAC 2015, Martin Leucker, Camilo Rueda, and Frank D. Valencia (Eds.). Springer International Publishing, Cham, 608–617.
- The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations of Mathematics. https://homotopytypetheory.org/book, Institute for Advanced Study.
- Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types. Proc. ACM Program. Lang. 3, ICFP, Article 87 (jul 2019), 29 pages. https://doi.org/10.1145/3341691
- Makarius Wenzel et al. 2004. The Isabelle/Isar reference manual.
- Planning for Change in a Formal Verification of the Raft Consensus Protocol. In Proceedings of the 5th ACM SIGPLAN Conference on Certified Programs and Proofs (St. Petersburg, FL, USA) (CPP 2016). ACM, New York, NY, USA, 154–165. https://doi.org/10.1145/2854065.2854081