MENTOR: Fixing Introductory Programming Assignments With Formula-Based Fault Localization and LLM-Driven Program Repair

Dec 19, 2025·
Pedro Orvalho
Pedro Orvalho
· 0 min read
Image credit: INESC-ID
Abstract
The rapid growth of introductory programming courses has created a pressing need for scalable, personalised feedback on student code. In this talk, I will present my PhD work on MENTOR, a semantic automated program repair framework designed to provide meaningful feedback for introductory programming assignments. MENTOR generates and validates candidate repairs for faulty student programs and highlights the underlying buggy statements to support learning. MENTOR combines formal methods and machine learning, student submissions are clustered independently of control-flow structure, variables are aligned using graph neural networks, and faults are localised using CFaults, a Maximum Satisfiability (MaxSAT)-based diagnosis engine. Repairs are synthesised via a counterexample-guided loop that integrates Large Language Models (LLMs) with formal verification, enabling flexible, semantics-preserving fixes without requiring structurally identical reference solutions. Experiments on the C-Pack-IPAs benchmark show that MENTOR substantially outperforms prior symbolic repair approaches, demonstrating how combining LLMs with rigorous formal reasoning can deliver robust and pedagogically useful feedback for programming education.
Date
Dec 19, 2025 4:00 PM — 4:30 PM
Event
Location

INESC-ID

Lisbon, Portugal.