[go: up one dir, main page]

CN103888314A - Method verifying states of finite-state machine on basis of UIO sequence method - Google Patents

Method verifying states of finite-state machine on basis of UIO sequence method Download PDF

Info

Publication number
CN103888314A
CN103888314A CN201410106244.8A CN201410106244A CN103888314A CN 103888314 A CN103888314 A CN 103888314A CN 201410106244 A CN201410106244 A CN 201410106244A CN 103888314 A CN103888314 A CN 103888314A
Authority
CN
China
Prior art keywords
state
sequence
verified
finite
state machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410106244.8A
Other languages
Chinese (zh)
Other versions
CN103888314B (en
Inventor
张冰
方爽
张奭
周元海
吴效颖
崔璨
彭露
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Hannuo Semiconductor Technology Co Ltd
Original Assignee
Xidian University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xidian University filed Critical Xidian University
Priority to CN201410106244.8A priority Critical patent/CN103888314B/en
Publication of CN103888314A publication Critical patent/CN103888314A/en
Application granted granted Critical
Publication of CN103888314B publication Critical patent/CN103888314B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Maintenance And Management Of Digital Transmission (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明公开了一种基于UIO序列法验证有限状态机所处状态的方法,主要解决在通信协议内,某些状态不存在UIO序列时,无法使用UIO序列法,状态验证过程复杂的问题。其实现步骤为:1)化简通信协议的有限状态机;2)选择不存在UIO序列的状态作为待验证状态;3)选择与待验证状态具有相同输入、输出行为的状态作为校验状态;4)根据待验证状态和校验状态的输入、输出行为选择输入事件序列;5)根据被测系统的输出事件序列是否与有限状态机的规定相符,验证出待验证状态是否为预期状态。本发明扩展了UIO序列法的应用范围,简化了一致性测试集的生成过程并缩短生成的测试序列长度,可应用于通信协议的一致性测试中测试集的设计。

The invention discloses a method for verifying the state of a finite state machine based on a UIO sequence method, which mainly solves the problems that the UIO sequence method cannot be used and the state verification process is complicated when there is no UIO sequence in some states in a communication protocol. The implementation steps are: 1) Simplify the finite state machine of the communication protocol; 2) Select the state without UIO sequence as the state to be verified; 3) Select the state with the same input and output behavior as the state to be verified as the verification state; 4) Select the input event sequence according to the input and output behavior of the state to be verified and the verification state; 5) Verify whether the state to be verified is the expected state according to whether the output event sequence of the system under test is consistent with the finite state machine. The invention expands the application range of the UIO sequence method, simplifies the generation process of the consistency test set and shortens the length of the generated test sequence, and can be applied to the design of the test set in the consistency test of the communication protocol.

Description

基于UIO序列法验证有限状态机所处状态的方法Method of verifying the state of finite state machine based on UIO sequence method

技术领域technical field

本发明属于通信技术领域,特别涉及一种验证有限状态机所处状态的方法,可用于各种通信协议在其有限状态机内某些状态不存在唯一输入输出UIO序列情况下一致性测试集的设计和实现。The invention belongs to the field of communication technology, and particularly relates to a method for verifying the state of a finite state machine, which can be used for consistency test sets of various communication protocols when there is no unique input and output UIO sequence in certain states of the finite state machine design and implementation.

背景技术Background technique

协议的一致性测试是一种黑盒测试,其目的是检查运行协议的系统与协议标准的符合程度。在通信协议一致性测试中,测试集是满足测试准则的多个测试序列的集合。测试序列通常由三部分构成:引导序列、测试输入输出操作、状态验证序列。其中,引导序列用于把被测系统所处的状态置为所需状态;测试输入输出操作用于验证被测系统与协议要求的行为是否一致;状态验证序列用于检查被测系统是否转换到了协议规范所描述的状态。状态验证序列作为测试序列的组成部分之一,对提高测试序列的检错能力有重要作用。Protocol conformance testing is a kind of black box testing, the purpose of which is to check the degree of compliance between the system running the protocol and the protocol standard. In communication protocol conformance testing, a test set is a collection of multiple test sequences that meet the test criteria. A test sequence usually consists of three parts: a boot sequence, a test input and output operation, and a state verification sequence. Among them, the boot sequence is used to set the state of the system under test to the required state; the test input and output operation is used to verify whether the behavior of the system under test is consistent with the protocol requirements; the state verification sequence is used to check whether the system under test is converted to The state described by the protocol specification. As one of the components of the test sequence, the state verification sequence plays an important role in improving the error detection ability of the test sequence.

目前,大多数的状态验证序列的构造方法都是基于有限状态机的。一个有限状态机可以表示为五元组(S,I,O,δ,γ),其中,S是状态的有限非空集合,I是输入事件的有限非空集合,O是输出事件的有限非空集合,δ是状态转移函数,γ是输出函数。有限状态机需具备以下基本特征:At present, most construction methods of state verification sequences are based on finite state machines. A finite state machine can be expressed as a quintuple (S, I, O, δ, γ), where S is a finite non-empty set of states, I is a finite non-empty set of input events, and O is a finite non-empty set of output events. Empty set, δ is the state transition function, γ is the output function. A finite state machine needs to have the following basic characteristics:

1.有限状态机的状态数、输入事件数和所产生的输出事件数都是有限的、确定的。1. The number of states, the number of input events and the number of output events generated by the finite state machine are all limited and definite.

2.有限状态机的每个状态下都能接受所有输入事件。2. Each state of the finite state machine can accept all input events.

3.对于每个输入事件,如果有限状态机能够产生输出事件,那么该输出事件将在给定的有限时间内产生。3. For each input event, if the finite state machine can generate an output event, then the output event will be generated within a given finite time.

4.有限状态机的每个状态都是可达的,其状态转移图是连通图。4. Each state of the finite state machine is reachable, and its state transition graph is a connected graph.

当前针对有限状态机,主要的状态验证序列构造的方法有三种:区分序列法、特征序列集法、UIO序列法。与区分序列法、特征序列集法相比,UIO序列法复杂度低,且生成的测试序列长度较短,因此,在数字系统和通信等时序行为领域的建模过程中,特别是在寻找优化的测试集方面有着广泛应用。Currently, for finite state machines, there are three main methods for constructing state verification sequences: distinguishing sequence method, characteristic sequence set method, and UIO sequence method. Compared with the discrimination sequence method and the feature sequence set method, the UIO sequence method has low complexity and the length of the generated test sequence is shorter. Therefore, in the modeling process of time series behavior fields such as digital systems and communications, especially when looking for optimized It has a wide range of applications on the test set.

UIO序列是唯一输入输出序列,即对于有限状态机中的某一状态,其他状态都不能表现出与之相同的输入/输出I/O序列,因而该UIO序列可以唯一标识和验证此状态。在某一状态Sa下,对于某一输入y,当且仅当状态Sa的输出λa与其他所有状态下的输出均不同时,则y/λa是状态Sa的UIO序列,记做UIO(Sa)=y/λa,其中,y/λa表示在状态Sa时的输入/输出序列。求解UIO(Sa)的步骤如下:The UIO sequence is a unique input and output sequence, that is, for a certain state in the finite state machine, other states cannot show the same input/output I/O sequence, so the UIO sequence can uniquely identify and verify this state. In a certain state Sa, for a certain input y, if and only if the output λa of the state Sa is different from the output of all other states, then y/λa is the UIO sequence of the state Sa, denoted as UIO(Sa) =y/λa, where y/λa represents the input/output sequence in state Sa. The steps to solve UIO(Sa) are as follows:

1)设状态集合P是从Sa经过1步就能到达的状态的集合,检查从Sa到状态集合P中所有状态的1步路径中是否有I/O序列唯一的路径:若有,则该I/O序列就是Sa的唯一输入输出UIO序列;否则,执行步骤2);1) Assuming that the state set P is a set of states that can be reached from Sa in one step, check whether there is a unique path of I/O sequence in the one-step path from Sa to all states in the state set P: if there is, then the The I/O sequence is the only input and output UIO sequence of Sa; otherwise, execute step 2);

2)设状态集合Q是从Sa经过n步就能到达的状态的集合,n≥2,检查从Sa到状态集合Q中所有状态的n步路径中是否有I/O序列唯一的路径:若有,则该I/O序列就是Sa的唯一输入输出UIO序列;否则,n=n+1,重新检查从Sa到状态集合Q中所有状态的n步路径中是否有I/O序列唯一的路径;2) Suppose the state set Q is a set of states that can be reached from Sa after n steps, n≥2, check whether there is a unique path of I/O sequence in the n-step path from Sa to all states in the state set Q: if If yes, the I/O sequence is the only UIO sequence of Sa; otherwise, n=n+1, re-check whether there is a unique path of I/O sequence in the n-step path from Sa to all states in the state set Q ;

I/O序列和UIO序列均由输入事件序列和输出事件序列组成,输入事件序列表示I/O序列中的一个输入事件或具有先后关系的多个输入事件的组合,输出事件序列表示I/O序列中的一个输出事件或具有先后关系的多个输出事件的组合。Both the I/O sequence and the UIO sequence are composed of an input event sequence and an output event sequence. The input event sequence represents an input event in the I/O sequence or a combination of multiple input events with a sequence relationship, and the output event sequence represents the I/O An output event in a sequence or a combination of output events with a sequence relationship.

UIO序列法就是以寻找有限状态机中的各状态的UIO序列为基础,构造状态验证序列的方法。获得状态验证序列后,再结合引导序列、测试输入输出操作,就可得到测试序列,所有测试序列的集合就构成了完整的测试集。因此,通常认为,可否寻找到所有状态的UIO序列是能否使用UIO序列法的前提。The UIO sequence method is a method of constructing a state verification sequence based on finding the UIO sequence of each state in the finite state machine. After obtaining the state verification sequence, combined with the boot sequence and test input and output operations, the test sequence can be obtained, and the collection of all test sequences constitutes a complete test set. Therefore, it is generally believed that whether the UIO sequence of all states can be found is the premise of whether the UIO sequence method can be used.

多数情况下,有限状态机内各状态都可以找到UIO序列,但是在某些情况下,有限状态机的某些状态不存在UIO序列。例如对于某一状态Sa,对任意输入y,有输出λa,并转移到某一状态Sb,对状态Sb,同样输入y,如果有相同的输出λa,则状态Sa不存在UIO序列。如附图2中所示,其中以圆形表示状态,以带箭头的实线表示状态的转移,实线上标识的是状态转移的条件,即I/O行为,以英文字母表示输入事件和输出事件。在状态S2下,输入B,得到输出Y并转移到状态S3,由于在状态S3下输入B,同样得到输出Y,则状态S2不存在UIO序列。通常认为此时将无法使用UIO序列法对这些状态进行状态验证,只能转而采用区分序列法、特征序列集法等更为复杂的验证方法,使一致性测试集更加复杂,增加了测试序列的长度。In most cases, UIO sequences can be found in each state in the finite state machine, but in some cases, UIO sequences do not exist in some states of the finite state machine. For example, for a certain state Sa, for any input y, there is an output λa, and it is transferred to a certain state Sb, and for the state Sb, the same input y, if there is the same output λa, then there is no UIO sequence in the state Sa. As shown in Figure 2, the state is represented by a circle, the transition of the state is represented by a solid line with an arrow, the condition of the state transition is marked on the solid line, that is, the I/O behavior, and the input event and Output events. In state S2, input B, get output Y and transfer to state S3, because input B in state S3, also get output Y, then there is no UIO sequence in state S2. It is generally believed that at this time, the UIO sequence method cannot be used to verify the state of these states, and more complex verification methods such as the distinguishing sequence method and the feature sequence set method can only be used, which makes the consistency test set more complicated and increases the test sequence. length.

发明内容Contents of the invention

本发明针对上述已有技术的不足,提出一种基于UIO序列法验证有限状态机所处状态的方法,以在部分状态不存在UIO序列的情况下,结合其他状态的I/O序列,通过排除有限状态机处于其他状态的可能,实现对不存在UIO序列的状态进行状态验证,从而简化一致性测试集的生成过程并缩短生成的测试序列的长度。The present invention aims at the deficiencies of the above-mentioned prior art, and proposes a method for verifying the state of a finite state machine based on the UIO sequence method, in order to combine the I/O sequences of other states under the condition that there is no UIO sequence in some states, by eliminating The possibility that the finite state machine is in other states realizes the state verification of the state where there is no UIO sequence, thereby simplifying the generation process of the consistency test set and shortening the length of the generated test sequence.

为实现上述目的,本发明的技术方案包括如下步骤:To achieve the above object, the technical solution of the present invention comprises the following steps:

(1)对要进行一致性测试的通信协议的有限状态机,合并其等价状态,使有限状态机最简;(1) For the finite state machine of the communication protocol to be tested for consistency, merge its equivalent states to make the finite state machine the simplest;

(2)求出有限状态机内各状态的UIO序列,找出不存在UIO序列的状态,并构成待验证状态集合M;(2) Find the UIO sequence of each state in the finite state machine, find out the state without UIO sequence, and form the state set M to be verified;

(3)从所述待验证状态集合M中,任意选取一个状态作为待验证状态Si;(3) Randomly select a state from the set M of states to be verified as the state Si to be verified;

(4)选择待验证状态Si的任一输入/输出I/O序列,找出除待验证状态Si以外的含有该输入/输出I/O序列的所有状态,并构成校验状态集合N;(4) Select any input/output I/O sequence of the state Si to be verified, find out all states containing the input/output I/O sequence except the state Si to be verified, and form a verification state set N;

(5)将被测系统所处的状态置为待验证状态Si;(5) Set the state of the system under test to Si to be verified;

(6)向被测系统输入步骤(4)中选择的I/O序列的输入事件序列,并检查被测系统的输出事件序列:(6) Input the input event sequence of the I/O sequence selected in step (4) to the system under test, and check the output event sequence of the system under test:

6a)如果输出事件序列与有限状态机规定的在待验证状态Si下的输出事件序列相符,则执行步骤(7);6a) If the output event sequence is consistent with the output event sequence specified by the finite state machine in the state Si to be verified, then perform step (7);

6b)如果输出事件序列与有限状态机规定的在待验证状态Si下的输出事件序列不相符,则待验证状态不是预期状态,结束本次状态验证过程。6b) If the output event sequence does not match the output event sequence specified by the finite state machine in the state Si to be verified, the state to be verified is not the expected state, and this state verification process ends.

(7)将被测系统所处的状态置为待验证状态Si;(7) Set the state of the system under test to Si to be verified;

(8)从校验状态集合N中任选一个状态作为校验状态Sj;(8) Select a state from the verification state set N as the verification state Sj;

(9)选择待验证状态Si与状态Sj不相同的一个I/O序列,向被测系统输入该I/O序列的输入事件序列,并检查被测系统的输出事件序列:(9) Select an I/O sequence whose state Si and state Sj to be verified are different, input the input event sequence of the I/O sequence to the system under test, and check the output event sequence of the system under test:

9a)如果输出事件序列与有限状态机规定的在待验证状态Si下的输出事件序列不相符,则待验证状态不是预期状态,结束本次状态验证过程;9a) If the output event sequence does not match the output event sequence specified by the finite state machine in the state Si to be verified, the state to be verified is not the expected state, and this state verification process ends;

9b)如果输出事件序列与有限状态机规定的在待验证状态Si下的输出事件序列相符,将状态Sj从校验状态集合N中删除,并判断校验状态集合N是否为空:9b) If the output event sequence is consistent with the output event sequence specified by the finite state machine in the state Si to be verified, delete the state Sj from the verification state set N, and judge whether the verification state set N is empty:

9b1)如果校验状态集合N不为空,则执行步骤(7);9b1) If the check state set N is not empty, execute step (7);

9b2)如果校验状态集合N为空,则证明待验证状态为预期状态,执行步骤(10);9b2) If the verification state set N is empty, then prove that the state to be verified is the expected state, and perform step (10);

(10)将上述待验证状态Si从待验证状态集合M中删除;(10) Delete the above-mentioned state Si to be verified from the set M of states to be verified;

(11)重复步骤(3)到步骤(10),直到待验证状态集合M中的所有状态均被验证为止。(11) Repeat step (3) to step (10) until all the states in the state set M to be verified are verified.

本发明在使用UIO序列作为状态验证序列的基础上,结合了排除法思想,通过排除有限状态机处于某些状态的可能,最终验证有限状态机是否处于预期的状态,从而扩展了UIO序列法的适用范围,使部分状态不存在UIO序列的有限状态机避免使用更加复杂的区分序列法和特征序列集法,简化了一致性测试集的生成过程并缩短生成的测试序列的长度。On the basis of using the UIO sequence as the state verification sequence, the present invention combines the idea of the elimination method, and finally verifies whether the finite state machine is in the expected state by eliminating the possibility that the finite state machine is in a certain state, thereby extending the UIO sequence method. Scope of application, so that the finite state machine with no UIO sequence in some states avoids the use of more complex distinguishing sequence method and feature sequence set method, simplifies the generation process of the consistency test set and shortens the length of the generated test sequence.

附图说明Description of drawings

图1为本发明的实现流程图;Fig. 1 is the realization flowchart of the present invention;

图2为实施例一的有限状态机的状态转移图;Fig. 2 is the state transition diagram of the finite state machine of embodiment one;

图3为实施例二的有限状态机合并状态前的状态转移图;Fig. 3 is the state transition figure before the finite state machine merged state of embodiment two;

图4为实施例二的有限状态机合并状态后的状态转移图。FIG. 4 is a state transition diagram of the finite state machine in the second embodiment after the state is merged.

具体实施方式Detailed ways

下面结合附图对本发明的内容做进一步阐述。The content of the present invention will be further elaborated below in conjunction with the accompanying drawings.

参照图1,本发明给出如下两个实施例。Referring to Fig. 1, the present invention provides following two embodiments.

实施例一:Embodiment one:

本实施例以不含有等价状态且有一个状态与不存在UIO序列的状态具有相同输入/输出序列的通信协议为例,说明对运行该通信协议的被测系统内不存在UIO序列的状态进行状态验证的过程。This embodiment takes a communication protocol that does not contain an equivalent state and has a state that has the same input/output sequence as a state that does not have a UIO sequence as an example, and illustrates that the state that does not have a UIO sequence in the system under test that runs the communication protocol The process of state verification.

该通信协议的状态转移图如图2所示,其中,以圆形表示状态,以带箭头的实线表示状态的转移,实线上标识的是状态转移的条件,即输入/输出行为,以字母A、B和C表示三种不同的输入事件,以字母X、Y和Z表示三种不同的输出事件。本有限状态机包含三个状态:第一状态S1、第二状态S2和第三状态S3。设有限状态机的初始状态为第一状态S1。当有限状态机处于某一状态时,若收到一定的输入事件,有限状态机会产生相应的输出事件,且其所处的状态也会发生转移。参照图2,本有限状态机针对收到的输入事件所产生的输出事件及其状态转移情况为:The state transition diagram of this communication protocol is shown in Figure 2, wherein, the state is represented by a circle, and the state transition is represented by a solid line with an arrow. The letters A, B, and C denote three different input events, and the letters X, Y, and Z denote three different output events. The finite state machine includes three states: a first state S1, a second state S2 and a third state S3. The initial state of the finite state machine is the first state S1. When the finite state machine is in a certain state, if a certain input event is received, the finite state machine will generate a corresponding output event, and its state will also be transferred. Referring to Figure 2, the output events and state transitions generated by the finite state machine for the received input events are:

当有限状态机处于第一状态S1时,若其收到的输入事件为A,则有限状态机产生的输出事件为X,且其所处的状态转移到第二状态S2。若其收到的输入事件为B或C,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the first state S1, if the input event it receives is A, then the output event generated by the finite state machine is X, and its state shifts to the second state S2. If the input event it receives is B or C, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第二状态S2时,若其收到的输入事件为B,则有限状态机产生的输出事件为Y,且其所处的状态转移到第三状态S3。若其收到的输入事件为A或C,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the second state S2, if the input event it receives is B, then the output event generated by the finite state machine is Y, and its state shifts to the third state S3. If the input event it receives is A or C, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第三状态S3时,若其收到的输入事件为B,则有限状态机产生的输出事件为Y,且其所处的状态转移到第三状态S3。若其收到的输入事件为C,则有限状态机产生的输出事件为Z,且其所处的状态转移到第一状态S1。若其收到的输入事件为A,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the third state S3, if the input event it receives is B, the output event generated by the finite state machine is Y, and the state it is in is transferred to the third state S3. If the input event it receives is C, then the output event generated by the finite state machine is Z, and its state shifts to the first state S1. If the input event it receives is A, the output event generated by the finite state machine is no response, and its state does not transition.

参照图2,对本实例进行状态验证的步骤如下:Referring to Figure 2, the steps for status verification of this example are as follows:

步骤1,化简通信协议的有限状态机。Step 1, Simplify the finite state machine of the communication protocol.

由于本实例使用的有限状态机不含有等价状态,无需合并。Since the finite state machine used in this example does not contain equivalent states, no merging is required.

步骤2,利用求解UIO序列的方法,求出有限状态机内各个状态的UIO序列。Step 2, using the method of solving the UIO sequence, find the UIO sequence of each state in the finite state machine.

有限状态机处于第一状态S1时,若其收到的输入事件为A,则有限状态机产生的输出事件为X,由于有限状态机内的其他状态都不具有输入/输出A/X,所以第一状态S1的UIO序列为A/X。When the finite state machine is in the first state S1, if the input event it receives is A, the output event generated by the finite state machine is X. Since no other state in the finite state machine has input/output A/X, so The UIO sequence of the first state S1 is A/X.

第二状态S2的UIO序列的求解过程包括如下三种情况:The solution process of the UIO sequence of the second state S2 includes the following three situations:

输入事件为A时,第二状态S2与第三状态S3有相同输出事件,且有限状态机所处状态都不发生转移。When the input event is A, the second state S2 and the third state S3 have the same output event, and the state of the finite state machine does not transition.

输入事件为B时,第二状态S2与第三状态S3有相同输出事件,且有限状态机所处状态均转移到状态S3。When the input event is B, the second state S2 and the third state S3 have the same output event, and the state of the finite state machine is transferred to the state S3.

输入事件为C时,第二状态S2与第一状态S1有相同输出事件,且有限状态机所处状态都不发生转移。When the input event is C, the second state S2 has the same output event as the first state S1, and the state of the finite state machine does not transition.

所以第二状态S2不存在UIO序列;So there is no UIO sequence in the second state S2;

有限状态机处于第三状态S3时,若其收到的输入事件为C,则有限状态机产生的输出事件为Z,由于有限状态机内的其他状态都不具有序列C/Z,所以第三状态S3的UIO序列为C/Z。When the finite state machine is in the third state S3, if the input event it receives is C, the output event generated by the finite state machine is Z. Since other states in the finite state machine do not have the sequence C/Z, the third The UIO sequence of state S3 is C/Z.

步骤3,根据有限状态机内各状态是否存在UIO序列,找出不存在UIO序列的状态,构成待验证状态集合M,以选择待验证状态。Step 3: According to whether there is a UIO sequence in each state in the finite state machine, find out the state that does not have a UIO sequence, and form a set M of states to be verified, so as to select a state to be verified.

由步骤2求得的各状态的UIO序列可知,只有第二状态S2不存在UIO序列,所以第二状态S2单独构成待验证状态集合M,并选择第二状态S2作为待验证状态Si。From the UIO sequence of each state obtained in step 2, it can be seen that only the second state S2 does not have a UIO sequence, so the second state S2 alone constitutes the set M of states to be verified, and the second state S2 is selected as the state Si to be verified.

步骤4,找出校验状态集合N包含的状态,以选择校验状态Sj。Step 4, find out the states contained in the verification state set N, so as to select the verification state Sj.

选择第二状态S2的输入/输出序列B/Y,由于其他状态中只有第三状态S3含有输入/输出序列B/Y,所以校验状态集合N包含第三状态S3,并选择第三状态S3作为校验状态Sj。Select the input/output sequence B/Y of the second state S2. Since only the third state S3 contains the input/output sequence B/Y among other states, the verification state set N contains the third state S3, and the third state S3 is selected As the verification state Sj.

步骤5,向被测系统输入事件A,使被测系统所处的状态转移到待验证状态Si。Step 5, input event A to the system under test, so that the state of the system under test is transferred to the state Si to be verified.

步骤6,向被测系统输入步骤4中选择的输入/输出序列的输入事件B,检查被测系统的输出事件:Step 6, input the input event B of the input/output sequence selected in step 4 to the system under test, and check the output event of the system under test:

如果输出事件不是Y,则证明待验证状态不是预期的第二状态S2,状态验证过程结束;If the output event is not Y, it proves that the state to be verified is not the expected second state S2, and the state verification process ends;

如果输出事件是Y,则排除了待验证状态是第一状态S1的可能,这是因为如果被测系统处于第一状态S1,对于输入事件B,其输出事件应该为无响应。执行步骤7。If the output event is Y, the possibility that the state to be verified is the first state S1 is ruled out, because if the system under test is in the first state S1, for the input event B, its output event should be no response. Go to step 7.

步骤7,向被测系统依次输入事件C和A,使被测系统所处的状态转移到待验证状态Si。Step 7: Input events C and A to the system under test sequentially, so that the state of the system under test is transferred to the state Si to be verified.

步骤8,根据待验证状态Si和校验状态Sj的输入、输出行为,选择输入事件,检查输出事件。Step 8, according to the input and output behaviors of the state Si to be verified and the state Sj to be verified, select an input event and check the output event.

8a)根据步骤3中将第二状态S2选为待验证状态Si和步骤4中将第三状态S3选为校验状态Sj,以及当有限状态机处于第二状态S2和第三状态S3时,对输入事件C产生不同输出事件的情况,故选择事件C作为向被测系统的输入事件;8a) According to the selection of the second state S2 as the state to be verified Si in step 3 and the selection of the third state S3 as the verification state Sj in step 4, and when the finite state machine is in the second state S2 and the third state S3, Different output events are generated for input event C, so event C is selected as the input event to the system under test;

8b)检查被测系统的输出事件:8b) Check the output events of the system under test:

向被测系统输入事件C,产生的输出事件可能是Z或者无响应:Input event C to the system under test, the resulting output event may be Z or no response:

如果输出事件是Z,则证明待验证状态不是预期的第二状态S2,状态验证过程结束;If the output event is Z, it proves that the state to be verified is not the expected second state S2, and the state verification process ends;

如果被测系统对输入事件C没有响应,则排除了待验证状态是第三状态S3的可能,将第三状态S3从校验状态集合N中删除,校验状态集合N为空集,至此,排除了待验证状态是第一状态S1和第三状态S3的可能,所以待验证状态就是预期的第二状态S2,并将第二状态S2从待验证状态集合M中删除,此时待验证状态集合M为空,结束状态验证过程。If the system under test does not respond to the input event C, the possibility that the state to be verified is the third state S3 is ruled out, and the third state S3 is deleted from the verification state set N, and the verification state set N is an empty set. So far, The possibility that the state to be verified is the first state S1 and the third state S3 is excluded, so the state to be verified is the expected second state S2, and the second state S2 is deleted from the set of states to be verified M. At this time, the state to be verified The set M is empty, and the state verification process ends.

实施例二:Embodiment two:

本实施例以含有等价状态且有两个状态与不存在UIO序列的状态具有相同输入/输出序列的通信协议为例,说明对运行通信协议的被测系统中不存在UIO序列的状态进行状态验证的过程。This embodiment takes a communication protocol that contains an equivalent state and has two states that have the same input/output sequence as a state that does not have a UIO sequence as an example, to illustrate how to perform state processing on a state that does not have a UIO sequence in a system under test that is running a communication protocol. Verification process.

该通信协议的状态转移图如图3,其中以圆形表示状态,以带箭头的实线表示状态的转移,实线上标识的是状态转移的条件,即输入/输出行为,以字母A、B、C和D表示四种不同的输入事件,以字母W、X、Y和Z表示四种不同的输出事件。本有限状态机包含五个状态:第一状态S1、第二状态S2、第三状态S3、第四状态S4和第五状态S5。设有限状态机的初始状态为第一状态S1。当有限状态机处于某一状态时,若收到一定的输入事件,有限状态机会产生相应的输出事件,且其所处的状态也会发生转移。参照图3,本有限状态机针对收到的输入事件所产生的输出事件及其状态转移情况为:The state transition diagram of the communication protocol is shown in Figure 3, in which the state is represented by a circle, and the state transition is represented by a solid line with an arrow. The condition of the state transition is marked on the solid line, that is, the input/output behavior. B, C, and D represent four different input events, and letters W, X, Y, and Z represent four different output events. The finite state machine includes five states: a first state S1, a second state S2, a third state S3, a fourth state S4 and a fifth state S5. The initial state of the finite state machine is the first state S1. When the finite state machine is in a certain state, if a certain input event is received, the finite state machine will generate a corresponding output event, and its state will also be transferred. Referring to Figure 3, the output events and state transitions generated by the finite state machine for the received input events are:

当有限状态机处于第一状态S1时,若其收到的输入事件为A,则有限状态机产生的输出事件为W,且其所处的状态转移到第二状态S2。若其收到的输入事件为B、C或D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the first state S1, if the input event it receives is A, then the output event generated by the finite state machine is W, and its state shifts to the second state S2. If the input event it receives is B, C or D, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第二状态S2时,若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第三状态S3。若其收到的输入事件为A、C或D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the second state S2, if the input event it receives is B, then the output event generated by the finite state machine is X, and its state shifts to the third state S3. If the input event it receives is A, C or D, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第三状态S3时,若其收到的输入事件为A,则有限状态机产生的输出事件为Z,且其所处的状态转移到第五状态S5。若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第三状态S3。若其收到的输入事件为C,则有限状态机产生的输出事件为Y,且其所处的状态转移到第四状态S4。若其收到的输入事件为D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the third state S3, if the input event it receives is A, the output event generated by the finite state machine is Z, and its state shifts to the fifth state S5. If the input event it receives is B, the output event generated by the finite state machine is X, and its state shifts to the third state S3. If the input event it receives is C, the output event generated by the finite state machine is Y, and its state shifts to the fourth state S4. If the input event it receives is D, the output event generated by the finite state machine is no response, and its state does not transition.

当有限状态机处于第四状态S4时,若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第四状态S4。若其收到的输入事件为D,则有限状态机产生的输出事件为Z,且其所处的状态转移到第一状态S1。若其收到的输入事件为A或C,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the fourth state S4, if the input event it receives is B, then the output event generated by the finite state machine is X, and its state shifts to the fourth state S4. If the input event it receives is D, then the output event generated by the finite state machine is Z, and its state shifts to the first state S1. If the input event it receives is A or C, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第五状态S5时,若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第三状态S3。若其收到的输入事件为A、C或D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the fifth state S5, if the input event it receives is B, then the output event generated by the finite state machine is X, and its state shifts to the third state S3. If the input event it receives is A, C or D, the output event generated by the finite state machine is no response, and its state does not transfer.

参照图3,对本实例进行状态验证的步骤如下:Referring to Figure 3, the steps for status verification of this example are as follows:

步骤一,化简通信协议的有限状态机。Step one, simplify the finite state machine of the communication protocol.

由于对于任意输入事件,第二状态S2和第五状态S5都有相同的输出事件,并且状态转移情况也相同,所以第二状态S2和第五状态S5为等价状态,合并第二状态S2和第五状态S5,合并后的状态转移图如图4所示,其中:Since for any input event, the second state S2 and the fifth state S5 have the same output event, and the state transition is also the same, so the second state S2 and the fifth state S5 are equivalent states, and the second state S2 and the fifth state S5 are combined. The fifth state S5, the combined state transition diagram is shown in Figure 4, where:

当有限状态机处于第一状态S1时,若其收到的输入事件为A,则有限状态机产生的输出事件为W,且其所处的状态转移到第二状态S2。若其收到的输入事件为B、C或D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the first state S1, if the input event it receives is A, then the output event generated by the finite state machine is W, and its state shifts to the second state S2. If the input event it receives is B, C or D, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第二状态S2时,若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第三状态S3。若其收到的输入事件为A、C或D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the second state S2, if the input event it receives is B, then the output event generated by the finite state machine is X, and its state shifts to the third state S3. If the input event it receives is A, C or D, the output event generated by the finite state machine is no response, and its state does not transfer.

当有限状态机处于第三状态S3时,若其收到的输入事件为A,则有限状态机产生的输出事件为Z,且其所处的状态转移到第五状态S2。若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第三状态S3。若其收到的输入事件为C,则有限状态机产生的输出事件为Y,且其所处的状态转移到第四状态S4。若其收到的输入事件为D,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the third state S3, if the input event it receives is A, then the output event generated by the finite state machine is Z, and its state shifts to the fifth state S2. If the input event it receives is B, the output event generated by the finite state machine is X, and its state shifts to the third state S3. If the input event it receives is C, the output event generated by the finite state machine is Y, and its state shifts to the fourth state S4. If the input event it receives is D, the output event generated by the finite state machine is no response, and its state does not transition.

当有限状态机处于第四状态S4时,若其收到的输入事件为B,则有限状态机产生的输出事件为X,且其所处的状态转移到第四状态S4。若其收到的输入事件为D,则有限状态机产生的输出事件为Z,且其所处的状态转移到第一状态S1。若其收到的输入事件为A或C,则有限状态机产生的输出事件为无响应,且其所处的状态不发生转移。When the finite state machine is in the fourth state S4, if the input event it receives is B, then the output event generated by the finite state machine is X, and its state shifts to the fourth state S4. If the input event it receives is D, then the output event generated by the finite state machine is Z, and its state shifts to the first state S1. If the input event it receives is A or C, the output event generated by the finite state machine is no response, and its state does not transfer.

步骤二,利用求解UIO序列的方法,求出有限状态机内各个状态的UIO序列。Step 2, using the method of solving the UIO sequence, find the UIO sequence of each state in the finite state machine.

在有限状态机处于第一状态S1时,若其收到的输入事件为A,则有限状态机产生的输出事件为W,由于有限状态机内的其他状态都不具有序列A/W,所以第一状态S1的UIO序列为A/W;When the finite state machine is in the first state S1, if the input event it receives is A, the output event generated by the finite state machine is W. Since no other state in the finite state machine has the sequence A/W, the first The UIO sequence of a state S1 is A/W;

第二状态S2的UIO序列的求解过程包括如下四种情况:The solution process of the UIO sequence of the second state S2 includes the following four situations:

当输入事件为A时,第二状态S2与第四状态S4有相同输出事件,且有限状态机所处状态都不发生转移;When the input event is A, the second state S2 and the fourth state S4 have the same output event, and the state of the finite state machine does not transition;

当输入事件为B时,第二状态S2与第三状态S3有相同输出事件,且有限状态机所处状态均转移到状态S3;When the input event is B, the second state S2 and the third state S3 have the same output event, and the state of the finite state machine is transferred to the state S3;

当输入事件为C时,第二状态S2与第一状态S1有相同输出事件,且有限状态机所处状态都不发生转移;When the input event is C, the second state S2 has the same output event as the first state S1, and the state of the finite state machine does not transition;

当输入事件为D时,第二状态S2与第一状态S1有相同输出事件,且有限状态机所处状态都不发生转移,所以第二状态S2不存在UIO序列;When the input event is D, the second state S2 has the same output event as the first state S1, and the state of the finite state machine does not transition, so there is no UIO sequence in the second state S2;

在有限状态机处于第三状态S3时,若其收到的输入事件为C,则有限状态机产生的输出事件为Y,由于有限状态机内的其他状态都不具有序列C/Y,所以第三状态S3的UIO序列为C/Y。When the finite state machine is in the third state S3, if the input event it receives is C, the output event generated by the finite state machine is Y. Since other states in the finite state machine do not have the sequence C/Y, the first The UIO sequence for the three-state S3 is C/Y.

在有限状态机处于第四状态S4时,若其收到的输入事件为D,则有限状态机产生的输出事件为Z,由于有限状态机内的其他状态都不具有序列D/Z,所以第四状态S4的UIO序列为D/Z。When the finite state machine is in the fourth state S4, if the input event it receives is D, the output event generated by the finite state machine is Z. Since other states in the finite state machine do not have the sequence D/Z, the first The UIO sequence of the four-state S4 is D/Z.

步骤三,根据有限状态机内各状态是否存在UIO序列,找出不存在UIO序列的状态,构成待验证状态集合M,以选择待验证状态。Step 3: According to whether there is a UIO sequence in each state in the finite state machine, find out the state that does not have a UIO sequence, and form a set M of states to be verified, so as to select a state to be verified.

由步骤二求得的各状态的UIO序列可知,第二状态S2不存在UIO序列,所以第二状态S2单独构成待验证状态集合M,并选择第二状态S2作为待验证状态Si。From the UIO sequence of each state obtained in step 2, it can be seen that there is no UIO sequence in the second state S2, so the second state S2 alone constitutes the set of states to be verified M, and the second state S2 is selected as the state to be verified Si.

步骤四,找出校验状态集合N所包含的状态。Step 4, find out the states included in the verification state set N.

选择第二状态S2的输入/输出序列B/X,由于在其他状态中,第三状态S3和第四状态S4都含有输入/输出序列B/X,所以校验状态集合N包含第三状态S3和第四状态S4。Select the input/output sequence B/X of the second state S2, because in other states, the third state S3 and the fourth state S4 both contain the input/output sequence B/X, so the verification state set N contains the third state S3 and a fourth state S4.

步骤五,向被测系统输入事件A,使被测系统所处的状态转移到待验证状态Si。Step five, input event A to the system under test, so that the state of the system under test is transferred to the state Si to be verified.

步骤六,向被测系统输入步骤四中选择的输入/输出序列的输入事件B,检查被测系统的输出事件:Step six, input the input event B of the input/output sequence selected in step four to the system under test, and check the output event of the system under test:

如果输出事件不是X,则证明待验证状态不是预期的第二状态S2,状态验证过程结束;If the output event is not X, it proves that the state to be verified is not the expected second state S2, and the state verification process ends;

如果输出事件是X,则排除了待验证状态是第一状态S1的可能,这是因为如果被测系统处于第一状态S1,对于输入事件B,其输出事件应该为无响应。执行步骤七。If the output event is X, the possibility that the state to be verified is the first state S1 is ruled out, because if the system under test is in the first state S1, for the input event B, its output event should be no response. Go to step seven.

步骤七,向被测系统依次输入事件C、D和A,使被测系统所处的状态转移到待验证状态Si。Step seven, input events C, D and A to the system under test in sequence, so that the state of the system under test is transferred to the state Si to be verified.

步骤八,选择校验状态,根据待验证状态Si和校验状态Sj的输入、输出行为,选择输入事件,并检查输出事件。Step 8: Select a verification state, select an input event according to the input and output behaviors of the state Si to be verified and the verification state Sj, and check the output event.

8.1)从校验状态集合N中选择第三状态S3作为校验状态Sj;8.1) Select the third state S3 from the verification state set N as the verification state Sj;

8.2)根据步骤三中将第二状态S2选为待验证状态Si和步骤8.1)中将第三状态S3选为校验状态Sj,以及当有限状态机处于第二状态S2和第三状态S3时,对输入事件C产生不同输出事件的情况,故选择事件C作为向被测系统的输入事件;8.2) According to the selection of the second state S2 as the state Si to be verified in step 3 and the selection of the third state S3 as the verification state Sj in step 8.1), and when the finite state machine is in the second state S2 and the third state S3 , different output events are generated for input event C, so event C is selected as the input event to the system under test;

8.3)检查被测系统的输出事件。8.3) Check the output events of the system under test.

向被测系统输入事件C,产生的输出事件可能是Y或者无响应:Input event C to the system under test, the output event generated may be Y or no response:

如果输出的事件是Y,则证明待验证状态不是预期的第二状态S2,状态验证过程结束;If the output event is Y, it proves that the state to be verified is not the expected second state S2, and the state verification process ends;

如果被测系统对输入事件C没有响应,则排除了待验证状态是第三状态S3的可能,将第三状态S3从校验状态集合N中删除,此时校验状态集合N仅包含第四状态S4,所以第四状态S4为校验状态Sj,执行步骤九。If the system under test does not respond to the input event C, the possibility that the state to be verified is the third state S3 is ruled out, and the third state S3 is deleted from the verification state set N. At this time, the verification state set N only includes the fourth state State S4, so the fourth state S4 is the verification state Sj, go to step 9.

步骤九,将被测系统所处的状态转移到待验证状态Si。Step 9, transfer the state of the system under test to the state Si to be verified.

根据步骤七中将被测系统所处的状态转移到待验证状态Si,以及步骤八中向被测系统输入事件C,被测系统没有响应,且不发生状态转移的情况,可知被测系统所处的状态已经是待验证状态Si,无需再转移被测系统的所处状态。According to the fact that the state of the system under test is transferred to the state Si to be verified in step 7, and the event C is input to the system under test in step 8, the system under test does not respond and no state transfer occurs, it can be known that the system under test The state at is already the state Si to be verified, and there is no need to transfer the state of the system under test.

步骤十,根据待验证状态Si和校验状态Sj的输入、输出行为,选择输入事件,并检查输出事件。Step ten, according to the input and output behaviors of the state Si to be verified and the state Sj to be verified, select an input event, and check the output event.

10.1)根据步骤三中将第二状态S2选为待验证状态Si和步骤8.3)中将第四状态S4选为校验状态Sj,以及当有限状态机处于第二状态S2或第四状态S4时,对输入事件D产生的输出事件不同的情况,故选择事件D作为向被测系统的输入事件;10.1) According to the selection of the second state S2 as the state Si to be verified in step 3 and the selection of the fourth state S4 as the verification state Sj in step 8.3), and when the finite state machine is in the second state S2 or the fourth state S4 , the output event generated by the input event D is different, so the event D is selected as the input event to the system under test;

10.2)检查被测系统的输出事件。10.2) Check the output events of the system under test.

向被测系统输入事件D,产生的输出事件可能是Z或者无响应:Input event D to the system under test, the resulting output event may be Z or no response:

如果输出事件是Z,则证明待验证状态不是预期的第二状态S2,状态验证过程结束;If the output event is Z, it proves that the state to be verified is not the expected second state S2, and the state verification process ends;

如果被测系统对输入事件D没有响应,则排除了待验证状态是第四状态S4的可能,将第四状态S4从校验状态集合N中删除,此时校验状态集合N为空集,至此,已经排除了待验证状态是第一状态S1、第三状态S3和第四状态S4的可能,所以待验证状态是预期的第二状态S2,将第二状态S2从待验证状态集合M中删除,此时待验证状态集合M为空,结束状态验证过程。If the system under test does not respond to the input event D, the possibility that the state to be verified is the fourth state S4 is ruled out, and the fourth state S4 is deleted from the verification state set N. At this time, the verification state set N is an empty set. So far, the possibility that the state to be verified is the first state S1, the third state S3 and the fourth state S4 has been ruled out, so the state to be verified is the expected second state S2, and the second state S2 is selected from the state set M to be verified Delete, at this time the state set M to be verified is empty, and the state verification process ends.

以上描述仅是本发明的一个具体事例,并不构成对本发明的任何限制,显然对于本领域的专业人员来说,在了解了本发明内容和原理后,都可能在不背离本发明原理、结构的情况下,进行形式化和细节上的各种修正和改变,但是这些基于本发明思想的修正和改变仍在本发明的权利要求保护范围之内。The above description is only a specific example of the present invention, and does not constitute any limitation to the present invention. Obviously, for professionals in the field, after understanding the content and principles of the present invention, it is possible without departing from the principles and structures of the present invention. Various modifications and changes in formalization and details are made, but these modifications and changes based on the idea of the present invention are still within the protection scope of the claims of the present invention.

Claims (7)

1. the method based on uio sequence method checking finite state machine status, comprises the steps:
(1) to carrying out the finite state machine of the communication protocol of uniformity test, merge its equivalent state, make finite state machine the simplest;
(2) obtain the uio sequence of each state in finite state machine, find out the state that does not have uio sequence, and form state set M to be verified;
(3), from described state set M to be verified, choose arbitrarily a state as state Si to be verified;
(4) select arbitrary I/O I/O sequence of state Si to be verified, find out all states that contain this I/O I/O sequence except state Si to be verified, and form verification state set N;
(5) residing system under test (SUT) state is set to state Si to be verified;
(6) to the incoming event sequence of the I/O sequence of selecting in system under test (SUT) input step (4), and check the outgoing event sequence of system under test (SUT):
If 6a) outgoing event sequence conforms to the outgoing event sequence under state Si to be verified of finite state machine regulation, execution step (7);
If 6b) outgoing event sequence does not conform to the outgoing event sequence under state Si to be verified of finite state machine regulation, state to be verified is not expecting state, finishes this state verification process.
(7) residing system under test (SUT) state is set to state Si to be verified;
(8) from verification state set N an optional state as verification state Sj;
(9) select the I/O sequence that state Si to be verified is not identical with state Sj, input the incoming event sequence of this I/O sequence to system under test (SUT), and check the outgoing event sequence of system under test (SUT):
If 9a) outgoing event sequence does not conform to the outgoing event sequence under state Si to be verified of finite state machine regulation, state to be verified is not expecting state, finishes this state verification process;
If 9b) outgoing event sequence conforms to the outgoing event sequence under state Si to be verified of finite state machine regulation, state Sj is deleted from verification state set N, and judges whether verification state set N is empty:
If 9b1) verification state set N is not empty, execution step (7);
If 9b2) verification state set N is empty, prove that state to be verified is expecting state, execution step (10);
(10) above-mentioned state Si to be verified is deleted from state set M to be verified;
(11) repeating step (3) is to step (10), until all states in state set M to be verified are all verified.
2. method according to claim 1, the equivalent state in wherein said step (1), refers to the two or more states in finite state machine, they have identical output for identical input, and can be transformed into identical state.
3. method according to claim 1, the uio sequence of obtaining each state in finite state machine that wherein step (2) is described, carries out as follows:
(2a) in finite state machine, all states, appoint and get a state Sa;
(2b) establish the set that state set P is the state that just can arrive through 1 step from Sa, checking from Sa to state set P, in 1 footpath, step of all states, whether there is the unique path of I/O behavior: if having, the uio sequence that this I/O behavior is exactly Sa, execution step (2d); Otherwise, execution step (2c);
(2c) establishing state set Q is the set that walks the state that just can arrive from Sa through n, n >=2, checking from Sa to state set Q, in the footpath, n step of all states, whether there is the unique path of I/O behavior: if having, the uio sequence that this I/O sequence is exactly Sa, execution step (2d); Otherwise whether n=n+1, have the unique path of I/O behavior in the footpath, n step of all states reexamining from Sa to state set Q;
(2d) in finite state machine, appoint the state of obtaining not yet uio sequence of getting, execution step (2b), until obtain the uio sequence of all states in state set N.
4. method according to claim 1, I/O sequence in wherein said step (4), refer to and there is an I/O operation of precedence relationship or the combination of multiple I/O operation, I/O sequence is made up of incoming event sequence and outgoing event sequence, incoming event sequence represents an incoming event in I/O sequence or has the combination of multiple incoming events of precedence relationship, and outgoing event sequence represents an outgoing event in I/O sequence or has the combination of multiple outgoing events of precedence relationship.
5. method according to claim 1, wherein any one I/O sequence of the selection state Si to be verified described in step (4), it is each the I/O sequence for state Si to be verified, find out all states that contain this I/O sequence in finite state machine, the status number that statistics contains this I/O sequence is selected a minimum I/O sequence of corresponding states number from all I/O sequences of state Si to be verified.
6. method according to claim 1, what wherein step (5) was described is set to state Si to be verified by residing system under test (SUT) state, and its implementation is:
If system under test (SUT) has the order that its status is set, directly use the residing state of this order system under test (SUT) to be set to state Si to be verified;
If system under test (SUT) does not arrange the order of its status, according to the regulation of finite state machine, to system under test (SUT) input sequence of events, make its status transfer to state Si to be verified.
7. method according to claim 1, wherein the described outgoing event sequence of step (6) conforms to the outgoing event sequence under state Si to be verified of finite state machine regulation, refer under state Si to be verified, the actual outgoing event sequence of system under test (SUT) is consistent with the outgoing event sequence of communication protocol regulation.
CN201410106244.8A 2014-03-20 2014-03-20 The method that finite state machine status are verified based on uio sequence method Active CN103888314B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410106244.8A CN103888314B (en) 2014-03-20 2014-03-20 The method that finite state machine status are verified based on uio sequence method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410106244.8A CN103888314B (en) 2014-03-20 2014-03-20 The method that finite state machine status are verified based on uio sequence method

Publications (2)

Publication Number Publication Date
CN103888314A true CN103888314A (en) 2014-06-25
CN103888314B CN103888314B (en) 2017-06-09

Family

ID=50957041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410106244.8A Active CN103888314B (en) 2014-03-20 2014-03-20 The method that finite state machine status are verified based on uio sequence method

Country Status (1)

Country Link
CN (1) CN103888314B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572457A (en) * 2014-12-30 2015-04-29 北京工业大学 Method for modifying non-universal finite-state machine with special conversion process
CN110572296A (en) * 2019-07-17 2019-12-13 国网江苏省电力有限公司电力科学研究院 A security detection method for communication protocol consistency of Internet of Things terminal equipment
CN110738384A (en) * 2019-04-17 2020-01-31 北京航天飞行控制中心 Event sequence checking method and system
CN111240883A (en) * 2020-01-16 2020-06-05 北京工业大学 Finite state machine based system diagnosis method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5703885A (en) * 1995-03-06 1997-12-30 Motorola, Inc. Method and apparatus for constructing verification test sequences by merging and touring hierarchical unique input/output sequence (UIO) based test subsequence graphs
CN102404767A (en) * 2011-11-17 2012-04-04 西安电子科技大学 Security Test Architecture of WSN Protocol Based on Randomness Test

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5703885A (en) * 1995-03-06 1997-12-30 Motorola, Inc. Method and apparatus for constructing verification test sequences by merging and touring hierarchical unique input/output sequence (UIO) based test subsequence graphs
CN102404767A (en) * 2011-11-17 2012-04-04 西安电子科技大学 Security Test Architecture of WSN Protocol Based on Randomness Test

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
SHWUHWA S YU AND MING T LIU: "A new protocol test sequence generation method based on UIOS", 《ELEVENTH ANNUAL JOINT CONFERENCE OF THE IEEE COMPUTER AND COMMUNICATION SOCIETIES》 *
田野 屈玉贵 赵保华: "基于UIO的协议测试序列生成方法的改进", 《计算机工程与应用》 *
高珊 李华 郭亚杰: "一种新的基于FSM的UIO序列生成算法", 《内蒙古大学学报》 *
鲍璐 钱松荣 张根度: "基于有限状态机的一致性测试例自动生成算法", 《计算机研究与发展》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104572457A (en) * 2014-12-30 2015-04-29 北京工业大学 Method for modifying non-universal finite-state machine with special conversion process
CN104572457B (en) * 2014-12-30 2017-07-14 北京工业大学 A kind of method transformed the non-universal finite state machine containing special transfer process
CN110738384A (en) * 2019-04-17 2020-01-31 北京航天飞行控制中心 Event sequence checking method and system
CN110572296A (en) * 2019-07-17 2019-12-13 国网江苏省电力有限公司电力科学研究院 A security detection method for communication protocol consistency of Internet of Things terminal equipment
CN110572296B (en) * 2019-07-17 2021-01-08 国网江苏省电力有限公司电力科学研究院 Internet of things terminal equipment communication protocol consistency safety detection method
CN111240883A (en) * 2020-01-16 2020-06-05 北京工业大学 Finite state machine based system diagnosis method, device, equipment and storage medium
CN111240883B (en) * 2020-01-16 2023-08-29 北京工业大学 System diagnosis method, device, equipment and storage medium based on finite state machine

Also Published As

Publication number Publication date
CN103888314B (en) 2017-06-09

Similar Documents

Publication Publication Date Title
CN109802864B (en) Chip design verification method and device and chip tester
US11204860B2 (en) Methods and apparatuses for generating smart contract test case
CN109783357A (en) The method and device of test application program, computer equipment, storage medium
CN110245006B (en) Method, device, equipment and storage medium for processing block chain transaction
CN103888314B (en) The method that finite state machine status are verified based on uio sequence method
WO2017000761A1 (en) Method and apparatus for extracting feature information of terminal device
CN106921578A (en) The generation method and device of a kind of forwarding-table item
CN111367786A (en) A symbol execution method, electronic device and storage medium
CN109408309A (en) The test method and device of multiple terminals
CN101674205B (en) Method and device for generating network communication protocol test sequence based on finite-state machine
CN104639390A (en) Method and device for testing system
JP3937341B2 (en) Transaction profile generation system for computer system performance measurement analysis, its generation method and program
CN101388807B (en) Protocol Robustness Test Generation Method Based on Packet Mutation
CN104869567B (en) A kind of information processing method based on Intelligent terminal for Internet of things
CN109815047A (en) A kind of method and relevant apparatus of data processing
CN113900937A (en) Script calling method, device, electronic device and storage medium
CN110020166B (en) Data analysis method and related equipment
CN110830499A (en) Network attack application detection method and system
CN111339576A (en) Tri-state physics unclonable function circuit, control method and chip
CN104767749B (en) A kind of information processing method based on wireless Internet of Things
CN107423041B (en) Method and apparatus for implementing application programming interface configuration and invocation
KR101876245B1 (en) Apparatus and method for performance test of IED and computer readable recording medium to member deterioration
CN105425095B (en) A wiring test method and device
CN110580172B (en) Configuration rule verification method and device, storage medium, electronic device
JP2019029921A (en) Transmitter, receiver, and communication method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20180522

Address after: 100080 room 2505, West Tower, 46 Haidian Road, Haidian District, Beijing.

Patentee after: BEIJING HANNUO SEMICONDUCTOR TECHNOLOGY CO., LTD.

Address before: No. 2 Taibai Road, Xi'an, Shaanxi Province, Shaanxi

Patentee before: Xidian University

TR01 Transfer of patent right