Fujaba Tool Suite RE
Design Patterns Recognition with the Fujaba Tool Suite
When reverse engineering software systems the first important task is to understand the
systems source code. Design patterns are used in forward engineering as good solutions
to recurring problems and form a common vocabulary among developers. Thus, recognizing
implementations of design patterns in existing software systems helps the reverse
engineer to understand the system.
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.
Pattern Specification
The PatternSpecification plug-in provides a graphical editor for the specification of
patterns. We specify patterns as graph transformation rules, with respect to the
abstract syntax graph (ASG) of a systems source code. Applying pattern rules results
in enriching the ASG with annotation nodes which may be linked to an arbitrary number
of ASG elements. Thus, annotation nodes mark pattern implementations recognized by
pattern rules.
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.
Figure 1:A pattern rule in the Fujaba Tool Suite
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.
Pattern Inference
The pattern rules are applied by an inference algorithm which is implemented by the
InferenceEngine plug-in. After parsing the source code of the system into an ASG the
inference engine is started by loading a catalogue of pattern rules.
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.
Figure 2:Analysis results displayed in a class diagram
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.
Current and Future Work
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.
Download
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:
Documents
Publications concerning Fujaba Tool Suite RE and the FINITE Project
L. Wendehals:
Struktur- und verhaltensbasierte Entwurfsmustererkennung. PhD thesis, University of Paderborn, Paderborn, Germany, September 2007 . In German.
[
Show BibTeX]
@phdthesis{Wen07,
author = {L. Wendehals},
title = {Struktur- und verhaltensbasierte Entwurfsmustererkennung},
school = {University of Paderborn, Paderborn, Germany},
year = {2007}
}
[
URL]
L. Wendehals, A. Orso:
Recognizing Behavioral Patterns at Runtime using Finite Automata. In
Proc. of the 4th ICSE 2006 Workshop on Dynamic Analysis (WODA), Shanghai, China, pp. 33-40. ACM Press, May 2006
[
PDF] [
Show BibTeX]
@inproceedings{WO06_ag,
author = {L. Wendehals AND A. Orso},
title = {Recognizing Behavioral Patterns at Runtime using Finite Automata},
booktitle = {Proc. of the 4th ICSE 2006 Workshop on Dynamic Analysis (WODA), Shanghai, China},
year = {2006}
}
M. Meyer, J. Niere:
Calculation and Visualization of Software Product Metrics. In Holger Giese and Albert Zündorf (eds.):
Proc. of the 3rd International Fujaba Days 2005, Paderborn, Germany, Technical Report, vol. tr-ri-05-259, pp. 41-44. University of Paderborn, September 2005
[
Show Abstract]
The paper presents a further step of the Fujaba Tool Suite RE to support coarse-grained analyses based on metrics and especially polymetric views. Polymetric views are graphical representations of certain metric combinations. Following an interactive reverse engineering approach, polymetric views can be created on demand. The reverse engineer is able to define new polymetric view descriptions and create new views afterwards.
[
PDF] [
Show BibTeX]
@inproceedings{MN05_ag,
author = {M. Meyer AND J. Niere},
title = {Calculation and Visualization of Software Product Metrics},
booktitle = {Proc. of the 3rd International Fujaba Days 2005, Paderborn, Germany},
year = {2005}
}
M. Meyer, L. Wendehals:
Selective Tracing for Dynamic Analyses. In Andy Zaidman and Abdelwahab Hamou-Lhadj and Orla Greevy (eds.):
Proc. of the 1st Workshop on Program Comprehension through Dynamic Analysis (PCODA), co-located with the 12th WCRE, Pittsburgh, Pennsylvania, USA, Technical Report, vol. 2005-12, pp. 33-37. November 2005
[
Show Abstract]
Reverse engineering based on dynamic analyses often uses method traces of the program under analysis. Recording all method traces during a program's execution produces too much data, though for most analyses, a 'slice' of all method traces is sufficient. In this paper, we present an approach to collect runtime information by selectively recording method calls during a program's execution. Only relevant classes and methods are monitored to reduce the amount of information. We developed the JavaTracer which we use for the recording of method calls in Java programs.
[
PDF] [
Show BibTeX]
@inproceedings{MW05_ag,
author = {M. Meyer AND L. Wendehals},
title = {Selective Tracing for Dynamic Analyses},
booktitle = {Proc. of the 1st Workshop on Program Comprehension through Dynamic Analysis (PCODA), co-located with the 12th WCRE, Pittsburgh, Pennsylvania, USA},
year = {2005}
}
L. Wendehals:
Tool Demonstration: Selective Tracer for Java Programs. In
12th Working Conference on Reverse Engineering, Pittsburgh, Pennsylvania, USA. November 2005
[
PDF] [
Show BibTeX]
@inproceedings{Wen05_ag,
author = {L. Wendehals},
title = {Tool Demonstration: Selective Tracer for Java Programs},
booktitle = {12th Working Conference on Reverse Engineering, Pittsburgh, Pennsylvania, USA},
year = {2005}
}
J. Niere:
Inkrementelle Entwurfsmustererkennung. PhD thesis, University of Paderborn, Paderborn, Germany, 2004 . In German.
[
Show BibTeX]
@phdthesis{Nie04,
author = {J. Niere},
title = {Inkrementelle Entwurfsmustererkennung},
school = {University of Paderborn, Paderborn, Germany},
year = {2004}
}
[
URL]
C. Reckord:
Optimierung von Genauigkeitswerten unscharfer Regeln. Master's thesis, University of Paderborn, Department of Computer Science, Paderborn, Germany, May 2004
[
PDF] [
Show BibTeX]
@mastersthesis{Rec04_ag,
author = {C. Reckord},
title = {Optimierung von Genauigkeitswerten unscharfer Regeln},
school = {University of Paderborn, Department of Computer Science, Paderborn, Germany},
year = {2004}
}
L. Wendehals, M. Meyer, A. Elsner:
Selective Tracing of Java Programs. In Andy Schürr and Albert Zündorf (eds.):
Proc. of the 2nd International Fujaba Days 2004, Darmstadt, Germany, Technical Report, vol. tr-ri-04-253, pp. 7-10. University of Paderborn, September 2004
[
Show Abstract]
Design recovery, which means extracting design documents from source code, is usually done by static analysis techniques. Analysing behaviour by static analysis is very imprecise. We combine static and dynamic analysis to increase the preciseness of our design recovery process. In this paper we present an approach to collect data for the dynamic analysis by recording method calls during a program's execution. To reduce the amount of information we monitor only relevant classes and methods identified by static analysis.
[
PDF] [
Show BibTeX]
@inproceedings{WME04_ag,
author = {L. Wendehals AND M. Meyer AND A. Elsner},
title = {Selective Tracing of Java Programs},
booktitle = {Proc. of the 2nd International Fujaba Days 2004, Darmstadt, Germany},
year = {2004}
}
A. Elsner:
Selektive Aufzeichnung von Laufzeitinformationen bei der Ausführung von Java-Programmen. Bachelor's thesis, University of Paderborn, Department of Computer Science, Paderborn, Germany, September 2004
[
PDF] [
Show BibTeX]
@bachelorsthesis{Els04_ag,
author = {A. Elsner},
title = {Selektive Aufzeichnung von Laufzeitinformationen bei der Ausf{\"u}hrung von Java-Programmen},
school = {University of Paderborn, Department of Computer Science, Paderborn, Germany},
year = {2004}
}
L. Wendehals:
Specifying Patterns for Dynamic Pattern Instance Recognition with UML 2.0 Sequence Diagrams. In
Proc. of the 6th Workshop Software Reenginering (WSR), Bad Honnef, Germany, Softwaretechnik-Trends, vol. 24/2, pp. 63-64. May 2004
[
PDF] [
Show BibTeX]
@inproceedings{Wen04_ag,
author = {L. Wendehals},
title = {Specifying Patterns for Dynamic Pattern Instance Recognition with UML 2.0 Sequence Diagrams},
booktitle = {Proc. of the 6th Workshop Software Reenginering (WSR), Bad Honnef, Germany, Softwaretechnik-Trends},
year = {2004}
}
J. Niere, M. Meyer, L. Wendehals:
User-driven adaption in rule-based pattern recognition. Tech. Rep., no. tr-ri-04-249. University of Paderborn (Paderborn, Germany) June 2004
[
Show Abstract]
Today, in software intensive projects a huge amount of the budget flows into the analysis of the already existing system. The reason for the high costs results mainly from the fact that analyses are often made manually or with automatic tool support, which is inappropriate for analyzing large systems. Semi-automatic analysis approaches usually use a notion of fuzziness to overcome this limitation, but inherit the problem of selecting appropriate initial values. In this paper we present an approach to adapt the initial values of our semi-automatic reverse engineering process. We provide the reverse engineer with accuracy information for results produced by a rule-based inference algorithm. Based on the changes of the results done by the reverse engineer we automatically adapt a credibility value of each rule, which previously has been used to compute the accuracy of the result. The adaption fits seamlessly into our overall analysis process. First tests show that it is suitable for the calibration of our fuzzyfied rule-based pattern recognition approach.
[
PDF] [
Show BibTeX]
@techreport{NMW04_ag,
author = {J. Niere AND M. Meyer AND L. Wendehals},
title = {User-driven adaption in rule-based pattern recognition},
institution = {University of Paderborn},
year = {2004}
}
J. Niere, L. Wendehals, A. Zündorf:
An Interactive and Scalable Approach to Design Pattern Recovery. Tech. Rep., no. tr-ri-03-236. University of Paderborn (Paderborn, Germany) 2003
[
Show Abstract]
Reverse engineering is a process highly influenced by assumptions and hypotheses of a reverse engineer, who has to analyse a syste
m manually, because tools are often not applicable to large systems with many different implementation styles. Successful tools have to support an interactive process, where the engineer is able to steer the analysis process by proving certain assumptions and hypotheses. Consequently, the input format of the analysis tool must support a kind of impreciseness to formulate weak presumptions. In this paper we present a reverse engineering process based on fuzzy graph transformation rules. We use graph rewrite rules in addition with fuzzy logic to detect design patterns in Java source code. Impreciseness is expressed by assigning fuzzy values to graph transformation rules and thresholds are used to look up only firmed occurrences of patterns. Underlying the transformation rules is an object-oriented graph model providing composition and inheritance, which reduces the complexity of the rules. We propose a reverse engineering process starting with imprecise rules and refining and specifying the rules during the analysis. Preliminary results applying our process are promising, i.e., we present the results of detecting design patterns in Java's Abstract Window Toolkit (AWT) library.
[
PDF] [
Show BibTeX]
@techreport{NWZ03_ag,
author = {J. Niere AND L. Wendehals AND A. Z{\"u}ndorf},
title = {An Interactive and Scalable Approach to Design Pattern Recovery},
institution = {University of Paderborn},
year = {2003}
}
J. Niere, J. P. Wadsack, L. Wendehals:
Handling Large Search Space in Pattern-Based Reverse Engineering. In
Proc. of the 11th International Workshop on Program Comprehension (IWPC), Portland, USA, pp. 274-279. IEEE Computer Society Press, May 2003
[
Show Abstract]
Large industrial legacy systems are challenges of reverse-engineering activities. Reverse-engineering approaches use text-search tools based on regular expressions or work on graph representations of programs, such as abstract syntax graphs. Analyzing large legacy systems often fail because of the large search space. Our approach to handle large search space in pattern-based reverse engineering is to allow imprecise results in means of false positives. We use the theory of fuzzy sets to express impreciseness and present our approach on the example of recovering associations.
[
PDF] [
Show BibTeX]
@inproceedings{NWW03_ag,
author = {J. Niere AND J. P. Wadsack AND L. Wendehals},
title = {Handling Large Search Space in Pattern-Based Reverse Engineering},
booktitle = {Proc. of the 11th International Workshop on Program Comprehension (IWPC), Portland, USA},
year = {2003}
}
L. Wendehals:
Improving Design Pattern Instance Recognition by Dynamic Analysis. In
Proc. of the ICSE 2003 Workshop on Dynamic Analysis (WODA), Portland, USA. May 2003
[
Show Abstract]
Design pattern instance recognition is often done by static analysis, thus approaches are limited to the recognition of static parts of design patterns. The dynamic behavior of patterns is disregarded and leads to lots of false positives during recognition. This paper presents an approach to combine the advantages of static and dynamic analyses to overcome this problem and improve the design pattern instance recognition.
[
PDF] [
Show BibTeX]
@inproceedings{Wen03_ag,
author = {L. Wendehals},
title = {Improving Design Pattern Instance Recognition by Dynamic Analysis},
booktitle = {Proc. of the ICSE 2003 Workshop on Dynamic Analysis (WODA), Portland, USA},
year = {2003}
}
M. Schwarz:
Integration eines inkrementellen Parsing-Algorithmus in Fujaba. Bachelor's thesis, University of Paderborn, Department of Computer Science, Paderborn, Germany, September 2003
[
PDF] [
Show BibTeX]
@bachelorsthesis{Sch03_ag,
author = {M. Schwarz},
title = {Integration eines inkrementellen Parsing-Algorithmus in Fujaba},
school = {University of Paderborn, Department of Computer Science, Paderborn, Germany},
year = {2003}
}
J. Niere, A. Zündorf:
Reverse Engineering with Fuzzy Layered Graph Grammars. Tech. Rep., no. tr-ri-03-235. University of Paderborn (Paderborn, Germany) 2003
[
PDF] [
Show BibTeX]
@techreport{NZ03_ag,
author = {J. Niere AND A. Z{\"u}ndorf},
title = {Reverse Engineering with Fuzzy Layered Graph Grammars},
institution = {University of Paderborn},
year = {2003}
}
J. Niere:
Fuzzy Logic based Interactive Recovery of Software Design. In
Proc. of Doctoral Symposium of the 24th International Conference on Software Engineering, Orlando, Florida, USA. May 2002
[
PDF] [
Show BibTeX]
@inproceedings{Nie02_2_ag,
author = {J. Niere},
title = {Fuzzy Logic based Interactive Recovery of Software Design},
booktitle = {Proc. of Doctoral Symposium of the 24th International Conference on Software Engineering, Orlando, Florida, USA},
year = {2002}
}
J. Niere:
Fuzzy Logic based Interactive Recovery of Software Design. In
Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA, pp. 727-728. May 2002
[
PDF] [
Show BibTeX]
@inproceedings{Nie02_ag,
author = {J. Niere},
title = {Fuzzy Logic based Interactive Recovery of Software Design},
booktitle = {Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA},
year = {2002}
}
J. Niere, W. Schäfer, J. P. Wadsack, L. Wendehals, J. Welsh:
Towards Pattern-Based Design Recovery. In
Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA, pp. 338-348. ACM Press, May 2002
[
PDF] [
Show BibTeX]
@inproceedings{NSW+02_ag,
author = {J. Niere AND W. Sch{\"a}fer AND J. P. Wadsack AND L. Wendehals AND J. Welsh},
title = {Towards Pattern-Based Design Recovery},
booktitle = {Proc. of the 24th International Conference on Software Engineering (ICSE), Orlando, Florida, USA},
year = {2002}
}
L. Wendehals:
Clich'e- und Mustererkennung auf Basis von Generic Fuzzy Reasoning Nets. Master's thesis, University of Paderborn, Department of Mathematics and Computer Science, Paderborn, Germany, October 2001
[
PDF] [
Show BibTeX]
@mastersthesis{Wen01_ag,
author = {L. Wendehals},
title = {Clich'e- und Mustererkennung auf Basis von Generic Fuzzy Reasoning Nets},
school = {University of Paderborn, Department of Mathematics and Computer Science, Paderborn, Germany},
year = {2001}
}
J. Niere, J. P. Wadsack, L. Wendehals:
Design Pattern Recovery Based on Source Code Analysis with Fuzzy Logic. Tech. Rep., no. tr-ri-01-222. University of Paderborn (Paderborn, Germany) March 2001
[
PDF] [
Show BibTeX]
@techreport{NWW01_ag,
author = {J. Niere AND J. P. Wadsack AND L. Wendehals},
title = {Design Pattern Recovery Based on Source Code Analysis with Fuzzy Logic},
institution = {University of Paderborn},
year = {2001}
}
J. Niere, W. Schäfer, J. P. Wadsack, L. Wendehals, J. Welsh:
Towards Pattern-Based Design Recovery. Tech. Rep., no. tr-ri-01-227. University of Paderborn (Paderborn, Germany) October 2001
[
PDF] [
Show BibTeX]
@techreport{NSW+01_ag,
author = {J. Niere AND W. Sch{\"a}fer AND J. P. Wadsack AND L. Wendehals AND J. Welsh},
title = {Towards Pattern-Based Design Recovery},
institution = {University of Paderborn},
year = {2001}
}
J. Niere:
Using Learning Toward Automatic Reengineering. In
Proc. of the 2nd International Workshop on Living with Inconsistency (LwI), Toronto, Canada. 2001
[
PDF] [
Show BibTeX]
@inproceedings{Nie01_ag,
author = {J. Niere},
title = {Using Learning Toward Automatic Reengineering},
booktitle = {Proc. of the 2nd International Workshop on Living with Inconsistency (LwI), Toronto, Canada},
year = {2001}
}
J. H. Jahnke, J. Niere, J. P. Wadsack:
Automated Quality Analysis of Component Software for Embedded Systems. In
Proc. of the 8th International Workshop on Program Comprehension (IWPC), Limerick, Ireland, pp. 18-26. IEEE Computer Society Press, June 2000
[
PDF] [
Show BibTeX]
@inproceedings{JNW00_ag,
author = {J. H. Jahnke AND J. Niere AND J. P. Wadsack},
title = {Automated Quality Analysis of Component Software for Embedded Systems},
booktitle = {Proc. of the 8th International Workshop on Program Comprehension (IWPC), Limerick, Ireland},
year = {2000}
}
U. A. Nickel, J. Niere, J. P. Wadsack, A. Zündorf:
Roundtrip Engineering with FUJABA. In J. Ebert and B. Kullbach and F. Lehner (eds.):
Proc of 2nd Workshop on Software-Reengineering (WSR), Bad Honnef, Germany. Fachberichte Informatik, Universität Koblenz-Landau, August 2000
[
PDF] [
Show BibTeX]
@inproceedings{NNWZ00_ag,
author = {U. A. Nickel AND J. Niere AND J. P. Wadsack AND A. Z{\"u}ndorf},
title = {Roundtrip Engineering with FUJABA},
booktitle = {Proc of 2nd Workshop on Software-Reengineering (WSR), Bad Honnef, Germany},
year = {2000}
}