Expand description
DEPYLER-1300: Dependency Graph Analysis for Error Reasoning
This crate transforms the transpiler from a “compiler” into a “reasoning engine” by building dependency graphs that reveal error topology and enable ML-based fixes.
§Architecture
Python Source
│
▼
┌─────────────────┐
│ AST Parser │
└────────┬────────┘
│
▼
┌─────────────────┐ ┌─────────────────┐
│ Dependency │────►│ Error Overlay │
│ Graph Builder │ │ (Rust Errors) │
└────────┬────────┘ └────────┬────────┘
│ │
▼ ▼
┌─────────────────┐ ┌─────────────────┐
│ Impact Scorer │◄────│ Vectorized │
│ (PageRank) │ │ Failures (JSON) │
└────────┬────────┘ └─────────────────┘
│
▼
┌─────────────────┐
│ Patient Zero │
│ Identification │
└─────────────────┘Structs§
- AstContext
- AST context around an error
- Dependency
Graph - The dependency graph structure
- Error
Overlay - Overlays errors onto a dependency graph
- Failure
Context - Context for failure extraction
- Failure
Labels - Labels for supervised ML training
- Graph
Analysis - Complete analysis result
- Graph
Builder - Builder for constructing dependency graphs from Python source
- Graph
Context - Graph context for an error
- Graph
Edge - An edge in the dependency graph
- Graph
Node - A node in the dependency graph representing a Python entity
- Impact
Score - Impact score for a node
- Impact
Scorer - Calculates impact scores for nodes in the graph
- Overlaid
Error - An error overlaid onto the graph
- Patient
Zero - Patient Zero - a node identified as root cause
- Vectorized
Failure - Vectorized failure ready for ML training
Enums§
- Edge
Kind - Kind of edge in the dependency graph
- Graph
Error - Errors that can occur during graph analysis
- Node
Kind - Kind of node in the dependency graph
Functions§
- analyze_
with_ graph - Main entry point for graph-based error analysis
- serialize_
to_ json - Serialize failures to JSON for ML training
- serialize_
to_ ndjson - Serialize failures to NDJSON (newline-delimited JSON) for streaming
- vectorize_
failures - Vectorize failures from overlaid errors