Lune

OOPSLA2023顶会

Getting into the Flow: Towards Better Type Error Messages for Constraint-Based Type Inference

Ishan Bhanuka, Lionel Parreaux, David Binder, Jonathan Immanuel Brachthäuser

摘要

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. 1

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
  • A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism
  • Code Style Sheets: CSS for Code 引用了 Total Type Error Localization and Recovery with Holes
  • Usability Barriers for Liquid Types 引用了 Total Type Error Localization and Recovery with Holes
  • When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper8

  1. Total Type Error Localization and Recovery with HolesEric Zhao, Raef Maroof, Anand Dukkipati, Andrew Blinn 等POPL 2024 · 15 次引用
  2. When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用
  3. Code Style Sheets: CSS for CodeSam Cohen, Ravi ChughOOPSLA 2025 · 5 次引用
  4. A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 4 次引用
  5. Usability Barriers for Liquid TypesCatarina Gamboa, Abigail Reese, Alcides Fonseca, Jonathan AldrichPLDI 2025 · 4 次引用

它引用的 Paper2

  1. MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 次引用
  2. When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用

相关 Paper

  1. Refinement Type RefutationsRobin Webbers, Klaus von Gleissenthall, Ranjit JhalaOOPSLA 2024 · 3 次引用
  2. The Simple Essence of Overloading: Making Ad-Hoc Polymorphism More Algebraic with Flow-Based Variational Type-CheckingJirí Benes, Jonathan Immanuel BrachthäuserOOPSLA 2025
  3. Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 15 次引用
  4. Constraint-Driven Explanations for Black-Box ML ModelsAditya A. Shrotri, Nina Narodytska, Alexey Ignatiev, Kuldeep S. Meel 等AAAI 2022 · 25 次引用
  5. Root Causing Linearizability ViolationsBerk Çirisci, Constantin Enea, Azadeh Farzan, Suha Orhun MutluergilCAV 2020 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖