A few years ago as part of my MS program, I used Protobufs and Datalog to try to write program analyses over Java source code. I ended up implementing a simple alias analysis using this framework, and then drafting a paper--essentially a tutorial--about the design of analyses in this style; alias analysis was my detailed example.
https://github.com/dwtj/deductive-points-to-analysis-paper/b...