National Natural Science Foundation of China (No.61640221, No.61603242);Shanghai Universities Young Teacher Training Funding Program (No.ZZGCD15088);Research Fund of Zhaoqing University (No.201734);Zhaoqing Science and Technology Innovation Guidance Project (No.201704030409)
Automatic program repair based on code enumeration exploits mutation operators to fix buggy programs by mutating the faulty statements.Its effectiveness is hindered by lack of grammar-directed mutation and limited number of mutation operators.This paper proposes a new automatic program repair method based on version space algebra
which uses inductive learning techniques to automatically produce repair solution for the faulty statement of buggy program.Specifically
the proposed method has the following features:(1) automatic derivation of version spaces from grammars
(2) defining consistency of version space according to its type
and (3) combining static and type checking with version space algebra.Experimental results show the proposed method outperforms other existing automatic program repair approaches in terms of repair success rate
and static and type-checking mechanism can prune the hypothesis space efficiently.