Don't Call Us, We'll Call You: Towards Mixed-Initiative Interactive Proof Assistants for Programming Language Theory

Jan Liam Verter,Tomas Petricek
2024-09-21
Abstract:There are two kinds of systems that programming language researchers use for their work. Semantics engineering tools let them interactively explore their definitions, while proof assistants can be used to check the proofs of their properties. The disconnect between the two kinds of systems leads to errors in accepted publications and also limits the modes of interaction available when writing proofs. When constructing a proof, one typically states the property and then develops the proof manually until an automatic strategy can fill the remaining gaps. We believe that an integrated and more interactive tool that leverages the typical structure of programming language could do better. A proof assistant aware of the typical structure of programming language proofs could require less human input, assist the user in understanding their proofs, but also use insights from the exploration of executable semantics in proof construction. In the early work presented in this paper, we focus on the problem of interacting with a proof assistant and leave the semantics engineering part to the future. Rather than starting with manual proof construction and then completing the last steps automatically, we propose a way of working where the tool starts with an automatic proof search and then breaks when it requires feedback from the user. We build a small proof assistant that follows this mode of interaction and illustrates the idea using a simple proof of the commutativity of the "+" operation for Peano arithmetic. Our early experience suggests that this way of working can make proof construction easier.
Programming Languages
What problem does this paper attempt to address?
This paper attempts to address the disconnection between two major tools in programming language research: semantic engineering tools and proof assistants. Specifically, the author points out: 1. **Semantic engineering tools** (such as PLT Redex) allow researchers to interactively explore and debug formal models of programming languages. 2. **Proof assistants** (such as SASyLF, Coq, and Agda) are used to formalize and verify the properties of these models. The disconnection between these two tools has led to errors, even in high - impact publications that have been peer - reviewed. To solve this problem, the author proposes a unified system that aims to combine support for programming language semantic descriptions with support for proof - checking. Specific goals include: - Designing a more effective interactive proof - development mode, leveraging the typical structure of programming language proofs. - Exploring how to use the interactive exploration of executable semantics as a basis for constructing proofs. - Making it easier to write programming language models and proofs by directly using the concrete language syntax. ### Main contributions of the paper In this early work, the author focuses on the first problem, that is, how to improve the way of interacting with proof assistants. They propose a new interaction mode in which the proof assistant first tries to automatically search for a proof and then asks the user for help when more complex reasoning is required. This mode is different from the traditional way of manually constructing a proof and then automatically completing the last few steps. Instead, it attempts automated search from the very beginning and requests user feedback when necessary. ### Example illustration To illustrate this new interaction mode, the author developed a simple proof assistant based on the natural deduction system and used it to prove the commutativity of addition in Peano arithmetic. Although the proof itself is not complicated, it shows how to combine automatic search and manual input to support typical programming language research proofs. ### Mixed - initiative interaction mode In the mixed - initiative interaction mode, after the user starts the proof assistant, the assistant will try to automatically handle the simple parts and prompt the user to provide guidance when encountering difficulties. This can reduce the amount of user input and at the same time help the user better understand their proof process. ### Conclusion The author believes that by more closely integrating semantic engineering tools and proof assistants, more powerful tools can be created to support the work of programming language researchers. In particular, the mixed - initiative interaction mode can enable proof assistants to automatically handle simple tasks at appropriate times and obtain crucial human insights when needed, thereby improving the efficiency and accuracy of proof development.