Proving and Disproving Equivalence of Functional Programming Assignments
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Alive2: bounded translation validation for LLVM cites Counterexample-guided correlation algorithm for translation validation
- Equivalence Checking of ML GPU Kernels cites Alive2: bounded translation validation for LLVM
- Equivalence Checking of ML GPU Kernels cites Counterexample-guided correlation algorithm for translation validation
- Spatial and Temporal Decomposition for Faster Translation Validation cites Alive2: bounded translation validation for LLVM
- Spatial and Temporal Decomposition for Faster Translation Validation cites ARDiff: scaling program equivalence checking via iterative abstraction and refinement of common code
- Spatial and Temporal Decomposition for Faster Translation Validation cites Counterexample-guided correlation algorithm for translation validation
- Proving Functional Program Equivalence via Directed Lemma Synthesis cites Theory Exploration Powered by Deductive Synthesis
Cited 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
- First-Class Refinement Types for ScalaMatt Bovel, Viktor Kunčak, Martin OderskyOOPSLA 2026
