← Readings

Refactoring Object-Oriented Frameworks

Read the original ↗

Summary

Opdyke’s thesis defines refactoring as behavior-preserving program transformation — not “cleaning up code,” but a precise operation with formally defined preconditions that guarantee the program’s observable behavior is unchanged. Each refactoring (rename, extract method, move field) is specified with conditions that must hold before the transformation is safe to apply, and a proof that the transformation preserves behavior when those conditions are met.

What it means for our work

This is the intellectual foundation for Refactory. When an AI agent refactors code today, it generates a text diff — no semantic model, no behavioral guarantee. Opdyke showed forty years ago that refactoring can be made deterministic and provably safe. Refactory applies that insight: the AI decides what needs restructuring, Refactory executes the transformation on a parsed program model and checks the preconditions. The agent provides judgment; the tool provides guarantees.