I implemented a Datalog engine in Java a while back. Looking back on it now there are a bunch of things I might have done differently, but I've never tried to implement anything like it before.
I remember that doing the stratified negation was quite complex and I won't be able to explain it of the top of my head anymore.
I may actually have a use for this. Thanks for releasing it!
BTW the use of functional maps, such as those in [0], might have advantages over things like StackMap. Of course it would require some restructuring of the code.
In retrospect I think there might be several ways to improve performance by using other data structures to index the facts, but I haven't had the time to work on it lately. There is a pull request from someone that I'm still looking at, which might just spur me on to think about it some more.
I implemented a Datalog engine in Java a while back. Looking back on it now there are a bunch of things I might have done differently, but I've never tried to implement anything like it before.
I remember that doing the stratified negation was quite complex and I won't be able to explain it of the top of my head anymore.
Anyway, here's my version: https://github.com/wernsey/Jatalog