formal refactorings for object models
Both model and program refactorings are usually proposed in an ad hoc way because it is difficult to prove that they are sound with respect to a formal semantics. Even developers using refactoring tools have to rely on compilation and tests to guarantee the semantics preservation, which may not be satisfactory to critical software development. This work proposes a set of primitive structural semantics-preserving transformations for Alloy, a formal object-oriented modeling language. We use the Prototype Verification System (PVS), which contains a formal specification language and a theorem prover, to specify and prove the soundness of the transformations. Although our transformations are primitive, we can compose them in order to derive coarse grained transformations, such as a model refactoring to introduce a design pattern into a model. Moreover, proposing refactorings in this way can not only facilitate design, but also improve the quality of model refactoring tools.
object models model refactoring theorem proving