Skip to content

Releases: trueagi-io/PeTTa

PeTTa v1.0

02 Mar 01:24
ebdb511

Choose a tag to compare

PeTTa v1.0 is released!

This marks the transition from experimental to production-ready MeTTa execution. PeTTa is a MeTTa-to-Prolog transpiler that translates MeTTa programs into efficient Prolog predicates. It directly embeds MeTTa logic in SWI-Prolog, preserving Prolog’s execution speed and optimizations while maintaining full MeTTa semantics.

In practice, PeTTa is used for real-time neuro-symbolic reasoning and robotics, integrating with PyTorch, LLMs, FAISS vectors and the MORK atom space. Benchmarks show PeTTa running MeTTa code hundreds of times faster than the Rust-based Hyperon Experimantal interpreter, making it ready for time-critical and large-scale Hyperon workloads.

Highlights:

  • Smart Dispatch Compiler: PeTTa’s compiler now resolves function calls vs data at compile time, eliminating runtime dispatch overhead. It emits direct Prolog calls whenever possible (so S-expressions become native predicates).

  • Two-Stage Compilation: The compiler performs a registration pass (gathering function names/arities) followed by full translation. This lets MeTTa definitions be in any order, improving modularity and convenience.

  • Function Specialization: Higher-order MeTTa functions are automatically specialized when given concrete function arguments. This partial evaluation at compile time avoids repeated dynamic dispatch, so higher-order calls run at Prolog speed.

  • Modular Library System: PeTTa v1.0 adds a library system for reusable MeTTa modules. You can now organize code into importable libraries for cleaner, maintainable MeTTa projects.

  • MORK & MM2 Integration: PeTTa-generated Prolog predicates interoperate seamlessly with Hyperon’s MORK atom-space and MM2 execution environment. This means MeTTa rules can query/update symbolic knowledge in MORK (the high-performance metagraph DB) with no glue code.

  • FAISS Vector-Atom Spaces: PeTTa now supports FAISS-based atomspaces for vector similarity search. Large-scale embedding spaces can be queried from MeTTa, enabling hybrid neural-symbolic reasoning (e.g. semantic search or neural-symbolic inference).

  • Neural–Symbolic AI Ready: Through built-in hooks for PyTorch tensors, OpenAI LLM/VLM APIs, FAISS, etc., PeTTa makes it easy to mix neural computation with symbolic logic. For example, PeTTa code can call a trained PyTorch model or run a FAISS nearest-neighbors query within a MeTTa rule, bridging the neural and symbolic worlds.

These features make PeTTa v1.0 a solid backend for production Hyperon applications. For the first time, compute-intensive components of Hyperon (like PLN inference, pattern mining, long-running reasoning) can run efficiently in real-time or at scale. Applications like mobile robotics and real-time reasoning now use PeTTa for MeTTa rule execution, benefiting from Prolog’s speed.