Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

An algebra of design patterns

Published: 30 July 2013 Publication History

Abstract

In a pattern-oriented software design process, design decisions are made by selecting and instantiating appropriate patterns, and composing them together. In our previous work, we enabled these decisions to be formalized by defining a set of operators on patterns with which instantiations and compositions can be represented. In this article, we investigate the algebraic properties of these operators. We provide and prove a complete set of algebraic laws so that equivalence between pattern expressions can be proven. Furthermore, we define an always-terminating normalization of pattern expression to a canonical form which is unique modulo equivalence in first-order logic.
By a case study, the pattern-oriented design of an extensible request-handling framework, we demonstrate two practical applications of the algebraic framework. First, we can prove the correctness of a finished design with respect to the design decisions made and the formal specification of the patterns. Second, we can even derive the design from these components.

References

[1]
Alencar, P. S. C., Cowan, D. D., and De Lucena, C. J. P. 1996. A formal approach to architectural design patterns. In Proceedings of the 3rd International Symposium of Formal Methods Europe on Industrial Benefit and Advances in Formal Methods (FME'96). Springer, 576--594.
[2]
Alur, D., Crupi, J., and Malks, D. 2003. Core J2EE Patterns: Best Practices and Design Strategies, 2nd Ed. Prentice Hall.
[3]
Bayley, I. and Zhu, H. 2007. Formalising design patterns in predicate logic. In Proceedings of the 5th IEEE International Conference on Software Engineering and Formal Methods. IEEE Computer Society, 25--36.
[4]
Bayley, I. and Zhu, H. 2008a. On the composition of design patterns. In Proceedings of the 8th International Conference on Quality Software (QSIC'08). IEEE Computer Society, 27--36.
[5]
Bayley, I. and Zhu, H. 2008b. Specifying behavioural features of design patterns in first order logic. In Proceedings of the 32nd IEEE International Conference on Computer Software and Applications (COMPSAC'08). IEEE Computer Society, 203--210.
[6]
Bayley, I. and Zhu, H. 2010a. A formal language of pattern composition. In Proceedings of the 2nd International Conference on Pervasive Patterns (PATTERNS'10). Xpert Publishing Services, 1--6.
[7]
Bayley, I. and Zhu, H. 2010b. Formal specification of the variants and behavioural features of design patterns. J. Syst. Softw. 83, 2, 209--221.
[8]
Bayley, I. and Zhu, H. 2011. A formal language for the expression of pattern compositions. Int. J. Adv. Softw. 4, 3-4, 354--366.
[9]
Blewitt, A., Bundy, A., and Stark, I. 2005. Automatic verification of design patterns in Java. In Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering (ASE'05). ACM Press, New York, 224--232.
[10]
Buschmann, F., Henney, K., and Schmidt, D. C. 2007a. Pattern-Oriented Software Archiecture: On Patterns and Pattern Languages. Vol. 5, John Wiley and Sons Ltd.
[11]
Buschmann, F., Henney, K., and Schmidt, D. C. 2007b. Pattern-Oriented Software Architecture: A Pattern Language for Distributed Computing. Vol. 4, John Wiley and Sons Ltd.
[12]
Dipippo, L. and Gill, C. D. 2005. Design Patterns for Distributed Real-Time Systems. Springer.
[13]
Dong, J., Alencar, P. S., and Cowan, D. D. 2000. Ensuring structure and behavior correctness in design composition. In Proceedings of the IEEE 7th Annual International Conference and Workshop on Engineering Computer Based Systems (ECBS'00). IEEE, 279--287.
[14]
Dong, J., Alencar, P. S., Cowan, D. D., and Yang, S. 2007a. Composing pattern-based components and verifying correctness. J. Syst. Softw. 80, 11, 1755--1769.
[15]
Dong, J., Alencar, P. S., and Cowan, D. D. 1999. Correct composition of design components. In Proceedings of the 4th International Workshop on Component-Oriented Programming in Conjunction with the European Conference on Object-Oriented Programming (ECOOP'99).
[16]
Dong, J., Peng, T., and Zhao, Y. 2010. Automated verification of security pattern compositions. Inf. Softw. Technol. 52, 3, 274C295.
[17]
Dong, J., Peng, T., and Zhao, Y. 2011. On instantiation and integration commutability of design pattern. Comput. J. 54, 1, 164--184.
[18]
Dong, J., Alencar, P. S., and Cowan, D. D. 2004. A behavioral analysis and verification approach to pattern-based design composition. Softw. Syst. Model. 3, 262--272.
[19]
Dong, J., Yang, S., and Zhang, K. 2007b. Visualizing design patterns in their applications and compositions. IEEE Trans. Softw. Engin. 33, 7, 433--453.
[20]
Dong, J., Zhao, Y., and Peng, T. 2007c. Architecture and design pattern discovery techniques - A review. In Proceedings of the International Conference on Software Engineering Research and Practice (SERP'07). Vol. II, CSREA Press, 621--627.
[21]
Douglass, B. P. 2002. Real Time Design Patterns: Robust Scalable Architecture for Real-Time Systems. Addison Wesley, Boston, MA.
[22]
Eden, A. H. 2001. Formal specification of object-oriented design. In proceedings of the International Conference on Multidisciplinary Design in Engineering.
[23]
Fowler, M. 2003. Patterns of Enterprise Application Architecture. Addison Wesley, Boston, MA.
[24]
France, R. B., Kim, D.-K., Ghosh, S., and Song, E. 2004. A UML-based pattern specification technique. IEEE Trans. Softw. Engin. 30, 3, 193--206.
[25]
Gamma, E., Helm, R., Johnson, R., and Vlissides, J. 1995. Design Patterns - Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston, MA.
[26]
Gasparis, E., Eden, A. H., Nicholson, J., and Kazman, R. 2008. The design navigator: Charting Java programs. In Proceedings of the Companion of the 30th International Conference on Software Engineering (ICSE Companion'08). 945--946.
[27]
Grand, M. 1999. Patterns in Java. Vol. 2, John Wiley and Sons, New York.
[28]
Grand, M. 2002a. Java Enterprise Design Patterns. John Wiley and Sons, New York.
[29]
Grand, M. 2002b. Patterns in Java: A Catalog of Reusable Design Patterns Illustrated with UML. Vol. 1. John Wiley and Sons, New York.
[30]
Hanmer, R. S. 2007. Patterns for Fault Tolerant Software. Wiley, West Sussex, UK.
[31]
Hohpe, G. and Woolf, B. 2004. Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. Addison Wesley, Boston, MA.
[32]
Hou, D. and Hoover, H. J. 2006. Using SCL to specify and check design intent in source code. IEEE Trans. Softw. Engin. 32, 6, 404--423.
[33]
Kim, D.-K. and Lu, L. 2006. Inference of design pattern instances in UML models via logic programming. In Proceedings of the 11th International Conference on Engineering of Complex Computer Systems (ICECCS'06). IEEE Computer Society, 47--56.
[34]
Kim, D.-K. and Shen, W. 2007. An approach to evaluating structural pattern conformance of UML models. In Proceedings of the ACM Symposium on Applied Computing (SAC'07). ACM Press, New York, 1404--1408.
[35]
Kim, D.-K. and Shen, W. 2008. Evaluating pattern conformance of UML models: A divide-and-conquer approach and case studies. Softw. Qual. J. 16, 3, 329--359.
[36]
Lano, K., Bicarregui, J. C., and Goldsack, S. 1996. Formalising design patterns. In Proceedings of the BCS-FACS Northern Formal Methods Workshop.
[37]
Lauder, A. and Kent, S. 1998. Precise visual specification of design patterns. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP'99). Lecture Notes in Computer Science, vol. 1445. Springer, 114--134.
[38]
Mapelsden, D., Hosking, J., and Grundy, J. 2002. Design pattern modeling and instantiation using DPML. In Proceedings of the 40th International Conference on Tools Pacific (CRPIT'02). Australian Computer Society, 3--11.
[39]
Mikkonen, T. 1998. Formalizing design patterns. In Proceedings of the 20th International Conference on Software Engineering (ICSE'98). IEEE Computer Society, 115--124.
[40]
Niere, J., Schafer, W., Wadsack, J. P., Wendehals, L., and Welsh, J. 2002. Towards pattern-based design recovery. In Proceedings of the 22nd International Conference on Software Engineering (ICSE'02). IEEE Computer Society, 338--348.
[41]
Nija Shi, N. and Olsson, R. 2006. Reverse engineering of design patterns from Java source code. In Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06). IEEE Computer Society, 123--134.
[42]
Riehle, D. 1997. Composite design patterns. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'97). ACM Press, New York, 218--228.
[43]
Schumacher, M., Fernandez, E., Hybertson, D., and Buschmann, F. 2005. Security Patterns: Integrating Security and Systems Engineering. John Wiley and Sons Ltd, West Sussex, UK.
[44]
Smith, J. M. 2011. The pattern instance notation: A simple hierarchical visual notation for the dynamic visualization and comprehension of software patterns. J. Vis. Lang. Comput. 22, 5, 355--374.
[45]
Steel, C. 2005. Applied J2EE Security Patterns: Architectural Patterns and Best Practices. Prentice Hall PTR, Upper Saddle River, NJ.
[46]
Taibi, T. 2006. Formalising design patterns composition. Softw. IEE Proc. 153, 3, 126--153.
[47]
Taibi, T., Check, D., and Ngo, L. 2003. Formal specification of design patterns-A balanced approach. J. Object Technol. 2, 4.
[48]
Taibi, T. and Ngo, D. C. L. 2003. Formal specification of design pattern combination using BPSL. Inf. Softw. Technol. 45, 3, 157--170.
[49]
Vlissides, J. 1998. Notation, notation, notation. C++ Report.
[50]
Voelter, M., Kircher, M., and Zdun, U. 2004. Remoting Patterns. John Wiley and Sons, West Sussex, UK.
[51]
Zhu, H. 2010. On the theoretical foundation of meta-modelling in graphically extended BNF and first order logic. In Proceedings of the 4th IEEE Symposium on Theoretical Aspects of Software Engineering (TASE'10). IEEE Computer Society, 95--104.
[52]
Zhu, H. 2012. An institution theory of formal meta-modelling in graphically extended BNF. Frontier Comput. Sci. 6, 1, 40--56.
[53]
Zhu, H. and Bayley, I. 2010. Laws of pattern composition. In Proceedings of 12th International Conference on Formal Engineering Methods (ICFEM'10). Lecture Notes in Computer Science, vol. 6447, Springer, 630--645.
[54]
Zhu, H., Bayley, I., Shan, L., and Amphlett, R. 2009a. Tool support for design pattern recognition at model level. In Proceedings of the 33rd Annual IEEE International Conference on Computer Software and Applications (COMPSAC'09). IEEE Computer Society, 228--233.
[55]
Zhu, H. and Shan, L. 2006. Well-formedness, consistency and completeness of graphic models. In Proceedings of the 9th International Conference on Computer Modeling and Simulation (UKSIM'06). United Kingdom Simulation Society, 47--53.
[56]
Zhu, H., Shan, L., Bayley, I., and Amphlett, R. 2009b. A formal descriptive semantics of UML and its applications. In UML 2 Semantics and Applications, K. Lano, Ed. John Wiley and Sons.

Cited By

View all
  • (2022)Modeling and specifying formally compound MAPE pattern for self-adaptive IoT systemsInnovations in Systems and Software Engineering10.1007/s11334-021-00409-318:4(505-521)Online publication date: 1-Dec-2022
  • (2022)Formalizing model transformation patternsJournal of Software: Evolution and Process10.1002/smr.240634:2Online publication date: 9-Feb-2022
  • (2020)Pattern-Based Approach to Modelling and Verifying System Security2020 IEEE International Conference on Service Oriented Systems Engineering (SOSE)10.1109/SOSE49046.2020.00018(92-102)Online publication date: Aug-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Software Engineering and Methodology
ACM Transactions on Software Engineering and Methodology  Volume 22, Issue 3
In memoriam, fault detection and localization, formal methods, modeling and design
July 2013
414 pages
ISSN:1049-331X
EISSN:1557-7392
DOI:10.1145/2491509
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 30 July 2013
Accepted: 01 May 2012
Revised: 01 April 2012
Received: 01 December 2011
Published in TOSEM Volume 22, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Design patterns
  2. algebra
  3. equational reasoning
  4. formal method
  5. pattern composition
  6. software design methodology

Qualifiers

  • Research-article
  • Research
  • Refereed

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)1
Reflects downloads up to 06 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Modeling and specifying formally compound MAPE pattern for self-adaptive IoT systemsInnovations in Systems and Software Engineering10.1007/s11334-021-00409-318:4(505-521)Online publication date: 1-Dec-2022
  • (2022)Formalizing model transformation patternsJournal of Software: Evolution and Process10.1002/smr.240634:2Online publication date: 9-Feb-2022
  • (2020)Pattern-Based Approach to Modelling and Verifying System Security2020 IEEE International Conference on Service Oriented Systems Engineering (SOSE)10.1109/SOSE49046.2020.00018(92-102)Online publication date: Aug-2020
  • (2019)DESENACM Transactions on Software Engineering and Methodology10.1145/336566429:1(1-50)Online publication date: 16-Dec-2019
  • (2018)A Templating System to Generate ProvenanceIEEE Transactions on Software Engineering10.1109/TSE.2017.265974544:2(103-121)Online publication date: 1-Feb-2018
  • (2018)Discovering and Investigating Cyberpatterns: The Road Map to Link Data Analytics with Reusable KnowledgeIEEE Systems, Man, and Cybernetics Magazine10.1109/MSMC.2018.28212004:3(14-22)Online publication date: Jul-2018
  • (2018)Knowledge Patterns to Support Ergonomic Treatment of Human Error: Technology TErEHAdvances in Human Error, Reliability, Resilience, and Performance10.1007/978-3-319-94391-6_9(88-98)Online publication date: 24-Jun-2018
  • (2017)On the Composibility of Design Patterns: Extended Abstract2017 IEEE 41st Annual Computer Software and Applications Conference (COMPSAC)10.1109/COMPSAC.2017.177(369-370)Online publication date: Jul-2017
  • (2017)Design pattern detection based on the graph theoryKnowledge-Based Systems10.1016/j.knosys.2017.01.007120:C(211-225)Online publication date: 15-Mar-2017
  • (2017)The state of the art on design patternsJournal of Systems and Software10.1016/j.jss.2016.11.030125:C(93-118)Online publication date: 1-Mar-2017
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media