• Home
  • Search
  • Exploiting Type Hints in Method Argument Names to Improve Lightweight Type Inference
  • Open Access IconOpen Access
  • Cite Icon9
  • https://doi.org/10.1109/icpc.2017.33Copy DOI Icon

Exploiting Type Hints in Method Argument Names to Improve Lightweight Type Inference

  • May 1, 2017
  • Nevena Milojkovic +2 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

The lack of static type information is one of the main obstacles to program comprehension in dynamically-typed languages. While static type inference algorithms try to remedy this problem, they usually suffer from the problem of false positives or false negatives. In order to partially compensate for the lack of static type information, a common practice in dynamically-typed languages is to name or annotate method arguments in such a way that they reveal their expected type, e.g., aString, anInt, or string: String. Recent studies confirmed that these type annotations are indeed frequently used by developers in dynamically-typed languages. We propose a lightweight heuristic that uses these hints from method argument names to augment the performance of a static type inference algorithm. The evaluation through a proof-of-concept prototype implemented in Pharo Smalltalk shows that the augmented algorithm outperforms the basic algorithm, and correctly infers types for 81% more method arguments.

Similar Papers
  • Conference Article
  • Citations9

Inferring Types by Mining Class Usage Frequency from Inline Caches

  • Aug 23, 2016
  • Nevena Milojković +3
  • Conference Article
  • Citations77

Integrating Static and Dynamic Analysis for Detecting Vulnerabilities

  • Jan 01, 2006
  • Ashish Aggarwal +1
  • Book Chapter
  • Citations5

Achieving Multiple Dispatch in Hybrid Statically and Dynamically Typed Languages

  • Jan 01, 2013
  • Francisco Ortin +3
  • Research Article
  • Citations28

Memory distortion and sexual trauma: the problem of false negatives and false positives.

  • Oct 01, 1994
  • International Journal of Clinical and Experimental Hypnosis
  • Michael R Nash
  • Research Article
  • Citations49

The ins and outs of gradual type inference

  • Jan 18, 2012
  • ACM SIGPLAN Notices
  • Aseem Rastogi +2
  • Conference Article
  • Citations9

Typed First-Class Traits

  • Jan 01, 2018
  • DROPS (Schloss Dagstuhl – Leibniz Center for Informatics)
  • Xuan Bi +1
  • Research Article

From ML type inference to stratified type inference

  • Sep 12, 2005
  • ACM SIGPLAN Notices
  • François Pottier
  • Conference Article
  • Citations36

Checked Load: Architectural support for JavaScript type-checking on mobile processors

  • Feb 01, 2011
  • Owen Anderson +3
  • Conference Article
  • Citations4

Exploring cheap type inference heuristics in dynamically typed languages

  • Oct 20, 2016
  • Nevena Milojković +1
  • Research Article
  • Citations9

Adding dynamically-typed language support to a statically-typed language compiler

  • Mar 03, 2012
  • ACM SIGPLAN Notices
  • Kazuaki Ishizaki +5
  • Research Article
  • Citations3

Deriving a complete type inference for Hindley–Milner and vector sizes using expansion

  • Mar 25, 2014
  • Science of Computer Programming
  • Axel Simon
  • Book Chapter
  • Citations43

Assessment of Altered Brain Function in the Aged

  • Jan 01, 1978
  • Robert L Kahn +1
  • Conference Article
  • Citations24

Improved type specialization for dynamic scripting languages

  • Oct 28, 2013
  • Madhukar N Kedlaya +4
  • Research Article
  • Citations18

Dynamic Type Inference to Support Object-Oriented Reenginerring in Smalltalk

  • Jul 20, 1998
  • Open Access CRIS of the University of Bern
  • Pascal Rapicault +3
  • PDF
  • Research Article
  • Citations5

Migrating gradual types

  • Jan 01, 2022
  • Journal of Functional Programming
  • John Peter Campora +3
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.