CPC G06F 8/33 (2013.01) [G06F 8/44 (2013.01); G06F 18/211 (2023.01); G06F 18/213 (2023.01); G06N 3/088 (2013.01)] | 18 Claims |
1. A code completion system, comprising:
a processor; and
a memory, wherein the memory comprises instructions that when executed by the processor perform actions that:
obtain a partially-formed source code snippet of a source code program;
extract a file-level context and a local-level context of the partially-formed source code snippet;
search for a source code candidate to complete the partially-formed source code snippet, wherein the search generates a plurality of partial source code candidates at each of a plurality of time steps, wherein the search utilizes a deep learning model to generate a conditional probability distribution given the file-level context and the local-level context, wherein the search uses the conditional probability distribution at each time step to predict a next token of each partial source code candidate conditioned on previously-generated tokens of a respective partial source code candidate; and
upon completion of the search, output at least one partial source code candidate as the source code candidate to complete the partially-formed source code snippet.
|