Skip to main content

Module parf

Module parf 

Source
Expand description

PARF (Pattern and Reference Finder) module (BATUTA-012)

Cross-codebase pattern analysis and reference finding for understanding code dependencies, usage patterns, and migration planning.

§Features

  • Symbol References: Find all references to functions, classes, variables
  • Pattern Detection: Identify common code patterns and idioms
  • Dependency Analysis: Build dependency graphs across files
  • Dead Code Detection: Find unused code that can be removed
  • Call Graph Generation: Understand function call relationships

§Example

use batuta::parf::{ParfAnalyzer, SymbolKind};

let analyzer = ParfAnalyzer::new();
let refs = analyzer.find_references("my_function", SymbolKind::Function)?;
let patterns = analyzer.detect_patterns(&codebase)?;
let deps = analyzer.analyze_dependencies(&codebase)?;

Structs§

DeadCode
Dead code analysis result
FileDependency
Dependency relationship between files
ParfAnalyzer
PARF analyzer for cross-codebase analysis
SymbolReference
A reference to a symbol in the codebase

Enums§

CodePattern
Code pattern detected in the codebase
DependencyKind
Type of dependency between files
SymbolKind
Symbol kind for reference finding