Highlights
- Reworked the tool into a tree-sitter powered
prunerpackage withpython3 -m prunerandrun_pruner.pyentry 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/falsebranch 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/projectNotes
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.