This paper reduces the complexity of the checking system
by addressing a fundamental assumption, the assumption
that checkers must depend on a full-blown language
specification and compiler front end. Instead, our program
checkers are based on drastically incomplete language grammars
(“micro-grammars”) that describe only portions of a
language relevant to a checker. As a result, our implementation
is tiny—roughly 2500 lines of code, about two orders of
magnitude smaller than a typical system. We hope that this
dramatic increase in simplicity will allow developers to use
more checkers on more systems in more languages.
We implement our approach in µchex, a language-agnostic
framework for writing static bug checkers. We use it to build
micro-grammar based checkers for six languages (C, the C
700 errors in real-world projects.