Native Code Generation from Intermediate Language via Library Binding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing mobile device applications that use just-in-time compilation face limitations such as increased runtime due to compilation time and potentially suboptimal compilation decisions, which affect performance and efficiency.
Innovation Solution
Generating native code from intermediate language code on the device by binding machine-dependent intermediate language code with local libraries, allowing for offline compilation and efficient execution, as well as seamless updates by re-binding with updated libraries and runtime engines.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If just-in-time compilation is used to run applications on mobile devices, then applications can be executed with flexible platform support, but additional compilation time is required during runtime and compilation decisions may be suboptimal
Solution Approach 1:
The patent applies preliminary action by pre-compiling application code into machine-dependent intermediate language (MDIL) format before the application is run on the mobile device. This MDIL code is generated in advance from the original application code and stored on the device, eliminating the need for compilation during runtime. When the application needs to be updated or the runtime engine is updated, only the affected portions need to be recompiled, rather than compiling the entire application from scratch during execution.
2Speed
If native code generation from intermediate language is implemented, then application execution speed is improved, but device complexity increases due to the binding process
Solution Approach 1:
The patent introduces an intermediary component called a binder that automatically performs the binding of MDIL code with native libraries on the mobile device. This binder is a specialized tool that handles the complex tasks of resolving references, linking symbols, and integrating the intermediate language code with the device's native libraries. By using this intermediary binder, the system achieves native code generation with execution speed comparable to fully native applications, while the complexity of the binding process is encapsulated in the automated binder tool rather than requiring manual intervention.
3Reliability
If entire applications are recompiled for updates, then updated code can be deployed, but update time and computational resources are significantly consumed
Solution Approach 1:
The patent applies segmentation by dividing the application into modular components with distinct MDIL files that can be independently compiled and updated. Instead of recompiling the entire application when an update is needed, only the specific MDIL files that contain changed code are recompiled. The binder then integrates these updated MDIL files with the existing native libraries and other unchanged portions of the application. This modular approach significantly reduces update time and computational resource consumption while ensuring that the updated code is properly integrated into the application.
Data Source
AI summary
Disclosed herein are representative embodiments of tools and techniques for installing, executing, and/or updating managed applications through generation of native code from code in an intermediate language. According to one exemplary technique, a computing device receives machine dependent intermediate language code (MDIL code) generated by an online provider for an application. Additionally, the computing device installs the application on the computing device by generating a native image for the application, which includes binding a portion of the MDIL code with one or more libraries on the computing device. Also, the native image is stored on the computing device for use in loading the application for execution.


