US 12,112,162 B2
Method and system for mapping intermediate representation objects for facilitating incremental analysis
Anushri Jana, Pune (IN); Ankita Shamrao Khadsare, Pune (IN); Vaidehi Manoj Ghime, Pune (IN); and Bharti Chimdyalwar, Pune (IN)
Assigned to TATA CONSULTANCY SERVICES LIMITED, Mumbai (IN)
Filed by Tata Consultancy Services Limited, Mumbai (IN)
Filed on Dec. 27, 2022, as Appl. No. 18/146,702.
Claims priority of application No. 202221010045 (IN), filed on Feb. 24, 2022.
Prior Publication US 2023/0266967 A1, Aug. 24, 2023
Int. Cl. G06F 9/44 (2018.01); G06F 8/75 (2018.01)
CPC G06F 8/75 (2013.01) 15 Claims
OG exemplary drawing
 
1. A processor implemented method, comprising:
receiving, by an intermediate representation mapping system (IRMS) via one or more hardware processors, a current version and a previous version of a computer program, and an intermediate representation (IR) associated with each of the current version and the previous version of the computer program, wherein the IR associated with each of the current version and the previous version comprises one or more IR objects in a memory of the IRMS;
extracting, by the IRMS via the one or more hardware processors, one or more attributes associated with each IR object of the one or more IR objects present in the previous version of the computer program, the one or more attributes comprising a line number, an object type, an identification number (ID), and a name of each IR object;
creating and storing in a database integrated within the IRMS, by the IRMS via the one or more hardware processors, a data structure for storing the one or more IR objects present in the previous version of the computer program, wherein each IR object is stored in the data structure based on the one or more attributes extracted for a respective IR object;
comparing, by the IRMS via the one or more hardware processors, the current version and the previous version of the computer program using a data comparison tool to determine one or more lines that are unchanged between the current version and the previous version of the computer program;
creating and storing in the database, by the IRMS via the one or more hardware processors, a line number map based on the one or more unchanged lines, the line number map comprising a line number-based mapping between each unchanged line in the current version and a respective unchanged line in the previous version of the computer program;
creating and storing in the database, by the IRMS via the one or more hardware processors, an ID-based IR mapping between an ID of each unchanged IR object of one or more unchanged IR objects present in each unchanged line in the current version and an ID of each IR object of the one or more IR objects present in the previous version stored in the data structure using the created line number map;
retrieving the ID of each IR object of the one or more IR objects present in the previous version from the database using the created ID-based IR mapping; and
performing an analysis of the current version incrementally and creating an analysis information of the current version, by reusing a previous analysis information of the one or more unchanged IR objects stored corresponding to the retrieved ID, the previous analysis information being retrieved from the database using the retrieved ID as a key for any unchanged IR object in the current version.