Border-Block Triangular Form and Conjunction Schedule in Image Computation? In-Ho Moon and Fabio Somenzi Department of Electrical and Computer Engineering, University of Colorado at Boulder fmooni,
[email protected]
Abstract. Conjunction scheduling in image computation consists of clustering the parts of a transition relation and ordering the clusters, so that the size of the BDDs for the intermediate results of image computation stay small. We present an approach based on the analysis and permutation of the dependence matrix of the transition relation. Our algorithm computes a bordered-block lower triangular form of the matrix that heuristically minimized the active lifetime of variables, that is, the number of conjunctions in which the variables participate. The ordering procedure guides a clustering algorithm based on the affinity of the transition relation parts. The ordering procedure is then applied again to define the cluster conjunction schedule. Our experimental results show the effectiveness of the new algorithm.
1 Introduction Symbolic algorithms for model checking [11] spend most of the time computing the predecessors or successors of sets of states. The algorithms for these image and preimage computations have been the object of careful study over the last decade. The state transition graph of the system subjected to symbolic model checking is given as a predicate T (y; w; x) that is true if there is a transition from State x to State y under Input w. The predicate is usually described by a Binary Decision Diagram [2]. Representing T (y; w; x) by a single formula is often impractical [5, 14, 3]; a partitioned representation is used in those cases. The partitioned transition relation approach is especially natural when the system to be analyzed is a deterministic hardware circuit. Then, each binary memory element of the circuit gives rise to one term of the transition relation. When the circuit is synchronous, the partitioning is conjunctive, and T can be written as the product of bit relations. Efficient computation of images and preimages for partitioned transition relations requires that two problems be addressed: 1. The clustering of the bit relations so that the number of the conjuncts is reduced without negatively affecting the size of the BDDs involved. 2. The ordering of the clusters so as to minimize the intermediate products. ? This work was supported in part by SRC contract 98-DJ-620 and NSF grant CCR-99-71195.
2
Clustering and ordering can be seen as two aspects of the general problem of arranging the bit relations in a directed tree such that its leaves are the bit relations themselves and the set of states, S , whose image or preimage must be computed. Each internal node of the tree corresponds to a conjunction and to the quantification of some variables from its result. The subtrees from which S is not reachable can be processed once before images or preimages are computed: They correspond to the clusters. After clustering, the internal nodes of the directed tree form a total order, which yields the desired ordering of the clusters. Therefore, we refer to the combined problem of ordering and clustering the bit relations as to the conjunction scheduling problem. The variables that can be quantified at each node of the tree are those that only appear in the functions at the leaves reachable from the node. It is usually advantageous to quantify many variables soon, because the ensuing reduction in the support of the conjuncts helps keep the size of the BDDs under control. Therefore, ordering and clustering the bit relations is often seen as the problem of finding a good quantification schedule. However, early quantification is only one objective of good ordering and clustering. Hence, we prefer the name conjunction schedule. In this paper we propose an approach to the conjunction scheduling problem that is based on the analysis and permutation of the dependence matrix of the system. The dependence matrix gives the variables on which every bit relation depends. (These variables form the support of the bit relation.) Our method produces good quantification schedules, though it takes into account other factors as well, which may significantly affect the time and memory requirements of image and preimage computation. Though most of the results and ideas presented in this paper apply to preimage computation as well as to image computation, our discussion and experiments are currently restricted to the latter. The importance of the quantification schedule was recognized in [14, 3]. Geist and Beer [7] proposed a heuristic algorithm, later improved by Ranjan et al. [13]. Hojati et al. [9] showed that the problem of finding a tree such that the support of the largest intermediate product is less than a given constant is NP-complete under the simplifying assumption that the support of f ^ g is the union of the supports of f and g . As a result, the algorithms that are commonly in use for clustering and ordering transition relations are heuristic. Ours is no exception. On sparse dependence matrices it runs in time linear in the size of the matrix, that is, quadratic in the number of state variables. The dependence matrices of large circuits are almost invariably sparse. The study of the dependence matrix in image computation was the topic of [10]. The context there was image computation with the transition function method—input splitting in particular [5, 4]. From the dependence matrix one could extract information about the BDD variable order and the choice of the splitting variable. More recently, Moon et al. [12] have used the dependence matrix to dynamically guide the choice of image computation algorithm. The rest of this paper is organized as follows. Section 2 reviews background material. Section 3 discusses the conjunction scheduling problem and presents our ordering algorithm, while Section 4 describes our clustering procedure. Section 5 discusses the benefits of decomposing the dependence matrix in connected components. Section 6
3
contrasts our approach to another ordering algorithm based on analysis of the dependence matrix. Section 7 presents experimental results and Section 8 concludes.
2 Preliminaries We are interested in computing the set of successors of a set of states of a transition structure K = hT; I i consisting of a transition relation T (y; w; x) and an initial predicate I (x). The set of variables x = fx1 ; : : : ; xm g encode the present states; the set of variables y = fy1 ; : : : ; ym g encode the next states; and the set of variables w = fw1 ; : : : ; wn m g encode the primary inputs. We assume that the transition relation is given as a product of bit relations.
T (y; w; x) =
^
1im
Ti (yi ; w; x) =
^
1im
yi ^ Æi (w; x) _ :yi ^ :Æi (w; x)) :
(
Each Ti is called a bit relation. The extension to the conjunction of arbitrary subrelations is left to the reader. Ordering and clustering rewrite the transition relation as
T (y; w; x) =
^
1ik
T^i (y; w; x) ;
where k m, and each cluster T^i is the conjunction of some Ti ’s. The conjunction scheduling problem consists of deciding the value of k , and what bit relations are merged into the i-th cluster. Given a set of present states S (x), the set of their successors P (y ) is the image of S (x) and is computed by
P (y) = 9x; w: S (x) ^
^
1ik
T^i (y; w; x) :
We assume that the computation is performed as follows:
9v1 :(T^1 ^ ^ 9vk :(T^k ^ S )) ; S where v i is the set of variables in (x [ w) n i