Abstract
Modern compilers can be useful, not only in detecting programming errors but also by suggesting several repairs and solutions for those errors using error repair techniques. Error repair refers to the process of finding a repair for an error that happens as a result of compiling a piece of code written by computer programmers. However, a repair is not always consistent with the purpose of programmers. This means a compiler suggests a repair which is different from what the programmer wanted to write. Many compilers fail to suggest the correct repair when programming errors occur as a result of misspelling errors. The aim of this paper is to enhance the error repair process in compilers using spelling correction algorithms. A typical compiler does not provide solutions for the most common syntax programming errors which occur as a result of misspelling. Such errors are easy to detect by compilers but difficult to suggest a fix that is the correct form. Therefore, a novel error correction mechanism which is called CoEdit approach is developed to help compilers to suggest the most suitable repair for programming errors occurred as a result of mistyping errors. Four-Way and Editex algorithms are well known spelling correction algorithms are also extended and employed to be compatible to work with programming languages. CoEdit approach employs these algorithms in order to find repairs to misspelling errors. CoEdit is a generic approach to enhance error repair in any compilers for any language because it targets misspelling compiler errors. This paper concludes that using the Editex algorithm with CoEdit is the best choice in the case of finding repairs to programming errors that occur as a result of spelling errors.
Original language | English |
---|---|
Pages (from-to) | 8490-8500 |
Number of pages | 11 |
Journal | Journal of King Saud University - Computer and Information Sciences |
Volume | 34 |
Issue number | 10 |
DOIs | |
State | Published - Nov 2022 |
Keywords
- Compilers
- Edit and compile
- Editex
- Error enhancing
- Error repairs
- Four Way