A Static Semantics for Alloy and its Impact in Refactorings

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, not guaranteeing the absence of type errors or semantic changes. Consequently, developers using refactoring tools must rely on compilation and tests to ensure type-correctness and semantics preservation, respectively, which may not be satisfactory to critical software development. In this paper, we formalize a static semantics for Alloy, which is a formal object-oriented modeling language, and encode it in Prototype Verification System (PVS). The static semantics' formalization can be useful for specifying and proving that transformations in general (not only refactorings) do not introduce type errors, for instance, as we show here.

[1]  Jean-Marc Jézéquel,et al.  Refactoring UML Models , 2001, UML.

[2]  Stanley B. Zdonik,et al.  The management of changing types in an object-oriented database , 1986, OOPLSA '86.

[3]  Jean Bézivin,et al.  The Unified Modeling Language. «UML»’98: Beyond the Notation , 1998, Lecture Notes in Computer Science.

[4]  Daniel Jackson,et al.  Alloy: a lightweight object modelling notation , 2002, TSEM.

[5]  Paul L. Bergstein,et al.  Object-preserving class transformations , 1991, OOPSLA '91.

[6]  Anneke Kleppe,et al.  The object constraint language: precise modeling with UML , 1998 .

[7]  Paulo Borba,et al.  Basic Laws of Object Modeling , 2004 .

[8]  Akinori Yonezawa Proceedings of the European conference on object-oriented programming on Object-oriented programming systems, languages, and applications , 1990 .

[9]  Andy Schürr New Type Checking Rules for OCL Expressions , 2001, Modellierung.

[10]  Nazareno Aguirre,et al.  An Equational Calculus for Alloy , 2004, ICFEM.

[11]  Terry A. McKee,et al.  OOPSLA '89 Conference proceedings on Object-oriented programming systems, languages and applications , 1989 .

[12]  Thomas Baar,et al.  Refactoring OCL annotated UML class diagrams , 2005, MoDELS'05.

[13]  Emina Torlak,et al.  A type system for object models , 2004, SIGSOFT '04/FSE-12.

[14]  Jacob Stein,et al.  Class modification in the GemStone object-oriented DBMS , 1987, OOPSLA '87.

[15]  Frank Tip,et al.  Refactoring for generalization using type constraints , 2003, OOPSLA '03.

[16]  Daniel Jackson,et al.  Alcoa: the Alloy constraint analyzer , 2000, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[17]  Diego Calvanese,et al.  Reasoning on UML class diagrams , 2005, Artif. Intell..

[18]  Marcelo F. Frias,et al.  Fork Algebras in Algebra, Logic and Computer Science , 2002, Fundam. Informaticae.

[19]  Paulo Borba,et al.  An Abstract Equivalence Notion for Object Models , 2005, Electron. Notes Theor. Comput. Sci..

[20]  Paul L. Bergstein,et al.  Managing the Evolution of Object-Oriented Systems , 1994 .

[21]  Martin Gogolla,et al.  Equivalence Rules for UML Class Diagrams , 1998 .

[22]  Scott J. Ambler,et al.  Refactoring Databases: Evolutionary Database Design , 2006 .

[23]  A. Nico Habermann,et al.  Beyond schema evolution to database reorganization , 1990, OOPSLA/ECOOP '90.

[24]  Nazareno Aguirre,et al.  Reasoning about static and dynamic properties in alloy , 2005, ACM Trans. Softw. Eng. Methodol..

[25]  Paulo Borba,et al.  A rigorous approach for proving model refactorings , 2005, ASE.

[26]  Daniel Jackson,et al.  Software Abstractions - Logic, Language, and Analysis , 2006 .

[27]  Jay Banerjee,et al.  Semantics and implementation of schema evolution in object-oriented databases , 1987, SIGMOD '87.

[28]  Thomas Baar,et al.  Refactoring OCL annotated UML class diagrams , 2005, MoDELS'05.

[29]  M.R. Frias,et al.  DynAlloy: upgrading alloy with actions , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[30]  Kevin Lano,et al.  Semantics and Transformations for UML Models , 1998, UML.

[31]  Augusto Sampaio,et al.  Algebraic reasoning for object-oriented programming , 2004, Sci. Comput. Program..

[32]  Thomas Ruhroth Refactoring Object-Z specifications , 2006 .