Académique Documents
Professionnel Documents
Culture Documents
1
a partial explicit or symbolic state traversal. For exam- methods in the area of guided state space search, the pre-
ple, symbolic simulation [7] is used to explore the state sented work models the actual probabilistic nature of the
space to a fixed depth. In order to reduce the memory search process and uses it to focus the search toward tar-
requirements in explicit state space traversal, hash com- get areas. For practical verification tools, the described
paction for tracking the reached states was introduced probabilistic state space search provides a building block
at the expense of potentially missing parts of the state that can effectively complement other heuristics. This
space [8]. In [9] a pruning method for the BDD represent- paper is focused on the actual probabilistic method and
ing the set of reachable states is described. Its applica- will not elaborate on its combination with other methods.
tion during state space traversal is targeted for “sparse”
subgraphs of the original BDD which require more BDD 2 Reachability Probability
nodes to represent a comparable number of states. All of
the above mentioned methods do not consider the actual A random simulation run can be characterized by a
target states for constraining the state space exploration. Markov Chain [13] with a one-to-one correspondence of
Since in many practical applications only a tiny fraction its states to the states of the FSM model of the design.
of the design space can be traversed, this shortcoming For a random walk the events at each input are chosen
significantly reduces the value of those approaches. randomly and independently. Therefore, the transition
More recent research in the area of incomplete reach- probability pij between states i and j corresponds to the
ability analysis focuses on methods to guide the explo- fraction of the Boolean input space that exercises this
ration specifically toward the target states. Guided state transition in the FSM. More precisely:
space search requires a scoring mechanism that prioritizes |T (x, s, s0 )s=i,s0 =j |
the state traversal according to the potential to reach a pij =
|T (x, s, s0 )s=i |
target. In [10] a method to exercise all transitions of the
control part of the design is described. It is assumed that where |.| denotes the cardinality of a set, T (x, s, s0 ) repre-
this will expose all functional corner cases and therefore sents the transition relation of the FSM from the current
increase the chance of hitting a target state. Based on states s to the next states s0 for inputs x, and the sub-
the same concept, a technique called saturated simula- script denotes a projection onto the given values. The
tion is presented in [11]. After applying an incomplete given definition for pij can easily be modified for a non-
forward and backward traversal a state distance func- equal distribution of the inputs. Let P be the probability
tion is used to search for a “short” trajectory between matrix composed of all pij . Note, that for the given def-
the two resulting sets of states. The proposed method inition the following invariant holds:
applies the Hamming distance of the state encodings to
measure their distance in state space. In [?, 12] an exten-
X
∀i : pij = 1.
sion of the explicit model checker Murϕ to guide the state ∀j
space traversal is described. Here the reported results on
using the Hamming distance to guide the search confirm To denote the set of target states, we introduce a vec-
the practical intuition that this metric does not correlate tor t = (t1 , · · · , tk )T for the k states of the FSM, where
with the actual distance in state space and is therefore of ti = 1 if i is a target, 0 otherwise. Similarly, we use t
limited value in this context. A second proposed distance to denote the non-target states. We are interested in
(m)
function is based on the length of the counter example the probability ri that a random simulation run of
trajectory in the overapproximated state transition graph length m starting from state i reaches a target state. Let
(m) (m)
using overlapping subcomponents. This metric provides r(m) = (r1 , · · · , rk )T be the vector of the reachability
a better scoring function for the search, but due to the probability for all states. r(m) cannot be determined by
assumed unconstrained execution of the individual sub- simply computing the sum over all powers of P . This
components the accuracy decreases dramatically with in- would double count recurring visits of target states and
creasing distance from the target states. yield incorrect results. Instead we compute:
In this paper we describe a probabilistic approach for m
X
guiding the state space search. The scoring of the indi- r(m) = Pn t
vidual states is based on their reachability probability to n=0
lead to a target state in a random walk model. Since the
T
accurate computation of this probability is as complex where P = t t P . In essence, this scheme first removes
as the original reachability decision, an estimation tech- the outgoing transitions from all target states and then
nique is proposed which implements a trade-off between adds the individual probabilities to reach a target in n
accuracy and computing effort. In contrast to previous steps.
2
Strongly connected 0.51 0.71 1.00 0.36
Target state R1 R2 R3
components 000 100 110 111
in
0 0 1 0
1
where E = 1−η is the mean of the number of simulation Proof:
steps. Let ri be the probability that state i reaches a tar-
For all non-target states with a non-zero reachability
get in the given simulation setting. The following formula
probability the computation of the reachability probabil-
computes the reachability probability r = (r1 , · · · , rk )T
ity yields:
for all states:
X X
∞ m
1−η X m X n ri < pi,j rj ≤ pi,j ( max rj ) = max rj .
∀j, pij >0 ∀j, pij >0
r = η P t ∀j ∀j
η m=1 n=0
∞
1 X m m In other words, for all states that can reach a target,
= t+ η P t.
η m=1 there exists a trajectory from that state to a target state
3
such that the reachability probability of the states along Further, let τ : (x × š) → x̂ denote the mapping of the
this trajectory is strictly monotonically increasing. Once global inputs and “environment” states onto the subcom-
a target is reached, the probability is 1.0 and cannot fur- ponent inputs. Using capital letters for individual inputs
ther increase. If a state cannot reach a target, the reach- and states, the transition relation T̂ of the subcomponent
ability probability of that state and its successors is zero. is derived as follows:
The algorithm of Figure 3 outlines a guided state space
T̂ (x̂, ŝ, ŝ0 ) = {(X̂, Ŝ, Ŝ 0 ) | ∃Š : X̂ = τ (X, Š) ∧
search based on this monotonic property.
(X, (Ŝ, Š), (Ŝ 0 , Š 0 )) ∈ T }.
Algorithm Search State Space (init, target) {
present = get_states_with_max_probability (queue); Let π : s → ŝ denote the projection of each global state
next = get_partial_image (present, r); onto its corresponding state of the subcomponent. Sim-
if ((next ∩ target) != empty) return reachable; ilar to the formula of Section 2, the projected transition
add_to_queue (queue, next, r);
}
probability p̂ij between two global states i and j is de-
return undecided; fined as:
} |T̂ (x̂, ŝ, ŝ0 )ŝ=π(i),ŝ0 =π(j) |
p̂ij = .
Figure 3: State space search guided by reachability probability.
|T̂ (x̂, ŝ, ŝ0 )ŝ=π(i) |
t̂ = (t̂1 , · · · , t̂k )T denotes the projected target vector such
The algorithm is based on a priority queue which holds that:
the states that are to be further explored. The queue is
prioritized by the reachability probabilities of the entries. 1 if ∃ j (tj = 1 ∧ π(i) = π(j))
t̂i =
If no initial states has a nonzero reachability probability, 0 otherwise .
unreachability is proven and returned. Otherwise, in Informally, a state of the subcomponent is a projected
each iteration, the states with the highest priority are target state if there is at least one global state that is
further explored by generating a set of successor states projected onto it. Similar to section 2, let P̂ and P̂ de-
which are added back to the queue. If a target state note the projected probability matrix and its adjusted
is encountered during the search, the algorithm returns version without outgoing transitions from projected tar-
reachable, otherwise undecided. The function of the gets, respectively. This results in the following scheme
priority queue is to heuristically avoid dead ends during to compute the projected reachability probability for a
the guided state space search which can be caused by subcomponent:
the inaccuracy of an approximated state ranking or the
∞
incomplete image computation. 1 X m m
r̂ = t̂ + η P̂ t̂.
η m=1
4 Approximation of the Reacha-
The computation of the global approximated reachability
bility Probability probability is based on a set of subcomponents, which
are not necessarily disjoint. Let (r̂1 , · · · , r̂q ) denote the
The calculation of the exact reachability probabilities is projected reachability probabilities of the q components.
computationally as hard as the original reachability de- The approximate reachability probability r̃ = (r̃1 , · · · , r̃k )
cision problem and therefore it does not simplify its so- is defined as:
q
lution. However, in the context of incomplete verifica- Y
tion methods such as directed search, an approximation ∀i : r̃i = r̂ij .
of the reachability probabilities, is valuable as long as it j=1
preserves the monotonicity of the probabilities along a In other words, the approximate reachability probability
trajectory to a target from as many states as possible. of a state is computed by the product of the projected
In the following we describe an approximation technique reachability probabilities of the subcomponents. Using
that is based on a set of subcomponents of the design for the product to combine the individual probabilities as-
which the computation of the reachability probability is sumes that the subcomponents operate independently,
tractable. neglecting that their structural composition constrains
Similar to [4, 5], a subcomponent of a hardware design possible transitions. However, this heuristic scheme is
is defined as a subset of its state registers and their next based on the fact that a higher reachability probability
state functions. The resulting bisection of the state reg- reflects a greater chance that the environment of a sub-
isters defines a division of the set of global states s into component can cooperate for a given transition.
two parts ŝ and š such that s = ŝ × š. Let ŝ and x̂ be In practice, the reachability probability of a subcom-
the states and inputs of the subcomponent, respectively. ponent can be directly computed from the subset of state
4
0.51 0.71 1.00 0.86 1.00 0.61 0.86 1.00 0.86 1.00 1.00 0.86
00- 10- 11- -00 -10 -11 0-- 1-- -0- -1- --0 --1
0 0 1 0 1 0 0 1 0 1 1 0
0.66 (0.51) 0.71 (0.51) 0.78 (0.71) 0.56 (0.51) Figure 5: Approximation of the reachability probability of the cir-
001 010 101 011 cuit of Figure 2 using three subcomponents, resembling a guidance
(c) 0 0 0 0 metric based on Hamming distance.
5
in preserving potential trajectories to target states in a References
directed search scheme.
[1] C. H. West and P. Zafiropulo, “Automated validation of a
Table 1 reports the fraction of the transitions that are communications protocol: the CCITT X.21 recommendation,”
identical for both metrics. As shown, the size of the sub- IBM Journal of Research and Development, vol. 22, pp. 60–71,
components significantly influences the accuracy of the 1978.
approximate reachability probability. The results also [2] O. Coudert, C. Berthet, and J. C. Madre, “Verification of syn-
confirm the intuitive ineffectiveness of the Hamming dis- chronous sequential machines based on symbolic execution,”
in International Workshop on Automatic Verification Meth-
tance metric which is similar to a subcomponent size of ods for Finite State Systems, June 1989.
one. [3] J. R. Burch, E. M. Clarke, K. L. McMillan, D. L. Dill, and
J. Hwang, “Symbolic model checking: 1020 states and be-
Subcomponents size (bits)
yond,” in Fifth Annual Symposium on Logic in Computer Sci-
1 2 3 4 5 6 7 8
ence, 1990.
4 68.7 68.7 81.2 100
8 62.9 87.9 87.9 87.9 97.3 98.8 93.4 100 [4] H. Cho, G. D. Hachtel, E. Macii, B. Plessier, and
12 72.6 78.9 78.9 78.9 86.7 82.8 92.9 96.1 F. Somenzi, “Algorithms for approximate FSM traversal,” in
16 67.0 84.6 84.6 86.9 96.2 92.4 92.4 96.2 30th ACM/IEEE DAC, pp. 25–30, 1993.
[5] S. G. Govindaraju, D. L. Dill, A. J. Hu, and M. A. Horowitz,
Table 1: Fraction (in %) of identical highest probable next states
“Approximate reachability with BDDs using overlapping pro-
in a guided search using the exact and approximate reachability
jections,” in 35th ACM/IEEE DAC, pp. 451–455, 1998.
probability for various sizes of the shift register example.
[6] G. Cabodi, P. Camurati, and S. Quer, “Symbolic exploration
of large circuits with enhanced forward/backward traversals,”
in EDAC, pp. 22–27, 1994.
6 Conclusions and Future Work
[7] R. E. Bryant, “Symbolic simulation - techniques and applica-
tions,” in 27th ACM/IEEE DAC, pp. 517–521, 1990.
The paper presents a probabilistic approach for guiding
a state space search from a set of initial states to a set [8] G. J. Holzmann, “On limits and possibilities of automated pro-
tocol analysis,” in 7th International Conference on Protocol
of target states. The described technique uses a met- Specification, Testing, and Verification, pp. 339–44, 1987.
ric which is based on the reachability probability that [9] K. Ravi and F. Somenzi, “High-density reachability analysis,”
a given state can get to a target state in a set of ran- in Digest of Technical Papers of the IEEE International Con-
dom simulation runs. Since the exact computation of the ference on Computer-Aided Design, (San Jose), pp. 154–158,
reachability probability is intractable, a symbolic approx- ACM/IEEE, November 1995.
imation technique is presented that implements a smooth [10] R. C. Ho, C. H. Yang, M. A. Horowitz, and D. L. Dill, “Archi-
trade-off between accuracy and computing effort. tecture validation for processors,” in 22nd International Sym-
posium on Computer Architecuture, pp. 404–423, 1995.
The resulting probabilistic metric provides a signifi-
[11] J. Yuan, J. Shen, J. Abraham, and A. Aziz, “On combining
cantly better discrimination scheme for ranking states in formal and informal verification,” in CAV, pp. 376–387, 1997.
a guided search than previously published approaches.
[12] C. H. Yang and D. L. Dill, “Validation with guided search
Further, several existing methods such as the Hamming of the state space,” in 35th ACM/IEEE DAC, pp. 599–604,
distance metric, tracking metric, and reachability approx- 1998.
imations based on design partitioning or projections fold [13] W. J. Stewart, Introduction to the Numerical Solution of
into the presented model as special cases, yielding a more Markov Chains. 1994.
global view on a wide set of distance metrics. [14] D. Bertsekas, Dynamic Programming and Optimal Control.
Future work will mainly focus on improving the ac- Athena Scientific, 1995.
curacy and efficient computation of the presented ap- [15] R. I. Bahar, E. A. Frohm, C. M. Gaona, G. D. Hachtel,
proximation technique and its effective combination with E. Macii, A. Pardo, and F. Somenzi, “Algebraic decision dia-
grams and their applications,” in ICCAD, pp. 188–191, 1993.
other incomplete verification methods. In particular, we
are interested in techniques for probabilistic design block
characterization that allow a compositional approach for
guided state space search. Further, we are investigat-
ing methods that gather statistics while performing the
state space search with the objective to correct the ap-
proximate reachability probabilities on the fly.
7 Acknowledgments
The authors would like to thank Luca de Alfaro and Amit
Mehrotra from UC Berkeley for the valuable input.