skip to main content
research-article
Free Access

Deferring design pattern decisions and automating structural pattern changes using a design-pattern-based programming system

Published:21 April 2009Publication History
Skip Abstract Section

Abstract

In the design phase of software development, the designer must make many fundamental design decisions concerning the architecture of the system. Incorrect decisions are relatively easy and inexpensive to fix if caught during the design process, but the difficulty and cost rise significantly if problems are not found until after coding begins. Unfortunately, it is not always possible to find incorrect design decisions during the design phase. To reduce the cost of expensive corrections, it would be useful to have the ability to defer some design decisions as long as possible, even into the coding stage. Failing that, tool support for automating design changes would give more freedom to revisit and change these decisions when needed. This article shows how a design-pattern-based programming system based on generative design patterns can support the deferral of design decisions where possible, and automate changes where necessary. A generative design pattern is a parameterized pattern form that is capable of generating code for different versions of the underlying design pattern. We demonstrate these ideas in the context of a parallel application written with the CO2P3S pattern-based parallel programming system. We show that CO2P3S can defer the choice of execution architecture (shared-memory or distributed-memory), and can automate several changes to the application structure that would normally be daunting to tackle late in the development cycle. Although we have done this work with a pattern-based parallel programming system, it can be generalized to other domains.

References

  1. Alur, D., Crupi, J., and Malks, D. 2003. Core J2EE Patterns: Best Practices and Design Strategies, Second ed. Sun Microsystems Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Amza, C., Cox, A., Dwarkadas, S., Keleher, P., Lu, H., Rajamony, R., Yu, W., and Zwaenepoel, W. 1996. TreadMarks: Shared memory computing on networks of workstations. IEEE Comput. 29, 2, 18--28. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Anvik, J. 2002. Evaluating generative parallel design patterns. M.S. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  4. Anvik, J., MacDonald, S., Szafron, D., Schaeffer, J., Bromling, S., and Tan, K. 2002. Generating parallel programs from the wavefront design pattern. In Proceedings of 7th International Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS'02).Google ScholarGoogle Scholar
  5. Apache Jakarta Project. 2005. http://jakarta.apache.org/velocityGoogle ScholarGoogle Scholar
  6. Baniassad, E., Murphy, G., and Schwanninger, C. 2003. Design pattern rationale graphs: Linking design to source. In Proceedings of the 25th International Conference on Software Engineering. 352--362. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Bosch, J. 1998. Design patterns as language constructs. J. Obj.-Orient. Program. 11, 2, 18--32.Google ScholarGoogle Scholar
  8. Bromling, S. 2001. Meta--programming with parallel design patterns. M.S. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  9. Bromling, S., MacDonald, S., Anvik, J., Schaeffer, J., Szafron, D., and Tan, K. 2002. Pattern-based parallel programming. In Proceedings of the International Conference on Parallel Processing (ICPP'02). 257--265. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Bryant, A., Catton, A., De Volder, K., and Murphy, G. 2002. Explicit programming. In Proceedings of the 1st International Conference on Aspect-Oriented Software Development. 10--18. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Budinsky, F., Finnie, M., Vlissides, J., and Yu, P. 1996. Automatic code generation from design patterns. IBM Syst. J. 35, 2, 151--171. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Chalabine, M. and Kessler, C. 2005. Parallelisation of sequential programs by invasive composition and aspect weaving. In Proceedings of the 6th International Workshop on Advanced Parallel Processing Technologies. Lecture Notes in Computer Science, vol. 3756. Springer-Verlag, 131--140. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Chalabine, M. and Kessler, C. 2006. Crosscutting concerns in parallelization by invasive software composition and aspect weaving. In Proceedings of the 39th Annual Hawaii International Conference on System Sciences. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Chalabine, M. and Kessler, C. 2007. A formal framework for automated round-trip software engineering in static aspect weaving and transformations. In Proceedings of the 29th International Conference on Software Engineering. 137--146. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Chen, J. 2004. RMA: A pattern--based J2EE development tool. M.S. thesis, School of Computer Science, University of Waterloo.Google ScholarGoogle Scholar
  16. Chen, J. and MacDonald, S. 2005. RoadMapAssembler: A new pattern-based J2EE development tool. In Proceedings of the IBM Center for Advanced Studies Conference. 113--127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Chen, J. and MacDonald, S. 2006. Exploiting roles and responsibilities to generate code in a distributed design-pattern-based programming system. In Proceedings of the 2006 International Conference on Parallel and Distributed Processing Techniques and Applications. 17--23.Google ScholarGoogle Scholar
  18. Dietz, S., Chamberlain, B., and Snyder, L. 2004. Abstractions for dynamic data distribution. In Proceedings of the 9th International Workshop on High--Level Parallel Programming Models and Supportive Environments (HIPS'04). 42--51.Google ScholarGoogle Scholar
  19. Earl, P. 2004. Types and code generation for use in generative design patterns. M.S. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  20. Florijn, G., Meijers, M., and van Winsen, P. 1997. Tool support for object--oriented patterns. In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP'97). Lecture Notes in Computer Science, vol. 1241. Springer--Verlag, 472--495.Google ScholarGoogle ScholarCross RefCross Ref
  21. Gamma, E., Helm, R., Johnson, R., and Vlissides, J. 1994. Design Patterns: Elements of Reusable Object--Oriented Software. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Geist, A., Beguelin, A., Dongarra, J., Jiang, W., Manchek, R., and Sunderam, V. 1994. PVM: Parallel Virtual Machine: A Users' Guide and Tutorial for Networked Parallel Computing. MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Goswami, D., Singh, A., and Preiss, B. 2001. Building parallel applications using design patterns. In Advances in Software Engineering: Topics in Comprehension, Evolution and Evaluation. Springer--Verlag, Chapter 12, 243--265. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Goswami, D., Singh, A., and Preiss, B. 2002. From design patterns to parallel architectural skeletons. J. Parall. Distribut. Comput. 62, 4, 669--695. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Guo, Z. 2003. Developing network server applications using generative design patterns. M.S. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  26. Hammouda, I. and Harsu, M. 2004. Documenting maintenance tasks using maintenance patterns. In Proceedings of the 8th European Conference on Software Maintenance and Reengineering. 37--47. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Hammouda, I. and Koskimies, K. 2002. A pattern-based J2EE application development environment. J. Nordic Comput. 9, 3, 248--260. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Hammouda, I., Koskinen, J., Pussinen, M., Katara, M., and Mikkonen, T. 2004. Adaptable concern-based framework specialization in UML. In Proceedings of the 19th International Conference on Automated Software Engineering. 78--87. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Hannemann, J. and Kiczales, G. 2002. Design pattern implementation in Java and AspectJ. In Proceedings of 17th Annual ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). 161--173. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Harbulot, B. and Gurd, J. 2004. Using AspectJ to separate concerns in parallel scientific Java code. In Proceedings of the 3rd International Conference on Aspect-Oriented Software Development. 122--131. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Jansen, A. and Bosch, J. 2004. Evaluation of tool support for architectural evolution. In Proceedings of the 19th IEEE International Conference on Automated Software Engineering. 375-- 378. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Jansen, A. and Bosch, J. 2005. Software architecture as a set of architectural design decisions. In Proceedings of the 5th Working IEEE/IFIP Conference on Software Architecture. 109--120. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Johnson, R. and Foote, B. 1988. Designing reusable classes. Journal of Object-Oriented Programming 1, 2, 22--35.Google ScholarGoogle Scholar
  34. Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., and Griswold, W. 2001. An overview of AspectJ. In Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP'01). Lecture Notes in Computer Science, vol. 2072. Springer--Verlag, 327--353. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C. V., Loingtier, J.-M., and Irwin, J. 1997. Aspect-oriented programming. In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP97). Lecture Notes in Computer Science, vol. 1241. Springer-Verlag, 220--242.Google ScholarGoogle Scholar
  36. Klusener, S., Lämmel, R., and Verhoef, C. 2005. Architectural modifications to deployed software. Sci. Comput. Program. 54, 143--211. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Lu, P. 2000. Implementing scoped behaviour for flexible distributed data sharing. IEEE Concurrency 8, 3, 63--73. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. MacDonald, S. 2002. From patterns to frameworks to parallel programs. Ph.D. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  39. MacDonald, S., Anvik, J., Bromling, S., Schaeffer, J., Szafron, D., and Tan, K. 2002. From patterns to frameworks to parallel programs. Parall. Comput. 28, 12, 1663--1683. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. MacDonald, S., Szafron, D., and Schaeffer, J. 1999. Object-oriented pattern--based parallel programming with automatically generated frameworks. In Proceedings of the 5th USENIX Conference on Object-Oriented Technology and Systems (COOTS'99). 29--43. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. MacDonald, S., Szafron, D., Schaeffer, J., Anvik, J., Bromling, S., and Tan, K. 2002. Generative design patterns. In Proceedings of the 17th IEEE International Conference on Automated Software Engineering (ASE2002). 23--34. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. MacDonald, S., Szafron, D., Schaeffer, J., and Bromling, S. 2000. Generating parallel program frameworks from parallel design patterns. In Proceedings of the 6th International Euro-Par Conference. Lecture Notes in Computer Science, vol. 1900. Springer--Verlag, 95--104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Mattson, T., Sanders, B., and Massingill, B. 2004. Patterns for Parallel Programming. Addison-Welsey. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. McNaughton, M., Redford, J., Schaeffer, J., and Szafron, D. 2003. Pattern-based AI scripting using ScriptEase. In Proceeding of the 16th Canadian Conference on Artificial Intelligence. 35--49. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Mehta, P., Amaral, J., and Szafron, D. 2006. Is MPI suitable for a generative design-pattern system? Parall. Comput. 32, 7-8, 616--626. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Murphy, G., Lai, A., Walker, R., and Robillard, M. 2001. Separating features in source code: An exploratory study. In Proceedings of the 23rd International Conference on Software Engineering. 275--284. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Object Technology International, Inc. 2006. Eclipse platform technical overview. http://www.eclipse.org/articles/Whitepaper-Platform-3.1/eclipse-platform-whitepaper.html.Google ScholarGoogle Scholar
  48. Pollack, M. 2000. Code generation using JavaDoc. http://www.javaworld.com/javaworld/jw-0818-javadoc_p.html.Google ScholarGoogle Scholar
  49. Schach, S. 2007. Object-Oriented and Classical Software Engineering, Seventh ed. McGraw-Hill. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. Schaeffer, J., Szafron, D., Lobe, G., and Parsons, I. 1993. The enterprise model for developing distributed applications. IEEE Parall. Distrib. Techn. 1, 3, 85--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. Schmidt, D., Stal, M., Rohnert, H., and Buschmann, F. 2000. Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects. Vol. 2. Wiley & Sons. Google ScholarGoogle ScholarDigital LibraryDigital Library
  52. Siikarla, M. and Systä, T. 2006. Transformational pattern system—some assembly required. In Proceedings of the 5th International Workshop on Graph Transformation and Visual Modeling Techniques. 57--68.Google ScholarGoogle Scholar
  53. Singh, A., Schaeffer, J., and Szafron, D. 1998. Experience with parallel programming using code templates. Concurrency: Practice and Experience 10, 2, 91--120.Google ScholarGoogle ScholarCross RefCross Ref
  54. Siu, S., Simone, M. D., Goswami, D., and Singh, A. 1996. Design patterns for parallel programming. In Proceedings of the International Conference on Parallel and Distributed Processing Techniques and Applications (PDPTA'96). 230--240.Google ScholarGoogle Scholar
  55. Snir, M., Otto, S., Hess-Lederman, S., Walker, D., and Dongarra, J. 1996. MPI: The Complete Reference. MIT Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Sun Microsystems Inc. 2001. Jini architectural overview. http://wwws.sun.com/software/jini/whitepapers/architecture.pdf.Google ScholarGoogle Scholar
  57. Tan, K. 2003. Pattern-based parallel programming in a distributed memory environment. M.S. thesis, Department of Computing Science, University of Alberta.Google ScholarGoogle Scholar
  58. Tan, K., Szafron, D., Schaeffer, J., Anvik, J., and MacDonald, S. 2003. Using generative design patterns to generate parallel code for a distributed memory environment. In Proceedings of the 9th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP 2003). 203--215. Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. van Gurp, J. and Bosch, J. 2002. Design erosion: Problems and causes. J. Syst. Softw. 61, 2, 105--119. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. van Winsen, P. 1996. (re)engineering with object-oriented design patterns. M.S. thesis, Department of Information and Computing Sciences, Utrecht University.Google ScholarGoogle Scholar
  61. Viljamaa, A. and Viljamaa, J. 2002. Creating framework specialization instructions for tool environments. In Proceedings of the Nordic Workshop on Software Development Tools and Techniques.Google ScholarGoogle Scholar
  62. Vlissides, J. 1998. Pattern Hatching: Design Patterns Applied. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. von Dincklage, D. 2003. Making patterns explicit with metaprogramming. In Proceedings of the Second International Conference on Generative Programming and Component Engineering. Lecture Notes in Computer Science, vol. 2830. Springer-Verlag, 287--306. Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Witkin, A. and Kass, M. 1991. Reaction--diffusion textures. In Proceedings of the Conference on Computer Graphics (SIGGRAPH'91) 25, 4, 299--308. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Deferring design pattern decisions and automating structural pattern changes using a design-pattern-based programming system

              Recommendations

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              Full Access

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!