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

RepoLanguageExecution ModelMaturityPurpose
hyperon-experimentalRust + Python + CInterpreter (reference)OperationalOfficial reference MeTTa implementation (v0.2.10). Deep Python integration via C API. PyPI: pip install hyperon.
PeTTaSWI-PrologProlog WAM compilationOperationalHigh-performance compiler with Smart Dispatch. Execution speed comparable to handwritten Prolog. MORK FFI integration.
metta-wamSWI-Prolog + PythonWarren Abstract MachineOperationalWAM-based MeTTa with bidirectional execution, probabilistic reasoning, REPL, LSP server, and Jupyter kernel.
jettaKotlinJVM bytecode via ASMOperationalJVM compiler with ANTLR parsing, REPL, HTTP server module, and custom Space implementations.
metta-morphChicken SchemeMacro translationOperationalMeTTa-to-Scheme translator achieving 10–200Γ— speedup. Compiles to native binaries via csc.
MeTTaTronRustTree-walk interpreter + Tokio batch asyncExperimental (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-ILScala 3 + HaskellGSLT pipelineExperimentalIntermediate language with BNFC grammar generation and hypercube transformation pass. Two-stage build.
FormalMeTTaScala 3Literal spec implementationExperimentalReference implementation of the preliminary MeTTa specification. Library only β€” no CLI runner.
atomspace-mettaC++ForeignAST bridgeExperimentalProof-of-concept executing MeTTa on classical C++ AtomSpace. Partial β€” match/unification not yet implemented.
metta-lspTypeScriptN/A (tooling)OperationalVS Code LSP extension with Tree-sitter parsing, go-to-definition, hover, completion, rename, formatting.
vspace-mettaMeTTa / Prolog / PythonVersion Space + MeTTaLogOperationalVersion Space Candidate Elimination in MeTTa with FlyBase bio data integration (56M+ atoms). Includes REPL and Jupyter kernel.
MettaWamJamSWI-Prolog / PythonHTTP REST serviceOperationalLightweight web REPL and REST API for MeTTa via PeTTa transpiler. Docker-ready. Optional MORK/FAISS/PyTorch integrations.
metta-testsuiteMeTTa / PythonN/A (test infrastructure)OperationalCross-implementation compatibility test suite with CI, JUnit conversion, and nightly reports. Tests Hyperon, MeTTaLog, MORK, metta-morph.
metta-prebuilt-binaryRustN/A (tooling)OperationalPrebuilt MeTTa binaries plus metta-run CLI with output formatting and install scripts.
metta-catalogJSONN/A (tooling)OperationalOfficial JSON registry of public MeTTa modules for package discovery and resolution.
jupyter-petta-kernelPythonN/A (tooling)OperationalJupyter 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 efee4be MeTTaTron is a tree-walk interpreter with tree-sitter parsing and direct-Rust Rholang integration via the shared f1r3node/models protobuf 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 hyperon and 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.



Discussion