Complete completion using types and weights
Open accessThe DOI matches its Crossref record; 1 of the 1 references it cites were found in a registry or an index.
Abstract
Developing modern software typically involves composing functionality from existing libraries. This task is difficult because libraries may expose many methods to the developer. To help developers in such scenarios, we present a technique that synthesizes and suggests valid expressions of a given type at a given program point. As the basis of our technique we use type inhabitation for lambda calculus terms in long normal form. We introduce a succinct representation for type judgements that merges types into equivalence classes to reduce the search space, then reconstructs any desired number of solutions on demand. Furthermore, we introduce a method to rank solutions based on weights derived from a corpus of code. We implemented the algorithm and deployed it as a plugin for the Eclipse IDE for Scala. We show that the techniques we incorporated greatly increase the effectiveness of the approach. Our evaluation benchmarks are code examples from programming practice; we make them available for future comparisons.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Solar-Lezama, A., Arnold, G., Tancau, L., Bodik, R., Saraswat, V., & Seshia, S. (2007) · Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/1250734.1250754 · Cited by 149 · cited 1×
“The resulting benchmark is a partial program, similar to a program sketch [23].”
Cited by
Code completion with statistical language models
Raychev, V., Vechev, M., & Yahav, E. (2014) · Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2594291.2594321 · Cited by 555
SQLizer: query synthesis from natural language
Yaghmazadeh, N., Wang, Y., Dillig, I., & Dillig, T. (2017) · Proceedings of the ACM on Programming Languages · doi:10.1145/3133887 · Cited by 279
Synthesizing data structure transformations from input-output examples
Feser, J. K., Chaudhuri, S., & Dillig, I. (2015) · Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2737924.2737977 · Cited by 251
“In particular, several recent papers use type-guided search to auto-complete program expressions involving complex API calls [12, 23, 26].”
BackgroundMethodCode completion with statistical language models
Raychev, V., Vechev, M., & Yahav, E. (2014) · ACM SIGPLAN Notices · doi:10.1145/2666356.2594321 · Cited by 189
Type-and-example-directed program synthesis
Osera, P.-M., & Zdancewic, S. (2015) · Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2737924.2738007 · Cited by 185
“InSynth performs a backwards-style proof search similar to M YTH .”
BackgroundMethodInfluentialPythia: AI-assisted Code Completion System
Svyatkovskiy, A., Zhao, Y., Fu, S., & Sundaresan, N. (2019) · Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining · doi:10.1145/3292500.3330699 · Cited by 169
No Need to Lift a Finger Anymore? Assessing the Quality of Code Generation by ChatGPT
Liu, Z., Tang, Y., Luo, X., Zhou, Y., & Zhang, L. F. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2024.3392499 · Cited by 128
“Traditional code generation [14], [75], [76], [77], [78], [79] approaches typically rely on predefined templates or rules (e.g., context-free grammar), along with input-output specifications, which limits their flexibility and requires manual effort.”
MethodProgram synthesis using conflict-driven learning
Feng, Y., Martins, R., Bastani, O., & Dillig, I. (2018) · Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/3192366.3192382 · Cited by 111
“Program synthesis has also been used for improving programmer productivity by automatically completing parts of a program [24, 30, 31] or helping programmers use complex APIs [8, 14, 16].”
BackgroundMethodSmith, C., & Albarghouthi, A. (2016) · Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation · doi:10.1145/2908080.2908102 · Cited by 76
“Alternatively, if we seek a more complex function, perhaps a post-processing step after the reduce, we can instantiate our technique with the following HOS :”
MethodHow Practitioners Expect Code Completion?
Wang, C., Hu, J., Gao, C., Jin, Y., Xie, T., Huang, H., Lei, Z., & Deng, Y. (2023) · Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering · doi:10.1145/3611643.3616280 · Cited by 50
“Traditional code completion focused on static analysis techniques associated with manually defined rules to suggest code [22, 43, 51, 63].”
MethodSmall-Step Live Programming by Example
Ferdowsifard, K., Ordookhanians, A., Peleg, H., Lerner, S., & Polikarpova, N. (2020) · Proceedings of the 33rd Annual ACM Symposium on User Interface Software and Technology · doi:10.1145/3379337.3415869 · Cited by 42
Evaluating the evaluations of code recommender systems: a reality check
Proksch, S., Amann, S., Nadi, S., & Mezini, M. (2016) · Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering · doi:10.1145/2970276.2970330 · Cited by 26
“[5,13,22,23] Guervo et al. present InSynth [5], a tool to synthesize type-correct expressions.”
MethodLooPy: interactive program synthesis with control structures
Ferdowsifard, K., Barke, S., Peleg, H., Lerner, S., & Polikarpova, N. (2021) · Proceedings of the ACM on Programming Languages · doi:10.1145/3485530 · Cited by 18
“2020]; and synthesizers for other languages [Feng et al. 2017; Galenson et al. 2014; Gvero et al. 2013; James et al. 2020; Mandelin et al. 2005; Yang et al. 2018].”
BackgroundType-Constrained Code Generation with Language Models
Mündler, N., He, J., Wang, H., Sen, K., Song, D., & Vechev, M. (2025) · arXiv · doi:10.48550/arxiv.2504.09246
Metadata
- Authors
- Gvero, T., Kuncak, V., Kuraj, I., & Piskac, R.
- Venue
- Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation
- Publisher
- ACM
- Published
- 2013-06-16
- Pages
- 27-38
- ISSN
- 1531-7102 (ISSN-L)
- OpenAlex
- W2157976942
- Cited by
- 131
- References
- 1
- FWCI
- 13.44
- Type
- conference paper
- Language
- en
- Open access
- green
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.