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

Aug. 3, 2006
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 o

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

Sponsored Recommendations

TTI Transportation Resource Center

April 8, 2024
From sensors to vehicle electrification, from design to production, on-board and off-board a TTI Transportation Specialist will help you keep moving into the future. TTI has...

Bourns: Automotive-Grade Components for the Rough Road Ahead

April 8, 2024
The electronics needed for transportation today is getting increasingly more demanding and sophisticated, requiring not only high quality components but those that interface well...

TTI Rail Transit Line Card

April 8, 2024
TTI stocks premier interconnect, passive and electromechanical components for rail systems as diverse as door control, HVAC and cabin entertainment, trackside safety, communications...

Littelfuse: Take Charge for Peak Performance in Material Handling Evs

April 8, 2024
As material handling electric vehicles such as automated guided vehicles (AGVs), autonomous mobile robots (AMRs) and forklifts become an integral part of Industry 4.0, Littelfuse...

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!