Dr. Jones: A Software Design Explorer’s Magic Lens
Mark A. Foltz
Design Rationale Group, MIT AI Lab
October 23, 2002

Outline
Problem and Thesis
What is a Refactoring?
The Dr. Jones Refactoring Knowledge Base
A Scenario

The Problem Is Redesign Complexity
Diagrams are natural to plan redesign
But tool-generated diagrams are too complex
So most planning is done with pen-and-paper

Make The Tool Understand Refactoring
Programmers draw task-relevant diagrams on pen and paper
Many redesign moves are commonly used refactorings
Thesis: If the tool understands refactorings, it can draw relevant diagrams, and help the programmer explore the program’s design

Refactoring Tool Roles

Dr. Jones’ Roles

Contributions
Dr. Jones, a tool for programmers to plan the refactoring of a Java program
A knowledge base of refactorings for Java
Focus tracking: keeping the diagrams simple and relevant across multiple refactorings

Outline
Problem and Thesis
What is a Refactoring?
The Dr. Jones Refactoring Knowledge Base
A Scenario

What is a Refactoring?
A structural change that improves program design, while maintaining behavior
Moving a method to reduce coupling
Extracting a base class with common methods
Encapsulating methods in a new delegate

Move Method

What does Dr. Jones Know?

What is `Move Method’ to Dr. Jones?

What is `Move Method’ to Dr. Jones?

What is `Move Method’ to Dr. Jones?

What is `Move Method’ to Dr. Jones?

How Dr. Jones Uses This Information

"How to prove behavior is..."
How to prove behavior is preserved
How to transform the source

Outline
Problem and Thesis
What is a Refactoring?
The Dr. Jones Refactoring Knowledge Base
A Scenario

Refactoring Verbs

Refactoring Verbs

Refactoring Verbs

Refactoring Verbs

Refactoring Verbs

Outline
Problem and Thesis
What is a Refactoring?
The Dr. Jones Refactoring KB
A Scenario

Scenario

Scenario

Scenario

Scenario

Scenario

Scenario

Scenario

Back to Focus Tracking

Conclusion
Problem and Thesis
What is a Refactoring?
The Dr. Jones Refactoring KB
A Scenario

Status and Milestones
50 Refactorings Specified
Analysis and Diagramming Infrastructure
Scenario Refactorings Implemented
Focus Set Tracking
Remaining Refactorings
Evaluation

Slide 35