Shared Variable Naming Control to Prevent Data Overwriting
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing technologies fail to prevent conflicts between variable names and unintentional overwriting of data when multiple programs share variables.
Innovation Solution
A control device with a program management part, data storage part, and shared variable symbol table that generates a shared variable name by combining an identifier and variable name, and associates it with the address in the symbol table to prevent conflicts.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If multiple user programs share variables using common variable names, then data exchange between programs is simplified, but conflicts between variable names and unintentional overwriting of data occur
Solution Approach 1:
The patent segments the variable identification into two distinct parts: a program identifier (indicating which program owns the variable) and a variable name (indicating the specific variable). This segmentation allows the system to maintain simple variable names for ease of use while preventing conflicts through program-specific identification. The shared variable symbol table stores both components together to form a unique identifier that prevents unintentional overwriting.
2Device complexity
If a shared variable symbol table stores only variable names as keys, then access is simple, but variable name conflicts cannot be detected or prevented
Solution Approach 1:
The patent adds another dimension to the symbol table key by incorporating the program identifier as a separate component. Instead of using only the variable name (one-dimensional), the system uses a combination of program identifier and variable name (two-dimensional). This dimensional expansion allows the system to maintain simple variable names while preventing conflicts through the additional identification layer.
Data Source
AI summary
The objective of the present invention is to prevent a conflict between variable names and consequently the unintentional overwriting of data when a plurality of programs that define a shared variable exist. A control device (1) is equipped with a program management part (11), a data storage part (13a), and a shared variable symbol table (13b). The program management part (11) acquires an identifier for a first user program, generates a shared variable name that includes the identifier and a variable name of a shared variable defined in the first user program, associates the shared variable name and an address of the shared variable with each other, and records these in the shared variable symbol table (13b).


