{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,4,11]],"date-time":"2026-04-11T02:12:45Z","timestamp":1775873565298,"version":"3.50.1"},"reference-count":29,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T00:00:00Z","timestamp":1697414400000},"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":[[2023,10,16]]},"abstract":"<jats:p>Creating good type error messages for constraint-based type inference systems is difficult. Typical type error messages reflect implementation details of the underlying constraint-solving algorithms rather than the specific factors leading to type mismatches. We propose using subtyping constraints that capture data flow to classify and explain type errors. Our algorithm explains type errors as faulty data flows, which programmers are already used to reasoning about, and illustrates these data flows as sequences of relevant program locations. We show that our ideas and algorithm are not limited to languages with subtyping, as they can be readily integrated with Hindley-Milner type inference. In addition to these core contributions, we present the results of a user study to evaluate the quality of our messages compared to other implementations. While the quantitative evaluation does not show that flow-based messages improve the localization or understanding of the causes of type errors, the qualitative evaluation suggests a real need and demand for flow-based messages.<\/jats:p>","DOI":"10.1145\/3622812","type":"journal-article","created":{"date-parts":[[2023,10,16]],"date-time":"2023-10-16T15:41:29Z","timestamp":1697470889000},"page":"431-459","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":11,"title":["Getting into the Flow: Towards Better Type Error Messages for Constraint-Based Type Inference"],"prefix":"10.1145","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-7000-6534","authenticated-orcid":false,"given":"Ishan","family":"Bhanuka","sequence":"first","affiliation":[{"name":"Hong Kong University of Science and Technology, Hong Kong, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8805-0728","authenticated-orcid":false,"given":"Lionel","family":"Parreaux","sequence":"additional","affiliation":[{"name":"Hong Kong University of Science and Technology, Hong Kong, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-1272-0972","authenticated-orcid":false,"given":"David","family":"Binder","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-9128-0391","authenticated-orcid":false,"given":"Jonathan Immanuel","family":"Brachth\u00e4user","sequence":"additional","affiliation":[{"name":"University of T\u00fcbingen, T\u00fcbingen, Germany"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2023,10,16]]},"reference":[{"key":"e_1_2_1_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/3344429.3372508"},{"key":"e_1_2_1_2_1","doi-asserted-by":"publisher","DOI":"10.5281\/zenodo.8332129"},{"key":"e_1_2_1_3_1","volume-title":"Algebraic Subtyping: Distinguished Dissertation","author":"Dolan Stephen","year":"2017","unstructured":"Stephen Dolan . 2017 . Algebraic Subtyping: Distinguished Dissertation 2017. BCS , Swindon, GBR. isbn:1780174152 https:\/\/dl.acm.org\/doi\/book\/10.5555\/3180976 Stephen Dolan. 2017. Algebraic Subtyping: Distinguished Dissertation 2017. BCS, Swindon, GBR. isbn:1780174152 https:\/\/dl.acm.org\/doi\/book\/10.5555\/3180976"},{"key":"e_1_2_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009882"},{"key":"e_1_2_1_5_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0020-7373(81)80056-9"},{"key":"e_1_2_1_6_1","doi-asserted-by":"publisher","DOI":"10.1080\/00401706.1964.10490181"},{"key":"e_1_2_1_7_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICPC.2012.6240511"},{"key":"e_1_2_1_8_1","doi-asserted-by":"publisher","DOI":"10.1007\/11431664_5"},{"key":"e_1_2_1_9_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-21037-2_10"},{"key":"e_1_2_1_10_1","volume-title":"Top quality type error messages. Ph. D. Dissertation","author":"Heeren Bastiaan","unstructured":"Bastiaan Heeren . 2005. Top quality type error messages. Ph. D. Dissertation . Utrecht University . Bastiaan Heeren. 2005. Top quality type error messages. Ph. D. Dissertation. Utrecht University."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/871895.871902"},{"key":"e_1_2_1_12_1","doi-asserted-by":"publisher","DOI":"10.3758\/s13428-019-01283-5"},{"key":"e_1_2_1_13_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796806006034"},{"key":"e_1_2_1_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/2931037.2931051"},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1080\/01621459.1952.10483441"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2641638.2641653"},{"key":"e_1_2_1_17_1","doi-asserted-by":"publisher","DOI":"10.1145\/3022671.2983994"},{"key":"e_1_2_1_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/1953163.1953308"},{"key":"e_1_2_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/2048237.2048241"},{"key":"e_1_2_1_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/944705.944708"},{"key":"e_1_2_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3409006"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/3563304"},{"key":"e_1_2_1_23_1","unstructured":"Didier R\u00e9my. 1992. Extension of ML type system with a sorted equation theory on types. INRIA. https:\/\/hal.inria.fr\/inria-00077006 Projet FORMEL \t\t\t\t  Didier R\u00e9my. 1992. Extension of ML type system with a sorted equation theory on types. INRIA. https:\/\/hal.inria.fr\/inria-00077006 Projet FORMEL"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/3138818"},{"key":"e_1_2_1_25_1","doi-asserted-by":"publisher","DOI":"10.3758\/s13428-021-01776-2"},{"key":"e_1_2_1_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/1708016.1708023"},{"key":"e_1_2_1_27_1","doi-asserted-by":"publisher","DOI":"10.1145\/512644.512648"},{"key":"e_1_2_1_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/3133850.3133862"},{"key":"e_1_2_1_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/2578855.2535870"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3622812","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3622812","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,17]],"date-time":"2025-06-17T16:37:04Z","timestamp":1750178224000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3622812"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023,10,16]]},"references-count":29,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2023,10,16]]}},"alternative-id":["10.1145\/3622812"],"URL":"https:\/\/doi.org\/10.1145\/3622812","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023,10,16]]},"assertion":[{"value":"2023-10-16","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}