News for hackers. Stuff that matters.
Re:John Carmack on the importance of Static Code Analysis by softbuilder on Saturday December 24, 2011 @03:09AM (#3388500)
> Look for it to be much, much better in a decade or so.

Why is that? Are there big unsolved problems or is it more of a grinding away at little things?

Re:John Carmack on the importance of Static Code Analysis by Daishiman on Saturday December 24, 2011 @04:04AM (#3388590)
Static code analysis is extremely difficult. You have to have a notion of what an "error" is, and the complexity of interaction between different pieces of a codebase grows exponentially, making feasible analysis of big projects very difficult without throwing in heuristics to simplify the analysis at a cost of loss of precision.
Re:John Carmack on the importance of Static Code Analysis by Fahrenheit2539 on Saturday December 24, 2011 @05:44AM (#3388692)
The problem here is if hardware and algorithms for static analysis are improving at linear pace, applications are growing at least exponentially (if we add-in 3rd party libraries).
Re:John Carmack on the importance of Static Code Analysis by barkmadley on Saturday December 24, 2011 @08:56AM (#3388886)
There are some algorithms and techniques that will improve static analysis in a greater than linear fashion (however, I wouldn't guarantee exponentially).

see Model Verification: http://en.wikipedia.org/wiki/Kripke_structure_(model_checkin... and SMT solving: http://en.wikipedia.org/wiki/SMT_solver

Re:John Carmack on the importance of Static Code Analysis by emu on Sunday December 25, 2011 @01:47PM (#3391380)
Well, unfortunately most interesting static analysis problems are undecidable. There can be no "general" solution.

What we have in practice are approximations and heuristics; over time we will develop better approximations for the kinds of code people write in practice. Unfortunately fragility of analysis will always be a problem; if you change your code just a little bit then reasoning may fail.

As someone who has spent years doing research on shape analysis my personal belief is that the dream of a fully automated "find my bugs" static analysis is unrealistic. Some of the problems you must solve to analyze the heap, say, are very hard indeed.

We need to think more about the interactions between language design and verification, rather than hoping that people will build better tools to analyze existing code. Strong typing (e.g., the Hindley-Milner type system) is one example of a sweet spot that demonstrates how language design (type annotation, type declarations) interacts with tools (type inference, type checking). Type systems are some of the most widely used bug finding tools today. Trying to build verification tools without considering language design is always going to be difficult.