IP Library Granted Patent US 9,678,721
Granted Patent B2
US 9,678,721 · App. 15/090,468 · Granted Jun 13, 2017

Implicit software dependency analysis

Inventors: Joshua George Hale (Oxford, GB); Luke James Cartey (Oxford, GB)
Assignee: Semmle Limited
G06F8/22G06F11/3604
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 9,678,721
App. No.
15/090,468
Granted
Jun 13, 2017
Kind
B2
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 receiving a request to generate implicit dependencies introduced by remote procedure calls in a project. A registration of a remote procedure call is identified, wherein the registration of the remote procedure call specifies a target function and a name for the remote procedure call. An invocation of the remote procedure call using the name for the remote procedure call is identified, wherein the invocation occurs in a source software element of the project. A definition of the target function of the remote procedure call is identified, wherein the target function is defined in a target software element of the project. A new dependency is generated, the new dependency being a dependency from the source software element to the target software element.

Claims (40)

1. A computer-implemented method comprising:

receiving a request to generate implicit dependencies introduced by a reflection function in a project, wherein a reflection function is a function by which a program accesses attributes of the program's own source code;

executing a query that emulates at least some behavior of the reflection function to generate names of one or more target software elements that the reflection function outputs at runtime;

identifying, in the project, a source software element that uses output of the reflection function;

generating, in a raw dependency graph, one or more respective new dependencies representing one or more implicit dependencies of the source software element on each of the one or more target software elements due to the source software element using the output of the reflection function to obtain respective names of the one or more target software elements at runtime; and

generating data representing an aggregated dependency graph for a plurality of nodes of a hierarchy graph of software elements in the project, the plurality of nodes comprising a first node and one or more second nodes, wherein the aggregated dependency graph is different from the raw dependency graph, including generating one or more respective aggregated dependencies between the first node in the hierarchy graph and each of the one or more second nodes in the hierarchy graph, each aggregated dependency respectively representing the one or more implicit dependencies in the raw dependency graph of the source software element on each of the one or more target software elements, wherein, for each aggregated dependency on a particular second node of the one or more second nodes, the first node or a descendant of the first node in the hierarchy graph represents the source software element and the particular second node or a descendant of the particular second node in the hierarchy graph represents a particular target software element of the one or more target software elements.

2. The method of claim 1 , further comprising:

presenting a dependency graph that includes the one or more new dependencies between the source software element and each of the one or more target software elements.

3. The method of claim 1 , wherein generating the one or more new dependencies comprises matching a name of a target function output at runtime by the reflection function with a definition of the target function in a target software element.

4. The method of claim 1 , wherein the implicit dependency is a dependency from a source software element to a target software element such that building the source software element would not cause a compile-time or link-time error due to an absence of the target software element.

5. The method of claim 1 , further comprising providing a user interface presentation that presents the aggregated dependency graph.

6. The method of claim 1 , wherein receiving the request to generate implicit dependencies introduced by a reflection function in a project comprises receiving a query that defines an implicit dependency introduced by the reflection function in the project.

7. The method of claim 5 , wherein the user interface presentation visually distinguishes the implicit dependencies introduced by time configuration files from other dependencies in the user interface presentation.

8. 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:

receiving a request to generate implicit dependencies introduced by a reflection function in a project, wherein a reflection function is a function by which a program accesses attributes of the program's own source code;

executing a query that emulates at least some behavior of the reflection function to generate names of one or more target software elements that the reflection function outputs at runtime;

identifying, in the project, a source software element that uses output of the reflection function;

generating, in a raw dependency graph, one or more respective new dependencies representing one or more implicit dependencies of the source software element on each of the one or more target software elements due to the source software element using the output of the reflection function to obtain respective names of the one or more target software elements at runtime; and

generating data representing an aggregated dependency graph for a plurality of nodes of a hierarchy graph of software elements in the project, the plurality of nodes comprising a first node and one or more second nodes, wherein the aggregated dependency graph is different from the raw dependency graph, including generating one or more respective aggregated dependencies between the first node in the hierarchy graph and each of the one or more second nodes in the hierarchy graph, each aggregated dependency respectively representing the one or more implicit dependencies in the raw dependency graph of the source software element on each of the one or more target software elements, wherein for each aggregated dependency on a particular second node of the one or more second nodes, the first node or a descendant of the first node in the hierarchy graph represents the source software element and the particular second node or a descendant of the particular second node in the hierarchy graph represents a particular target software element of the one or more target software elements.

9. The system of claim 8 , wherein the operations further comprise:

presenting a dependency graph that includes the one or more new dependencies between the source software element and each of the one or more target software elements.

10. The system of claim 8 , wherein generating the one or more new dependencies comprises matching a name of a target function output at runtime by the reflection function with a definition of the target function in a target software element.

11. The system of claim 8 , wherein the implicit dependency is a dependency from a source software element to a target software element such that building the source software element would not cause a compile-time or link-time error due to an absence of the target software element.

12. The system of claim 8 , wherein the operations further comprise providing a user interface presentation that presents the aggregated dependency graph.

13. The system of claim 8 , wherein receiving the request to generate implicit dependencies introduced by a reflection function in a project comprises receiving a query that defines an implicit dependency introduced by the reflection function in the project.

14. The system of claim 12 , wherein the user interface presentation visually distinguishes the implicit dependencies introduced by runtime configuration files from other dependencies in the user interface presentation.

15. 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:

receiving a request to generate implicit dependencies introduced by a reflection function in a project, wherein a reflection function is a function by which a program accesses attributes of the program's own source code;

executing a query that emulates at least some behavior of the reflection function to generate names of one or more target software elements that the reflection function outputs at runtime;

identifying, in the project, a source software element that uses output of the reflection function; and

generating, in a raw dependency graph, one or more respective new dependencies representing one or more implicit dependencies of the source software element on each of the one or more target software elements due to the source software element using the output of the reflection function to obtain respective names of the one or more target software elements at runtime; and

generating data representing an aggregated dependency graph for a plurality of nodes of a hierarchy graph of software elements in the project, the plurality of nodes comprising a first node and one or more second nodes, wherein the aggregated dependency graph is different from the raw dependency graph, including generating one or more respective aggregated dependencies between the first node in the hierarchy graph and each of the one or more second nodes in the hierarchy graph, each aggregated dependency respectively representing the one or more implicit dependencies in the raw dependency graph of the source software element on each of the one or more target software elements, wherein for each aggregated dependency on a particular second node of the one or more second nodes, the first node or a descendant of the first node in the hierarchy graph represents the source software element and the particular second node or a descendant of the particular second node in the hierarchy graph represents a particular target software element of the one or more target software elements.

16. The computer program product of claim 15 , wherein the operations further comprise:

presenting a dependency graph that includes the one or more new dependencies between the source software element and each of the one or more target software elements.

17. The computer program product of claim 15 , wherein generating the one or more new dependencies comprises matching a name of a target function output at runtime by the reflection function with a definition of the target function in a target software element.

18. The computer program product of claim 15 , wherein the implicit dependency is a dependency from a source software element to a target software element such that building the source software element would not cause a compile-time or link-time error due to an absence of the target software element.

19. The computer program product of claim 15 , wherein the operations further comprise providing a user interface presentation that presents the aggregated dependency graph.

20. The computer program product of claim 15 , wherein receiving the request to generate implicit dependencies introduced by a reflection function in a project comprises receiving a query that defines an implicit dependency introduced by the reflection function in the project.

21. The computer program product of claim 19 , wherein the user interface presentation visually distinguishes the implicit dependencies introduced by runtime configuration files from other dependencies in the user interface presentation.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2020
From: GITHUB SOFTWARE UK LTD.
To: MICROSOFT TECHNOLOGY LICENSING, LLC
Reel/Frame 051710/0252 →
CHANGE OF NAME Recorded Dec 10, 2019
From: SEMMLE LIMITED
To: GITHUB SOFTWARE UK LTD.
Reel/Frame 051244/0305 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 8, 2016
From: HALE, JOSHUA GEORGE
To: SEMMLE LIMITED
Reel/Frame 038232/0045 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 8, 2016
From: CARTEY, LUKE JAMES
To: SEMMLE LIMITED
Reel/Frame 038232/0119 →
Continuity (3)
Division 14871983 · Sep 30, 2015
Provisional Application 62234939 · Sep 30, 2015
Related Publication 20170090877A1 · Mar 30, 2017