# US 12,008,386 B2 · Conservative class preloading for real time java execution

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

- Number: US 12,008,386 B2
- Document ID: US12008386B2
- Status: Granted
- Kind: B2
- Application number: 16/699,593
- Filed: 2019-11-30
- Published: 2020-04-02
- Granted: 2024-06-11
- Earliest claimed: 2006-08-17
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Michael S. Fulton
- Web page: https://patentgrep.com/patent/US12008386B2

## CPC

- G06F 9/44521: {Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading}
- G06F 8/315: {Object-oriented languages}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A computer implemented method, a computer program product and a data processing system for executing an application written in a dynamic language are provided. An execution point of the application is loaded. A list of classes associated with the execution point is generated. The loading of each class in the list of classes is simulated. New execution points and new classes accessible from each execution point within each class in the list of classes are identified by recursively parsing instructions associated with each execution point. The list is modified to include the identified new execution points and new classes. Responsive to a determination that new execution points and new classes have been identified, the steps of identifying new execution points and new classes and modifying the list is repeated. The list is saved.

## Claims

### Claim 1

A computer-implemented method, comprising:
receiving, from an application, a jar file having a class file including a list of methods and classes, the list of methods and classes including a method list and a class list;
performing first loop operations of a first loop until no new methods and classes are found, the first loop operations including:
scanning each method within the method list, and
adding new method(s) and/or class(es) to the list of methods and classes;
performing second loop operations of a second loop until no new static method byte codes are identified, the second loop operations including:
adding identified new static method byte codes to the list of methods and classes,
executing the first loop, and
identifying any virtual method(s) and/or interface(s) accessed by the application;
performing third loop operations of a third loop until no new virtual method(s) and/or interface(s) are identified, the third loop operations including:
adding, for each of the new identified virtual method(s), all dispatch targets to the method list, and
executing the second loop;
recording, as a conservative class list, the class list as modified by the first, second, and third loop operations; and
forwarding, to the application, the conservative class list.

### Claim 2 (depends on 1)

The method of claim 1, wherein the second loop operations include:
identifying a class as a package private class; and
generating, based upon the package private class being identified, a new public class for the package private class.

### Claim 3 (depends on 2)

The method of claim 2, wherein the generating includes
interrogating a package of the package private class to derive a unique new class name in the package;
creating a public class sequence for the package private class; and
writing the new public class to a directory in the class list.

### Claim 4 (depends on 3)

The method of claim 3, wherein
the new public class is not instantiated.

### Claim 5 (depends on 3)

The method of claim 3, wherein
the new public class has a public constructor that accepts no parameters.

### Claim 6 (depends on 1)

The method of claim 1, wherein
the conservative class list is recorded each time the class list is modified.

### Claim 7

A computer hardware system, comprising:
a hardware processor; and
a computer hardware memory having stored therein instructions executable by the hardware processor, the instructions including:
receiving, from an application, a jar file having a class file including a list of methods and classes, the list of methods and classes including a method list and a class list;
performing first loop operations of a first loop until no new methods and classes are found, the first loop operations including:
scanning each method within the method list, and
adding new method(s) and/or class(es) to the list of methods and classes;
performing second loop operations of a second loop until no new static method byte codes are identified, the second loop operations including:
adding identified new static method byte codes to the list of methods and classes,
executing the first loop, and
identifying any virtual method(s) and/or interface(s) accessed by the application;
performing third loop operations of a third loop until no new virtual method(s) and/or interface(s) are identified, the third loop operations including:
adding, for each of the new identified virtual method(s), all dispatch targets to the method list, and
executing the second loop;
recording, as a conservative class list, the class list as modified by the first, second, and third loop operations; and
forwarding, to the application, the conservative class list.

### Claim 8 (depends on 7)

The system of claim 7, wherein the second loop operations include:
identifying a class as a package private class; and
generating, based upon the package private class being identified, a new public class for the package private class.

### Claim 9 (depends on 8)

The system of claim 8, wherein the generating includes
interrogating a package of the package private class to derive a unique new class name in the package;
creating a public class sequence for the package private class; and
writing the new public class to a directory in the class list.

### Claim 10 (depends on 9)

The system of claim 9, wherein
the new public class is not instantiated.

### Claim 11 (depends on 9)

The system of claim 9, wherein
the new public class has a public constructor that accepts no parameters.

### Claim 12 (depends on 7)

The system of claim 7, wherein
the conservative class list is recorded each time the class list is modified.

### Claim 13

A computer program product, comprising,
a hardware storage device having stored therein computer instructions
the computer instructions, when executed by a computer hardware system, causes the computer hardware system to perform:
receiving, from an application, a jar file having a class file including a list of methods and classes, the list of methods and classes including a method list and a class list;
performing first loop operations of a first loop until no new methods and classes are found, the first loop operations including:
scanning each method within the method list, and
adding new method(s) and/or class(es) to the list of methods and classes;
performing second loop operations of a second loop until no new static method byte codes are identified, the second loop operations including:
adding identified new static method byte codes to the list of methods and classes,
executing the first loop, and
identifying any virtual method(s) and/or interface(s) accessed by the application;
performing third loop operations of a third loop until no new virtual method(s) and/or interface(s) are identified, the third loop operations including:
adding, for each of the new identified virtual method(s), all dispatch targets to the method list, and
executing the second loop;
recording, as a conservative class list, the class list as modified by the first, second, and third loop operations; and
forwarding, to the application, the conservative class list.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the second loop operations include:
identifying a class as a package private class; and
generating, based upon the package private class being identified, a new public class for the package private class.

### Claim 15 (depends on 14)

The computer program product of claim 14, wherein the generating includes
interrogating a package of the package private class to derive a unique new class name in the package;
creating a public class sequence for the package private class; and
writing the new public class to a directory in the class list.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein
the new public class is not instantiated.

### Claim 17 (depends on 15)

The computer program product of claim 15, wherein
the new public class has a public constructor that accepts no parameters.

### Claim 18 (depends on 13)

The computer program product of claim 13, wherein
the conservative class list is recorded each time the class list is modified.
