page 1  (10 pages)
2to next section

A Formal Architectural Design Patterns-Based Approach to

Software Understanding ?

P.S.C. Alencar, D.D. Cowan, Thomas Kunz, and C.J.P. Lucena

Department of Computer Science

University of Waterloo

Waterloo, Ont, Canada N2L 3G1

Abstract

Mastering the complexity of programs and systems, particularly distributed systems, should lead to significant improvements in program and system understanding. In this paper we present a formal approach for (distributed) software understanding based on abstraction hierarchies represented by architectural design patterns. This approach allows us to model the distributed software applications through a formal model representing the underlying structure. The representation uses instances of architectural design patterns which can hide details that may be irrelevant in specific situations. The formal models which are produced could be used as a basis for reasoning, code generation, and measuring the "goodness" of a design.

1 Introduction

Complexity is a substantive barrier to program and system understanding, which becomes even more significant when we consider distributed applications. Many of the features of distributed applications, including the complex interprocess interoperability and communication mechanisms, parallelism, nondeterministic execution, lack of global components such as clock and memory, communication delays, and sheer size, contribute to the difficulty of understanding. In addition, the fact that the trace of a thread of execution of a system of interconnected objects is complicated by the callback-driven flow of control add extra dimensions to be considered.

In this paper we present a formal approach to distributed software understanding based on formal architectural design patterns [1, 2] in order to manage

?The work described here has been supported by the Natural Sciences and Engineering Research Council of Canada (NSERC), the National Research Council of Brazil (CNPq), and WATCOM.

the underlying numerous challenges. This formal topdown approach to software understanding emphasizes thus that abstraction hierarchies are used to minimize the complexity involved. In this context a software application is viewed at a very high level of abstraction and, in the course of the understanding process, more difficult or interesting parts of the application are isolated and examined at a lower level of abstraction. Related tools aim to reduce the complexity of the distributed application by grouping processes into process clusters represented by formal distributed architectural design patterns. Process clusters represent subsystem structures, exposing the overall architecture of the subject system, and are invaluable in recovering the original design decisions. The formal abstractions can be automatically derived from the structuring concepts provided by a programming language.

We adopt the view that automatic process clustering can be based on reverse engineering ideas: the reconstruction of a possible design of an application by using the given software system as the only information source. The reconstructed abstract view does not necessarily correspond to that of the application designer, although it is in fact a plausible analysis of the application. This makes reverse engineering particularly valuable in case of a mismatch between specification and implementation. In fact, this is part of our view of the software construction process as we shall discuss later. We are based on the tested hypothesis that reverse engineering tools can be powerful enough to construct abstract hierarchies from a given source [3, 4].

In this way we consider a catalogue of simple and basic sub-structures or recurring high-level patterns for software construction and organization in-the-large (architectural design patterns) as the main vehicle for representing and understanding the software applications. Recent work that emphasizes the effort in deter-