Refactoring object-oriented software, as any other evolutionary task, usually affects source code and object models, burdening developers to keep those artifacts correct and up to date. Due to the gap between modeling and programming artifacts, refactoring efforts soon become duplicate and considerably expensive. In this context, currently used tool support, in special Round-Trip Engineering (RTE) tools, fails to fully automate evolution tasks. Consequently, most projects discard object models early in the life cycle, adhering to code-driven approaches. This work proposes a formal approach to consistently refactor object models and object-oriented programs of a system in a model-driven manner. Model refactoring is backed by formal laws of modeling, which are guaranteed to be semantics preserving. Each refactoring, a composition of laws, applicable to an object model, is associated with a semi-automatic sequence of applications of laws of programming, called strategy. Strategies are applied by relying on a specific conformance relationship between object models and programs, which must fulfill a specific degree of confinement.