Background technology
It is the very high formalization verification method of a kind of automaticity that model detects, and the system that is verified in model detects represents with a state transition graph, can determine by traveling through this figure whether this system satisfies certain attribute.Yet along with the continuous growth of system scale, model detects the more and more serious state explosion problem that is faced with, and therefore the practicality that model detects also has been subjected to restriction.
Use a model to detect circuit is carried out the formalization checking, need that at first side circuit is converted into one and be automat, and the functional description of circuit become an attribute, then by checking on automat whether attribute is true, comes decision circuitry whether to realize required function.When attribute is fictitious time on automat, model checking tools can generate a counter-example, and path of violating attribute just is for analyzing.
A circuit comprises input, internal register and output.For example: the circuit in Fig. 1 comprises input 101, register 102, output 103.In each clock period of circuit, the value of input 101 value and register 102 by or door 104 carry out computing, in output 103, export the result, this result is used in the value that refreshes register 102 when entering next clock period simultaneously.Automat is a state transition graph, and as shown in Figure 2, each node is represented a state, and bilateral node is an original state, and internodal directed edge is represented the migration of state, is marked with the atom predicate on each state.4 kinds of values of the input 101 of circuit and register 102 are, the input 101 be 0 and register 102 be 0, the input 101 be 1 and register 102 be 0, the input 101 be 0 and register 102 be 1, the input 101 be 1 and register 102 be 1,4 states of automat have been formed, state 201, state 202, state 203 and state 204.The value of input 101, output 103 and register 102 forms the atom predicate.For example: the value of register 102 corresponding to atom predicate r and-r, when the value of register 102 is 1 on a state, mark r on this state, otherwise mark-r.The value of register 102 is changed to 0 when supposing circuit start, and then state 201 and state 202 become original state.
Directed edge in the automat is corresponding to the state exchange of circuit between the adjacent clock period.With the relevant path of checking, be called the fair path of expansion in the automat.The fairness constraint then is used to get rid of some the irrelevant paths in the automat.The fairness constraint is made up of a pair of atom predicate, and for example (a, b), wherein a is an atom predicate, b is an atom predicate.One paths satisfy fairness constraint (a, b), and if only if on this path, if mark has been arranged on unlimited state atom predicate a, mark has then been arranged on unlimited state atom predicate b.One paths is the fair path of expansion, and and if only if, and this path is unlimited path and satisfies all fairness constraints that perhaps this path is that finite path and last state of this path are final state, does not just have the limit from this state.
Attribute is a sequential logic formula, use symbol φ,
Or ψ represents.The simplest attribute is exactly an atom predicate, for example: φ=a, a state satisfies atom predicate a, on and if only if this state mark a.∧ and ∨ are respectively logical and and logical OR, and for example: a state satisfies
∧ ψ, and if only if, and this state satisfies
And satisfy ψ.
A
eBe the path measure word, expression is expanded fair path from all of a state.
X, U, G and
UBe the sequential operation symbol, be used for describing the path.X (
) the expression path comprises at least two states, and second state in path satisfies attribute
[
U ψ] expression has a state to satisfy attribute ψ on the path, and all states before this state all satisfy attribute
G (
) represent that the path is unlimited, a unlimited state is just arranged on the path, and all states on the path all satisfy attribute
Uψ] the expression path satisfy [
U ψ] or satisfy G (
).
Path measure word and sequential operation symbol always use in pairs, and for example: a state satisfies A
eX (
), and if only if all comprises at least two states for expanding fair path from all of this state, and these second states expanding fair path all satisfy attribute
Attribute is true on automat, and all original states of and if only if automat all satisfy this attribute.For example, circuit function is among Fig. 1, in case import 101 inputs 1, then after this exports 103 outputs 1 forever.This function can be used attribute A
eG (a ∨ A
eG (b)) describe, its meaning is, for each state that can reach from original state, A
eG, input 101 is not 1 on this state ,-a, perhaps the output of output 103 all is 1 on this state and succeeding state thereof, A
eG (b).Therefore the satisfying property of checking an attribute on automat comprised for two steps, found out at first that all satisfy the state of this attribute in the automat, was called the semanteme of this attribute in automat, checked then whether described state comprises all original states of automat.
Finding the solution semanteme is the process of a recurrence, as shown in Figure 3, and attribute A
eG (a ∨ A
eG (b)) can be regarded as one tree, semantic finds the solution from leaf, at first finds the solution-semanteme 301 of a C
1, just the state of underlined-a, find the solution the semanteme 302 of b, C
2Then find the solution A
eG (C
2) semanteme 303, C
3, just all satisfy the state of following condition: from the fair path of the expansion of this state, this expands fair path for unlimited, and all states on the path are all at C for each
2In; Then find the solution C
1∨ C
3Semanteme 304, C
4, just all are at C
1In or at C
3In state; Find the solution A at last
eG (C
4) semanteme 305, semantic 305 A just
eG (a ∨ A
eG (b)) semanteme.Therefore, the semanteme of finding the solution nested formula is the semanteme of finding the solution a series of non-nested formula, and non-nested formula is called fundamental formular.
It is the satisfying property of checking attribute by the state of traversal automat that model detects.Because the status number of automat increases with input and the number of registers exponentially level in the circuit, therefore when circuit scale becomes big, the state explosion problem will occur, promptly the state of automat is too many, makes the required room and time of calculating all can't make us accepting.A kind of method that relaxes state explosion is to use model abstract.
The model abstraction cognition is normally combined by a plurality of submodules to large-scale system to be verified, thereby can earlier each submodule be abstracted into less abstract module, these abstract modules is combined to form the abstract model of a system to be verified again.Because the submodule scale is less, therefore state explosion can not appear in abstract process.The abstract model that equally finally obtains is also little than primal system, thereby carries out attribute checking thereon and state explosion can not occur.
As shown in Figure 4, a big circuit 401 is made up of 2 submodules 403 and submodule 404, and directly treatment circuit 401 can produce state explosion.For fear of state explosion, can earlier submodule 403 and submodule 404 be abstracted into abstract submodule 405 of less model and abstract submodule 406, again abstract submodule 405 and abstract submodule 406 the are combined abstract model 402 of generative circuit 401 replaces circuit 401 to check the satisfying property of attribute with abstract model 402 at last.
The abstract ultimate principle of model is that the state space with master pattern is divided into several piecemeals, thus then with each piecemeal abstract be that an abstract state forms an abstract model littler than master pattern.A key issue during model is abstract is how to divide the state space of master pattern.The piecemeal of dividing is many more, and the information that abstract model kept is many more, and the attribute that can verify on abstract model is also many more, but the scale of corresponding abstract model can increase.Therefore the verifier must select suitable division, to obtain the acceptable abstract model of scale, guarantees that simultaneously given attribute can verify on this abstract model.Usually the verifier can use the interface predicate of master pattern to generate an initial division earlier, then this division is further cut apart so that it keeps abundant information.
As shown in Figure 5, the state space of left side master pattern is divided into 3 piecemeals, and each piecemeal is corresponding to an abstract state in the abstract model of the right.The create-rule on the limit in the abstract model is, if in master pattern, the state of the state of a limit from a piecemeal in another piecemeal arranged, these two piecemeals are identical or different piecemeal, then in abstract model, have a limit from a pairing abstract state of piecemeal to the pairing abstract state of another piecemeal.Can prove that then this attribute also is true if an attribute is true in master pattern in abstract model.But when an attribute be fictitious time in abstract model, this attribute differs in master pattern and is decided to be vacation, that is to say that the counter-example that generates differs to correspond to a paths in the master pattern surely in abstract model, claims that this counter-example is pseudo-counter-example at this moment.For example, the abstract path of being made up of abstract state 503, abstract state 502 and abstract state 501 among Fig. 5 can not correspond to the paths in the master pattern.For fear of pseudo-counter-example, can divide the stronger condition that applies to the state of master pattern, for example can require for piecemeal 1 and piecemeal 2 arbitrarily, all there be the state of a limit in the piecemeal 2 in all states in the piecemeal 1, or do not have state to have the state of a limit in the piecemeal 2 in the piecemeal 1.Under this condition, can prove that an attribute is true in abstract model, and if only if, and this attribute is true in master pattern.But the piecemeal of this condition in many times can causing dividing is too much, thereby can't generate the acceptable abstract automaton of scale.
Cut apart the work that division work is a complexity, existing automatic mode can't obtain gratifying result usually, therefore current this work depends on verifier's hand labour in a large number, and it is also higher to verifier's requirement that work is cut apart in this craft, needs the verifier that the structure of master pattern is had enough understandings.This has limited the abstract application of model to a great extent.
Summary of the invention
For addressing the above problem, the invention provides model abstract method and system thereof in the model detection, can only provide under the prerequisite that instructs attribute, instruct attribute automatically to finish according to this and cut apart work, make the division after cutting apart to keep the information relevant simultaneously with instructing attribute.
The invention discloses the model abstract method in the model detection, comprising:
Step 1 is imported master pattern and is instructed attribute;
Step 2 for described each node of attribute that instructs is found the solution its super semanteme in described master pattern, is that described each the non-leaf node of attribute that instructs is found the solution corresponding basic sequence according to described super semanteme;
Step 3 is set up division to the state space of described master pattern;
Step 4 is used the described super semanteme of attribute, each described node and the basic sequence of each non-leaf node of instructing and is cut apart described division;
Step 5 is that described each node of attribute that instructs sets up corresponding proof model, uses described proof model and further cuts apart division after described step 4 is cut apart;
Step 6 is generated the abstract model of described master pattern correspondence by the described division after further cutting apart.
Described step 2 further is,
Begin to find the solution super semanteme described master pattern from the described leaf node that instructs attribute, begin to find the solution corresponding basic sequence from the described root node of attribute that instructs for described each the non-leaf node of attribute that instructs according to described super semanteme for described each node that instructs attribute.
Begin to the super semanteme that described each node that instructs attribute is found the solution described master pattern from the described leaf node that instructs attribute in the described step 2 further be
Step 31 is the described leaf node that instructs attribute, and the fundamental formular of finding the solution described node is described node, finds the solution the super semanteme of described node by described fundamental formular;
Step 32 is the described non-leaf node that instructs attribute, and the fundamental formular of finding the solution described node is the tree that the child node of described node and described node constitutes, and wherein said child node is with the super semantic replacement of its correspondence; Find the solution the super semanteme of described node by described fundamental formular.
Begin to find the solution corresponding basic sequence from the described root node that instructs attribute according to described super semanteme in the described step 2 and further be for described each non-leaf node that instructs attribute,
Step 41, the basic status set of finding the solution described node for the described root node that instructs attribute be the super semanteme of described node correspondence, gathers and the fundamental formular of described node correspondence is found the solution the basic sequence of described node according to described basic status;
Step 42, find the solution the union of the basic status set of described node for the described non-root node of attribute that instructs, find the solution the basic sequence of described node according to the fundamental formular of described basic status set and described node correspondence for described node corresponding state set in the basic sequence of its father node.
Described step 3 further is,
Step 51 is established as the division with a piecemeal with the state space of described master pattern;
Step 52 is identified for cutting apart the cutting state set of described division;
Step 53 is used described cutting state and is gathered the piecemeal of cutting apart in the described division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.。
Described step 52 further is,
Step 61, determine mark in the described master pattern set of state of interface atom predicate be a described cutting state set.
Described step 52 further is,
Step 71, determine mark in the described master pattern form the first atom predicate of the fair constraint condition of described master pattern the set of state be a described cutting state set; Determine mark in the described master pattern form the second atom predicate of the fair constraint condition of described master pattern the set of state be a described cutting state set.
Described step 52 further is,
Step 81, the set of determining final state in the described master pattern are a described cutting state set.
Described step 4 further is,
Step 91, the basic sequence of using the described super semanteme that instructs attribute, each described node and each described non-leaf node are identified for cutting apart the cutting state set of described division;
Step 92 is used described cutting state and is gathered the piecemeal of cutting apart in the described division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
Described step 91 further is,
Step 101, determine mark in the described master pattern set of state of the described atom predicate that instructs attribute be a described cutting state set;
Step 102 determines that the described super semanteme that instructs each node of attribute is a described cutting state set;
Step 103 determines that each state set in the described basic sequence that instructs each non-leaf node of attribute is a described cutting state set.
Also comprise after the described step 92:
Step 111, and the fair constraint of interpolation in described master pattern (True, p), wherein, True is the atom predicate that is used for mark on free position, p is for being used at master pattern at B
1Remove C
nDifference set outside state on the atom predicate of mark, wherein, B
1Instruct shape such as A in the attribute for described
e UThe super semanteme of first child node of node, C
nSuper semanteme for described node.
Be that the described corresponding proof model of each node foundation of attribute that instructs further is in the described step 5,
Step 121 is set up the set that comprises with the relevant limit of the relevant state of the corresponding fundamental formular of described node for described node, and described set is the set of basic limit;
Step 122 is deleted the limit that is not included in the described master pattern in the described basic limit set, thereby generates the proof model of described node correspondence.
Division after the described proof model of application is cut apart described step 4 in the described step 5 is cut apart further,
Step 131 is identified for further cutting apart the cutting state set of described division according to the path measure word that occurs in the described node, sequential operation symbol and described proof model;
Step 132 is used described cutting state and is gathered the piecemeal of cutting apart in the described division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
Described step 131 further is,
Step 141 is determined described instruct shape such as A in the attribute
eU or A
e UThe proof model of node in the set of final state be a described cutting state set.
Using the division that described proof model further cuts apart after described step 4 is cut apart in the described step 5 further is,
Step 151, repeated execution of steps 152 and step 153 do not have piecemeal to be cut apart in when carrying out described step 153;
Step 152 is identified for cutting apart the cutting state set of described division according to the piecemeal in path measure word, sequential operation symbol, described proof model and the described division of described node;
Step 153 is used described cutting state and is gathered the piecemeal of cutting apart in the described division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
Described step 152 further is,
Step 161 is for each shape such as A
eThe node of X, and each piecemeal of described division determine that having the set of the state on the limit of state in the described piecemeal in the proof model of described node is a described cutting state set.
Described step 152 further is,
Step 171 is for each shape such as A
eU or A
e UNode, and each piecemeal of described division, determine in the proof model of described node starting point as the fair path of unlimited expansion, and all states in the fair path of described expansion all the set of the state in described piecemeal be a described cutting state set.
Described step 152 further is,
Step 181 is for each shape such as A
eU or A
e UNode, and per two different piecemeals of described division, determine in the proof model of described node starting point as limited path, and last state in described path is in a described piecemeal, and the set of the state of other states in another piecemeal in described path is a cutting state set.
The piecemeal in the described division is cut apart in the described cutting state set of described application, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are that sky further is with each described cutting state intersection of sets collection,
Step 191 for each piecemeal in the described division, if described piecemeal is not that sky and the difference set of removing described cutting state set are not empty with described cutting state intersection of sets collection, then is divided into described piecemeal described common factor and described difference set.
Also comprise after the described step 153,
Step 201 instructs shape such as A in the attribute for described
eU or A
e UNode, if there is a limit in the proof model of described node, the state of the starting point on described limit and terminal point correspondence is arranged in a piecemeal of described division, and there is not a unlimited path in the described proof model, all in described piecemeal, then execution in step 222 for all states in described path;
Step 202, and the fair constraint of interpolation in described master pattern (True, p), wherein, True is the atom predicate that is used for mark on free position, p is the atom predicate that is used for mark on the state outside the piecemeal described in the master pattern.
Described step 6 further is,
Step 211 is abstracted into an abstract state in the abstract model with each piecemeal in the described division;
Step 212, the piecemeal corresponding abstract state in described abstract model that comprises the original state of described master pattern in the described division is the original state of described abstract model;
Step 213, for two piecemeals in the described division, two piecemeals are identical or different piecemeal, if there is the limit of from described piecemeal state state in another described piecemeal in the described master pattern, then in described abstract model to the limit from the abstract state of a described piecemeal correspondence to the abstract state of another described piecemeal correspondence should be arranged;
Step 214, for an atom predicate in the described master pattern, if in the described division each piecemeal with mark in the master pattern described atom predicate state the intersection of sets collection for empty or remove mark in the master pattern difference set of set of state of described atom predicate for empty, the atom predicate that then described atom predicate is described abstract model, in described master pattern mark the described atom predicate of mark on the corresponding abstract state of piecemeal at state place of described atom predicate;
Step 215, described abstract model are inherited all fairness constraints of described master pattern.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is an atom predicate, when being expressed as p, the super semanteme of described node be in the described master pattern mark set of state of p.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is B
1∧ B
2The time, the super semanteme of described node is B
1∩ B
2, B wherein
1∩ B
2Expression B
1And B
2Common factor, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is B
1∨ B
2The time, the super semanteme of described node is B
1∪ B
2, B wherein
1∪ B
2Expression B
1And B
2Union, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is A
eX (B
1) time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, described condition be in described master pattern, exist a limit from described state to B
1In state, wherein, B
1Super semanteme for the child node of described node.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is A
e[B
1UB
2] time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, and described condition is for existing the path from described state in described master pattern, and j the state in described path is at B
2In, and preceding j-1 the state in described path is at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, j is the integer more than or equal to 1.
The super semanteme of finding the solution described node by described fundamental formular in the described step 31 further is,
When described fundamental formular is A
e[B
1 UB
2] time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, and described condition is for existing the path from described state in described master pattern, and j the state in described path is at B
2In, and the preceding j in described path
-1Individual state is at B
1In, perhaps in described master pattern, have a fair path of the unlimited expansion from described state, and all states on the described unlimited fair path of expansion are all at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, j is the integer more than or equal to 1.
The basic sequence of finding the solution described node according to the fundamental formular of set of described basic status and described node correspondence in described step 41 and the described step 42 further is,
When described fundamental formular is B
1∧ B
2The time, the basic sequence of described node comprises two set, and described two set all are respectively described basic status set, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
The basic sequence of finding the solution described node according to the fundamental formular of set of described basic status and described node correspondence in described step 41 and the described step 42 further is,
When described fundamental formular is B
1∨ B
2The time, the basic sequence of described node comprises two set, and first set is D
n∩ B
1, second set is D
n∩ B
2, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, D
nBe described basic status set.
The basic sequence of finding the solution described node according to the fundamental formular of set of described basic status and described node correspondence in described step 41 and the described step 42 further is,
When described fundamental formular is A
eX (B
1) time, the basic sequence of described node comprises a set, is the set of the state that satisfies condition in the described master pattern, and described condition is that described state is at B
1In, and in described master pattern, exist the state of a limit from described basic status set to described state, and wherein, B
1Super semanteme for the child node of described node.
The basic sequence of finding the solution described node according to the fundamental formular of set of described basic status and described node correspondence in described step 41 and the described step 42 further is,
When described fundamental formular is A
e[B
1UB
2] time, the basic sequence of described node comprises two set;
First set is the set of the state that satisfies condition in the described master pattern, and described condition is that described path is from D on the path of described state in a described master pattern
n∩ B
1In state set out, and all states on the described path are all at C
n∩ B
1In;
Second set is the set of the state that satisfies condition in the described master pattern, and described condition is that described state is at C
nB
1In, C wherein
nB
1Expression C
nAnd B
1Difference set, and in described master pattern, exist the state of a limit from described first set to described state, perhaps described state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in;
Wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, C
nBe the super semanteme of described node, D
nBe described basic status set, V
n[1] is described first set.
The basic sequence of finding the solution described node according to the fundamental formular of set of described basic status and described node correspondence in described step 41 and the described step 42 further is,
When described fundamental formular is A
e[B
1 UB
2] time, the basic sequence of described node comprises two set;
First set is the set of the state that satisfies condition in the described master pattern, and described condition is that described state exists a paths in described master pattern, and described path is from D
n∩ B
1In state set out, and all states on the described path are all at C
n∩ B
1In;
Second set is the set of the state that satisfies condition in the described master pattern, and described condition is that this state is at C
nB
1In, C wherein
nB
1Expression C
nAnd B
1Difference set, and in described master pattern, exist the state of a limit from described first set to described state; Perhaps described state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in;
Wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, C
nBe the super semanteme of described node, D
nBe described basic status set, V
n[1] is described first set.
Described step 121 further is that when the fundamental formular of described node was an atom predicate, described basic limit set was an empty set.
Described step 121 further is, when the fundamental formular of described node is B
1∧ B
2The time, described basic limit set is an empty set, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
Described step 121 further is, when the fundamental formular of described node is B
1∨ B
2The time, described basic limit set is an empty set, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
Described step 121 further is, when the fundamental formular of described node is A
eX (B
1) time, described basic limit set is the set on the limit of state from the basic status set of described node in the described master pattern, wherein, and B
1Super semanteme for the child node of described node.
Described step 121 further is, when the fundamental formular of described node is A
e[B
1UB
2] time, the set of described basic limit is the set on the limit of state from first set of the basic sequence of described node in the described master pattern, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
Described step 121 further is, when the fundamental formular of described node is A
e[B
1 UB
2] time, the set of described basic limit is the set on the limit of state from first set of the basic sequence of described node in the described master pattern, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
The invention also discloses the model abstract system of model in detecting, comprising: load module, find the solution module, divide module, refinement module, abstract module, described refinement module comprises the first refinement module and the second refinement module,
Described load module is used to import master pattern and instructs attribute;
The described module of finding the solution is used to described each node of attribute that instructs to find the solution its super semanteme in described master pattern, is that described each the non-leaf node of attribute that instructs is found the solution corresponding basic sequence according to described super semanteme;
Described division module is used for the state space of described master pattern is set up division;
The described first refinement module is used the described super semanteme of attribute, each described node and the basic sequence of each non-leaf node of instructing and is cut apart described division;
The described second refinement module is used to described each node of attribute that instructs to set up corresponding proof model, uses the division of described proof model after to the described first refinement module segmentation and further cuts apart;
Described abstract module is used for being generated by the described division after further cutting apart the abstract model of described master pattern correspondence.
The described module of finding the solution is further used for beginning to find the solution super semanteme described master pattern for described each node that instructs attribute from the described leaf node that instructs attribute, begins to find the solution corresponding basic sequence for described each the non-leaf node of attribute that instructs from the described root node of attribute that instructs according to described super semanteme.
The described module of finding the solution is further used for the leaf node that instructs attribute for described when beginning to find the solution super semantic described master pattern for described each node that instructs attribute from the described leaf node that instructs attribute, the fundamental formular of finding the solution described node is described node, finds the solution the super semanteme of described node by described fundamental formular; Be the described non-leaf node that instructs attribute, the fundamental formular of finding the solution described node is the tree that the child node of described node and described node constitutes, and wherein said child node is with the super semantic replacement of its correspondence; Find the solution the super semanteme of described node by described fundamental formular.
The described module of finding the solution be the super semanteme of described node correspondence in the basic status set that is further used for when the described root node that instructs attribute begins to find the solution corresponding basic sequence for described each non-leaf node that instructs attribute according to described super semanteme to the described root node that instructs attribute is found the solution described node, gathers and the fundamental formular of described node correspondence is found the solution the basic sequence of described node according to described basic status; Find the solution the union of the basic status set of described node for the described non-root node of attribute that instructs, find the solution the basic sequence of described node according to the fundamental formular of described basic status set and described node correspondence for described node corresponding state set in the basic sequence of its father node.
Described division module is further used for the state space of described master pattern is established as the division with a piecemeal; Be identified for cutting apart the cutting state set of described division; Use described cutting state and gather the piecemeal of cutting apart in the described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
Described division module when the cutting state set that is identified for cutting apart described division, be further used for determining mark in the described master pattern set of state of interface atom predicate be a described cutting state set.
Described division module when the cutting state set that is identified for cutting apart described division, be further used for determining mark in the described master pattern form the first atom predicate of the fair constraint condition of described master pattern the set of state be a described cutting state set; Determine mark in the described master pattern form the second atom predicate of the fair constraint condition of described master pattern the set of state be a described cutting state set.
Described division module is further used for when the cutting state set that is identified for cutting apart described division determining that the set of final state in the described master pattern is a described cutting state set.
The basic sequence that the described first refinement module is further used for using the described super semanteme that instructs attribute, each described node and each described non-leaf node is identified for cutting apart the cutting state set of described division; Use described cutting state and gather the piecemeal of cutting apart in the described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
The described first refinement module when the basic sequence of using the described super semanteme that instructs attribute, each described node and each described non-leaf node is determined described cutting state set, be further used for determining mark in the described master pattern set of state of the described atom predicate that instructs attribute be a described cutting state set; Determine that the described super semanteme that instructs each node of attribute is a described cutting state set; Determine that each state set in the described basic sequence that instructs each non-leaf node of attribute is a described cutting state set.
The described first refinement module also be used for cut apart the back described master pattern add fair constraint (True, p), wherein, True is the atom predicate that is used for mark on free position, p is for being used at master pattern at B
1Remove C
nDifference set outside state on the atom predicate of mark, wherein, B
1Instruct shape such as A in the attribute for described
e UThe super semanteme of first child node of node, C
nSuper semanteme for described node.
The described second refinement module is further used for setting up the set that comprises with the relevant limit of the relevant state of the corresponding fundamental formular of described node for described node when setting up corresponding proof model for described each node that instructs attribute, and described set is the set of basic limit; With the limit deletion that is not included in the described master pattern in the set of described basic limit, thereby generate the proof model of described node correspondence.
The path measure word that the division of the described second refinement module after the described proof model of application is to the described first refinement module segmentation occurs in being further used for according to described node when cutting apart, sequential operation symbol and described proof model are identified for further cutting apart the cutting state set of described division; Use described cutting state and gather the piecemeal of cutting apart in the described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
The path measure word that the described second refinement module occurs in according to described node, sequential operation symbol and described proof model are further used for determining described instruct shape such as A in the attribute when being identified for further cutting apart the cutting state set of described division
eU or A
e UThe proof model of node in the set of final state be a described cutting state set.
The division of the described second refinement module after the described proof model of application is to the described first refinement module segmentation is further used for repeating determining that cutting state aggregation process and cutting procedure do not have piecemeal to be cut apart when further cutting apart when carrying out cutting procedure; Described definite cutting state aggregation process is for being identified for cutting apart the cutting state set of described division according to the piecemeal in path measure word, sequential operation symbol, described proof model and the described division of described node; Described cutting procedure is gathered the piecemeal of cutting apart in the described division for using described cutting state, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are sky with each described cutting state intersection of sets collection.
The described second refinement module is further used for for each shape such as A when definite cutting state is gathered
eThe node of X, and each piecemeal of described division determine that having the set of the state on the limit of state in the described piecemeal in the proof model of described node is a described cutting state set.
The described second refinement module is further used for for each shape such as A when definite cutting state is gathered
eU or A
e UNode, and each piecemeal of described division, determine in the proof model of described node starting point as the fair path of unlimited expansion, and all states in the fair path of described expansion all the set of the state in described piecemeal be a described cutting state set.
The described second refinement module is further used for for each shape such as A when definite cutting state is gathered
eU or A
e UNode, and per two different piecemeals of described division, determine in the proof model of described node starting point as limited path, and last state in described path is in a described piecemeal, and the set of the state of other states in another piecemeal in described path is a cutting state set.
Described division module, the described first refinement module or the described second refinement module are gathered the piecemeal of cutting apart in the described division at the described cutting state of application, make each piecemeal of described division be further used for for each piecemeal in the described division when empty for the empty or difference set of removing described cutting state set with each described cutting state intersection of sets collection, if described piecemeal is not that sky and the difference set of removing described cutting state set are not empty with described cutting state intersection of sets collection, then described piecemeal is divided into described common factor and described difference set.
After further cutting apart, described second refined model also is used for for described attribute shape such as the A of instructing
eU or A
e UNode, if there is a limit in the proof model of described node, the state of the starting point on described limit and terminal point correspondence is arranged in a piecemeal of described division, and there is not a unlimited path in the described proof model, all states in described path are all in described piecemeal, then in described master pattern, add fair constraint (True, p), wherein, True is the atom predicate that is used for mark on free position, and p is the atom predicate that is used for mark on the state outside the piecemeal described in the master pattern.
Described abstract module is further used for each piecemeal in the described division is abstracted into an abstract state in the abstract model; The piecemeal corresponding abstract state in described abstract model that comprises the original state of described master pattern in the described division is the original state of described abstract model; For two piecemeals in the described division, two piecemeals are identical or different piecemeal, if there is the limit of from described piecemeal state state in another described piecemeal in the described master pattern, then in described abstract model to the limit from the abstract state of a described piecemeal correspondence to the abstract state of another described piecemeal correspondence should be arranged; For an atom predicate in the described master pattern, if in the described division each piecemeal with mark in the master pattern described atom predicate state the intersection of sets collection for empty or remove mark in the master pattern difference set of set of state of described atom predicate for empty, the atom predicate that then described atom predicate is described abstract model, in described master pattern mark the described atom predicate of mark on the corresponding abstract state of piecemeal at state place of described atom predicate; Described abstract model is inherited all fairness constraints of described master pattern.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be an atom predicate, when being expressed as p, the super semanteme of described node be in the described master pattern mark set of state of p.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be B
1∧ B
2The time, the super semanteme of described node is B
1∩ B
2, B wherein
1∩ B
2Expression B
1And B
2Common factor, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be B
1∨ B
2The time, the super semanteme of described node is B
1∪ B
2, B wherein
1∪ B
2Expression B
1And B
2Union, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be A
eX (B
1) time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, described condition be in described master pattern, exist a limit from described state to B
1In state, wherein, B
1Super semanteme for the child node of described node.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be A
e[B
1UB
2] time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, and described condition is for existing the path from described state in described master pattern, and j the state in described path is at B
2In, and preceding j-1 the state in described path is at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, j is the integer more than or equal to 1.
Described find the solution module when finding the solution described node super semantic by described fundamental formular, be further used for when described fundamental formular be A
e[B
1 UB
2] time, the super semanteme of described node is the set of the state that satisfies condition in the described master pattern, and described condition is for existing the path from described state in described master pattern, and j the state in described path is at B
2In, and preceding j-1 the state in described path is at B
1In, perhaps in described master pattern, have a fair path of the unlimited expansion from described state, and all states on the described unlimited fair path of expansion are all at B, in, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, j is the integer more than or equal to 1.
Described find the solution module when finding the solution the basic sequence of described node according to the fundamental formular of set of described basic status and described node correspondence, be further used for when described fundamental formular be B
1∧ B
2The time, the basic sequence of described node comprises two set, and described two set all are respectively described basic status set, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node.
Described find the solution module when finding the solution the basic sequence of described node according to the fundamental formular of set of described basic status and described node correspondence, be further used for when described fundamental formular be B
1∨ B
2The time, the basic sequence of described node comprises two set, and first set is D
n∩ B
1, second set is D
n∩ B
2, wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, D
nBe described basic status set.
Described find the solution module when finding the solution the basic sequence of described node according to the fundamental formular of set of described basic status and described node correspondence, be further used for when described fundamental formular be A
eX (B
1) time, the basic sequence of described node comprises a set, is the set of the state that satisfies condition in the described master pattern, and described condition is that described state is at B
1In, and in described master pattern, exist the state of a limit from described basic status set to described state, and wherein, B
1Super semanteme for the child node of described node.
Described find the solution module when finding the solution the basic sequence of described node according to the fundamental formular of set of described basic status and described node correspondence, be further used for when described fundamental formular be A
e[B
1UB
2] time, the basic sequence of described node comprises two set;
First set is the set of the state that satisfies condition in the described master pattern, and described condition is that described path is from D on the path of described state in a described master pattern
n∩ B
1In state set out, and all states on the described path are all at C
n∩ B
1In;
Second set is the set of the state that satisfies condition in the described master pattern, and described condition is that described state is at C
nB
1In, C wherein
nB
1Expression C
nAnd B
1Difference set, and in described master pattern, exist the state of a limit from described first set to described state, perhaps described state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in;
Wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, C
nBe the super semanteme of described node, D
nBe described basic status set, V
n[1] is described first set.
Described find the solution module when finding the solution the basic sequence of described node according to the fundamental formular of set of described basic status and described node correspondence, be further used for when described fundamental formular be A
e[B
1 UB
2] time, the basic sequence of described node comprises two set;
First set is the set of the state that satisfies condition in the described master pattern, and described condition is that described state exists a paths in described master pattern, and described path is from D
n∩ B
1In state set out, and all states on the described path are all at C
n∩ B
1In;
Second set is the set of the state that satisfies condition in the described master pattern, and described condition is that this state is at C
nB
1In, C wherein
nB
1Expression C
nAnd B
1Difference set, and in described master pattern, exist the state of a limit from described first set to described state; Perhaps described state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in;
Wherein, B
1And B
2Be respectively the super semanteme of the child node of described node, C
nBe the super semanteme of described node, D
nBe described basic status set, V
n[1] is described first set.
The described second refinement module is further used for when the fundamental formular of described node is an atom predicate when setting up the set of basic limit for described node, and described basic limit set is an empty set.
The fundamental formular that the described second refinement module is further used for when described node when setting up the set of basic limit for described node is B
1∧ B
2The time, described basic limit set is an empty set, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
The fundamental formular that the described second refinement module is further used for when described node when setting up the set of basic limit for described node is B
1∨ B
2The time, described basic limit set is an empty set, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
The fundamental formular that the described second refinement module is further used for when described node when setting up the set of basic limit for described node is A
eX (B
1) time, described basic limit set is the set on the limit of state from the basic status set of described node in the described master pattern, wherein, and B
1Super semanteme for the child node of described node.
The fundamental formular that the described second refinement module is further used for when described node when setting up the set of basic limit for described node is A
e[B
1UB
2] time, the set of described basic limit is the set on the limit of state from first set of the basic sequence of described node in the described master pattern, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
The fundamental formular that the described second refinement module is further used for when described node when setting up the set of basic limit for described node is A
e[B
1 UB
2] time, the set of described basic limit is the set on the limit of state from first set of the basic sequence of described node in the described master pattern, wherein, and B
1And B
2Be respectively the super semanteme of the child node of described node.
Beneficial effect of the present invention is, only need import master pattern and instruct attribute, just can instruct attribute to finish the refinement of division according to this; The abstract model that is generated comprises and only comprises the information relevant with instructing attribute, thereby has suitable level of abstraction; And can regulate the degree of refinement by using the different attributes that instructs, instruct attribute simple more, degree of refinement is low more, and the level of abstraction of the abstract model of generation is also just high more.
Embodiment
Below in conjunction with accompanying drawing, the present invention is described in further detail.
Method provided by the present invention can be guidance with an attribute, for master pattern generates the suitable abstract model of level of abstraction.Master pattern is corresponding to the model of a submodule or the model of circuit.This abstract model has acceptable scale, can keep the information relevant with instructing attribute to prevent the generation of pseudo-counter-example simultaneously.Instruct attribute to obtain by the following method.During certain function of circuit 401, this function must be based on some subfunction of submodule 403 and submodule 404, so as long as will describe the instruct attribute of the attribute of these subfunctions as abstract submodule 403 and submodule 404 in proof diagram 4.
A kind of with a master pattern, be expressed as M and one and instruct attribute, be expressed as φ, for input, set up an abstract model, be expressed as M
a, method as shown in Figure 6.
Step S600 imports master pattern and instructs attribute.
Step S601, each node for instructing in the attribute is expressed as n, finds the solution the super semanteme of this node in master pattern, is expressed as C
n
The super semanteme of node be in the master pattern by the child node of this node that determine with set this node correlation behavior.
The specific implementation process of step S601 is as follows.
Begin to find the solution super semanteme master pattern from the leaf node that instructs attribute for each node that instructs attribute.
At first, for the fundamental formular of the leaf node solution node that instructs attribute is this node, find the solution the super semanteme of this node by this fundamental formular.
Then, by order from leaf node to root node, for instructing the non-leaf node of attribute, the tree that the fundamental formular of finding the solution this node constitutes for the child node of this node and this node, wherein child node is with the super semantic replacement of its correspondence; Find the solution the super semanteme of described node by this fundamental formular.
It is as follows to find the solution super semantic computing method.Node, n, fundamental formular be expressed as
When
Be an atom predicate, when being expressed as p, C
nBe among the M mark set of state of p.
When
Be B
1∧ B
2The time, C
nBe B
1∩ B
2, B wherein
1∩ B
2Expression B
1And B
2Common factor, just at B
1In and at B
2In the set of state, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, C
nBe B
1∪ B
2, B wherein
1∪ B
2Expression B
1And B
2Union, just at B
1In or at B
2In the set of state, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, C
nBe the set of the state that satisfies condition among the M, described condition be in M, exist a limit from this state to B
1In state, wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1UB
2] time, C
nBe the set of the state that satisfies condition among the M, described condition is expressed as π for there is the path from this state in M, and j the state of π is at B
2In, and preceding j-1 the state of π is at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of n, j is the integer more than or equal to 1.
When
Be A
e[B
1 UB
2] time, C
nBe the set of the state that satisfies condition among the M, described condition is expressed as π for there is the path from this state in M, and j the state of π is at B
2In, and preceding j-1 the state of π is at B
1In, perhaps in M, there is a fair path π of the expansion from this state, π is unlimited, and all states on the π are all at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of n, j is the integer more than or equal to 1.
Because A
eG (B
1) be equivalent to
Symbol
The expression empty set, thereby ignore herein
Be A
eG (B
1) situation.
Calculate super semantic purpose and be to get rid of some negligible states for φ among the M.If an attribute is true in abstract model, then this attribute also is true at master pattern.If therefore an attribute is false in master pattern, this attribute also is false in abstract model so.That is to say that abstract model can keep not the satisfying property of attribute naturally.As shown in Figure 7,
circuit 701 have a
submodule 711,
submodule 711 is corresponding to master pattern, M, the
abstract automaton 702 of
circuit 701 has the abstract model of M.The super semanteme of the node of M, C
n, can guarantee C among the M
nOutside state in
circuit 701, generate to satisfy scarcely
State.Because not the satisfying property of attribute in
circuit 701 can be kept by abstract model, therefore can ignore C among the M
nOutside state.
Step S602 is to instruct each non-leaf node of attribute to find the solution corresponding basic sequence according to the super semanteme of the node that instructs attribute, and basic sequence is expressed as V
n
The basic sequence of node be the relevant state of same this node of in master pattern, determining by the father node of this node by with the sequence of the state set of the associated group sequencing by merging of each child node of this node.
Super semanteme according to node begins to find the solution corresponding basic sequence for each the non-leaf node that instructs attribute from the root node that instructs attribute.
At first, the basic status set of finding the solution this node for the root node that instructs attribute is the super semanteme of this node, finds the solution the basic sequence of described node according to the fundamental formular of this basic status set and this node correspondence.
Then, from instructing the root node of attribute, find the solution the union of the basic status set of described node for the non-root node that instructs attribute, find the solution the basic sequence of this node according to the fundamental formular of this basic status set and this node correspondence for this node corresponding state set in the basic sequence of its father node.
When n was non-root node among the φ, n had k father node, is expressed as m for each father node
j(1≤j≤k), n is m
jI
jIndividual child node.Child node order by formula written form from left to right sorts, and for example exists
In,
Root node be first child node of ∧, the root node of ψ is second child node of ∧.The basic set of n is expressed as D
n, D
nFor
, wherein,
Represent that all satisfy the state set of 1≤j≤k
Union.V
nBe on the M
About D
nBasic sequence, V
nIn i set be expressed as V
n[i].
The computing method of finding the solution basic sequence are as follows.
When
Be B
1∧ B
2The time, V
nComprise two set, V
n[1] is D
n, V
n[2] be D
n, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, V
nComprise two set, V
n[1] is D
n∩ B
1, V
n[2] be D
n∩ B
2, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, V
nComprise a set, V
n[1] be the set of the state that satisfies condition among the M, described condition is that this state is at B
1In, and in M, exist a limit from D
nIn state to this state, wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1UB
2] time, V
nComprise two set, V
n[1] be the set of the state that satisfies condition among the M, described condition is the path of this state in a M, π, on, π is from D
n∩ B
1In state set out, and all states on the π are all at C
n∩ B
1In.V
n[2] be the set of the state that satisfies condition among the M, described condition is that this state is at C
nB
1In, C herein
nB
1Expression C
nRemove B
1Difference set, just at C
nIn but not at B
1In the set of state, and in M, exist a limit from V
n[1] state in is to this state, and perhaps this state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in.Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
e[B
1 UB
2] time, V
nComprise two set.V
n[1] be the set of the state that satisfies condition among the M, described condition is the path of this state in a M, π, on, π is from D
n∩ B
1In state set out, and all states on the π are all at C
n∩ B
1In.V
n[2] be the set of the state that satisfies condition among the M, described condition is that this state is at C
nB
1In, and in M, exist a limit from V
n[1] state in is to this state; Perhaps this state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in.
The purpose of calculating basic sequence is super semanteme is further limited.As shown in Figure 8, when judging whether a
state 802 satisfies
The time, for for a
fair path 801 of expansion of state 802s, expand
fair path 801 and whether satisfy
Only depend on whether
second state 804 of expanding
fair path 801 satisfies
, and whether other states that need not consider to expand on the
fair path 801 satisfy
The set of the state that need consider when the set in the basic sequence is judgement.V
nI set corresponding to i the child node of n, be used for can ignoring state in the further eliminating of the super semanteme of this child node.Instruct a node in the attribute may have a plurality of father nodes.For example: A
eX (a) ∨ A
eG (A
eX (a)) Dui Ying tree as shown in Figure 9, node A wherein
eX has a plurality of father nodes.
Step S603 sets up division to the state space of master pattern, divides and is expressed as P, and the state-space representation of master pattern is S.
Concrete steps are as follows.
Step 631 is established as S the division with a piecemeal.
Step 632 is identified for cutting apart the cutting state set of P.
Step 633 is used described cutting state set and is cut apart P, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
The detailed process that P is cut apart in the set of application cutting state is as follows.
Each piecemeal among the P is expressed as B, and the cutting state set is expressed as C, if
And
Then B is split into two piecemeal B ∩ C and B C.If for each the piecemeal B among the P, satisfy
Perhaps
Then claim C can not cut apart P, at this moment, C is to the end of cutting apart of P.
Each interface atom predicate among the M is expressed as p, determine mark among the M set of state of p be a cutting state set, gather with this cutting state and cut apart P.Wherein, interface atom predicate is the atom predicate that input and output generated by circuit.
For the constraint of each fairness among the M, (p, q), wherein p and q are respectively the atom predicate, determine mark among the M set of state of p be a cutting state set, gather with this cutting state and cut apart P; Determine mark among the M state of q be a cutting state set, gather with this cutting state and cut apart P.
The set of determining final state among the M is a cutting state set, cuts apart P with this cutting state set.
Step S603 has set up a division the most basic to the state space of M.Piecemeal during this is divided is very few, causes the generation of pseudo-counter-example easily.Thereby need further cut apart division.Below we will further cut apart this division.
Step S604, the super semanteme of application directs attribute, each node and the basic sequence of each non-leaf node are cut apart division.
Described step S604 comprises that also adding fairness in master pattern retrains.
The concrete steps of further cutting apart are as follows.
Step 641 is used the described super semanteme of attribute, each node and the basic sequence of each non-leaf node of instructing and is determined the cutting state set;
Step 642 is used described cutting state set and is cut apart current division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
The concrete grammar that division is cut apart in the set of concrete application cutting state is identical with dividing method described in the step S603.
For each the atom predicate among the φ, p, among the M mark set of state of p be a cutting state set, gather with this cutting state and cut apart division.
For each node among the φ, n, C
nBe a cutting state set, cut apart division with this cutting state set.
For each the non-leaf node among the φ, n, V
nIn each set be the set of cutting state, gather with this cutting state and cut apart division.
Add the fairness constraint and be specially, for each shape such as the A among the φ
e UNode, n,
Be A
e[B
1 UB
2], in M, add one the fairness constraint (True, p), wherein True is a special atom predicate, this atom predicate is mark on state arbitrarily; P is B in M
1C
nOutside state on mark, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
Step S604 utilizes the information that instructs attribute to provide to cut apart P.This information comprises: the atom predicate among the φ; C
n, be used to distinguish and have the satisfying property and the state of satisfying property not necessarily; And V
n, be used to distinguish us and need not be concerned about that satisfying property and we must be concerned about the state of satisfying property.It is abstract more accurate that the fairness constraint of adding among the step S604 can make, and the fairness constraint of adding among the step S608 has same function.As shown in figure 10, a piecemeal 1001 among the M is corresponding to abstract state 1002.Owing in M, have the state of the state of limit from piecemeal 1001 in the piecemeal 1001, therefore at M
aIn exist a limit from abstract state 1002 to abstract state 1002.Thereby at M
aUnlimited path of middle existence, π, all states on the π are abstract state 1002.Yet π can not be corresponding to the paths among the M.Therefore, (True p) makes π become a fair path of non-expansion, as the hollow state of p mark among Figure 10, thereby π is excluded by adding a fairness constraint.
Step S605, for instructing each node of attribute, n sets up corresponding proof model, proves that model representation is M
n
The proof model of node is to keep the model after remaining limit deletion with the relevant relevant limit of state of the corresponding fundamental formular of this node in the master pattern.
Concrete steps are as follows.
Step 651 is node, and n sets up the set that comprises with the relevant limit of the relevant state of the corresponding fundamental formular of this node, and described set is the set of basic limit, is expressed as R
n'.
Step 652 is deleted the limit that is not included in the master pattern in the set of basic limit, thereby generates the proof model of this node correspondence.
When
When being an atom predicate, R
n' be
When
Be B
1∧ B
2The time, R
n' be
Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, R
n' be
Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, R
n' be from D among the M
nThe set on the limit that middle state sets out.Wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1UB
2] time, R
n' be from V among the M
nThe set on the limit that state sets out [1].Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
e[B
1 UB
2] time, R
n' be from V among the M
nThe set on the limit that state sets out [1].Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
Step S606 uses the proof model division is cut apart.
For each shape such as the A among the φ
eU or A
e UNode, n, M
nIn the set of final state be a cutting state set, cut apart division with this cutting state set, make each piecemeal of described division be sky for difference set empty or that remove described cutting state set with described cutting state intersection of sets collection.The concrete grammar that division is cut apart in the set of concrete application cutting state is identical with dividing method described in the step S603.
Step S607 uses the proof model division is further cut apart.
Specific as follows described.
Step 671, repeated execution of steps 672 and step 673 do not have piecemeal to be cut apart in when carrying out described step 673.
Step 672 is identified for cutting apart the cutting state set of described division according to the piecemeal in path measure word, sequential operation symbol, described proof model and the described division of described node.
Step 673 is used described cutting state set and is cut apart described division, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.The concrete grammar that division is cut apart in the set of concrete application cutting state is identical with dividing method described in the step S603.
For each shape such as A among the φ
eThe node of X, n, for each piecemeal among the P, B determines M
nIn the set of the state that satisfies condition be a cutting state set, described condition is at M
nIn have the state of a limit from this state to B; Cut apart division with this cutting state set.
For each shape such as A among the φ
eU or A
e UNode, n is for each piecemeal among the P, B, M
nIn the set of the state that satisfies condition be a cutting state set, described condition is at M
nThe middle expansion justice path that has from this state, π, π are unlimited, and all states on the π are all in B; Cut apart division with this cutting state set.
For each shape such as A among the φ
eU or A
e UNode, n is for per two the different piecemeals among the P, B
1And B
2, M
nIn the set of the state that satisfies condition be a cutting state set, described condition is at M
nPath of middle existence from this state, π,, j the state of π is at B
2In, and preceding j-1 the state of π is at B
1In, j is the integer more than or equal to 1; Cut apart division with this cutting state set.
Step S608 adds the fairness constraint in master pattern.
For each piecemeal among the P, B is if exist a shape such as A in φ
eU or A
e UNode, n is at M
nIn have the state of the state of limit from B in the B, but at M
nIn do not have a paths, π, π are unlimited, and all states on the π are all in B, then in M, add a new fairness constraint (True, p), the state among the p mark M outside the B.
Step S605, S606, S607 and S608 are specially at D
nIn state, just must consider the state of satisfying property.With Fig. 8 is example,
inspection state 802 for
Satisfying property, whether satisfy when judging from the
fair path 801 of the expansion of state 802s
The time, article one
limit 803 that only needs to consider the
fair path 801 of expansion points out whom the next state of
state 802 is, and other limits of expanding on the
fair path 801 do not have use.Thereby the effect of step S605 is exactly the useless limit generation M of deletion in M
n, useless herein limit is only at D
nIn state.
Next step S606 and S607 utilize M
nP is cut apart, used the condition of some reinforcements simultaneously.For example: among the step S607 for each shape such as A among the φ
eThe node of X is selected the condition of cutting state set, and corresponding to condition, for piecemeal 1 and piecemeal 2 arbitrarily, all there be the state of a limit in the piecemeal 2 in all states in the piecemeal 1, does not perhaps have state to have the state of a limit in the piecemeal 2 in the piecemeal 1.Use these intensified conditions can guarantee to be used to analyze D
nThe information of middle satisfying property of state can not lost, thereby prevents the generation of pseudo-counter-example.On the other hand, because M
nOnly kept a part of limit among the M, as the solid line limit among Figure 11, therefore use the part that only is confined in the state space of cutting apart of intensified condition, as the part in Figure 11 circle, thereby do not have too much piecemeal in having guaranteed to divide, that is to say that the scale of abstract automaton can be not excessive.Final step S608 utilizes M
nIn M, add some fairness constraints so that abstract more accurate.
Step S609 is by the abstract model of the generation of the division after cutting apart master pattern correspondence.
Step 691 is abstracted into M with each piecemeal among the P
aIn an abstract state.
Step 692, to each piecemeal among the P, B, if B has comprised the original state among the M, then the pairing abstract state of B is M
aIn an original state.
Step 693 is to per two piecemeals among the P, B
1And B
2, B
1And B
2Be identical or different piecemeal,, a limit arranged from B if in M
1In state to B
2In state, then at M
aIn, a limit is arranged from B
1Pairing abstract state is to B
2Pairing abstract state.
Step 694, for an atom predicate p among the M, if among the M mark set of state of p can not cut apart P, then p is M
aIn an atom predicate, and at M
aIn abstract state of p mark, and if only if in M p mark corresponding to the state in the piecemeal of this abstract state.
Step 695, M
aInherit all fairness constraints of M.
Model abstract system during a kind of model detects comprises: load module 1201, find the solution module 1202, divide module 1203, refinement module 1204, abstract module 1205, refinement module 1204 comprises the first refinement module 1241 and the second refinement module 1242.
Load module 1201 is used to import master pattern and instructs attribute.
Finding the solution module 1202, be used to described each node of attribute that instructs to find the solution its super semanteme in described master pattern, is that described each the non-leaf node of attribute that instructs is found the solution corresponding basic sequence according to described super semanteme.
Divide module 1203, be used for the state space of described master pattern is set up division.
The first refinement module 1241 is used to use the described super semanteme of attribute, each described node and the basic sequence of each non-leaf node of instructing and cuts apart described division.
The second refinement module 1242 is used to described each node of attribute that instructs to set up corresponding proof model, and the division of using after described proof model is cut apart the first refinement module 1241 is further cut apart.
Abstract module 1205 is used for being generated by the described division after further cutting apart the abstract model of described master pattern correspondence.
Finding the solution module 1202 begins to find the solution super semanteme described master pattern for described each node that instructs attribute from the described leaf node that instructs attribute.Be the described leaf node that instructs attribute, the fundamental formular of finding the solution described node is described node, finds the solution the super semanteme of described node by described fundamental formular; Be the described non-leaf node that instructs attribute, the fundamental formular of finding the solution described node is the tree that the child node of described node and described node constitutes, and wherein said child node is with the super semantic replacement of its correspondence; Find the solution the super semanteme of described node by described fundamental formular.
It is as follows specifically to find the solution super semantic computing method.Node, n, fundamental formular be expressed as
, M is a master pattern, C
nSuper semanteme for node.
When
Be an atom predicate, when being expressed as p, C
nBe among the M mark set of state of p.
When
Be B
1∧ B
2The time, C
nBe B
1∩ B
2, B wherein
1∩ B
2Expression B
1And B
2Common factor, just at B
1In and at B
2In the set of state, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, C
nBe B
1∪ B
2, B wherein
1∪ B
2Expression B
1And B
2Union, just at B
1In or at B
2In the set of state, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, C
nBe the set of the state that satisfies condition among the M, described condition be in M, exist a limit from this state to B
1In state, wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1 UB
2] time, C
nBe the set of the state that satisfies condition among the M, described condition is expressed as π for there is the path from this state in M, and j the state of π is at B
2In, and preceding j-1 the state of π is at B
1In, wherein, B
1And B
2Be respectively the super semanteme of the child node of n, j is the integer more than or equal to 1.
When
Be A
e[B
1 UB
2] time, C
nBe the set of the state that satisfies condition among the M, described condition is expressed as π for there is the path from this state in M, and j the state of π is at B
2In, and preceding j-1 the state of π is at B
1In, perhaps in M, exist a broad sense to expand fair path π from this state, π is unlimited, and all states on the π are all in B1, wherein, B
1And B
2Be respectively the super semanteme of the child node of n, j is the integer more than or equal to 1.
Because A
eG (B
1) be equivalent to
Symbol
The expression empty set, thereby ignore herein
Be A
eG (B
1) situation.
Finding the solution module 1202 begins to find the solution corresponding basic sequence for described each the non-leaf node of attribute that instructs from the described root node of attribute that instructs according to described super semanteme.The basic status set of finding the solution described node for the described root node that instructs attribute be the super semanteme of described node correspondence, gathers and the fundamental formular of described node correspondence is found the solution the basic sequence of described node according to described basic status; Find the solution the union of the basic status set of described node for the described non-root node of attribute that instructs, find the solution the basic sequence of described node according to the fundamental formular of described basic status set and described node correspondence for described node corresponding state set in the basic sequence of its father node.
The computing method of specifically finding the solution basic sequence are as follows.C
nBe the super semanteme of node, D
nBe the basic status set of node, V
n[1] is first set of the basic sequence of node, V
n[2] be second set of the basic sequence of node,
Fundamental formular for node.
When
Be B
1∧ B
2The time, V
nComprise two set, V
n[1] is D
n, V
n[2] be D
n, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, V
nComprise two set, V
n[1] is D
n∩ B
1, V
n[2] be D
n∩ B
2, wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, V
nComprise a set, V
n[1] be the set of the state that satisfies condition among the M, described condition is that this state is at B
1In, and in M, exist a limit from D
nIn state to this state, wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1UB
2] time, V
nComprise two set, V
n[1] be the set of the state that satisfies condition among the M, described condition is the path of this state in a M, π, on, π is from D
n∩ B
1In state set out, and all states on the π are all at C
n∩ B
1In.V
n[2] be the set of the state that satisfies condition among the M, described condition is that this state is at C
nB
1In, C herein
nB
1Expression C
nAnd B
1Difference set, just at C
nIn but not at B
1In the set of state, and in M, exist a limit from V
n[1] state in is to this state, and perhaps this state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in.Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
e[B
1 UB
2] time, V
nComprise two set.V
n[1] be the set of the state that satisfies condition among the M, described condition is the path of this state in a M, π, on, π is from D
n∩ B
1In state set out, and all states on the π are all at C
n∩ B
1In.V
n[2] be the set of the state that satisfies condition among the M, described condition is that this state is at C
nB
1In, and in M, exist a limit from V
n[1] state in is to this state; Perhaps this state is at (D
nB
1) ∪ (V
n[1] ∩ B
2) in.
Division module 1203 is established as the division with a piecemeal with the state space of described master pattern; Be identified for cutting apart the cutting state set of described division; Use described cutting state set and cut apart described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
Divide module 1203 when definite cutting state set, determine mark in the described master pattern set of state of interface atom predicate be that a cutting state is gathered; Determine mark in the described master pattern form the first atom predicate of the fair constraint condition of described master pattern the set of state be a cutting state set, determine mark in the described master pattern form the second atom predicate of the fair constraint condition of described master pattern the set of state be a cutting state set; The set of determining final state in the described master pattern is a cutting state set.
The basic sequence that the first refinement module 1241 is further used for using the described super semanteme that instructs attribute, each described node and each described non-leaf node is identified for cutting apart the cutting state set of described division; Use described cutting state set and cut apart described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
When the first refinement module 1241 is identified for cutting apart the cutting state set of described division at the basic sequence of using the described super semanteme that instructs attribute, each described node and each described non-leaf node, determine mark in the described master pattern set of state of the described atom predicate that instructs attribute be a cutting state set; Determine that the described super semanteme that instructs each node of attribute is a cutting state set; Determine that each cutting state set in the described basic sequence that instructs each non-leaf node of attribute is a cutting state set.
The first refinement module 1241 also be used for cut apart the back described master pattern add fair constraint (True, p), wherein, True is the atom predicate that is used for mark on free position, p is for being used at master pattern at B
1Remove C
nDifference set outside state on the atom predicate of mark, wherein, B
1Instruct shape such as A in the attribute for described
e UThe super semanteme of a child node of node, C
nSuper semanteme for described node.
The second refinement module 1242 is set up the set that comprises with the relevant limit of the relevant state of the corresponding attribute of described node for described node when setting up corresponding proof model for described each node that instructs attribute, described set is the set of basic limit; With the limit deletion that is not included in the described master pattern in the set of described basic limit, thereby generate the proof model of described node correspondence.
The set of basic limit is expressed as R
n'.
When
When being an atom predicate, R
n' be
When
Be B
1∧ B
2The time, R
n' be
Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be B
1∨ B
2The time, R
n' be
Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
eX (B
1) time, R
n' be from D among the M
nThe set on the limit that middle state sets out.Wherein, B
1Super semanteme for the child node of n.
When
Be A
e[B
1 UB
2] time, R
n' be from V among the M
nThe set on the limit that state sets out [1].Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When
Be A
e[B
1 UB
2] time, R
n' be from V among the M
nThe set on the limit that state sets out [1].Wherein, B
1And B
2Be respectively the super semanteme of the child node of n.
When the division of the second refinement module 1242 after the described proof model of application is to the described second refinement module segmentation cut apart, be identified for cutting apart the cutting state set of described division according to the path measure word that occurs in the described node, sequential operation symbol and described proof model; Use described cutting state set and cut apart described division, make that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
The path measure word that the second refinement module 1242 occurs in according to described node, sequential operation symbol and described proof model are further used for determining described instruct shape such as A in the attribute when being identified for further cutting apart the cutting state set of described division
eU or A
e UThe proof model of node in the set of final state be a described cutting state set.
The division of the second refinement module 1242 after the described proof model of application is to the described first refinement module segmentation is further used for also repeating determining that cutting state aggregation process and cutting procedure do not have piecemeal to be cut apart when further cutting apart when carrying out cutting procedure; Described definite cutting state aggregation process is for being identified for cutting apart the cutting state set of described division according to the piecemeal in path measure word, sequential operation symbol, described proof model and the described division of described node; Described cutting procedure is cut apart described division for the described cutting state set of application, makes that each piecemeal of described division is that sky or the difference set of removing described cutting state set are empty with each described cutting state intersection of sets collection.
For each shape such as A
eThe node of X, and each piecemeal of described division determine that having the set of the state on the limit of state in the described piecemeal in the proof model of described node is a described cutting state set.
For each shape such as A
eU or A
e UNode, and each piecemeal of described division, determine in the proof model of described node starting point as the fair path of unlimited expansion, and all states in the fair path of described expansion all the set of the state in described piecemeal be a described cutting state set.
For each shape such as A
eU or A
e UNode, and per two different piecemeals of described division, determine in the proof model of described node starting point as limited path, and last state in described path is in a described piecemeal, and the set of the state of other states in another piecemeal in described path is a cutting state set.
Divide module 1203, the first refinement module 1241 or the second refinement module 1242 and cut apart described division in the described cutting state set of application, make each piecemeal of described division be further used for for each piecemeal in the described division when empty for the empty or difference set of removing described cutting state set with each described cutting state intersection of sets collection, if described piecemeal is not that sky and the difference set of removing described cutting state set are not empty with described cutting state intersection of sets collection, then described piecemeal is divided into described common factor and described difference set.
After cutting apart, second refined model 1242 also is used for for described attribute shape such as the A of instructing
eU or A
e UNode, if there is a limit in the proof model of described node, the state of the starting point on described limit and terminal point correspondence is arranged in a piecemeal of described division, and there is not a unlimited path in the described proof model, all states in described path are all in described piecemeal, then in described master pattern, add fair constraint (True, p), wherein, True is the atom predicate that is used for mark on free position, and p is the atom predicate that is used for mark on the state outside the piecemeal described in the master pattern.
Abstract module 1205 is further used for each piecemeal in the described division is abstracted into an abstract state in the abstract model; The piecemeal corresponding abstract state in described abstract model that comprises the original state of described master pattern in the described division is the original state of described abstract model; For two piecemeals in the described division, two piecemeals are identical or different piecemeal, if there is the limit of from described piecemeal state state in another described piecemeal in the described division, then in described abstract model to the limit from the abstract state of a described piecemeal correspondence to the abstract state of another described piecemeal correspondence should be arranged; For an atom predicate in the described master pattern, if each piecemeal in the described division with mark in the master pattern described atom predicate state the intersection of sets collection for empty or remove mark in the master pattern difference set of set of state of described atom predicate for empty, the atom predicate that then described atom predicate is described abstract model, in described master pattern mark the described atom predicate of mark on the corresponding abstract state of piecemeal at state place of described atom predicate; Described abstract model is inherited all fairness constraints of described master pattern.
Those skilled in the art can also carry out various modifications to above content under the condition that does not break away from the definite the spirit and scope of the present invention of claims.Therefore scope of the present invention is not limited in above explanation, but determine by the scope of claims.