Registered user since Fri 23 Jul 2021
Contributions
View general profile
Registered user since Fri 23 Jul 2021
Contributions
Research Papers
Wed 12 Oct 2022 11:00 - 11:20 at Gold A - Technical Session 11 - Analysis and Types Chair(s): Thiago FerreiraRecently, Python has adopted gradual typing to support type checking and program documentation. However, to enjoy the benefit of gradual typing, developers have to manually write type annotation, which is recognized to be a time-consuming and error-prone task. To alleviate human efforts on manual type annotation, machine-learning-based approaches have been proposed to recommend types based on code features. However, they suffer from the correctness problem, i.e., the recommended types can not pass type checking. To address the correctness problem of the machine-learning-based approaches, in this paper, we present a static type recommendation approach, named Stray. Stray can recommend types correctly. We evaluate the performance of Stray by comparing it against three state-of-art type recommendation approaches, and find that Stray outperforms these baselines by over 30% absolute improvement in both precision and recall.