Electronic Design

Don't Worry About The Bugs—These Tools Know What You Meant

Debugging your software doesn't have to be such a chore. Led by computer science professor Yuanyuan Zhou, a team of researchers at the University of Illinois at Urbana-Champaign have developed a tool suite that takes a new approach to the job. Based on observations of how programmers write code, these tools focus on the programmer's intentions to find and correct bugs.

"Most bug-detection tools require reproduction of bugs during execution," said Zhou. "The program is slowed down significantly and monitored by these tools, which watch for certain types of abnormal behavior. Most of our tools, however, work by only examining the source code for defects, requiring little effort from programmers."

For example, copy-pasted code can save programmers a lot of effort, but it also can introduce a lot of bugs. The team's copy-paste tool, CP-Miner, uses data-mining techniques to find copypasted code in the program. It then examines and corrects that code for consistent modifications.

The team has used CP-Miner to discover a host of bugs in some of the latest versions of open-source software in the IT field. Using the tool, the team can scan 3 million to 4 million lines of code for copy-paste and related bugs in less than 30 minutes. Since these programs often are based on implicit rules and assumptions, the team developed the PR-Miner tool to detect when those rules have been broken.

PR-Miner also is based on data-mining techniques, requiring only a few minutes to scan 4 million lines of code. "First, we mine the source code for patterns, repetitions, and correlations that point to implicit programming rules and assumptions," Zhou said. "Then we check that those rules and assumptions have not been violated."

The team didn't stop at finding and fixing bugs, though. With its Rx tool, software can survive in spite of its bugs. "If you are allergic to cats, you try to avoid cats," Zhou said. "In much the same way, Rx is avoidance therapy for software failure. If the software fails, Rx rolls the program back to a recent checkpoint and re-executes the program in a modified environment."

A fourth tool, Triage, diagnoses software failures at the end-user site. It follows a human-like diagnosis protocol to rapidly identify the nature of the problem and provide valuable input to help programmers quickly understand the failure and fix the bug.

"If something bad happens or the software crashes, Triage's diagnosis protocol will start automatically and quickly suggest a temporary fix until programmers can release a fixing patch," Zhou said.

All of the tools are scalable. They can be tailored for specific software platforms, including programs running on parallel processors. The team's work was funded by the National Science Foundation and Intel Corp.

See Associated Figure

TAGS: Intel
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish