Annotations for developers
    2.
    发明授权

    公开(公告)号:US11775271B1

    公开(公告)日:2023-10-03

    申请号:US17316331

    申请日:2021-05-10

    Applicant: Google LLC

    CPC classification number: G06F8/51 G06N3/04 G06N3/08

    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.

    Conditioning autoregressive language model to improve code migration

    公开(公告)号:US11656867B2

    公开(公告)日:2023-05-23

    申请号:US17945376

    申请日:2022-09-15

    Applicant: Google LLC

    CPC classification number: G06F8/71 G06F40/20 G06N20/00

    Abstract: Implementations are described herein for using machine learning to perform various tasks related to migrating source code based on relatively few (“few shots”) demonstrations. In various implementations, an autoregressive language model may be conditioned based on demonstration tuple(s). In some implementations, a demonstration tuple may include a pre-migration version of a first source code snippet and a post-migration version of the first source code snippet. In other implementations, demonstration tuples may include other data, such as intermediate forms (e.g., natural language descriptions or pseudocode), input-output pairs demonstrating intended behavior, etc. The autoregressive language model may be trained on corpora of source code and natural language documentation on the subject of computer programming. A pre-migration version of a source code file may be processed based on the conditioned autoregressive language model, and a post-migration version may be generated based on output generated based on the conditioned autoregressive model.

Patent Agency Ranking