Abstract
Plan-recognition with template matching shows reasonable performance for recognizing general control structures. However, problems containing well-defined algorithms such as sorting and searching are difficult to recognize by the template-based methodology alone, because an algorithm is often highly optimized and therefore hard to divide into smaller meaningful units. Based on this observation, we propose an algorithm recognition methodology to augment the plan-recognition approach.
Our algorithm recognition approach is based on the flow graph parsing which performs a partial recognition of programs. The methodology is extended to completely understand algorithm implementations by providing the information of the program's goal, a specification of programming assignment in tutoring environment. Utilization of goal information is two-fold; extending the role of transformation rules to represent algorithm-specific information and looking for salient graph parts of algorithm plan to determine which has been used to implement the goal. Preliminary evaluation was performed on students' programs containing sort algorithm.
Similar content being viewed by others
References
D. Brotsky, “An algorithm for parsing flow graphs”, Tech. Rep. Al-TR-704, MIT-AILAB, Mar. 1984.
E. Horowitz and S. Sahni, Fundamentals of Computer Algorithms, Computer Science Press: Maryland, 1978.
W. Johnson, Intention-Based Diagnosis of Novice Programming Errors, Morgan Kaufmann: Los Altos, CA, 1986.
W. Johnson and E. Soloway, “Proust: Knowledge-based program understanding”, IEEE Transactions on Software Engineering, vol. 11, pp. 267–275, Mar. 1985. Reprinted in Readings in AI and SE.
W. Johnson and E. Soloway, “Proust: An automatic debugger for pascal programs”, Byte, vol. 10, no. 4, pp. 179–190, 1985.
S.W. Kim, Algorithm Recognition for Programming Tutoring, Ph.D. thesis, KAIST, Taejon, Korea, Feb. 1994.
S.W. Kim, S.H. Hahn, and J.H. Kim, “Algorithm recognition using flow graph transformation”, in Proc. PRICAI 94, Aug. 1994, to appear.
S. Letovsky and E. Soloway, “Delocalized plans and program comprehension”, IEEE Software, vol. 3, pp. 41–49, May 1986.
F. Lukey, “Understanding and debugging programs”, Int. J. Man-Machine Studies, vol. 12, pp. 189–202, 1980.
W. Murray, “Automatic program debugging for intelligent tutoring systems”, Computational Intelligence, vol. 3, pp. 1–16, 1987.
W. Murray, Automatic Program Debugging for Intelligent Tutoring Systems, Morgan Kaufmann: San Mateo, California, 1988.
C. Rich, “Inspection methods in programming”, AI-TR-604, MIT-AILAB, 1981.
C. Rich, “A formal representation for plans in the programmer's apprentice”, in Int. Joint Conf. on Artificial Intelligence 81, pp. 1044–1052, 1981.
C. Rich, “The layered architecture of a system for reasoning about programs”, in IJCAI-85, pp. 540–546, Aug. 1985.
C. Rich and R. Waters, “The programmer's apprentice: A research overview”, IEEE Computer, vol. 21, no. 11, pp. 10–25, 1988.
C. Rich and L. Wills, “Recognizing a program's design: A graph-parsing approach”, IEEE Software, pp. 82–89, Jan. 1990. Reprinted on Software Reengineering.
R.S. Rist, “Plants in programming: Definition, demonstration, and development”, in Empirical Studies of Programmers, edited by E. Soloway and S. Iyengar, Ablex Publishing, pp. 28–47, 1986.
G. Ruth, “Intelligent program analysis”, Int. J. Artificial Intelligence, vol. 7, pp. 65–85, 1976. Also published in Readings in AI and SE.
W. Sack, “Finding errors by overlooking them”, in Intelligent Tutoring Systems: At the Crossroads of Artificial Intelligence and Education, edited by C. Frasson and G. Gauthier, Ablex: Norwood, NJ, ch. 10, pp. 206–233, 1990.
E. Soloway and K. Khrlich, “Empirical investigations of programming knowledge”, IEEE Transactions of Software Engineering, vol. 10, no. 5, pp. 595–609, 1984.
J. Song and J. Kim, “Exbug: An automatic debugger by plan matching and program execution”, in Proc. Pacific Rim Int. Conf. on A.I. 92, Seoul, Korea, 1992, pp. 638–644.
H. Ueno, “Alpus: A program understanding system by means of algorithm-based programming knowledge”, in Proc. Pacific Rim Int. Conf. on A.I. 90, Nagoya, Japan, 1990, pp. 693–698.
R. Waters, “The programmers apprentice: A session with kbemacs”, IEEE Transactions on Software Engineering, vol. 11, pp. 1296–1320, Nov. 1985.
H. Wertz, “Stereotyped program debugging: An aid for novice programmers”, Int. J. Man-Machine Studies, vol. 16, pp. 379–392, 1982.
L. Wills, “Automated program recognition”, Tech. Rep. AI-TR-904, MIT-AILAB, 1986.
L. Wills, “Automated program recognition: A feasibility demonstration”, Artificial Intelligence, vol. 45, no. 2, pp. 113–171, 1990.
L.M. Wills, “Automated program recognition by graph parsing”, AI-TR 1358, MIT-AILAB, 1992.
N. Wirth, “Algorithms + Data Structures = Programs”, Automatic Computation, Prentice-Hall, 1976.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Kim, S., Kim, J.H. Algorithm recognition for programming tutoring based on flow graph parsing. Appl Intell 6, 153–164 (1996). https://doi.org/10.1007/BF00117815
Received:
Revised:
Accepted:
Issue Date:
DOI: https://doi.org/10.1007/BF00117815