Towards a formal model of patterns and pattern languages

Abstract Context: Software patterns are solutions to recurring design problems. Patterns behave socially in the forms of Pattern Languages (PLs) to resolve problems. In a simple statement, a PL is a network of related patterns which provides a step-by-step process to solve a given problem in a specific context. Despite the popularity of applying PLs in practice, lack of formal basis on the patterns’ inter-relationships in general, and PLs in particular, makes development of supporting tools difficult. Objective: Based on the algebra of design patterns, we aimed at presenting a new formalism for patterns and PLs. Method: We revised and extended the Graphic extension of EBNF (GEBNF) and applied it to model Unified Modeling Language (UML) class and sequence diagrams which are required to model the popular design patterns. Also, we presented the formal semantics of commonly used patterns’ inter-relationships which pave the way for presenting our PL formalism. To show the applicability of our presented formalism on patterns and PLs, we presented the formal model of the Broker PL as a case study. Results: Use of the presented formalism to model patterns and PLs will make them more expressive, readable, and understandable as well. Conclusion: We have proposed a formalism for defining a PL in a more accurate manner. This formalism facilitates formal verification of patterns and PLs, particularly when it is intended to build a tool for such verification.

[1]  Brian Huston,et al.  The effects of design pattern application on metric scores , 2001, J. Syst. Softw..

[2]  Laurie A. Williams,et al.  How have we evaluated software pattern application? A systematic mapping study of research design practices , 2015, Inf. Softw. Technol..

[3]  Hong Zhu,et al.  Specifying Behavioural Features of Design Patterns in First Order Logic , 2008, 2008 32nd Annual IEEE International Computer Software and Applications Conference.

[4]  Mark Saaltink,et al.  The Z/EVES System , 1997, ZUM.

[5]  David Chek Ling Ngo,et al.  Formal specification of design pattern combination using BPSL , 2003, Inf. Softw. Technol..

[6]  Frank Buschmann,et al.  Pattern-Oriented Software Architecture, a Pattern Language for Distributed Computing , 2007 .

[7]  Douglas C. Schmidt,et al.  Applying patterns to develop extensible ORB middleware , 1999, IEEE Commun. Mag..

[8]  Juan de Lara,et al.  A language-independent and formal approach to pattern-based modelling with support for composition and analysis , 2010, Inf. Softw. Technol..

[9]  Ivan Kurtev,et al.  State of the Art of QVT: A Model Transformation Language Standard , 2008, AGTIVE.

[10]  Tibor Gyimóthy,et al.  Myth or Reality? Analyzing the Effect of Design Patterns on Software Maintainability , 2012 .

[11]  Amnon H. Eden,et al.  Codecharts: Roadmaps and blueprints for object-oriented programs , 2011 .

[12]  Bahman Zamani,et al.  Formalizing Patterns and Pattern Languages: A Case Study Approach , 2016 .

[13]  Ian Bayley,et al.  Formalising Design Patterns in Predicate Logic , 2007, Fifth IEEE International Conference on Software Engineering and Formal Methods (SEFM 2007).

[14]  Peter Linz,et al.  An Introduction to Formal Languages and Automata , 1997 .

[15]  Hong Zhu,et al.  On the Composition of Design Patterns , 2008, 2008 The Eighth International Conference on Quality Software.

[16]  B. F. Castro Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerlad, Peter; Stal, Michael. Pattern-oriented software architecture: a system of patterns, John Wiley & Sons Ltd, 1996 , 1997 .

[17]  Rick Kazman,et al.  Modeling and visualizing object-oriented programs with Codecharts , 2013, Formal Methods Syst. Des..

[18]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[19]  Walter Zimmer,et al.  Relationships between design patterns , 1995 .

[20]  Martin Fowler,et al.  Patterns of Enterprise Application Architecture , 2002 .

[21]  Bahman Zamani,et al.  Design Patterns: Current Challenges, Trends, and Research Directions , 2016 .

[22]  Douglas C. Schmidt,et al.  Pattern-Oriented Software Architecture, Patterns for Concurrent and Networked Objects , 2013 .

[23]  Hong Zhu,et al.  An algebra of design patterns , 2013, TSEM.

[24]  James Noble,et al.  Classifying relationships between object-oriented design patterns , 1998, Proceedings 1998 Australian Software Engineering Conference (Cat. No.98EX233).

[25]  Peter Linz,et al.  An Introduction to Formal Languages and Automata , 2011 .

[26]  Maged Elaasar,et al.  An approach to design pattern and anti-pattern detection in mof-based modeling languages , 2012 .

[27]  Jing Dong,et al.  Visualizing design patterns with a UML profile , 2003, IEEE Symposium on Human Centric Computing Languages and Environments, 2003. Proceedings. 2003.

[28]  Manuel Wimmer,et al.  Generating Metamodels from Grammars by Chaining Translational and By-Example Techniques , 2013, MDEBE@MoDELS.

[29]  Bahman Zamani,et al.  On verifying the use of a pattern language in model driven design , 2009 .

[30]  Gregory Butler,et al.  Pattern Language Verification in Model Driven Design , 2013, Inf. Sci..

[31]  S. R. Kodituwakku,et al.  Pattern categories: a mathematical approach for organizing design patterns , 2001 .

[32]  Hongji Yang,et al.  A Framework of Patterns Applicability in Software Development , 2014, 2014 IEEE 38th International Computer Software and Applications Conference Workshops.

[33]  Uwe Zdun Systematic pattern selection using pattern language grammars and design space analysis , 2007 .

[34]  Hong Zhu,et al.  Formal specification of the variants and behavioural features of design patterns , 2010, J. Syst. Softw..

[35]  Robert B. France,et al.  A UML-based pattern specification technique , 2004, IEEE Transactions on Software Engineering.

[36]  Manfred Nagl,et al.  Applications of Graph Transformations with Industrial Relevance, Third International Symposium, AGTIVE 2007, Kassel, Germany, October 10-12, 2007, Revised Selected and Invited Papers , 2008, Applications of Graph Transformations with Industrial Relevance.

[37]  Rick Kazman,et al.  Automated verification of design patterns: A case study , 2014, Sci. Comput. Program..

[38]  Toufik Taibi Design Pattern Formalization Techniques , 2007 .

[39]  Amnon H. Eden,et al.  A Theory of Object-Oriented Design , 2002, Inf. Syst. Frontiers.

[40]  Hong Zhu,et al.  An institution theory of formal meta-modelling in graphically extended BNF , 2012, Frontiers of Computer Science.

[41]  Douglas C. Schmidt,et al.  Software patterns , 1996, CACM.

[42]  Shouvik Dey Formal specification of structural and behavioral aspects of design patterns , 2010, J. Object Technol..

[43]  Jing Dong,et al.  Automated verification of security pattern compositions , 2010, Inf. Softw. Technol..

[44]  David A. Carrington,et al.  A formalism to describe design patterns based on role concepts , 2009, Formal Aspects of Computing.

[45]  Paulo S. C. Alencar,et al.  Composing pattern-based components and verifying correctness , 2007, J. Syst. Softw..

[46]  Kevin Lano,et al.  Design Patterns Formalization Techniques , 2007 .

[47]  James Coplien,et al.  Sequences as a basis for pattern language composition , 2005, Sci. Comput. Program..

[48]  Hector J. Levesque,et al.  Knowledge Representation and Reasoning , 2004 .

[49]  Brahim Hamid,et al.  A Modeling and Formal Approach for the Precise Specification of Security Patterns , 2014, ESSoS.

[50]  Heiko Behrens,et al.  Xtext: implement your language faster than the quick and dirty way , 2010, SPLASH/OOPSLA Companion.

[51]  Alex Blewitt,et al.  Spine: Language for Pattern Verification , 2007 .

[52]  Amnon H. Eden,et al.  Towards a Mathematical Foundation for Design Patterns , 1999 .

[53]  Hong Zhu,et al.  A Formal Language for the Expression of Pattern Compositions , 2012 .