# US 2004/0083467 A1 · System and method for executing intermediate code

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

- Number: US 2004/0083467 A1
- Document ID: US20040083467A1
- Status: Published application
- Kind: A1
- Application number: 10/283,724
- Filed: 2002-10-29
- Published: 2004-04-29
- Earliest claimed: 2002-10-29
- Assignees: Sharp Laboratories of America, Inc.
- Inventors: Mark G. Hanley; Ronald D. Braithwaite
- Web page: https://patentgrep.com/patent/US20040083467A1

## CPC

- G06F 8/52: Binary to binary
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method are provided for efficiently executing intermediate code. The method comprises: receiving an application generated in an intermediate code such as JAVA, .NET, or VisualBasic; automatically compiling the intermediate code into native machine code; saving the native machine code in permanent memory; receiving a command to execute the application; accessing the native machine code from permanent memory; and, executing the application using the native machine code. Some aspects of the method further comprise: tagging the native machine code in permanent memory as a native machine code version of the application; and, in response to receiving a command to execute the application, checking the permanent memory for a native machine code version of the application. Then, accessing native machine code from permanent memory includes accessing native machine code if a native machine code version of the application is identified in permanent memory.

## Claims

### Claim 1

A method for efficiently executing intermediate code, the method comprising:
receiving an application generated in an intermediate code;
automatically compiling the intermediate code into native machine code;
saving the native machine code in permanent memory;
receiving a command to execute the application;
accessing the native machine code from permanent memory; and,
executing the application using the native machine code.

### Claim 2 (depends on 1)

The method of claim 1 wherein automatically compiling the intermediate code into native machine code includes compiling the intermediate code into a native machine code for a first machine environment;
wherein receiving a command to execute the application includes receiving a command to execute the application in the first machine environment; and,
wherein executing the application using the native machine code includes executing the application using the first machine environment native machine code.

### Claim 3 (depends on 2)

The method of claim 2 further comprising:
receiving a command to execute the application in a second machine environment, different than the first machine environment;
automatically recompiling the intermediate code into second machine environment native machine code; and,
executing the application using the second machine environment native machine code.

### Claim 4 (depends on 3)

The method of claim 3 further comprising:
saving the second machine environment native machine code in permanent memory.

### Claim 5 (depends on 1)

The method of claim 1 wherein receiving an application generated in an intermediate code includes receiving the application in a first machine environment; and,
the method further comprising:
tagging the native machine code in permanent memory as a native machine code version of the application compiled for use in the first machine environment;
in response to receiving a command to execute the application, checking the permanent memory for a first machine environment native machine code version of the application; and,
wherein accessing native machine code from permanent memory includes accessing native machine code if a first machine environment native machine code version of the application is identified in permanent memory.

### Claim 6 (depends on 5)

The method of claim 5 wherein receiving an application written in an intermediate code includes receiving an application written in an intermediate code language selected from the group including JAVA, .NET, and VisualBasic.

### Claim 7 (depends on 6)

The method of claim 6 wherein receiving an application written in an intermediate code includes receiving an application written in JAVA; and,
wherein compiling the intermediate code into native machine code includes using a just-in-time (JIT) JAVA virtual machine to compile the JAVA code into native machine code.

### Claim 8 (depends on 5)

The method of claim 5 wherein checking the permanent memory for a native machine code version of the application includes checking for the existence of application metadata associated with the native machine code version of the application; and,
the method further comprising:
checking the integrity of the metadata;
if the integrity check of the metadata fails, recompiling the intermediate code into native machine code; and,
wherein executing the application using the native machine code includes executing the recompiled native machine code version of the application.

### Claim 9 (depends on 8)

The method of claim 8 wherein checking for the existence of application metadata associated with the native machine code version of the application includes checking metadata from a source selected from the group including metadata files, intermediate code files, and a metadata registry.

### Claim 10 (depends on 8)

The method of claim 8 further comprising:
saving the recompiled native machine code as a bundle in proximately located sections of permanent memory.

### Claim 11 (depends on 10)

The method of claim 10 wherein checking the integrity of the metadata includes deleting associated executable (EXE) files, if the integrity check of the metadata fails.

### Claim 12 (depends on 11)

The method of claim 11 wherein checking the integrity of the metadata includes:
checking that all the files listed as required by the metadata are present in a memory; and,
if any of the required files are missing, deleting any EXE files associated with the metadata.

### Claim 13 (depends on 12)

The method of claim 12 wherein checking the integrity of the metadata includes:
checking that files listed as required by the metadata include a signature that matches the metadata signature; and,
if a non-matching signature is found, deleting any EXE files associated with the metadata.

### Claim 14 (depends on 13)

The method of claim 13 wherein checking the integrity of the metadata includes:
checking the identifiers of hardware and software modules additionally required to execute the application; and,
checking that the unique identifier (UID) associated with the metadata is consistent with hardware and software identifiers.

### Claim 15 (depends on 14)

The method of claim 14 further comprising:
generating EXE files in response to the metadata;
checking the integrity of the EXE files;
updating the metadata to reflect the generated EXE files; and,
checking the integrity of the updated metadata.

### Claim 16 (depends on 15)

The method of claim 15 further comprising:
if the integrity check of an updated metadata fails, deleting any associated EXE file.

### Claim 17 (depends on 1)

The method of claim 1 wherein accessing native machine code from permanent memory includes accessing a permanent memory selected from the group including FLASH, hard drive, EEPROM, and removable drives.

### Claim 18

A system for efficiently executing intermediate code, the system comprising:
a first memory having an interface to receive an application that has been generated in an intermediate code;
a virtual machine having an interface to accept the intermediate code application from the first memory and compile the intermediate code into native machine code;
a permanent memory having an interface connected to the virtual machine to save the native machine code; and,
a processor having a user interface to receive a command to execute the application, the processor accessing native machine code from the permanent memory and executing the application using the native machine code.

### Claim 19 (depends on 18)

The system of claim 18 wherein the processor is a first machine environment processor; and,
wherein the virtual machine compiles the intermediate code into a first machine environment native machine code of the application.

### Claim 20 (depends on 19)

The system of claim 19 wherein the permanent memory accepts a tagged first machine environment native machine code version of the application; and,
wherein the first machine environment processor, in response to receiving a command to execute the application, checks the permanent memory for a first machine environment native machine code version of the application and accesses the permanent memory if a first machine environment native machine code version of the application is identified in permanent memory.

### Claim 21 (depends on 20)

The system of claim 20 wherein the first memory receives an application written in an intermediate code language selected from the group including JAVA, .NET, and VisualBasic.

### Claim 22 (depends on 20)

The system of claim 20 wherein the first memory receives an application written in JAVA; and,
wherein the virtual machine is a just-in-time (JIT) JAVA virtual machine to compile the JAVA code into native machine code.

### Claim 23 (depends on 20)

The system of claim 20 wherein the processor checks permanent memory for the existence of application metadata associated with the native machine code version of the application, and checks the integrity of the metadata;
wherein the virtual machine recompiles the intermediate code into native machine code if the integrity check of the metadata fails; and,
wherein the processor executes the recompiled native machine code version of the application.

### Claim 24 (depends on 23)

The system of claim 23 wherein the processor checks for the existence of metadata in a source selected from the group including metadata files, intermediate code files, and a metadata registry.

### Claim 25 (depends on 24)

The system of claim 24 wherein the virtual machine saves the recompiled native machine code as a bundle in proximately located sections of permanent memory.

### Claim 26 (depends on 25)

The system of claim 25 wherein the processor deletes associated executable (EXE) files in permanent memory, if the integrity check of the metadata fails.

### Claim 27 (depends on 26)

The system of claim 26 wherein the processor checks that all the files listed as required by the metadata are present in permanent memory, and if any of the required files are missing, deletes any EXE files in permanent memory associated with the metadata.

### Claim 28 (depends on 27)

The system of claim 27 wherein the processor checks that files listed as required by the metadata include a signature that matches the metadata signature, and if a non-matching signature is found, deletes any EXE files in permanent memory associated with the metadata.

### Claim 29 (depends on 28)

The system of claim 28 further comprising:
a second memory including software, with a software identifier, required by the processor to perform the application; and,
a hardware module with a hardware identifier required by the processor to perform the application; and,
wherein the processor checks that the unique identifier (UID) associated with the metadata in permanent memory is consistent with the hardware and software identifiers.

### Claim 30 (depends on 29)

The system of claim 29 wherein the processor generates EXE files from the metadata, checks the integrity of the EXE files, updates the metadata in permanent memory to reflect the generated EXE files, and checks the integrity of the updated metadata.

### Claim 31 (depends on 30)

The system of claim 30 wherein the processor deletes any associated EXE file in permanent memory if the integrity check of the metadata fails.

### Claim 32 (depends on 18)

The system of claim 18 wherein the permanent memory is selected from the group including FLASH, hard drive, EEPROM, and removable drives.

### Claim 33

A system for efficiently executing intermediate code, the system comprising:
a first machine environment including:
a first memory having an interface to receive an application that has been generated in an intermediate code;
a virtual machine having an interface to accept the intermediate code application from the first memory and compile the intermediate code into a first machine environment native machine code;
a permanent memory having an interface connected to the virtual machine to save the first machine environment native machine code; and,
a processor having a user interface to receive a command to execute the application, the processor accessing first machine environment native machine code from the permanent memory and executing the application using the first machine environment native machine code; and,
a second machine environment including:
a virtual machine having an interface for accepting the intermediate code application from the first memory and recompiling the intermediate code into a second machine environment native machine code;
a permanent memory having an interface connected to the virtual machine to save the second machine environment native machine code; and,
a processor having a user interface to receive a command to execute the application, the processor accessing second machine environment native machine code from the permanent memory and executing the application using the second machine environment native machine code.
