Invariant-based Program Repair (2312.16652v2)
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 $\varphi_{correct}$ and $\varphi_{violated}$, where $\varphi_{correct}$ represents the set of likely invariants (good patterns) required for a run to be successful and $\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.
- Getafix: learning to fix bugs automatically. Proc. ACM Program. Lang., pages 159:1–159:27, 2019.
- D. Beyer. Automatic verification of C and java programs: SV-COMP 2019. In Tools and Algorithms for the Construction and Analysis of Systems TACAS, volume 11429, pages 133–155, 2019.
- D. Beyer and M. E. Keremoglu. Cpachecker: A tool for configurable software verification. In Computer Aided Verification, pages 184–190, 2011.
- The daikon system for dynamic detection of likely invariants. Sci. Comput. Program., 69(1-3):35–45, 2007.
- Crash-avoiding program repair. In International Symposium on Software Testing and Analysis (ISSTA), pages 8–18, 2019.
- Understanding and detecting real-world performance bugs. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’12, Beijing, China - June 11 - 16, 2012, pages 77–88. ACM, 2012.
- GenProg: A Generic Method for Automatic Software Repair. IEEE Transactions on Software Engineering, 38(1):54–72, Jan. 2012.
- Angelix: Scalable multiline program patch synthesis via symbolic analysis. In International Conference on Software Engineering (ICSE), pages 691–701, 2016.
- Angelix: Scalable Multiline Program Patch Synthesis via Symbolic Analysis. In International Conference on Software Engineering (ICSE), pages 691–701, May 2016.
- Discovering, reporting, and fixing performance bugs. In 10th Working Conference on Mining Software Repositories (MSR), pages 237–246, 2013.
- An analysis of patch plausibility and correctness for generate-and-validate patch generation systems. In Proceedings of the 2015 International Symposium on Software Testing and Analysis, ISSTA 2015, Baltimore, MD, USA, July 12-17, 2015, pages 24–36, 2015.
- Concolic program repair. In SIGPLAN Conference on Programming Language Design and Implementation (PLDI). ACM, 2021.
- L. Song and S. Lu. Performance diagnosis for inefficient loops. In Proceedings of the 39th International Conference on Software Engineering, ICSE, pages 370–380, 2017.
- L. Song and S. Lu. Performance diagnosis for inefficient loops. In Proceedings of the 39th International Conference on Software Engineering, ICSE ’17, pages 370–380, Buenos Aires, Argentina, 2017.
- Model checking programs. Autom. Software Engineering, 10(2):203–232, 2003.
- J. Yi and E. Ismayilzada. Speeding up constraint-based program repair using a search-based technique. Information and Software Technology, page 106865, 2022.