Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 2.62 KB

README.md

File metadata and controls

77 lines (45 loc) · 2.62 KB

PeTTa

Efficient MeTTa language implementation in Prolog.

Please check out the Wiki for more information.

Dependencies

  • SWI-Prolog >= 9.3.x
  • Python 3.x (for janus Python interop)

Usage

Example run:

time sh run.sh ./examples/nars_tuffy.metta

MORK and FAISS spaces

If MORK and FAISS is installed, execute sh build.sh to support MORK-based atom spaces and FAISS-based atom-vector spaces.

The following projects are cloned and built by build.sh:

Repository: mork_ffi dependent on trueagi-io/mork

Repository: faiss_ffi dependent on facebookresearch/faiss

Extension libraries

Please check out Extension libraries for a set of extension libraries that can be invoked from MeTTa files directly from the git repository.

Git imports retain the legacy URL-only, URL/build-command, and URL/build-command/base-directory forms. For a reproducible detached checkout, pass a fourth input in the order URL, build command, base directory, commit:

!(git-import! "https://example/repo.git" "" "./repos" "0123456789abcdef0123456789abcdef01234567")

Pinned imports accept only a full 40-character hexadecimal commit SHA; abbreviated SHAs, branches, and tags are rejected.

Notebooks, Servers, Browser

Jupyter Notebook Support

A Jupyter kernel for PeTTa is available in a separate repository for interactive MeTTa development in notebooks.

Repository: trueagi-io/jupyter-petta-kernel

Quick install:

# Set PETTA_PATH to this PeTTa installation
export PETTA_PATH=/path/to/PeTTa

# Clone and install the kernel
git clone https://github.com/trueagi-io/jupyter-petta-kernel.git
cd jupyter-petta-kernel
./install.sh

Please see the jupyter-petta-kernel README for detailed installation instructions and usage.

MeTTa server

A HTTP server running MeTTa code is also available:

Repository: MettaWamJam

Please see the MettaWamJam README for detailed installation instructions and usage.

MeTTa in WASM

Since Swi-Prolog can be compiled to Web Assembly, one can embed PeTTa into websites.

Please see Execution-in-browser for more information.