PeTTa is a high-performance compiler and runtime for the MeTTa language, designed to execute complex symbolic AI code at speeds required for real-time applications like robotics and large-scale reasoning. It achieves this by translating MeTTa source code directly into highly optimized Prolog.

Its core innovation is a “Smart Dispatch” compiler, which intelligently solves the key challenge of deciding whether a piece of MeTTa code is a function to be executed or a piece of data to be structured. By eliminating the slow, “check-at-runtime” (dynamic dispatch) methods used by typical interpreters, PeTTa generates code that achieves execution speeds comparable to handwritten, idiomatic Prolog.

Crucially, it fully adheres to the Hyperon-Experimental (HE) semantics, ensuring it is a correct and compatible implementation while providing a massive performance boost. It is also fully interoperable with high-performance backends, capable of manipulating MORK spaces and executing MM2 expressions directly from MeTTa code.

This makes PeTTa an essential component for running computationally intensive symbolic architectures—like MeTTa-NARS and PLN—in production, bridging the gap from research-grade interpretation to real-world, high-speed deployment.

Repositories

Documentation

Continue Reading