[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1250734.1250783acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Searching for type-error messages

Published: 10 June 2007 Publication History

Abstract

Advanced type systems often need some form of type inference to reduce the burden of explicit typing, but type inference often leads to poor error messages for ill-typed programs. This work pursues a new approach to constructing compilers and presenting type-error messages in which the type-checker itself does not produce the messages. Instead, it is an oracle for a search procedure that finds similar programs that do type-check. Our two-fold goal is to improve error messages while simplifying compiler construction. Our primary implementation and evaluation is for Caml, a language with full type inference. We also present a prototype for C++ template functions, where type instantiation is implicit. A key extension is making our approach robust even when the program has multiple independent type errors.

References

[1]
M. Beaven and R. Stansifer. Explaining type errors in polymorphic languages. ACM Letters on Programming Languages and Systems, 2(1-4):17--30, 1993.
[2]
K. Bernstein and E. Stark. Debugging type errors (full version). Technical report, State University of New York at Stony Brook, 1995.
[3]
M.G. Burke and G.A. Fisher. A practical method for LR and LL syntactic error diagnosis and recovery. ACM Transactions on Programming Languages and Systems, 9(2):164--197, 1987.
[4]
O. Chitil, F. Huch, and A. Simon. Typeview: a tool for understanding type errors. In MMohnen and PKoopman, editors, 12th International Workshop on Implementation of Functional Languages, Aachner Informatik-Berichte, 2000.
[5]
V. Choppella and C.T. Haynes. Diagnosis of ill-typed programs. Technical Report 426, Indiana University, December 1994.
[6]
H. Cleve and A. Zeller. Locating causes of program failures. In 27th International Conference on Software Engineering, 2005.
[7]
D. Duggan. Correct type explanation. In ACM SIGPLAN Workshop on ML, 1998.
[8]
D. Duggan and F. Bent. Explaining type inference. Science of Computer Programming, 27(1):37--83, July 1996.
[9]
M. Gandhe, G. Venkatesh, and A. Sanyal. Correcting errors in the Curry system. In 16th Conference on Foundations of Software Technology and Theoretical Computer Science, 1996.
[10]
C. Haack and J.B. Wells. Type error slicing in implicitly typed higher-order languages. Science of Computer Programming, 50(1-3):189--224, 2004.
[11]
B.J. Heeren. Top Quality Type Error Messages. PhD thesis, Universiteit Utrecht, The Netherlands, Sept. 2005.
[12]
J. Järvi, D. Gregor, J. Willcock, A. Lumsdaine, and J. Siek. Algorithm specialization in generic programming: challenges of constrained generics in C++. In ACM Conference on Programming Language Design and Implementation, 2006.
[13]
Y. Jun, G. Michaelson, and P. Trinder. Explaining polymorphic types. The Computer Journal, 45(4):436--452, 2002.
[14]
S. Krishnamurthi, Y.-D. Erlich, and M. Felleisen. Expressing structural properties as language constructs. In European Symposium on Programming, 1999.
[15]
O. Lee and K. Yi. Proofs about a folklore let-polymorphic type inference algorithm. ACM Transactions on Programming Languages and Systems, 20(4):707--723, 1998.
[16]
B. Lerner, D. Grossman, and C. Chambers. Seminal: Searching for ML type-error messages. In ACM SIGPLAN Workshop on ML, 2006.
[17]
B.J. McAdam. On the unification of substitutions in type inference. In K. Hammond, A.J. Davie, and C. Clack, editors, Implementation of Functional Languages, volume 1595 of LNCS, 1998.
[18]
B.J. McAdam. Repairing Type Errors in Functional Programs. PhD thesis, Laboratory for Foundatations of Computer Science, The University of Edinburgh, 2001.
[19]
G.D. Reis and B. Stroustrup. Specifying C++ concepts. In 33rd ACM Symposium on Principles of Programming Languages, 2006.
[20]
P.J. Stuckey, M. Sulzmann, and J. Wazny. Interactive type debugging in Haskell. In ACM SIGPLAN Workshop on Haskell, 2003.
[21]
F. Tip and T.B. Dinesh. A slicing-based approach for locating type errors. ACM Transactions on Software Engineering and Methodology, 10(1):5--55, 2001.
[22]
M. Wand. Finding the source of type errors. In 13th ACM Symposium on Principles of Programming Languages, 1986.
[23]
A. Zeller. Yesterday, my program worked. today, it does not. Why? In 7th European Software Engineering Conference and 7th ACM Symposium on the Foundations of Software Engineering, 1999.
[24]
L. Zolman. STLFilt: An STL error message decryptor for C++. http://www.bdsoft.com/tools/stlfilt.html, 2005.

Cited By

View all
  • (2023)Pluggable Type Inference for Free2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00186(1542-1554)Online publication date: 11-Sep-2023
  • (2023)Error Localization for Sequential Effect SystemsStatic Analysis10.1007/978-3-031-44245-2_16(343-370)Online publication date: 24-Oct-2023
  • (2021)Refining the Delta Debugging of Type ErrorsProceedings of the 33rd Symposium on Implementation and Application of Functional Languages10.1145/3544885.3544888(10-19)Online publication date: 1-Sep-2021
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '07: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2007
508 pages
ISBN:9781595936332
DOI:10.1145/1250734
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 6
    Proceedings of the 2007 PLDI conference
    June 2007
    491 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1273442
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 10 June 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. error messages
  2. objective Caml
  3. seminal
  4. type-checking
  5. type-inference

Qualifiers

  • Article

Conference

PLDI '07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)37
  • Downloads (Last 6 weeks)4
Reflects downloads up to 31 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Pluggable Type Inference for Free2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00186(1542-1554)Online publication date: 11-Sep-2023
  • (2023)Error Localization for Sequential Effect SystemsStatic Analysis10.1007/978-3-031-44245-2_16(343-370)Online publication date: 24-Oct-2023
  • (2021)Refining the Delta Debugging of Type ErrorsProceedings of the 33rd Symposium on Implementation and Application of Functional Languages10.1145/3544885.3544888(10-19)Online publication date: 1-Sep-2021
  • (2020)Sound, heuristic type annotation inference for RubyProceedings of the 16th ACM SIGPLAN International Symposium on Dynamic Languages10.1145/3426422.3426985(112-125)Online publication date: 17-Nov-2020
  • (2020)The history of Standard MLProceedings of the ACM on Programming Languages10.1145/33863364:HOPL(1-100)Online publication date: 12-Jun-2020
  • (2020)Type error feedback via analytic program repairProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386005(16-30)Online publication date: 11-Jun-2020
  • (2019)Compiler Error Messages Considered UnhelpfulProceedings of the Working Group Reports on Innovation and Technology in Computer Science Education10.1145/3344429.3372508(177-210)Online publication date: 18-Dec-2019
  • (2019)Efficient Counter-factual Type Error Debugging2019 International Symposium on Theoretical Aspects of Software Engineering (TASE)10.1109/TASE.2019.00-13(99-106)Online publication date: Jul-2019
  • (2018)Delta Debugging Type Errors with a Blackbox CompilerProceedings of the 30th Symposium on Implementation and Application of Functional Languages10.1145/3310232.3310243(13-24)Online publication date: 5-Sep-2018
  • (2018)Automatic diagnosis and correction of logical errors for functional programming assignmentsProceedings of the ACM on Programming Languages10.1145/32765282:OOPSLA(1-30)Online publication date: 24-Oct-2018
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media