A method of program understanding using constraint satisfaction for software reverse engineering

The process of understanding a source code in a high level programming language is a complex cognitive task The provision of helpful decision aid subsystems would be of great bene t to software maintainers Given a library of program plan templates generating a partial understanding of a piece of software source code can be shown to correspond to the construction of mappings between segments of the source code and particular program plans represented in a library of domain source programs plans These mappings can be used as part of the larger task of reverse engineering source code to facilitate many software engineering tasks such as software reuse and for program maintenance We present a novel model of program understanding using constraint satisfaction The model composes a partial global picture of source program code by transforming knowledge about the problem domain and the program structure into constraints These constraints facilitate the e cient construction of mappings between code and library knowledge Under this representational framework earlier heuristic approaches to pro gram understanding may be uni ed contrasted and compared We describe an empirical study which demonstrates the feasibility of our model in the program understanding subtask of partial local explanation In addition we incor porate this local model into the larger task of combining these local explanations into a coherent global picture of the code While many heuristic global models are possible we describe an encompassing structure and demonstrate through a careful depiction of the algorithm and several domain examples how constraint satisfaction o ers a rich paradigm for exploiting both library and program structural constraint information One primary advantage of the constraint satisfaction paradigm CSP is its generality many previous program understanding e orts can be more easily compared Another advantage is the improvement in search e ciency using various heuristic techniques in CSP

[1]  Pascal Van Hentenryck Constraint satisfaction in logic programming , 1989, Logic programming.

[2]  David N. Chin,et al.  A cooperative program understanding environment , 1994, Proceedings KBSE '94. Ninth Knowledge-Based Software Engineering Conference.

[3]  Alex Quilici Reverse Engineering of Legacy Systems: A Path Toward Success , 1995, 1995 17th International Conference on Software Engineering.

[4]  Rina Dechter,et al.  From Local to Global Consistency , 1990, Artif. Intell..

[5]  Fei Song A processing model for temporal analysis and its application to plan recognition , 1992 .

[6]  Earl D. Sacerdott Planning in a hierarchy of abstraction spaces , 1973, IJCAI 1973.

[7]  Thomas C. Henderson,et al.  Arc and Path Consistency Revisited , 1986, Artif. Intell..

[8]  Gerhard Friedrich,et al.  Extending Constraint Satisfaction Problem Solving in Structural Design , 1992, IEA/AIE.

[9]  Richard C. Waters,et al.  The programmer's apprentice , 1990, ACM Press frontier series.

[10]  David N. Chin,et al.  DECODE: a cooperative environment for reverse-engineering legacy software , 1995, Proceedings of 2nd Working Conference on Reverse Engineering.

[11]  Barbara M. Smith,et al.  Sparse Constraint Graphs and Exceptionally Hard Problems , 1995, IJCAI.

[12]  R. Dechter to Constraint Satisfaction , 1991 .

[13]  Toby Walsh,et al.  Easy Problems are Sometimes Hard , 1994, Artif. Intell..

[14]  P. Yang A Theory of Con ict Resolution in , 1992 .

[15]  Henry Kautz,et al.  Pushing the envelope: planning , 1996 .

[16]  Qiang Yang,et al.  Formalizing planning knowledge for hierarchical planning , 1990, Comput. Intell..

[17]  Martin C. Cooper An Optimal k-Consistency Algorithm , 1989, Artif. Intell..

[18]  Henry A. Kautz,et al.  Generalized Plan Recognition , 1986, AAAI.

[19]  Eugene C. Freuder,et al.  Partial Constraint Satisfaction , 1989, IJCAI.

[20]  Craig A. Knoblock Search Reduction in Hierarchical Problem Solving , 1991, AAAI.

[21]  R. Cohen,et al.  Specifying and updating plan libraries for plan recognition tasks , 1993, Proceedings of 9th IEEE Conference on Artificial Intelligence for Applications.

[22]  David Chapman,et al.  Pengi: An Implementation of a Theory of Activity , 1987, AAAI.

[23]  Toby Walsh,et al.  An Empirical Analysis of Search in GSAT , 1993, J. Artif. Intell. Res..

[24]  Fei Song,et al.  Temporal Reasoning During Plan Recognition , 1991, AAAI.