Automatic ECMAScript Engine Configuration for Memory-Constrained MCUs
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Microcontroller units (MCUs) face memory constraints due to limited resources, making it challenging to fit a full ECMAScript engine within the available memory, and manual removal of unused features is error-prone and time-consuming.
Innovation Solution
An automatic method analyzes application code to determine unused features of the ECMAScript engine and configures the build process to omit them, resulting in a customized engine that only includes required functionality, reducing memory usage without affecting the engine's functionality.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a complete ECMAScript engine is deployed to provide full functionality, then the engine can execute any script conforming to the standard, but the memory footprint becomes too large to fit in limited MCU memory (256KB-1MB)
Solution Approach 1:
The patent extracts and removes unused ECMAScript language features from the complete engine based on static analysis of the application code. The build system automatically identifies which language constructs, standard library functions, and runtime features are not referenced by the application, then compiles a customized engine that excludes these features, significantly reducing memory footprint while maintaining full support for the features that are actually used.
Solution Approach 2:
The patent segments the ECMAScript engine functionality into individual language features and standard library components. Rather than deploying a monolithic complete engine, the build system analyzes the application code to determine which segments are needed, then assembles a customized engine containing only those segments. This segmentation allows precise control over memory usage while maintaining adaptability for the specific application's needs.
2Quantity of substance
If manual removal of unused ECMAScript features is performed to reduce memory size, then the engine footprint decreases, but the process becomes error-prone and time-consuming
Solution Approach 1:
The patent implements a self-service build system that automatically performs the entire process of identifying unused features, configuring the engine build, and compiling the customized engine. The system statically analyzes the application code to determine feature usage, generates appropriate build configuration files (such as CMakeLists.txt or Makefile), and executes the compilation process without requiring manual developer intervention. This automation eliminates the time-consuming and error-prone manual process while achieving the same memory reduction goals.
3Quantity of substance
If manual feature removal is performed to match application needs, then memory usage is reduced, but functionality may be unintentionally removed causing runtime errors
Solution Approach 1:
The patent performs preliminary static analysis of the application code before engine compilation to identify all language features, standard library functions, and runtime capabilities that are actually used by the application. This advance analysis creates an accurate map of required functionality, ensuring that the customized engine retains all necessary features. By performing this analysis beforehand, the system prevents unintentional removal of required functionality while still eliminating unused features to reduce memory footprint.
4Adaptability or versatility
If all ECMAScript language features are retained to ensure standard conformance, then the engine can handle any script, but the memory consumption exceeds available MCU resources
Solution Approach 1:
The patent applies local quality by making the ECMAScript engine's feature set specific to each application's needs rather than uniformly complete for all applications. The build system analyzes each application's code to determine which language features, standard library functions, and runtime capabilities are locally required, then configures the engine to include only those features. This results in application-specific engine variants that have high adaptability for their intended purpose while consuming minimal memory.
Data Source
AI summary
A computing device and automatic method for reducing memory usage in a device having an execution environment, such as one using an interpretive scripting engine. Application code is analyzed to determine unused features. Based upon this analysis, a build process is configured to omit the unused features. Then, the execution environment is built for the application code that excludes features not used by the application code. The application code and the execution environment can then be loaded into a deployment device for execution of the application code by the execution environment.


