Skip to main content
Log in

LR error repair using the A* algorithm

  • Original Article
  • Published:
Acta Informatica Aims and scope Submit manuscript

Abstract

This article presents a local LR error repair method that repairs syntax errors quickly by adoption of the A* algorithm that helps remove unproductive configurations. The new method also enhances the repair quality by adoption of a flexible edit strategy to support shifting symbols unrestrictedly, as well as inserting and deleting symbols, in order to repair invalid input strings. Experimental results show that the new method excels existing works in repair quality and efficiency.

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. Aho A.V., Sethi R., Ullman J.D.: Compilers, Principles, Techniques, and Tools. Addison Wesley, Reading (1986)

    Google Scholar 

  2. Bertsch E.: An observation on suffix redundancy in LL(1) error repair. Acta Inf. 33(7), 631–639 (1996)

    Article  MathSciNet  Google Scholar 

  3. Bertsch E., Nederhof M.J.: On failure of the pruning technique in error repair in shift-reduce parsers. ACM Trans. Program. Lang. Syst. 21(1), 1–10 (1999)

    Article  MathSciNet  Google Scholar 

  4. Cerecke, C.: Repairing syntax errors in LR-based parsers. In: The Twenty-Fifth Australasian Computer Science Conference, ACSC’02, 4, pp. 17–22. ACM, Melbourne, Australia (2002)

  5. Corchuelo R., Perez J.A., Ruiz A., Toro M.: Repairing syntax errors in LR parsers. ACM Trans. Program. Lang. Syst. 24(6), 698–710 (2002)

    Article  Google Scholar 

  6. Dain J.A.: A practical minimum distance method for syntax error handling. Comp. Lang. 20(4), 239–252 (1994)

    Article  Google Scholar 

  7. Dion B.A.: Locally Least-Cost Error Correctors for Context-Free and Context-Sensitive Parsers, vol. 1. UMI Research Press, Ann Arbor (1982)

    Google Scholar 

  8. Fischer, C., Dion, B.A., Mauney, J.: A locally least-cost LR-error corrector. Tech. Rep. 363, Computer Science Dept., Univ. of Wisconsin (1979)

  9. Fischer C.N., Mauney J.: A simple, fast, and effective LL(1) error repair algorithm. Acta Inf. 29(2), 109–120 (1992)

    Article  MATH  Google Scholar 

  10. Fischer C., Milton D., Quiring S.: Efficient LL(1) error correction and recovery using only insertions. Acta Inf. 13(3), 141–154 (1980)

    MATH  MathSciNet  Google Scholar 

  11. Hart P.E., Nilsson N.J., Raphael B.: A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. SSC-4(2), 100–1007 (1968)

    Article  Google Scholar 

  12. Hart P.E., Nilsson N.J., Raphael B.: Correction to “A formal basis for the heuristic determination of minimum cost paths”. SIGART Bull. 37, 28–29 (1972)

    Article  Google Scholar 

  13. Kernighan B.W., Ritchie D.M.: The C Programming Language, vol. 1, 2nd edn. Prentice Hall Inc., Englewood Cliffs (1988)

    Google Scholar 

  14. Kim I.S., Choe K.M.: Error repair with validation in LR-based parsing. ACM Trans. Program. Lang. Syst. 23(4), 451–471 (2001)

    Article  MathSciNet  Google Scholar 

  15. Mauney J., Fischer C.N.: A forward move algorithm for LL and LR parsers. SIGPLAN Notice 17(6), 77–89 (1982)

    Google Scholar 

  16. McKenzie B.J., YeatMan C., Vere L.D.: Error repair in shift-reduce parsers. ACM Trans. Program. Lang. Syst. 17(4), 672–689 (1995)

    Article  Google Scholar 

  17. Nilsson N.J.: Principles of Artificial Intelligence. Morgan Kaufmann Publishers, Massachusetts (1993)

    Google Scholar 

  18. Pennello, T.J., De Remer, F.: A forward move algorithm for LR error recovery. In: Conference Record of the 5th Annual ACM symposium of Principles of Programming Languages. ACM, Tucson, Arizona, pp. 241–254 (1978)

  19. Russell, S.J., Norvig, P.: Artificial intelligence: a modern approach. Pearson Educ. (2003). http://portal.acm.org/citation.cfm?id=773294

  20. Sippu S., Soisalon-Soinnen E.: Parsing Theory: LR(k) and LL(k) Parsing, vol. 2. Springer, Berlin (1990)

    Google Scholar 

  21. Wagner R.A., Fischer M.J.: The string-to-string correction problem. J. ACM 21(1), 168–173 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  22. Winston P.H.: Artificial Intelligence, 3rd edn. Addison Wesley, Reading (1992)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ik-Soon Kim.

Additional information

This work was partially supported by the Engineering Research Center of Excellence of Korea Ministry of Education, Science and Technology(MEST)/National Research Foundation of Korea(NRF) Grant 2009-0063246.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kim, IS., Yi, K. LR error repair using the A* algorithm. Acta Informatica 47, 179–207 (2010). https://doi.org/10.1007/s00236-010-0115-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00236-010-0115-6

Keywords

Navigation