CN102404167B - Protocol test generating method of parallel expansion finite-state machine based on variable dependence - Google Patents

Protocol test generating method of parallel expansion finite-state machine based on variable dependence Download PDF

Info

Publication number
CN102404167B
CN102404167B CN201110344327.7A CN201110344327A CN102404167B CN 102404167 B CN102404167 B CN 102404167B CN 201110344327 A CN201110344327 A CN 201110344327A CN 102404167 B CN102404167 B CN 102404167B
Authority
CN
China
Prior art keywords
state machine
transition
variable
targeting sequencing
executable
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.)
Active
Application number
CN201110344327.7A
Other languages
Chinese (zh)
Other versions
CN102404167A (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.)
Tsinghua University
Original Assignee
Tsinghua 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 Tsinghua University filed Critical Tsinghua University
Priority to CN201110344327.7A priority Critical patent/CN102404167B/en
Publication of CN102404167A publication Critical patent/CN102404167A/en
Application granted granted Critical
Publication of CN102404167B publication Critical patent/CN102404167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of a network protocol test and discloses a protocol test generating method of a parallel expansion finite-state machine based on variable dependence. The protocol test generating method comprises the following steps of 1. in a computer, describing a protocol specification of tested network equipment as a parallel expansion finite-state machine model; 2. generating a component state machine abstract test set by adopting a test generation technology of the expansion finite-state machine ignoring the variable dependence; 3. aiming at external variables, generating an executable external leader sequence; 4. carrying out executable processing on the component state machine abstract test set by linking the external leader sequence; 5. generating a cross-state machine abstract test set with respect to the external variables; and 6. combining the abstract test set processed in the step 4 and the abstract test set generated in the step 5, deleting a repeated or an included test sequence and obtaining the abstract test set of a protocol state machine. By adopting the protocol test generating method, the non-executable problem of the path caused by the variable dependence is solved, and the state explosion is avoided.

Description

The protocol test generation method of the parallel-expansion finite state machine relying on based on variable
Technical field
The present invention relates to network protocol testing technical field, be specifically related to a kind of protocol test generation method of the parallel-expansion finite state machine relying on based on variable.
Background technology
Protocol test technology be guarantee network communication protocol correct realize and the different network equipment between the important means of correct interconnection.Uniformity test is basic protocol testing method, and its target is whether detection protocol realization is consistent with protocol specification.
It is the major issue in this field that test based on formalization method generates, and its target is the formalized model from protocol specification, generates the test set (or cycle tests) for test activity.In the test generation technique having proposed at great majority, its basic thought is that system under test (SUT) (System Under Test is called for short SUT) is modeled as to the system of a finite state machine or extended finite state machine, and then generates cycle tests.
Some problems below existing in the test generation technique having proposed: the first, the test based on extended finite state machine generates only considers single process model situation, for the situation of a plurality of concurrent processes that are mutually related, does not relate to.The latter can only be by the various combinations of exhaustive a plurality of concurrent processes, and various combinations are set up respectively to built-up pattern and solve, and the scale of modeling is difficult to accept, and generate to follow-up test and caused obstacle.Second, it is all the situation for network multiple entity that test based on common mode communicating finite statemachine or communication extended finite state machine generates, the situation that does not relate to a plurality of processes in single entities, and the former method of testing state explosion problem that mostly exists built-up pattern to cause.
Summary of the invention
(1) technical problem that will solve
Technical problem to be solved by this invention is: how to solve variable rely on the path cause can not executive problem, avoid state explosion simultaneously.
(2) technical scheme
For solving the problems of the technologies described above, the invention provides a kind of protocol test generation method of the parallel-expansion finite state machine relying on based on variable, described method is in network operation environment, for a tested network equipment, to carry out successively following steps to realize:
Step 1: in computer, the protocol specification of the tested network equipment is described as to a parallel-expansion finite state machine model Ms;
Step 2: adopt and ignore the extended finite state machine test generation technique formation component state machine abstract test suite that variable relies on;
Step 3: for external variable, generation can be carried out outside the pale of civilization portion targeting sequencing;
Step 4: adopt the method for the outside targeting sequencing of link to carry out execution processing to component state machine abstract test suite;
Step 5: generate about external variable across state machine abstract test suite;
Step 6: the abstract test suite of the abstract test suite of processing through step 4 and step 5 generation is merged, delete and repeat or involved cycle tests, obtain the abstract test suite of protocol state machine.
Preferably, step 1 is specially:
If: in the described tested network equipment, comprise one or more agreements, each protocol package is containing one or more processes that can concurrent working, and the standard of each agreement is known; : the described tested network equipment is described with a parallel-expansion finite state machine model, and described parallel-expansion finite state machine model is the set of n component state machine, represents Ms={M with Ms 1, M 2..., M n;
Each component state machine is for describing the standard of each protocol process, described component state machine M irepresent, i=0,1 ..., n, M ieight tuples, M i=(S, s 0, V i, V e, I, O, TR, T):
Wherein, S is M ifinite state set;
S 0∈ S is M iinitial condition;
V i=(V i1, V i2... V ik..., V in), V wherein ikthat all definition and use are all at M iinner variable, is called built-in variable, k=1, and 2 ..., n, n is positive integer, V im ithe set of all built-in variables;
V e=(V e1, V e2... V ek..., V en), V wherein ekall M of being defined in ioutside, but at M ithe variable that inside is used, is called external variable, k=1, and 2 ..., n, n is positive integer, V em ithe set of all external variables;
I=(I 1, I 2... I k..., I n), I wherein km ian incoming symbol, k=1,2 ..., n, n is positive integer, I is M ithe set of all incoming symbols, I is nonempty set;
O=(O 1, O 2... O k..., O n), O wherein km ian output symbol, k=1,2 ..., n, n is positive integer, O is M ithe set of all output symbols, O is nonempty set;
TR=(TR 1, TR 2... TR k..., TR n), TR wherein km ia clock, k=1,2 ..., n, n is positive integer, TR kcan be by M iany transition read, TR is M ithe set of all clocks;
T=(T 1, T 2... T k..., T n) be M ithe set of all transition, T is nonempty set, wherein T km itransition, k=1,2 ..., n, n is positive integer, T kone hexa-atomic group, T k=(s start, s end, I k, O k, P, A):
Wherein, s start∈ S is T kinitial condition;
S end∈ S is T klast current state;
I k∈ I is T kincoming symbol;
O k∈ O is T koutput symbol;
P is about V iin built-in variable, V ein external variable, input I k, some constants and the overtime event of clock predicate expression formula, P has illustrated T kthe condition of carrying out;
A is T kbehavior sequence during execution, A comprises one or more in variable assignments behavior, output behavior and clock establishment behavior, the behavior in A is sequentially carried out.
Preferably, step 2 is carried out successively according to the following steps:
If the set of two Global Component state machines is respectively To_be_generated and Generated, each component state machine has a corresponding test case set TS i, i=1,2 ..., n,
Step 2.1, initialization procedure: empty To_be_generated and Generated;
Step 2.2, by all component state machine M 1, M 2..., M nput into set To_be_generated;
If step 2.3 set To_be_generated is not empty, perform step 2.4~2.10; Otherwise stop;
Step 2.4, from set, take out a component state machine To_be_generated, be denoted as M i;
Step 2.5, to M icarry out following steps:
(1) find out M ievery transition in all definition of internal variable, built-in variable use and external variable is used;
(2) be M ievery transition, generate the short leader sequence contain that minimum external variable uses;
(3) if M ievery transition all completed path and generated, continue step 2.6; Otherwise, get transition, be denoted as T i, carry out following steps:
(3.1) if at T iin each built-in variable of being defined completed generation, repeat (3); Otherwise, get one at T iin the built-in variable that is defined, be denoted as v i, continue (3.2);
(3.2) if use v ieach transition all completed generation, repeat (3.1); Otherwise, get one and use v itransition, be denoted as T j, continue (3.3) j ≠ i;
(3.3) by T iadd path, establish T s=T i;
(3.4) if T sfollow-up transition, be denoted as T s+1, do not contain v idefinition, by T s+1add path, continue (3.5); Otherwise, abandon T s+1, attempt T sother follow-up transition, if T is deleted in the follow-up transition of not attempted from path s, find T in path sleading transition, be denoted as T s-1, make T s=T s-1if, T s=T i, abandon path and jump to (3.2), otherwise repeat (3.4);
(3.5) establish T s+2t s+1follow-up transition, if T s+1not T j, make T s=T s+1, T s+1=T s+2, and repetition (3.4); If T s+1=T j, continue (3.6);
(3.6) if not not executable transition in path continue step 2.6; Otherwise, find not executable transition in path, be denoted as T ue, find and make T uenot executable variable, is denoted as v ueif, v ueexternal variable, mark T uefor carrying out, upgrade T uefor the not executable transition of the next one in path, repeat (3.6); If v uebuilt-in variable, and T ueat M iin leading transition T emiddle existence makes T ueexecutable to v uedefinition, generate T from path ueleading transition set out, comprise transition T eand get back to T in path ueleading ring, ring is inserted in path and continues step 2.6; If cannot generate, make T ueexecutable ring or do not exist and make T ueexecutable T e, abandon this path and jump to (3.2);
Step 2.6, for each paths adds, make state machine get back to the rearmounted sequence of initial condition, form fullpath, then add set TS i;
Step 2.7, deletion set TS imiddle repetition or can be by TS iin the path that comprises, other path;
If step 2.8 M iin not capped transition, perform step 2.9; If M iin still have not capped transition, be denoted as T k, generate the path that covers these transition, add set TS i, repeating step 2.8;
Step 2.9, by M ijoin in set Generated;
Step 2.10, forward step 2.3 to.
Preferably, step 3 is carried out successively according to the following steps:
If an external variable set is EV, two targeting sequencing set are respectively PU and PE:
All transition of step 3.1, traversal all component state machine, put into EV by all outside variablees that use;
All transition of step 3.2, traversal all component state machine, if transition comprise the definition to aleatory variable in EV, generate containing of these transition short leader sequence that uses of minimum external variable put into PU;
All targeting sequencings in step 3.3, traversal PU, if targeting sequencing can be carried out, put into PE by this targeting sequencing;
If step 3.4 PU is empty, continue step 4; If PU is not empty, get targeting sequencing wherein, be denoted as p uif exist and can make p in PE uexecutable one or more targeting sequencing, by these targeting sequencings and p ulink, by p umove in PE and repeating step 3.4; Can be by repeatedly carrying out and make p if existed in PE uexecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p ulink, by p umove in PE and repeating step 3.4; If p ustill cannot carry out, regenerate p uand repeating step 3.4.
Preferably, step 4 is carried out successively according to the following steps:
Step 4.1, traversal all component state machine abstract test suite TS iall cycle testss, if there is the sequence that cannot carry out owing to existing external variable to use, get the sequence that cannot carry out, be denoted as p du, continue step 4.2; If all cycle testss all can be carried out, continue step 5;
If exist and can make p in step 4.2 PE duexecutable one or more targeting sequencing, by these targeting sequencings and p dulink, continues step 4.3; Can be by repeatedly carrying out and make p if existed in PE duexecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p dulink, continues step 4.3; If p dustill cannot carry out, abandon p du;
Step 4.3, repeating step 4.1.
Preferably, step 5 is carried out successively according to the following steps:
Step 5.1: all transition of traversal all component state machine, if all transition all travel through, continue step 6; If still have transition traversal, that contain external variable use, be denoted as t, t is carried out to following steps:
(1) generate the shortest leading sequence of minimum external variable use of containing of t, be denoted as p t;
(2) if exist and can make p in PE texecutable one or more targeting sequencing, by these targeting sequencings and p tlink, continues step 5.2; Can be by repeatedly carrying out and make p if existed in PE texecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p tlink, continues step 5.2; If p tstill cannot carry out, (1) is gone back in redirect;
Step 5.2: all targeting sequencings in traversal PE, if all sequences all travels through, continue step 5.3; If still have not traversal, contain p tthe targeting sequencing of the definition of middle used external variable, by this targeting sequencing and p tlink, forms across state machine cycle tests, adds across state machine abstract test suite;
Step 5.3: repeating step 5.1.
Preferably, after step 6, also comprise step 7: the abstract test suite that step 6 is obtained converts executable test script to.
(3) beneficial effect
The present invention, by introduce the parallel state machine relying on variable in model, has reflected the characteristic of system under test (SUT) better; In the process generating in test, two stages of using generate, first generate and ignore the cycle tests that variable relies on, then by the method for the outside targeting sequencing of link, solved variable rely on the path that causes can not executive problem, avoided state explosion.
Accompanying drawing explanation
Fig. 1 is method flow diagram of the present invention;
Fig. 2 is SAVI-DHCP (SAVI Solution for DHCPv4/v6) protocol state machine schematic diagram;
Fig. 3 is SAVI-SLA (SAVI Solution for Stateless Address) protocol state machine schematic diagram;
Fig. 4 is SAVI-DHCP and SAVI-SLA dependence schematic diagram.
Embodiment
Under regard to the protocol test method of generationing of a kind of parallel-expansion finite state machine relying on based on variable proposed by the invention, detailed description in conjunction with the accompanying drawings and embodiments.
The thinking of method proposed by the invention is: first adopt and ignore the extended finite state machine test generation technique formation component state machine abstract test suite that variable relies on; Then for external variable, rely on, generation can be carried out outside the pale of civilization portion targeting sequencing and itself and component state machine abstract test suite are linked, and the path that solution the latter causes due to external variable use can not executive problem.
As shown in Figure 1, test generation method of the present invention comprises the following steps:
Step 1: in computer, the protocol specification of the tested network equipment is described as to a parallel-expansion finite state machine model Ms;
Step 2: adopt and ignore the extended finite state machine test generation technique formation component state machine abstract test suite that variable relies on;
Step 3: for external variable, generation can be carried out outside the pale of civilization portion targeting sequencing;
Step 4: adopt the method for the outside targeting sequencing of link to carry out execution processing to component state machine abstract test suite;
Step 5: generate about external variable across state machine abstract test suite;
Step 6: merge by component state machine abstract test suite and across state machine abstract test suite, delete and repeat or involved cycle tests, obtain the abstract test suite of protocol state machine;
Step 7: the abstract test suite that step 6 is obtained converts executable test script to.
Below, will relevant step be elaborated:
(1) formalized model
EFSM (Extended Finite State Machine: extended finite state machine) be widely used for describing procotol.But, the concurrent process that some protocol specification comprises a plurality of non-communications in a network entity.Therefore need to simulate protocol specification with the finite state machine of parallel-expansion.Meanwhile, the situation that exists variable to rely between these processes.So needing to use the parallel-expansion finite state machine relying on variable is protocol specification modeling.
The parallel-expansion finite state machine (Parallel Extended Finite Machines with Variable Dependence, referred to as PaEF SM-VD) that [defining 1] relies on variable
The parallel-expansion finite state machine relying on variable is the set of n component state machine, represents Ms={M with Ms 1, M 2..., M n; Each component state machine is for describing the standard of each protocol process.Component state machine M irepresent, i=0,1 ..., n, M ieight tuples, M i=(S, s 0, V i, V e, I, O, TR, T):
● S is M ifinite state set;
● s 0∈ S is M iinitial condition;
● V i=(V i1, V i2... V ik..., V in), V wherein ik(k=1,2 ..., be n) that all definition and use are all at M iinner variable, is called built-in variable, V im ithe set of all built-in variables;
● V e=(V e1, V e2... V ek..., V en), V wherein ek(k=1,2 ..., n) be all M of being defined in ioutside, but at M ithe variable that inside is used, is called external variable, V em ithe set of all external variables;
● I=(I 1, I 2... I k..., I n), I wherein k(k=1,2 ..., n) be M ian incoming symbol, I is M ithe set of all incoming symbols, I can not be null set;
● O=(O 1, O 2... O k..., O n), O wherein k(k=1,2 ..., n) be M ian output symbol, O is M ithe set of all output symbols, O can not be null set;
● TR=(TR 1, TR 2... TR k..., TR n), TR wherein k(k=1,2 ..., n) be M ia clock, TR kcan be by M iany transition read, TR is M ithe set of all clocks;
● T=(T 1, T 2... T k..., T n) be M ithe set of all transition, T can not be null set, wherein T k(k=1,2 ..., n) be M itransition, T kone hexa-atomic group, T k=(s start, s end, I k, O k, P, A):
■ s start∈ S is T kinitial condition;
■ s end∈ S is T klast current state
■ I k∈ I is T kincoming symbol;
■ O k∈ O is T koutput symbol;
■ P is about V iin built-in variable, V ein external variable, input I k, some constant and the overtime event of clock predicate expression formula, P has illustrated T kthe condition of carrying out;
■ A is T kbehavior sequence during execution, A may comprise that variable assignments behavior, output behavior and clock create behavior, the behavior in A should sequentially be carried out.
Example: as shown in Figures 2 and 3, be respectively SAVI-DHCP (SAVI Solution for DHCPv4/v6) agreement and SAVI-SLA (SAVI Solution for Stateless Address) agreement and set up state machine, their transition refer to table 1 and table 2.Analyze transition, obtain the use that the transition 1,5,9,10 in SAVI-DHCP exist variable SAVI-SLA.address and SAVI-SLA.state in SAVI-SLA; The use that transition 8 in SAVI-DHCP exist variable SAVI-DHCP.address and SAVI-DHCP.state in another SAVI-DHCP; The use that transition 2 in SAVI-SLA exist variable SAVI-SLA.address and SAVI-SLA.state in another SAVI-SLA.According to the variable between state machine, rely on, obtain SAVI-DHCP and SAVI-SLA dependence, as shown in Figure 4.
Table 1:SAVI-DHCP transition
Figure BDA0000105306520000111
Figure BDA0000105306520000121
*: the constant that represents maximum binding quantity;
*: represent the DHCPv6 Reply message constant of maximum wait time;
* *: represent the DAD NS message constant of maximum wait time;
* * *: represent the DAD NA message constant of maximum wait time.
Table 2:SAVI-SLA transition
Figure BDA0000105306520000122
*: the constant that represents maximum binding quantity;
*: represent the DAD NA message constant of maximum wait time;
* *: for link-local address binding, be set to infinity.
(2) test generation method
Test generation method comprises that component state machine abstract test suite generates, external variable relies on and can execution operate, across the generation of state machine test set and system testing collection, generate.First from PaEFSM-VD model, for each component state machine generates, ignore the abstract test suite that variable relies on, then link outside targeting sequencing and solve and can not executive problem also generate across state machine abstract test suite, be finally combined to form system abstract test suite.
Ignore the component state machine test generation method that variable relies on, for each component state machine, generation method is compared with the generation method of existing extended finite state machine, just before generation, has added the identification of outside variable uses and in generation, has ignored external variable.
Below will introduce in detail external variable rely on can execution operative algorithm, across state machine test set generating algorithm and system testing set algorithm, and progressively explain in detail:
1. external variable relies on and can execution operate
Ignore the component state machine test generation method that variable relies on, owing to there is the use of external variable, the cycle tests of generation may be not executable, therefore need to carry out execution operating to relating to the sequence of external variable dependence.Can be divided into two steps by execution operating operation, first need find the outside targeting sequencing of definition external variable and they can be carried out, and then by these outside targeting sequencings and not executable sequence link, just can obtain executable cycle tests.
If a set that has all external variables is EV, two targeting sequencing set are respectively PU and PE.Below for component state machine cycle tests can execution algorithm.
[algorithm 1] component state machine cycle tests can execution algorithm
Figure BDA0000105306520000131
Above-mentioned algorithm should complete to test on the basis generating in the component state machine test generation method of each component state machine use being ignored to variable dependence and carry out.
2. across state machine test set, generate
The component state machine test generation method that variable relies on is ignored in use, except generating, can not carry out cycle tests, simultaneously due to its one by one state machine independently generate, cannot guarantee the covering in definition-use path that external variable is all.Therefore, need to carry out generating across state machine test set.
[algorithm 2] is across state machine test set generating algorithm
Figure BDA0000105306520000151
Figure BDA0000105306520000161
3. system testing collection generates
In above-mentioned algorithm, the cycle tests of generation may with through can execution component state machine cycle tests after operation repeat, therefore need to merge two parts test set.Travel through successively all component state machine test set and across state machine test set, delete the sequence repeating, and the sequence that can be comprised by other sequences completely, final system testing collection obtained.
Owing to ignoring the outside component state machine test generation method relying on, realized the definition completely-use covering to built-in variable, across state machine test, generate the definition completely-use having realized external variable and cover, definition completely-use that the final system testing energy collecting that method of the present invention generates enough realizes all variablees of system covers.
(3) experiment
Adopt above method, generated for SAVI-DHCP, SAVI-SLA with across the test set of state machine, be respectively 7,2 and 28 test cases, as shown in table 3, table 4 and table 5:
Table 3:SAVI-DHCP cycle tests
Figure BDA0000105306520000162
Table 4:SAVI-SLA cycle tests
Figure BDA0000105306520000171
Table 5: across state machine cycle tests
Figure BDA0000105306520000172
Transition with underscore in cycle tests in table 5 are the transition that should carry out according to protocol specification.
As can be seen here, the present invention has reached expection object.
Above execution mode is only for illustrating the present invention; and be not limitation of the present invention; the those of ordinary skill in relevant technologies field; without departing from the spirit and scope of the present invention; can also make a variety of changes and modification; therefore all technical schemes that are equal to also belong to category of the present invention, and scope of patent protection of the present invention should be defined by the claims.

Claims (2)

1. the protocol test generation method of the parallel-expansion finite state machine relying on based on variable, is characterized in that, described method is in network operation environment, for a tested network equipment, to carry out successively following steps to realize:
Step 1: in computer, the protocol specification of the tested network equipment is described as to a parallel-expansion finite state machine model Ms;
Step 2: adopt and ignore the extended finite state machine test generation technique formation component state machine abstract test suite that variable relies on;
Step 3: for external variable, generation can be carried out outside the pale of civilization portion targeting sequencing;
Step 4: adopt the method for the outside targeting sequencing of link to carry out execution processing to component state machine abstract test suite;
Step 5: generate about external variable across state machine abstract test suite;
Step 6: by merging across state machine abstract test suite of the component state machine abstract test suite of processing through step 4 and step 5 generation, delete and repeat or involved cycle tests, obtain the abstract test suite of protocol state machine;
Wherein, step 1 is specially:
If: in the described tested network equipment, comprise one or more agreements, each protocol package is containing one or more processes that can concurrent working, and the standard of each agreement is known; : the described tested network equipment is described with a parallel-expansion finite state machine model, and described parallel-expansion finite state machine model is the set of n component state machine, represents Ms={M with Ms 1, M 2..., M n;
Each component state machine is for describing the standard of each protocol process, described component state machine M irepresent, i=0,1 ..., n, M ieight tuples, M i=(S, s 0, V i, V e, I, O, TR, T):
Wherein, S is M ifinite state set;
S 0∈ S is M iinitial condition;
V i=(V i1, V i2... V ik..., V in), V wherein ikthat all definition and use are all at M iinner variable, is called built-in variable, k=1, and 2 ..., n, n is positive integer, V im ithe set of all built-in variables;
V e=(V e1, V e2... V ek..., V en), V wherein ekall M of being defined in ioutside, but at M ithe variable that inside is used, is called external variable, k=1, and 2 ..., n, n is positive integer, V em ithe set of all external variables;
I=(I 1, I 2... I k..., I n), I wherein km ian incoming symbol, k=1,2 ..., n, n is positive integer, I is M ithe set of all incoming symbols, I is nonempty set;
O=(O 1, O 2... O k..., O n), O wherein km ian output symbol, k=1,2 ..., n, n is positive integer, O is M ithe set of all output symbols, O is nonempty set;
TR=(TR 1, TR 2... TR k..., TR n), TR wherein km ia clock, k=1,2 ..., n, n is positive integer, TR kcan be by M iany transition read, TR is M ithe set of all clocks;
T=(T 1, T 2... T k..., T n) be M ithe set of all transition, T is nonempty set, wherein T km itransition, k=1,2 ..., n, n is positive integer, T kone hexa-atomic group, T k=(s start, s end, I k, O k, P, A):
Wherein, s start∈ S is T kinitial condition;
S end∈ S is T klast current state;
I k∈ I is T kincoming symbol;
O k∈ O is T koutput symbol;
P is about V iin built-in variable, V ein external variable, input I k, some constants and the overtime event of clock predicate expression formula;
A is T kbehavior sequence during execution, A comprises one or more in variable assignments behavior, output behavior and clock establishment behavior, the behavior in A is sequentially carried out;
Wherein, step 2 is carried out successively according to the following steps:
If the set of two Global Component state machines is respectively To_be_generated and Generated, each component state machine has a corresponding test case set TS i, i=1,2 ..., n,
Step 2.1, initialization procedure: empty To_be_generated and Generated;
Step 2.2, by all component state machine M 1, M 2..., M nput into set To_be_generated;
If step 2.3 set To_be_generated is not empty, perform step 2.4~2.10; Otherwise stop;
Step 2.4, from set, take out a component state machine To_be_generated, be denoted as M i;
Step 2.5, to M icarry out following steps:
(1) find out M ievery transition in all definition of internal variable, built-in variable use and external variable is used;
(2) be M ievery transition, generate the short leader sequence contain that minimum external variable uses;
(3) if M ievery transition all completed path and generated, continue step 2.6; Otherwise, get transition, be denoted as T i, carry out following steps:
(3.1) if at T iin each built-in variable of being defined completed generation, repeat (3); Otherwise, get one at T iin the built-in variable that is defined, be denoted as v i, continue (3.2);
(3.2) if use v ieach transition all completed generation, repeat (3.1); Otherwise, get one and use v itransition, be denoted as T j, continue (3.3) j ≠ i;
(3.3) by T iadd path, establish T s=T i;
(3.4) if T sfollow-up transition, be denoted as T s+1, do not contain v idefinition, by T s+1add path, continue (3.5); Otherwise, abandon T s+1, attempt T sother follow-up transition, if T is deleted in the follow-up transition of not attempted from path s, find T in path sleading transition, be denoted as T s-1, make T s=T s-1if, T s=T i, abandon path and jump to (3.2), otherwise repeat (3.4);
(3.5) establish T s+2t s+1follow-up transition, if T s+1not T j, make T s=T s+1, T s+1=T s+2, and repetition (3.4); If T s+1=T j, continue (3.6);
(3.6) if not not executable transition in path continue step 2.6; Otherwise, find not executable transition in path, be denoted as T ue, find and make T uenot executable variable, is denoted as v ueif, v ueexternal variable, mark T uefor carrying out, upgrade T uefor the not executable transition of the next one in path, repeat (3.6); If v uebuilt-in variable, and T ueat M iin leading transition T emiddle existence makes T ueexecutable to v uedefinition, generate T from path ueleading transition set out, comprise leading transition T eand get back to T in path ueleading ring, ring is inserted in path and continues step 2.6; If cannot generate, make T ueexecutable ring or do not exist and make T ueexecutable T e, abandon this path and jump to (3.2);
Step 2.6, for each paths adds, make state machine get back to the rearmounted sequence of initial condition, form fullpath, then add set TS i;
Step 2.7, deletion set TS imiddle repetition or can be by TS iin the path that comprises, other path;
If step 2.8 M iin not capped transition, perform step 2.9; If M iin still have not capped transition, be denoted as T k, generate the path that covers these transition, add set TS i, repeating step 2.8;
Step 2.9, by M ijoin in set Generated;
Step 2.10, forward step 2.3 to;
Wherein, step 3 is carried out successively according to the following steps:
If an external variable set is EV, two targeting sequencing set are respectively PU and PE:
All transition of step 3.1, traversal all component state machine, put into EV by all outside variablees that use;
All transition of step 3.2, traversal all component state machine, if transition comprise the definition to aleatory variable in EV, generate containing of these transition short leader sequence that uses of minimum external variable put into PU;
All targeting sequencings in step 3.3, traversal PU, if targeting sequencing can be carried out, put into PE by this targeting sequencing;
If step 3.4 PU is empty, continue step 4; If PU is not empty, get targeting sequencing wherein, be denoted as p uif exist and can make p in PE uexecutable one or more targeting sequencing, by these targeting sequencings and p ulink, by p umove in PE and repeating step 3.4; Can be by repeatedly carrying out and make p if existed in PE uexecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p ulink, by p umove in PE and repeating step 3.4; If p ustill cannot carry out, regenerate p uand repeating step 3.4;
Wherein, step 4 is carried out successively according to the following steps:
Step 4.1, traversal all component state machine abstract test suite TS iall cycle testss, if there is the sequence that cannot carry out owing to existing external variable to use, get the sequence that cannot carry out, be denoted as p du, continue step 4.2; If all cycle testss all can be carried out, continue step 5;
If exist and can make p in step 4.2 PE duexecutable one or more targeting sequencing, by these targeting sequencings and p dulink, continues step 4.3; Can be by repeatedly carrying out and make p if existed in PE duexecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p dulink, continues step 4.3; If p dustill cannot carry out, abandon p du;
Step 4.3, repeating step 4.1;
Wherein, step 5 is carried out successively according to the following steps:
Step 5.1: all transition of traversal all component state machine, if all transition all travel through, continue step 6; If still have transition traversal, that contain external variable use, be denoted as t, t is carried out to following steps:
(1) generate containing of the t short leader sequence that uses of minimum external variable, be denoted as p t;
(2) if exist and can make p in PE texecutable one or more targeting sequencing, by these targeting sequencings and p tlink, continues step 5.2; Can be by repeatedly carrying out and make p if existed in PE texecutable one or more definition, generates the targeting sequencing that contains these definition to encircle and form new targeting sequencing, by new targeting sequencing and p tlink, continues step 5.2; If p tstill cannot carry out, (1) in step 5.1 is gone back in redirect;
Step 5.2: all targeting sequencings in traversal PE, if all sequences all travels through, continue step 5.3; If still have not traversal, contain p tthe targeting sequencing of the definition of middle used external variable, by this targeting sequencing and p tlink, forms across state machine cycle tests, adds across state machine abstract test suite;
Step 5.3: repeating step 5.1.
2. the method for claim 1, is characterized in that, also comprises step 7: the abstract test suite that step 6 is obtained converts executable test script to after step 6.
CN201110344327.7A 2011-11-03 2011-11-03 Protocol test generating method of parallel expansion finite-state machine based on variable dependence Active CN102404167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110344327.7A CN102404167B (en) 2011-11-03 2011-11-03 Protocol test generating method of parallel expansion finite-state machine based on variable dependence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110344327.7A CN102404167B (en) 2011-11-03 2011-11-03 Protocol test generating method of parallel expansion finite-state machine based on variable dependence

Publications (2)

Publication Number Publication Date
CN102404167A CN102404167A (en) 2012-04-04
CN102404167B true CN102404167B (en) 2014-02-19

Family

ID=45885980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110344327.7A Active CN102404167B (en) 2011-11-03 2011-11-03 Protocol test generating method of parallel expansion finite-state machine based on variable dependence

Country Status (1)

Country Link
CN (1) CN102404167B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103391224B (en) * 2013-07-22 2016-07-06 清华大学 Protocol hierarchy Self-adaptive method based on parallel-expansion finite state machine
CN103441990B (en) * 2013-08-09 2016-03-30 中国人民解放军理工大学 The automatic estimating method of protocol state machine based on state fusion
CN104077228B (en) * 2014-07-08 2016-08-17 浙江理工大学 A kind of EFSM based on predicate dependency graph can perform method for creating test sequence
CN104243243B (en) * 2014-10-14 2017-08-04 清华大学 A kind of method for generating protocol test sequence
CN104572457B (en) * 2014-12-30 2017-07-14 北京工业大学 A kind of method transformed the non-universal finite state machine containing special transfer process
CN107895096B (en) * 2017-12-21 2020-07-28 北京华大九天软件有限公司 Calculation optimization method of Verilog-A model in circuit simulator
CN108536606B (en) * 2018-04-22 2021-01-19 北京化工大学 EFSM test method based on composite dependency coverage criterion
CN108614887B (en) * 2018-05-03 2021-05-18 合肥工业大学 Internet of things information processing method and system with noise in supply chain environment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7392509B2 (en) * 2004-04-13 2008-06-24 University Of Maryland Method for domain specific test design automation
CN100347993C (en) * 2005-09-27 2007-11-07 清华大学 Protocol interoperation characteristic test generating method based on communication multi-port finite state machine
FI7354U1 (en) * 2005-10-12 2007-01-12 Patria Systems Oy JTAG testing arrangement for an integrated circuit
CN100583057C (en) * 2008-04-22 2010-01-20 中国科学院软件研究所 Credible password module test case creation method and its test system
CN101388807B (en) * 2008-05-22 2011-03-30 清华大学 Protocol robustness test generation method based on packet mutation

Also Published As

Publication number Publication date
CN102404167A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
CN102404167B (en) Protocol test generating method of parallel expansion finite-state machine based on variable dependence
Tan et al. relifix: Automated repair of software regressions
CN112153030B (en) Internet of things protocol security automatic analysis method and system based on formal verification
CN105335137A (en) Method and device used for processing source file
US20050262456A1 (en) Verifying one or more properties of a design using SAT-based BMC
JP6387182B2 (en) Information processing method, apparatus, and computer storage medium
CN102662644A (en) Method for generating test case by using flow chart
Tonini et al. Analysis and evaluation of the android best practices impact on the efficiency of mobile applications
CN103391224B (en) Protocol hierarchy Self-adaptive method based on parallel-expansion finite state machine
CN105718698A (en) Timing sequence netlist management method and device
CN103440363B (en) Abnormal signal source tracing method in a kind of FPGA placement-and-routing post-simulation
Liu et al. Complexity of the soundness problem of bounded workflow nets
CN110647457B (en) Data mining method, data processing method and system
Ural et al. Distributed testing without encountering controllability and observability problems
Hüchting et al. A theory of name boundedness
CN105760373A (en) Abnormal data processing method and abnormal data processing device
CN104731705A (en) Dirty data propagation path finding method based on complex network
CN104951609B (en) A kind of method of synchronous logic structure in processing gate level netlist
CN103150255B (en) A kind of script method of testing and device
Vizovitin et al. Verifying UCM specifications of distributed systems using colored Petri nets
CN106940772B (en) Variable object tracking method and device
US9477800B1 (en) System, method, and computer program product for automatically selecting a constraint solver algorithm in a design verification environment
Kakarla et al. Oracle-based Protocol Testing with Eywa
Chardigny et al. Search-based extraction of component-based architecture from object-oriented systems
Tran et al. On locally minimum and strongest assumption generation method for component-based software verification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant