# omoton768/asymptotic-lies architecture

> Architecture diagram of the GitHub repository omoton768/asymptotic-lies, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/omoton768/asymptotic-lies
- Repository: https://github.com/omoton768/asymptotic-lies

## Overview

Asymptotic Lies is a MIPS maze-search demo and memory-cost comparison project. Its main user workflow is to choose an algorithm and maze, edit walls, run the search, and inspect its animation, score, and statistics. A second research workflow compares search behavior and measures instructions and cache hits across layouts; the Python reference and MARS harness support those comparisons. The README documents these capabilities, but most MIPS implementation files were not excerpted, so edges are limited to documented relationships rather than inferred calls.

Main entry points: [`src/game.asm`](https://github.com/omoton768/asymptotic-lies/blob/main/src/game.asm) (Wall game), [`src/search.asm`](https://github.com/omoton768/asymptotic-lies/blob/main/src/search.asm) (Shared search core), [`harness/compare.py`](https://github.com/omoton768/asymptotic-lies/blob/main/harness/compare.py) (Differential comparison), [`harness/ref_search.py`](https://github.com/omoton768/asymptotic-lies/blob/main/harness/ref_search.py) (Python search reference)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Interactive demo"]
  node_demo_entry["Demo entry<br/>[demo.asm]"]
  node_game["Wall game<br/>[game.asm]"]
  node_input["Keyboard input<br/>[input.asm]"]
  node_render["Maze renderer<br/>[render.asm]"]
  node_stats["Stats panel<br/>[stats.asm]"]
end

subgraph group_search["Search runtime"]
  node_search_core["Shared search core<br/>[search.asm]"]
  node_frontiers["Frontier structures<br/>[queue.asm]"]
  node_stack["DFS stack<br/>[stack.asm]"]
  node_heap["Priority heap<br/>[heap.asm]"]
  node_deque["0-1 deque<br/>[deque.asm]"]
  node_dp["DP sweep<br/>[dp.asm]"]
end

subgraph group_analysis["Measurement and analysis"]
  node_compare["Differential comparison<br/>[compare.py]"]
  node_measure["MIPS measurement entry<br/>[measure.asm]"]
  node_cache_sim["Cache simulator<br/>[MarsCache.java]"]
  node_cache_regions["Cache region analysis<br/>[cache_regions.py]"]
  node_plots["Result charts<br/>[plots.py]"]
  node_stump["Greedy wall study<br/>[stump.py]"]
  node_trace["Trace entry<br/>[trace.asm]"]
end

subgraph group_reference["Reference and mazes"]
  node_maze_bank["Maze layouts<br/>[bank.asm]"]
  node_maze_generator["Maze generator<br/>[gen_maze.py]"]
  node_python_reference["Python search reference<br/>[ref_search.py]"]
end

node_player(("Player"))

node_player -->|"types keys"| node_input
node_demo_entry -->|"runs game"| node_game
node_game -->|"handles keys"| node_input
node_game -->|"runs search"| node_search_core
node_game -->|"animates maze"| node_render
node_game -->|"shows statistics"| node_stats
node_maze_bank -->|"selects layout"| node_game
node_search_core -->|"uses queue"| node_frontiers
node_search_core -->|"uses stack"| node_stack
node_search_core -->|"uses min-heap"| node_heap
node_search_core -->|"uses deque"| node_deque
node_demo_entry -->|"offers DP sweep"| node_dp
node_maze_generator -->|"generates layouts"| node_maze_bank
node_python_reference -->|"reads maze data"| node_maze_generator
node_compare -->|"compares results"| node_python_reference
node_compare -->|"runs measurements"| node_measure
node_compare -->|"measures cache"| node_cache_sim
node_cache_regions -->|"reads cache regions"| node_cache_sim
node_plots -->|"charts results"| node_compare
node_plots -.->|"charts cache data"| node_cache_regions
node_stump -->|"evaluates wall edits"| node_python_reference
node_stump -->|"verifies runs"| node_trace

click node_demo_entry "https://github.com/omoton768/asymptotic-lies/blob/main/src/demo.asm"
click node_game "https://github.com/omoton768/asymptotic-lies/blob/main/src/game.asm"
click node_input "https://github.com/omoton768/asymptotic-lies/blob/main/src/input.asm"
click node_render "https://github.com/omoton768/asymptotic-lies/blob/main/src/render.asm"
click node_stats "https://github.com/omoton768/asymptotic-lies/blob/main/src/stats.asm"
click node_search_core "https://github.com/omoton768/asymptotic-lies/blob/main/src/search.asm"
click node_frontiers "https://github.com/omoton768/asymptotic-lies/blob/main/src/queue.asm"
click node_stack "https://github.com/omoton768/asymptotic-lies/blob/main/src/stack.asm"
click node_heap "https://github.com/omoton768/asymptotic-lies/blob/main/src/heap.asm"
click node_deque "https://github.com/omoton768/asymptotic-lies/blob/main/src/deque.asm"
click node_dp "https://github.com/omoton768/asymptotic-lies/blob/main/src/dp.asm"
click node_maze_bank "https://github.com/omoton768/asymptotic-lies/blob/main/src/mazes/bank.asm"
click node_maze_generator "https://github.com/omoton768/asymptotic-lies/blob/main/tools/gen_maze.py"
click node_python_reference "https://github.com/omoton768/asymptotic-lies/blob/main/harness/ref_search.py"
click node_compare "https://github.com/omoton768/asymptotic-lies/blob/main/harness/compare.py"
click node_measure "https://github.com/omoton768/asymptotic-lies/blob/main/src/measure.asm"
click node_cache_sim "https://github.com/omoton768/asymptotic-lies/blob/main/harness/MarsCache.java"
click node_cache_regions "https://github.com/omoton768/asymptotic-lies/blob/main/harness/cache_regions.py"
click node_plots "https://github.com/omoton768/asymptotic-lies/blob/main/harness/plots.py"
click node_stump "https://github.com/omoton768/asymptotic-lies/blob/main/harness/stump.py"
click node_trace "https://github.com/omoton768/asymptotic-lies/blob/main/src/trace.asm"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_demo_entry,node_game,node_input,node_render,node_stats toneBlue
class node_search_core,node_frontiers,node_stack,node_heap,node_deque,node_dp toneAmber
class node_compare,node_measure,node_cache_sim,node_cache_regions,node_plots,node_stump,node_trace toneMint
class node_maze_bank,node_maze_generator,node_python_reference toneRose
class node_player toneIndigo
```

## Components

### Interactive demo

- [Demo entry](https://github.com/omoton768/asymptotic-lies/blob/main/src/demo.asm): `src/demo.asm`
- [Wall game](https://github.com/omoton768/asymptotic-lies/blob/main/src/game.asm): `src/game.asm`
- [Keyboard input](https://github.com/omoton768/asymptotic-lies/blob/main/src/input.asm): `src/input.asm`
- [Maze renderer](https://github.com/omoton768/asymptotic-lies/blob/main/src/render.asm): `src/render.asm`
- [Stats panel](https://github.com/omoton768/asymptotic-lies/blob/main/src/stats.asm): `src/stats.asm`

### Search runtime

- [Shared search core](https://github.com/omoton768/asymptotic-lies/blob/main/src/search.asm): `src/search.asm`
- [Frontier structures](https://github.com/omoton768/asymptotic-lies/blob/main/src/queue.asm): `src/queue.asm`
- [DFS stack](https://github.com/omoton768/asymptotic-lies/blob/main/src/stack.asm): `src/stack.asm`
- [Priority heap](https://github.com/omoton768/asymptotic-lies/blob/main/src/heap.asm): `src/heap.asm`
- [0-1 deque](https://github.com/omoton768/asymptotic-lies/blob/main/src/deque.asm): `src/deque.asm`
- [DP sweep](https://github.com/omoton768/asymptotic-lies/blob/main/src/dp.asm): `src/dp.asm`

### Measurement and analysis

- [Differential comparison](https://github.com/omoton768/asymptotic-lies/blob/main/harness/compare.py): `harness/compare.py`
- [MIPS measurement entry](https://github.com/omoton768/asymptotic-lies/blob/main/src/measure.asm): `src/measure.asm`
- [Cache simulator](https://github.com/omoton768/asymptotic-lies/blob/main/harness/MarsCache.java): `harness/MarsCache.java`
- [Cache region analysis](https://github.com/omoton768/asymptotic-lies/blob/main/harness/cache_regions.py): `harness/cache_regions.py`
- [Result charts](https://github.com/omoton768/asymptotic-lies/blob/main/harness/plots.py): `harness/plots.py`
- [Greedy wall study](https://github.com/omoton768/asymptotic-lies/blob/main/harness/stump.py): `harness/stump.py`
- [Trace entry](https://github.com/omoton768/asymptotic-lies/blob/main/src/trace.asm): `src/trace.asm`

### Reference and mazes

- [Maze layouts](https://github.com/omoton768/asymptotic-lies/blob/main/src/mazes/bank.asm): `src/mazes/bank.asm`
- [Maze generator](https://github.com/omoton768/asymptotic-lies/blob/main/tools/gen_maze.py): `tools/gen_maze.py`
- [Python search reference](https://github.com/omoton768/asymptotic-lies/blob/main/harness/ref_search.py): `harness/ref_search.py`

### Other components

- **Player**

## Connections

- Player → Keyboard input: types keys (evidence: `README.md`)
- Demo entry → Wall game: runs game (evidence: `README.md`)
- Wall game → Keyboard input: handles keys (evidence: `README.md`)
- Wall game → Shared search core: runs search (evidence: `README.md`)
- Wall game → Maze renderer: animates maze (evidence: `README.md`)
- Wall game → Stats panel: shows statistics (evidence: `README.md`)
- Maze layouts → Wall game: selects layout (evidence: `README.md`)
- Shared search core → Frontier structures: uses queue (evidence: `README.md`)
- Shared search core → DFS stack: uses stack (evidence: `README.md`)
- Shared search core → Priority heap: uses min-heap (evidence: `README.md`)
- Shared search core → 0-1 deque: uses deque (evidence: `README.md`)
- Demo entry → DP sweep: offers DP sweep (evidence: `README.md`)
- Maze generator → Maze layouts: generates layouts (evidence: `tools/gen_maze.py`)
- Python search reference → Maze generator: reads maze data (evidence: `harness/ref_search.py`)
- Differential comparison → Python search reference: compares results (evidence: `harness/compare.py`)
- Differential comparison → MIPS measurement entry: runs measurements (evidence: `harness/compare.py`)
- Differential comparison → Cache simulator: measures cache (evidence: `harness/compare.py`)
- Cache region analysis → Cache simulator: reads cache regions (evidence: `harness/cache_regions.py`)
- Result charts → Differential comparison: charts results (evidence: `harness/plots.py`)
- Result charts → Cache region analysis: charts cache data
- Greedy wall study → Python search reference: evaluates wall edits (evidence: `harness/stump.py`)
- Greedy wall study → Trace entry: verifies runs (evidence: `harness/stump.py`)
