Lab 5 — Search-Based Refactoring¶
Goal¶
Treat refactoring selection or ordering as a small optimization problem.
Suggested setup¶
- candidate solution: 3–15 refactoring operations;
- objectives: choose 2–4 quality/cost measures;
- constraints: code must parse/compile; no duplicate invalid moves;
- algorithm: random search plus one heuristic/evolutionary method;
- repetitions: enough seeds to discuss variability.
Analysis¶
Compare the heuristic against random search. Inspect at least three high-scoring solutions for metric gaming or design damage.