US9361077B1ActiveUtility

Hierarchical dependency analysis of source code

91
Assignee: SEMMLE LTDPriority: Sep 30, 2015Filed: Sep 30, 2015Granted: Jun 7, 2016
Est. expirySep 30, 2035(~9.2 yrs left)· nominal 20-yr term from priority
G06T 11/26G06F 8/433G06F 8/443G06F 8/73G06F 8/71H04L 67/133G06F 3/0481G06F 8/24G06F 8/35G06F 16/2379G06F 16/2246G06F 11/3668G06F 8/65G06F 16/2237G06F 8/22G06F 8/74G06F 11/3604G06F 8/75G06F 16/245G06T 2200/24
91
PatentIndex Score
6
Cited by
18
References
27
Claims

Abstract

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for generated aggregated dependencies between software elements in a code base. One of the methods includes processing selected software elements as represented by a raw dependency graph and a hierarchy graph to generate data representing an aggregated dependency graph, the aggregated dependency graph having nodes representing the selected software elements and aggregated dependencies between one or more of the selected software elements, wherein each aggregated dependency between a pair of the selected software elements represents that a first software element of the pair, or a descendant of the first software element according to the hierarchy graph, depends, according to the raw dependency graph, on a second software element of the pair or a descendant of the second software element according to the hierarchy graph. The data representing the aggregated dependency graph is provided in response to the request.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A computer-implemented method comprising:
 receiving from a user a request to generate aggregated dependencies between a plurality of software elements in a project, wherein the request specifies a plurality of selected software elements; 
 obtaining data representing a raw dependency graph of software elements in the project, the raw dependency graph having nodes and directed links, wherein each node in the raw dependency graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents a dependency of a first software element represented by a first node of the pair on a second software element represented by a second node of the pair; 
 obtaining data representing a hierarchy graph of the software elements in the project, the hierarchy graph having nodes and directed links, wherein each node in the hierarchy graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents containment of a child software element represented by a first node of the pair by a parent software element represented by a second node of the pair; 
 processing the selected software elements as represented by the raw dependency graph and the hierarchy graph to generate data representing an aggregated dependency graph, the aggregated dependency graph having nodes representing the selected software elements and aggregated dependencies between one or more of the selected software elements, wherein each aggregated dependency between a pair of the selected software elements represents that a first software element of the pair, or a descendant of the first software element according to the hierarchy graph, depends, according to the raw dependency graph, on a second software element of the pair or a descendant of the second software element according to the hierarchy graph; and 
 providing the data representing the aggregated dependency graph in response to the request. 
 
     
     
       2. The method of  claim 1 , further comprising:
 computing the aggregated dependencies between each pair of software element nodes, including:
 generating a first set of aggregated outbound dependencies outbound from a first node of the pair and dependencies outbound from any descendant of the first node of the pair in the hierarchy; 
 generating a second set of aggregated inbound dependencies inbound to a second node of the pair and dependencies inbound to any descendant of the second node of the pair; 
 computing an intersection of the first set of aggregated outbound dependencies and the second set of aggregated inbound dependencies; and 
 generating an aggregated dependency link from the first node of the pair to the second node of the pair whenever the intersection is not empty. 
 
 
     
     
       3. The method of any of claims  claim 1 , wherein the hierarchy graph is a tree, and wherein the raw dependency graph is not a tree. 
     
     
       4. The method of any of  claims 1 , wherein the hierarchy graph includes a superset of nodes of the raw dependency graph. 
     
     
       5. The method of any of  claims 1 , wherein the aggregated dependency graph is computed after the request from the user is received. 
     
     
       6. The method of any of  claims 1 , further comprising providing a user interface presentation that presents the aggregated dependency graph. 
     
     
       7. The method of  claim 6 , further comprising presenting, adjacent to each link connecting a pair of nodes representing a first software element and a second software element, a count, the count being a count of dependencies that exist from the first software element or any descendant of the first software element in the hierarchy graph on the second software element of the pair or any descendant of the second software element in the hierarchy graph. 
     
     
       8. The method of  claim 6 , further comprising presenting the user interface presentation within an integrated development environment or a code review tool. 
     
     
       9. The method of any of  claims 1 , further comprising:
 receiving, from a user, a selection of one or more dependency types; and 
 filtering the aggregated dependency graph to contain only aggregated dependencies having the selected one or more dependency types. 
 
     
     
       10. A system comprising:
 one or more computers and one or more storage devices storing instructions that are operable, when executed by the one or more computers, to cause the one or more computers to perform operations comprising: 
 obtaining data representing a raw dependency graph of software elements in the project, the raw dependency graph having nodes and directed links, wherein each node in the raw dependency graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents a dependency of a first software element represented by a first node of the pair on a second software element represented by a second node of the pair; 
 obtaining data representing a hierarchy graph of the software elements in the project, the hierarchy graph having nodes and directed links, wherein each node in the hierarchy graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents containment of a child software element represented by a first node of the pair by a parent software element represented by a second node of the pair; 
 processing the selected software elements as represented by the raw dependency graph and the hierarchy graph to generate data representing an aggregated dependency graph, the aggregated dependency graph having nodes representing the selected software elements and aggregated dependencies between one or more of the selected software elements, wherein each aggregated dependency between a pair of the selected software elements represents that a first software element of the pair, or a descendant of the first software element according to the hierarchy graph, depends, according to the raw dependency graph, on a second software element of the pair or a descendant of the second software element according to the hierarchy graph; and 
 providing the data representing the aggregated dependency graph in response to the request. 
 
     
     
       11. The system of  claim 10 , wherein the operations further comprise:
 computing the aggregated dependencies between each pair of software element nodes, including:
 generating a first set of aggregated outbound dependencies outbound from a first node of the pair and dependencies outbound from any descendant of the first node of the pair in the hierarchy; 
 generating a second set of aggregated inbound dependencies inbound to a second node of the pair and dependencies inbound to any descendant of the second node of the pair; 
 computing an intersection of the first set of aggregated outbound dependencies and the second set of aggregated inbound dependencies; and 
 generating an aggregated dependency link from the first node of the pair to the second node of the pair whenever the intersection is not empty. 
 
 
     
     
       12. The system of  claim 10 , wherein the hierarchy graph is a tree, and wherein the raw dependency graph is not a tree. 
     
     
       13. The system of  claim 10 , wherein the hierarchy graph includes a superset of nodes of the raw dependency graph. 
     
     
       14. The system of  claim 10 , wherein the aggregated dependency graph is computed after the request from the user is received. 
     
     
       15. The system  claim 10 , wherein the operations further comprise providing a user interface presentation that presents the aggregated dependency graph. 
     
     
       16. The system of  claim 15 , wherein the operations further comprise presenting, adjacent to each link connecting a pair of nodes representing a first software element and a second software element, a count, the count being a count of dependencies that exist from the first software element or any descendant of the first software element in the hierarchy graph on the second software element of the pair or any descendant of the second software element in the hierarchy graph. 
     
     
       17. The system of  claim 15 , further comprising presenting the user interface presentation within an integrated development environment or a code review tool. 
     
     
       18. The system of  claim 10 , wherein the operations further comprise:
 receiving, from a user, a selection of one or more dependency types; and 
 filtering the aggregated dependency graph to contain only aggregated dependencies having the selected one or more dependency types. 
 
     
     
       19. A computer program product, encoded on one or more non-transitory computer storage media, comprising instructions that when executed by one or more computers cause the one or more computers to perform operations comprising:
 obtaining data representing a raw dependency graph of software elements in the project, the raw dependency graph having nodes and directed links, wherein each node in the raw dependency graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents a dependency of a first software element represented by a first node of the pair on a second software element represented by a second node of the pair; 
 obtaining data representing a hierarchy graph of the software elements in the project, the hierarchy graph having nodes and directed links, wherein each node in the hierarchy graph represents a software element in the project and each directed link connects a corresponding pair of nodes and represents containment of a child software element represented by a first node of the pair by a parent software element represented by a second node of the pair; 
 processing the selected software elements as represented by the raw dependency graph and the hierarchy graph to generate data representing an aggregated dependency graph, the aggregated dependency graph having nodes representing the selected software elements and aggregated dependencies between one or more of the selected software elements, wherein each aggregated dependency between a pair of the selected software elements represents that a first software element of the pair, or a descendant of the first software element according to the hierarchy graph, depends, according to the raw dependency graph, on a second software element of the pair or a descendant of the second software element according to the hierarchy graph; and 
 providing the data representing the aggregated dependency graph in response to the request. 
 
     
     
       20. The computer program product of  claim 19 , wherein the operations further comprise:
 computing the aggregated dependencies between each pair of software element nodes, including:
 generating a first set of aggregated outbound dependencies outbound from a first node of the pair and dependencies outbound from any descendant of the first node of the pair in the hierarchy; 
 generating a second set of aggregated inbound dependencies inbound to a second node of the pair and dependencies inbound to any descendant of the second node of the pair; 
 computing an intersection of the first set of aggregated outbound dependencies and the second set of aggregated inbound dependencies; and 
 generating an aggregated dependency link from the first node of the pair to the second node of the pair whenever the intersection is not empty. 
 
 
     
     
       21. The computer program product of  claim 19 , wherein the hierarchy graph is a tree, and wherein the raw dependency graph is not a tree. 
     
     
       22. The computer program product of  claim 19 , wherein the hierarchy graph includes a superset of nodes of the raw dependency graph. 
     
     
       23. The computer program product of  claim 19 , wherein the aggregated dependency graph is computed after the request from the user is received. 
     
     
       24. The computer program product  claim 19 , wherein the operations further comprise providing a user interface presentation that presents the aggregated dependency graph. 
     
     
       25. The computer program product of  claim 24 , wherein the operations further comprise presenting, adjacent to each link connecting a pair of nodes representing a first software element and a second software element, a count, the count being a count of dependencies that exist from the first software element or any descendant of the first software element in the hierarchy graph on the second software element of the pair or any descendant of the second software element in the hierarchy graph. 
     
     
       26. The computer program product of  claim 24 , further comprising presenting the user interface presentation within an integrated development environment or a code review tool. 
     
     
       27. The computer program product of  claim 19 , wherein the operations further comprise:
 receiving, from a user, a selection of one or more dependency types; and 
 filtering the aggregated dependency graph to contain only aggregated dependencies having the selected one or more dependency types.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.