Redundancies imply Errors

[Jeff Darcy] has some great links today to the research of Dawson Engler. Engler has developed meta-compiler tools which locate bugs in real software.

Jeff linked to Engler's new research paper Using Redundancies to Find Errors which I found fascinating. Engler found a high correlation between redundancies in code (such as assigning a value to a variable but never using it again, assigning a value to a variable twice, and dead code which is never executed) and errors, including crashing the system (his data is mostly from the Linux kernel). Engler suspects that redundancies usually imply an inexperienced programmer who isn't sure of what they're doing.

This ties into the PMD static code analysis tool I've been playing with lately. I don't think much of what Engler is doing is possible with static code analysis, but some of it ought to be. Maybe I'll take a crack at implementing some of his rules in PMD. God knows that Ancept's code could use it.