Bytecode Parameter Encoding for VM Compiler Compatibility

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current blockchain and computing operations face challenges in correctly initiating, obtaining, or performing operations due to complexities in data structures, such as pointer type variables, and incompatibilities between virtual machines (VMs) and compilers, particularly with different word sizes, leading to erroneous parameter passing and system malfunctions.

Innovation Solution

A method involving bytecode compilation and execution, where input parameters are encoded and decoded using memory locations with pointers and data lengths, allowing correct passing and retrieval of parameters across VMs and compilers, even with complex data structures and different word sizes, ensuring smooth blockchain operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If pointer type variables are used to store addresses of other variables, then data structure flexibility is improved, but address shifts occur during compilation that become too strenuous to reverse with increased complexity

Engineering Contradiction:
Improvedata structure flexibilityVSAvoidaddress reversal complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary encoding function that acts as a mediator between the compiler and the virtual machine. This function encodes pointer addresses into a format that can be safely transmitted through bytecode, preventing direct address shifts from causing unreversible complexity. The intermediary encoding layer translates complex address relationships into a manageable format that maintains flexibility while avoiding the address reversal problem.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Quantity of substance

If VMs use 32-bit word size while compilers run at 64-bit, then VM resource consumption is reduced, but memory address assignment compatibility deteriorates

Engineering Contradiction:
ImproveVM memory capacityVSAvoidmemory address compatibility
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent applies parameter changes by modifying how addresses are represented and transmitted. Instead of using raw 64-bit addresses from the compiler, the system encodes these addresses into a format suitable for 32-bit VMs. This parameter transformation allows the same memory addressing functionality to work across different word sizes, maintaining compatibility while preserving the resource efficiency of 32-bit VMs.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If complex nested parameters with complex data structures are used, then functionality expressiveness is improved, but parameter passing and retrieval become erroneous

Engineering Contradiction:
Improvefunctionality expressivenessVSAvoidparameter passing accuracy
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent implements preliminary action by encoding parameters before they are passed to the virtual machine. The encoding function is executed in advance during compilation, transforming complex nested parameters into a safe bytecode format. This preliminary encoding prevents errors during parameter passing and retrieval, ensuring reliability while maintaining the ability to express complex functionality through the encoded parameter structures.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentEP3688580B1System and method for data processing
Publication Date: 2021.10.27 ADVANCED NEW TECHNOLOGIES CO LTD
  • EP3688580B1 patent drawingFigure 1
  • EP3688580B1 patent drawingFigure 2A
  • EP3688580B1 patent drawingFigure 2B

AI summary

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for data processing are provided. One of the methods includes: obtaining a bytecode compiled from source code comprising one or more input parameters, the source code including an encoding function to encode the one or more input parameters, save the encoded one or more input parameters in a memory segment, and provide a memory location of the memory segment; executing, according to the bytecode, the encoding function to encode the one or more input parameters to obtain the memory location of the memory segment storing the encoded one or more input parameters; and providing the memory location to a function for retrieving and decoding the encoded one or more input parameters to obtain the one or more input parameters.