Method for converting an object code into a program code

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000

Reexamination Certificate

active

06279150

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The invention is directed to a method for converting an object code for a source hardware into an equivalent program code according to a method for converting object cod for a source hardware into equivalent executable program code for a target hardware where the program code comprises a program part and a program part. In particular, the invention is directed to a method for converting an object code suitable for an earlier processor generation into a program code that is runnable on current hardware platforms.
2. Description of the Related Art
The increasing demands made on the performance capability of computer systems often require a switch to new computer generations, for example from CISC to RISC computers. Since, however, the programs existing for prior computer generations represent great economic value and can be necessary for the smooth execution of company-critical procedures, it is desirable or even indispensable to continue using the existing software base.
Manually rewriting of the programs onto the target hardware is very time-consuming and costly. Different techniques of automatic transformation have therefore been proposed.
When the existing programs or parts thereof are present in the source code of a standardized language, they can usually be converted onto the new target hardware by simple re-compiling. An automatic conversion is likewise possible for application programs that are present as assembler source code for the source hardware. Such a method, which, however, is not provided for the conversion of an object code, is disclosed in German Patent Application DE 196 17 842.
Often, however, user programs are only present in the form of an object code runnable on the source hardware. This is particularly the case for applications that have been modified over the course of years at the object code level. The original source code for such programs—if it is still available—is usually unusable since it does not contain the changes that have been made.
It is known to dynamically transform object code for a source hardware on the target hardware in the fashion of a command interpreter. Such an emulation of the source hardware, however, requires a great deal of computing time which cancel out the higher performance capability of the new hardware. Programs that usually run significantly faster on the target hardware can be produced with methods for static program transformation.
U.S. Pat. No. 5,313,614 discloses a method for static conversion of object code between computer systems having different hardware architectures. In the converted program, a complete image of the address space of the source machine is contained in the RAM of the target machine. This image, for example, contains an image repetition store and addresses for input/output registers. Memory accesses of the converted program occur in the corresponding addresses of the image. Accesses onto addresses that trigger a side affect in the source hardware are thereby intercepted and suitably converted.
This method is therefore provided for the conversion of object code that directly accesses the hardware of the source machine, but is relatively complicated precisely because of the support of hardware-related functions. This is true both with respect to the computing expenditure required for the conversion as well as the implementation of the converted program.
The article, “Binary Translation” by R. L. Sites et al. in the periodical
Communications of the Association for Computing Machinery,
Vol. 36, No. 2, February 1993, pages 69-81, shows a method for binary code conversion in which existing VAX and MIPS programs are converted into binary code for RISC computers. This method comprises converting an object code for a source hardware into an equivalent program code that comprises a program part and a data part, in which a code transformer analyzes each command of the object code for the source hardware and generates at least one corresponding entry from it into the program part of the program code, by which a part of the object code for the source hardware is accepted into the data part of the program code. It also incorporates all of the original object code (data and program part) into the generated binary code. In this method, machine code is generated for alpha-AXP processors in order to obtain an optimally direct imaging of the structures of the source hardware onto structures of the target hardware.
Converting existing CISC object code into optimized RISC code is known from the article, “Migrating a CISC Computer Family onto RISC via Object Code Translation” by K. Andrews et al. in ACM SIGPLAN Notices, Volume 27, No. 9, September 1992, pages 213-222.
The article, “A Methodology for Decompilation” by C. Cifuentes et al. in XIX Conferencia Latinoamericana de Informatica, Buenos Aires, Argentina, August 1993, pages 257-266, first mentions early work in the field of decompiling object code into high-level language source code, in which the authors proposed their own procedure for this decompiling. In this method, a high-level language program code is generated via a plurality of intermediate steps that comprises optimally far-reaching high-level language constructs. Correspondingly, memory accesses of the original object code are converted into global and local variables of the high-language program code.
SUMMARY OF THE INVENTION
The invention, has the object of offering a method for converting of an object code into an equivalent program code that is flexible and efficient in view of the actual conversion of the code and in view of running the converted program code. In particular, the method should be suitable for efficient conversion of object code for user programs, i.e., of non-privileged object code.
This object is inventively achieved by a method for converting an object code for a source hardware into an equivalent program code that may be run on a target hardware and that comprises a program part and a data part. This method comprises the steps of analyzing, by a code transformer, each command of the object code for the source hardware, generating a corresponding entry from the command of the object code in the program part of the program code, accepting a part of the object code for the source hardware into the data part of the program code, in which the part of the object code for the source hardware accepted into the data part of the program code corresponds to a data part of the object code for the source hardware, generating a source code of a high-level programming language as a program part of the program code, and partially retaining access into the data structures of the object code for the source hardware that are contained in the data part of the program code in the source code.
The invention proceeds from the basic idea of converting the object code into an equivalent program code that operates on the data structures of the original code. This avoids the difficult or even unsolvable transformation of data structures of the object code into data structures of another programming language.
The invention makes it possible to transport user programs that, for example, are present in the object code for the system 390 onto other hardware platforms, for example, onto RISC hardware, in a simple way. Since at least one data part of the original object code is accepted into the generated program code, this data part is directly available for memory accesses onto the data structures of the original object code. On the other hand, it is at most the complete object code that is accepted into the program code. An administration of the complete address space of the source hardware—which can be several times greater than the object code and must be monitored for memory accesses having paging effects—is therefore not required.
In the vocabulary employed here, “program code” does not necessarily mean a single data file. On the contrary, the program code can be formed of several parts from which a runnable program is then generated by compiler

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Method for converting an object code into a program code does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Method for converting an object code into a program code, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Method for converting an object code into a program code will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2458447

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.