From f93e6bc2396b37e7cd56c898630c6e6334df8ee9 Mon Sep 17 00:00:00 2001 From: Hao Zhang Date: Fri, 26 Dec 2025 11:27:00 +0800 Subject: [PATCH] Update README.md. --- README.md | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2305f80..a7cbe59 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Distributed Deductive System Sorts (DDSS) -DDSS is a distributed deductive system with a scalable architecture. It currently supports distributed engines including forward-chaining, E-graph, and more. +DDSS is a distributed deductive system with a scalable architecture, providing identical implementations in both **Python** and **TypeScript**. It currently supports distributed engines including forward-chaining, E-graph, and more. ## Design Philosophy DDSS adopts a modular architecture that decomposes the deductive system into independent but collaborative sub-systems: -1. **Separation of Concerns**: Each module focuses on a specific reasoning task -2. **Concurrent Execution**: All modules collaborate asynchronously through a shared database, fully utilizing system resources -3. **Persistent Storage**: Uses a database to store facts and ideas, ensuring data consistency +1. **Separation of Concerns**: Each module focuses on a specific reasoning task. +2. **Concurrent Execution**: All modules collaborate asynchronously through a shared database, fully utilizing system resources. +3. **Persistent Storage**: Uses a database to store facts and ideas, ensuring data consistency. The system uses a database as the central hub, with two tables (`facts` and `ideas`) for interaction between sub-systems: @@ -18,34 +18,49 @@ The system uses a database as the central hub, with two tables (`facts` and `ide ## Modules -- **Input** (`ddss/input.py`): Interactive input interface with BNF syntax parsing -- **Output** (`ddss/output.py`): Real-time display of facts and ideas from the database -- **Load** (`ddss/load.py`): Batch import of facts from standard input -- **Dump** (`ddss/dump.py`): Export all facts and ideas to output -- **DS** (`ddss/ds.py`): Forward-chaining deductive search engine -- **Egg** (`ddss/egg.py`): E-graph based equality reasoning engine +The system consists of the following modules, implemented symmetrically in `ddss/*.py` and `ddss/*.ts`: + +- **Input** (`ddss/input.py`, `ddss/input.ts`): Interactive input interface with BNF syntax parsing +- **Output** (`ddss/output.py`, `ddss/output.ts`): Real-time display of facts and ideas from the database +- **Load** (`ddss/load.py`, `ddss/load.ts`): Batch import of facts from standard input +- **Dump** (`ddss/dump.py`, `ddss/dump.ts`): Export all facts and ideas to output +- **DS** (`ddss/ds.py`, `ddss/ds.ts`): Forward-chaining deductive search engine +- **Egg** (`ddss/egg.py`, `ddss/egg.ts`): E-graph based equality reasoning engine ## Installation -### Using uvx (Recommended) +You can choose either the Python or TypeScript version. Both provide the same `ddss` command-line interface. -The simplest way is to run with `uvx`: +### Python Version +#### Using uvx (Recommended) ```bash uvx ddss ``` -This automatically installs all dependencies and starts the DDSS system. +#### Using pip +```bash +pip install ddss +ddss +``` + +### TypeScript Version -### Using pip +#### Using npx (Recommended) +```bash +npx @hzhangxyz/ddss +``` +#### Using npm ```bash -pip install ddss +npm install -g @hzhangxyz/ddss ddss ``` ## Usage +The usage, command-line options, and interactive syntax are identical regardless of the implementation language used. + ### Basic Usage Run DDSS with a temporary SQLite database: