Advertisement

Correcting type errors in the Curry System

  • Milind Gandhe
  • G. Venkatesh
  • Amitabha Sanyal
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1180)

Abstract

In this paper, we address the problem of suggesting corrections to terms that are ill-typed in the Curry System. For this, we convert the term into a set of constraints over type expressions, and use a method due to Cox [3] to compute the maximal consistent subset of this set. The main result of this paper is an interesting correspondence between the automaton constructed in Cox's method and a graphical representation of the term called sharing graphs, which allows us to read back a term from the maximal consistent subset. We also characterise ill-typed terms using paths in the sharing graph.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Andrea Asperti, Vincent Danos, Cosimo Laneve, and Laurent Regnier. Paths in the lambda calculus — Three years of communications without understanding. In Proceedings of the Ninth Annual IEEE Symposium on Logic in Computer Science, Washington, 1994. IEEE Computer Society Press.Google Scholar
  2. 2.
    M. Beaven and R. Stanisfer. Explaining type errors in polymorphic languages. ACM Letters on Programming Languages and Systems, 2:17–30, 1993.Google Scholar
  3. 3.
    P. T. Cox. Finding backtrack points for intelligent backtracking. In J. A. Campbell, editor, Implementations of Prolog, pages 216–233. Ellis Horwood, Chichester, 1984.Google Scholar
  4. 4.
    J. Y. Girard. Linear logic. Theoretical Computer Science, 50, 1987.Google Scholar
  5. 5.
    Georges Gonthier, Martin Abadi, and Jean-Jacques Lévy. The geometry of optimal lambda reductions. In Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. Association for Computing Machinery, ACM Press, January 1992.Google Scholar
  6. 6.
    J. Lamping. An algorithm for optimal lambda calculus reductions. In Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. Association for Computing Machinery, ACM Press, January 1990.Google Scholar
  7. 7.
    J. W. Lloyd. Logic Programming. Springer Verlag, 1984.Google Scholar
  8. 8.
    Ian Craig Mackie. The Geometry of Implementation (Applications of the Geometry of Interactions to Language Implementation). PhD thesis, University of London, September 1994.Google Scholar
  9. 9.
    Robin Milner and Mads Tofte and Robert Harper The Definition of Standard ML. The MIT Press, 1990.Google Scholar
  10. 10.
    J. C. Mitchell. Type systems for programming languages. In Jan van Leeuwen, editor, Formal Models and Semantics: Handbook of Theoretical Computer Science, volume B, chapter 8, pages 365–458. Elsevier, Amsterdam, 1990.Google Scholar
  11. 11.
    J. A. Robinson. A machine-oriented logic based on the resolution principle. Journal of Association of Computing Machinery, 12:23–41, 1965.Google Scholar
  12. 12.
    M. Wand. Finding sources of type errors. In Proceedings of the 13th ACM Conference on Principles of Programming Languages, pages 38–43. ACM Press, Jan 1986.Google Scholar
  13. 13.
    Mitchell Wand. A simple algorithm and proof for type inference. Fundamenta Informaticae, 10:115–122, 1987.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Milind Gandhe
    • 1
    • 2
  • G. Venkatesh
    • 1
    • 2
  • Amitabha Sanyal
    • 1
  1. 1.Department of Computer Science and EngineeringIndian Institute of TechnologyBombay
  2. 2.Silicon Automation SystemsBangalore

Personalised recommendations