Skip to main content
Log in

Algorithm recognition for programming tutoring based on flow graph parsing

  • Published:
Applied Intelligence Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. D. Brotsky, “An algorithm for parsing flow graphs”, Tech. Rep. Al-TR-704, MIT-AILAB, Mar. 1984.

  2. E. Horowitz and S. Sahni, Fundamentals of Computer Algorithms, Computer Science Press: Maryland, 1978.

    Google Scholar 

  3. W. Johnson, Intention-Based Diagnosis of Novice Programming Errors, Morgan Kaufmann: Los Altos, CA, 1986.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. W. Johnson and E. Soloway, “Proust: An automatic debugger for pascal programs”, Byte, vol. 10, no. 4, pp. 179–190, 1985.

    Google Scholar 

  6. S.W. Kim, Algorithm Recognition for Programming Tutoring, Ph.D. thesis, KAIST, Taejon, Korea, Feb. 1994.

  7. S.W. Kim, S.H. Hahn, and J.H. Kim, “Algorithm recognition using flow graph transformation”, in Proc. PRICAI 94, Aug. 1994, to appear.

  8. S. Letovsky and E. Soloway, “Delocalized plans and program comprehension”, IEEE Software, vol. 3, pp. 41–49, May 1986.

    Google Scholar 

  9. F. Lukey, “Understanding and debugging programs”, Int. J. Man-Machine Studies, vol. 12, pp. 189–202, 1980.

    Google Scholar 

  10. W. Murray, “Automatic program debugging for intelligent tutoring systems”, Computational Intelligence, vol. 3, pp. 1–16, 1987.

    Google Scholar 

  11. W. Murray, Automatic Program Debugging for Intelligent Tutoring Systems, Morgan Kaufmann: San Mateo, California, 1988.

    Google Scholar 

  12. C. Rich, “Inspection methods in programming”, AI-TR-604, MIT-AILAB, 1981.

  13. C. Rich, “A formal representation for plans in the programmer's apprentice”, in Int. Joint Conf. on Artificial Intelligence 81, pp. 1044–1052, 1981.

  14. C. Rich, “The layered architecture of a system for reasoning about programs”, in IJCAI-85, pp. 540–546, Aug. 1985.

  15. C. Rich and R. Waters, “The programmer's apprentice: A research overview”, IEEE Computer, vol. 21, no. 11, pp. 10–25, 1988.

    Google Scholar 

  16. 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.

  17. 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.

  18. G. Ruth, “Intelligent program analysis”, Int. J. Artificial Intelligence, vol. 7, pp. 65–85, 1976. Also published in Readings in AI and SE.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. E. Soloway and K. Khrlich, “Empirical investigations of programming knowledge”, IEEE Transactions of Software Engineering, vol. 10, no. 5, pp. 595–609, 1984.

    Google Scholar 

  21. 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.

  22. 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.

  23. R. Waters, “The programmers apprentice: A session with kbemacs”, IEEE Transactions on Software Engineering, vol. 11, pp. 1296–1320, Nov. 1985.

    Google Scholar 

  24. H. Wertz, “Stereotyped program debugging: An aid for novice programmers”, Int. J. Man-Machine Studies, vol. 16, pp. 379–392, 1982.

    Google Scholar 

  25. L. Wills, “Automated program recognition”, Tech. Rep. AI-TR-904, MIT-AILAB, 1986.

  26. L. Wills, “Automated program recognition: A feasibility demonstration”, Artificial Intelligence, vol. 45, no. 2, pp. 113–171, 1990.

    Google Scholar 

  27. L.M. Wills, “Automated program recognition by graph parsing”, AI-TR 1358, MIT-AILAB, 1992.

  28. N. Wirth, “Algorithms + Data Structures = Programs”, Automatic Computation, Prentice-Hall, 1976.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00117815

Keywords

Navigation