IP Library Granted Patent US 8,037,461
Granted Patent B2
US 8,037,461 · App. 11/728,723 · Granted Oct 11, 2011

Program code conversion

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 8,037,461
App. No.
11/728,723
Granted
Oct 11, 2011
Kind
B2
Abstract

A method of dynamic real time translation of first program code written for a first programmable machine into second program code (target code) for running on a second programmable machine employing run time generation of an intermediate representation of the first program code. Upon first encountering a given portion of program code, only the target code necessary to execute that portion of program code under a prevailing set of entry conditions is initially generated and stored. When the same portion of program code is again encountered, a determination is made as to whether intermediate representation corresponding to a second subsequent set of conditions has been generated. If not, the target code necessary to execute the same portion of program code under that second set of conditions is generated.

Claims (37)

1. A method of converting program code written for execution by a processor of a first type into target code to be executed by a processor of a second type, wherein the conversion is performed dynamically while the target code is executed by the processor of the second type, the method comprising the computer implemented steps of:

decoding the program code and forming at least a first program code block amongst a plurality of program code blocks in the program code;

on an initial translation of the first program code block, generating and storing a target code portion which is specialised only to execute that first program code block according to a prevailing set of conditions;

executing the target code portion and thereby entering a subsequent one of the plurality of program code blocks; and

whenever subsequently the same first program code block is entered, determining whether a target code portion has previously been generated and stored for that first program code block for a now-prevailing subsequent set of conditions, and if no such target code portion has previously been generated, generating an additional target code portion which is specialised to execute said first program code block according to the now-prevailing subsequent set of conditions.

2. The method of claim 1 , wherein whenever subsequently the same first program code block is entered, the method comprises the computer implemented steps of:

determining whether said now-prevailing subsequent set of conditions are different from each of one or more previously-encountered said sets of conditions, and

if different, generating and storing another different target code portion for said same first program code block as required to execute said first program code block with said now-prevailing different set of conditions.

3. The method of claim 1 , wherein said first program code block has a plurality of possible alternative entry conditions or effects or functions, and said target code portion is generated and stored to represent only a subset of said plurality of possible alternative entry conditions or effects or functions as required to execute that first program code block with said prevailing set of conditions.

4. The method of claim 3 , wherein said target code portion that is generated and stored for said prevailing set of conditions does not represent any un-used entry conditions or effects or functions from said plurality of possible alternative entry conditions or effects or functions.

5. The method of claim 1 , wherein the said target code portion is generated and stored together with an associated test procedure to determine on subsequent entry into the first program code block whether a target code portion has previously been generated and stored having functionality required by the now-prevailing set of conditions.

6. The method of claim 5 , further comprising generating and storing an additional test procedure associated with said additional target code portion.

7. The method of claim 6 , wherein the additional target code portion and the additional associated test procedure are stored at least initially in subordinate relation to one or more existing target code portions and associated test procedures, whereby upon subsequent entering the first program code block, a determination of whether or not a target code portion has previously been generated and stored having functionality required by the now-prevailing set of conditions is made by performing said test procedures in the order in which they were generated and stored until either it is determined that a target code portion of the required functionality exists, or it is determined that no such target code portion exists in which case said additional target code portion and said associated test procedure is generated and stored.

8. The method according to claim 7 , further comprising the step of optimising the target code by adjusting the ordering of the test procedures such that a test procedure associated with a more frequently used target code portion is run before a test procedure associated with a less frequently used target code portion rather than ordering the test procedures in the order in which they are generated.

9. The method of claim 1 , wherein the program code is binary program code which is directly executable by the processor of the first type.

10. The method of claim 1 , wherein the target code is binary program code which is directly executable by the processor of the second type.

11. The method of claim 1 , comprising translating the program code written for execution by the processor of the first type so that the program code is executed by a processor of a different non-compatible second type.

12. The method of claim 1 , comprising optimising the program code written for execution by the processor of the first type so that the program code is executed more efficiently by the processor of the same first type.

13. A program storage medium storing an emulation system for converting program code written for execution by a processor of a first type into target code to be executed by a processor of a second type, wherein the conversion is performed dynamically while the target code is executed by the processor of the second type, the emulation system when executed on the processor of the second type being operative to perform the steps of:

decoding the program code and forming at least a first program code block amongst a plurality of program code blocks in the program code;

on an initial translation of the first program code block, generating and storing a target code portion which is specialised only to execute that first program code block according to a prevailing set of conditions;

executing the target code portion and thereby entering a subsequent one of the plurality of program code blocks; and

whenever subsequently the same first program code block is entered, determining whether a target code portion has previously been generated and stored for that first program code block for a now-prevailing subsequent set of conditions, and if no such target code portion has previously been generated, generating an additional target code portion which is specialised to execute said first program code block according to the now-prevailing subsequent set of conditions.

14. In combination:

a processor of a second type; and

an emulation system operable to convert program code written for execution by a processor of a first type into target code to be executed by the processor of a second type, wherein the conversion is performed dynamically while the target code is executed by the processor of the second type, the emulation system when executed on the processor of the second type being operative to perform the steps of:

decoding the program code and forming at least a first program code block amongst a plurality of program code blocks in the program code;

on an initial translation of the first program code block, generating and storing a target code portion which is specialised only to execute that first program code block according to a prevailing set of conditions;

executing the target code portion and thereby entering a subsequent one of the plurality of program code blocks; and

whenever subsequently the same first program code block is entered, determining whether a target code portion has previously been generated and stored for that first program code block for a now-prevailing subsequent set of conditions, and if no such target code portion has previously been generated, generating an additional target code portion which is specialised to execute said first program code block according to the now-prevailing subsequent set of conditions.

15. A computing system comprising:

a processor of a second type; and

an emulation unit operable to convert program code written for execution by a processor of a first type into target code to be executed by the processor of a second type, wherein the conversion is performed dynamically while the target code is executed by the processor of the second type, the emulation system when executed on the processor of the second type being operative to perform the steps of:

decoding the program code and forming at least a first program code block amongst a plurality of program code blocks in the program code;

on an initial translation of the first program code block, generating and storing a target code portion which is specialised only to execute that first program code block according to a prevailing set of conditions;

executing the target code portion and thereby entering a subsequent one of the plurality of program code blocks; and

whenever subsequently the same first program code block is entered, determining whether a target code portion has previously been generated and stored for that first program code block for a now-prevailing subsequent set of conditions, and if no such target code portion has previously been generated, generating an additional target code portion which is specialised to execute said first program code block according to the now-prevailing subsequent set of conditions.

Assignments (3)
CORRECTIVE ASSIGNMENT TO CORRECT THE ASSIGNEE NAME PREVIOUSLY RECORDED ON REEL 022928 FRAME 0190. ASSIGNOR(S) HEREBY CONFIRMS THE RECEIVING PARTY. Recorded Aug 26, 2013
From: IBM UNITED KINGDOM LIMITED
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 031085/0824 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 7, 2009
From: IBM UNITED KINGDOM LIMITED
To: IBM CORPORATION
Reel/Frame 022928/0190 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 16, 2009
From: TRANSITIVE LIMITED
To: IBM UNITED KINGDOM LIMITED
Reel/Frame 022824/0715 →