IP Library Granted Patent US 11,550,553
Granted Patent B2
US 11,550,553 · App. 17/101,947 · Granted Jan 10, 2023

Usage-based software library decomposition

Inventors: William C. Benton (Madison, WI); Erik J. Erlandson (Phoenix, AZ)
Assignee: Red Hat, Inc.
G06F8/433G06F8/24G06F8/443G06F8/72G06F8/75G06F8/77
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 11,550,553
App. No.
17/101,947
Granted
Jan 10, 2023
Kind
B2
Abstract

Performing usage-based software library decomposition is disclosed herein. In some examples, a processor device generates a first library graph representing a first software library including multiple functions. The first library graph comprises a plurality of nodes that each correspond to a function of the first software library. The processor device identifies a function within the first software library (“invoked function”) that is directly invoked by an application that depends on the first software library, then generates a call graph including nodes within the first library graph (“dependency nodes”) corresponding to either the invoked function or another function invoked by the invoked function during application execution. Using the call graph, the processor device generates a second software library including only functions of the first software library corresponding to dependency nodes of the call graph.

Claims (40)

1. A method, comprising:

generating, by a processor device of a computing device, a first library graph that represents a first software library that comprises a first plurality of functions, wherein the first library graph comprises a plurality of nodes that each corresponds to a function of the first plurality of functions;

identifying a function of the first plurality of functions as an invoked function that is directly invoked by an application that depends on the first software library;

generating a call graph that comprises a plurality of dependency nodes of the plurality of nodes of the first library graph, wherein each dependency node of the plurality of dependency nodes corresponds to the invoked function or a function invoked by the invoked function during execution of the application; and

generating a second software library based on the call graph by copying a second plurality of functions of the first plurality of functions that corresponds to the plurality of dependency nodes from the first software library to the second software library.

2. The method of claim 1 , further comprising generating a software package that comprises the application and the second software library.

3. The method of claim 1 , wherein generating the first library graph comprises analyzing source code, bytecode, or machine-executable code of the first software library.

4. The method of claim 1 , wherein generating the first library graph is based on a static code analysis of the first software library.

5. The method of claim 1 , wherein generating the first library graph is based on a dynamically-generated program representation of the first software library that comprises a method call trace of the first software library or a basic block trace of the first software library.

6. The method of claim 1 , further comprising storing the first library graph in association with a release indicator for the first software library.

7. The method of claim 1 , further comprising storing the call graph in association with the application and a release indicator for the first software library.

8. The method of claim 7 , further comprising:

identifying one or more functions of the plurality of functions in the first software library that are modified in a third software library that comprises an updated version of the first software library; and

determining, based on the one or more functions and the call graph, whether the application requires the third software library.

9. A computing device, comprising:

a system memory; and

a processor device coupled to the system memory to:

generate a first library graph that represents a first software library that comprises a first plurality of functions, wherein the first library graph comprises a plurality of nodes that each corresponds to a function of the first plurality of functions;

identify a function of the first plurality of functions as an invoked function that is directly invoked by an application that depends on the first software library;

generate a call graph that comprises a plurality of dependency nodes of the plurality of nodes of the first library graph, wherein each dependency node of the plurality of dependency nodes corresponds to the invoked function or a function invoked by the invoked function during execution of the application; and

generate a second software library based on the call graph by copying a second plurality of functions of the first plurality of functions that corresponds to the plurality of dependency nodes from the first software library to the second software library.

10. The computing device of claim 9 , wherein the processor device is further to generate a software package that comprises the application and the second software library.

11. The computing device of claim 9 , wherein to generate the first library graph is to analyze source code, bytecode, or machine-executable code of the first software library.

12. The computing device of claim 9 , wherein the processor device is to generate the first library graph based on a static code analysis of the first software library.

13. The computing device of claim 9 , wherein the processor device is to generate the first library graph based on a dynamically-generated program representation of the first software library that comprises a computing device call trace of the first software library or a basic block trace of the first software library.

14. The computing device of claim 9 , wherein the processor device is further to store the first library graph in association with a release indicator for the first software library.

15. The computing device of claim 9 , wherein the processor device is further to store the call graph in association with the application and a release indicator for the first software library.

16. The computing device of claim 15 , wherein the processor device is further to:

identify one or more functions of the plurality of functions in the first software library that are modified in a third software library that comprises an updated version of the first software library; and

determine, based on the one or more functions and the call graph, whether the application requires the third software library.

17. A non-transitory computer-readable medium having stored thereon computer-executable instructions which, when executed by a processor device, cause the processor device to:

generate a first library graph that represents a first software library that comprises a first plurality of functions, wherein the first library graph comprises a plurality of nodes that each corresponds to a function of the first plurality of functions;

identify a function of the first plurality of functions as an invoked function that is directly invoked by an application that depends on the first software library;

generate a call graph that comprises a plurality of dependency nodes of the plurality of nodes of the first library graph, wherein each dependency node of the plurality of dependency nodes corresponds to the invoked function or a function invoked by the invoked function during execution of the application; and

generate a second software library based on the call graph by copying a second plurality of functions of the first plurality of functions that corresponds to the plurality of dependency nodes from the first software library to the second software library.

18. The non-transitory computer-readable medium of claim 17 , wherein the computer-executable instructions further cause the processor device to generate a software package that comprises the application and the second software library.

19. The non-transitory computer-readable medium of claim 17 , wherein the computer-executable instructions further cause the processor device to store the call graph in association with the application and a release indicator for the first software library.

20. The non-transitory computer-readable medium of claim 19 , wherein the computer-executable instructions further cause the processor device to:

identify one or more functions of the plurality of functions in the first software library that are modified in a third software library that comprises an updated version of the first software library; and

determine, based on the one or more functions and the call graph, whether the application requires the third software library.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 23, 2020
From: ERLANDSON, ERIK J.; BENTON, WILLIAM C.
To: RED HAT, INC.
Reel/Frame 054448/0816 →
Continuity (1)
Related Publication 20220164170A1 · May 26, 2022