4 ms·
The kinds of analyses mentioned here are typically grouped under "linting"–more advanced static analysis tools will typically do things like dataflow analysis.
by saagarjha 7y ago
The kinds of analyses mentioned here are typically grouped under "linting"–more advanced static analysis tools will typically do things like dataflow analysis.
- g_delgado14 7y agoAny beginner friendly articles on more advanced analysis that you'd recommend?
- kaidon 7y agoMaybe a bit tangential, but still interestin: https://cacm.acm.org/magazines/2010/2/69354-a-few-billion-lines-of-code-later/fulltext https://cacm.acm.org/magazines/2010/2/69354-a-few-billion-li...
- jjtheblunt 7y agohttps://en.wikipedia.org/wiki/Static_single_assignment_form https://en.wikipedia.org/wiki/Static_single_assignment_form
- UncleMeat 7y agoWhile computing phis for SSA does require dataflow analysis, SSA itself is not tremendously useful. The natural follow up to this would be "so what?" Something like live variable analysis is probably a much better first introduction to dataflow analysis since its application is much more obvious. SSA is also not even universal among IRs for static analysis at this point. Heap-SSA is growing in popularity for complex dataflow problems involving fields.
- saagarjha 7y agoDon't have any materials to point to, sadly. Most of the knowledge in this field is locked up in papers and tools; I was lucky to learn most of what I know from a graduate class taught by a professor working on static analysis in V8 and working with/on software security tooling. To begin with, I'd suggest first brushing up on compiler optimizations (which is largely separate from parsing) and that should lead you to dataflow analysis techniques.
- chas 7y agoI think Matt Might's intro is relatively beginner-friendly depending on your familiarity with Scheme: http://matt.might.net/articles/intro-static-analysis/ http://matt.might.net/articles/intro-static-analysis/
- dmos62 7y agoI too would be interested in interesting static code analyses (that are beyond linting).
- saagarjha 7y agoTerms which you might find useful to search for are "dataflow analysis", "abstract interpretation", and "taint checking". A basic background in compiler optimization would generally be helpful.