Compressed Interpreter Source Code Execution via Internal Codes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The repeated process of decompressing and performing lexical analysis on interpreter-type source code during each execution leads to time-consuming processing and resource wastage when the source code is stored in a compressed state.
Innovation Solution
An information processing apparatus that includes a lexical analysis unit, a compression unit, and an execution unit, which conducts lexical analysis, compresses the source code using a compression dictionary, and converts the compressed source code into internal code for efficient execution without decompression, utilizing a nodeless tree structure for entropy coding and internal-code conversion.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If the source code is stored in a compressed state, then the storage space is reduced, but the execution time increases due to repeated decompression and lexical analysis
Solution Approach 1:
The patent applies preliminary action by performing lexical analysis and internal code assignment on the compressed source code before execution. The information processing apparatus pre-processes the compressed source code to generate internal codes in advance, so that during actual execution, only the internal code interpretation is needed without repeated decompression and lexical analysis, thus resolving the time loss contradiction
Solution Approach 2:
The patent creates a copy of the internal code representation from the compressed source code. Instead of repeatedly decompressing and analyzing the original compressed source code, the system generates internal codes as a copy that can be directly executed, eliminating the need for repeated lexical analysis while maintaining the space-saving benefit of compressed storage
2Productivity
If the entire compressed data is decompressed and lexical analysis is conducted, then the execution is complete, but resources are wasted due to repeated processing
Solution Approach 1:
The system performs lexical analysis and internal code generation as a preliminary action before actual execution. The information processing apparatus processes the compressed source code once to generate internal codes, storing them for subsequent executions. This eliminates repeated resource-consuming lexical analysis while ensuring execution completion, directly addressing the resource waste problem
Solution Approach 2:
The patent discards the need for repeated lexical analysis by recovering the internal code representation. Instead of repeatedly processing the compressed source code through lexical analysis, the system recovers and reuses the generated internal codes for multiple executions, significantly reducing resource consumption while maintaining productivity
Data Source
Figure 1
Figure 2
Figure 3
AI summary
An information processing apparatus (100) conducts lexical analysis on an interpreter-type source code and compresses the source code, on which the lexical analysis has been conducted, by using an internal-code correspondence table (410) that associates an internal code and a compression code. When an execution command of an interpreter is received for the compressed source code, the information processing apparatus (100) converts the compressed source code into an internal code in accordance with an internal-code correspondence table (410) and sequentially executes processing in accordance with the converted internal code, whereby when an interpreter-type source code is stored in a compressed state, the execution speed of the interpreter for the source code is improved.