Abstract
Program understanding is often viewed as the task of extracting plans and design goals from program source. As such, it is natural to try to apply standard AI plan recognition techniques to the program understanding problem. Yet program understanding researchers have quietly, but consistently, avoided the use of these plan recognition algorithms. This paper shows that treating program understanding as plan recognition is too simplistic and that traditional AI search algorithms for plan recognition are not suitable, as is, for program understanding. In particular, we show (1) that the program understanding task differs significantly from the typical general plan recognition task along several key dimensions, (2) that the program understanding task has particular properties that make it particularly amenable to constraint satisfaction techniques, and (3) that augmenting AI plan recognition algorithms with these techniques can lead to effective solutions for the program understanding problem.
Similar content being viewed by others
References
Chin, D. and Quilici, A. 1996. DECODE: Acooperative program understanding environment. Journal of Software Maintenance, 8: 3-34.
Dechter, R. 1992. From local to global consistency. Artificial Intelligence, 55: 87-107.
Freuder, E. and Wallace, J. 1992. Partial constraint satisfaction. Artificial Intelligence, 58: 21-70.
Hartman, J. 1991a. Automatic control understanding for natural programs. PhD thesis, University of Texas at Austin, Department of Computer Science.
Hartman, J. 1991b. Understanding natural programs using proper decomposition. In Proceedings of the International Conference on Software Engineering, Austin, TX, pp. 62-73.
Kautz, H. 1987. A formal theory of plan recognition. PhD thesis, University of Rochester, Department of Computer Science, Rochester, New York.
Kautz, H. and Allen, J. 1986. Generalized plan recognition. In Proceedings of the Fifth National Conference on Artificial Intelligence, Philadelphia, PA, pp. 32-37.
Kondrak, G. and van Beek, P. 1995. A theoretical evaluation of selected backtracking algorithms. Proceedings of the 14th International Joint Conference on Artificial Intelligence, Montreal, CA, pp. 541-547.
Kozaczynski, W. and Ning, J. 1994. Automated program understanding by concept recognition. Automated Software Engineering, 1: 61-78.
Kumar, V. 1992. Algorithms for constraint-satisfaction problems. AI Magazine, 13: 32-44.
Johnson, W.L. 1986. Intention Based Diagnosis of Novice Programming Errors. Los Altos, CA: Morgan Kaufman.
Mackworth, A.K., Muldter, J. and Havens, W. 1985. Hierarchical arc consistency: exploiting structured domains in constraint satisfaction problems. Computation Intelligence, 1:188-196.
Minton, S., Johnston, M., Philips, A. and Laird, P. 1992. Minimizing conflicts: a heuristic repair method for constraint satisfaction and scheduling problems. Artificial Intelligence, 58:161-205.
Nadel, B. A. 1989. Constraint satisfaction algorithms. Computational Intelligence, 5: 188-224.
Newcomb, P. and Markosian, L. 1993. Automating the modularization of large COBOL programs: application of an enabling technology for reengineering. In Proceedings of the Working Conference on Reverse Engineering, Baltimore, MD, pp. 222-230.
Prosser, P. 1993. Hybrid algorithms for the constraint satisfaction problem. Computational Intelligence, 9: 268-299.
Quilici, A. 1994. A memory-based approach to recognizing programming plans. Communications of the ACM, 37: 84-93.
Quilici, A. 1995. Reverse engineering of legacy systems: a path toward success. In Proceedings of the 17th International Conference on Software Engineering, Seattle, WA, pp. 333-336.
Quilici, A. and Woods, S. 1997. Toward a constraint-satisfaction framework for program understanding. Journal of Automated Software Engineering, 4: 271-289.
Sidebottom, G. and Havens, W.S. 1992. Hierarchical arc consistency for disjoint real intervals in constraint logic programming. Computational Intelligence, 8: 601-623.
Sosic, R. and Gu, J. 1990. A polynomial time algorithm for the n-queens problem. SIGART, 1.
Song, F. and Cohen, R. 1991. Temporal teasoning during plan recognition, In Proceedings of the Ninth National Conference on Artificial Intelligence, Anaheim, CA, pp. 247-252.
van Beek, P., Cohen, R., and Schmidt, K. 1994. From plan critiquing to clarification dialogue for cooperative response generation. Computational Intelligence, 9: 132-154.
Wills, L. M. 1990. Automated program recognition: a feasibility demonstration. Artificial Intelligence, 45: 113-172.
Wills, L. M. 1992. Automated program recognition by Graph Parsing. PhD thesis, MIT, Department of Computer Science.
Woods, S. 1996. A method of program understanding using constraint satisfaction for software reverse engineering. Ph.D. Thesis, Department of Computer Science, University of Waterloo, Waterloo, Canada.
Woods, S. and Yang, Q. 1996. The program understanding problem: Analysis and a heuristic approach In Proceedings of the 18th International Conference on Software Engineering ICSE-96, Berlin, Germany, pp. 6-15.
Woods, S. and Yang, Q. 1995. Program understanding as constraint satisfaction. In Proceedings of the IEEE Seventh International Workshop on Computer-Aided Software Engineering, Toronto, Ontario, Canada, pp. 318- 327.
Yang, Q. and Fong, P. 1992. Solving partial constraint satisfaction problems using local search and abstraction. Technical Report CS-92-50, University of Waterloo, Waterloo, Ontario, Canada.
Zhang, Y. 1997. Scalability experiments in applying constraint-based program understanding algorithms to real-world programs. Masters Thesis, Department of Electrical Engineering, University of Hawaii at Manoa, Honolulu, Hawaii.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Quilici, A., Yang, Q. & Woods, S. Applying Plan Recognition Algorithms To Program Understanding. Automated Software Engineering 5, 347–372 (1998). https://doi.org/10.1023/A:1008608825390
Issue Date:
DOI: https://doi.org/10.1023/A:1008608825390