Instruction-Set Simulator Source Restoration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing instruction-set simulators face challenges in restoring data types, analyzing program control flows with indirect jumps, and generating complete and readable source programs, leading to slow simulation speeds and limited program complexity handling.
Innovation Solution
The development of an instruction-set simulator that includes subroutine detection, branch instruction detection, and label annotation to restore hierarchical structures, allowing for effective code optimization and fast simulation execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If machine instructions are converted to source program and back to machine instructions, then simulation speed is improved, but the process becomes complex and time-consuming
Solution Approach 1:
The patent applies preliminary action by pre-converting machine instructions to source program format and storing them before simulation execution. This allows the simulation to directly execute pre-converted source code rather than interpreting machine instructions in real-time, thereby improving simulation speed while managing complexity through advance preparation
Solution Approach 2:
The patent uses source program as an intermediary between machine instructions and simulation execution. The conversion process introduces source code as a mediating layer that enables faster simulation by allowing direct compilation and execution of pre-converted code, rather than directly interpreting binary machine instructions
2Ease of operation
If reverse-compiler converts binary executable program to source program, then program readability is improved, but data type restoration and control flow analysis become difficult
Solution Approach 1:
The patent applies parameter changes by systematically restoring data type information during the conversion process. It changes the parameters of the converted source program by injecting type annotations and structure information that were lost in the binary format, thereby maintaining both readability and type information
Solution Approach 2:
The patent uses feedback mechanisms to analyze control flows with indirect jumps by examining the converted source program and tracing back the original execution paths. This feedback loop allows the system to recover control flow information that would otherwise be lost, improving both readability and analytical capability
3Speed
If static compile scheme converts entire binary executable program to host-CPU machine code, then simulation speed is improved, but handling of complex programs is limited
Solution Approach 1:
The patent applies segmentation by dividing the binary executable program into smaller functional units or modules during conversion to source program. This segmentation allows the system to handle complex programs more effectively by processing and converting manageable sections independently, then reassembling them into a complete source program that maintains both speed and complexity handling capability
Data Source
AI summary
Providing an instruction-set simulator and a method for generating such simulator that is capable or guaranteeing the full restoration of source program file from the binary executable program, in which the generated source program is easy to analyze, and the simulation speed is considerably fast.


