Single-source Base Compilation for Multiple Target Environments

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Programmers face the challenge of maintaining multiple versions of source code for different target environments, which is costly and error-prone, especially for software libraries that need to support older versions of programming platforms, and compilation processes lose type information and other valuable data, making debugging difficult.

Innovation Solution

A method for compiling program source code and associated libraries that translates source code features unavailable in the target environment into compatible versions, allowing a single source base to support multiple environments while preserving more information during compilation, using a compiler that identifies and modifies source code features to match the target environment's capabilities.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple versions of source code are maintained for different target environments, then compatibility with various environments is improved, but device complexity and maintenance cost increase

Engineering Contradiction:
Improvecompatibility with various environmentsVSAvoidmaintenance of multiple source code versions
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal source code base that can be compiled for multiple target environments through the use of language projection technology. The compiler system is designed to handle multiple programming language versions and target environments using a single source code repository, making the compilation system multi-functional rather than requiring separate codebases for each environment.

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

Solution Approach 2:

The patent introduces an intermediate representation layer between the source code and target machine code. This intermediate representation serves as a mediator that allows the same source code to be compiled for different target environments through language projection, eliminating the need to maintain multiple source code versions while achieving environment-specific optimization.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If source code is compiled directly to machine code, then compilation speed is improved, but type information and debugging data are lost

Engineering Contradiction:
Improvecompilation speedVSAvoidtype information and debugging data
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent performs language projection and intermediate representation generation as a preliminary step before final machine code compilation. This preliminary action preserves type information and debugging data in the intermediate representation, allowing for faster subsequent compilation while maintaining the ability to debug and analyze the code with full type information available.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10409559B2Single-source-base compilation for multiple target environments
Publication Date: 2019.09.10 ORACLE INT CORP
  • US10409559B2 patent drawing
  • US10409559B2 patent drawing
  • US10409559B2 patent drawing

AI summary

A method for software compilation is disclosed. A compiler may identify features of source code which are unavailable in a target environment for the compilation. The compiler may then translate the identified features into modified features in response to determining that projections for the identified features into the target environment are available. The compiler may then compile the source code dependent upon the modified features.