Language variable detection method and device
A variable and language technology, applied in the field of language variable detection, can solve problems such as low variable detection efficiency, and achieve the effect of solving low variable detection efficiency and improving efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0031] According to an embodiment of the present invention, an embodiment of a language variable detection method is provided.
[0032] Optionally, in this embodiment, the variable detection method of the above language can be applied as figure 1 In the hardware environment constituted by the server 102 and the terminal 104 as shown. figure 1 is a schematic diagram of the hardware environment of the language variable detection method according to the embodiment of the present invention. Such as figure 1 As shown, the server 102 is connected to the terminal 104 through a network. The above-mentioned network includes but not limited to: a wide area network, a metropolitan area network or a local area network. The terminal 104 is not limited to a PC, a mobile phone, a tablet computer, and the like. The language variable detection method in the embodiment of the present invention may be executed by the server 102 , may also be executed by the terminal 104 , and may also be execu...
Embodiment 2
[0140] The technical solutions of the present invention will be described below in conjunction with preferred embodiments.
[0141] In this embodiment, because lua supports hot loading, lua is generally used as the scripting language in the background of the game. A typical error that often occurs during the use of lua is the uninitialized use of lua variables, because the uninitialized use of variables will only find this error when a crash occurs at runtime, and for games that use a lot of lua code, by running It is obviously very time-consuming to correct errors, which reduces the efficiency of variable detection and affects the need to seek other solutions.
[0142] This embodiment detects uninitialized use of variables in lua code through static analysis, reports uninitialized variables, and can give developers a warning, thereby repairing all such errors at one time, and greatly saving development time. The static analysis detection method traverses the abstract syntax ...
Embodiment 3
[0180] According to an embodiment of the present invention, a language variable detection device for implementing the above language variable detection method is also provided. Figure 11 is a schematic diagram of a language variable detection device according to an embodiment of the present invention. Such as Figure 11 As shown, the device may include: a first acquisition unit 10 , a second acquisition unit 20 , a slice analysis unit 30 and a first determination unit 40 .
[0181] The first obtaining unit 10 is configured to obtain target variables in the target source code of the scripting language.
[0182] The second acquiring unit 20 is configured to acquire the dependency relationship of the target variable, wherein the dependency relationship is used to represent the relationship between the defined variable and the used variable in the target variable.
[0183] The slice analysis unit 30 is configured to perform slice analysis on the target sentence to which the tar...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


