2018
DOI: 10.1017/s0956796818000126
|View full text |Cite
|
Sign up to set email alerts
|

Dynamic witnesses for static type errors (or, Ill-Typed Programs Usually Go Wrong)

Abstract: Static type errors are a common stumbling block for newcomers to typed functional languages. We present a dynamic approach to explaining type errors by generating counterexample witness inputs that illustrate how an ill-typed program goes wrong. First, given an ill-typed function, we symbolically execute the body to synthesize witness values that make the program go wrong. We prove that our procedure synthesizes general witnesses in that if a witness is found, then for all inhabited input types, there exist va… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
4
1

Citation Types

0
5
0

Year Published

2018
2018
2023
2023

Publication Types

Select...
4
1

Relationship

0
5

Authors

Journals

citations
Cited by 6 publications
(5 citation statements)
references
References 46 publications
0
5
0
Order By: Relevance
“…Type error debugging research has a vast history which covers a variety of solutions over a span of thirty-plus years [1,3,4,6,10,13,15,16,20,21,[23][24][25]30]. However, these solutions tended to need either a modified compiler or patch.…”
Section: Related Workmentioning
confidence: 99%
“…Type error debugging research has a vast history which covers a variety of solutions over a span of thirty-plus years [1,3,4,6,10,13,15,16,20,21,[23][24][25]30]. However, these solutions tended to need either a modified compiler or patch.…”
Section: Related Workmentioning
confidence: 99%
“…Since the seminal work of Wand [1986], which keeps track of all unification steps in order to help debugging, many algorithms have been proposed to better assist programmers. A large variety of techniques has been explored, including slicing [Haack and Wells 2003;Tip and Dinesh 2001], heuristics [Zhang et al 2015], SMT constraint solving [Pavlinovic et al 2014], counter-example generation [Nguyen and Horn 2015;Seidel et al 2016], machine learning [Seidel et al 2017], and other search-based approaches, such as Seminal [Lerner et al 2007] and counterfactual change inference .…”
Section: Related Workmentioning
confidence: 99%
“…Apart from Seidel et al [2016], which focuses on identifying dynamic witnesses for static refinement type errors, none of the above approaches target refinement types. In this work, we uncover a novel application of gradual typing for error explanation, by observing that the notion of concretizations of gradual types that stem from AGT, embed useful justifications (or lack thereof) that can be exploited to identify refinement errors and guide migration.…”
Section: Related Workmentioning
confidence: 99%
“…Recently, Seidel et al (2016) developed an explanation approach from a very different perspective. Given an ill-typed expression, their approach finds an input such that the evaluation of the expression will fail with the given input.…”
Section: Reporting Single Locationsmentioning
confidence: 99%