ETD PDF

Techniques for Enhancing Compiler Error Messages

Citation

Algaraibeh, Sanaa. (2023-05). Techniques for Enhancing Compiler Error Messages. Theses and Dissertations Collection, University of Idaho Library Digital Collections. https://www.lib.uidaho.edu/digital/etd/items/algaraibeh_idaho_0089e_12533.html

Title:
Techniques for Enhancing Compiler Error Messages
Author:
Algaraibeh, Sanaa
Date:
2023-05
Keywords:
3-phase parsing technique Compiler error messages Novice programmers Preprocessors Software and its engineering Syntax errors
Program:
Computer Science
Subject Category:
Computer science
Abstract:

Bottom-up parsing technology advanced and efficiently automated static analysis of source code but raised the challenge of maintaining understandable communication between compilers and humans. Reporting errors in the source code in a human-understandable language is essential for the efficiency of the software development process, especially for students learning programming. This research improves compiler error messages for students in introductory programming courses at the college level. This study of compiler error messages is written from the compiler writer's perspective. Analysis of hundreds of erroneous programs in different parsing states led to designing 3-phase parsing techniques that overcome some of the limitations of LR parsers in reporting friendly error messages. 3-phase parsing prioritizes the parsing of the large code components over diving into all the details. The first phase parses the functional structures and ignores errors in the syntax of the smaller constructions. The second phase parses the control structures and ignores errors in the expressions and other statements. The third phase parses the expressions and statements excluded from phase two. The design gives more control over when and from which grammar rules to report errors first. The design minimizes the number of states in the parser automaton since each phase parses a subset of the language grammar.

We evaluated the new design with a human-subject control experiment. The experiment compares the quality of syntax error messages of an educationally customized compiler EduCC with error messages produced by GNU GCC and Microsoft Visual C++. EduCC implements the 3-phase parsing techniques for a subset of C++ language. The participants were 53 Computer Science and Engineering students at the New Mexico Institute of Mining and Technology. In a within-group experiment design, the participants had to find errors and fix erroneous C++ programs. The experiment shows that 3-phase parsing techniques improved the quality of syntax error messages.

Description:
doctoral, Ph.D., Computer Science -- University of Idaho - College of Graduate Studies, 2023-05
Major Professor:
Soule, Terence; Jeffery, Clinton L.
Committee:
Alves-Foss, Jim; Dousay, Tonia
Defense Date:
2023-05
Identifier:
Algaraibeh_idaho_0089E_12533
Type:
Text
Format Original:
PDF
Format:
application/pdf

Contact us about this record

Rights
Rights:
In Copyright - Educational Use Permitted. For more information, please contact University of Idaho Library Special Collections and Archives Department at libspec@uidaho.edu.
Standardized Rights:
http://rightsstatements.org/vocab/InC-EDU/1.0/