Advertisement

A Refactoring Constraint Language and Its Application to Eiffel

  • Friedrich Steimann
  • Christian Kollee
  • Jens von Pilgrim
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6813)

Abstract

We generalize previous work on constraint-based refactoring and develop it into the definition of a constraint language allowing the specification of refactorings in a completely declarative way. We present a compiler that transforms specifications in our language to plug-ins for an IDE that, together with an accompanying framework providing the necessary infrastructure, implement the specified refactoring tools. We evaluate our approach by presenting specifications of three different refactorings for the Eiffel programming language, and by applying the resulting refactoring tools to several sample programs. Outcome suggests that our approach is indeed viable.

Keywords

Program Element Constraint System Soft Constraint Sample Program Constraint Solver 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Andreae, C., Noble, J., Markstrum, S., Millstein, T.D.: A framework for implementing plug-gable type systems. In: Proc. of OOPSLA, pp. 57–74 (2006)Google Scholar
  2. 2.
    Ceri, S., Gottlob, G., Tanca, L.: What you always wanted to know about Datalog (and never dared to ask). IEEE Trans. Knowl. 1(1), 146–166 (1989)CrossRefGoogle Scholar
  3. 3.
    Daniel, B., Dig, D., Garcia, K., Marinov, D.: Automated testing of refactoring engines. In: Proc. of ESEC/SIGSOFT FSE, pp. 185–194 (2007)Google Scholar
  4. 4.
    Donovan, A., Kiezun, A., Tschantz, M.S., Ernst, M.D.: Converting Java programs to use generic libraries. In: Proc. of OOPSLA, pp. 15–34 (2004)Google Scholar
  5. 5.
  6. 6.
    ECMA Standard Eiffel: Analysis, Design and Programming Language ECMA-367, 2nd edn. (2006)Google Scholar
  7. 7.
  8. 8.
    Fowler Refactoring, M.: Improving the Design of Existing Code. Addison-Wesley, Reading (1999)Google Scholar
  9. 9.
    Fuhrer, R., Tip, F., Kieżun, A., Dolby, J., Keller, M.: Efficiently Refactoring Java Applications to Use Generic Libraries. In: Gao, X.-X. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 71–96. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  10. 10.
    Gobo Eiffel Tools and Libraries, http://www.gobosoft.com
  11. 11.
    WG Griswold Program Restructuring as an Aid to Software Maintenance PhD Disserta-tion, University of Washington (1992)Google Scholar
  12. 12.
    Gosling, J., Joy, B., Steele, G., Bracha, G.: The Java Language Specification, http://java.sun.com/docs/books/jls/
  13. 13.
    Junker, U.: QUICKXPLAIN: Preferred explanations and relaxations for over-constrained problems. In: Proc of AAAI, pp. 167–172 (2004)Google Scholar
  14. 14.
    Kegel, H., Steimann, F.: Systematically refactoring inheritance to delegation in Java. In: Proc. of ICSE, pp. 431–440 (2008)Google Scholar
  15. 15.
    Kiezun, A., Ernst, M.D., Tip, F., Fuhrer, R.M.: Refactoring for parameterizing Java classes. In: Proc. of ICSE, pp. 437–446 (2007)Google Scholar
  16. 16.
    Martin, R.: Agile Software Development: Principles, Patterns, and Practices. Prentice Hall, Englewood Cliffs (2003)Google Scholar
  17. 17.
    Marriott, K., Stuckey Programming, P.J.: with Constraints. MIT Press, Cambridge (1998)Google Scholar
  18. 18.
    Mens, T., Van Eetvelde, N., Demeyer, S., Janssens, D.: Formalizing refactorings with graph transformations. J. Softw. Maint. Evol. 17(4), 247–276 (2005)CrossRefGoogle Scholar
  19. 19.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall International, Englewood Cliffs (1997)zbMATHGoogle Scholar
  20. 20.
    Meyers, S., Duby, C.K., Reiss, S.P.: Constraining the structure and style of object-oriented programs. In: Proc of PPCP, pp. 200–209 (1993)Google Scholar
  21. 21.
    Opdyke, W.: Refactoring Object-Oriented Frameworks. PhD Dissertation, University of Illinois at Urbana-Champaign (1992)Google Scholar
  22. 22.
    Schäfer, M., Ekman, T., de Moor, O.: Sound and extensible renaming for Java. In: Proc. of OOPSLA, pp. 277–294 (2008)Google Scholar
  23. 23.
    Schäfer, M., Verbaere, M., Ekman, T., de Moor, O.: Stepping stones over the refactoring rubicon. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 369–393. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  24. 24.
    Schäfer, M., Dolby, J., Sridharan, M., Torlak, E., Tip, F.: Correct refactoring of concurrent java code. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 225–249. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  25. 25.
    Schäfer, M., de Moor, O.: Specifying and implementing refactorings. In: Proc. of OOPSLA, pp. 286–301 (2010)Google Scholar
  26. 26.
    Steimann, F., Thies, A.: From public to private to absent: Refactoring java programs under constrained accessibility. In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 419–443. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  27. 27.
    Steimann, F., von Pilgrim, J.: Refactoring with foresight, http://www.feu.de/ps/docs/Foresight.pdf
  28. 28.
    Tamura Cream, N.: Class Library for Constraint Programming in Java, http://bach.istc.kobe-u.ac.jp/cream/
  29. 29.
    Tip, F., Kiezun, A., Bäumer, D.: Refactoring for generalization using type constraints. In: Proc. of OOPSLA, pp. 13–26 (2003)Google Scholar
  30. 30.
    Tip, F.: Refactoring using type constraints. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 1–17. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  31. 31.
    Van Hentenryck, P.: Constraint Satisfaction in Logic Programming. MIT Press, Cambridge (1989)Google Scholar
  32. 32.
    Verbaere, M., Ettinger, R., de Moor, O.: JunGL: a scripting language for refactoring. In: Proc. of ICSE, pp. 172–181 (2006)Google Scholar
  33. 33.
  34. 34.
    Xtext — Language Development Framework, http://www.eclipse.org/Xtext
  35. 35.
    A Type System Framework for Xtext, http://eclipselabs.org/p/xtext-typesystem

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Friedrich Steimann
    • 1
  • Christian Kollee
    • 1
  • Jens von Pilgrim
    • 1
  1. 1.Lehrgebiet Programmiersysteme FernuniversitätHagenGermany

Personalised recommendations