ATR: Template-Based Repair for Alloy Specifications

  • Guolong Zheng University of Nebraska-Lincoln
  • ThanhVu Nguyen George Mason University
  • Simon Gutierrez Brida Universidad Nacional de Rıo Cuarto | CONICET
  • German Regis Universidad Nacional de Rıo Cuarto
  • Nazareno Aguirre Universidad Nacional de Rıo Cuarto |CONICET
  • Marcelo F. Frias Instituto Tecnol´ogico de Buenos Aires | CONICET
  • Hamid Bagheri University of Nebraska-Lincoln

Resumen

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 complex 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. This work was accepted for publication at 31st ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2022) on July 2022.

Publicado
2022-12-15
Cómo citar
Zheng, G., Nguyen, T., Gutierrez Brida, S., Regis, G., Aguirre, N., Frias, M. F., & Bagheri, H. (2022). ATR: Template-Based Repair for Alloy Specifications. Memorias De Las JAIIO, 8(3), 71-71. Recuperado a partir de https://ojs.sadio.org.ar/index.php/JAIIO/article/view/303
Sección
ASSE - Argentine Symposium on Software Engineering