Skip to content
Douglas R. Miles edited this page Oct 1, 2024 · 3 revisions

Developer Guide

This page is intended for developers who are contributing to or extending the MeTTa project. It provides an overview of the project structure, key directories, and files to help you navigate and understand the codebase.

Here’s a summary of the main directories and files in the MeTTa project:

Key Directories

  • docs/: Contains documentation, including guides, specifications, and architecture overviews.
  • library/: Likely contains additional libraries or shared resources used throughout the project.
  • notebooks/: Jupyter notebooks or similar files for experimenting with code, running tutorials, or exploring data.
  • reports/: Directory for reports or analysis related to the project.
  • scripts/: Collection of utility scripts for various tasks like automation, deployment, or maintenance.
  • src/canary: Main source code for the MeTTa project, including Prolog scripts, logic definitions, and core components.
  • src/mettalog/: Python Support files and configurations specific to the MeTTa language or logic system.
  • swipl-devel/: Specific development files related to SWI-Prolog, possibly for advanced or custom configurations.
  • tests/: Test cases and frameworks used to validate the code, including unit tests, integration tests, and regression tests.
  • coverage Spreadsheet listing MeTTa Functions Across Source Files

Root Directory


Setting Up the Development Environment

To set up the project for development, follow these steps:

  1. Clone the Repository:

    git clone https://github.com/trueagi-io/metta-wam.git
    cd metta-wam
  2. Run the Installation Script: Execute the INSTALL.sh script to install dependencies:

    ./INSTALL.sh
  3. Set Up Docker (Optional): If you prefer using Docker, build and run the container:

    docker build -t metta-wam .
    docker run -it metta-wam
  4. Activate the Python Environment: If using Python, install dependencies:

    pip install -r requirements.txt
  5. Run the REPL or Execute Scripts: You can now explore the project’s functionality by running the REPL or other scripts in the src/ directory.


Key Development Areas

  • Core Logic and Reasoning: Explore the core implementation in the src/ directory, including logic rules, ontologies, and evaluation mechanisms.
  • Extending the Language: Use the library/ and mettalog/ directories to extend the language with new libraries or logic.
  • Testing and Validation: Use the tests/ directory to add and run test cases to ensure your changes are stable.