Proving and Disproving Equivalence of Functional Programming Assignments
Dragana Milovancevic, Viktor Kuncak
Abstract
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.
CCS Concepts: • Software and its engineering → Software verification.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 3cfcdbd9-ffbc-4e1a-a1ff-72146098f580Cited by top-tier papers3
- Proving Functional Program Equivalence via Directed Lemma SynthesisYican Sun, Ruyi Ji, Jian Fang, Xuanlin Jiang et al.FM 2024 · 2 citations
- Equivalence Checking of ML GPU KernelsBenjamin Driscoll, Kshitij Dubey, Anjiang Wei, Neeraj Kayal et al.OOPSLA 2026 · 1 citation
- Spatial and Temporal Decomposition for Faster Translation ValidationBenjamin Mikek, Chathur Bommineni, Qirun Zhang, Thomas RepsOOPSLA 2026
Builds on8
- Alive2: bounded translation validation for LLVMNuno P. Lopes, Juneyoung Lee, Chung-Kil Hur, Zhengyang Liu et al.PLDI 2021 · 109 citations
- ARDiff: scaling program equivalence checking via iterative abstraction and refinement of common codeSahar Badihi, Faridah Akinotcho, Yi Li, Julia RubinFSE 2020 · 44 citations
- Context-aware and data-driven feedback generation for programming assignmentsDowon Song, Woosuk Lee, Hakjoo OhFSE 2021 · 22 citations
- Theory Exploration Powered by Deductive SynthesisEytan Singher, Shachar ItzhakyCAV 2021 · 19 citations
- Counterexample-guided correlation algorithm for translation validationShubhani Gupta, Abhishek Rose, Sorav BansalOOPSLA 2020 · 14 citations
Related papers
- Program equivalence for assisted grading of functional programsJoshua Clune, Vijay Ramamurthy, Ruben Martins, Umut A. AcarOOPSLA 2020 · 11 citations
- Checking equivalence in a non-strict languageJohn C. Kolesar, Ruzica Piskac, William T. HallahanOOPSLA 2022 · 3 citations
- Formula Normalizations in VerificationSimon Guilloud, Mario Bucev, Dragana Milovancevic, Viktor KuncakCAV 2023 · 6 citations
- Formally Verifying Arithmetic Chisel Designs for All Bit Widths at OnceWeizhi Feng, Yicheng Liu, Jiaxiang Liu, David N. Jansen et al.DAC 2024
- Complete First-Order Reasoning for Properties of Functional ProgramsAdithya Murali, Lucas Peña, Ranjit Jhala, P. MadhusudanOOPSLA 2023 · 3 citations
