Prolog interpreter is unlikely to be able to meet your performance needs although it would be a great ui. Search datalog and bdd and you should be able to find some good research and tools using bdd to support source code analysis related queries.
I thought about using datomic for this before. I've seen a Java based bdd data log tool for pointer analysis. Though it was hard to play with Iirc. I think it would be slow but good for prototypes.