Skip to content

v1.1.0 - Semantic dead-code pruning

Latest

Choose a tag to compare

@OldJii OldJii released this 26 Jun 10:05

Highlights

  • Reworked the tool into a tree-sitter powered pruner package with python3 -m pruner and run_pruner.py entry points.
  • Added a 3-phase iterative pipeline: constant/control-flow simplification, constant-return method inlining, and conservative dead-method cleanup.
  • Expanded language coverage for Java, Kotlin, Go, C, C++, JavaScript, TypeScript, Rust, Swift, and C#.
  • Added project-level semantic analysis: method scanning, reference indexing, class hierarchy checks, and conservative method safety promotion.
  • Improved semantic cascade cleanup so method inlining and dead-method replacement continue into if true/false branch elimination.
  • Added dynamic-entry protection for Swift/iOS selectors and Storyboard/XIB references.
  • Added multi-language and project-level regression suites, including full-pipeline Java/Swift/iOS semantic cases.

Usage

pip install -r requirements.txt
python3 -m pruner /path/to/project --dry-run
python3 -m pruner /path/to/project

Notes

This release is intentionally conservative: annotated/framework-managed methods, dynamic references, and potentially external entry points are preserved unless the tool can safely prove the cleanup path.