# acridgold/clabsnsu architecture

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

- Interactive diagram: https://gitdiagram.com/acridgold/clabsnsu
- Repository: https://github.com/acridgold/clabsnsu

## Overview

CLabsNSU is a collection of independent C programming labs, not one integrated application. Users run a particular lab with input files or command-line options and receive calculated results, compressed data, paths, or visualizations. The clearest workflows are maze generation and solving, weighted-graph shortest paths and spanning trees, expression evaluation, and Huffman compression. The README also names other completed labs, represented here as standalone exercises. Relationships are limited to calls visible in excerpts or capabilities explicitly documented by the README; unsampled lab internals are not inferred.

Main entry points: [`lab4/src/main.c`](https://github.com/acridgold/clabsnsu/blob/main/lab4/src/main.c) (Expression calculator), [`lab5/src/main.c`](https://github.com/acridgold/clabsnsu/blob/main/lab5/src/main.c) (Huffman compression), [`lab8-0/src/main.c`](https://github.com/acridgold/clabsnsu/blob/main/lab8-0/src/main.c) (Minimum spanning tree), [`WAVE_LAB/src/main.c`](https://github.com/acridgold/clabsnsu/blob/main/WAVE_LAB/src/main.c) (Maze solver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_course["Course exercises"]
  node_foundations["Foundation labs<br/>[main.c]"]
  node_lab0["Lab 0<br/>[main.c]"]
  node_lab1["Labs 1<br/>[main.c]"]
  node_lab2["Lab 2<br/>[main.c]"]
  node_lab3["Labs 3<br/>[main.c]"]
  node_lab6["Labs 6<br/>[main.c]"]
  node_lab7["Lab 7<br/>[main.c]"]
  node_lab8one["Lab 8-1<br/>[main.c]"]
end

subgraph group_graphs["Graph algorithms"]
  node_shortest["Shortest paths<br/>[main.c]"]
  node_spanning["Minimum spanning tree<br/>[main.c]"]
  node_svg["SVG renderer<br/>[svg.c]"]
end

subgraph group_mazes["Maze tools"]
  node_wave["Maze solver<br/>[main.c]"]
  node_wavegen["Maze generator<br/>[maze_gen.c]"]
  node_maze9["Maze generation<br/>[maze_gen.c]"]
end

subgraph group_utilities["Data utilities"]
  node_calculator["Expression calculator<br/>[main.c]"]
  node_integercalc["Integer evaluation<br/>[calculate_int.c]"]
  node_floatcalc["Float evaluation<br/>[сalculate_float.c]"]
  node_huffman["Huffman compression<br/>[main.c]"]
  node_huffmanengine["Huffman tree<br/>[huffman.c]"]
  node_bitio["Bit I/O<br/>[Bits.c]"]
end

node_actor(("Lab user"))

node_actor -->|"runs solver"| node_wave
node_wave -->|"generates maze"| node_wavegen
node_actor -->|"runs lab"| node_shortest
node_actor -->|"runs lab"| node_spanning
node_spanning -->|"draws graph"| node_svg
node_actor -->|"enters expression"| node_calculator
node_calculator -->|"evaluates integers"| node_integercalc
node_calculator -->|"evaluates floats"| node_floatcalc
node_actor -->|"selects mode"| node_huffman
node_huffman -->|"builds tree"| node_huffmanengine
node_huffman -->|"reads and writes bits"| node_bitio
node_actor -->|"runs exercise"| node_foundations
node_actor -->|"runs exercise"| node_lab0
node_actor -->|"runs exercise"| node_lab1
node_actor -->|"runs exercise"| node_lab2
node_actor -->|"runs exercise"| node_lab3
node_actor -->|"runs exercise"| node_lab6
node_actor -->|"runs exercise"| node_lab7
node_actor -->|"runs exercise"| node_lab8one
node_actor -->|"runs maze lab"| node_maze9

click node_foundations "https://github.com/acridgold/clabsnsu/blob/main/lab-begin/src/main.c"
click node_lab0 "https://github.com/acridgold/clabsnsu/blob/main/lab0/src/main.c"
click node_lab1 "https://github.com/acridgold/clabsnsu/blob/main/lab1-1/src/main.c"
click node_lab2 "https://github.com/acridgold/clabsnsu/blob/main/lab2/src/main.c"
click node_lab3 "https://github.com/acridgold/clabsnsu/blob/main/lab3-1/src/main.c"
click node_lab6 "https://github.com/acridgold/clabsnsu/blob/main/lab6-0/src/main.c"
click node_lab7 "https://github.com/acridgold/clabsnsu/blob/main/lab7/src/main.c"
click node_lab8one "https://github.com/acridgold/clabsnsu/blob/main/lab8-1/src/main.c"
click node_shortest "https://github.com/acridgold/clabsnsu/blob/main/lab9/src/main.c"
click node_spanning "https://github.com/acridgold/clabsnsu/blob/main/lab8-0/src/main.c"
click node_svg "https://github.com/acridgold/clabsnsu/blob/main/lab8-0/src/svg.c"
click node_wave "https://github.com/acridgold/clabsnsu/blob/main/WAVE_LAB/src/main.c"
click node_wavegen "https://github.com/acridgold/clabsnsu/blob/main/WAVE_LAB/src/maze_gen.c"
click node_maze9 "https://github.com/acridgold/clabsnsu/blob/main/lab9/src/maze_gen.c"
click node_calculator "https://github.com/acridgold/clabsnsu/blob/main/lab4/src/main.c"
click node_integercalc "https://github.com/acridgold/clabsnsu/blob/main/lab4/src/calculate_int.c"
click node_floatcalc "https://github.com/acridgold/clabsnsu/blob/main/lab4/src/%D1%81alculate_float.c"
click node_huffman "https://github.com/acridgold/clabsnsu/blob/main/lab5/src/main.c"
click node_huffmanengine "https://github.com/acridgold/clabsnsu/blob/main/lab5/src/huffman.c"
click node_bitio "https://github.com/acridgold/clabsnsu/blob/main/lab5/src/Bits.c"

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_foundations,node_lab0,node_lab1,node_lab2,node_lab3,node_lab6,node_lab7,node_lab8one,node_actor toneBlue
class node_shortest,node_spanning,node_svg toneAmber
class node_wave,node_wavegen,node_maze9 toneMint
class node_calculator,node_integercalc,node_floatcalc,node_huffman,node_huffmanengine,node_bitio toneRose
```

## Components

### Course exercises

- [Foundation labs](https://github.com/acridgold/clabsnsu/blob/main/lab-begin/src/main.c): `lab-begin/src/main.c`
- [Lab 0](https://github.com/acridgold/clabsnsu/blob/main/lab0/src/main.c): `lab0/src/main.c`
- [Labs 1](https://github.com/acridgold/clabsnsu/blob/main/lab1-1/src/main.c): `lab1-1/src/main.c`
- [Lab 2](https://github.com/acridgold/clabsnsu/blob/main/lab2/src/main.c): `lab2/src/main.c`
- [Labs 3](https://github.com/acridgold/clabsnsu/blob/main/lab3-1/src/main.c): `lab3-1/src/main.c`
- [Labs 6](https://github.com/acridgold/clabsnsu/blob/main/lab6-0/src/main.c): `lab6-0/src/main.c`
- [Lab 7](https://github.com/acridgold/clabsnsu/blob/main/lab7/src/main.c): `lab7/src/main.c`
- [Lab 8-1](https://github.com/acridgold/clabsnsu/blob/main/lab8-1/src/main.c): `lab8-1/src/main.c`

### Graph algorithms

- [Shortest paths](https://github.com/acridgold/clabsnsu/blob/main/lab9/src/main.c): `lab9/src/main.c`
- [Minimum spanning tree](https://github.com/acridgold/clabsnsu/blob/main/lab8-0/src/main.c): `lab8-0/src/main.c`
- [SVG renderer](https://github.com/acridgold/clabsnsu/blob/main/lab8-0/src/svg.c): `lab8-0/src/svg.c`

### Maze tools

- [Maze solver](https://github.com/acridgold/clabsnsu/blob/main/WAVE_LAB/src/main.c): `WAVE_LAB/src/main.c`
- [Maze generator](https://github.com/acridgold/clabsnsu/blob/main/WAVE_LAB/src/maze_gen.c): `WAVE_LAB/src/maze_gen.c`
- [Maze generation](https://github.com/acridgold/clabsnsu/blob/main/lab9/src/maze_gen.c): `lab9/src/maze_gen.c`

### Data utilities

- [Expression calculator](https://github.com/acridgold/clabsnsu/blob/main/lab4/src/main.c): `lab4/src/main.c`
- [Integer evaluation](https://github.com/acridgold/clabsnsu/blob/main/lab4/src/calculate_int.c): `lab4/src/calculate_int.c`
- [Float evaluation](https://github.com/acridgold/clabsnsu/blob/main/lab4/src/%D1%81alculate_float.c): `lab4/src/сalculate_float.c`
- [Huffman compression](https://github.com/acridgold/clabsnsu/blob/main/lab5/src/main.c): `lab5/src/main.c`
- [Huffman tree](https://github.com/acridgold/clabsnsu/blob/main/lab5/src/huffman.c): `lab5/src/huffman.c`
- [Bit I/O](https://github.com/acridgold/clabsnsu/blob/main/lab5/src/Bits.c): `lab5/src/Bits.c`

### Other components

- **Lab user**

## Connections

- Lab user → Maze solver: runs solver (evidence: `WAVE_LAB/src/main.c`)
- Maze solver → Maze generator: generates maze (evidence: `WAVE_LAB/src/main.c`)
- Lab user → Shortest paths: runs lab (evidence: `lab9/src/main.c`)
- Lab user → Minimum spanning tree: runs lab (evidence: `lab8-0/src/main.c`)
- Minimum spanning tree → SVG renderer: draws graph (evidence: `lab8-0/src/main.c`)
- Lab user → Expression calculator: enters expression (evidence: `lab4/src/main.c`)
- Expression calculator → Integer evaluation: evaluates integers (evidence: `lab4/src/main.c`)
- Expression calculator → Float evaluation: evaluates floats (evidence: `lab4/src/main.c`)
- Lab user → Huffman compression: selects mode (evidence: `lab5/src/main.c`)
- Huffman compression → Huffman tree: builds tree (evidence: `lab5/src/main.c`)
- Huffman compression → Bit I/O: reads and writes bits (evidence: `lab5/src/main.c`)
- Lab user → Foundation labs: runs exercise
- Lab user → Lab 0: runs exercise
- Lab user → Labs 1: runs exercise
- Lab user → Lab 2: runs exercise
- Lab user → Labs 3: runs exercise
- Lab user → Labs 6: runs exercise
- Lab user → Lab 7: runs exercise
- Lab user → Lab 8-1: runs exercise
- Lab user → Maze generation: runs maze lab
