ATR: template-based repair for Alloy specifications
Guolong Zheng, ThanhVu Nguyen, Simón Gutiérrez Brida, Germán Regis, Nazareno Aguirre, Marcelo F. Frias, Hamid Bagheri
Abstract
Automatic Program Repair (APR) is a practical research topic that studies techniques to automatically repair programs to fix bugs. Most existing APR techniques are designed for imperative programming languages, such as C and Java, and rely on analyzing correct and incorrect executions of programs to identify and repair suspicious statements. We introduce a new APR approach for software specifications written in the Alloy declarative language, where specifications are not "executed", but rather converted into logical formulas and analyzed using backend constraint solvers, to find specification instances and counterexamples to assertions. We present ATR, a technique that takes as input an Alloy specification with some violated assertion and returns a repaired specification that satisfies the assertion. The key ideas are (i) analyzing the differences between counterexamples that do not satisfy the assertion and instances that do satisfy the assertion to guide the repair and (ii) generating repair candidates from specific templates and pruning the space of repair candidates using the counterexamples and satisfying instances. Experimental results using existing large Alloy benchmarks show that ATR is effective in generating difficult repairs. ATR repairs 66.3% of 1974 fault specifications, including specification repairs that cannot be handled by existing Alloy repair techniques. ATR and all benchmarks are open-source and available in the following Github repository: https://github.com/guolong-zheng/atmprep . CCS CONCEPTS • Software and its engineering → Software defect analysis; Error handling and recovery.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2d28f09e-cf95-4bd2-bd3c-d55a80e0f323Cited by top-tier papers1
Ask how each one uses itBuilds on5
- DLFix: context-based code transformation learning for automated program repairYi Li, Shaohua Wang, Tien N. NguyenICSE 2020 · 201 citations
- Scalable analysis of interaction threats in IoT systemsMohannad Alhanahnah, Clay Stevens, Hamid BagheriISSTA 2020 · 63 citations
- FLACK: Counterexample-Guided Fault Localization for Alloy ModelsGuolong Zheng, ThanhVu Nguyen, Simón Gutiérrez Brida, Germán Regis et al.ICSE 2021 · 18 citations
- Reducing run-time adaptation space via analysis of possible utility boundsClay Stevens, Hamid BagheriICSE 2020 · 14 citations
- Bounded Exhaustive Search of Alloy Specification RepairsSimón Gutiérrez Brida, Germán Regis, Guolong Zheng, Hamid Bagheri et al.ICSE 2021 · 6 citations
Related papers
- ICEBAR: Feedback-Driven Iterative Repair of Alloy SpecificationsSimón Gutiérrez Brida, Germán Regis, Guolong Zheng, Hamid Bagheri et al.ASE 2022 · 13 citations
- Exploring Experiences with Automated Program Repair in PracticeFairuz Nawer Meem, Justin Smith, Brittany JohnsonICSE 2024 · 14 citations
- Less Is More: Adaptive Program Repair with Bug Localization and Preference LearningZhenlong Dai, Bingrui Chen, Zhuoluo Zhao, Xiu Tang et al.AAAI 2025
- AlloyMax: bringing maximum satisfaction to relational specificationsChangjian Zhang, Ryan Wagner, Pedro Orvalho, David Garlan et al.FSE 2021 · 10 citations
- RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program RepairWeishi Wang, Yue Wang, Shafiq Joty, Steven C. H. HoiFSE 2023 · 84 citations
