Bytecode Format Conversion With Local Variable Remapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing software optimized for resource-constrained environments faces challenges in converting between different computing architectures, particularly in preserving functionality and maintaining compatibility when transitioning from an optimized format to a target format, such as Java Card Virtual Machine (JCVM) to Java Virtual Machine (JVM), due to the use of numbered tokens and symbolic references.

Innovation Solution

A system is developed to convert datasets from an optimized format to a target format by determining original names for elements, translating optimized opcodes to target opcodes, and mapping references to local variables, utilizing a hierarchy of reference types to identify and preserve method occurrences, and simulating opcode execution to adjust local variable configurations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If software is optimized for a resource-constrained environment using numbered tokens and symbolic references, then the software size and complexity are reduced, but the compatibility and functionality are lost when converting to a different computing architecture

Engineering Contradiction:
Improvesoftware complexityVSAvoidarchitecture compatibility
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The converter performs preliminary actions by analyzing the optimized dataset structure, identifying all numbered tokens and symbolic references, and preparing mapping relationships before the actual conversion process. This includes determining original names for elements and establishing correspondence between optimized and target local variables in advance, ensuring compatibility is preserved during architecture transition

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The converter acts as an intermediary system between the optimized format (e.g., JCVM) and the target format (e.g., JVM). It translates numbered tokens to original names, maps symbolic references to appropriate target elements, and adjusts local variable configurations, thereby enabling compatibility between different computing architectures without requiring direct modification of the optimized software

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If numbered tokens are used to represent elements in the optimized format, then data size is reduced, but information loss occurs during conversion to target format

Engineering Contradiction:
Improvedata sizeVSAvoidelement identity information
Core Design Contradiction:
Quantity of substanceVSLoss of information

Solution Approach 1:

The converter performs preliminary analysis to determine original names for all numbered tokens in the optimized dataset before conversion. By storing and utilizing these original names during the translation process, the system recovers element identity information that would otherwise be lost, ensuring that converted datasets maintain full semantic meaning while benefiting from the compact representation

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The converter creates a mapping copy of the numbered tokens to their original names and corresponding target format elements. This copying mechanism preserves the compact structure of the optimized format while recovering the full information content needed for the target format, effectively eliminating information loss during conversion

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If optimized opcodes are translated to target opcodes, then compatibility with target architecture is achieved, but functionality may be altered due to differences in local variable configurations

Engineering Contradiction:
Improvetarget architecture compatibilityVSAvoidfunctionality preservation
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The converter performs preliminary simulation of opcode execution to determine the exact configuration of local variables required by each target opcode. By analyzing the expected variable states before actual conversion, the system can accurately map optimized local variables to target local variables, ensuring that functionality is preserved while achieving target architecture compatibility

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The converter uses feedback from simulated opcode execution to adjust the mapping between optimized and target local variables. By monitoring how target opcodes configure local variables during simulation, the system refines its translation strategy to maintain functional equivalence, ensuring that the converted dataset behaves identically to the original optimized dataset

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250348295A1Converting Data From An Optimized Format To A Target Format
Publication Date: 2025.11.13 ORACLE INT CORP
  • US20250348295A1 patent drawing
  • US20250348295A1 patent drawing
  • US20250348295A1 patent drawing

AI summary

Techniques are disclosed for converting a dataset from an optimized format to a target format. The system determines a hierarchy of types that are included within the dataset. Based on the hierarchy of types, the system identifies occurrences of the same method in the dataset. The same name is assigned to occurrences of the same method. Optimized opcodes included in the bytecode instructions of methods are translated into target opcodes. For each method, the system simulates executing the target opcodes that replace the optimized opcodes in the method to determine if the target opcodes affect the configuration of local variables differently than the optimized opcodes. Based on simulating the execution of the target opcodes, the system alters local variable references in the method to reflect the differing configurations of local variables that result from replacing the optimized opcodes with the target opcodes.