A practical pattern recovery approach based on both structural and behavioral analysis

  • Authors:
  • Heyuan Huang;Shensheng Zhang;Jian Cao;Yonghong Duan

  • Affiliations:
  • CIT Laboratory, Department of Computer Science and Engineering, Shanghai Jiao Tang University, Huashan Road 1954, Shanghai 200030, China;CIT Laboratory, Department of Computer Science and Engineering, Shanghai Jiao Tang University, Huashan Road 1954, Shanghai 200030, China;CIT Laboratory, Department of Computer Science and Engineering, Shanghai Jiao Tang University, Huashan Road 1954, Shanghai 200030, China;CIT Laboratory, Department of Computer Science and Engineering, Shanghai Jiao Tang University, Huashan Road 1954, Shanghai 200030, China

  • Venue:
  • Journal of Systems and Software - Special issue: Software engineering education and training
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

While the merit of using design patterns is clear for forward engineering, we could also benefit from design pattern recovery in program understanding and reverse engineering. In this paper, we present a practical approach to enlarge the recoverable scope and improve precision ratio of pattern recovery. To specify both structural aspect and behavioral aspect of design patterns, we introduce traditional predicate logic combined with Allen's interval-based temporal logic as our theory foundation. The formal specifications could be conveniently converted into Prolog representations to support pattern recovery. To illustrate how to specify and recover design patterns in our approach, we take one example for each category of design patterns. Moreover, we give a taxonomy of design patterns based on the analysis in our approach to show its applicable scope. To validate our approach, we have developed a tool named PRAssistor and analyzed two well-known open source frameworks. The experiment results show that most of the patterns addressed in our taxonomy have been recovered. Besides larger recoverable scope, the recovery precision of our approach is much higher than others. Furthermore, we consider that our approach and tool could be promisingly extended to support "Debug at Design Level" and "Pattern-Driven Refactoring".