When fed a semantic patch and a C file, Coccinelle parses the semantic patch to create an AST, and parses the C file to create an AST as well. During my work on Coccinelle, I implemented a performance boosting algorithm to speed up recursive parsing of header files in the Linux Kernel. While parsing a header file, create a dependency graph to figure out what header file is reachable from which C file.