Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 30 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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:
Expand Down