Hi!
I’d like to introduce PeTTa ( GitHub - trueagi-io/PeTTa: Efficient MeTTa language implementation in Prolog. ), a MeTTa-to-Prolog transpiler I originally designed last year, and which reached maturity this January in collaboration with Peter Isaev and the talented team at SingularityNET.
PeTTa directly translates MeTTa ( https://metta-lang.dev/ ) functions into Prolog clauses and enables efficient execution of MeTTa code, preserving the strong performance characteristics of SWI-Prolog in the translation, and allowing overhead-free bi-directional interop with Prolog code.
This demonstrates that a logic programming language can easily host a fully featured, and even extended, functional language while preserving logic programming capabilities and high performance. By contrast, embedding logic programming into a functional language has historically produced slow, toy-like systems (such as Kanren variants), often with weak integration into the host language. Crucially, functional runtimes lack the deep execution, indexing, and search optimizations needed for efficient logic programming, and reproducing them would be an immense undertaking. (Thank you @jan and others for your decades of work on SWI-Prolog, it is king!)
Also, PeTTa is now actively used by Peter and me at Life-like AI (https://life-like.ai) for real-time neuro-symbolic integration and empirical reasoning, including mobile robotics applications that leverage our NARS-based reasoning technology. Working with deep neural networks and symbolic mechanisms using the same language, and elegantly, has never been easier, integrating PyTorch, OpenAI LLM/VLM API, vector databases (FAISS), and scalable symbolic atom spaces (MORK) in addition to the great predicate store of Swipl itself. Have fun with PeTTa, and please check out the examples: PeTTa/examples at main · trueagi-io/PeTTa · GitHub
Best regards,
Patrick Hammer
