IP Library › Granted Patent US 8,869,125
Granted Patent B2
US 8,869,125 · App. 13/714,241 · Granted Oct 21, 2014

Systems and methods for demarcating information related to one or more blocks in an application

Inventors: Murali Krishna Emani (Hyderabad, IN); Sudeep Mallick (Bangalore, IN); Balkrishna Prasad (Bangalore, IN)
Assignee: Infosys Limited
G06F8/41G06F8/443G06F8/45
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,869,125
App. No.
13/714,241
Granted
Oct 21, 2014
Kind
B2
Abstract

The invention relates to a system and method for demarcating information related to one or more blocks in an application source code. This invention provides a means to annotate block information in the source code. It parses the application source code to generate an abstract syntax tree and instruments the source code to capture information related to the one or more blocks generated at the time of dynamic analysis of the application. The information related to the one or more blocks are stored in Hash Map and based on this information the abstract syntax tree is modified to add the information related to the one or more blocks and inserting this information in the application source code.

Claims (43)

1. A method for demarcating information, the method comprising:

parsing, by a computing device, source code of an application to generate an abstract syntax tree;

generating, by the computing device, an instrumented code from the abstract syntax tree;

compiling, by the computing device, the instrumented code along with a dynamic analysis code;

creating, by the computing device, one or more blocks in the source code of the application when one or more subroutines defined in the dynamic analysis code are called during a dynamic analysis of the instrumented code;

storing, by the computing device, information related to the one or more blocks in the source code of the application in a Hash Map; and

annotating, by the computing device, the information related to the one or more blocks in the source code of the application into the source code of the application by inserting one or more comments into the abstract syntax tree based on the information related to the one or more blocks in the source code of the application stored in the Hash Map.

2. The method as claimed in claim 1 , wherein the generating, by the computing device, an instrumented code from the abstract syntax tree further comprises adding, by the computing device, one or more nodes to the abstract syntax tree to capture the information related to the one or more blocks in the source code of the application.

3. The method as claimed in claim 1 , wherein the one or more blocks in the source code of the application are represented in a directed acyclic graph.

4. The method as claimed in claim 1 , wherein the information related to the one or more blocks in the source code of the application includes one or more block IDs and one or more block numbers.

5. The method as claimed in claim 4 , wherein the one or more block IDs are generated during the dynamic analysis of the instrumented code.

6. The method as claimed in claim 4 , wherein the one or more block IDs include package name, class name and line numbers of the source code of the application where the one or more blocks are created.

7. The method as claimed in claim 4 , wherein the Hash Map stores information related to the one or more block IDs as one or more key entries and information related to the one or more block numbers as one or more values.

8. The method as claimed in claim 4 , wherein the annotating, by the computing device, the information related to the one or more blocks in the source code of the application into the source code of the application further comprises inserting, by the computing device, the one or more block numbers into the abstract syntax tree to denote the one or more block IDs.

9. A system for demarcating information comprising:

a processor in operable communication with a non-transitory processor readable storage medium, the non-transitory processor readable storage medium containing one or more programming instructions, which when executed by the processor cause the processor to perform steps comprising:

parsing source code of an application to generate an abstract syntax tree;

generating an instrumented code from the abstract syntax tree;

compiling the instrumented code along with a dynamic analysis code;

creating one or more blocks in the source code of the application when one or more subroutines defined in the dynamic analysis code are called during a dynamic analysis of the instrumented code;

storing information related to the one or more blocks in the source code of the application in a Hash Map; and

annotating the information related to the one or more blocks in the source code of the application into the source code of the application by inserting one or more comments into the abstract syntax tree based on the information related to the one or more blocks in the source code of the application stored in the Hash Map.

10. The system as claimed in claim 9 , wherein the generating an instrumented code from the abstract syntax tree further comprises adding one or more nodes to the abstract syntax tree to capture the information related to the one or more blocks in the source code of the application.

11. The system as claimed in claim 9 , wherein the one or more blocks in the source code of the application are represented in a directed acyclic graph.

12. The system as claimed in claim 9 , wherein the information related to the one or more blocks in the source code of the application includes one or more block IDs and one or more block numbers.

13. The system as claimed in claim 12 , wherein the one or more block IDs are generated during the dynamic analysis of the instrumented code.

14. The system as claimed in claim 12 , wherein the one or more block IDs include package name, class name and line numbers of the source code of the application where the one or more blocks are created.

15. The system as claimed in claim 12 , wherein the Hash Map stores information related to the one or more block IDs as one or more key entries and information related to the one or more block numbers as one or more values.

16. The system as claimed in claim 12 , wherein the annotating the information related to the one or more blocks in the source code of the application into the source code of the application further comprises inserting the one or more block numbers into the abstract syntax tree to denote the one or more block IDs.

17. A non-transitory computer readable medium having computer readable program code embodied therein for demarcating information, the computer readable program code storing a set of instructions comprising:

parsing source code of an application to generate an abstract syntax tree;

generating an instrumented code from the abstract syntax tree;

compiling the instrumented code along with a dynamic analysis code;

creating one or more blocks in the source code of the application when one or more subroutines defined in the dynamic analysis code are called during a dynamic analysis of the instrumented code;

storing information related to the one or more blocks in the source code of the application in a Hash Map; and

annotating the information related to the one or more blocks in the source code of the application into the source code of the application by inserting one or more comments into the abstract syntax tree based on the information related to the one or more blocks in the source code of the application stored in the Hash Map.

18. The non-transitory computer readable medium as claimed in claim 17 , wherein the information related to the one or more blocks in the source code of the application includes one or more block IDs and one or more block numbers.

19. The non-transitory computer readable medium as claimed in claim 18 , wherein the annotating the information related to the one or more blocks in the source code of the application into the source code of the application further comprises inserting the one or more block numbers into the abstract syntax tree to denote the one or more block IDs.

20. The non-transitory computer readable medium as claimed in claim 18 , wherein the one or more block IDs are generated during the dynamic analysis of the instrumented code.

21. The non-transitory computer readable medium as claimed in claim 18 , wherein the one or more block IDs include package name, class name and line numbers of the source code of the application where the one or more blocks are created.

22. The non-transitory computer readable medium as claimed in claim 18 , wherein the Hash Map stores information related to the one or more block IDs as one or more key entries and information related to the one or more block numbers as one or more values.

23. The non-transitory computer readable medium as claimed in claim 17 , wherein the generating an instrumented code from the abstract syntax tree further comprises adding one or more nodes to the abstract syntax tree to capture the information related to the one or more blocks in the source code of the application.

24. The non-transitory computer readable medium as claimed in claim 17 , wherein the one or more blocks in the source code of the application are represented in a directed acyclic graph.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 24, 2014
From: EMANI, MURALI KRISHNA; MALLICK, SUDEEP; PRASAD, BALKRISHNA
To: INFOSYS LIMITED
Reel/Frame 032042/0056 →
Priority Claims (1)
IN 4596/CHE/2011 · Dec 27, 2011 · national
Continuity (1)
Related Publication 20130167129A1 · Jun 27, 2013