Intermediate-Representation Code Migration Across Instruction Sets
Find Innovative SolutionsGenerate 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
Engineering 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
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
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
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
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
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
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
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
Data Source
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.


