Abstract
Design patterns has been used very effectively in object-oriented design for a long time. Refactoring is also widely used for producing better maintainable and reusable designs and programs. In this paper, we investigate how design patterns and refactoring rules are used in a formal method by formulating and showing them as refinement laws in the calculus of refinement of component and object-oriented systems, known as rCOS. We also combine refactoring and design patterns to provide some big-step rules of pattern-directed refactoring.
Supported by NNSF of China (No. 60718002), and Projects on HighQSofD and HTTS funded by Macao S&T Fund.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Refactoringtools, http://www.refactoring.com/tools.html
Cavalcanti, A.L.C., Naumann, D.: A weakest precondition semantics for refinement of object-oriented programs. IEEE Trans. on Software Engineering 26(8), 713–728 (2000)
Chen, Z., He, J., Liu, Z., Zhan, N.: A model of component-based programming. In: Arbab, F., Sirjani, M. (eds.) FSEN 2007. LNCS, vol. 4767, pp. 191–206. Springer, Heidelberg (2007)
Chen, Z., Liu, Z., Stolz, V.: The rCOS tool. In: Cuellar, J., Maibaum, T.S.E. (eds.) FM 2008. LNCS, vol. 5014. Springer, Heidelberg (2008)
Chen, Z., Liu, Z., Ravn, A.P., Stolz, V., Zhan, N.: Refinement and verification in component-based model driven design. Technical Report 388, UNU/IIST, Macao SAR, China, Science of Computer Programming (submitted, 2008)
Cornélio, M.L., Cavalcanti, A.L.C., Sampaio, A.C.A.: Refactoring by Transformation. In: Pro. of REFINE 2002. ENTCS, vol. 70. Elsevier, Amsterdam (2002) (invited Paper)
Favre, L., Pereira, C.: Formalizing mda-based refactorings. In: 19th Australian Software Engineering Conference, pp. 377–386. IEEE, Los Alamitos (2008)
Fowler, M.: Refectoring, Improving the Design of Existing Code. Addison-Wesley, Reading (2000)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns, Elements of Reusable Object-Oriented Software. Addison Wesley, Reading (1994)
He, J., Liu, Z., Li, X., Qin, S.: A relational model for object-oriented designs. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 415–436. Springer, Heidelberg (2004)
Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice-Hall, Englewood Cliffs (1998)
Jifeng, H., Li, X., Liu, Z.: rCOS: A refinement calculus for object systems. Theoretical Computer Science 365, 109–142 (2006)
Kerievsky, J.: Refactoring to Patterns. Addison-Wesley, Reading (2004)
Larman, C.: Applying UML and Patterns. Prentice-Hall International, Englewood Cliffs (2001)
Long, Q., He, J., Liu, Z.: Refactoring and pattern-directed refactoring: A formal perspective. Technical Report 318, UNU/IIST, Macao SAR, China (2005)
Long, Q., Qiu, Z., Liu, Z., Shao, L., He, J.: POST: A case study for an incremental development in rCOS. In: Van Hung, D., Wirsing, M. (eds.) ICTAC 2005. LNCS, vol. 3722, pp. 498–513. Springer, Heidelberg (2005)
Markovic, S., Baar, T.: Refactoring OCL annotated UML class diagrams. Journal Software and Systems Modeling 7, 25–47 (2008)
Roberts, D.B.: Practical Analysis for Refactoring. PhD thesis, University of Illinois at Urbana Champain (1999)
Silva, L., Sampaio, A., Liu, Z.: Laws of object-orientation with reference semantics (submitted for publication)
Tokuda, L.A.: Evolving Object-Oriented Designs with Refactoring. PhD thesis, University of Texas at Austin (1999)
Wake, W.C.: Refactoring Workbook. Pearson Education, London (2004)
Zhao, L., Liu, X., Liu, Z., Qiu, Z.: Graph transformations for object-oriented refinement. Formal Aspects of Computing (2008) doi:10.1007/s00165-007-0067-y
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Quan, L., Zongyan, Q., Liu, Z. (2008). Formal Use of Design Patterns and Refactoring. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. ISoLA 2008. Communications in Computer and Information Science, vol 17. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-88479-8_23
Download citation
DOI: https://doi.org/10.1007/978-3-540-88479-8_23
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-88478-1
Online ISBN: 978-3-540-88479-8
eBook Packages: Computer ScienceComputer Science (R0)