Generating design pattern detectors from pattern specifications

We present our approach to support program understanding by a tool that generates static and dynamic analysis algorithms from design pattern specifications to detect design patterns in legacy code. We therefore specify the static and dynamic aspects of patterns as predicates, and represent legacy co...

Full description

Saved in:
Bibliographic Details
Published in18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings pp. 245 - 248
Main Authors Heuzeroth, Dirk, Mandel, Stefan, Löowe, Welf
Format Conference Proceeding
LanguageEnglish
Published Piscataway, NJ, USA IEEE Press 06.10.2003
IEEE
SeriesACM Conferences
Subjects
Online AccessGet full text
ISBN0769520359
9780769520353
ISSN1938-4300
DOI10.1109/ASE.2003.1240313

Cover

More Information
Summary:We present our approach to support program understanding by a tool that generates static and dynamic analysis algorithms from design pattern specifications to detect design patterns in legacy code. We therefore specify the static and dynamic aspects of patterns as predicates, and represent legacy code by predicates that encode its attributed abstract syntax trees. Given these representations, the static analysis is performed on the legacy code representation as a query derived from the specification of the static pattern aspects. It provides us with pattern candidates in the legacy code. The dynamic specification represents state sequences expected when using a pattern. We monitor the execution of the candidates and check their conformance to this expectation. We demonstrate our approach and evaluate our tool by detecting instances of the Observer, Composite and Decorator patterns in Java code using Prolog to define predicates and queries.
ISBN:0769520359
9780769520353
ISSN:1938-4300
DOI:10.1109/ASE.2003.1240313