Assessing the Type Annotation Burden

By J. Ore, Sebastian G. Elbaum, Carrick Detweiler, Lambros Karkazis. 2018

26 citations recorded by the source corpus.

Type annotations provide a link between program variables and domain-specific types. When combined with a type system, these annotations can enable early fault detection. For type annotations to be cost-effective in practice, they need to be both accurate and affordable for developers. We lack, however, an understanding of how burdensome type annotation is for developers. Hence, this work explores three fundamental questions: 1) how accurately do developers make type annotations; 2) how long does a single annotation take; and, 3) if a system could automatically suggest a type annotation, how beneficial to accuracy are correct suggestions and how detrimental are incorrect suggestions? We present results of a study of 71 programmers using 20 random code artifacts that contain variables with physical unit types that must be annotated. Subjects choose a correct type annotation only 51% of the time and take an average of 136 seconds to make a single correct annotation. Our qualitative analysis reveals that variable names and reasoning over mathematical operations are the leading clues for type selection. We find that suggesting the correct type boosts accuracy to 73%, while making a poor suggestion decreases accuracy to 28%. We also explore what state-of-the-art automated type annotation systems can and cannot do to help developers with type annotations, and identify implications for tool developers.

Subfields: Artificial Intelligence, Information Systems, Software, Software Engineering

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Georgios Gousios
  2. Amir M. Mir
  3. Satish Chandra
  4. Michael Pradel
  5. Sebastian Proksch
  6. Jibesh Patra
  7. Evaldas Latoskinas
  8. Jason Liu

In Information Systems

  1. Georgios Gousios
  2. Satish Chandra
  3. Jason Liu
  4. Michael Pradel
  5. Jibesh Patra
  6. Rabee Sohail Malik
  7. Sebastian Proksch
  8. Amir M. Mir

In Software

  1. Jibesh Patra
  2. Rabee Sohail Malik
  3. Satish Chandra
  4. Michael Pradel
  5. Georgios Gousios
  6. Jason Liu
  7. Amir M. Mir
  8. Sebastian Proksch

In Software Engineering

  1. Michael Pradel
  2. Jibesh Patra
  3. Georgios Gousios
  4. Rabee Sohail Malik

Citations in the corpus