Runtime Dynamic Code Compilation via Evaluation Function

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional compiled languages lack the ability to convert programming statements into an executable form at runtime, limiting their dynamic loading capabilities compared to interpreted languages.

Innovation Solution

Incorporating an evaluation function that compiles and loads uncompiled source code into memory during runtime, allowing for dynamic loading of new instructions as machine code, byte code, or p-code, enabling execution of uncompiled code within compiled processes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If conventional compiled languages are used, then execution speed and efficiency are improved, but the ability to dynamically load and execute new code at runtime is lost

Engineering Contradiction:
Improveexecution speedVSAvoiddynamic code loading capability
Core Design Contradiction:
SpeedVSAdaptability or versatility

Solution Approach 1:

The patent merges the characteristics of compiled languages (execution speed) and interpreted languages (dynamic code loading) by integrating an evaluation function into the compiled language environment. This evaluation function enables the system to load, compile, and execute new code at runtime while maintaining the performance benefits of compiled code execution.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces dynamic code loading and execution capabilities into a traditionally static compiled language system. The evaluation function allows the system to adapt and load new code modules during runtime, transforming the rigid compiled execution model into a more flexible dynamic system that can respond to changing requirements.

Inventive Principle:
Principle #15Dynamics

2Adaptability or versatility

If interpreted languages are used, then dynamic loading and execution of code at runtime is improved, but execution speed and efficiency deteriorate

Engineering Contradiction:
Improvedynamic code loading capabilityVSAvoidexecution speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent applies preliminary action by pre-compiling code modules before execution. When code is loaded through the evaluation function, it is compiled in advance into an intermediate form that can be efficiently executed, rather than being interpreted line-by-line during runtime. This pre-compilation step ensures high execution speed while maintaining dynamic loading capabilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediate code representation as a mediator between source code and machine code. The evaluation function compiles new code into this intermediate form, which is then executed by the system. This intermediate representation allows for efficient execution similar to compiled languages while enabling the flexibility of dynamic code generation and loading.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If code is compiled once beforehand, then execution efficiency is improved, but the ability to add new functionality without recompilation is lost

Engineering Contradiction:
Improveexecution efficiencyVSAvoidruntime functionality extension
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the codebase into modular units that can be independently compiled and loaded. The evaluation function enables individual code modules to be compiled, loaded, and executed separately without requiring recompilation of the entire system. This segmentation allows new functionality to be added by loading separate code modules at runtime.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameter of code compilation from a static one-time process to a dynamic multi-stage process. Code can be compiled into intermediate form and stored, then loaded and executed at different times as needed. The evaluation function enables this flexible compilation and loading process, allowing the system to maintain high execution efficiency while adapting to changing functionality requirements.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9134973B2Dynamic compiling and loading at runtime
Publication Date: 2015.09.15 RED HAT INC
  • US9134973B2 patent drawing
  • US9134973B2 patent drawing
  • US9134973B2 patent drawing

AI summary

A compiler is loaded by a computing device using an evaluation function that is included in a program in a compiled form. The evaluation function causes the compiler to compile source code for the program, wherein the source code includes new instructions that are uncompiled, and wherein compiling the source code generates compiled code that includes the new instructions. The evaluation function loads the compiled code into memory, retrieves the new instructions, and executes the new instructions. The evaluation function may perform these operations during runtime of the program that includes the evaluation function.