How star-ga/mind works
MIND is a deterministic programming language and compiler for tensor-oriented intelligent systems. Its main workflow is source input through parsing, type and shape analysis, verified IR, and backend output for execution or artifacts; optional autodiff augments that path. The repository also documents project build/run commands, source formatting and checks, and distributed pipeline abstractions. The README documents native-ELF self-hosting, but the relevant example sources are not present in this tree. Some subsystem links reflect documented behavior rather than inspected implementation details.
Main entry points: pipeline.rs Compile Pipeline · mindc.rs Compiler CLI · mod.rs Project Builder · main.rs Mind CLI
Components 23
Language Front End
- Parser
src/parser/mod.rs - AST
src/ast/mod.rs - Type Checker
src/type_checker/mod.rs
Compilation and Artifacts
- Compile Pipeline
src/pipeline.rs - Verified IR
src/ir/mod.rs - IR Optimizers
src/opt/mod.rs - MLIR Backend
src/mlir/lowering.rs - Native Execution
src/exec/cpu.rs - Project Builder
src/project/mod.rs - Build Cache
src/cache/mod.rs - Compact IR
src/ir/compact/v3/mod.rs
Execution and Tools
- Compiler CLI
src/bin/mindc.rs - Mind CLI
src/main.rs - Evaluator
src/eval/mod.rs - Formatter
src/fmt/mod.rs - Source Check
src/check/mod.rs
Tensor and Distribution
- Shape Inference
src/shapes/engine.rs - Autodiff
src/autodiff/engine.rs - Distributed Ops
src/distributed/mod.rs
Interoperability
- C Interface
src/ffi/mod.rs - Python Bindings
src/python.rs
Other components
- Engineer
- Program or Artifact
Connections 25
- Engineer → Compiler CLI: submits source
- Engineer → Mind CLI: runs commands
- Compiler CLI → Compile Pipeline: compiles source
- Mind CLI → Parser: parses eval input
- Mind CLI → Evaluator: evaluates program
- Compiler CLI → Project Builder: builds projects
- Compiler CLI → Formatter: formats source
- Compiler CLI → Source Check: checks source
- Parser → AST: produces AST
- Type Checker → Shape Inference: checks tensor shapes
- Compile Pipeline → Parser: parses source
- Compile Pipeline → Type Checker: checks types
- Compile Pipeline → Verified IR: lowers and verifies
- Compile Pipeline → IR Optimizers: canonicalizes IR
- Compile Pipeline → Autodiff: builds gradients
- Compile Pipeline → MLIR Backend: lowers to MLIR
- MLIR Backend → Program or Artifact: emits backend output
- Compile Pipeline → Compact IR: serializes IR
- Project Builder → Build Cache: reads and writes
- Project Builder → Compile Pipeline: compiles modules
- Project Builder → Program or Artifact: writes build artifact
- Mind CLI → Native Execution: executes program
- Distributed Ops → Program or Artifact: defines pipeline stages
- C Interface → Program or Artifact: exposes C interface
- Python Bindings → Program or Artifact: exposes Python bindings