Guesswork is a logic programming library for Elixir. Its based heavily on Prolog, but I’ve attempted to make it follow more idiomatic Elixir where it makes sense (for instance, queries are resolved into a Stream of possible solutions). Its still rather rough, but should fully support knowledge bases, recursive statements, and all basic logical operations.
The plan moving forward is to add support for constraints and add more optimizations for how queries are resolved.
The best place to read about it are the docs and the gitlab repo:
You’re right, that’s a much better syntax, and its a change I’d like to make. I just haven’t figured out that part of building macros yet (I think I have an issue for that in gitlab, if not I’ll add one).