摘要
应用程序中的功能通常是通过对变量的操作来实现。应用程序中变量的操作包括赋值、引用等不同的方式。针对普通变量和指针变量在程序中的使用方式,对变量的状态进行了分析,并根据变量使用的特点,定义了普通变量和指针变量的状态转换模型。在此基础上,给出了与变量有关的软件错误的定义,并讨论了基于变量切片的软件错误的检测方法。
Variables are used in a program in order to implement the function of a program. There are different operations about a variable in a program and the operation on a variable can change the state of a variable. According to the different usage of a variable, different states of a variable were analyzed. First, the safe and unsafe states of a normal variable and a pointer variable were defined in this paper. Then the rules about the change between different states were also defined. After that, the state transition model of variable was provided. By using the state transition model of varia ble and the theory of program slice,a variable's unsafe state can be traced.
出处
《计算机科学》
CSCD
北大核心
2015年第B11期504-507,共4页
Computer Science
关键词
变量状态转换模型
程序切片
软件错误
State transition model of variable, Program slice, Software error