Saved in:
Bibliographic Details
Main Authors: Schwerter, Felipe Bañados, Garcia, Ronald, Holmes, Reid, Ali, Karim
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2502.20533
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910849838350336
author Schwerter, Felipe Bañados
Garcia, Ronald
Holmes, Reid
Ali, Karim
author_facet Schwerter, Felipe Bañados
Garcia, Ronald
Holmes, Reid
Ali, Karim
contents A gradual type system allows developers to declare certain types to be enforced by the compiler (i.e., statically typed), while leaving other types to be enforced via runtime checks (i.e., dynamically typed). When runtime checks fail, debugging gradually typed programs becomes cumbersome, because these failures may arise far from the original point where an inconsistent type assumption is made. To ease this burden on developers, some gradually typed languages produce a blame report for a given type inconsistency. However, these reports are sometimes misleading, because they might point to program points that do not need to be changed to stop the error. To overcome the limitations of blame reports, we propose using dynamic program slicing as an alternative approach to help programmers debug run-time type errors. We describe a proof-of-concept for TypeSlicer, a tool that would present dynamic program slices to developers when a runtime check fails. We performed a Wizard-of-Oz user study to investigate how developers respond to dynamic program slices through a set of simulated interactions with TypeScript programs. This formative study shows that developers can understand and apply dynamic slice information to provide change recommendations when debugging runtime type errors.
format Preprint
id arxiv_https___arxiv_org_abs_2502_20533
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Dynamic Program Slices Change How Developers Diagnose Gradual Run-Time Type Errors
Schwerter, Felipe Bañados
Garcia, Ronald
Holmes, Reid
Ali, Karim
Programming Languages
A gradual type system allows developers to declare certain types to be enforced by the compiler (i.e., statically typed), while leaving other types to be enforced via runtime checks (i.e., dynamically typed). When runtime checks fail, debugging gradually typed programs becomes cumbersome, because these failures may arise far from the original point where an inconsistent type assumption is made. To ease this burden on developers, some gradually typed languages produce a blame report for a given type inconsistency. However, these reports are sometimes misleading, because they might point to program points that do not need to be changed to stop the error. To overcome the limitations of blame reports, we propose using dynamic program slicing as an alternative approach to help programmers debug run-time type errors. We describe a proof-of-concept for TypeSlicer, a tool that would present dynamic program slices to developers when a runtime check fails. We performed a Wizard-of-Oz user study to investigate how developers respond to dynamic program slices through a set of simulated interactions with TypeScript programs. This formative study shows that developers can understand and apply dynamic slice information to provide change recommendations when debugging runtime type errors.
title Dynamic Program Slices Change How Developers Diagnose Gradual Run-Time Type Errors
topic Programming Languages
url https://arxiv.org/abs/2502.20533