Skip to content

Commit d403fa7

Browse files
committed
docs: add TOPOLOGY.md
1 parent 75da58a commit d403fa7

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

TOPOLOGY.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!-- SPDX-License-Identifier: PMPL-1.0-or-later -->
2+
<!-- Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> -->
3+
4+
# TOPOLOGY.md — bqniser
5+
6+
## Purpose
7+
8+
Rust CLI tool that scans code for array computation patterns (loops, maps, folds, comprehensions) and rewrites them as optimized BQN array primitives. Delivers 10-100x speedups on array-heavy workloads without requiring users to learn BQN explicitly.
9+
10+
## Module Map
11+
12+
```
13+
bqniser/
14+
├── src/
15+
│ ├── main.rs # CLI entry point
16+
│ ├── scanner.rs # Pattern detection (loops, folds, etc.)
17+
│ ├── rewriter.rs # AST transformation to BQN
18+
│ └── bqn_codegen.rs # BQN code generation
19+
├── tests/
20+
│ └── ... (integration tests)
21+
├── Cargo.toml # Rust package metadata
22+
└── examples/
23+
└── ... (demo transformations)
24+
```
25+
26+
## Data Flow
27+
28+
```
29+
[Existing Code] ──► [Scanner] ──► [Pattern Match] ──► [Rewriter] ──► [BQN Output]
30+
31+
[Performance Analysis]
32+
```
33+
34+
## Key Invariants
35+
36+
- Targets array-heavy Python/Rust/JS code
37+
- Generates standalone BQN that can be integrated back
38+
- Preserves semantics: rewritten code computes same values

0 commit comments

Comments
 (0)