{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T17:06:55Z","timestamp":1789060015180,"version":"build-2803163510"},"reference-count":58,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA","license":[{"start":{"date-parts":[[2017,10,12]],"date-time":"2017-10-12T00:00:00Z","timestamp":1507766400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2017,10,12]]},"abstract":"<jats:p>\n                    Type inference is convenient by allowing programmers to elide type annotations, but this comes at the cost of often generating very confusing and opaque type error messages that are of little help to fix type errors. Though there have been many successful attempts at making type error messages better in the past thirty years, many classes of errors are still difficult to fix. In particular, current approaches still generate imprecise and uninformative error messages for type errors arising from errors in grouping constructs like parentheses and brackets. Worse, a recent study shows that these errors usually take more than 10 steps to fix and occur quite frequently (around 45% to 60% of all type errors) in programs written by students learning functional programming. We call this class of errors,\n                    <jats:italic toggle=\"yes\">nonstructural errors<\/jats:italic>\n                    .\n                  <\/jats:p>\n                  <jats:p>We solve this problem by developing Learnskell, a type error debugger that uses machine learning to help diagnose and deliver high quality error messages, for programs that contain nonstructural errors. While previous approaches usually report type errors on typing constraints or on the type level, Learnskell generates suggestions on the expression level. We have performed an evaluation on more than 1,500 type errors, and the result shows that Learnskell is quite precise. It can correctly capture 86% of all nonstructural errors and locate the error cause with a precision of 63%\/87% with the first 1\/3 messages, respectively. This is several times more than the precision of state-of-the-art compilers and debuggers. We have also studied the performance of Learnskell and found out that it scales to large programs.<\/jats:p>","DOI":"10.1145\/3133930","type":"journal-article","created":{"date-parts":[[2017,10,13]],"date-time":"2017-10-13T11:15:45Z","timestamp":1507893345000},"page":"1-29","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":8,"title":["Learning user friendly type-error messages"],"prefix":"10.1145","volume":"1","author":[{"given":"Baijun","family":"Wu","sequence":"first","affiliation":[{"name":"University of Louisiana at Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"John Peter","family":"Campora III","sequence":"additional","affiliation":[{"name":"University of Louisiana at Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Sheng","family":"Chen","sequence":"additional","affiliation":[{"name":"University of Louisiana at Lafayette, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2017,10,12]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1109\/MSR.2013.6624029"},{"key":"e_1_2_1_2_1","unstructured":"Fig. 12. A comparison of oversampling techniques. We use the short names SMO and SMO-CV for SMOTE"},{"key":"e_1_2_1_3_1","volume-title":"DeepCoder: Learning to Write Programs. CoRR abs\/1611.01989","author":"Balog Matej","year":"2016","unstructured":"Matej Balog, Alexander L. Gaunt, Marc Brockschmidt, Sebastian Nowozin, and Daniel Tarlow. 2016. DeepCoder: Learning to Write Programs. CoRR abs\/1611.01989 (2016). http:\/\/arxiv.org\/abs\/1611.01989"},{"key":"e_1_2_1_4_1","volume-title":"Proceedings of the 33rd International Conference on International Conference on Machine Learning -","volume":"48","author":"Bielik Pavol","year":"2016","unstructured":"Pavol Bielik, Veselin Raychev, and Martin Vechev. 2016a. PHOG: Probabilistic Model for Code. In Proceedings of the 33rd International Conference on International Conference on Machine Learning - Volume 48 (ICML\u201916) . JMLR.org, 2933\u20132942. http:\/\/dl.acm.org\/citation.cfm?id=3045390.3045699"},{"key":"e_1_2_1_5_1","volume-title":"Vechev","author":"Bielik Pavol","year":"2016","unstructured":"Pavol Bielik, Veselin Raychev, and Martin T. Vechev. 2016b. Learning a Static Analyzer from Data. CoRR abs\/1611.01752 (2016). http:\/\/arxiv.org\/abs\/1611.01752"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.5555\/2379703.2379745"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535863"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/2535838.2535863"},{"key":"e_1_2_1_9_1","volume-title":"Guided Type Debugging. In Int. Symp. on Functional and Logic Programming (LNCS 8475)","author":"Chen S.","unstructured":"S. Chen and M. Erwig. 2014b. Guided Type Debugging. In Int. Symp. on Functional and Logic Programming (LNCS 8475). 35\u201351."},{"key":"e_1_2_1_10_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jvlc.2016.07.001"},{"key":"e_1_2_1_11_1","volume-title":"Compositional Explanation of Types and Algorithmic Debugging of Type Errors. In ACM Int. Conf. on Functional Programming . 193\u2013204","author":"Chitil Olaf","year":"2001","unstructured":"Olaf Chitil. 2001. Compositional Explanation of Types and Algorithmic Debugging of Type Errors. In ACM Int. Conf. on Functional Programming . 193\u2013204."},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/135226.135228"},{"key":"e_1_2_1_13_1","volume-title":"Proceedings of 17th International Conference on Machine Learning. Stanford CA Morgan Kaufmann . 231\u2013238","author":"Domingos Pedro","year":"2000","unstructured":"Pedro Domingos. 2000. A unified bias-variance decomposition. In Proceedings of 17th International Conference on Machine Learning. Stanford CA Morgan Kaufmann . 231\u2013238."},{"key":"e_1_2_1_14_1","doi-asserted-by":"crossref","unstructured":"Dominic Duggan and Frederick Bent. 1995. Explaining Type Inference. In Science of Computer Programming. 37\u201383.","DOI":"10.1016\/0167-6423(95)00007-0"},{"key":"e_1_2_1_15_1","volume-title":"International joint conference on artificial intelligence","author":"Elkan Charles","unstructured":"Charles Elkan. 2001. The foundations of cost-sensitive learning. In International joint conference on artificial intelligence, Vol. 17. Lawrence Erlbaum Associates Ltd, 973\u2013978."},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF03037279"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1007\/BF03037279"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1007\/3-540-36575-3_20"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-74130-5_12"},{"key":"e_1_2_1_20_1","doi-asserted-by":"crossref","unstructured":"Jurriaan Hage and Bastiaan Heeren. 2007. Heuristics for Type Error Discovery and Recovery. In Implementation and Application of Functional Languages . 199\u2013216.","DOI":"10.1007\/978-3-540-74130-5_12"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00434-6_4"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-00434-6_4"},{"key":"e_1_2_1_23_1","unstructured":"Stefan Harmeling. 2000. Solving Satisfiability Problems with Genetic Algorithms. (2000)."},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/871895.871902"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/871895.871902"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/2980983.2908121"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/2980983.2908121"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/512644.512649"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/512644.512649"},{"key":"e_1_2_1_30_1","volume-title":"Vazirani","author":"Kearns Michael J.","year":"1994","unstructured":"Michael J. Kearns and Umesh V. Vazirani. 1994. An Introduction to Computational Learning Theory. MIT Press, Cambridge, MA, USA."},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.1145\/291891.291892"},{"key":"e_1_2_1_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/291891.291892"},{"key":"e_1_2_1_33_1","unstructured":"Oukseh Lee and Kwangkeun Yi. 2000. A Generalized Let-Polymorphic Type Inference Algorithm. Technical Report. Technical Memorandum ROPAS-2000-5 Research on Program Analysis System Korea Advanced Institute of Science and Technology."},{"key":"e_1_2_1_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/1250734.1250783"},{"key":"e_1_2_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2983994"},{"key":"e_1_2_1_36_1","doi-asserted-by":"crossref","unstructured":"Calvin Loncaric Satish Chandra Cole Schlesinger and Manu Sridharan. 2016. A Practical Framework for Type Inference Error Explanation. In OOPSLA. 781\u2013799.","DOI":"10.1145\/2983990.2983994"},{"key":"e_1_2_1_37_1","volume-title":"Trends in Functional Programming","author":"McAdam Bruce","unstructured":"Bruce McAdam. 2002a. Trends in Functional Programming. Intellect Books, Exeter, UK, UK, Chapter How to Repair Type Errors Automatically, 87\u201398. http:\/\/dl.acm.org\/citation.cfm?id=644403.644412"},{"key":"e_1_2_1_38_1","unstructured":"Bruce J McAdam. 2002b. Reporting Type Errors in Functional Programs. Ph.D. Dissertation. Larboratory for Foundations of Computer Science The University of Edinburgh."},{"key":"e_1_2_1_39_1","unstructured":"Takao Mohri and Hidehiko Tanaka. 1994. An Optimal Weighting Criterion of Case Indexing for Both Numeric and Symbolic Attributes. In In D. W. Aha (Ed.) Case-Based Reasoning: Papers from the 1994 Workshop Technical Report WS-94-01. Menlo Park CA: AIII . AAAI Press 123\u2013127."},{"key":"e_1_2_1_40_1","unstructured":"Ankur Moitra. 2014. Algorithmic Aspects of Machine Learning. (2014)."},{"key":"e_1_2_1_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944708"},{"key":"e_1_2_1_42_1","doi-asserted-by":"publisher","unstructured":"Zvonimir Pavlinovic Tim King and Thomas Wies. 2014. Finding Minimum Type Error Sources. In OOPSLA. 525\u2013542. 10.1145\/2660193.2660230","DOI":"10.1145\/2660193.2660230"},{"key":"e_1_2_1_43_1","doi-asserted-by":"crossref","unstructured":"Zvonimir Pavlinovic Tim King and Thomas Wies. 2015. Practical SMT-based Type Error Localization. In ICFP. 412\u2013423.","DOI":"10.1145\/2784731.2784765"},{"key":"e_1_2_1_44_1","doi-asserted-by":"publisher","DOI":"10.5555\/1953048.2078195"},{"key":"e_1_2_1_45_1","volume-title":"Haskell 98 language and libraries: the revised report","author":"Jones Simon Peyton","unstructured":"Simon Peyton Jones. 2003. Haskell 98 language and libraries: the revised report. Cambridge University Press."},{"key":"e_1_2_1_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/584091.584093"},{"key":"e_1_2_1_47_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICMLA.2016.0185"},{"key":"e_1_2_1_48_1","doi-asserted-by":"publisher","DOI":"10.1145\/871895.871903"},{"key":"e_1_2_1_49_1","doi-asserted-by":"publisher","DOI":"10.1145\/1017472.1017486"},{"key":"e_1_2_1_50_1","doi-asserted-by":"publisher","DOI":"10.1109\/TKDE.2002.1000348"},{"key":"e_1_2_1_51_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796815000179"},{"key":"e_1_2_1_52_1","doi-asserted-by":"publisher","DOI":"10.1145\/512644.512648"},{"key":"e_1_2_1_53_1","volume-title":"Proc. IRIS Machine Learning Workshop","volume":"19","author":"Wang BX","year":"2004","unstructured":"BX Wang and Nathalie Japkowicz. 2004. Imbalanced data set learning with synthetic samples. In Proc. IRIS Machine Learning Workshop , Vol. 19."},{"key":"e_1_2_1_54_1","unstructured":"Jeremy Richard Wazny. 2006. Type inference and type error diagnosis for Hindley\/Milner with extensions. Ph.D. Dissertation. The University of Melbourne."},{"key":"e_1_2_1_55_1","first-page":"1","article-title":"How Type Errors Were Fixed and What Students Did","volume":"105","author":"Wu Baijun","year":"2017","unstructured":"Baijun Wu and Sheng Chen. 2017. How Type Errors Were Fixed and What Students Did? Proc. ACM Program. Lang. 1, OOPSLA, Article 105 (2017), 1 \u2013 27.","journal-title":"Proc. ACM Program. Lang. 1, OOPSLA, Article"},{"key":"e_1_2_1_56_1","volume-title":"Trends in Functional Programming","author":"Yang Jun","unstructured":"Jun Yang. 2000. Explaining Type Errors by Finding the Source of a Type Conflict. In Trends in Functional Programming. Intellect Books, 58\u201366."},{"key":"e_1_2_1_57_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2738009"},{"key":"e_1_2_1_58_1","doi-asserted-by":"publisher","DOI":"10.1145\/2908080.2908125"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133930","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3133930","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,9,10]],"date-time":"2026-09-10T16:10:01Z","timestamp":1789056601000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3133930"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2017,10,12]]},"references-count":58,"journal-issue":{"issue":"OOPSLA","published-print":{"date-parts":[[2017,10,12]]}},"alternative-id":["10.1145\/3133930"],"URL":"https:\/\/doi.org\/10.1145\/3133930","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2017,10,12]]},"assertion":[{"value":"2017-10-12","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}