Patent ID: 11899566
Assignee: GOOGLE LLC
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 14:
15. A method implemented by one or more processors, the method comprising:
identifying base source code that is programmed in a base programming language;
identifying target source code that is in a target programming language and that is generated based on automatically translating the base source code;
processing the base source code, using a code-to-embedding machine learning model, to generate a base source code embedding in a latent space;
processing the target source code, using the code-to-embedding machine learning model, to generate a target source code embedding in the latent space;
processing, using a policy network, the base source code embedding and the target source code embedding, to generate a predicted test input;
executing the base source code using the predicted test input to generate a base output;
executing the target source code using the predicted test input to generate a target output;
generating a reward based on comparing the base output to the target output,
wherein the reward is more positive when the comparing indicates the base output and the target output are not equal than when the comparing indicates the base output and the target output are equal; and

updating the policy network based on the reward.