Constraint-Based Program Repair

In this project we are investigating techniques to automatically repair program errors through the use of the off-the-shelf constraint solvers. We are exploring two variants of the problem:

In static, or offline, repair, the goal is to modify the source program in order to remove identified errors. Our current focus in static repair is to automatically fix PHP web applications that generate ill-formed HTML pages. We use string constraint solving to map fixes for the buggy HTML pages back to the PHP program and to do so with minimal changes.

In dynamic, or online, repair, the goal is to modify the execution state of a running program in order to restore desired invariants in the face of run-time errors and allow execution to safely continue. Our Plan B approach performs dynamic repair by asking a constraint solver to nondeterministically "execute" programmer-supplied specifications upon a null pointer or other exception as well as a specification violation, producing an execution state that is guaranteed to be correct up to the specification.


Declarative Mocking  (ISSTA 2013)
       Hesam Samimi, Rebecca Hicks, Ari Fogel, Todd Millstein

Automated Repair of HTML Generation Errors in PHP Applications Using String Constraint Solving    (ICSE 2012)
        Hesam Samimi, Max Schaefer, Shay Artzi, Todd Millstein, Frank Tip, and Laurie Hendren

Falling Back on Executable Specifications    (ECOOP 2010)
        Hesam Samimi, Ei Darli Aung, and Todd Millstein


The Plan B release is here.