MeTTa Implementations
Draft — This content has not been approved for publication.
Scope
Repositories that implement the MeTTa language (compilers, interpreters, formal specifications), MeTTa developer tooling, and MeTTa execution services. For the language design and formal semantics, see MeTTa Programming Language Full.
Active Repositories
| Repo | Language | Execution Model | Maturity | Purpose |
|---|---|---|---|---|
| hyperon-experimental | Rust + Python + C | Interpreter (reference) | Operational | Official reference MeTTa implementation (v0.2.10). Deep Python integration via C API. PyPI: pip install hyperon. |
| PeTTa | SWI-Prolog | Prolog WAM compilation | Operational | High-performance compiler with Smart Dispatch. Execution speed comparable to handwritten Prolog. MORK FFI integration. |
| metta-wam | SWI-Prolog + Python | Warren Abstract Machine | Operational | WAM-based MeTTa with bidirectional execution, probabilistic reasoning, REPL, LSP server, and Jupyter kernel. |
| jetta | Kotlin | JVM bytecode via ASM | Operational | JVM compiler with ANTLR parsing, REPL, HTTP server module, and custom Space implementations. |
| metta-morph | Chicken Scheme | Macro translation | Operational | MeTTa-to-Scheme translator achieving 10β200Γ speedup. Compiles to native binaries via csc. |
| MeTTaTron | Rust | Tree-walk interpreter + Tokio batch async | Experimental (main stagnant, branches active) | F1R3FLY-native runtime targeting Rholang via direct Rust linking. Tree-sitter parser; iterative trampoline evaluator; HashMap for multiset set-ops, MORK/PathMap for rule storage and pattern-match queries. At HEAD efee4be (2026-01-19) the compile function is parse-to-state, not code generation β compilation work lives on unmerged feature branches. Rule matching filters to most-specific rules (divergent from hyperon-experimental v0.2.10 catchall semantics). Requires nightly Rust and sibling MORK/PathMap/f1r3node checkouts. See MeTTa runtime cluster pilot Source 3, closed 2026-05-13. |
| MeTTa-IL | Scala 3 + Haskell | GSLT pipeline | Experimental | Intermediate language with BNFC grammar generation and hypercube transformation pass. Two-stage build. |
| FormalMeTTa | Scala 3 | Literal spec implementation | Experimental | Reference implementation of the preliminary MeTTa specification. Library only β no CLI runner. |
| atomspace-metta | C++ | ForeignAST bridge | Experimental | Proof-of-concept executing MeTTa on classical C++ AtomSpace. Partial β match/unification not yet implemented. |
| metta-lsp | TypeScript | N/A (tooling) | Operational | VS Code LSP extension with Tree-sitter parsing, go-to-definition, hover, completion, rename, formatting. |
| vspace-metta | MeTTa / Prolog / Python | Version Space + MeTTaLog | Operational | Version Space Candidate Elimination in MeTTa with FlyBase bio data integration (56M+ atoms). Includes REPL and Jupyter kernel. |
| MettaWamJam | SWI-Prolog / Python | HTTP REST service | Operational | Lightweight web REPL and REST API for MeTTa via PeTTa transpiler. Docker-ready. Optional MORK/FAISS/PyTorch integrations. |
| metta-testsuite | MeTTa / Python | N/A (test infrastructure) | Operational | Cross-implementation compatibility test suite with CI, JUnit conversion, and nightly reports. Tests Hyperon, MeTTaLog, MORK, metta-morph. |
| metta-prebuilt-binary | Rust | N/A (tooling) | Operational | Prebuilt MeTTa binaries plus metta-run CLI with output formatting and install scripts. |
| metta-catalog | JSON | N/A (tooling) | Operational | Official JSON registry of public MeTTa modules for package discovery and resolution. |
| jupyter-petta-kernel | Python | N/A (tooling) | Operational | Jupyter kernel for executing MeTTa code via PeTTa in notebook environments. |
How They Fit Together
The implementations form a convergent family β multiple execution strategies targeting the same language semantics:
- hyperon-experimental is the reference interpreter: prioritizes correctness and Python interop. All other implementations target semantic compatibility with it.
- PeTTa is the performance path for symbolic workloads: Prolog's native backtracking and unification give it speed advantages for logic-heavy tasks. Connects to MORK via mork_ffi.
- metta-wam shares the Prolog substrate with PeTTa but emphasizes bidirectional execution and probabilistic reasoning.
- jetta brings MeTTa to the JVM ecosystem: useful for Android, Java-heavy organizations, and JVM multithreading.
- metta-morph is the native compilation path: AWK preprocessing β Python autoquoting β Chicken Scheme β optional C compilation. Best for batch computation where startup cost is amortized.
- MeTTaTron + MeTTa-IL are the ASI Chain path: MeTTa β MeTTa-IL (GSLT) β Rholang β F1R3FLY. Not yet production-ready. At HEAD
efee4beMeTTaTron is a tree-walk interpreter with tree-sitter parsing and direct-Rust Rholang integration via the sharedf1r3node/modelsprotobuf types; the "compiler" framing in the repo name applies to the unmerged feature-branch roadmap (WAM backend, JIT, bytecode-VM), not to main. Notable runtime divergence from hyperon-experimental: rule matching filters to most-specific rules (suppressing catchalls), where v0.2.10 returns both. Multiset set operations (union-atom,intersection-atom,subtraction-atom,unique-atom) moved from PathMap to HashMap in 2025-12-29 with empirical 3.5β5.3Γ speedup; PathMap retained for rule/atom storage and MORK pattern-match queries. - FormalMeTTa is a specification artifact, not a production runtime β useful for verifying language semantics.
- atomspace-metta is a bridge experiment β the only path from MeTTa to the classical C++ AtomSpace. Currently partial.
- vspace-metta is a MeTTaLog application layer β Version Space learning with FlyBase bio data, demonstrating large-scale (56M+ atoms) MeTTa execution.
- MettaWamJam is a deployment surface β a Docker-ready REST API exposing PeTTa execution over HTTP, useful for web integration and agent access.
Quick Start
Fastest path to running MeTTa code:
# Option 1: Python (reference implementation)
pip install hyperon
python -c "from hyperon import MeTTa; m = MeTTa(); print(m.run('!(+ 1 2)'))"
# Option 2: PeTTa (high-performance, requires SWI-Prolog 9.3.9+)
cd PeTTa && sh run.sh ./examples/fib.metta
# Option 3: MeTTaLog (WAM-based, requires SWI-Prolog with Janus)
source ./INSTALL.sh --allow-system-modifications
mettalog --repl
# Option 4: JeTTa (JVM, requires JDK 17+)
cd jetta && ./gradlew build && ./gradlew run
# Option 5: MeTTa-Morph (native compilation, requires Chicken Scheme)
cd metta-morph && sh run_scheme.sh examples/fib.metta
Current State vs. Whitepaper
- MeTTa-4 semantic model (whitepaper Β§3): Under development. No implementation has finalized MeTTa-4 semantics yet β hyperon-experimental and PeTTa are the closest.
- MeTTa-IL compilation pipeline: MeTTaIL exists but is experimental. The full MeTTa β MeTTa-IL β MORK/Rholang routing described in the whitepaper is not yet operational end-to-end.
- PyMeTTa transpilation: Proposed in the whitepaper but no implementation exists yet.
- Cross-implementation convergence: The metta-testsuite repo provides shared test cases, but behavioral differences between implementations remain.
Forks and Mirrors
Most repos target distinct execution strategies rather than forking a single codebase. Known mirrors and variant relationships:
- PeTTa / metta-wam: Both use SWI-Prolog but with different compilation strategies (Smart Dispatch vs. WAM bidirectional execution).
- metta-morph: A local mirror tracks a ngeiswei fork of the canonical trueagi-io/metta-morph.
- metta-wam: Local mirrors track additional contributor forks of trueagi-io/metta-wam (patham9, ngeiswei).
- vspace-metta: Fork of logicmoo/vspace-metta, locally tracking patham9's variant.
Recommended Entry Points
- New to MeTTa: Start with
pip install hyperonand the metta-examples repo. - Performance-sensitive workloads: Use PeTTa with MORK FFI.
- JVM ecosystem: Use jetta.
- Language semantics research: Read FormalMeTTa's Scala source alongside the MeTTa Specification.
- VS Code development: Install metta-lsp extension.
Gaps and Consolidation Opportunities
- No unified test suite enforcement: metta-testsuite exists but implementations don't run it in CI consistently.
- atomspace-metta is incomplete: The C++ AtomSpace bridge lacks match/unification β the core operations needed for real MeTTa execution.
- PyMeTTa doesn't exist yet: The Python transpilation layer described in the whitepaper has no implementation.
- Windows support varies: hyperon-experimental has limited Windows Python packages; MeTTaTron explicitly doesn't support Windows; metta-wam has a separate INSTALL.bat.
Tags
Discussion