Proxy Compiler for Foreign Architecture Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Compilers require knowledge of both the native and non-native architectures for cross-compilation, making it difficult to support new programming languages on legacy systems without writing new compilers, and limiting the flexible use of modern languages across different host platforms.

Innovation Solution

A proxy compiler is used within a native execution environment to create a native executable that is uniquely tied to a non-native image, allowing non-native instructions to be executed as if they are native, without direct compilation or translation in the native environment.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a compiler is used for cross-compilation to support new programming languages on legacy architectures, then language compatibility is improved, but device complexity increases due to requiring compilers with knowledge of both native and foreign architectures

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidcompiler complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The compilation process is segmented into two independent parts: a native compiler that compiles source code to a foreign intermediate representation (IR), and a foreign compiler that compiles the foreign IR to the target architecture. This segmentation eliminates the need for a single complex compiler to know both architectures, reducing overall system complexity while maintaining language compatibility.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A foreign intermediate representation (IR) is introduced as an intermediary between the native architecture and the target architecture. The native compiler outputs foreign IR, which then serves as input to the foreign compiler that generates target-specific code. This intermediary simplifies both compilers by removing the need for direct knowledge of the target architecture from the native compiler.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If a new compiler is written for each programming language on legacy architectures, then language support is improved, but manufacturing precision decreases due to the difficulty of maintaining multiple compilers

Engineering Contradiction:
Improvelanguage supportVSAvoidcompiler maintenance
Core Design Contradiction:
Adaptability or versatilityVSEase of manufacture

Solution Approach 1:

The foreign intermediate representation (IR) serves as a universal intermediate format that can represent multiple programming languages. Instead of writing separate compilers for each language, the system uses a single foreign compiler that processes foreign IR generated by different native compilers, significantly reducing maintenance burden while supporting multiple languages.

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

Solution Approach 2:

The approach copies the intermediate representation rather than copying entire compilers. By generating foreign IR from native compilers and then compiling that IR with a single foreign compiler, the system avoids the complexity of maintaining multiple complete compiler implementations, easing the manufacturing and maintenance process.

Inventive Principle:
Principle #26Copying

3Manufacturing precision

If cross-compilation is performed with full architecture knowledge in the compiler, then compilation accuracy is improved, but loss of time increases due to the complexity of compiler development and maintenance

Engineering Contradiction:
Improvecompilation accuracyVSAvoiddevelopment time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

Compilation accuracy is maintained by segmenting the compilation task: the native compiler ensures accurate translation to foreign IR using knowledge of the source language, while the foreign compiler ensures accurate translation to target architecture using knowledge of the target. This segmentation allows each compiler to be specialized and simpler, reducing development time while maintaining overall compilation accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The native compiler performs preliminary compilation to foreign IR, which captures the essential semantics of the source code in a language-agnostic format. This preliminary action allows the foreign compiler to focus solely on target-specific optimizations and code generation, reducing the time required for both compilation stages while maintaining accuracy.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11243751B1Proxy compilation for execution in a foreign architecture controlled by execution within a native architecture
Publication Date: 2022.02.08 UNISYS CORP
  • US11243751B1 patent drawing
  • US11243751B1 patent drawing
  • US11243751B1 patent drawing

AI summary

A proxy compiler may be used within a native execution environment to enable execution of non-native instructions from a non-native execution environment as if being performed within the native execution environment. In particular, the proxy compiler coordinates creation of a native executable that is uniquely tied to a particular non-native image at the creation time of the non-native image. This allows a trusted relationship between the native executable and the non-native image, while avoiding a requirement of compilation/translation of the non-native instructions for execution directly within the native execution environment.