mlsanityData to 14 Oct 2026

Inferring Pluggable Types with Machine Learning

arXiv 2406.15676 ↗First posted 21 Jun 2024cs.SE cs.AIcited by 0

Not on the map. Why?

Abstract (arXiv)

Pluggable type systems allow programmers to extend the type system of a programming language to enforce semantic properties defined by the programmer. Pluggable type systems are difficult to deploy in legacy codebases because they require programmers to write type annotations manually. This paper investigates how to use machine learning to infer type qualifiers automatically. We propose a novel representation, NaP-AST, that encodes minimal dataflow hints for the effective inference of type qualifiers. We evaluate several model architectures for inferring type qualifiers, including Graph Transformer Network, Graph Convolutional Network and Large Language Model. We further validated these models by applying them to 12 open-source programs from a prior evaluation of the NullAway pluggable typechecker, lowering warnings in all but one unannotated project. We discovered that GTN shows the best performance, with a recall of .89 and precision of 0.6. Furthermore, we conduct a study to estimate the number of Java classes needed for good performance of the trained model. For our feasibility study, performance improved around 16k classes, and deteriorated due to overfitting around 22k classes.

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 23 of its 56 references that are in the map. First posted on arXiv 21 Jun 2024.

Builds on

23 of 56 references.

References · 23

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2023Qwen Technical Reportcited by 3,344
  3. 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
  4. 2019Simplifying Graph Convolutional Networkscited by 1,477
  5. 2019Graph Transformer Networkscited by 523
  6. 2024RepairAgent: An Autonomous, LLM-Based Agent for Program Repaircited by 232
  7. 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 133
  8. 2023The Programmer's Assistant: Conversational Interaction with a Large Language Model for Software Developmentcited by 96
  9. 2023AI-assisted coding: Experiments with GPT-4cited by 43
  10. 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
  11. 2023Exploring the Boundaries of GPT-4 in Radiologycited by 31
  12. 2020Typilus: Neural Type Hintscited by 29
11 more
  1. 2023Large Language Models in Fault Localisationcited by 28
  2. 2021Graph Transformer Networks: Learning Meta-path Graphs to Improve GNNscited by 22
  3. 2021Type4Py: Practical Deep Similarity Learning-Based Type Inference for Pythoncited by 19
  4. 2021Static Inference Meets Deep Learning: A Hybrid Type Inference Approach for Pythoncited by 12
  5. 2023The Program Testing Ability of Large Language Models for Codecited by 11
  6. 2024Comparing large language models and human programmers for generating programming codecited by 9
  7. 2024Exploring the Efficacy of Large Language Models (GPT-4) in Binary Reverse Engineeringcited by 8
  8. 2021PYInfer: Deep Learning Semantic Type Inference for Python Variablescited by 4
  9. 2019NullAway: Practical Type-Based Null Safety for Javacited by 3
  10. 2021Solver-based Gradual Type Migrationcited by 3
  11. 2015Semantics for Locking Specificationscited by 1

Built on by

Not cited yet.