The description of design patterns is usually informal to a large extent. For semiautomatic recognition of design patterns they have to be formally specified. We developed a pattern specification language based on graph grammars and an iterative and scalable inference algorithm.
A pattern rule is defined by a left-hand side (LHS) and a right hand side (RHS). The LHS of the rule describes the structure that has to be found in the ASG if an instance of the pattern exists. The LHS may also contain annotations created by other pattern rules thereby permitting a composition of rules. Rules requiring annotations created by other rules depend on those rules. Furthermore, in the LHS special ASG elements or annotations are designated which trigger the execution of the rule. Triggers and dependencies between rules are used by the inference engine to determine the rule execution order (see below). The right-hand side (RHS) of a pattern rule defines an annotation node and links to certain ASG elements to be created when the LHS could be matched, i.e., an implementation of the pattern could be found.
Each pattern rule is specified in a separate diagram (cf. Fig. 1). The plug-in provides additional pattern catalogue diagrams which display dependencies and trigger relationships between rules. A catalogue of rules is translated into pattern recognition engines used by the pattern inference.
The inference engine uses a pattern dependencies net (PDN) in which pattern rules are organized in levels according to their dependencies and trigger relationships. Based on the PDN the inference engine applies rules scheduled in priority queues. It starts with rules that are independent from other rules.
Successfully applied rules create annotations which in turn trigger other rules at higher levels. This is called the bottom-up mode of the inference engine. Newly triggered rules are scheduled according to their levels in descending order, i.e., higher level rules which produce meaningful results are executed as early as possible.
Scheduled higher level rules may depend on other rules that have not been applied yet, i.e., rules may require annotations created by lower level rules. In this case the inference engine switches from bottom-up to topdown mode and tries to recursively establish all missing annotations by applying the appropriate rules.
The inference engine works semiautomatically because it involves the reverse engineer in the analysis. The reverse engineer may pause the inference at any time and inspect the results produced so far. Furthermore the engineer may modify or manually add (hypothetical) results and continue the inference. The changes are then considered in the further analysis.
The analysis results, i.e., the annotations, are displayed in class diagrams which can be directly obtained from the ASG. Fig. 2 shows a screenshot of the Fujaba Tool Suite with an annotated class diagram after an analysis with the inference engine.
Our current work on the one hand focuses on the recognition of Anti Patterns as a basis for quality evaluation and refactoring. On the other hand we extend our analysis to dynamic behaviour to distinguish between statically similar but dynamically distinguishable design patterns.
Please note that we migrated Fujaba Tool Suite RE to Eclipse. The migrated version is called Reclipse. Now, we only develop Reclipse.
Fujaba Tool Suite RE 4.2.0 available.
Newer versions of the Fujaba Tool Suite RE are available as plug-ins only. They are
typically based on the newest Fujaba Tool Suite releases. You can download them via
the "Manage Plug-Ins" dialog
within the Fujaba Tool Suite or directly through the plug-ins download
page.
The newest Fujaba Tool Suite RE release consists of the following plug-ins:
Title: Fuzzy Logic based Interactive Recovery of Software Design |
Booktitle: Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA |
Written by: J. Niere: |
in: May 2002 |
Volume: Number: |
on pages: 727-728 |
Chapter: |
Editor: |
Publisher: |
Series: |
Address: |
Edition: |
ISBN: |
how published: |
Organization: |
School: |
Institution: |
ISSN: |
Doi: |
File: ICSE2002DocSympProoceedings.pdf |
URL: |
Note:
Abstract:
Eintrag als Bibtex exportieren