I’m starting to work again on rocks_preds.pl
, starting with multi-argument indexing. There doesn’t seem to be much detailed documentation on how SWI-Prolog does just-in-time indexing, so I started to read the code in pl-index.c
, intending to learn from that and duplicate some of the logic in Prolog code (in rocks_preds.pl
).
It occurs to me that a more general solution might be to extend the builtin assertz/1 to use multiple “backends”, one of which would use RocksDB. This would allow transparently extending existing programs to “unlimited” size clause databases(*). Does this make sense? If not, I’d still want to reverse-engineer the existing “JITI” code, to see what can be used by rocks_preds
. Also, are there any test cases for indexing, so that I can ensure that indexing is being done correctly? (e.g., is there a way to make vm_list/1 show the “trust me” and similar 1st-argument indexing, or more details about the JIT indexing?)
(*) Although it shouldn’t be difficult to take existing code and modify it (and/or define term/goal expansion) to use the rocks_pred
interface.