7 research outputs found

    Formal specification of the variants and behavioural features of design patterns

    Get PDF
    The formal specification of design patterns is widely recognized as being vital to their effective and correct use in software development. It can clarify the concepts underlying patterns, eliminate ambiguity and thereby lay a solid foundation for tool support. This paper further advances a formal meta-modelling approach that uses first order predicate logic to specify design patterns. In particular, it specifies both structural and behavioural features of design patterns and systematically captures the variants in a well-structured format. The paper reports a case study involving the formal specification of all 23 patterns in the Gang of Four catalog. It demonstrates that the approach improves the accuracy of pattern specifications by covering variations and clarifying the ambiguous parts of informal descriptions

    On the Composability of Design Patterns

    Get PDF
    In real applications, design patterns are almost always to be found composed with each other. It is crucial that these compositions be validated. This paper examines the notion of validity, and develops a formal method for proving or disproving it, in a context where composition is performed with formally defined operators on formally specified patterns. In particular, for validity, we require that pattern compositions preserve the features, semantics and soundness of the composed patterns. The application of the theory is demonstrated by a formal analysis of overlap-based pattern compositions and a case study of a real pattern-oriented software design

    Code Generation Using Design Patterns

    Get PDF
    Tato práce se zabývá generováním zdrojových kódů aplikací pomocí návrhových vzorů. Práce popisuje problematiku specifikace návrhových vzorů a jejich užití při generování kódů aplikací. Podstatná část práce se věnuje popisu návrhových vzorů, jejich dělení, účelu použití, ale i způsobům specifikace vzorů. Detailně popisuje nejčastěji používané formální specifikace návrhových vzorů, jejich možnosti využití při generování kódu a návrh algoritmu pro vyhledání podobných struktur vzorů ve zdrojovém kódu.This thesis describes code generation using design patterns. It deals with questions of specification of design patterns and their usage in code generation. The main part of thesis follows describtions of design patterns, their categorization, usage purpose and main ways of design patterns definitions. It describes the most often used formal design patterns specifications, their possible usage in code generation and design of algorithm for searching similar structures of patterns in source code in detail.

    Formal Specification Of Design Patterns: A Comparison Of Three Existing Approaches And Proposing Two-Level Grammars As A New Approach

    Get PDF
    Patterns are Object-Oriented reusable units. The principal idea behind patterns is to capture and reuse the abstractions that have been formed by expert programmers and designers to solve problems that occur in particular contexts. These abstractions capture the valuable experiences of experts in solving problems. Although patterns are currently being used successfully, there is no general agreement among the software community as to how patterns should be formalized or represented. Various formal specification schemes have been proposed to complement the natural language description of patterns in order to alleviate the ambiguities inherent in the natural language description by rigorously reasoning about the structural and behavioral aspects of patterns. Existing formal specification languages of design patterns have generally failed to provide a standard definition, specification, or representation for patterns because there is no general agreement as to how patterns should be formalized. Also, each formal specification is generally based on a different mathematical formalism and when pattern users want to understand a pattern, first they have to understand the respective mathematical formalism. In addition to comparing three existing formal specification schemes, the main objective of this research work was to lay the foundation for developing a formal specification scheme that could be understandable without having to delve into the details of the underlying formalism. This research work attempted to capture and represent the structural aspects of design patterns since capturing the behavioral aspects of design patterns is a semantic issue and is beyond the scope of this work. Two-Level Grammar (TLG) was used to capture and represent the structural aspects of design patterns. This study was conducted using the GoF design patterns [Gamma et al. 1995]. It has already been demonstrated that TLGs have the capability to represent the building blocks of object-oriented software systems. The primary advantage of TLGs in defining design patterns is that specifications written in TLGs are understandable due to their natural-language-like vocabulary [Edupuganty 1987] [Lee 2003] [Maluszynski 1984]. The TLG representation of the observer pattern was developed to gauge the feasibility of the proposed pattern representation scheme. TLGs could help pattern users understand the formalized version of patterns more readily compared to other formal specification methods that are difficult to understand due to their arcane mathematical notations.Computer Science Departmen

    a bottom-up approach for model-based software development

    Get PDF
    Models in software engineering are descriptive structures so that transformations can connect their contents at a semantic level. In model-based software development, algorithmic program code usually exists alongside models - derived from them or with the purpose to amend them. While thus both kinds of notations must be considered by developers, no consistent mapping is given since transformations between models and code are usually unidirectional for code generation. This impedes a continuous integration of both, limits the applicability of models, and prevents error tracking and monitoring at run time with respect to models. In this thesis, the approach of embedded models is introduced. Embedded models define patterns in program code whose elements have formal relations to models and can be executed by reflection at the same time. Model specifications are thus embedded in implementations and can be accessed by bidirectional transformations for design, verification, execution, and monitoring. The thesis focuses on the development of such patterns and their precise description as well as on the connection to other program code surrounding embedded models. Implementations are described for two modeling domains, state machines and process models, including tools for design, verification, execution, monitoring, and design recovery. The approach is evaluated with two case studies, the modeling of a real-world load generator for performance tests and the development of model-based educational graphical scenarios for university teaching. Both case studies show that the approach is valid and fulfills its purpose for a certain class of applications. Focusing on the integration in implementations, embedded models are thus a bottom-up approach for model-based software development

    Unterstützung von Entwurfsmustern im Quelltext durch bedeutungsorientierte Dokumentation

    Get PDF
    Die Bedeutung erweiterbarer und wartbarer Software wächst mit zunehmender Komplexität des Technologiemarktes. Es gibt zahlreiche Ansätze, Entwickler bei der Erstellung derartiger Software zu unterstützen. Ein Ansatz sind Entwurfsmuster. Sie helfen bei der Reduzierung des Problems des Architekturzerfalls, der durch naturgemäß steigende Entropie und Komplexität während des Software-Entwicklungsprozesses entsteht. Die Anzahl der dokumentierten Entwurfsmuster nimmt durch neue Publikationen stetig zu. Die Auswahl geeigneter Muster für einen Anwendungsfall wird dadurch immer schwieriger. Weiterhin wird die in der Praxis nur bedingt verfügbare und unzureichende Unterstützung für Entwickler bei der Arbeit mit Entwurfsmustern der intensiven Beschäftigung in der Forschung mit diesem Thema nicht gerecht. Diese Arbeit leistet einen Beitrag zur besseren Unterstützung des Entwicklers bei der Arbeit mit Mustern jeglicher Granularität. Die formale Dokumentation dieser wird thematisiert, um anhand dessen die Anwendbarkeit eines Musters für einen objektorientierten Quelltext festzustellen und das Muster mit Hilfe von Quelltexttransformationen werkzeuggestützt anzuwenden. Sie stellt eine durchgängige Methodik bereit für das Anreichern von Programmtext mit semantischen Informationen, die bei der Musterselektion und -anwendung dienlich sind. Die vorgestellte Methodik ist für den Einsatz in Quelltextrezensionen geeignet, deckt also die Forward- und Reengineering-Phase bei der Software-Entwicklung ab.The significance of extendable and maintainable software rises with the growing complexity of technologies. Numerous approaches support developers to create software with these characteristics. One such approach is given with design patterns. They help in reducing the problem of architectural decay, which comes naturally from escalating entropy and complexity during the process of software development. The number of to-date documented design patterns raises through new publications steadily. Thus, the selection of applicable patterns for a given use case becomes more difficult. Besides, the limited support for developers when working with design patterns in practice does not reflect the massive effort put into this issue by academic research. This work contributes to a better support of patterns with arbitrary granularity in the developer’s daily work. Focus lies on the formal documentation of patterns in order to determine their applicability for a given object-oriented source code and to apply them on a tool-basis with help of source code transformations. This work provides a method for enriching source code with semantic information that is seen as valuable for the processes of selecting and applying a pattern. The present work is suited for source code reviews and thus covers the forward and reengineering phase during software development
    corecore