| Conference Article| [HLM2003] | Dirk Heuzeroth, Welf Löwe, Stefan Mandel, Generating Design Pattern Detectors from Pattern Specifications, 18th IEEE International Conference on Automated
Software Engineering (ASE) 2003, IEEE, October 2003.
|
Abstract
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.
Authors
| |