Mechanism for cross validating emulated states between...

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

C717S138000, C717S134000, C703S026000, C703S023000, C703S027000

Reexamination Certificate

active

06415436

ABSTRACT:

TECHNICAL FIELD
The invention relates in general to detecting errors in program emulation and in particular to a mechanism for detecting such errors by comparing emulation results achieved via two independent emulation technologies. Discrepancies between the results point to errors in at least one of the two emulating mechanisms.
BACKGROUND
At least two run-time technologies are available for emulating legacy code. The first is interpretation which emulates one line of code at a time at run-time. At the end of each instruction, the interpreter updates the register mapping associated with the legacy architecture.
A second technology available for emulation is that of Dynamic Translation. Dynamic translation processes legacy code in blocks, where each block is a section of code which does not contain a branching instruction. Translation permits the emulator to examine more than one line of legacy code at a time, and to possibly combine a plurality of lines of code in producing new code so as to maximize the efficiency of the emulation.
The source representation includes the states being emulated such as the registers and the virtual memory, as well as the object code that manipulates them. Existing dynamic compilers use a combination of interpretation to emulate infrequently executed blocks; and dynamic translation to emulate frequently executed blocks. Every visited source block interpreted first and may be translated if it is considered important. A program behaves correctly only when both the interpretation and translation processes work properly.
In order to translate a block, the block must first be interpreted to acquire information on the frequency of execution of instructions within the block. Information gathered through this interpretation is accumulated into a profile. When a block of code has been interpreted a number of times corresponding to a pre-determined threshold, the block is translated and the run-time system subsequently bypasses interpretation and executes the translated code directly.
The interpreter and translator are separate entities, and can independently introduce bugs into program execution. Source code is always interpreted first, and then translated. Therefore, by the time a bug is observed in program execution it is difficult to determine whether it was introduced by the interpreter or the translator. Further, an erroneous result will not be detected until the result is used later on in the program. This gap between the generation of an erroneous result and its detection makes finding the source of the error difficult.
It is possible to enable error data logging while running emulators of different types, and thereby generate printed output listing write operations to register and memory locations. This information can be used by programmers to track down the source of bugs detected in an entire program. However, producing this output for an entire program is expensive and time consuming.
Therefore, it is a problem in the art that there are two independent possible sources for a program error when using a dynamic compiler employing a combination of interpretation and translation.
It is a further problem in the art that an error in a program may be noticed at a point in time, and in the flow of program execution far removed from the point where the error was introduced, making debugging very difficult.
It is a still further problem in the art that enabling register and memory access data logging for an entire program is expensive and time consuming.
SUMMARY OF THE INVENTION
These and other objects, features and technical advantages are achieved by a system and method which emulates the same block of code twice using the two available technologies, interpretation and translation, and comparing the emulation results for that block. Where the emulations match, the mechanism concludes that both emulators have performed correctly. Where the emulations differ, the mechanism presumes that one emulator produced an error in processing the block. Since the code is processed one block at a time, any error will be detected at a block boundary thereby avoiding the problem in the prior art where the error would be detected only when the erroneous result is used.
Where a mismatch is found between the two emulations of basic block, a flag is set enabling error logging in both emulation systems (interpreter and dynamic translator), and the mechanism emulates the same block of code again employing both interpretation and dynamic translation. In this case, no comparison step is conducted. With the error logging flag set, both the interpreter and the dynamic translator generate information during the course of emulating the block relating to register and memory location access. Armed with this information, a programmer can then readily determine which emulator, and in fact, which line of code in the responsible emulator generated the erroneous register entry or memory location entry.
Therefore, it is a technical advantage of the invention that programming bugs are detected at the boundary of the basic block in which the error was caused.
It is a further advantage of the invention that detailed logging of emulation activity by both emulators pertaining to a block of code for which emulation results differed between two emulation systems will permit a programmer to determine which emulation technology is responsible for the error.
It is a still further advantage of the invention that detailed logging of emulation activity including register and memory location access need only be performed when emulation results using two different emulators for a block of code differ, since it is expensive and time consuming to always have error data logging enabled.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims.


REFERENCES:
patent: 4951195 (1990-08-01), Foggi, Jr. et al.
patent: 5167023 (1992-11-01), de Nicolas et al.
patent: 5678032 (1997-10-01), Woods et al.
patent: 5732210 (1998-03-01), Buzbee
patent: 5732235 (1998-03-01), Kakle et al.
patent: 5742802 (1998-04-01), Harler et al.
patent: 5790778 (1998-08-01), Bush et al.
patent: 5815720 (1998-09-01), Buzbee
patent: 5835773 (1998-11-01), Dunn
patent: 5838978 (1998-11-01), Buzbee
patent: 5848274 (1998-12-01), Hamby et al.
patent: 5854928 (1998-12-01), Buzbee
patent: 5857093 (1999-01-01), Bradford
patent: 5875318 (1999-02-01), Liangford
patent: 5933622 (1999-08-01), Buzbee et al.
patent: 5983012 (1999-11-01), Bianchi et al.
patent: 6009261 (1999-12-01), Sealzi et al.
patent: 6021275 (2000-02-01), Horwat
patent: 6021469 (2000-02-01), Trembly et al.
patent: 6028999 (2000-02-01), Pazel
patent: 6031988 (2000-02-01), Nahashima
patent: 6125439 (2000-09-01), Trembly et al.
patent: 6128679 (2000-10-01), Beale et al.
“A Complier Approach to Scalable Concurrent Program Design”, Foster et al., ACM 1994.*
“Emulation of the occam Parallel programming language”, Doherty et al., IEEE 1997.

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

Mechanism for cross validating emulated states between... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Mechanism for cross validating emulated states between..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Mechanism for cross validating emulated states between... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2822403

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