Actor-critique code-to-code translation
AssigneeInternational Business Machines Corporation
InventorsDinesh Khandelwal, Varad Bhatnagar, Saswati Dana, Amar Prakash Azad, Dinesh Garg
Life of this patent
Estimating the term…
Abstract
Methods and systems of translation include performing a search of translation hypotheses for input source code in a first programming language to a second programming language. A constraint is extracted from the input source code. The constraint is applied to the translation hypotheses to generate a source code output in the second programming language.
Claims20
A computer-implemented method for translation, comprising:
- performing a beam search of translation hypotheses for input source code in a first programming language to a second programming language;
- extracting a constraint from the input source code;
- and
- applying the constraint to the translation hypotheses, after a number of hypotheses are selected for consideration in a next iteration of the beam search, to generate a source code output in the second programming language.
A computer program product for translation, the computer program product comprising a computer readable storage medium having program instructions embodied therewith, the program instructions being executable by a hardware processor to cause the hardware processor to:
- perform a beam search of translation hypotheses for input source code in a first programming language to a second programming language;
- extract a constraint from the input source code;
- and
- apply the constraint to the translation hypotheses, after a number of hypotheses are selected for consideration in a next iteration of the beam search, to generate a source code output in the second programming language.
A system for translation, comprising:
- a hardware processor;
- and
- a memory that stores a computer program which, when executed by the hardware processor, causes the hardware processor to:
- perform a beam search of translation hypotheses for input source code in a first programming language to a second programming language;
- extract a constraint from the input source code;
- and
- apply the constraint to the translation hypotheses, after a number of hypotheses are selected for consideration in a next iteration of the beam search, to generate a source code output in the second programming language.
Dependencies are inferred from the claim text.