Measuring precision for static and dynamic design pattern recognition as a function of coverage

We strive to detect design pattern like patterns in software. This cannot be done efficiently with sufficient precision using only static analysis; we need to combine static and dynamic analysis. In this process, the pattern candidates produced from static analysis are monitored during executions of the software: Candidates detected by static analysis violating the expected dynamic protocol of the pattern are excluded. In this article, we investigate where to put effort when trying to perform high precision pattern detection in code. We do so by investigating which parameters are most important to improve the precision of the detection process: precision of initial static analysis or coverage of the dynamic analysis. Varying the precision of the dynamic analysis is a third important parameter, but this parameter is left as a constant during our experiments. The results show that simple behavioral protocols double the precision when 30% coverage is obtained. We also have indications that simple behavioral protocols give very high precision when high coverage is obtained. In such case, the quality of the static analysis is only interesting for precision if high coverage cannot be reached.

[1]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[2]  Randal E. Bryant,et al.  Symbolic Boolean manipulation with ordered binary-decision diagrams , 1992, CSUR.

[3]  Ulrik Pagh Schultz,et al.  Specialization patterns , 2000, Proceedings ASE 2000. Fifteenth IEEE International Conference on Automated Software Engineering.

[4]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[5]  Rudolf K. Keller,et al.  Pattern-based reverse-engineering of design components , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[6]  Andreas Elsner,et al.  Selective Tracing of Java Programs , 2004 .

[7]  Dirk Heuzeroth,et al.  COMBINING STATIC AND DYNAMIC ANALYSES TO DETECT INTERACTION PATTERNS , 2002 .

[8]  Giuliano Antoniol,et al.  Design pattern recovery in object-oriented software , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[9]  Lutz Prechelt,et al.  Design recovery by automated search for structural design patterns in object-oriented software , 1996, Proceedings of WCRE '96: 4rd Working Conference on Reverse Engineering.

[10]  Lothar Wendehals Improving Design Pattern Instance Recognition by Dynamic Analysis , 2003 .

[11]  Jim Welsh,et al.  Towards pattern-based design recovery , 2002, ICSE '02.

[12]  Dirk Beyer,et al.  Simple and efficient relational querying of software structures , 2003, 10th Working Conference on Reverse Engineering, 2003. WCRE 2003. Proceedings..