US 12,153,908 B2
Source code conversion from an original computer programming language to a target programming language
Nipun Mahajan, Lawrenceville, NJ (US); Amit Mishra, Chennai (IN); Yaksh Kumar Singh, Uttar Pradesh (IN); Yogesh Raghuvanshi, Princeton, NJ (US); and Pravin Kumar Sankari Bhagavathiappan, Kanyakumari District (IN)
Assigned to Bank of America Corporation, Charlotte, NC (US)
Filed by Bank of America Corporation, Charlotte, NC (US)
Filed on Jan. 18, 2023, as Appl. No. 18/155,939.
Prior Publication US 2024/0241714 A1, Jul. 18, 2024
Int. Cl. G06F 8/51 (2018.01); G06F 8/33 (2018.01); G06F 8/36 (2018.01); G06F 8/658 (2018.01)
CPC G06F 8/51 (2013.01) [G06F 8/33 (2013.01); G06F 8/36 (2013.01); G06F 8/658 (2018.02)] 17 Claims
OG exemplary drawing
 
1. A system for updating source code from an original programming language to a target programming language, comprising:
a memory configured to store:
a first piece of code written in an original programming language, wherein the first piece of code is programmed to perform a particular task;
a set of particular keywords that are unique to the original programming language and are not used in other programming languages; and
a mapping table that comprises the set of particular keywords and a set of counterpart keywords, wherein each of the set of particular keywords is mapped to a counterpart keyword from among the set of counterpart keywords, wherein the set of counterpart keywords is unique to the target programming language; and
a processor operably coupled to the memory, and configured to:
identify a set of data objects from the first piece of code, the set of data objects comprising at least one of a name of a function, a type of the function, an input parameter to the function, a type of the input parameter, an output parameter of the function, or a type of the output parameter;
create a first knowledge graph that represents a relationship among the set of data objects, wherein the first knowledge graph is created based at least in part upon a position of each data object from among the set of data objects with respect to positions of other data objects in the first piece of code;
identify a particular data object, from among the set of data objects, that is unique to the original programming language in response to determining that the particular data object is among the set of particular keywords, wherein the particular data object is used for a particular purpose in the original programming language;
determine, based at least in part upon the particular purpose of the particular data object, a counterpart data object to the particular data object in the mapping table, wherein the counterpart data object is used for the particular purpose in the target programming language;
create, based at least in part upon the first knowledge graph, a second piece of code in the target programming language by replacing the particular data object with the counterpart data object and maintaining the rest of data objects from the first piece of code;
determine that the second piece of code is configured to perform the particular task;
in response to determining that the second piece of code is configured to perform the particular task, execute the second piece of code;
identify a second set of data objects from the second piece of code;
determine a relationship among the second set of data objects based at least in part upon a position of each data object in the second piece of code with respect to positions of other data objects from among the second set of data objects; and
create a second knowledge graph that represents the relationship among the second set of data objects; and
wherein determining that the second piece of code is configured to perform the particular task is based at least in part upon the first and second knowledge graphs.