-
公开(公告)号:US20210019125A1
公开(公告)日:2021-01-21
申请号:US16929467
申请日:2020-07-15
Applicant: Google LLC
Inventor: Kensen Shi , Rishabh Singh , David J. Bieber
Abstract: The present disclosure provides systems and methods for synthesizing computer-readable code based on the receipt of input and output examples. A computing system in accordance with the disclosure can be configured to receive a given input and output, access and library of operations, and perform a search of a library of operations (e.g., transpose, slice, norm, etc.) that can be applied to the input. By applying the operations to the input and tracking the results, the computing system may identify an expression comprising one or a combination of operations that when applied to the input generates the output. In this manner, implementations of the disclosure may be used to identify one or more solutions that a user having access to the library of operations may use to generate the output from the input.
-
公开(公告)号:US20240184555A1
公开(公告)日:2024-06-06
申请号:US18076189
申请日:2022-12-06
Applicant: Google LLC
Inventor: Giovanni De Toni , Rishabh Singh , Jonathan Malmaud , Navneet Potti
IPC: G06F8/51 , G06F8/41 , G06F11/36 , G06N3/0455 , G06N3/08
CPC classification number: G06F8/51 , G06F8/42 , G06F11/3616 , G06N3/0455 , G06N3/08
Abstract: Techniques are described herein for iterative code generation using neural language models. In various implementations, an original source code snippet in a first programming language may be processed using a translation machine learning model to generate a first translation of the original source code snippet in a second programming language. The first translation of the original source code snippet may be evaluated to identify error(s) in the first translation. Based on the error(s), respective mask(s) may be inserted to generate a masked first translation of the original source code snippet in the second programming language. The masked first translation of the original source code snippet may be processed using the translation machine learning model to generate a second translation of the original source code snippet in the second language. The second translation may include infill(s) of corrected source code in place of one or more of the masks.
-
公开(公告)号:US11960867B1
公开(公告)日:2024-04-16
申请号:US18198674
申请日:2023-05-17
Applicant: GOOGLE LLC
Inventor: Rishabh Singh , Hanjun Dai , Manzil Zaheer , Artem Goncharuk , Karen Davis , David Andre
CPC classification number: G06F8/436 , G06F40/279 , G06F40/40 , G06N3/08 , G06N7/01
Abstract: Using a natural language (NL) latent presentation in the automated conversion of source code from a base programming language (e.g., C++) to a target programming language (e.g., Python). A base-to-NL model can be used to generate an NL latent representation by processing a base source code snippet in the base programming language. Further, an NL-to-target model can be used to generate a target source code snippet in the target programming language (that is functionally equivalent to the base source code snippet), by processing the NL latent representation. In some implementations, output(s) from the NL-to-target model indicate canonical representation(s) of variables, and in generating the target source code snippet, technique(s) are used to match those canonical representation(s) to variable(s) of the base source code snippet. In some implementations, multiple candidate target source code snippets are generated, and a subset (e.g., one) is selected based on evaluation(s).
-
公开(公告)号:US20230350657A1
公开(公告)日:2023-11-02
申请号:US17731593
申请日:2022-04-28
Applicant: Google LLC
Inventor: Rishabh Singh , Bin Ni , Manzil Zaheer
IPC: G06F8/51
CPC classification number: G06F8/51
Abstract: Techniques are described herein for translating source code using sparse-self attention. In various implementations, a source code snippet in a first programming language may be processed to obtain graph(s) representing snippet tokens, and relationships therebetween. Based on the graph(s), a subset of snippet token pairs may be identified from a superset of all possible token pairs in the source code snippet. Each token pair of the subset may include snippet tokens that are represented by nodes connected by one or more edges of the one or more graphs. A self-attention network of a translation machine learning model may be adapted to sparsely attend across the identified subset of token pairs. The source code snippet may then be processed based on the adapted translation machine learning model to generate a translation of the source code snippet in the second programming language.
-
公开(公告)号:US11775271B1
公开(公告)日:2023-10-03
申请号:US17316331
申请日:2021-05-10
Applicant: Google LLC
Inventor: Rishabh Singh , Artem Goncharuk , Karen Davis , David Andre
Abstract: Techniques are described herein for translating source code in one programming language to source code in another programming language using machine learning. A method includes: receiving first source code in a first higher-level programming language; processing the first source code, or an intermediate representation thereof, using a sequence-to-sequence neural network model to generate a sequence of outputs, each including a probability distribution; generating second source code in a second higher-level programming language by, for each output in the sequence of outputs: determining a highest probability in the probability distribution associated with the output; in response to the highest probability exceeding a first threshold, generating a predicted portion of the second source code based on a token that corresponds to the highest probability; and in response to the highest probability not exceeding the first threshold, generating a placeholder; and outputting the second source code.
-
公开(公告)号:US12147794B2
公开(公告)日:2024-11-19
申请号:US18070015
申请日:2022-11-28
Applicant: Google LLC
Inventor: Joey Hong , Rishabh Singh , Joel Galenson , Jonathan Malmaud , Manzil Zaheer
IPC: G06F8/51
Abstract: Implementations are described herein for predicting symbolic transformation templates to automate source code transformations. In various implementations, pair(s) of predecessor and successor source code snippets may be processed using a symbolic transformation template prediction (STTP) model to predict a symbolic transformation template that includes a predecessor portion that matches the predecessor source code snippet(s) of the pair(s) and a successor portion that matches the successor source code snippet(s) of the pair(s). At least one additional predecessor source code snippet may be identified that matches the predecessor portion of the predicted symbolic transformation template. Placeholders of the predecessor portion of the predicted symbolic transformation template may be bound to one or more tokens of the at least one additional predecessor source code snippet to create binding(s). The successor portion of the predicted symbolic transformation template may be applied to the bindings to generate additional successor source code snippet(s).
-
公开(公告)号:US20240361991A1
公开(公告)日:2024-10-31
申请号:US18767743
申请日:2024-07-09
Applicant: GOOGLE LLC
Inventor: Rishabh Singh , Aaron Zemach , Chiraag Galaiya , Dima Brezhnev , David Lick , Francisco Velasquez , Max Lin , Neha Bhargava , Peilun Zhang , Rahul Srinivasan , Simon Tong , Victoria Taylor , Vishnu Sivaji , Zifan Xiao
IPC: G06F8/30 , G06F16/2457 , G06F40/18
CPC classification number: G06F8/31 , G06F16/24578 , G06F40/18
Abstract: Techniques are described herein for automatically synthesizing programs that include one or more functions in a spreadsheet programming language. A method includes: receiving a first example including input provided in a first cell in a spreadsheet; automatically synthesizing a plurality of candidate programs including a first set of candidate programs consistent with the first example, wherein each candidate program in the first set of candidate programs comprises at least one function in a spreadsheet programming language and, when the candidate program is executed, the candidate program generates output that matches the first example; ranking the plurality of candidate programs; and storing a highest-ranked program of the plurality of candidate programs in association with the first cell in the spreadsheet.
-
公开(公告)号:US12093672B2
公开(公告)日:2024-09-17
申请号:US18076189
申请日:2022-12-06
Applicant: Google LLC
Inventor: Giovanni De Toni , Rishabh Singh , Jonathan Malmaud , Navneet Potti
IPC: G06F9/44 , G06F8/41 , G06F8/51 , G06F9/455 , G06F11/36 , G06N3/045 , G06N3/0455 , G06N3/08 , G06N20/00
CPC classification number: G06F8/51 , G06F8/42 , G06F11/3616 , G06N3/0455 , G06N3/08
Abstract: Techniques are described herein for iterative code generation using neural language models. In various implementations, an original source code snippet in a first programming language may be processed using a translation machine learning model to generate a first translation of the original source code snippet in a second programming language. The first translation of the original source code snippet may be evaluated to identify error(s) in the first translation. Based on the error(s), respective mask(s) may be inserted to generate a masked first translation of the original source code snippet in the second programming language. The masked first translation of the original source code snippet may be processed using the translation machine learning model to generate a second translation of the original source code snippet in the second language. The second translation may include infill(s) of corrected source code in place of one or more of the masks.
-
29.
公开(公告)号:US11899566B1
公开(公告)日:2024-02-13
申请号:US17318436
申请日:2021-05-12
Applicant: Google LLC
Inventor: Rishabh Singh , David Andre
CPC classification number: G06F11/3684 , G06F11/3688 , G06N5/04 , G06N20/00
Abstract: Training and/or utilization of machine learning model(s) (e.g., neural network model(s)) in automatically generating test case(s) for source code. Techniques disclosed herein can be utilized in generating test case(s) for unit test testing (or other white-box testing) and/or for functional testing (or other black-box testing). In some implementations, the machine learning model(s) can be trained on source code, unit test pairs. In some additional or alternative implementations, reinforcement learning techniques can be utilized to check for correctness of base source code, target source code pairs (e.g., by matching program execution of different branches).
-
公开(公告)号:US20240036843A1
公开(公告)日:2024-02-01
申请号:US18379315
申请日:2023-10-12
Applicant: GOOGLE LLC
Inventor: Qianyu Zhang , Bin Ni , Rishabh Singh , Olivia Hatalsky
CPC classification number: G06F8/447 , G06F8/34 , G06F8/36 , G06F8/71 , G06F16/00 , G06F8/33 , G06F16/2425
Abstract: Implementations are described herein for adapting existing source code snippets to new contexts. In various implementations, a command may be detected to incorporate an existing source code snippet into destination source code. An embedding may be generated based on the existing source code snippet, e.g., by processing the existing source code snippet using an encoder. The destination source code may be processed to identify one or more decoder constraints. Subject to the one or more decoder constraints, the embedding may be processed using a decoder to generate a new version of the existing source code snippet that is adapted to the destination source code.
-
-
-
-
-
-
-
-
-