Intent-Oriented Design Pattern Formalization Using SPQR

Author(s):  
Jason Smith ◽  
David Stotts

This chapter introduces the system for pattern query and recognition, a collection of formalisms, definitions, and concepts that provides a means for formally describing Design patterns from the viewpoint of design intent. These descriptions enable efficient and effective searching for instances of Design patterns in source code, for purposes of discovery, documentation, validation, or refactoring. SPQR is composed of ?-calculus, a formal denotation semantics for defining relationships between programmatic entities, elemental Design patterns, a collection of binary relationships that define the basis for software design principles, and isotopes, a flexible approach to combining formal design definitions so that they retain their conceptual integrity. It is our intent that the reader be better equipped to contemplate the hierarchical nature of the concepts of programming, and to come away from this discussion with a clearer view of how software is designed, from the small to the large.

Author(s):  
Taher Ahmed Ghaleb ◽  
Khalid Aljasser ◽  
Musab A. Alturki

Design patterns are generic solutions to common programming problems. Design patterns represent a typical example of design reuse. However, implementing design patterns can lead to several problems, such as programming overhead and traceability. Existing research introduced several approaches to alleviate the implementation issues of design patterns. Nevertheless, existing approaches pose different implementation restrictions and require programmers to be aware of how design patterns should be implemented. Such approaches make the source code more prone to faults and defects. In addition, existing design pattern implementation approaches limit programmers to apply specific scenarios of design patterns (e.g. class-level), while other approaches require scattering implementation code snippets throughout the program. Such restrictions negatively impact understanding, tracing, or reusing design patterns. In this paper, we propose a novel approach to support the implementation of software design patterns as an extensible Java compiler. Our approach allows developers to use concise, easy-to-use language constructs to apply design patterns in their code. In addition, our approach allows the application of design patterns in different scenarios. We illustrate our approach using three commonly used design patterns, namely Singleton, Observer and Decorator. We show, through illustrative examples, how our design pattern constructs can significantly simplify implementing design patterns in a flexible, reusable and traceable manner. Moreover, our design pattern constructs allow class-level and instance-level implementations of design patterns.


e-xacta ◽  
2016 ◽  
Vol 9 (1) ◽  
pp. 37
Author(s):  
Cristiano Martins Monteiro ◽  
Flavianne Braga Campos de Lima ◽  
Carlos Renato Storck

<p>A geração automática de código-fonte é uma prática adotada no desenvolvimento de softwares para agilizar, facilitar e padronizar a implementação dos projetos. Embora seja uma prática comum nas fábricas de software, não se conhece uma ferramenta que permita escolher o padrão de projeto a ser usado. O objetivo principal deste trabalho é apresentar um gerador de códigos para o desenvolvimento de sistemas Web a partir de uma modelagem entidade-relacionamento, uma linguagem de programação e um padrão de projeto determinados pelo usuário. Os objetivos específicos são propor uma arquitetura do sistema capaz de adequar e reaproveitar diferentes padrões de projeto, linguagens de programação e projetos cadastrados; permitir que o usuário cadastre, altere, exclua, importe e exporte um projeto; e gerar automaticamente o seu código-fonte e scripts de banco de dados. Este trabalho se justifica pela importância de reduzir erros de codificação; e evitar perca tempo ao realizar atividades rotineiras de implementação de padrões de projeto. Possibilitando assim, maior dedicação no planejamento das regras de negócios e redução de custos. A ferramenta proposta (GCER) foi desenvolvida em linguagem Java com o uso banco de dados Oracle 11g, e seguindo os padrões DAO e MVC. Os resultados foram avaliados através da geração e compilação de códigos de um projeto para cadastro de veículos. A geração com êxito evidencia a viabilidade da ferramenta proposta para a geração automática de códigos no processo de desenvolvimento de software.</p><p>Abstract</p><p>The automatic generation of source code is a practice adopted in the development of software to streamline, facilitate and standardize the implementation of projects. Although it be a common practice in software factories, it is not known a tool able to choose the design pattern to be used. The main objective of this paper is to present a code generator for the development of Web systems from an entity-relationship modeling, a programming language and a design pattern determined by the user. The specific objectives are to propose a system architecture able to suit and reuse different design patterns, programming languages and saved projects; allow the user to insert, update, delete, import and export a project; and automatically generate the source code and database scripts. This work is justified by the importance to reduce errors of coding; and to avoid waste of time in the development of Web systems performing routine tasks. Allowing, then, a greater dedication in the planning of business rules and the reduction of costs. The tool proposed (GCER) was developed in Java with the database using Oracle 11g, and following the DAO and MVC patterns. The results were evaluated by generating and compiling codes of a project for vehicle registration. The successful code generation demonstrate the feasibility of the proposed tool for the automatic generation of code in the software development process.</p>


Author(s):  
Sahana Prabhu Shankar ◽  
Harshit Agrawal ◽  
Naresh E.

Software design is a basic plan of all elements in the software, how they relate to each other in such a way that they meet the user requirements. In software development process, software design phase is an important phase as it gives a plan of what to do and how to do it during the implementation phase. As the technology is evolving and people's needs in the technological field are increasing, the development of software is becoming more complex. To make the development process somewhat easy, it is always better to have a plan which is followed throughout the process. In this way, many problems can be solved in the design phase, for which a number of tools and techniques are present. One is known as Design Patterns. In software engineering, a design pattern is a general solution to commonly occurring problems in software design. A design pattern isn't a finished design that can be transformed directly into code.


Author(s):  
Gary P. Moynihan ◽  
Bin Qiao ◽  
Matthew E. Elam ◽  
Joel Jones

The purpose of this research was to apply an artificial intelligence approach to improve the efficiency of design pattern selection used in the development of object-oriented software. Design patterns provide a potential solution to the limitations occurring with traditional software design approaches. Current methods of design pattern selection tend to be intuitive, and based on the experience of the individual software engineer. This expertise is very specialized and frequently unavailable to many software development organizations. A prototype expert system was developed in order to automate this process of selecting suitable patterns to be applied to the design problem under consideration. It guides the designer through the pattern selection process through inquiry regarding the nature of the design problem. The prototype system also provides the capabilities to browse patterns, view the relationship between patterns, and generate code based on the pattern selected. The routine application of such a system is viewed as a means to improve the productivity of software development by increasing the use of accepted design patterns.


Author(s):  
Gary P. Moynihan ◽  
Bin Qiao ◽  
Matthew E. Elam ◽  
Joel Jones

The purpose of this research was to apply an artificial intelligence approach to improve the efficiency of design pattern selection used in the development of object-oriented software. Design patterns provide a potential solution to the limitations occurring with traditional software design approaches. Current methods of design pattern selection tend to be intuitive, and based on the experience of the individual software engineer. This expertise is very specialized and frequently unavailable to many software development organizations. A prototype expert system was developed in order to automate this process of selecting suitable patterns to be applied to the design problem under consideration. It guides the designer through the pattern selection process through inquiry regarding the nature of the design problem. The prototype system also provides the capabilities to browse patterns, view the relationship between patterns, and generate code based on the pattern selected. The routine application of such a system is viewed as a means to improve the productivity of software development by increasing the use of accepted design patterns.


2021 ◽  
Vol 20 (5s) ◽  
pp. 1-26
Author(s):  
Kyungmin Bae ◽  
Peter Csaba Ölveczky

TTA and PALS are two prominent formal design patterns—with different strengths and weaknesses—for virtually synchronous distributed cyber-physical systems (CPSs). They greatly simplify the design and verification of such systems by allowing us to design and verify their underlying synchronous designs. In this paper we introduce and verify MSYNC as a formal design (and verification) pattern/synchronizer for hierarchical multirate CPSs that generalizes, and combines the advantages of, both TTA and (single-rate and multirate) PALS. We also define an extension of TTA to multirate CPSs as a special case. We show that MSYNC outperforms both TTA and PALS in terms of allowing shorter periods, and illustrate the MSYNC design and verification approach with a case study on a fault-tolerant distributed control system for turning an airplane.


Author(s):  
Perdita Stevens

In software design, patterns—that is, structured, named descriptions of good solutions to common problems in context—have become a popular way of recording and transferring problem-solving expertise. The aim of this chapter is to describe how patterns can help in the field of software maintenance. There are two main uses of patterns in software maintenance. The first is to consider the introduction of a design pattern to an existing design. The second approach is to consider patterns for the maintenance process itself. For example, reengineering patterns describe solutions to common problems in the reengineering of a system, considering issues such as how to split the necessary changes into risk-minimizing steps. We discuss the advantages, pitfalls and practicalities of using patterns in both of these ways.


2022 ◽  
pp. 542-564
Author(s):  
Sahana Prabhu Shankar ◽  
Harshit Agrawal ◽  
Naresh E.

Software design is a basic plan of all elements in the software, how they relate to each other in such a way that they meet the user requirements. In software development process, software design phase is an important phase as it gives a plan of what to do and how to do it during the implementation phase. As the technology is evolving and people's needs in the technological field are increasing, the development of software is becoming more complex. To make the development process somewhat easy, it is always better to have a plan which is followed throughout the process. In this way, many problems can be solved in the design phase, for which a number of tools and techniques are present. One is known as Design Patterns. In software engineering, a design pattern is a general solution to commonly occurring problems in software design. A design pattern isn't a finished design that can be transformed directly into code.


Author(s):  
Bruno Cardoso ◽  
Eduardo Figueiredo

A design pattern is a general reusable solution to a recurring problem in software design. Bad smells are symptoms that may indicate something wrong in the system design or code. Therefore, design patterns and bad smells represent antagonistic structures. They are subject of recurring research and typically appear in software systems. Although design patterns represent good design, their use is often inadequate because their implementation is not always trivial or they may be unnecessarily employed. The inadequate use of design patterns may lead to a bad smell. Therefore, this paper performs an exploratory study in order to identify instances of co-occurrences of design patterns and bad smells. This study is performed over five systems and discovers some co-occurrences between design patterns and bad smells. For instance, we observed the co-occurrences of Command with God Class and Template Method with Duplicated Code. The results of this study make it possible to understand in which situations design patterns are misused or overused and establish guidelines for their better use.


TEM Journal ◽  
2021 ◽  
pp. 1166-1174
Author(s):  
Akshara Pande ◽  
Vivekanand Pant ◽  
Manjari Gupta ◽  
Alok Mishra

The role of design pattern mining is a very significant strategy of re-engineering as with the help of detection one could easily understand complex systems. Of course, identifying a design pattern is not always a simple task. Additionally, pattern recovering methods often encounter problems dealing with space outburst for extensive systems. This paper introduces a new way to discover a design pattern based on an Impact Analysis matrix followed by substring match. UML diagrams corresponding to codes are created using Visual Paradigm Enterprise. Impact Analysis matrices of these UML diagrams are converted to string format. Considering system code string as main string and design pattern string as a substring, the main string is further decomposed. A substring match technique is developed here to discover design patterns in the source code. Overall, this procedure has the potential to convert the representation of system design and design pattern in ingenious shapes. In addition, this method has the advantage of moderation in the size. Therefore, this approach is beneficial for Software professionals and researchers due to its simplicity.


Sign in / Sign up

Export Citation Format

Share Document