English

Invariant-based Program Repair

Software Engineering 2024-01-30 v2

Abstract

This paper describes a formal general-purpose automated program repair (APR) framework based on the concept of program invariants. In the presented repair framework, the execution traces of a defected program are dynamically analyzed to infer specifications φcorrect\varphi_{correct} and φviolated\varphi_{violated}, where φcorrect\varphi_{correct} represents the set of likely invariants (good patterns) required for a run to be successful and φviolated\varphi_{violated} represents the set of likely suspicious invariants (bad patterns) that result in the bug in the defected program. These specifications are then refined using rigorous program analysis techniques, which are also used to drive the repair process towards feasible patches and assess the correctness of generated patches.We demonstrate the usefulness of leveraging invariants in APR by developing an invariant-based repair system for performance bugs. The initial analysis shows the effectiveness of invariant-based APR in handling performance bugs by producing patches that ensure program's efficiency increase without adversely impacting its functionality.

Keywords

Cite

@article{arxiv.2312.16652,
  title  = {Invariant-based Program Repair},
  author = {Omar I. Al-Bataineh},
  journal= {arXiv preprint arXiv:2312.16652},
  year   = {2024}
}

Comments

Accepted for publication in the 27th International Conference on Fundamental Approaches to Software Engineering (FASE 2024)