Intermediate-Representation Code Migration Across Instruction Sets

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing software for platforms like ARMv8 is challenging due to differences in instruction sets, leading to low software development efficiency and difficulty in constructing a comprehensive ecosystem.

Innovation Solution

A method involving decompiling and compiling software code from a source platform like x86 to a target platform like ARMv8, using intermediate representations (IRs) to facilitate migration without direct developer interaction, allowing optimization and secondary development on the target platform.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If developers write software code according to a code rule of a platform, then the software can be applied to the platform, but the software development efficiency is low

Engineering Contradiction:
Improvesoftware platform adaptabilityVSAvoidsoftware development efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent introduces an intermediate representation (IR) as a mediator between source platform code and target platform code. The IR serves as a universal intermediate format that can be generated from various source platforms and translated to different target platforms, enabling efficient cross-platform software development without requiring developers to write code for each specific platform

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a universal code migration system that can handle multiple source platforms and target platforms through a single intermediate representation framework. The system provides unified tools and processes that work across different instruction set architectures, making the development process independent of specific platform details

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Adaptability or versatility

If software code is migrated from source platform to target platform through decompilation and compilation, then code can be transferred between platforms, but the process complexity increases

Engineering Contradiction:
Improveplatform migration capabilityVSAvoidcode processing system complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the code migration process into distinct phases: source platform code generation, decompilation to intermediate representation, optional optimization, and compilation to target platform code. This segmentation allows each phase to be independently optimized and managed, reducing overall system complexity while maintaining migration capability

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The intermediate representation acts as a simplifying intermediary that standardizes the code format between source and target platforms. By converting all platform-specific code to this unified IR format first, the system reduces the complexity of direct platform-to-platform translation

Inventive Principle:
Principle #24Intermediary (Mediator)

3Object-affected harmful factors

If the code migration process separates developer from software code, then code exposure to developer is reduced, but the development process becomes more automated

Engineering Contradiction:
Improvecode exposure riskVSAvoidcode migration automation level
Core Design Contradiction:
Object-affected harmful factorsVSExtent of automation

Solution Approach 1:

The system enables self-service code migration where the automated decompilation and compilation process handles the technical translation work. Developers can upload source code and receive translated code without needing to understand the underlying platform differences or manual translation processes, reducing both code exposure and manual intervention requirements

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12468514B2Code processing method and apparatus, and storage medium
Publication Date: 2025.11.11 HUAWEI TECH CO LTD
  • US12468514B2 patent drawing
  • US12468514B2 patent drawing
  • US12468514B2 patent drawing

AI summary

This application discloses code processing methods, apparatuses, and storage media. An example method includes: obtaining a first code in low-level language and applicable to a source platform; decompiling the obtained first code to obtain an intermediate representation (IR); and then compiling the IR into a second code in low-level language and applicable to a first target platform, where the source platform and the target platform have different instruction sets.