Intermediate Representation Memory Management via Execution Tracking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Intermediate representations in programs can grow indefinitely, leading to memory shortages and decreased program execution speed due to the inability to consider future operations, making optimization techniques ineffective.
Innovation Solution
A method that extracts data and operation information from a program, generates an intermediate representation, stores the corresponding relationship, and deletes unused nodes and edges based on execution information to manage memory efficiently and maintain execution speed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If intermediate representation is continuously added with new data and operations, then the program can be executed with optimization techniques, but the intermediate representation grows indefinitely causing memory shortage
Solution Approach 1:
The patent applies the discarding and recovering principle by systematically identifying and removing executed operations and their associated data from the intermediate representation. The system tracks execution status of each operation and deletes completed operations along with their input and output data, thereby recovering memory space while preserving the ability to execute remaining operations.
Solution Approach 2:
The patent implements dynamics by making the intermediate representation size variable rather than static. The system dynamically adjusts the intermediate representation by adding new operations as they are created and removing executed operations, allowing the structure to adapt its size based on actual execution progress and memory availability.
2Adaptability or versatility
If the size of intermediate representation is large, then more operations can be stored for optimization, but program execution speed decreases due to large search space
Solution Approach 1:
The patent resolves this contradiction by discarding executed operations from the intermediate representation after they complete execution. This reduces the search space for subsequent operations while maintaining the capability to store and execute new operations that arise during program execution, thus balancing versatility with execution speed.
3Ease of operation
If intermediate representation is executed without considering future operations, then simple sequential execution is possible, but optimization techniques cannot be applied
Solution Approach 1:
The patent applies preliminary action by constructing the complete intermediate representation containing all operations before execution begins. This allows the system to analyze the entire operation sequence in advance, identify optimization opportunities, and plan execution strategies while maintaining the simplicity of sequential execution during actual runtime.
Data Source
AI summary
A method for managing an intermediate representation from a program is executed by one or more processors, and includes extracting, from the program, information on data for input and output and information on operation, generating an intermediate representation from the program using the extracted information on data and the extracted information on operation, storing, in a database, a corresponding relationship between the program and the intermediate representation, storing execution information on operation of the intermediate representation, and deleting at least a part of the intermediate representation based on the execution information.


