Under construction

The goal of the Bug Explainer is to provide a case-based help service for novice programmers encountering bugs in their code when learning a new language. Novices don't know what's going wrong, and they often describe their problems in vague or invalid terms, e.g., "member doesn't work!" Hence their attempts to find answers via Google or FAQ searches often fail to find relevant answers.

To get around the ambiguity problem,

Bug Explainer Front End

The input interface is where a user specifies a problem. The interface should not require any expert knowledge from the user. A report would be something like this:

SummaryA short text summary of bug. Not useful for the computer.
InputSample code that produces the bug
Expectedthe result(s) the user expected to see
Actualthe result(s) the user actually saw
Notesthe user's explanation about what they think happened
Operating Systemthe operating system the user is on
Languagethe language, including implementation version the user has

This format requires the user to be clear about what they tried and what they saw. This is more critical for helping than what they think happened.

Here are two example bug reports, with just the code parts

Example Bug Report #1
Input(LET ((L '(A B C))) (DELETE 'A L) L)
Expected(B C)
Actual(A B C)
Example Bug Report #2
Input(DELETE '(B) '((A) (B) (C))
Expected((A) (C))
Actual((A) (B) (C))

Bug Explainer Analyzer

The analyzer in a case-based system needs to look at the input case, i.e., a bug report, and extract key features that might explain the bug. The clues to common bugs can be subtle. What users say is often not helpful. For example, novices may report that DELETE doesn't work. Sometimes their example involves deleting the first element of a list. Sometimes the problem is trying to delete an object that is a list.

One way to analyze their code for clues is pattern matching. The matcher used in the Lisp Critic is a good fit, since it's been tested on matching many Lisp code constructs.

A pattern that recognizes the "deleting first element" situation is:

Input(?CONTAINS (DELETE ?*))
Expected((?* X))
Actual((? Y) (?* X))
Explanation Although DELETE can return a list without the first element, the structure of Lisp lists make it impossible to destructively remove the first element of a list. For more, see http://www.cs.cmu.edu/Groups/AI/html/faqs/lang/lisp/part3/faq-doc-4.html
Note the use of variables across several fields.

Bug Report #1 is an example of a report that this pattern should match.

Bug Report #2 is an example of a report of a bug due to a different misunderstanding of DELETE. What pattern would work here?

Faculty: Chris Riesbeck
Time: MWF: 11:00am-11:50am
Location: Tech LR 5

Contents

Important Links