Partial Evaluation of Single Execution Methods in Native Image Build
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing software systems incur significant computational time and resource expenditure due to the execution of single execution methods, such as class initializers, each time instances are instantiated, which can be resource-intensive for applications with hundreds or thousands of instances.
Innovation Solution
Implementing partial evaluation of single execution methods by executing them at image build time and storing the results in an image heap within the native image, allowing for instantiation without re-executing these methods at runtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If single execution methods are executed at runtime for each instance instantiation, then proper initialization is ensured, but computational time and resource usage increase significantly
Solution Approach 1:
The patent executes single execution methods during image build time rather than at runtime. The build process pre-executes these methods and captures their effects in the native image, so that when instances are instantiated at runtime, the initialization work has already been performed. This eliminates the need to re-execute these methods for each instance, resolving the contradiction between ensuring proper initialization and reducing instantiation time.
2Reliability
If single execution methods are executed for each instance, then complete initialization is achieved, but computational resources are expended unnecessarily
Solution Approach 1:
The patent merges the execution of single execution methods from the runtime instance instantiation process into the build-time image creation process. By combining these operations, the system ensures that initialization work is performed once during building and reused across all instances, eliminating redundant computational resource expenditure while maintaining initialization completeness.
3Productivity
If single execution methods are pre-executed at build time, then runtime performance improves, but build time increases
Solution Approach 1:
The patent performs initialization work in advance during the build phase, accepting longer build times as a trade-off for significantly improved runtime performance. The build process pre-executes single execution methods and embeds their results in the native image, enabling fast instance instantiation at runtime without repeating the initialization work.
Solution Approach 2:
The patent changes the execution timing parameter of single execution methods from runtime to build time. This parameter change shifts when the computational work occurs, trading off build duration for improved runtime throughput and instantiation performance.
Data Source
AI summary
Systems and methods implement partial evaluation of single execution methods. A native image is built from a build image compiled from source code. At image build time, a single execution method of the build image is executed to update an image heap of the native image. The single execution method is executed with a single execution for a native instance. The image heap is stored to the native image built from the build image.


