Inspection method and device for script programs

A technology of script program and inspection method, applied in the direction of software testing/debugging, etc., can solve the problems of variable and function errors, unchecked validity of variables and functions of Lua scripting language, and inability to determine whether the function exists, etc., so as to reduce errors. the effect of the possibility of

Active Publication Date: 2013-08-21
TENCENT TECH (SHENZHEN) CO LTD
View PDF2 Cites 19 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In the process of realizing the above-mentioned script program inspection, the inventor has found that there are at least the following problems in the prior art: the legality of the variables and functions of the Lua script language is never checked before operation, and only when it is used during operation an examination
[0006] 1. The variables of lua are global variables by default, and can be distributed in different files, or in different parts of the same file. If mandatory checking is performed, it will violate its flexible characteristics as a script. On the other hand, the v

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Inspection method and device for script programs
  • Inspection method and device for script programs
  • Inspection method and device for script programs

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0028] As a scripting programming language, Lua is currently widely used in large-scale game development because of its simplicity, efficiency, portability, and lightweight. However, in Lua development, Lua scripts cannot be well guaranteed due to the following reasons Correctness of variables and functions in code:

[0029] 1. Multiple people are required to help implement a script at the same time. For some scripts, such as the AI ​​(logic) of a boss (a character...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

An embodiment of the invention discloses an inspection method and device for script programs and relates to the technical field of software inspection. According to the inspection method and device, variables can be inspected before a script program set is executed, and probabilities of errors of script programs during operation are reduced. The method comprises reading each script program to be inspected in the script program set to be inspected, wherein the script program set to be inspected contains at least one of the script program to be inspected; performing grammatical analysis on the script programs to be inspected and constructing a global variable table and a local variable table of the script program set to be inspected; and inspecting whether each global variable and each local variable has errors. The inspection method and device are mainly used for inspecting variables in script programs.

Description

technical field [0001] The invention relates to the technical field of software detection, in particular to a script program checking method and device. Background technique [0002] As an internal software development tool, Lua provides an embedded scripting programming language, which is concise, efficient, portable and lightweight, and is widely used in the game industry. The configuration or logic in the game can be written in lua scripting language, and the logic of the game is written in lua. When the logic needs to be modified, there is no need to recompile the entire program code, and even the running game can be updated without stopping. [0003] However, due to multi-person collaborative development or developer negligence, it is difficult to avoid errors in the lua scripting language during the writing process, including syntax errors, variable errors, and function errors. There are at least dozens or even thousands of lua files used in a game. Therefore, in orde...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F11/36
Inventor 李伟德
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products