Pith. sign in

REVIEW 1 cited by

Type Prediction With Program Decomposition and Fill-in-the-Type Training

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2305.17145 v1 pith:JTIOCR53 submitted 2023-05-25 cs.SE cs.LGcs.PL

classification cs.SEcs.LGcs.PL
keywords typepredictionprogrammodelschallengescheckdecompositionfill-in-the-type
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

TypeScript and Python are two programming languages that support optional type annotations, which are useful but tedious to introduce and maintain. This has motivated automated type prediction: given an untyped program, produce a well-typed output program. Large language models (LLMs) are promising for type prediction, but there are challenges: fill-in-the-middle performs poorly, programs may not fit into the context window, generated types may not type check, and it is difficult to measure how well-typed the output program is. We address these challenges by building OpenTau, a search-based approach for type prediction that leverages large language models. We propose a new metric for type prediction quality, give a tree-based program decomposition that searches a space of generated types, and present fill-in-the-type fine-tuning for LLMs. We evaluate our work with a new dataset for TypeScript type prediction, and show that 47.4% of files type check (14.5% absolute improvement) with an overall rate of 3.3 type errors per file. All code, data, and models are available at: https://github.com/GammaTauAI/opentau.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 1 Pith paper

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. The Power of Types: Exploring the Impact of Type Checking on Neural Bug Detection in Dynamically Typed Languages

    cs.SE 2024-11 conditional novelty 6.0 of 10

    Variable-misuse benchmarks contain many bugs that pytype or mypy can catch, and removing these from training improves neural bug detectors on the remaining harder bugs.

Pith tools