Discovering Program's Behavioral Patterns by Inferring Graph-Grammars from Execution Traces

Frequent patterns in program executions represent recurring sequences of events. These patterns can be used to reveal the hidden structures of a program, and ease the comprehension of legacy systems. Existing grammar-induction approaches generally use sequential algorithms to infer formal models from program executions, in which program executions are represented as strings. Software developers, however, often use graphs to illustrate the process of program executions, such as UML diagrams, flowcharts and call graphs. Taking advantage of graphs' expressiveness and intuitiveness for human cognition, we present a graph-grammar induction approach to discovering program's behavioral patterns by analyzing execution traces represented in graphs. Moreover, to improve the efficiency, execution traces are abstracted to filter redundant or unrelated traces. A grammar induction environment called VEGGIE is adopted to facilitate the induction. Evaluation is conducted on an open source project JHotDraw. Experimental results show the applicability of the proposed approach.

[1]  Lawrence B. Holder,et al.  Inference of Node Replacement Recursive Graph Grammars , 2006, SDM.

[2]  Kamran Sartipi,et al.  Dynamic Analysis of Software Systems using Execution Pattern Mining , 2006, 14th IEEE International Conference on Program Comprehension (ICPC'06).

[3]  Kang Zhang,et al.  Constructing VEGGIE: Machine Learning for Context-Sensitive Graph Grammars , 2007, 19th IEEE International Conference on Tools with Artificial Intelligence(ICTAI 2007).

[4]  Srinivasan Parthasarathy,et al.  Discovering frequent topological structures from graph datasets , 2005, KDD '05.

[5]  Jun Kong,et al.  Spatial graph grammars for graphical user interfaces , 2006, TCHI.

[6]  Kamran Sartipi,et al.  Application of Execution Pattern Mining and Concept Lattice Analysis on Software Structure Evaluation , 2006, SEKE.

[7]  Kang Zhang,et al.  Constructing VEGGIE: Machine Learning for Context-Sensitive Graph Grammars , 2007 .

[8]  Lawrence B. Holder,et al.  Context-free graph grammar induction using the minimum description length principle , 2003 .

[9]  Alexander L. Wolf,et al.  Discovering models of software processes from event-based data , 1998, TSEM.

[10]  Neil Walkinshaw,et al.  Reverse Engineering State Machines by Interactive Grammar Inference , 2007, 14th Working Conference on Reverse Engineering (WCRE 2007).

[11]  Lawrence B. Holder,et al.  Graph Grammar Induction on Structural Data for Visual Programming , 2006, 2006 18th IEEE International Conference on Tools with Artificial Intelligence (ICTAI'06).

[12]  Pierre Dupont,et al.  THE QSM ALGORITHM AND ITS APPLICATION TO SOFTWARE BEHAVIOR MODEL INDUCTION , 2008, Appl. Artif. Intell..

[13]  Jiawei Han,et al.  gSpan: graph-based substructure pattern mining , 2002, 2002 IEEE International Conference on Data Mining, 2002. Proceedings..

[14]  Yuanyuan Zhou,et al.  CP-Miner: A Tool for Finding Copy-paste and Related Bugs in Operating System Code , 2004, OSDI.