Why doesn't my code work? Instructors for introductory programming courses frequently are asked that question. Often students understand the problem they are trying to solve well enough to specify a variety of input and output scenarios. However, they lack the ability to identify where the bug is occurring in their code. Mastering the use of a full-feature debugger can be difficult at this stage in their computer science education. But simply providing a hint as to where the problem lies may be sufficient to guide the student to add print statements or do a hand-trace focusing on a certain section of the code. Herein we present a software tool which, given a C++ program, some sample inputs, and respective expected outputs, uses graph mining to identify which lines in the program are most likely the source of a bug. The tool includes a visual display of the control flow graph for each test case, allowing the user to step through the statements executed. Experimental results from a group of CS1 students show that practice with this method: (1) makes students faster at finding bugs, (2) improves the way students test a program, and (3) improves program comments by students.
- C++ (programming language),
- Codes (symbols),
- Computer debugging,
- Data flow analysis,
- Data mining,
- Data visualization,
- Education computing,
- Flow graphs,
- Flow visualization,
- Program debugging,
- Software testing,
- Students,
- Visualization,
- Computer Science Education,
- Control flow graphs,
- Graph,
- Graph mining,
- Input and outputs,
- Introductory programming course,
- Most likely,
- Visual display,
- Visual languages,
- Debugging
Available at: http://works.bepress.com/jennifer-leopold/27/