Proving and Disproving Equivalence of Functional Programming Assignments
摘要
We present an automated approach to verify the correctness of programming assignments, such as the ones that arise in a functional programming course. Our approach takes as input student submissions and reference solutions, and uses equivalence checking to automatically prove or disprove correctness of each submission. To be effective in the context of a real-world programming course, an automated grading system must be both robust, to support programs written in a variety of style, and scalable, to treat hundreds of submissions at once. We achieve robustness by handling recursion using functional induction and by handling auxiliary functions using function call matching. We achieve scalability using a clustering algorithm that leverages the transitivity of equivalence to discover intermediate reference solutions among student submissions. We implement our approach on top of the Stainless verification system, to support equivalence checking of Scala programs. We evaluate our system and its components on over 4000 programs drawn from a functional programming course and from the program equivalence checking literature; this is the largest such evaluation to date. We show that our system is capable of proving program correctness by generating inductive equivalence proofs, and providing counterexamples for incorrect programs, with a high success rate.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 3 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Alive2: bounded translation validation for LLVM 引用了 Counterexample-guided correlation algorithm for translation validation
- Equivalence Checking of ML GPU Kernels 引用了 Alive2: bounded translation validation for LLVM
- Equivalence Checking of ML GPU Kernels 引用了 Counterexample-guided correlation algorithm for translation validation
- Spatial and Temporal Decomposition for Faster Translation Validation 引用了 Alive2: bounded translation validation for LLVM
- Spatial and Temporal Decomposition for Faster Translation Validation 引用了 ARDiff: scaling program equivalence checking via iterative abstraction and refinement of common code
- Spatial and Temporal Decomposition for Faster Translation Validation 引用了 Counterexample-guided correlation algorithm for translation validation
- Proving Functional Program Equivalence via Directed Lemma Synthesis 引用了 Theory Exploration Powered by Deductive Synthesis
引用它的顶会 Paper3
- Proving Functional Program Equivalence via Directed Lemma SynthesisYican Sun, Ruyi Ji, Jian Fang, Xuanlin Jiang 等FM 2024 · 2 次引用
- Equivalence Checking of ML GPU KernelsBenjamin Driscoll, Kshitij Dubey, Anjiang Wei, Neeraj Kayal 等OOPSLA 2026 · 1 次引用
- Spatial and Temporal Decomposition for Faster Translation ValidationBenjamin Mikek, Chathur Bommineni, Qirun Zhang, Thomas RepsOOPSLA 2026
它引用的 Paper8
- Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu 等PLDI 2021 · 109 次引用
- ARDiff: scaling program equivalence checking via iterative abstraction and refinement of common codeSahar Badihi, Faridah Akinotcho, Yi Li, Julia RubinFSE 2020 · 44 次引用
- Context-aware and data-driven feedback generation for programming assignmentsDowon Song, Woosuk Lee, Hakjoo OhFSE 2021 · 22 次引用
- Theory Exploration Powered by Deductive SynthesisEytan Singher, Shachar ItzhakyCAV 2021 · 19 次引用
- Counterexample-guided correlation algorithm for translation validationShubhani Gupta, Abhishek Rose, Sorav BansalOOPSLA 2020 · 14 次引用
相关 Paper
- Program equivalence for assisted grading of functional programsJoshua Clune, Vijay Ramamurthy, Ruben Martins, Umut A. AcarOOPSLA 2020 · 11 次引用
- Checking equivalence in a non-strict languageJohn C. Kolesar, Ruzica Piskac, William T. HallahanOOPSLA 2022 · 3 次引用
- Formula Normalizations in VerificationSimon Guilloud, Mario Bucev, Dragana Milovancevic, Viktor KuncakCAV 2023 · 6 次引用
- Formally Verifying Arithmetic Chisel Designs for All Bit Widths at OnceWeizhi Feng, Yicheng Liu, Jiaxiang Liu, David N. Jansen 等DAC 2024
- First-Class Refinement Types for ScalaMatt Bovel, Viktor Kunčak, Martin OderskyOOPSLA 2026
