FlowRepair: Search-based automated program repair of CPS controllers modeled in Simulink-Stateflow
Stateflow models are widely used in the industry to model the high-level control logic of Cyber-Physical Systems (CPSs) in Simulink. Many approaches exist to test Simulink models, but once a fault is detected, the process to repair it remains manual. Such a manual process increases the software development cost. Automated Program Repair (APR) techniques can significantly reduce this cost by automatically generating patches that fix bugs. However, current approaches face scalability issues to be applicable in the CPS context. The goal of this paper is to propose an APR method which is scalable for Stateflow models. We propose an automated search-based approach called FlowRepair , explicitly designed to repair Stateflow models. The novelty of FlowRepair includes, (1) a new algorithm that combines global and local search for patch generation; (2) a definition of novel repair objectives specifically tailored for repairing CPSs; (3) a set of mutation operators to repair Stateflow models automatically; and (4) an evaluation on a new dataset encompassing 19 faulty stateflow models with real bugs. Our results suggest that (1) FlowRepair can fix bugs in stateflow models; (2) FlowRepair surpasses or performs similarly to a baseline APR technique inspired by a well-known CPS program repair approach. This paper presents the first tool for APR CPSs whose high-level control program is developed in Simulink-Staflow. The results show that the approach is effective and scalable to such complex systems.
Authors
- Aitor Arrieta (ORCID: https://orcid.org/0000-0001-7507-5080)
- Shaukat Ali
- Pablo Valle
Institutions
- Mondragon Unibertsitatea (ES)
- Simula Research Laboratory (NO)
Publication Details
- Journal
- Information and Software Technology
- Published
- 2026-01-06
- DOI
- https://doi.org/10.1016/j.infsof.2025.108010
- Primary Topic
- Formal Methods in Verification
- Type
- article
- Field-Weighted Citation Impact
- 0.00