MECHANISM FOR CROSS VALIDATING EMULATED STATES BETWEEN DIFFERENT EMULATION TECHNOLOGIES IN A DYNAMIC COMPILER
Patent №
US 6,415,436
Granted
2002-07-02
Filed 1998
Owner
HEWLETT-PACKARD COMPANY
Lab
—
AI components
3
ml · planning · hardware
Assignment
Recorded
Dataset
AIPD
2023_r1 edition
Application
09209324
The inventive mechanism compares system states resulting from emulation of the same block of source code by different emulation technologies within a dynamic compiler. A set of initial conditions, parameters of the system state S1, preceding any emulation is stored for later use. Then, the block of source code is emulated by an interpreter generating a system state S2, the parameters of which are contained partly in the system registers and partly in memory locations accessed by the interpreter. The status of the memory locations representing system state S2 are stored in a Write History Stack, while the register values representing system state S2 are saved to a reserved portion of memory. Next, the initial conditions, represented by the parameters of the system state S1, are restored to the appropriate registers and memory location values affected by the interpreter. Then, the same block of code is emulated employing dynamic translation leading to a third system state S3. The parameters of system states S2 and S3 are then compared. If the system states match completely, the mechanism concludes that both emulators operated correctly. If there is a mismatch in any parameter between the two system states, the mechanism concludes that one of the two emulators has a bug. The mechanism then re-emulates the block of code, logging all write operations to registers and memory locations, thereby producing a printed log of emulator activity suitable for analysis by a programmer. The source of the problem can then be readily and rapidly identified by the programmer. The mechanism avoids the time consuming and expensive task of enabling data logging during all emulation activity, by logging data manipulation only for blocks of code which were emulated incorrectly by one of the emulation technologies.
AI classification
Ownership
HEWLETT-PACKARD COMPANY
assignment · 97830025
Assignors
PATEL, AMIT
On an employer assignment, the assignors are typically the inventors.