Counterexample Guided Program Repair Using Zero-Shot Learning and MaxSAT-based Fault Localization
Pedro Orvalho, Mikol\'a\v{s} Janota, Vasco Manquinho

TL;DR
This paper introduces a hybrid program repair method combining fault localization and large language models, guided by counterexamples, to improve automated repair of introductory programming assignments.
Contribution
It presents a novel approach integrating MaxSAT-based fault localization with zero-shot LLMs within a CEGIS loop for more effective program repair.
Findings
Significantly improves repair success rates across six LLMs.
Enables LLMs to produce smaller, more precise fixes.
Outperforms existing symbolic program repair tools.
Abstract
Automated Program Repair (APR) for introductory programming assignments (IPAs) is motivated by the large number of student enrollments in programming courses each year. Since providing feedback on IPAs requires substantial time and effort from faculty, personalized feedback often involves suggesting fixes to students' programs. Formal Methods (FM)-based semantic repair approaches, check a program's execution against a test suite or reference solution, are effective but limited. These tools excel at identifying buggy parts but can only fix programs if the correct implementation and the faulty one share the same control flow graph. Conversely, Large Language Models (LLMs) are used for APR but often make extensive instead of minimal rewrites. This leads to more invasive fixes, making it harder for students to learn from their mistakes. In summary, LLMs excel at completing strings, while…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
Taxonomy
TopicsIntegrated Circuits and Semiconductor Failure Analysis · VLSI and Analog Circuit Testing · Radiation Effects in Electronics
