Control Program Variable Retention for Safe Memory Cleanup
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
When editing or changing control programs, unused variables in the source code can occupy memory regions, potentially affecting the control target during execution, as the memory corresponding to deleted variables remains secured, leading to inefficient memory usage and risk of affecting the control target.
Innovation Solution
A development support device that includes a storage unit, extraction unit, acquisition unit, and determination unit to identify and preserve variables that are likely to be used by the control target during execution, allowing only unnecessary variables to be deleted from the definition list, thereby minimizing the impact on the control target.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of energy
If variables are deleted from the definition list to improve memory usage efficiency, then memory usage efficiency is improved, but the control target may be affected due to deleted necessary variables
Solution Approach 1:
The system performs preliminary analysis before variable deletion by examining both source code usage and execution-time network communication patterns. The determination unit proactively identifies variables that will be accessed during execution through network communication, even if not used in source code, and prevents their deletion. This preliminary action ensures that memory optimization does not compromise control target stability.
Solution Approach 2:
The invention introduces an intermediary determination unit that acts as a mediator between the variable deletion process and the control target. This unit analyzes multiple information sources (source code, network communication settings, execution patterns) to make informed decisions about variable retention, preventing direct harmful effects on the control target while still achieving memory optimization where safe.
2Quantity of substance
If all unused variables are deleted from the definition list, then memory region is optimized, but variables necessary for execution-time network communication may be removed
Solution Approach 1:
The system performs preliminary analysis before variable deletion by examining both source code usage and execution-time network communication patterns. The determination unit proactively identifies variables that will be accessed during execution through network communication, even if not used in source code, and prevents their deletion. This preliminary action ensures that memory optimization does not compromise control target stability.
Solution Approach 2:
The invention makes the variable retention decision-making process universal by considering multiple functions and usage patterns. Variables are evaluated not only for source code usage but also for execution-time network communication requirements. This multi-functional assessment ensures that variables serving any purpose (source code logic or network communication) are preserved, maintaining both programming logic and communication capabilities.
3Reliability
If variables remaining on the definition list after source code deletion are kept, then control target is protected, but memory region is wasted
Solution Approach 1:
The system performs preliminary analysis before variable deletion by examining both source code usage and execution-time network communication patterns. The determination unit proactively identifies variables that will be accessed during execution through network communication, even if not used in source code, and prevents their deletion. This preliminary action ensures that memory optimization does not compromise control target stability.
Solution Approach 2:
The invention changes the criteria parameter for variable retention from simple source code usage to a composite parameter that includes both source code usage and execution-time network communication requirements. This parameter change enables more precise variable management, retaining only those variables necessary for either source code logic or network communication, thereby optimizing memory usage while maintaining reliability.
Data Source
AI summary
A development support device extracts first variables that are unused in a source code from variables in a variable definition list that declares variables used in a source code of a control program, which controls a control target, and acquires information for specifying a second variable having a possibility of being exchanged between the control target and a control device in an execution state of the control program. The development support device determines that a variable corresponding to the second variable out of the first variables is indelible from the variable definition list.


