Mirage
Version: 1.0.2
Path-aware code intelligence engine for Rust. Analyzes control-flow graphs to find execution paths, dead code, and impact zones.
Positioning: CFG analysis tool for codebases indexed by Magellan. Answers questions like "what code MUST execute on any path from entry to exit?"
Purpose
Mirage analyzes control-flow graphs from Magellan. Built for:
- Developers — Find dead code, understand execution paths, analyze impact of changes
- AI Assistants — Structured path analysis for code reasoning
- Tooling — Scriptable CFG analysis with precise block-level data
Features
- Path enumeration — Find all execution paths through a function
- Dominance analysis — Compute dominators, post-dominators, dominance frontiers
- Loop detection — Identify natural loops within functions
- Dead code detection — Find unreachable blocks
- Impact analysis — Blast zones, program slicing
- Hotspots — Risk scoring based on path counts and complexity
Quick Start
# Install
# Requires Magellan database (create first)
# Check database status
# Show execution paths through a function
# Find unreachable code
# Visualize control flow
Installation
Or build from source with Native-V3 backend:
# Native-V3 backend (recommended - fastest)
Backends
| Feature | Description | File | Best For |
|---|---|---|---|
native-v3 |
High-performance binary backend | .v3 |
Production (recommended) |
| (default) | SQLite backend | .db |
Compatibility |
Both backends provide identical CFG analysis results.
Requirements
- Magellan 2.4.3+ — Required for CFG extraction
- sqlitegraph 2.0.3+ — Included automatically
Documentation
- MANUAL.md — Complete command reference and examples
- CHANGELOG.md — Version history
What Mirage Does NOT Do
- ❌ Search code (use llmgrep)
- ❌ Index code (use Magellan)
- ❌ Type checking or semantic analysis
- ❌ Code editing (use splice)
License
GPL-3.0-or-later. See LICENSE.