Dynamic Binary Translator Native Code Binding Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Program code conversion methods incur overheads and lose execution control when using native libraries, making it difficult to optimize and manage dependent sub-libraries and maintaining accurate emulated states.

Innovation Solution

A method that executes program code by translating subject code into target code and utilizing native code executable by the target processor, allowing for dynamic binary translation and efficient execution with native bound code, while maintaining control flow and optimization opportunities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If native libraries are used in program code conversion, then performance is improved by avoiding translation overhead, but execution control is removed from the subject program and passes to the native code, making it difficult to control subsequent execution and manage dependent sub-libraries

Engineering Contradiction:
Improveexecution performanceVSAvoidexecution control
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The patent introduces a translator as an intermediary component that wraps native library calls. The translator maintains the subject program's execution control by intercepting calls to native libraries and managing the translation process. This mediator allows the subject program to retain control while still benefiting from native code execution, resolving the contradiction between performance improvement and execution control.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent segments the code execution into two distinct parts: translated subject code that maintains execution control and native library code that provides optimized functionality. The translator manages the boundaries between these segments, allowing controlled interaction where the subject program calls native libraries through defined interfaces, thus preserving execution control while achieving performance benefits.

Inventive Principle:
Principle #1Segmentation

2Productivity

If native libraries are used in program code conversion, then performance is improved, but opportunities for making optimisations may be lost

Engineering Contradiction:
Improveexecution performanceVSAvoidoptimization opportunity
Core Design Contradiction:
ProductivityVSEase of manufacture

Solution Approach 1:

The translator implements feedback mechanisms that monitor and analyze the execution of native libraries. This feedback allows the translator to identify optimization opportunities in the translated code by observing how native libraries are called and how data flows between them. The translator can then generate optimized translations that preserve the performance benefits of native execution while capturing optimization opportunities that would otherwise be lost.

Inventive Principle:
Principle #23Feedback

3Productivity

If native libraries are used in program code conversion, then performance is improved, but an emulated subject state may become inaccurate

Engineering Contradiction:
Improveexecution performanceVSAvoidemulated state accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent replaces purely mechanical emulation of subject code execution with a hybrid approach that uses native code execution supplemented by translator-mediated calls. This substitution allows the system to leverage the accuracy and performance of native execution while maintaining the ability to emulate subject program behavior through controlled translation of library interfaces, thus preserving emulated state accuracy.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS7793272B2Method and apparatus for combined execution of native code and target code during program code conversion
Publication Date: 2010.09.07 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US7793272B2 patent drawing
  • US7793272B2 patent drawing
  • US7793272B2 patent drawing

AI summary

In program code conversion, particularly dynamic binary translation, subject code 17 is translated into target code 21 through a translator 19 for execution on a target processor 13. Selected portions of subject code, such as library functions SFuncA 172, are replaced by instead executing a portion of native code such as a native function NFuncA 282. The native function is native to the target processor 13. The method further includes executing a subject code portion such as a subject function SFuncB 173 in place of a native code portion such library function NFuncB 283. This reverse binding technique substitutes subject code for selected portions of the native code, particularly native library functions in order to keep control within the translator 19. This helps to maintain an accurate subject state in the translator 19, amongst other advantages.