How harshitha14-cyber/codetune works
CodeTune is a multi-language compiler optimizer: source is parsed and translated into a common IR, analyzed and optimized, then differentially validated. Its Digital Twin evaluates optimization strategies, while the dashboard, Copilot, and report generation expose results. The README documents the overall workflow and capabilities; sampled source confirms key selector, validation, interpreter, and dashboard behavior. Some subsystem connections rely on README documentation because their implementation was not sampled.
Main entry points: pass_manager.py Pass Manager · twin.py Strategy Experiments · ir_nodes.py Common IR · copilot.py Copilot
Components 23
Front End
- Language Parser
frontend/parser.py - IR Translators
ir/translators - Common IR
ir/ir_nodes.py
Analysis and Optimization
- Feature Extraction
analysis/feature_extractor.py - Rule Selector
analysis/pass_selector.py - ML Selector
ml/ml_selector.py - Pass Manager
optimizer/pass_manager.py - Optimization Passes
optimizer
Validation and Digital Twin
- Differential Validator
validation/differential_tester.py - IR Interpreter
ir/interpreter.py - Strategy Experiments
digital_twin/twin.py - Cost Model
digital_twin/cost_model.py - Strategy Sandbox
digital_twin/sandbox.py
Insights and Assistance
- Copilot
copilot/copilot.py - Code Knowledge
copilot/knowledge.py - Optional Gemini
copilot/llm.py - Refactoring
copilot/refactor.py
User Interfaces and Reports
- Dashboard Server
dashboard/server.py - Dashboard UI
dashboard/static/app.js - Reports
reporting/report_generator.py
Other components
- Developer
- Source Code
- Optimized Results
Connections 27
- Developer → Source Code: provides
README.md - Source Code → Language Parser: parses
README.md - Language Parser → IR Translators: translates syntax
README.md - IR Translators → Common IR: produces IR
README.md - Common IR → Feature Extraction: extracts features
README.md - Feature Extraction → Rule Selector: informs selection
analysis/pass_selector.py - Rule Selector → ML Selector: optional comparison
README.md - Rule Selector → Pass Manager: selects passes
README.md - ML Selector → Pass Manager: optional selection
README.md - Pass Manager → Optimization Passes: runs passes
optimizer/pass_manager.py - Pass Manager → Differential Validator: checks candidates
optimizer/pass_manager.py - Differential Validator → IR Interpreter: executes comparisons
validation/differential_tester.py - Pass Manager → Optimized Results: returns optimized code
README.md - Common IR → Strategy Experiments: evaluates strategies
README.md - Strategy Experiments → Cost Model: predicts cost
digital_twin/twin.py - Strategy Experiments → Strategy Sandbox: runs experiments
digital_twin/twin.py - Strategy Experiments → Differential Validator: validates strategies
digital_twin/twin.py - Common IR → Copilot: supplies code context
README.md - Copilot → Code Knowledge: answers from analysis
copilot/copilot.py - Copilot → Optional Gemini: optionally consults
README.md - Copilot → Refactoring: offers refactoring
copilot/copilot.py - Developer → Dashboard Server: uses
README.md - Dashboard UI → Dashboard Server: sends requests
README.md - Dashboard Server → Optimized Results: presents results
README.md - Pass Manager → Reports: formats run
README.md - Strategy Experiments → Reports: formats twin results
README.md - Reports → Optimized Results: delivers reports
README.md