|
| 1 | +# MeTTa Language — Prolog Implementation Files |
| 2 | + |
| 3 | +This directory contains the main Prolog and Python components of the MeTTa-WAM system — an implementation of the MeTTa language using Prolog. |
| 4 | + |
| 5 | +## 📂 Directory Structure |
| 6 | + |
| 7 | +| File / Module | Description | |
| 8 | +|---------------|-------------| |
| 9 | +| [`corelib.metta`](corelib.metta) | Core standard library definitions in MeTTa syntax. | |
| 10 | +| [`init.default.metta`](init.default.metta) | Default initial MeTTa context; loaded at REPL or runtime. | |
| 11 | +| [`repl.default.metta`](repl.default.metta) | REPL-specific startup MeTTa code. | |
| 12 | +| [`stdlib_mettalog.metta`](stdlib_mettalog.metta) | Standard library atoms and logic for MeTTaLog. | |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +## 🧠 Compiler Files |
| 17 | + |
| 18 | +| File | Description | |
| 19 | +|------|-------------| |
| 20 | +| [`metta_compiler.pl`](metta_compiler.pl) | Main compiler frontend. Coordinates parsing, conversion, and code gen. | |
| 21 | + [`metta_compiler_lib.pl`](metta_compiler_lib.pl) | Shared predicates and helpers used by the main compiler. | |
| 22 | +| |
| 23 | + [`metta_compiler_douglas.pl`](metta_compiler_douglas.pl) | Experimental or customized compiler logic by Douglas. | |
| 24 | +| [`metta_compiler_lib_douglas.pl`](metta_compiler_lib_douglas.pl) | Douglas’s library extensions for the compiler. | |
| 25 | + |
| 26 | + [`metta_compiler_roy.pl`](metta_compiler_roy.pl) | Alternative or experimental compiler by Roy. | |
| 27 | +| [`metta_compiler_lib_roy.pl`](metta_compiler_lib_roy.pl) | Roy’s library extensions for the compiler. | |
| 28 | + |
| 29 | +--- |
| 30 | + |
| 31 | +### 🧩 Core System Logic |
| 32 | + |
| 33 | +| File | Description | |
| 34 | +|------|-------------| |
| 35 | +| [`metta_corelib.pl`](metta_corelib.pl) | Core predicates and behaviors of the MeTTa language. | |
| 36 | +| [`metta_eval.pl`](metta_eval.pl) | Interpreter and evaluation rules. | |
| 37 | +| [`metta_interp.pl`](metta_interp.pl) | Intermediate interpreter logic. | |
| 38 | +| [`metta_runtime.pl`](metta_runtime.pl) | Execution environment and runtime services. | |
| 39 | +| [`metta_loader.pl`](metta_loader.pl) | Loads `.metta` files and prepares them for execution. | |
| 40 | +| [`metta_space.pl`](metta_space.pl) | Logical space and storage for atoms. | |
| 41 | +| [`metta_subst.pl`](metta_subst.pl) | Substitution logic used during evaluation. | |
| 42 | +| [`metta_types.pl`](metta_types.pl) | Type system and inference logic. | |
| 43 | +| [`metta_typed_functions.pl`](metta_typed_functions.pl) | Typed function support and registration. | |
| 44 | + |
| 45 | +--- |
| 46 | + |
| 47 | +### 🧪 Debugging & Testing |
| 48 | + |
| 49 | +| File | Description | |
| 50 | +|------|-------------| |
| 51 | +| [`metta_debug.pl`](metta_debug.pl) | Debugging utilities and trace helpers. | |
| 52 | +| [`metta_testing.pl`](metta_testing.pl) | Unit and integration tests for the MeTTa system. | |
| 53 | +| [`metta_utils.pl`](metta_utils.pl) | Miscellaneous utilities (term manipulation, helpers, etc). | |
| 54 | + |
| 55 | +--- |
| 56 | + |
| 57 | +### 🧬 PFC (Interpreter Agent Chaining) |
| 58 | + |
| 59 | +| File | Description | |
| 60 | +|------|-------------| |
| 61 | +| [`metta_pfc_base.pl`](metta_pfc_base.pl) | Base rules for forward chaining for Agent. | |
| 62 | +| [`metta_pfc_support.pl`](metta_pfc_support.pl) | Agent integration and helpers. | |
| 63 | +| [`metta_pfc_debug.pl`](metta_pfc_debug.pl) | Debugging tools for Agent reasoning. | |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +### 🧾 REPL and Server |
| 68 | + |
| 69 | +| File | Description | |
| 70 | +|------|-------------| |
| 71 | +| [`metta_repl.pl`](metta_repl.pl) | Interactive REPL interface. | |
| 72 | +| [`metta_server.pl`](metta_server.pl) | HTTP/IPC server endpoint for remote execution. | |
| 73 | +| [`metta_threads.pl`](metta_threads.pl) | Thread handling for concurrent evaluation. | |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +### 🧠 Proofs and Reasoning |
| 78 | + |
| 79 | +| File | Description | |
| 80 | +|------|-------------| |
| 81 | +| [`metta_proof.pl`](metta_proof.pl) | Proof tracking and explanation system. | |
| 82 | +| [`metta_ontology.pfc.pl`](metta_ontology.pfc.pl) | Ontology-related facts/rules for reasoning. | |
| 83 | +| [`metta_mizer.pl`](metta_mizer.pl) | Optimization and minimization logic. | |
| 84 | +| [`metta_improve.pl`](metta_improve.pl) | Proof refinement or simplification routines. | |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +### 🔗 Python Interop |
| 89 | + |
| 90 | +| File | Description | |
| 91 | +|------|-------------| |
| 92 | +| [`metta_python.pl`](metta_python.pl) | Glue layer to interface with embedded Python. | |
| 93 | +| [`metta_python_builtin.py`](metta_python_builtin.py) | Custom Python functions exposed to MeTTa. | |
| 94 | +| [`metta_python_override.py`](metta_python_override.py) | Overrides or intercepts for MeTTa/Python behavior. | |
| 95 | +| [`metta_python_proxy.py`](metta_python_proxy.py) | Proxy system between Prolog and Python values. | |
| 96 | +| [`metta_python_patcher.py`](metta_python_patcher.py) | Patch system for Python side of MeTTa runtime. | |
| 97 | +| [`metta_python_hyperon.py`](metta_python_hyperon.py) | Integration with Hyperon-specific Python logic. | |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## 🧪 Dev Host File |
| 102 | + |
| 103 | +| File | Description | |
| 104 | +|------|-------------| |
| 105 | +| `Sav.*.MeTTaLog` | Device Specific Executable for Windows, MacOSX or Linux. | |
| 106 | + |
| 107 | +--- |
| 108 | + |
| 109 | +## 🔗 Documentation |
| 110 | + |
| 111 | +If available, documentation and contribution guidelines can be found at: |
| 112 | + |
| 113 | +- [MeTTa-WAM GitHub Repository](https://github.com/trueagi-io/metta-wam) |
| 114 | + |
| 115 | + |
0 commit comments