Ahead-of-Time Compiler Static and Runtime Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional Java virtual machines perform redundant verification checks at runtime, which can be wasteful in terms of time and space, and may allow untrusted code to cause security issues when executed in different environments, affecting execution speed and security.

Innovation Solution

The solution involves splitting the verification process into two steps: static verification at compile time and dynamic verification at runtime, using a static verifier to perform checks and create assertions, which are then executed in the runtime environment by a runtime verifier, reducing redundant checks and improving efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all verification checks are performed at runtime in a traditional Java virtual machine, then type safety is ensured, but execution speed deteriorates due to redundant verification

Engineering Contradiction:
Improvetype safetyVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent performs verification checks in advance during the compilation phase rather than at runtime. The ahead-of-time compiler verifies bytecode correctness, performs type checking, and generates verified native code before execution. This preliminary verification eliminates redundant runtime checks while maintaining type safety, directly resolving the contradiction between reliability and speed.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If bytecode verification is performed at runtime to maintain type safety, then security is improved, but time consumption increases due to redundant checks

Engineering Contradiction:
ImprovesecurityVSAvoidverification time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent moves the security-critical verification process to the compilation phase. The ahead-of-time compiler performs comprehensive bytecode verification, including type safety checks and security validations, before generating native code. This preliminary security verification eliminates the need for time-consuming runtime verification while maintaining security guarantees.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the verification process into two distinct phases: compile-time verification by the ahead-of-time compiler and runtime execution of verified native code. This segmentation separates the time-consuming verification operations from the execution path, ensuring security is maintained while minimizing runtime overhead.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If program code is compiled to machine-independent bytecode for portability, then adaptability is improved, but verification complexity increases at runtime

Engineering Contradiction:
ImproveportabilityVSAvoidverification complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent performs the complex verification process during the ahead-of-time compilation phase, generating verified native code for specific target platforms. This approach maintains portability by allowing compilation to different native architectures while eliminating runtime verification complexity, as the verification work is completed in advance during compilation.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7941792B2System and method for compiling program code ahead of time
Publication Date: 2011.05.10 RED HAT INC
  • US7941792B2 patent drawing
  • US7941792B2 patent drawing
  • US7941792B2 patent drawing

AI summary

A system is disclosed for compiling program code. The system provides a compiler that includes a static verifier and a runtime verifier. The static verifier performs static checks on the program code and produces object code corresponding to the program code. The runtime verifier receives the object code and performs dynamic checks on the object code in a platform dependent environment. The resulting object code can subsequently be executed.