# US 2017/0286072 A1 · Custom class library generation method and apparatus

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0286072 A1
- Document ID: US20170286072A1
- Status: Published application
- Kind: A1
- Application number: 15/485,112
- Filed: 2017-04-11
- Published: 2017-10-05
- Earliest claimed: 2015-09-18
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Lei Luc SHI; Xin WANG; Mingqiu SUN; Ligang WANG; Gopinatth SELVARAJE
- Web page: https://patentgrep.com/patent/US20170286072A1

## CPC

- G06F 8/36: Software reuse
- G06F 8/31: {Programming languages or programming paradigms}
- G06F 8/315: {Object-oriented languages}
- G06F 8/63: {Image based installation; Cloning; Build to order}
- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 8/427: {Parsing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Apparatuses, methods and storage media associated with generating a custom class library are disclosed herein. In embodiments, an apparatus may include an analyzer configured to receive a workload for a device and a class library used by the workload, analyze the workload and class library, identify one or more workload full API call chains, and generate information about the one or more workload full API call chains. Further, the apparatus may include a generator to generate from the class library, a custom class library for the workload that is smaller than the class library, based at least in part on the one or more workload full API call chains. Other embodiments may be disclosed or claimed.

## Claims

### Claim 1

An apparatus for generating a custom class library for a device, comprising:
one or more processors; and
an analyzer to be operated by the one or more processors to receive a workload for the device and a class library used by the workload, analyze the workload and the class library, identify one or more workload full application programming interface, API, call chains that include direct calls from the workload to the class library, and subsequent calls within the class library resulted from the direct calls from the workload to the class library, and generate information about the one or more workload full API call chains.

### Claim 2 (depends on 1)

The apparatus of claim 1, wherein the analyzer is to parse the class library, and based on a result of the parsing, generate connectivity information that describes a calling relationship between each class or API in the class library.

### Claim 3 (depends on 2)

The apparatus of claim 2, wherein the analyzer is to further generate, based on the result of the parsing, an API information table that stores, for each API, a unique identifier of the API, a prototype of the API having a return value and one or more parameters, and the API's containing class identifier.

### Claim 4 (depends on 2)

The apparatus of claim 2, wherein the analyzer is to further generate, based on the result of the parsing, a method invoking table that stores, for each API, one or more method identifiers identifying one or more methods directly invoked by the API.

### Claim 5 (depends on 2)

The apparatus of claim 2, wherein the analyzer is to further generate, based on the result of the parsing, a field invoking table that stores, for each API, one or more field identifiers identifying one or more fields invoked by the API.

### Claim 6 (depends on 1)

The apparatus of claim 1, wherein the analyzer is to parse the workload, and based on a result of the parsing of the workload, generate one or more records of API invocation of the workload or the class library.

### Claim 7 (depends on 6)

The apparatus of claim 6, wherein the analyzer is to identify the one or more workload full API call chains, based at least in part on the one or more records of API invocation of the workload or the class library, and the connectivity information that describes the calling relationship between each class or API in the class library.

### Claim 8 (depends on 1)

The apparatus of claim 1, further comprising a generator to be operated by the one or more processors to generate from the class library, a custom class library for the workload that is smaller than the class library, based at least in part on the one or more workload full API call chains.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the class library comprises a Java® Virtual Machine, JVM, class library.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein the workload comprises a workload for an Internet of Things (IoT) device.

### Claim 11

A method for generating a custom class library for a device, comprising:
receiving, by a computing device, a workload for the device and a class library used by the workload;
analyzing, by the computing device, the workload and the class library to identify one or more workload full application programming interface, API, call chains that include direct calls from the workload to the class library and subsequent calls within the class library resulted from the direct calls from the workload to the class library; and
generating, by the computing device, information about the one or more workload full API call chains.

### Claim 12 (depends on 11)

The method of claim 11, wherein analyzing comprises parsing the class library, and based on a result of the parsing, generating connectivity information that describes a calling relationship between each class or API in the class library.

### Claim 13 (depends on 12)

The method of claim 12, wherein analyzing comprises generating, based on the result of the parsing, an API information table that stores for each API, a unique identifier of the API, a prototype of the API having a return value and one or more parameters, and the API's containing class identifier.

### Claim 14 (depends on 12)

The method of claim 12, wherein analyzing comprises generating, based on the result of the parsing, a method invoking table that stores for each API, one or more method identifiers identifying one or more methods directly invoked by the API.

### Claim 15 (depends on 12)

The method of claim 12, wherein analyzing comprises generating, based on the result of the parsing, a field invoking table that stores for each API, one or more field identifiers identifying one or more fields invoked by the API.

### Claim 16 (depends on 11)

The method of claim 11, wherein analyzing comprises parsing the workload, and based on a result of the parsing of the workload, generating one or more records of API invocation of the workload or the class library.

### Claim 17 (depends on 16)

The method of claim 16, wherein analyzing comprises identifying the one or more workload full API call chains, based at least in part on the one or more records of API invocation of the workload or the class library and the connectivity information that describes the calling relationship between each class or API in the class library.

### Claim 18 (depends on 11)

The method of claim 11, further comprising:
generating from the class library, by the computing device, a custom class library for the workload that is smaller than the class library, based at least in part on the one or more workload full API call chains.

### Claim 19

(canceled)

### Claim 20

(canceled)

### Claim 21

At least one storage medium comprising a plurality of instructions to cause an apparatus, in response to execution of the instructions by the apparatus, to:
receive a worklaod for the device and a class library used by the workload;
analyze the workload and the class library, identify one of more workload full application programming interface, API, call chains that include directs calls from the workload to the class library, and subsequent calls within the class library resulted from the direct calls from the workload to the class library; and
generate information about the one or more workload full API call chains.

### Claim 22

(canceled)

### Claim 23

(canceled)

### Claim 24

(canceled)

### Claim 25

(canceled)

### Claim 26 (depends on 19)

The computer-readable storage medium of claim 19, wherein to analyze is to parse the class library, and based on a result of the parsing, generate connectivity information that describes a calling relationship between each class or API in the class library.

### Claim 27 (depends on 26)

The computer-readable storage medium of claim 26, wherein to analyze is to further generate, based on the result of the parsing, an API information table that stores for each API, a unique identifier of the API, a prototype of the API having a return value and one or more parameters, and the API's containing class identifier.

### Claim 28 (depends on 26)

The computer-readable storage medium of claim 26, wherein to analyze is to further generate, based on the result of the parsing, a method invoking table that stores for each API, one or more method identifiers identifying one or more methods directly invoked by the API.

### Claim 29

The computer-readable storage medium 26, wherein to analyze is to further generate, based on the result of the parsing, a field invoking table that stores for each API, one or more field identifiers identifying one or more fields invoked by the API.

### Claim 30

The computer-readable storage medium 19, wherein to analyze is to parse the workload, and based on a result of the parsing of the workload, generate one or more records of API invocation of the workload or the class library.

### Claim 31 (depends on 19)

The computer-readable storage medium of claim 19, wherein the apparatus is further caused to generate from the class library, a custom class library for the workload that is smaller than the class library, based at least in part on the one or more workload full API call chains.
